Wednesday, January 27, 2010

Hard Work and Success

I've always heard this about successful and rich people: They work hard.I hear that and I think "Well, everyone works hard, it doesn't make much sense".

That is until I read Home based Businesses You Can Start In Your Pajamas in 2010, I opened the article thinking it would make everyone their own boss and I wasn't wrong; you COULD start one of the businesses mentioned there, however, what really surprised me was that as I went through the list, all I could think of was "Nah, too much work!", "Nope, too complicated!", "Not really my thing", "Not in the mood for that", "That's a big headache", etc...

What gives? If you have an idea you should act on it, imagine if Lary page didn't do anything about PageRank idea, we wouldn't have had Google and he wouldn't have been a billionaire. If Donald Trump doesn't follow up on his deals they won't happen.

Why Do We Still Drive?

Cars were invented over 50 years ago, back when electronics were just starting to become popular, back then, it would've been impossible for anyone to even imagine a car driving itself. Nowadays, computers are so smart they can drive, there are cars that can actually drive, but I think that's not enough.

I think the real revolution will be when future (flying?) cars are invented, we're gonna need a new infrastructure, one that controls cars, one where cars don't drive, but rather, are driven by a central system.

Have you seen the movie Babylon A.D.? No? OK, imagine cars flying between buildings like you see in sci-fi movies, here's a picture to make your imagination's life easier:

Now, imagine if cars had sensors, buildings had emitters and a central system that controls all cars. You ride in your car, you choose your destination, your car sends that information to the central system, the system calculates the shortest/fastest path and starts moving your car, since it knows where all the cars in the city are, it can avoid accidents very easily.

Why let humans drive when computers can do the work? Why risk people's lives by allowing people to drive? People sometimes drive crazy, computers don't! People sometimes get drunk, computers don't!

So if ever someone who reads this blog and designs a future car, please consider this! ;)

Monday, January 25, 2010

Microsoft Imitating Emacs

If you've used both Emacs and Microsoft's new ribbon interface which can be found in Microsoft Office 2007 onwards you'll probably be able to relate to what I'm saying.

Emacs is known for it's multi-key shortcuts: Ctrl-X, Ctrl-C to exit, Ctrl-X, Ctrl-F to open, etc..

Let's take Paint in Windows 7 for example, to save as you press Alt, F, A (Alt shows the shortcuts, F opens the file menu, and A is for the Save As menu item), Alt, H, RP to crop the image (Alt shows the shortcuts, H opens the home tab, RP is the shortcut for Crop).

However, the way they implemented it is a lot more intuitive than Emacs's; you can learn them in no time, you just press Alt and all the shortcuts appear in front of you, not only that, having the shortcuts organized by menus and tabs makes it a lot easier to get used to the shortcuts; you press the shortcuts for the menu and then the shortcut for the item in it.

All this supports what I said previously about open source's initiatives.

Saturday, January 2, 2010

The Little Details

As Jeff Atwood said:
Ah, yes, the stereotypical programmer response to most projects: it's trivial! I could write that in a week!*

I thought it was just me, apparently it's not. It turns out that all programmers think that way, they see Twitter and they think "A table for users, a table for tweets, a user page, and a settings page."

Let's face it, we all think that way, and the surprising part is? It's true; you CAN create a usable version of Twitter over the weekend, you CAN create a usable browser in a weekend, and you CAN create a usable version of Stackoverflow in a weekend.

Why does software take us so long to create then? There are two reasons: The little details and the little details.

  • The little details: The first little details refers to the little details of writing code, for example, the little silly bugs that take ages to find, spelling mistakes, forgotten variable definitions, wrong passwords, wrongly placed files, difficulties with the programming language/framework being used, etc.. All these are problems that a programmer faces that take much of his time but there's no way to predict them.
  • The little details: The other little details refers to the little details of a website/software that a programmer usually doesn't think about when making the one-weekend claim.
The best example of this is the reason why I wrote this blog post: In the project I'm working on now, it took me barely 30 minutes to create both the interface and the tables (what programmers usually start with in a project). What comes after that is what usually takes long. Because of some previous experience with Flex, I decided to implement the login system next, so I googled for a way to do it with Flex and Zend and the way that I found required the use of Cairngorm, having used it before, I didn't mind using it now. So I started changing my project to use Cairngorm, separating the different screens into views, adding the model, the controller, the VOs, etc... I started creating the PHP files. After about two hours I had a working login system. Next I wanted to populate a tree control with some data from the database, now because I didn't know how to do that in Flex it took me about 6 hours just to do that, as simple a task as it is.

Programmers don't like planning ahead and dealing with charts and stuff, we like writing code, and I don't see any way to change that any time soon; programmers will still want to write code before they plan, it's in our blood.