Firefox 15 is great for development

Firefox 15 was just released this week and I have been using it since the beta began and as far as I am concerned it is the best browser for development purposes. Let me highlight a couple of reasons why.

Working with CSS
A lot of times when developing a web site or web application, getting the "look" just right requires quite the effort. Up to now one of the best tools for working with CSS in Firefox was Firebug. However with the latest Firefox, you can just right-click on any element on a page and select "Inspect Element  (Q)" and you get to see all the properties of the element and adjust them on the fly and see what effect your changes. Now this has been there for a while, but with version 15, in the bottom-right corner, you now get visual tool showing you the overall size of the element and the size of each of its properties (borders, padding and margins). Quite useful, here is a sample:

Testing for Mobile
As we go along in 2012 and beyond, a good portion of work will require us to make sure a site is mobile-ready. So if you are doing Responsive Design (using CSS Media Queries), you can now test your design in Firefox 15 without the need of having various physical devices. Simply navigate to the site and select from the Firefox menu, "Web Developer > Responsive Design View" and you will be able to see how your site looks based on some predefined screen resolutions that are available.

So happy developing using Firefox 15!


Adobe Inspire

Once upon a time, Adobe used to have something called the Edge Newsletter, which was renamed earlier this month to Inspire Magazine. Its actually a nice little web site, with some interesting articles about Fluid Grid Layouts in Dreamweaver 6 (on my to-do list), a post about web standards, web site design with Fireworks 6 and so on and so forth. So I recommend you head over there and check things out, you might find something interesting to read about!


PHP Namespaces

I've been working on a PHP project lately and when I started working on it, I remember thinking to myself that there must be the equivalent to Java packages in this language. Otherwise loading/including/referencing classes from another class can be a bit of nightmare. There is the common PHP autoload pattern, but I find this is not enough and so I kept on digging and eventually ... success! Since PHP 5.3 there is the concept of PHP Namespaces, similar to Java packages which is very helpful in creating re-usable code. Basically in your class declaration, start it off with putting your namespace definition before anything else, like so:

namespace acme\utils;

class User {

And then you can re-use your class from another class or PHP file, like so:

namespace acme\business;

use acme\utils\User;

class ProcessCommand {
$user = new User();

Hope that helps and happy PHP coding!

Learn to build

There are a lot of technologies out there these days to work in: Flex, PHP, HTML, CSS, JavaScript, Ruby, the list goes on and on. And each one of them has their place in the grand scheme of things, each with its own strengths and weaknesses, each with its own particularities and each one has its appeal.

At some point in time, you will have to use one technology or another to get a job done, be it either by your own choice or because it is a requirement. And the technology of choice might not be one that you have used before. So what are you to do? Grab a book of course and starting reading. I've done that many times in the past. Another way is to read online tutorials and yes I've done this many times before as well. But honestly, the best way to learn is to ... build something! Ain't nothing like writing the lines of code yourself and seeing the results unfold right before your eyes. Really its the best way to learn, I can't stress that enough. It's the best way to learn the little hidden details of a language (or just a technology or framework for that matter) and to put what you have been reading into practice and really get a good grasp on things. You don't have to build anything complicated, just a simple contact manager will do, just enough so that you can really understand how something works.

So like my blog post title says, "Learn to build", or more like "build something" to "learn" :)