Friday, January 27, 2012

YouTube: Vibop by NewBlue

I'm proud to announce that we launched a new partner, Vibop:
Vibop makes your videos shine with just a few clicks. Add an animated intro, a vintage filter, a cartoon look, a silent movie theme, and dozens of other effects. Brighten dark images and fix a shaky camera. Fun, fast, and easy, Vibop will take your memories to the next level!

Dart at BayPiggies

I gave a talk on Dart last night at BayPiggies. We had a great turn out, and the crowd was super interactive! Never underestimate a Python programmer's ability to question every aspect of a new programming language, especially one that uses curly braces and semicolons ;)

If you're interested, here are the slides.

Tuesday, January 24, 2012

Walking Skeletons and TODO Outlines

These days, applications are so complicated and contain so many layers that it's difficult to know where to start. Should you work bottom up or top down? How much should you work on one layer before starting to work on the next layer? How can you ensure that the layers work properly together? Building a walking skeleton and managing a TODO document in outline format are two techniques that work well together to conquer complex problems, even ones involving multiple layers. Best of all, you don’t have to worry about trying to get things right the first time or getting lost along the way.
A Walking Skeleton is a tiny implementation of the system that performs a small end-to-end function. It need not use the final architecture, but it should link together the main architectural components. The architecture and the functionality can then evolve in parallel. -- Alistair Cockburn
Building a walking skeleton is a great way to handle the complexity of dealing with multiple layers. Start with the simplest possible feature, and implement it top down. Ideally, the feature should force you to work your way all the way down the stack. The goal is to make sure the layers work together.

As you’re building the walking skeleton, you may think of many things that you need to add, test, or in general worry about. It's helpful to maintain a TODO document in outline format so that you can organize and plan your attack, especially when you’re working with multiple layers at the same time. Eventually, each TODO item can be transferred into a test, a piece of code, an issue in the bug tracking system, or perhaps just an email to someone else.

Once you’ve built a walking skeleton, should you go back to developing one layer at a time? For most applications where the cost of change is low, probably not. Actively building one layer at a time is frequently very inefficient. A more efficient approach is to focus on one feature at a time. Sketch out the feature using a set of TODOs and build it top-down, managing the TODOs as you go. If you focus on one feature at a time instead of one layer at a time, you won’t end up building a lot of code in different layers that never actually gets used. The time saved by only building what you need and only building it when you have all the information you need more than compensates for the refactoring time.

Thanks go to Chris Lopez for his help with this post.

Monday, January 16, 2012

Books: Out of their Minds: The Lives and Discoveries of 15 Great Computer Scientists

I just finished reading Out of their Minds: The Lives and Discoveries of 15 Great Computer Scientists. In short, I liked it. I wouldn't say I liked it as much as, say, Coders at Work, however, I'm glad I read it. What I liked most about it was that it contains biographies from really early computer science pioneers such as Ada Lovelace, John von Neumann, John Backus, and John McCarthy. I know computer history after 1970 really well, but this book contains a lot of stuff from before 1970.

I jotted down a few interesting tidbits while I was reading the book. However, since I read the Kindle version of the book, I only have percentages, not page numbers. Anyway, I hope you're as entertained by some of these as I was.

John Backus, who lead the team that created Fortran at IBM, flunked out of college [2%]. He had a metal plate installed in his head [3%]. He disliked calculus but liked algebra [3%] (just like me!). These days, Backus is a proponent of functional programming [7%].

John von Neumann, who helped establish the fundamentals of computer architecture, thought that creating a programming language (i.e. Fortran) was a waste of time since programming wasn't a big problem [4%].

Ada Lovelace, who was the first programmer (not to mention, a girl!), was a gambler, an alcoholic, and a cocaine addict. She died of cancer at the age of 36. She is credited with inventing loops and subroutines [5%].

Fortran only had globals. Algol, which is considered an ancestor of C, added locals, thus permitting recursion [6%].

McCarthy, who designed Lisp, was born in 1927 to Communist party activists. He had an Irish, Catholic father and a Lithuanian, Jewish mother [8%]. McCarthy is the reason Algol had recursion [11%]. (I didn't know that C got recursion because of Lisp.)

Alan Kay, who did pioneering work on object-oriented programming and helped create Smalltalk, got thrown out of school for protesting the Jewish quota [15%].

Edsger W. Dijkstra, who did influential work on a lot of early computer science problems such as concurrency, did very well in school and wanted to turn programming into a respectable discipline [21%].

Fred Brooks, who wrote "The Mythical Man-Month", wrote this about iterative development:
In "The Mythical Man-Month" I said build one and throw it away. But that isn't what I say anymore. Now I say, build a minimal thing--get it out in the field and start getting feedback, and then add function to it incrementally. The waterfall model of specify, build, test is just plain wrong for software. The interaction with the user is crucial to developing the specification. You have to develop the specification as you build and test.