28
May 10

gource: OpenGL-based 3D visualisation tool for source control repositories

Too much fun the tool I’ve came to know through my friend Adenilson’s blog. In a glance one can explore effort put into a project in a way much better than any other command-line or graphical application known.

The only boring thing is to use it in my machine, a hp pavilion dv4-2167sb, which, AFAIK, still lacks a good graphical acceleration support.

I’ve made a very basic debian package (using checkinstall) for people too lazy to compile/install by themselves.

Enjoy it and have fun!


17
Jun 09

Qt/openBossa Challenge

Nice opportunity to win a Nokia N810 tablet at the FISL. (Free translation from pt_BR)

Do you have a good idea? Do you know the Qt library? Would you like to be awarded for that?

The INdT (Nokia Technology Institute), nowadays one of the main development excellence centers in Brazil, promotes the first Qt/openBossa challenge.

We look for developers capable of putting your ideas into practice and build Qt applications designed to Nokia’s mobile devices. Participants will create innovations which will be evaluated and awarded during the 10th International Free Software Forum (FISL).

More at http://openbossa.org/fisl/index.html.


14
Jun 09

Qt Codestyle Automatic Check

Code style carries many benefits, such as improved maintainability and support for a rich Coding Standard. However it’s not safe to rely on developers to always comply to style rules along the source code, that’s why automatic code style verification should be an initial concern for professional-level works.

For the sake of coding-style-importance-aware people, there are many great projects such as GNU indent, pep8 and astyle that perform all the work for you, whose only need the appropriate setup flags.

For Qt projects, astyle is the recommended tool. But there are a few drawbacks on using it.

  • it’s too intrusive. astyle performs code modification in-line, disturbing the repository sources instead of serving as a verification tool only
  • weak didactic factor. Unlike pep8 script, which tells the developer exactly what the problem is and contributes to avoid it at the future (as a lesson learned effect)
  • it’s output can not be easily integrated with another tools

I’ve created a shell script in order to overcome some of the previous issues. It’s available here. Some relevant features.

  • quickfix-style list output
  • QTest style output at the end
  • Ignore moc created files
  • All suggested modifications can be applied as one patch, directly available to the user
  • Can be run inside a testsuite (make test) or as a standalone program

TODO

  • try to extend astyle classes
  • allow alternative code styles
  • better source selection schema (integrated with qmake, maybe?)
  • fix-up improper indentation on some important macros (foreach, .e.g.)
  • test and make it work on MacOS

14
May 09

Git Empty Branches

Found out some interesting Git Hints presented as webcasts at the site below. The most interesting part was to learn how to create empty branches on it, so a project can be functionally separated without having to kludge your working dir with several directories.

GitCasts: Empty Branches

Summarizing the lesson:

The library versus website example was perfect, but one can think about other relevant situations, like sub-projects inside a bigger project, management documentation or even meta-files configuring the repository itself (description and ACL).


05
May 09

Old School Techniques

Talking about old times stuff at the breakfast, it was so fortunate that I’ve already read a post about this issue earlier today.

Old-school programming techniques you probably don’t miss

I’m not a punch card time guy, but concerns like memory footprint size, code running faster and thread limitations still go around my mind nowadays.

Don’t forget to take a look at the comments section for more funny and informative stories.


28
Apr 09

Python-Debian Packaging for Maemo

Packaging a software component made using python to a Maemo device could be easier, if CDBS cared about hand-held devices and their limitations.

Knowing that using setup.py was the Right Way of Doing It™ for python applications I tried to push myself into making CDBS work together, but not without a little harassment.

First of all, such scope-limited distributions tend to gather components in customized places as to promote integration between them or just in sake of a plain different organization. This difficulty can be overcome by using pycentral and including the following line at debian/rules file.

Just as the manpage says, this will prevent the build-system from moving the files from the selected install prefix to a central place (like /usr/share/pycentral).

Secondly, because of limited storage capacity and speed-up necessities, usually python components install just their .pyo files. This requirement made me struggle trough CDBS’ python-distutils.mk source code in hope for a simple fix. The answer I’ve found was to overrule the python-install target with the following commands (look here for the diff).

