Archive for January, 2007

The truth about working in the IT industry

Friday, January 26th, 2007

1. We work weird (night) shifts…
Just like prostitutes.

2. They pay you to make the client happy…
Just like a prostitute.

3. The client pays a lot of money, but your employer keeps almost every penny…
Just like a prostitute.

4. You are rewarded for fulfilling the client’s dreams…
Just like a prostitute.

5. Your friends fall apart and you end up hanging out with people in the same profession as you…
Just like a prostitute.

6. When you have to meet the client you always have to be perfectly groomed…
Just like a prostitute.

7. But when you go back home it seems like you are coming back from hell…
Just like a prostitute.

8. The client always wants to pay less but expects incredible things from you…
Just like a prostitute.

9. When people ask you about your job, you have difficulties to explain it…
Just like a prostitute.

10. Everyday when you wake up, you say: "I’m not going to spent the rest of my life doing this."
Just like a prostitute ……..

 
Seen here

 

Popularity: 5% [?]

How to get an access plan in DB2 using db2exfmt

Thursday, January 25th, 2007

The most common way used to generate and retrieve access plans in DB2 is by using DB2 Control Center. CC provides a graphical representation of a query’s access plan, and it also includes an Index Advisor, that you can use when you are not sure about which indexes to create and to use.

However, not always you have access to a graphical environment (needed to run DB2 Control Center). For the command line, there are two utilities that you can use. DB2 EXPLAIN command and the db2exfmt utility. Although the first one is more complete, I find the second one to be easier to use. So, in order to get an access plan for your query using db2exfmt, you just need to do:

  • db2 -tvf ~/sqllib/misc/EXPLAIN.DDL (create the explain tables where all the explain data will be stored)
  • db2 set current explain mode explain (this will put DB2 in explain mode
    and all the subsequent queries won’t be run, but explain data will be
    gathered)
  • run your workload (e.g., db2 -tvf query.sql)
  • db2exfmt -d dbname -1 -o output.txt (formats the information on the explain tables)

 Detailed information about the access plan for your query will be in the file output.txt. By using this information, you can see which indexes are being used or not as also other performance considerations about your query.

PS: don’t forget to run "db2 set current explain mode no" when you are done with your access plans, so the queries will be executed. 

Popularity: 22% [?]

9 minutes of fame

Wednesday, January 24th, 2007

9minutesoffame.comI was wandering around on the web when I found this curious website. It is called "9 minutes of fame" and it consists in give the users/visitors the opportunity to have 9 minutes of fame in this site. Basically, visitors submit theirs website and the website that gets selected is shown on 9minutesoffame.com during the next 9 minutes. When this 9 minute period ends, submissions are open again and the first website to be submited is the one being shown for the next period of 9 minutes.

Besides the funny part of trying it out for 1 or 2 times, there isn’t much to do on this website, other than wait 9 minutes to see what’s the next website to be displayed. But the reason why I decided to blog this was because of its originality. Nowadays when a new project is successful, lots of people start to build clones of this projects/services, so it is nice to find a completely different idea like this one.

Update: I forgot to put the link, so here it his: http://9minutesoffame.com
 

Popularity: 6% [?]

The IT profession in 2010

Monday, January 22nd, 2007

A not very recent but interesting article about what the IT industry may be in 3 years from now: computerworld.com

Popularity: 5% [?]

Ruby declared TIOBE’s Programming Language of 2006

Sunday, January 21st, 2007

I must confess that I haven’t learned Ruby yet, but its popularity is growing everyday. According to TIOBE’s report for January 2007, Ruby is 10th most popular programming language.

"The TIOBE Programming Community index gives an indication of the popularity of programming
languages. The index is updated once a month. The ratings are based on the world-wide availability of
skilled engineers, courses and third party vendors. The popular search engines Google, MSN, and Yahoo!
are used to calculate the ratings. Observe that the TIOBE index is not about the best programming
language or the language in which most lines of code have been written."

Java is still the most popular language, with C and C++ in the next positions. I found curious the fact that Visual Basic is the 4th most popular porgramming language, ahead of PHP and some other very popular languages like Perl, Javascript and Python. 

Popularity: 12% [?]

How to replace text in a file with huge lines

Friday, January 19th, 2007

This is my problem: I have a huge xml file (150MB), in which I want to rename some of the node names. Conisder the example:

<root><prefix_name1>1</prefix_name1><prefix_name2>text</prefix_name2></root>

The creators of this document were not aware of namespaces, so they decided to use different prefixes in the element names in the documents created. My goal is to rename all the tags with prefix removing the "prefix_" part of the name. The solution looked simple, but it isn’t.

To begin with, I tried a sed, using the argument "s/prefix_//g". This didn’t work, because in AIX sed only accepts up to 4096 bytes per line (I read somewhere that this doesn’t happen with some sed versions, but I couldn’t spend the whole day trying versions of sed). Using perl also resulted in Out of memmory errors (I’ve just very basic perl knowledge, so there may be a way of handling such big lines).

So, I had to come up with a set of steps to do this change and maintain the file in it’s original format (all contents in one line). The steps where:

  •  used the tr utility to translate all ">" characters into a new line (a new > is printed before the replaced char) using tr  ‘>’ ‘\012′ < $1  | while read line; do echo "${line}>"  >> $1.new done.
  • rename the tags by removing the prefix. Either use sed or perl with the replacement pattern "s/prefix_//g".
  • delete all the "\n" (newline chars) from the current file, to get back to the one liner format. Used perl to read from one file and write to other applying "s/\n//g" to the content.

I’m sure that this is not the best solution, and there must be some utility out there that I can use so, if you have any idea, just leave a comment.

Popularity: 8% [?]

Lotus EasySync Pro

Friday, January 5th, 2007

easysync proIBM Lotus® EasySync® Pro lets you synchronize your IBM Lotus Notes® e-mail, calendar, tasks, contacts and journal information between Lotus Notes and supported market-leading personal data assistants (PDAs).

I was looking for this tool for months and only today I found it by accident. Dumb me! I should have guessed that we had something like this.

It works great! Although Lotus Notes and Windows Mobile calendars use different structures for events, there was no loss of information at all and the synchronization worked both ways. For now, I synchronized only my calendar events. I don’t use my PDA to do email yet. Besides the phone and GPS capabilities, what I use most is the calendar, taks and notes. 

Popularity: 9% [?]

Old Year, New Year

Thursday, January 4th, 2007



Originally uploaded by Vitor Rodrigues.

For the first time in many months, I really gave some rest to my laptop during my vacations. Last week was spent mostly with family, girlfriend and friends. So, only now I got to do the review of the year 2006:

  •  started the year looking for a regular job to start after the end of my internship at IBM in Silicon Valley (my internship was going until August, but Visa applications need to be filed by April, so you need to have everything set by then).
  • after a few job interviews, got job offers from both IBM and eBay (received both within a 20 minute interval :-)).
  • decided to accept IBM’s offer. Although eBay’s offer was economically better, I really enjoy the work environment at IBM, I have most of my friends there, and more important than that, I was proposed new job responsabilities that made me prefer this position.
  • presented at some internal conferences about using a Wiki environment in a big scale software testing project.
  • presented at NPUC about using Wikis to give power to team members in the creation of an information repository for cross-team utilization.
  • hired as a regular employee in March, 5 months before the end of my internship.
  • published a IBM white paper on XML Indexing in DB2 9 pureXML.
  • decided to accept an opportunity for a 1-year international assignment at IBM Toronto Laboratory in Canada, from August 2006 to August 2007.
  • after 18 months in California, I finally enjoyed some vacations in Portugal, visiting some places I hade never been before, like Tomar, Sintra, Evora and Vila Vicosa.
  • move to Canada.
  • co-lectured a workshop at CASCON 2006.
  • visited New York for the first time.
  • published a techincal paper in the IBM developerworks website.
  • finished another soon to be published white paper also related with DB2 pureXML.
  • contributed to the DB2 pureXML demo.
  • came home for Christmas and New Year.

Lots of stuff happening, mostly at work. I have the feelling that I could have done more, but I’m still happy with the results. I did more/better than what I was expecting one year ago.

In the personal life, besides the long awaited vacations in Portugal, all the other events where caused by work or work related (look for job, move to canada, trip to NY).

 For 2007:

 

  • professionally: improve presentation, communication, organization skills.  Find time to invest in side/innovative projects. Read more.
  • personally: more local exploring. Sometimes there are lots of interesting stuff in the place we live that we ignore and only later we realize how interesting that place was. Start to read. Save more money (hint: no more gadgets :-)).

 

Popularity: 44% [?]

Redirecting my blog feeds to FeedBurner

Thursday, January 4th, 2007

I just moved my feeds to FeedBurner, so I can get some statistics of its usage. You can do this by either using the Wordpress FeedBurner Plugin, or by adding some lines to your .htaccess file. I have decided to go with the second one, since it takes less time. The changes made to my .htaccess file were:


RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !feedBurner [NC]
RewriteRule ^feed/?$ http://feeds.feedburner.com/vitorrodrigues/blog [R=302,L]
RewriteEngine Off

Popularity: 4% [?]


Close
E-mail It