Photos

Up until yesterday, and for the last month, we’ve been housing a fellow IT geek from Germany. He goes by the name of Daniel, and he’s quite an energetic and fun person to hang out with. Here you can see him with yours truly (and a very nice caipirinha waiting for me)

That same night I gave him a lesson of how pool should be played. Look at this awesome picture of me shooting, taken by the very talented Claudia (who kicked my ass once or twice during that night):

It’s been some time now that I’ve taken upon coding on an application that someone else’s built. Now that’s not unusual, I have done so on many other projects. What makes this endevour quite unlike many others is that it has made me realize how often we can find bad code. Sorry, scratch that, I mean really bad code.

It’s not bad code as a result of ignorance, but worst, because of bad habit. Actually, scratch that too. I would say malice. Take this PHP class:

Because of some NDA agreement that I have signed, I’m actually mocking what I have to deal with every day. But trust me, it’s much worst than this. Get the picture? A huge chain of private methods, calling each other, and a comment ratio *way* about what is acceptable (what good is it if on a comment you are actually explaining what a very simple if statement is doing?). Now, you may be asking yourself, why do I call this (crappy) code malice? Because it is meant to generate mode source code lines. Therefore: more money to charge to the client.

I have seen this over and over lately, on a very big project I’m working on. And the truth is, as a member of an outsourcing software developing firm, I’ve come to realize that us (freelance developers) should be accountable for such bad code. The one who produced this kind of crappy code should be made accountable for the amount of hours it takes to refactor their code, and make it actually usable.

I came back to Buenos Aires the day before yesterday, after a wonderful experience in Orlando. CakeFest was not only a great opportunity to be a part of the first official CakePHP gathering, but most importantly to meet a lot of smart people. As I said to someone while in Orlando, eventhough all the talks were thorough and hands-down interesting, I found that the after hours were the moments where I got most out of the conference. Just hanging out with fellow bakers, drinking beer (lots of beer) and talking code to each other was an incredible opportunity.

I enjoyed my time there so much that I came back completely decided to host a CakeFest in Buenos Aires, Argentina during the first week of December, 2008. I am already taking care of the organization and will open up inscriptions very soon (so now you can’t complain, you have almost 10 months of notice.) Some of the talks will be english and some in spanish, so everyone is invited to join. As a corolary, I’ll leave you with some pictures taken in Orlando (wish I would’ve taken more). Click on the pictures to get their respective bigger size photos.

With just hours left to launch the first CakeFest conference, people are starting to show up and speakers are working ’round the clock with their presentations. However, something has been catching my attention since I came to the hotel: I am different. That’s right, I am unique. I stand out as an oasis in the middle of the desert. Don’t take my word for it, just look at my dear old Thinkpad standing in a pool of Macs. And in case you are wondering, people there from left to right are: Jeff Loiselle (aka phishy), Felix Geisendörfer (aka the_undefined), Tim Koschuetzki, and giving his back is Dennis Hennen.

With the recent release of the confirmed schedule for the CakeFest conference, you can see that my talk entitled Making your Models Behave has been allocated for Friday, February 8 at 11.15 am. Right after Nate’s keynote, and before lunch, what an honor

For those of you who are attending my talk will be focused in understanding and exploiting the potential of what I consider to be one of the coolest features CakePHP has brought us: model behaviors. And for those of you who are not going, what are you waiting for? There are still tickets available. Reserve your flight and your stay, and head on to the conference.

If for some reason or another you are not going, we will be releasing the presentation slides on the CakeFest site sometime in the feature.

A lot has happened in the last few weeks, but it all came together today: CakePHP 1.2 has reached its beta status and the CakeFest website has launched officialy. CakeFest is the first official gathering related to CakePHP, and will be celebrated in Orlando, Florida, on February 6, 7, and 8, 2008. You’ll get a chance to see experienced CakePHP developers (that’s right, the core team will be there) sharing their knowledge in talks and different events. I will be there as well, regardless if that’s good or bad news to you all. So don’t wait any longer, go and find out about the CakePHP festivities and save your ticket

It’s been some time since I’ve done any work on expects, and while enjoying the incredible set of cool features CakePHP 1.2 pre-beta is giving us all, I decided it was time to let expects meet 1.2. My new baby is called ExpectsBehavior. As its 1.1 predecessor, its main goal is to provide a wrapper for CakePHP’s unbindModel function, to let the developer specify what bindings (model relationships) he’s expecting right before a find. At the same time, I needed some new features to be added, some of them courtesy of the previous brain work Felix did on his very cool Containable behavior.

CakePHP 1.2 sexyness is mainly a result of its convention over configuration methodology. Theoretical discussions aside, conventions save us (developers) valuable time, and allow us to concentrate on where we should put our effort: business logic. Some conventions may go under the radar until you find what you think is a weird bug. Let’s see an example by building a simple action in a controller:

While enjoying the wonderful CakePHP live show (don’t despair, I will be on soon, adding some of my latin flavor to spice up phishy’s boring comments… just kidding , PhpNut made a remark that is worth listening to: CakePHP 1.2 allows you to override CakePHP’s defined tags. Yeah, I know, so did CakePHP 1.1, but now you can define your own base helper, from which all CakePHP helpers will inherit, and only override the tags you decide. That’s right, no more copying tags.ini.php to modify it. Just define what you need, and how you need it. Let’s see how.