Archive for the ‘e-cidadania’ Category

Mistakes on software design will cost you way more than you think

Yeah, way more than you can think. In this case I’m talking about the e-cidadania permission system. We all know that django provides some basic permission system at model level, but in the case of e-cidadania it wasn’t enough. We needed very detailed object level permissions.

First of all let me tell you that the e-cidadania project is run by only one person: me. At the time of designing the base of the project the object permission systems available were really outdated or didn’t even work, so I had to make a workaround that at the moment seemed a good idea, even after trying some example cases, it was based on three fields in what I call the “father” model, a model that doesn’t control everything but is the base of all the rest of the modules (if you want to take a look, it’s the Space module).

As I was developing everything went fine, then the class-based views came out and I couldn’t make the proper validations, so I had to make another workaround in the get_object method. It turned out to be “consistent” but I didn’t had enough time to test it, and I continued developing the platform, in some cases with the help of some people that joined temporarily the project (GSoC 2012, pre-GSoC 2013) and everything seemed fine, until a week ago.

Let me tell you, e-cidadania has almost 60Ksloc (stats here) and currently has 12 modules, there are still a couple of modules to develop. I was so centered in development that totally forgot to test all the user roles in the platform (it would take me 4 times the time it was taking) and I convinced my workmates  (which are not related to IT, that’s a different story) to make some basic usage testing. What we discovered was that most of the permissions failed, and the validations didn’t work as expected, allowing in one of the use cases an anonymous user to enter in private spaces and even interact in them!

And I had t redesign the permission system. From scratch. Luckily django-guardian is up-to-date now and we’re using it, but I didn’t know all the work we had to do until I finished planning the new design. Not only we had to redo all the views of the platform, we also had to modify all the permissions in the models, all the checks in the templates, everything from ground up! And that will take quite a while, and we planned to release e-cidadania 0.1.9 on April, and there’s a lot of work to do yet, and a lot to polish, and only a pair of hands is working on it.

So be careful with sofware design, it can cost you more than you think.

My two cents on Cidadania

After seeing this post from Kenneth Reitz, I thought I should make my own also, so everyone knows that not only the US and northern Europe has great companies to work with.

I’ve been working for two years now at Cidadania, a very small SME from Santiago de Compostela, Spain and we are just 9 people there. I must say that even if it’s not the best paid company I worked with, they compensate that with very good working conditions, which are not very common in Spain except for maybe… 20 companies in all the country?

Since I entered in Cidadania, I didn’t have any schedule, I’ve had a 7h shift and I can work remotely if needed. I also learned huge amounts of stuff related with my work and traveled a lot.  I’ve been at Lleida (Catalonia), Helsinki (Finland), California (US), Chicago (US), Tallin (Estonia) and lot of different places around Spain.

Some details about this two years:

  • I’ve travelled more than 28.500KM
  • 25 days spent in hotels.
  • 8 meetups attended
  • 3 talks given.
  • 3 countries visited.
  • I’ve met hundreds of people.

I’ve met also tons of people from other countries and other ways of thinking (which has opened my mind quite a bit). Cidadania is a great place to work, people is ALWAYS nice to you, and you get angry at some points like “don’t you have blood in your veins or what?” (just joking).

Of course being a non-IT consultacy sometimes it gets in the way, because they don’t know how to handle IT stuff or projects, and this sometimes is annoying, but believe me if I say that I won’t leave this company unless I create my own company or I get out of Spain (well, maybe if Igalia hires me I’ll stay).

Things I’ve learned

  • You’ll get pretty fucking lonely sometimes (I agree with Kenneth in that)
  • Get some time to rest, believe me, you’ll have to put order in your mind sometimes.
  • Don’t be shy. DON’T. You have to loosen the ropes that tie you to the habits and prejudices of yourself and/or your country.
  • Don’t hesitate to ask whatever it is. (I’ve been told that a lot in school, and I’m applying it 20 years late)
  • You may think that you’re no one in the world and the programmers around you are the greatest. Don’t be a fool, surely in the same room there someone who thinks the same and he/she is taking you as an example to follow.

Probably my workmates won’t be reading this post, but I just want to say them that they’re awesome. So, here to 2013, kippis!

Scrum-like board in django

Hi! It has been some time since the last post…

As you know I’m developing an open source e-democracy platform called e-cidadania. The strong point of the platform is the debate system. It’s nothing like the forums we are used to see in the internet, this time is an ordered debate system.

The thing is, I’ve never developed something that complex and I’m not used to ajax interactions, but after our partners dissapeared (they were supposed to do that module) I had to start the development by myself. The debate system is very much like a kanban or scrum board (in fact I plan to revamp it for that) and I’m almost finishing the frontend. Since I have no experience with this maybe I’ve got the wrong approach, but “it works” for now (if you want to give me some advice you’re very welcome).

The current frontend is based on a table, jQuery sortables and a bunch of javascript to give the table the needed flexibility. Here goes a screenshot!

Debate module for e-cidadania