LAMPlights Personal anecdotes from my experiences using the LAMP stack

17Jan/104

Unit Testing and the Law of Demeter

I was writing some code today and not using Test-Driven development.  The reason was that I did not have a good understanding of what I was writing, so I decided to write some of the guts before writing the tests.  In the process of writing the guts, I recognized that I was paying very close attention to how I was going to later test each of the methods I was writing. I was paying especially close attention to the Law of Demeter.   The idea behind the Law of Demeter is to keep units of code distinct from one another. So how did this relate to my code?  To put it simply, my business logic methods did not use get methods.

16Jan/107

Facebook Thrift PHP Client

A while back I wrote a post about using Facebook's Thrift.  One comment asked me to post the PHP client used to connect to the C++ server I was demo'ing.  Most of the client is boiler-plate code generated by Thrift, so I chose to omit it at the time.  Here it is:

16Jan/106

Speaking at Jan. 20th LA LAMP meetup

I will be giving a short presentation on HauteLook's architecture at the LA LAMP meetup on January 20th.  I have been meaning to join a user group for some time, so this worked out perfectly.  Any developers in the LA area on that day should come, even if it is just for the free food and beer.