Archive by Author

jPictag , my first jQuery plugin

Hi everyone,
It’s with great pleasure that I’m showing you my first jQuery plugin.
It’s called jPictag and it enables any website to have a image tagging system, much like the ones you see on Facebook or Flickr.

Official website: http://www.jpictag.com/
Demos: http://www.jpictag.com/demos

NOTE I’m also giving away 5 free copies to the first ones to comment on this.

Regular expressions from noob to ninja (part I)

I for one have to admit, one of my worse flaws as a web developer was not being able to completely work with regular expressions.
There, I said it. I would just normally find a working RE on the web and past it right on my code. However, you have to agree with me, in that, regular expressions are somewhat hard to read and understand, even some advanced users have difficulties reading some RE expressions.
But what they bring can be a time safer and it’s a really great tool that should be under any webdev belt.


Read more

Will it scale ?

“Does MySQL scale ?”, “Does Rails scale ?”, “Will Django Scale ?”.

Any association with the web show “Will it blend” are merely coincidental. Or is it ?
This article targets on the most top asked question today for developers and anyone related to technology. Which is “Yeah, but does _____ scale ?”.

Everyone seems to worry too much about scalability, people turn down frameworks and databases based on that argument. My question however is “Do you really need to scale it?”.

For example, one of the most recent myths is that Rails can’t scale, and people say it because Twitter, yes, that huge 50 million messages per day website had some issues scaling itself. I know it’s good to have some vision, but come on, do you really expect to get that kind of traffic on your website ?
And if you remotely do, would you blame Rails for it ?

Don’t get me wrong, you SHOULD build with scalability in mind, it’s one of the “must have principles”, but what you don’t need is to stress yourself and neglect some good technology just because some random top 10 website is having some slightly issues with it. Scalability from my point of view is not something directly related with a framework or database, but with how you plan your application, and how you architect it. A couple of months ago I’ve a met this guy who was brainwashing his entire team with how good CouchDB was and how it would improve their app performance , yes CouchDB piece of software but this comes from the same guy that was creating a CRM using iframes with meta http-equiv=”refresh” content=”600″ all over it. See where I’m heading ?

Scalability should be in all aspects of you project, from optimized code algorithms to server infrastructures. Because in the end the main goal is: Speed and uptime. But you shouldn’t rely only on one technology or trash another because your site won’t scale. From what I know, everything scales, yes, sometimes it can be a really pain in the arse, but for most of us, worrying about it and waste precious time debating it , is in fact, worse, because you don’t get anything done.

We worry too much, we over analyze things too much, we are very pessimistic and we are always expecting that the world will end tomorrow. The truth is , no it won’t. If you build it with good principals in mind, no matter what technology you use, and write this down, “It will scale”.
So just free yourself of this “should I use this ?” and get your stuff done.

PS: just look at Facebook and their PHP ;)

Do you really need to create your own framework ?

I don’t know if it’s just me, but every time a new framework hype arrives you get all this discussions between people who say wonderful things about it, and people who just hate them, or simply don’t care.

As a professional web developer for almost 9 years and a web/internet enthusiast for, well…almost my entire life, I’ve came across with a lot of different ways of doing things.
I remember when some people said “man, you gotta learn Flash/JAVA, it will be the end of HTML for good”, I think Apple is laughing at them right now. Oh, and I never really learned flash, except for some little AS script skills. Point being is, technologies come and go and you either learn them or reject them. At the end of the day it’s really up to you. Do you really want to kill a bird with a bazooka , or an elephant with a mouse trap ?

Today however, language frameworks are the ones in the spot light, you have, Ruby on Rails; Django; Kohana, etc.. and some people just simply refuse to use it.
Why ? Well, some of them argue that in order to become a really programmer you need to know how to create a framework, you have to know how things are done.
You can agree with them, in fact, if you are learning a new language, doing things from scratch can really help you. Or can’t ?

