January 29, 2009Sites with loads of pages can be hard to manage. Includes were the gold pot in the end of the rainbow times ago so people could put repeated content (like headers, footers and menus) under a single file and thus including into the page/template.
But have you ever wondered that you keep having the same include occurrences at the pages? The layout concept (that I first saw under CakePHP [but it may have come from Rails actually]) brings you more flexibility and DRYness on working with templates.
Read the full article
January 28, 2009Once again with my VIM swapfiles problems, I’ve left too much of them around my app dirs on my pre-screen era. Every power-down or connection loss was the birth of a new swap. Well, they all appeared when I had to sync with the production server.
Read the full article
January 24, 2009One of the most common problems of working with email communication between the companies and its clients is that there isn’t a way of proving that user has received the email without making him click on a link to the company site thus confirming the read.
As most webmail and mail applications can read HTML emails (and most companies sends HTML emails anyway), we can take advantage of this to help transparently track the view.
Read the full article
December 24, 2008Sometimes you’re working on your computer and things start to work strange. The softwares starts to crash without reason… uhoh… or my home or my temp/var folders are full.
To quickly have an overview of your directory sizes du helps wonderfully!
du is an utility binary that comes with (I think) most Linux distributions and some BSD that lists all directories’ and subdirectories’ “disk usage” (got it?). By default, du scans recursively until the last directory on tree.
The --max-depth attribute used with the -h (human-readable units) provides a good look at your disks’ size.
The following code scans only your first directories whithin your home directory:
Just change the --max-depth value to match your needs.
December 23, 2008This is silly though. I was starting to lose my head and shout at the code when I as running Doctrine’s YAML parser to generate my base models. I was getting a strange parse error that said something like “Unable to parse line 0 (b0VIM…” and so discovered that it was my VIM swapfiles first-liners!
The parser scanned my YAML directory and parsed all .yml files, including the VIM swaps.
So if you get this funny string don’t go crazy. Trash the swap!
As confirmed during the latest article about MVC, one of the greatests discussions around the subject is: Where’s the fat going?
The discussion goes between the two layers, Model and Controller, and has caused a lot of buzz since the MVC boom. So lets take a closer look…
Read the full article
December 21, 2008In my quest for the perfect code I’ve ran thru many tries since I’ve entered the OOP writing utility classes and even coded my own templating system with a simple wildcard replacing variable system but it lacked intowflow controlw structures.
Then I’ve had contact with Smarty and PEAR’s DataObject (PHP language) at a company I’ve worked last year when we used a (very primitive and simple) kind of MVC with DO as model layer, Smarty as view layer and only one huge (around 130 KSLOC) controller that we called “The Godfather” as a private joke. After all, besides DO’s memory meanace, (almost) everything worked as it should but only after I’ve worked with CakePHP’s (Ruby’s) MVC implemetation that I realised how everything should behave.
MVC stands for “Model View Controller” and it’s a multi-layered design pattern. It’s one of the most famous (uhhh the flashes!) and organized design patterns I’ve worked so far because you can split the codes from your database calls and templating system.
Read the full article
December 17, 2008We’ve all seen the most diverse kind of article of “Best web development ________”, “Applications to aid agile web development”… ahh that word “agile”…
The thing that worries me about all those buzz is that it’s all partial. I’m not crucifying people but its what to expect: If the writer is a Windows user, it’ll provide an article about Windows environment softwares and practices. (You can keep reading, this is not a Windows vs Linux post)
Read the full article
December 16, 2008Every developer has it’s toolkit. When it comes to web development you have a browser as your frontend client and it’s good to have all your tools close by.
Tools saves time, aids debugging and doesn’t kills kittens. So, enjoy my list!
Read the full article