Thursday, 19 September 2013

Software Requirements, Third Edition

Title: Software Requirements, Third Edition
Author: Karl Wiegers and Joy Beatty
Publisher: Microsoft Press


Although it’s been a long time since I studied SSADM, I've worked in the IT industry for some 18 years now and I remember the painful lessons learned in Trinity College all those years ago - and the even more painful lessons learned from ambiguous or incomplete requirements in the years since.

The authors of Software Requirements, Third Edition have clearly felt this pain too and have sought to minimise the amount of painful lessons learned by following good methodologies, learning from mistakes and learning how to work with the customer and all relevant stakeholders. They then kindly shared this knowledge in the form of this offering from Microsoft Press.

This is not a boring title droning on about how to obtain requirements however; the authors have looked at every facet of requirements gathering and requirements analysis and present information on every stage to the readers. Software Requirements, Third Edition begins most chapters with an anecdote - or perhaps horror story is more apt - which serve to highlight the need for the specific topic covered in the coming chapter. At the end of each chapter is a 'Next Steps' section which give you practical exercises to do to reinforce what you have learned.

I'm an advocate of humour in teaching as it helps to engage the audience that you’re trying to teach, makes it a little easier for your audience to focus and even makes it a little more bearable for the teacher too. As such, it’s always nice to find little gems in a book, as was the case here. Coming from initially a science background I loved the following comment in one of the case studies “The synthetic chemist who first makes the new chemical (he’s a real person, but a synthetic chemist)” and general witticisms offered throughout such as “It’s important to recognize the value of recording vital requirements information in a shareable form, rather than treating it as oral tradition around the project campfire” and headings such as “When bad requirements happen to good people”.

Software Requirements, Third Edition mostly assumes that you have experience in project management but still takes the time to explain the fundamentals, albeit at a high level. With that having been said, don't expect to use this as a learning text with zero prior knowledge - you won't be completely lost but you will find that it is outside of the scope of this book to teach you everything from scratch.

Rating

For it's horror stories alone I'd rate this 5/5, this book is a must for anyone involved in determining requirements. Buy it, read it, laugh at the 'horror stories' and then prepare for a similar fate if you don't heed the content! 

"Software Requirements", Third Edition can be found on the O'Reilly website

Thanks for reading!

Andy



I review for the O'Reilly Blogger Review Program

Tuesday, 10 September 2013

Designing For Change

Title: Designing For Behavior Change
Author: Stephen Wendel
Publisher: O'Reilly Media.


First and foremost - as this is an early release there were numerous formatting issues and some spelling mistakes but this was to be expected, "Early Release - Raw and Unedited" emblazoned on the front of the book does somewhat suggest potential issues. As such, I'll stick solely to the content.

Stephen Wendel guides us adeptly through the inner workings of our lazy minds and shows us how to maximise our chances of effective designs for behaviour change by paving the way to good design with excellent theory, references and his own experiences to draw upon.

In the preface, the author clearly defines the scope of this book and, most importantly, the audience for whom the book has been written and the types of changes that the book can help you to achieve in your designs. If you're planning world domination by brainwashing people through your apps then this book is not for you (indeed bad news for you in general as the author reveals that it is in fact quite difficult to coerce people to do something that they don't want to). If, however, you genuinely want to help people to develop better habits then read on. 

In order to effect change, the person looking to design for change needs to understand how the mind makes decisions and why it makes the decisions that it does make and not others. Once this has been discussed (with some fascinating data / anecdotes from studies), the author then introduces strategies for actually changing behaviour. 

Armed with this knowledge, you are then taught how to take the theory already learned and apply to the people that you want to reach, in a logical progression that begins with figuring out what exactly you want to do, how to do it and then continues on to how to actually implement it, solicit feedback and continually refine your product.

Even if you never hope to develop a product for behaviour change, this book is a fascinating read that illustrates how we as a species tend to think and how people try to use that information (for both good and bad) to influence our decisions. If you are hoping to develop a product for behaviour change then get this book without delay.

I'm quite delighted, apart from the sterling content of the book, at the use of humour too. Little things like the summary of each chapter being referred to as "On a Napkin" make it all a more pleasant read. I was also delighted to see references to Brian Wansink, another excellent author on behaviour (and a funny guy too)

If you're looking to help people with behaviour (not addictions) or are just interested in the topic then get this book, you won't regret it.

Rating

A hearty 5/5, this book is a fascinating read. Buy it, read it and then go read the material that he's linked or referenced. 


"Designing For Behaviour Change" can be found on the O'Reilly website. 

Thanks for reading!

Andy



I review for the O'Reilly Blogger Review Program

O'Reilly Blogger Program

In order to ensure a healthy amount of up-to-date books and topics I have joined the O'Reilly blogger program. This program is effectively the trade of a book for a review, though O'Reilly impose no restrictions on the review, reviews can be negative or positive. Where a book has been received as part of the review program I'll clearly mark it as such.

Thanks for reading!

Andy

Friday, 6 September 2013

Learning SQL (Master SQL Fundamentals)

Author: Alan Beaulieu
Publisher: O'Reilly
ISBN: 978-0-596-80219-6
Format: E-Book


Content

So, what does the book actually cover? Well, pretty much everything you'd expect a book with the tagline 'Master SQL Fundamentals', truth be told. The problem with tech books is that there's usually no surprise in the title. Oh well, c'est la vie, as problems go it's far from being the worst in the world!

The following chapter list will give you an idea of what topics made it into the book with a very brief breakdown of each chapter to follow below.

  1. A Little Background
    Introduction to Databases
    What Is SQL?
    What Is MySQL?
    What’s in Store
  2. Creating and Populating a Database
    Creating a MySQL Database
    Using the mysql Command-Line Tool
    MySQL Data Types
    Table Creation
    Populating and Modifying Tables
    When Good Statements Go Bad
    The Bank Schema
  3. Query Primer
    Query Mechanics
    Query Clauses
    The select Clause
    The from Clause
    The where Clause
    The group by and having Clauses
    The order by Clause
  4. Filtering
    Condition Evaluation
    Building a Condition
    Condition Types
    Null: That Four-Letter Word
  5. Querying Multiple Tables
    What Is a Join?
    Joining Three or More Tables
    Self-Joins
    Equi-Joins Versus Non-Equi-Joins
    Join Conditions Versus Filter Conditions
  6. Working with Sets
    Set Theory Primer
    Set Theory in Practice
    Set Operators
    Set Operation Rules
  7. Data Generation, Conversion, and Manipulation
    Working with String Data
    Working with Numeric Data
    Working with Temporal Data
    Conversion Functions
  8. Grouping and Aggregates
    Grouping Concepts
    Aggregate Functions
    Generating Groups
    Group Filter Conditions
  9. Subqueries
    What Is a Subquery?
    Subquery Types
    Noncorrelated Subqueries
    Correlated Subqueries
    When to Use Subqueries
    Subquery Wrap-up
  10. 10 Joins Revisited
    Outer Joins
    Cross Joins
    Natural Joins
  11. Conditional Logic
    What Is Conditional Logic?
    The Case Expression
    Case Expression Examples
  12. Transactions
    Multiuser Databases
    What Is a Transaction?
  13. Indexes and Constraints
    Indexes
    Constraints
  14. Views
    What Are Views?
    Why Use Views
    Updatable Views
  15. Metadata
    Data About Data
    Information_Schema
    Working with Metadata

Chapter 1 opens you up to what a database is which sets the scene for the rest of the book. Our protagonist....oh wait, wrong book, sorry! The author discusses in brief non-relational database systems followed by the relational database model. What SQL is exactly can be found defined here too along with a very broad overview of SQL statement classes.

Creating and populating a database is the name of the game in the second chapter. The author has kindly added instructions for installing mySQL 6.0 but alas the instructions are out of date now. This is somewhat irrelevant though as pretty much any version will work and there's a ton of how-to documents on the internet that describe how to install the newest versions. Data type, character sets and table design are touched upon with a very basic introduction to normalisation too. This is not a criticism though, this book is about learning SQL - hence the title - and there are volumes of books on the topic of normalisation. Creating and modifying tables and their contents is also discussed and, more interestingly, the author covers some of the pitfalls and common errors that are seen when working with SQL statements.

In the third chapter, you are introduced to a query primer which sets out to inform you how each query is handled, from the server checking your access rights to the various tables and other objects, to the query optimiser which decides on the execution plan to use for your particular query. The topic of hints (for the optimisers) is also touched upon with a brief note on this for each of the main RDBMS systems. Once the theory of how it runs is dispensed with, the meatier topics of clauses, aliases, distinct values, subqueries, views, table links, the where clause, group by and having clauses, order by clause and sorting clauses are discussed.

Filtering in chapter four covers useful things like not deleting every record in your database (or setting every given field to have the same value).The author covers the use of parentheses to make intent clear (both to you and the DBMS), the NOT operator, building conditions, condition types, (equality, inequality, range, etc.) search expressions (wild cards and regex) and the 'joys' of NULL.

