Installing Java on Fedora using Yum

If you’re a bit dubious of GUIs or you’re simply fed up with the “Add/Remove Software” application that comes with Fedora, you might just decide to launch a terminal window and add/remove packages using old school methods.

To do that, just follow these steps:

  1. Launch the Terminal application (Click Applications/System Tools/Terminal)
  2. Log in as root by typing “su -” and the password
  3. Type “yum install java”
  4. Sit back and enjoy. However, you will still to answer a few prompts here and there so don’t get too comfortable.

Moving Fedora windows beyond the screen

I was running Fedora on VirtualBox and I encountered a problem where the dialog box was too big to fit in my virtual screen and there was simply no way to drag the window up so I could see the buttons at the bottom of the dialog box! Once the title bar of the dialog box hit the top of the screen, the window could move no further.

As usual, performing a search on the Internet provided a quick solution. Just hold on to Alt while clicking and dragging anywhere within the dialog box and it will then magically be able to move beyond the screen.

New football incident involving Ronaldinho also highlights office politics!

Ronaldinho gets some attention from a pitch invader but a red-shirted security guy has control of the situation and escorts the invader off the pitch using a bear-hug. Just as the both of them are about to step off the pitch, another red-shirted guy runs onto the pitch and uses unnecessary roughness to subdue the already subdued invader.

So there, you have it, an actual video of a person rushing in to claim some credit when someone else has already done all the hard work!

Reverse Conditionals

I have made this mistake countless times in Java where I type “if (variable=1)” instead of “if (variable==1)”. The former will always return true since there is no error assigning the value “1” to the variable (assuming correct variable type), whereas the latter depends on whether the variable contains the value “1”.

To prevent such errors from cropping up in your code in your conditions, you can make use of the non-intuitive reverse conditionals. To modify my example above using reverse conditionals, I will type “if (1=variable)” and “if (1==variable)” instead. In this case, the former will immediately throw up an error upon compilation since it is not possible to assign a value to a literal in this case.

Proper date checking for PHP

Some sites seem to perform a simple date check where they just check if “Day” is a number between 1 to 31, “Month” is a number between 1 to 12 and the “Year” is a valid number.

While this check is inexpensive, it is definitely wrong as you may end up with strange combinations such as “31st April 2010” or you may also wrongly allow “29th February” to occur on non-leap years.

To save yourself some grief, make sure you use the checkdate() function to validate your date data.

Who needs villains when you have “heroes” like these?

The word “hero” often conjures up the image of someone in a spandex costume with a cape who swoops in to save the day. In the context of an IT project, it may be someone who is called in to assist or take over the reins due to resource restrictions or some other purpose.

All is well and good if the person turns out to be a real deal and is able to guide the project back even though “all the roads that lead us there are winding, and all the lights that light the way are blinding” (thanks to Oasis).

But of course, there are also self-proclaimed “heroes” who somehow manage to blunder their way to a project conclusion and then spare no effort in trumpeting their “achievements” while all the other members in the project team know that little credit (if any) was due to the person. To use a football analogy, sometimes Manchester United can be playing so well that you can even put your grandma in the first team and they’ll still win the match comfortably. Sufferers of such “heroes” should take comfort that luck, smoke and mirrors can only carry the “hero” so far. The truth will reveal itself sooner rather than later.

Benchmarking Projects

With regards to benchmarking, there is a chinese saying “人比人,气死人” (You will only anger yourself when comparing yourself against others).

When it comes to benchmarking, perhaps it is most useful when comparing against similar projects within the same organisation since the baselines (company culture, company structure, etc.) should be the same. However, what is most important is that project reporting is truthful and the management is willing to accept deviations from the benchmark if there are valid reasons.

Problem is, we’re talking about corporate flexibility when it comes to standards. “Flexible standards” comes close to being an oxymoron, and few are the corporations that have management willing to commit to such an undertaking.

Paper certified, but practically uncertified

In the IT world, certification is given quite heavy weightage when it comes to beefing up your resume, however employers should be wary that a certification just means that the person knows about the best practises behind the certification standards but does not necessarily mean that they will make use of those skills.

For instance, I have come across PMP and PRINCE 2 certified professionals who have detracted far from what is preached by those standards. Some of them may have been restricted in the sense that they need to fit into the corporate culture, but others may just lack the necessary skills (both hard and soft skills) and are just hiding behind those pieces of paper.

Certification may be important, but it is not what defines the person. Ultimately, since IT work usually involves working closely together in teams, such cert-rich but skills-poor people will get exposed and lose their credibility.