Sales Totals for Core PHP and Core MySQL


Long, long ago, I wrote a book about PHP. Actually, it was the first book about PHP. And it was a success. It lead to two more editions and another book about MySQL. Zeev, Andi and Monte each graciously helped with reviews, writing and endorsements. Being a best-selling author of the first PHP book has been great for landing gigs. Facing a range of criticism, especially in Amazon reviews, was a valuable learning experience.

Having last published a book in 2003, you might guess that sales have dropped off. The royalty checks are small. Even though the effort to write the books was immense, the rewards more than made up for it, especially for the first edition Core PHP. Despite diminishing returns, I might have continued the pattern of writing a new edition for each major version of PHP, but better books came out and PHP 6 never did.

As a perspective-setter, I offer all-time sales totals for the four books I wrote.

  • Core PHP 1/e (1999): 19,448
  • Core PHP 2/e (2000): 16,714
  • Core MySQL (2002): 5,773
  • Core PHP 3/e (2003): 11,456


Factors Affecting Code Quality and Estimation


Last September, ZeroTurnaround released analysis of a survey focussed on tools and practices of developers. They reported on how these affected the quality of code and how predictable delivery dates were. The Developer Productivity Report 2013 is a long read with lots of details. In the end, the data support what most developers already know. If you’re a programmer like me, does any of this surprise you?

  • Pair up with another coder sometimes
  • Automate unit tests and keep on top of failing tests
  • Minimize meetings
  • Use source code control
  • Use an issue tracker
  • Use an IDE and a debugger
  • Do code reviews of new code
  • Estimate as a group, but exclude the managers

I accept all of this with the except that I have not found IDEs to be a significant improvement to my productivity. Sometimes I wonder if exposing all the prototypes through popups doesn’t prevent developers from mastering a system and internalizing it. On the other hand, having memorized all the random parameters to PHP’s function might have been a waste of brain space. I’ll probably be fine for now with Geany and grep.

There’s a remarkable nugget about testing (slide 7):

Automated tests showed the largest overall improvements both in the predictability and quality of software deliveries. Quality goes up most when Developers are testing the code (also discussed in Sven Peter’s talk “How to do Kickass Software Development” at GeekOut 2013), which means that you shouldn’t just leave testing to QA team, but bake it into the development process as well. The rest of the measurements were more or less insignificant, although we don’t recommend letting yourcustomers/users test your software for you.

If you can convince your developers to do testing, there’s a big advantage for quality.



The “I Eat Poo” Game


Seems like you’d need to be drunk or young or both to play this, but it does illustrate a game mechanic I like. That is the hidden wager mechanic. In games played around a table, it keeps everyone engaged and prevents those lulls where one player is deep in thought while the other players might get bored.

I Eat Poo — Jeremy — Medium

Earlier this evening, @danfuzz told me that some of his friends were playing a game called “Tweet or Twenty” in which everyone around a table selects a Cards Against Humanity white card and either must post the content to their Twitter account or pay $20 into a pot. The idea is that if the card is too embarrassing, you’d rather pay than have to post it.

I thought this was a fun idea until I realized that since (a) the posts all contained “#TweetOrTwenty”, and (b) a more-or-less complete list of Cards Against Humanity cards is readily available, embarrassment is limited because it’s easy to tell when someone is playing and therefore when their post is not to be taken at face value. So I started thinking of ways to remove this limitation.

Automated unit tests from Asis


This tool allows you to periodically grab stack traces and record calls to a library that are then saved as unit tests. It’s a shortcut to getting coverage for a library that’s already in production and stable.

zavg/Asis · GitHub

Asis – Tool to deal efficiently with legacy code through creating and running characterization tests automatically.

The main idea is the following: while user or tester is using your product (for example, Web site) the Asis tool records the function calls which are performed, the sets of arguments which are passed to the function and the received output. Output can be any, starting from strings, integers, HTML, JSON and finishing with serialized objects with complex internal structure. We don’t care what we receive – we just record it and approve as correct result, because we know that we are working with the stable release version.

Psychology Links


Here’ are some links to articles about psychology that caught my interest in the past several months.

Subscribe to RSS Feed Follow me on Twitter!