Let’s say it’s inside a file named debian/fixup.mk, then my complete debian/rules file would be like this.

And this is the beauty of CDBS, a file which would be several lines long gets resumed to a few lines.

I’m still trying to find a way to make this code available for all my components without installing it to a globally reachable path, but did not find a thing such as a MAKEFILEPATH variable untill now. I guess a package like cdbs-maemo-dev.deb would be an appropriate place for stuff like this, but pushing it there is for another post.


09
Apr 09

Vim Scripting Using Python

Trying to solve a colleague’s problem when editing Edje files, I pushed myself into learning how to do scripting inside Vim.

Scripting wasn’t ever my choice for reasonably complex editing tasks since I refused to learn Yet Another Scripting Language just because my favorite editor wanted me to. But, for the sake of all lazy guys like me, Vim started to add python support, and python was a must learn bullet in my language listing.

However, not everything are flowers and the entry point must be configured using common vim script. Well, at least until vim supports python from its core, which – I believe – is not far from possible, since python integration has been voted as top priority for a long time.

To successfully import your python script inside vim context, one can wrap it into a vim function in an external file. Let’s call it extras.vim.

After using :source extras.vim command to load it, one can call this function by typing :call PyMakeTitle(). Remember repeating the :source step every time the script gets updated.

The net effect of this function is to turn all initial word letters in the current line into capitals. It proved me to be useful when editing a large LaTeX document where all section titles were small letters only.

If it comes to be a very useful function, you may map it to a key-stroke by using :nmap \t :call PyMakeTitle()<CR> inside your vimrc script.

A more complex example accessing internal vim properties. Ok, it’s a bit useless, but it demonstrates well such features.

With the cursor over a function name, type :call PyCreateDoc() and watch it insert a line above containing doxygen-like formatting.

For more examples, there is an excellent material at vim’s online help (see :h python). Furthermore, there are some plugins being made using only python, take a look at Omni Completion for Python (pythoncomplete.vim) for a good reference on the power of using python inside vim.

Happy Easter Vim’ing!


25
Mar 09

Git References’ Pointers

Earlier this year I’ve spent some time gathering references to study Git, the version control system everybody seems to love nowadays.

Thankfully, someone took the time to bind several useful links in one central webpage. If you wanna start studying Git, that’s the place to start. Kudos for such practical people (more specifically Scott Charcon and Petr Baudis).

http://git-scm.com/documentation

Just for reference, I’ll paste below the stuff I had.

Forwarded conversation
Subject: Git Documentation Pointers
————————
From: Milton Soares
Date: Mon, Jan 19, 2009 at 12:33 PM

Hi.

Just to organize and share all the references I’ve gathered about Git learning.

On-line Resources

$ git help git
$ man gittutorial

Git Homepage Resources

http://www.kernel.org/pub/software/scm/git/docs/everyday.html
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html

SVN to Git crash course

http://git.or.cz/course/svn.html

Recording of the Git tutorial given by Bart Trojanowski for the OGRE

http://excess.org/article/2008/07/ogre-git-tutorial/

Palestra Git para o Google by Linux Torvalds

http://br.youtube.com/watch?v=4XpnKHJAok8

Git from the bottom up

http://www.newartisans.com/blog_files/git.from.bottom.up.php

———-
From: Milton Soares
Date: Tue, Jan 20, 2009 at 4:36 PM

More pointers:

GitWine – git tips by wine people

http://wiki.winehq.org/GitWine#head-079f5369fdb9346845a4a8c82475eb7a198312be

Git Wizardry

http://www-cs-students.stanford.edu/~blynn/gitmagic/index.html

Git Wiki

http://git.or.cz/gitwiki/

Git Cheat Sheet

http://ktown.kde.org/~zrusin/git/

———-
From: Milton Soares Filho
Date: Sat, Feb 21, 2009 at 11:15 AM

Yet another usefull link (pretty graphical explanations on git objects).

Tv’s cobweb: Git for Computer Scientists

http://eagain.net/articles/git-for-computer-scientists/