
Today I took the afternoon with the family and when to the movies. The movie was “Transformers 2 Revenge Of The Fallen”. I’m completely biased in what relates to Transformers, because I’m a fan for years, but movie is great. With lots of action, it has very cool special FXs, not to mention the perfect Megan Fox.

(All credits to xkcd)
NCIS is not the best TV series out there, but if you give it a change it will grow on you as it did on me (it’s actually the 5th most seen TV Series out there [see Rating section in Wikipedia]).
All characters are very well defined stereotypes. The Naval Criminal Investigative Service team is lead by a hard core marine - as strict as they come -, and composed of an Italian D. Juan (a movie trivia encyclopedia and second-in-command), an MIT computer geek (which fancies himself a novel writer), a quite caring female assassin (trained by the Mossad and serving has a liaison officer), a goth evidence and forensic specialist and a ’scotch’ for chief medical examiner.
It would be hard to have a more heterogeneous bunch of people anywhere in the world but I think they make a very good team when they start working together.

With already six seasons aired by CBS, NCIS seems to be a spinoff of JAG. I’m currently watching Season 6, hoping that Season 7 is underway.
The RSS reader had stored more than 20000 unread posts and/or news when my vacations started. A couple of “Ctrl + A” followed by the same number of “Del” made the count drop bellow 5000… After a while reading the “Selected Ones”, the number of unread is now 1343!
I’ll stop for now… and hope to never reach more than 20000 unread posts again!
Being a Linux fan doesn’t mean that all my work gets done in Debian, Ubuntu, Red Hat, Fedora or Suse. Most of the times a simple execution of the Virtual Box is enough to write that document in Word or prepare that presentation in Powerpoint. But some times, work demands a true change of pace and there I go back to Windows (usually the stable XP version, available in any dual boot machine near you…). For example when you need to use Microsoft Visual Studio, DOORS (a requirements management system, for those how never has the pleasure) or even Enterprise Architect, you’ll need the good ol’ Windows operating system.
This is not a complaint about developing software in a Windows environment, but there are somethings you grow accustomed after a while developing in Linux. For me the greatest difference is the shell, or the lack of it in Windows. The shell is my favorite tool to inspect the details of my build artifacts.
I make a few searches on the web but couldn’t find a real replacement for the simple bash shell available at any basic Linux system. There are some possibilities, but none of them are the same as running the “real thing”:
- install Cygwin
you might have this already installed if you need an XServer to run remote DISPLAY applications, although XMing is a better (lighter) choice for that matter
- install andLinux, but I felt the system performance degrading by the minute
- install Portable Ubuntu [1,2] (my favorite choice!)
I don’t usual enjoy reading technical books from cover-to-cover, but the other day an acquaintance showed me a couple of interesting books. After skimming just a few pages decided buy a copy, and now I think they are the best C++ books I’ve ever read.
After more than three years of professional C++ programming (on top of a couple more years during the Computer Engineer graduates course), I don’t see myself a C++ beginner and, of course, these books are not for beginners, but I have to say that I still learned a lot by reading the following books.

After reading these books by Herb Sutter [blog] and Scott Meyers, another set of interesting technical readings is already being considered. Stay tuned…
I love first-person-shooters. Medal of Honor is one of my favorite and the one that makes me spend hours playing. The other day I heard something about war medals on TV and had an instant urge to play the game. I searched my CDs and DVDs but couldn’t find it… meanwhile the TV continued with the documentary on II World War, but my attention kept focused on War Medals. Here is some general culture collected from wikipedia on Military Decorations!

A Purple Heart is awarded to a soldier who is injured or killed in action against an enemy of the United States. The face of the medals shows the profile of George Washington, the commander-in-chief that established the original award named “Badge of Military Merit” following the commandment “Let it be known that he who wears the military order of the purple heart has given of his blood in the defense of his homeland and shall forever be revered by his fellow countrymen.”.
A Silver Star is awarded for gallantry in action against an enemy of the United States, which means that one must show extraordinary heroism against an enemy of the United States, while engaging engaged in military operations involving conflict with an opposing foreign force or while serving with friendly foreign forces engaged in an armed conflict against an opposing armed force (one which the United States also opposes). The Silver Star is the third most valuable military decoration awarded to a member of the United States Armed Forces. The second most valuable decoration “for valor” is the Distinguished Service Cross (for the Army, with the equivalent Navy Cross and Air Force Cross, for the Navy and Air Force respectively).
The Medal of Honor is the top most valuable Military decoration awarded by the United States government. This award is for who distinguishes him- or herself “conspicuously by gallantry and intrepidity at the risk of his [or her] life above and beyond the call of duty while engaged in an action against an enemy of the United States.”. Because of the nature of its criteria, the medal is often awarded posthumously. Eligible to all military branches of the United States Armed Forces. The Medal of Honor is awarded hanging from a ribbon and should rest on the shoulders of the recipient.
The use of Linux environment variables is not new for me, but for special reasons I learned something new about one specific environment variable. You’ve guessed it, although the variable itself was not new to me, I’m now more certain about the uses of LD_LIBRARY_PATH.
The motivation for this post is, at least to some degree, a linkage problem that I had to solve this week.
The only difference between two development ’sandboxes’ was the definition of LD_LIBRARY_PATH. I was certain that the variable was only used during execution time (to configure the search path for installed shared libraries). I was wrong!
After almost two hours banging my head against the wall, I found a very interesting paragraph in ld’s manual page.
[...]
The linker uses the following search paths to locate required shared libraries:
[...]
5. For a native linker, the search the contents of the environment variable "LD_LIBRARY_PATH".
[...]
So, the LD_LIBRARY_PATH is used to by the linker!
This solved my very specific problem, but I agree with the opinion of those [1][2][3] who defend that LD_LIBRARY_PATH should not be used to configure the linking process. In a development environment, the libraries to be used by the linker should be configured using the -l and -L flags. In this case, and only in this case, should the LD_LIBRARY_PATH be used to add development libraries to loading path.
The question is very simple. When writing a for loop, such as the following one
for( int i = 0; i < 10, /* increment i */ )
Between i++ or ++i, which increment operator would you use? Why?
If you choose the answer “It’s the same! Both increment i.“, or if your answer was “I have always used i++, because /* some place ulterior reason here, like ‘I’m programming in c++ and not in ++c’ */“, then your might thing improving your c++ knowledge a little bit.
I just learned it myself, so I’ll share. In fact, it’s so simple it makes me wonder how many of these small details are missed every time my C++ source code lines are incremented. The best increment operator to be used in the pre-increment.
Why? Because it avoids the creation of a temporary variable. Post-increment (i++) has to create a temporary variable to store the return result (that you won’t be using), while incrementing this as expected. Pre-increment simply increments the value of this and returns.
So, systematically using ++i, instead of i++, should improve your runtime performance - even if so slightly.
Personal skills improvement is a permanent goal for me. A while ago, as a result of a self-evaluation meeting, the goal of improving my organization was suggested when I stated that handling simultaneous tasks was something hard for me to do.
I tried several approaches to improve these skills, but none of them proved to be successful until I adopted Mind-mapping as an organization tool.
For those who are not familiar with the notion, a mindmap is a simple diagram in which ideas or concepts are balloons connected to each other, representing the connection between similar or related ideas.
freemind, my favorite mind-mapping tool, is used for managing my daily tasks and I don’t forget a meeting, appointment, task or any of those dangling “to dos” for more than a month.
I’m glad I improved a little…