Thursday, November 7, 2013

Some new ideas

Introduction


Well, these are not radical new ideas. I've been developing software professionally since 2007.
I mostly covered PHP and lately Python, and had minor experience with C, C++, Java, Ruby, NodeJS and Visual Basic 6.

One of the mayor issues I noticed was when I had to deal with REST applications.
They are hard to define, yet however, I recall all the fuzz when I heard the word REST.

Suddenly, and not so surprisingly, REST was all the latest thing to do, that it was old, but suddenly all should be REST.

Also, I recall another word that it was doing more and more noise back then.
MVC.

Please, for the simplicity of just following me, bear in mind that I'm fully aware that those concepts are under any condition new things. They are old as time, they existed way before I was born.

I recall that I was starting to learn php frameworks, because I was dead aware of how complex and unreadable was the PHP code. The first gig I had, we did custom CMS applications.

If you have a couple of years in development, you know what I'm saying by custom code.
That crappy thing that not even you like to read, you code fast, you can try to write things down or clear things but, no, there is no time and that is not important, you should finish as you can and fast.

Those are the things I do recall, obviously, there were other things going on at the time, that I'm sure were equally important, yet, this is what I'd like to talk and write about.

Some background

Things in life made me start moving towards REST applications using Django-Piston with python.
My first application, though I was just a `coder` , I really didn't had any kind of input on the application, was a backend for ios, using django-piston.

As usual, and you won't be surprised, there wasn't any kind of planning at all. Suddenly I was writing resources for logging user actions.

Where does the rest part comes here ?. Well, I obviously didn't knew, but hey, if you POST into something, that gave you a whole rest application.

Jokes aside, it was a disaster. Without taking into account that we were using the wrong tool, defining the application was a mess.

That didn't end well, and we had to move on, we landed on another contract and now I can talk more about this one.

The client didn't had much experience, he was a cheapskate and he wanted that an application that he was writing worked with internet and a database.
I'm not doing a joke, that was the first call.

His application was a ext-js application.

They were trying to find out how to store the information in the database.

After a couple of weeks designing what I understood they wanted, we proposed what we had already used back in the past, Django-piston.

We could never ever define resources that were going to be consumed.

The resource I was exposing, user, ended up being a mess of methods and endpoints.
As I wrote my own code, I saw it became like a bad combination of rest and xml-rpc, like rest-json-rpc with http-basic in the middle.

Sections

Double shifts

For the past two months I've been working on two projects at the same time.

I'm almost at 6 years without vacations, my body is getting brutally tired. Even the most simple tasks leaves me exhausted.

My eyes are closing and I just don't have the strenght to control it. I'm at work, and i can't really stop them.

Every single project I approached in the last years failed bad, the same applies to relations.

The only one I had, If I can call that nightmare a relation, failed horrendously bad.