It depends, are you a very good programmer ? Or a lousy one ? If you are a lousy one, chances are you will not learn anything by creating a framework, in fact it will even make you a worse one. Why ? Well, a framework is a very overwhelming piece of software, it’s like building a factory for creating not just one type of product but a lot of different ones. And if the factory is not correctly build, your products will not be good, or worst case scenario, your factory won’t fit your needs in a long run.
Besides, most of this custom frameworks are created by one person, which leaves them with a lot of stuff to think of, while open source can be contributed by many, and so it can get more stable much faster. And don’t get me started on bugs and security. Also, the fact is, if you don’t comment or document your code in a year or two you will not know what your code is actually doing, and then you start to think of creating a new one from scratch.

I’m against creating a custom framework without being OS. Not against custom code of course. But call it whatever you want, but building custom code should meet a very specific purpose. Look at Facebook for instance, they’ve created their own app, hell, they even created their own PHP compiler, but because they really need it. On the other hand you have Twitter with almost 7TB of tweets per day, and they are running RoR (Or were, according to Techcrunch). So what’s your purpose for creating your framework ?

In fact, I believe most of people who create custom frameworks for their own are unexperienced programmers. Why ? Most of the professionals programmers I know use or learn a framework, not because they don’t know how to code, but because they’ve all done what the framework does, and we are sick reinventing the wheel every time. Been there, done that, got the t-shirt. So why waste more time creating it ? Why not just use that time to create something meaningful, instead of worrying about ORM, Cache, template, form validations, etc. It’s old and it’s boring. I could that if I wanted, but I don’t have to, it won’t add any more value to me as a programmer.

If you need something more specific that a framework can’t do, do it yourself, nothing wrong about that, this is where you will learn something, because you never done it.

At the end, I believe that the good programmers who create their own framework are afraid of just letting go. Are afraid of stopping to worry about specific issues that their users won’t even know it’s there, like core code. It’s like they need to do that from bottom up, in order to believe that they are the hardcore-kick-ass-coders.

So, do you really need to create your own framework ?

Books you should be reading right now

If you work as a developer, designer or something in between, you know you must update your skills. It’s like fuel, you got to have it, otherwise you will end up in a dead end with little work, or worse, no work at all.
If you are like me, you hate being outdated and you are curious about new stuff that comes out almost every week.
It’s kinda hard to keep up with it all, so many new technologies, some of them will prevail some of them won’t. What to choose ?
Should your precious time be considered for learning a new technology that may be forgotten in a couple of months ?

Well, it’s really up to you.
I will however try to help you. Here are some of books you should be reading in order to improve your technical and personal skills.

The Definitive Guide to Django: Web Development Done Right, Second Edition
The Definitive Guide to Django: Web Development Done Right, Second Edition
If you don’t know what Django is, you really should come out of that rock more often. Django is a MVC MVT Python framework, and in one word, “awesome” is what comes to my mind. Django is an ORM, fully OO, already build with a cool template system, plus a ready-to go admin interface. If you don’t know Python don’t worry, it’s a very easy language to learn.

CouchDB: The Definitive Guide
CouchDB: The Definitive Guide
CouchDB is a fully high-scalable database, it’s also known as a NoSQL database, and if you are building web apps for a huge crowd, you will definitely need to know this.

Don't make me think
Don’t make me think
What can let your application to fail , even if it’s a good tool ? Speed ? Marketing ? No, usability, if your application is hard to understand and to use, users won’t, well….use it, even if it do wonders behind it. So get this book and start doing some designs with user usability concerns.

rework
Rework
This book is mind blowing if you like me hate the way some of the IT companies are run out. It was written by Jason Fried and David Heinemeier Hansson from 37Signals. It’s all so simple stuff that really makes you think, for instance, why some projects fail and why workaholics are bad for a company, why less is more, and why VC funding is not always the best option. I’ve read it in 3hours, awesome.

Web Application Design Patterns (Interactive Technologies)
Web Application Design Patterns (Interactive Technologies)
This is not a so technical book, but has great tips on how to design great web apps by comparing with some of the best web sites right now. Once again, it’s never enough to bold the statement that a great web app can’t be just a good tool, it must be user friendly and easy to use.

Beginning HTML5 and CSS3: Next Generation Web Standards
Beginning HTML5 and CSS3: Next Generation Web Standards
I really shouldn’t even tell you why you should read this. Specially if you are front end dev.

Update: This book is not yet published, but you should really consider it in a couple of months.

A lot more could be added, give me your feedback and what books should be here for a second part of this series.