Writing long-term software

March 30, 2010

Carlos Ble show me for the first time the advantajes of using TDD in projects with software to be living for a long life cycle. I wasn’t ready to understood it when he did. However now I’m ready. Furthermore I investing huge amount of time in deploy a continuos integration tool for my company.

This post shows how to do a basic configuration. It runs tests and provides coverage reports, which are really useful. I have try to go even further using pylint, as explained here but the hudson server is in the server we use, which also server our LTSP environment, so I decided to put it away because it use too much resource and the information was not useful due to the massive uses of dynamic classes in Django and, probably, virtualenv.

Once we have a way to meter the goodness of our code, we have move to TDD, at least in all the new code written, doing so we assure the ability to maintain the software in the future, which is a really desirable thing in a project which should be running for many years.

Hudson has probe to be a really simple, but useful tool, we expect to use in all our development projects.


More on Python IDEs

February 6, 2009

Due to some comments in my last post about Python IDEs I gave a chance to Komodo. I’m mainly focus on software libre IDEs so I didn’t take a look into that one. Komodo Edit is free as in free speech (I thought it was like in free beer) and it’s a promising editor. I may give it a chance if Eric4 (read ahead) don’t make me comfortable.

The last Netbeans update enhanced the python code completion feature making it much more usable but no perfect at this time. When accessing an object method sometimes methods that don’t exist in the current object, but at this time they are dozens instead of hundreds. I would like to have time to download and compile Netbeans in order to get involved in the community, but last weeks were really stressing.

On the other hand, I tried again Eric4, which is written using Python language. As I’m not a java expert it’s a disadvantage for me be forced to use this language to develop. Therefore Eric4 seems to be the perfect IDE for me. I’ll try it in a real project as soon as possible.

Eric4 has templates for Django which is the framework I’m currently using to develop. The last template seems to be quite close to the approach I like.

Under my humble opinion Python (and Django) is becoming more a more popular and IDEs for it are becoming more and more usable.


No good IDE for Django

January 22, 2009

I have been using Netbeans for the last month for develop Django. The Netbeans Project is quite promising in the “to be implemented” features because they have a roadmap to implement Django and that would be very nice. However basic things such as code completion is not usable. When you write an object name followed by a dot it offer every single subobject, method or whatever ignoring the object type. As well as this it don’t handle properly python packages not in standard directories even if you include them in the PYTHONPATH. Netbeans is a promising IDE for Django but, at this time it isn’t good enogh to simple python developing.

On the other hand I tried Eclipse some time ago. It has nice python support using PyDev but, as far as I know, there’s no plan to integrate Django into it. This means Django templates has not proper editor, but this is reasonable at this time. When I tried thid software some time ago PyDev use to halt and stop providing code completion needing to restart the IDE. As well as this it seems heavier than netbeans.

Both IDEs are java based, therefore you should program them using this language.

Beyond those I don’t know any other IDE but some editor enhanced such as ERIC4 and others I can’t put to work properly. Hopefully the new version of Kdevelop, and its plugin system, could be the answer.


Django on Netbeans 6.5

November 21, 2008

I developed using VIM and konsole using Python and Django. Some time ago Carlos Ble suggest me to use and IDE. The I try Eclipse + PyDev for a time, but never felt comfortable with it. Since Netbeans team decide to include Python in the supported languages Netbeans could work with; I decide to give it a chance.

While Django is not fully supported itself, I feel Netbeans much more fluent than a Eclipse. Netbeans is not perfect but, on my view, fits my needs more than Eclipse do. I’ll try to use this platform for a while before claim to be THE IDE.

Using Django with it is possible using the same trick I used with Eclipse. Set manage.py as the main file and runserver --noreload as argument. I didn’t success trying to do step-by-step debugging (I didn’t spent more than two minutes trying).

To be the “perfect” platform for Django developing Netbeans needs:

  • Be able to create a django project
  • Be able to create django apps into a project
  • Be able to run manage.py shell
  • Be able to manage DB (At les manage.py dbshell
  • Manage Django tests (manage.py test)
  • Find method usage in templates
  • WYSWYG template editor

The last one is not a real need but it would be great.

Even lacking all this features, I think is probably the best IDE for Django I have ever tried.


About Django

August 19, 2008

Django is a web development framework focus in the rapid web applications development based in the DRY (Don’t Repeat Yourself) philosophy. This philosophy means is a well-known technique in software development and, when talking about Django, it means most of common task are performed really easy.

Once of the more interesting features is the project architecture; which allows to develop some kind of components, and use them in all your projects. While I’m quite focus in Django (most of my projects use this framework) I will start blogging about this topic here. This first post is just for announce my intention.