Best books of 2008

You might remember my beloved mantras: learning a new programming language and reading at least 6 relevant books every year. Following the 2007 edition, here’s the list of the 8 books I have enjoyed most in 2008, ordered by a purely subjective and absolutely irrational decreasing preference. I strongly recommend all of them!

Winner: Geekonomics: The Real Cost of Insecure Software by David Rice

Runner-up: The No Asshole Rule: Building a Civilized Workplace and Surviving One That Isn’t by Robert I. Sutton, PhD

And 6 more:

Continue reading

The Dirty Little Secret of iPhone Development

This is happening right now, at a web agency near you.

The dot-com boom of the 90′s spawned a brand new generation of coders and software developers, including me, by the way. While before that time the term of “software developer” might have been reserved to system programmers fluent in C, COBOL, C++ or other languages, right now the vast majority of developers I know spend their time writing web applications, either public or in a private intranet, in J2EE, ASP.NET, Rails, PHP, you name it.

I have said before that writing web applications should be taken as seriously as writing desktop systems. Call me names if you want, but I’m a big fan of Joel’s Test.

However, after all this years, after the Chaos reports, after Peopleware, after the Mythical Man Month, people still treat quality as an afterthought. And also complain about how much software sucks, how expensive it is, and how late it arrives, by the way. Now that the iPhone SDK is widely available, that the App Store is selling more apps that we could have had imagined 6 months ago, many web agencies want to jump to native iPhone development contracts, which are hype and nice and pricey and whatnot. Which is only going to make things worse.

The dirty little secret in this story is this: iPhone development looks more like developing applications for a desktop operating system, and less, much less than web development. And I’m frightened to see some small shops (and even bigger ones), who never attained a real level of professionalism or quality in their software tasks, starting projects and realizing, later, when they are over budget and behind schedule, that this kind of applications requires a different mindset.

Continue reading

iPhone Font Browser

One of the most common questions I get when working with clients on iPhone apps is this one:

Which fonts can I use in iPhone apps?

I was surprised to see that the Xcode documentation does not bring a list of the fonts available in the iPhone OS (have I missed it? Is it somewhere else?), and I was happy to find this blog post the other day. Taking his idea as a basis, I’ve created a font browser for the iPhone which I’ve published in the projects section of this blog.

Feel free to play with the code! As usual, no warranties of any kind, but I’m already using it every day :)

REST and Objective-C, again

I’ve just uploaded some code derived from the Objective-C wrapper I’ve shown in this post. You can find it in the “Projects” section, as usual and it’s simply a wrapper around the URL loading system of Cocoa, both for Macs and iPhones, providing a custom delegate protocol, so that you can handle the events raised by the wrapper:

[source:C::firstline(13)] @protocol WrapperDelegate

@required - (void)wrapper:(Wrapper *)wrapper didRetrieveData:(NSData *)data;

@optional - (void)wrapperHasBadCredentials:(Wrapper *)wrapper; - (void)wrapper:(Wrapper *)wrapper didCreateResourceAtURL:(NSString *)url; - (void)wrapper:(Wrapper *)wrapper didFailWithError:(NSError *)error; - (void)wrapper:(Wrapper *)wrapper didReceiveStatusCode:(int)statusCode;

@end [/source]

The sample project, available in the zip file, shows how a simple Cocoa controller can interact with the Wrapper class as required. Enjoy!

Update, 2008-10-26: After a bug report from StuFF mc I’ve updated the code for a better support of POST and PUT requests, and also added a sample PHP file for a quick test of the functionalities.

Dangers of Prototyping

Frederick P. Brooks Jr. has written about prototypes, saying that they are not only useful but strictly fundamental pieces of the overall software process, as in many other engineering activities. He gives the example of a pilot chemical plant, prepared to process 10’000 units per day instead of the 2 million units a day that the final plant would have to handle, in order to demonstrate the feasibility and uncover some unforeseen problems.

He summarizes his opinion in the famous phrase “plan to throw one away” (Brooks, 1995, page 116), underlining the problem of change management: managing change, right from the beginning of the project, instead of ignoring or avoiding it, is particularly important in software projects, since it presents a solid mindset for all stakeholders in order to avoid scope creep, schedule and staffing problems. Continue reading

Saving a Failing Project

In 2006 I had the opportunity to work as a “project leader” into a small failing project. Three developers were working in an ad hoc basis, creating a software application for an important client (a government office in Lausanne), without any kind of detailed formal specification, without any kind of design documentation, and with strong pressure from the management to release the application, even if not in an usable state. Needless to say, the project was also beyond budget.

I had just joined this company a couple of days ago, and the management asked me to take the project in charge. Not an easy task, particularly because it was my first experience of this kind. Continue reading

Adding Manpower

Published in 1975, “The Mythical Man-Month” is considered an all-time classic in the software engineering field. The book author, Frederick P. Brooks Jr., used his experience as the project manager of the IBM System/360 and its software, the Operating System/360, to explain a common set of problem patterns, applicable to other software projects as well.

One of the most famous citations in the book is the one regarding the consequences of adding human resources to a late project; this article will provide a couple of thoughts about this assertion, and highlight some contrariwise opinions. Continue reading

Screen Savers for the Mac using Flash

This is an evening project that turned out to be really cool. Let’s say that you’re a Macromedia Flash designer, and your clients ask you to bundle your nice Flash movie as a screen saver. What to do? For Windows there are free utilities to convert a SWF into a screen saver, but not for the Mac – and the first commercial one costs around USD 200!

I propose here a simple solution for this problem:

  1. Using Xcode, you can create screen savers (basically, Cocoa apps).
  2. Cocoa applications can host a WebKit component (basically, Safari).
  3. Safari can show local HTML pages (basically, “file:///” stuff).
  4. And HTML pages can show Flash movies (basically, <OBJECT> and <EMBED>)

The idea, then, is to bundle your own page, with your own movie, inside the screen saver bundle, and show the Flash movie this way. Easy said, easy done.

It all goes nice until… you try this solution :) The problem is, Flash movies loaded from “file:///” URLs are blocked by the built-in security mechanisms of Adobe… and you have to find a workaround for that. Mine was to follow the instructions on how to bypass the Flash security mechanism, and then create an installer package that will do what’s needed for you to enjoy the screen saver.

You can get both the project and the installer package in my projects section. I’ve tested the installer in three different machines, and it worked, so I hope it’ll work for you too :) Enjoy! As always, try this at your own risk. Murphy says that things can go wrong, so watch out.

My first Django project

So here it is, my first Django project: the gazillionth blog engine on the planet!. As if there weren’t enough, right? :) Actually it was a practical and easy way to learn the Django project, and the result is pretty neat. Feel free to download it, play with it, and give me your feedback. Here’s a sample screenshot in Safari:

screenshot.png

Creating this project I have had a practical experience comparing both Django and, of course, Rails. The subject is not new in this blog; however, this time I could play with both frameworks and as such, I can bring my small amount of confusion in this big framework tar pit. Continue reading