quarta-feira, 29 de setembro de 2010

IDE Switch: From CodeBlocks to CodeLite

Recently, I've been wanting something out of my IDE that CodeBlocks doesn't have: refactoring.

I've been following recent advice I got (from GoogleTalks, I believe) on code readability, on which the focus is on having short functions (short as in the total number of lines per function being small), which allows the coder to clearly and quickly understand what that function does just by glancing at it, without scrolling involved (I couple this with long function and variable names, which basically self-document my code).

Refactoring tools help this process.

In my opinion, coding is currently still much in it's infancy, it should be much clearer and easier to do, allowing any user to manipulate code in a "Lego" like fashion, assembling and moving blocks around with ease.

Refactoring is a beginning for this. Just create a new part of the code, which amounts to a few lines, select these lines and refactor them into a new function, and that code becomes a simple function invocation (with a nice long name like "GetPhysicsCollisionSegmentsAndInitializeSegmentList").

So, after looking into a few possibilities (including parsing my own code and creating a plugin for CodeBlocks, or switching to Netbeans/Eclipse), I went on a tip I saw on "Stack Overflow" that CodeLite had great refactoring tools. CodeLite, while being a relatively young one-man project, is looking great and is actually more advanced than other (by example). Also, something that always irked me a bit is a slightly negative tone on the CodeBlocks forums, treating newbies harshly and demeaning them with the "that doesn't belong here" and locking the threads (on questions that are actually related, at least partially, with CodeBlocks, which contributes to just demotivating them from further learning C++ or using CodeBlocks), while the guy at the CodeLite (also the creator and main programmer for the tool) is patient and helpful for new guys asking stuff at the forum (which I've been one of :))

I've been migrating my game engine to CodeLite, migrating the libraries, etc. One thing that is missing is importing projects from CodeBlocks, which should be relatively easy to do, and is what is taking me more time. Also, the Shared / Dynamic Library compilation system doesn't create .def and lib*.a files, that I was used to using in CodeBlocks (but apparently they aren't mandatory for dynamic linking).

I've also been working on different projects at the same time, working a bit on each for a while and jumping to other when I complete a sub-goal. Keeps it interesting.

Also, focusing more on prototyping a game (the "puzzle platformer"): have a single room with the most amount of gameplay features, to play around with and tune the gameplay), which allows me to increasingly improve my engine by game requirements, instead of risking over-designing it by adding unnecessary or impractical stuff.

Sem comentários: