Reorder columns in R

I got the need to reorder the column order or a data frame in R and after searching a little, I've found a very easy way to do it.

Having a data frame named test like

a b c d e
[1,] 1 11 21 31 41
[2,] 2 12 22 32 42
[3,] 3 13 23 33 43
[4,] 4 14 24 34 44
[5,] 5 15 25 35 45

all that is required is to reassign the data frame using a new column order, like

new_column_order <- c("b", "c", "a", "e", "d")

test <- test[,new_column_order]

And that solves the problem.

This seems to work both with a data frame and a matrix.

./M6

MVC vs. MVP

I've found an interesting description about Model-View-Presenter and Model-View-Controler and how they differ in StackOverflow: What are MVP and MVC and what is the difference?

./M6

Free Cheat Sheets for Developers

Here's a set of free cheat sheets for developers: http://refcardz.dzone.com/
There's lot of information about Drupal, Java Concurrency, Java Server Pages, Maven, JavaFX and a many more.

./M6

Morgan Stanley Report about How Teenagers Consume Media

Morgan Stanley has released a study made by a 15 year old summer intern, Matthew Robson. Matthew researched about his friends and colleagues habits of media consumption and the results are very interesting, in particular when compared with adult people habits.

How Teenagers Consume Media

./M6

TomTom Maps are not that Good.

I have a TomTom One XL GPS. It was a gift, so I did not choose it myself.
It was a great gift and one of the first things I did was to update its map.
After doing it I tried it out.
To my disappointment, it didn't had the street where I live. It just had part of the surrounding neighborhood, so it look like I was in the middle of nowhere, like doing off-road with my car...

TomTom says there's an average of 15% of roads and streets changing every year. The neighborhood where I live was finished in 2001, meaning it has already 8 years.
There were a couple, or so, new TomTom maps that came out but none had my street. Finally, the current version, 8.25, has my street but it comes with an error on its name...

8 years of delay and it came out with an error!...
Unbelievable...

I do know TomTom buys the maps, it does not make them themselves, they get them from Tele Atlas if I'm not mistaken, but I have nothing to do with it. I have a TomTom product, not a Tele Atlas, so it is TomTom who's responsible for the products they sell, even if it includes technology they get from others.

TomTom states it works hard to deliver the ultimate naviagtion experience. The problem is that TomTom fails in the basics: the maps.
And it's not the problem it took 8 years to include my street on its maps, its the fact that the maps need to be cleaned up and you need to know extra information about your destination before you're actually be able to search for your destination:
  1. The street names have errors and are totally unnormalized. For instance, if you're looking for an avenue, you don't know if it starts with "Avenue", "Av." or "Av". Needless to say that if you're looking for street ABC but it's registered in the system as ABB, you'll have trouble to find it. You have to look for all possible combinations and watch out for typos.
  2. It does not allow you to search for middle strings, you always have to search for the beginning of the string. If you're looking for X, and you don't know if it's an avenue, a street or a town square, you're unable to simply search for X, and you fail to find it.
  3. You must know extra information about your destination. For instance, if you need to find destination X on city A, you must provide the X zip code or the civil parish. Needless to say that in many countries, Portugal included, the zip codes have mistakes and people don't always know the name of the civil parish where X is located. If people knew this kind of information, probably they also knew X and would not require TomTom to guide them.

All this combined, I feel frustrated using my TomTom GPS because it does not have, or I'm unable to find, around 20% of my destinations... Talking about "the ultimate navigation experience": do it the hard way, see on a paper map, watch the stars, or stop and ask for directions...

I don't need a search engine running on my TomTom, though it would be extremely helpful, but name normalization and reducing all these search barriers would result on much better search results for the user.

./M6

Subversion Merge Tracking

If you've been using Subversion (Svn) with branches and had to perform a merge, than you've already screamed in despair just like I've just done.
Svn, up to version 1.5, was unable to perform merge tracking correctly, a major functionality to everyone who has to work with several versions of the same application.

But fortunately, version 1.6 already has merge tracking working correctly.
I already had Svn 1.6 client installed, so all I need to do was upgrade the Debian server to Lenny and the manually upgrade the Svn server to version 1.6.
Everything went well, and there weren't many dependencies needed to be installed manually, so it was even easier than I expected.

Having everything in place, it was time to perform the merge. The merge consisted in including the maintenance branch into the development branch.
This was the second time this kind of merge was going to be performed. Since the previous merge was done without merge tracking, the logs and the graph was kind of useless to know the files history.
Even worst, when the merge was tested, it looked like the first merge had to be repeated. I did not understood this Svn weird behavior and found no reason for it, but there were files that were selected to be merged twice. The first merge was going to happen to the file contained up to revision 2636 and the other merge from revision 2637 up to the Head revision.

It had to be done carefully, but 8 hours later, the merge was done with no problems.

Since this merge was performed with the merge tracking functionality working, now it is possible to automatically track the file evolution. I'm hopping to have a faster, and with less stress, merge in the future.

./M6

Once Accenture. Always Accenture.

Yesterday I attended to Accenture Alumni cocktail party.
It was an event exclusively for former Accenture employees and, obviously, for Accenture Senior Managers and above.

I've been with Accenture twice, and loved it both times.
I always felt that Accenture really care about its people. The proof is in such meetings, Accenture cares about you even if you're no longer with them.
The event itself was very nice and allowed us to chat with people that we haven't seen for awhile. Many of us updated the mobile numbers between two drinks, sushi and ice cream.

Obviously such events have a business return. There were a lot of business cards changing hands, contacts updated and new contacts made.
There's also the marketing part of it, people that attended surely chatted about it with current coworkers or write about it in their blogs.
And precisely how many companies do you know that invite former employees for a cocktail?

On the way out, everybody got a Bonsai with a "thank you" card for helping Accenture to be the company that it is.

Well, tank you Accenture for the cocktail and for the challenges that I was given and that allowed me to be a better professional.
./M6