Dive the web

On ne surfe plus, on plonge!

My CV is online

Oh, it may not look like something big, but this is the first time ever! After almost 12 years as a web developer, (X)HTML integrator, web programmer and whatever other title I’ve had over the years, I’ve actually put my CV is online. Ok, just the French version for now, I have to sharpen up my translation skills and do it in English too as soon as possible. Anyway, PHP, XHTML, CSS, JavaScript or SVN are written the same way in both languages!

Yes, weird that it should just be now. But there’s a good reason. I’m thinking very seriously about going into freelancing. So, if you need help with a PHP application or some (X)HTML integration, I’m the right person to ask! You can either leave me a message here, via Twitter (@e_Chantal) or via my email. You’ll find it on my CV!

Tags: , ,
June 25, 2009 - 3:01 PM Comments (2)

Tips for best practices

I’ve been working in the Web industry for about 12 years. During these years, I started to read about best practices in web development. I found a lot of them useful, both to ensure a better quality to my work, but also to make it easier - and sometimes quicker. I’m not claiming to have the best solutions to everything, the following tips are just a few of the things I try to do when coding. Some apply to (X)HTML or CSS, others are more appropriate to PHP or even JavaScript. Some are valid when working in a team, others when working alone.

  • Follow conventions.

    This is valid both for team and solo work. When working on your personal projects, pick a style and stick to it. When working with a team, either agree with a coding style with the team or, if one is already chose, use it - even if it’s different than yours. It will make it easier for both you and your team members to understand your code.

  • Validate HTML and use semantically correct markup.

    HTML tags have a meaning. A <p> indicates a paragraph. A <ul> indicates a list. Valid HTML has meaning, both to humans and machines.

    Validating HTML may help you find errors in your code. Not just markup errors, but also display errors. Something that may look great in a browser may look terrible in another. And most of the time, you have to support more than one browser.

  • Comment your code

    This one will never be repeated enough. Commenting helps you and team members. In six month, you may not remember what you did today. Comment! Comment! Comment!

  • Don’t commit incomplete or buggy code

    Except on rare occasions, it’s better to never commit incomplete or buggy code when using a source control tool. Stuff that goes into the common repository is supposed to work.

  • Keep team members informed

    Communication is important. You refactoring code, you need to let team members know. Email is useful. Documentation is better. When you create a new library, let team members know about it. If they don’t know about it, they may create something that does pretty much the same thing. Time wasted.

  • Be consistent when indenting.

    This is good for whatever language you use. Consistency in indentation helps finding your way around your code. By indenting, you can quickly see blocks of code or remove unused blocks.

  • White space is your friend

    Yes, this goes with the consistency in indentation. But white space also means inserting white lines between statements or functions. But don’t overuse it. There’s no need to put 10 carriage returns between blocks of code.

  • Google too

    Yep, Google is your friend. Your best friend. If you have a problem, chances are, you’re not the first one. It’s probably documented on mailing lists or Stack Overflow. Google knows, Google remembers!

  • IRC channels

    It’s amazing who you may run into on an IRC. Lots of people hang around on those channels and may help you. If you ask nicely and respect the channel’s rules.

  • Use available tools: good IDE, debugger, Firefox addons.

    A good IDE will help you in may ways: auto-complete built-in functions, sometimes a built in debugger or direct access to your version control tools.

    Firefox has great addons such as Firebug, the web developer tool bar or the regular expression tester that could save you lots of headaches.

  • Check logs

    Logs may indicate problems. Apache logs, PHP logs… The information you may find in these logs may prove useful. But you need to learn how to read them!

  • PHP Errors

    In a development environment, set your php.ini’s error reporting to E_ALL and display_errors to ON. This can help tracking errors and solving problems. But make sure you change this when going online.

What are your tips? What techniques do you use to ensure the quality of your code?

Tags: , , , , ,
June 10, 2009 - 12:50 PM No Comments

Montreal Metro and Twitter

A little while ago (28th of May 2009 to be exact), there was a bomb alert in the Montreal Metro. It took me forever to get home, because I took all the wrong decisions. Actually, I ended up walking home and it took me 90 minutes. It could have taken me less than 40 minutes if I had chosen to walk directly from work instead of trying to get into the metro. I had no idea what was going on exactly - it’s only when I got home that I learned about the bomb threat at Berri-UQAM station.

I thought it would have been really cool if I knew of some iPhone app that would have given me the information… And there was information on Twitter about what was going on.

So here it is: my first iPhone optimized web page. Actually, it’s also my first try using the Twitter API.

It’s quite simple, it basically does a search on Twitter using some hash tags: #yul or #montreal and #metro or #stm. The icons are from the Crystal Project (very nice open source icon library by the way).

So, basically, the YUL STM & Twitter page could be used to get real-time info on what’s going on in the Montreal public transit system and avoid long delays. Use the tags (#yul OR #montreal along with #metro or #stm) and your Twitter post will show on the page.

Don’t hesitate giving me feedback or asking for new features.

Screen shot of the application on iPhone

Screen shot of the application on iPhone

Tags: , , ,
June 7, 2009 - 9:04 AM Comments (2)

Updated Wordpress

So… Wordpress is now updated to version 2.7.1… I have to admit that the first reason for doing this was that the Wordpress application for iphone is not compatible with the version I had. What you are reading now is my first iPhone written-blog entry :-)

Tags: , , ,
June 1, 2009 - 12:41 PM No Comments