Dec102006

Something to consider when saving HABTM records in CakePHP

Just the other day I was in the process of saving an HABTM (Have And Belongs To Many) field with CakePHP, specifically for saving the relations between a model Project and another model Category. I first had to do a small extension to the helper since Category was also a n-depth level tree, so I’ve used findAllThreaded on the Category model to get the tree and build a nice tree of checkboxes. All good there.

I was then building the screen that would let the user check these checkboxes and save the relations. Now, since the project was already saved and all I had to do in that screen was present the user with the checkboxes, I figured I didn’t need to set any project details when saving, other than the ID of the project that I was relating to. Big mistake.

Continue Reading »



Nov292006

CakePHP Web Service native support

Today an interesting discussion went on CakePHP Google Group regarding the native support for web services Cake offers. After that a couple of articles got written on different blogs (they are still awaiting authorization to be published on the bakery) and are available at:

Quick and Dirty getting your CakePHP to REST: a short article showing how to offer a REST service from CakePHP.

Using CakePHP’s Native Web Service Support: Chris Hartjes’ thorough explanation regarding how to build a web service using CakePHP native support for web services.

BAKE ON!



Nov282006

New articles on the Bakery

I just got published a couple of articles regarding CakePHP on the bakery. Check them out:

Adding friendly URLs to The Cake Blog Tutorial: On this tutorial we’ll learn how to modify The Cake Blog Tutorial to allow friendly URLs when accessing posts.

PayPal Direct Payment API Component: Useful component that provides a wrapper for PayPal’s Direct Payment API, allowing any cake based application to accept payments via Direct Payment (processing credit cards and payments without leaving your website) and Express Checkout (allowing users to use their PayPal account to pay).

BAKE ON



Oct012006

Understanding LOST sequence of numbers

Anyone who’s a fan of LOST is familiar with a sequence of numbers: 4 8 15 16 23 42. These are the numbers that almost connect all strange things in the series. During the second season of LOST it was revealed that the numbers are the code that must be entered into the computer located inside The Swan every 108 minutes (by the way 4 + 8 + 15 + 16 + 23 + 42 = 108). Entering the numbers resets the countdown timer to 108 minutes. If an individual does not push the button in time, the numbers flip to a series of glyphs . While the numeric sequence is flipping into these icons, an individual can still finish typing in the numbers, press execute, and return the counter to 108 minutes. Where do these numbers come from? In mathematics, there’s something known as the Shaw-Basho Polynomial. It’s an equation that reads:

Continue Reading »



Aug252006

Argentina on the Basketball World Championship

Argentina has started the basketball world championship the best way possible. They finished first in their zone with a perfect 5-0 record, and are currently waiting to play New Zealand on the first match of the play offs this Friday.

Yesterday, Carlos Delfino led a fourth quarter rally by Argentina as they recovered from a five point deficit at the end of the third period to take a 83-79 win over Serbia & Montenegro. Argentina, last Olympic champions, are currently ranked the 3rd team on the FIBA ranking, and four years after a close loss in the finale, Argentina’s golden generation is looking for the title that could have been theirs long ago.

New Zealand, a strong yet not very difficult team, is going to be the first step in Argentina’s way to the finals. Two teams appear to be strong contendents to Argentina’s champisonship intentions: United States, and the very strong Spanish team.



Jun282006

Loose Change 2nd Edition, a documentary about 9/11

Thanks to Diego, I have just finished watching a very interesting documentary called Loose Change, produced by Korey Rowe, Dylan Avery, and Jason Bermas. It certainly raises some serious questions about the real facts of what happend before, during, and after September 11, 2001. I strongly recommend you take a look, even if you are not from the United States.

Continue Reading »



Jun232006

The danger of MBA types running software development firms

Reading Joel’s blog, I picked up on something he said that got me thinking: “Watching non-programmers trying to run software companies is like watching someone who doesn’t know how to surf trying to surf [...] The cult of the MBA likes to believe that you can run organizations that do things that you don’t understand.”

Through my own working experience, I find this statement to be absolutely true. A lot of MBA types go in to great MBA schools, get their praised degrees, and come out thinking: “Ok, now on to conquer the world… Which company should I be running?” When in fact they should be thinking something like: “What can I really do to manage a company and not sink it down?” There are tons of examples in the world of this kind of “executives as a life style” type of people who believe just because they’ve got an MBA they can understand anything that is put on their desk. Well, they can’t.

Continue Reading »



Jun072006

First Google Analytics results for Java Users Group Argentina

After some short setting up (about two minutes per site), I’ve added Google Analytics code to start getting some statistics to these sites: CRICAVA Technologies corporate site, CRICAVA Technologies Open Source, CRICAVA Offshore Development Portfolio and Java Users Group Argentina. I must say I’m quite happy with the ammount of data Analytics is starting to provide after a couple of days. Eventhough you have to get used to the way they organized the information (I see a lot of UI theory work there), you can get valuable conclusions that are hard to obtain with any standard statistics package. Let’s see some of those.

Continue Reading »



May122006

An interesting way to protest against pulpmill pollution

The picture you can see below is traveling the world. A woman wearing a bikini and knee-high boots disrupted the shooting of a group photo of EU and Latin American leaders at a summit in Vienna on Friday. The woman, who identified herself as Evangelina Carrozo, was protesting the construction of two wood pulp plants that are being built in Uruguay near a river border with Argentina. Read more about this.

While the form of protest may appear frivolous to the naked eye, the issue is quite serious. Uruguay has agreed to the contruction of two wood pulp plants that have failed to demonstrate that their day to day activities won’t have a major impact on the Uruguay river. It is such a serious issue that two nations that have been historically united (Uruguay and Argentina), are now facing their worst diplomatic conflict.

I do believe that the plants should not be built. It is an extreme position (the politically correct statement would be just to ask for serious studies showing the impact on the environment), but it is a well founded one. It is A FACT that such factories have a HUGE negative impact on the environment. Argentina knows about this, since we have our own share of paper mills destroying natural life.



Apr272006

Argentina: 3.71 % of its population affected by traffic accidents every 10 years

I am shocked. I just read a study saying that in Argentina, during 2005, 14,526 people died and more than 120,000 were injured just by traffic accidents. That is: 39 deaths and 328 injured per day. This sickening high number puts Argentina as the country with by far the most number of traffic accidents. Between January and March of 2006, 1,777 people died as a result of a traffic accident.

Consider that Argentina has a population of 36,260,130. This means that 0.37 % of our population gets affected (either killed or injured) by a traffic accident, per year. After 10 years, 3.71 % of the population would be affected. Take that number, and apply it to a country like the US, with a population of 295,734,134 people, and you would get: 1,097,181 affected per year, and 10,971,811 affected after 10 years. Yes, the numbers are correct. Over one million people per year, and over ten million people every 10 years. Iraq’s war and the World Trade Center are starting to seem acceptable casualties, right?

I sincerely hope that argentinians realize that we can no longer continue like this. Because if we do, we just might not have anything to continue.



 
Powered by Wordpress and MySQL. Clauz's design for by Cricava