As you'll often find yourself needing data from more than one table at a time, the fifth chapter delves into the world of the JOIN keyword and teaches you how to select from multiple tables at a basic level. Inner joins are discussed along with how to tell the optimiser to to use a particular order. Join conditions versus filter conditions are also demonstrated.

Chapter 6 covers working with sets and this is where you FINALLY get to use those Venn diagrams that you learned at school (It's ok, I'll wait while you Google 'Venn diagrams', it's probably been as long for you as it was for me). UNION and UNION ALL are demonstrated, as well as the Intersect and Except operators. Set operator rules are introduced too, such as sorting compound queries and set operations / precedence. 

While not exactly the sexiest of topics, chapter 7 deals with working with character (string generation and manipulation via functions), numeric (arithmetic functions, handling signed numbers and controlling number precision) and temporal data (string representations of temporal data, string-to-date conversions and temporal functions). Conversion using CAST is also covered.

As not all data that you will retrieve from the database will be in its raw form Chapter 8 introduces the concepts of grouping data. GROUP BY and, by extension, HAVING, aggregate functions (MIN, MAX, AVG, SUM, COUNT), implicit versus explicit groups, counting distinct values and using expressions are all discussed here. Once again our friend NULL puts in an appearance, in the form of a cautionary tale of ensuring to cater for it. Finally ROLLUP is discussed with a reminder of the use of the having clause for filtering with groups.
    Subqueries (queries within queries) are a powerful feature of SQL and are covered here in chapter 9. The author discusses different types (e.g. noncorrelated and scalar) and how some can be used on one side of an equality condition. Additional operators that can be used with subqueries are introduced : the IN and NOT IN operators, the ALL operator and the ANY operator. Correlated subqueries are then examined and a previous example is reworked (a common theme throughout the text) to show how these subqueries work.The author also covers the question of when to use a subquery. A lot is covered in this chapter.

    In chapter 10 we rejoin (boom boom!) the author in a discussion of the JOIN. Outer joins (Left versus Right, Three-Way Outer Joins), cross joins and natural joins all get examined, with an increasing complexity to the SQL statements that build upon everything learned so far. 

    The 11th chapter deals with conditional logic and shows you how to have your SQL branch in different directions depending on the column values or expressions. The CASE expression is introduced here in it's various permutations and the concept of selective aggregation is demonstrated, along with the handling of division by 0 (and other errors). It's not just conditional select statements that are covered however as conditional updates are also demonstrated with more handling of the NULL thrown in for good measure. 

    Multi-user databases, locking, locking granularity (table/page/row) are discussed at high level in chapter 12. Transactions are then introduced and the author shows how to start and stop them, the use of savepoints and rollbacks too. 

    While the focus of this book is learning SQL the author shrewdly points out that there are other feathers in the DBMS that can have an effect on the code that you write, among them indexes and constraints. The 13th chapter therefore touches on the theory of indexes, how to create, alter and delete them and considerations for which type of index to use. Just as importantly the downside of indexes are also discussed to make you aware of potential issues in excessive usage. Constraints are also introduced with an overview of how the major DBMS' treat them. 

    The 'how-to' of view creation, modification etc. is covered in the 14th chapter along with the theory of when to use them and their benefits and limitations. 

    Finally, the 15th chapter deals with metadata. A book in its own right, metadata is essentially data about data and this chapter discusses how the DBMS maintains information about every object in it.s data dictionary / system catalogue. The author discusses how to interpret this data, retrieve it programmatically and the practical uses of doing so for schema generation and deployment verification.

    General Impressions

    A well-structured book with dozens of examples and a logical structure, building on each previous exercise to increase your knowledge of how things work in the world of SQL. While the queries are executed in MySQL (as it's free), the author makes note of syntactical differences in statements between the major players of the database world. The aim of this book is to get you to grips with the basics of SQL and does an admirable job of this. Some of the information is a little dated now and a new edition would be quite welcome but it still sets out to do what it states - help you to learn SQL.

    Conclusion

    An excellent book for beginners, the author gives clear examples and scripts to ensure that you are quickly up and running. Intermediate or advanced users can probably skip this; it's by no means a reference and does not cover all the things you'd need day-to-day if you're either a developer or a heavy end-user but then it is called Learning SQL and not Advanced SQL. If you're new to the language, and want to learn the basics in a structured and well thought-out way, pick up a copy.  

    Rating

    A little dated now but still very useful, the price tag of $31.99 may seem a little hefty for the ebook edition, but given all that you get in this book it'd rate it 4/5.

    Thanks for reading!

    Andy

    Next review will be Designing for Behaviour Change