admin

I am officially a trillionaire

Following up on my previous posting about what you can buy with a trillion dollars, I actually bid on some Zimbabwean currency on ebay.. I just received my freshly minted Zimbabwean currency and can officially say that I am a trillionaire :).. As any trillionaire would wonder.. what do I do with all this money now :)..

Lessons of the Trade : Simple way to deter web scrapers

If your website is a target of web scrapers (http://en.wikipedia.org/wiki/Screen_scraping), here’s a simple way to keep them on their toes..

Every few days (or weeks) make a small change to the web page format. The trick is to make the change in such a way so that your users do not notice it or are not annoyed by the change. Most of the simple scrapers use, screen scraping and this would confuse the hell out of them πŸ™‚ and usually deters the most abusive ones. The smart ones would have approached you in the first place, requesting permission to scrape or get authorized for an interface.

Lessons of the trade : Troubleshooting database perfromance

If you have ever worked in an IT shop, you will know that the one thing you cannot escape from is issues related to Database performance. Now, I am no DBA in any way or fashion, but thought I should record some of the common issues and ways they have been overcome in my career so far. More for self records than trying to teach someone :).

  • Network Related
    • Check if the NIC (network interface) on the DB server has any speed mis match with the network device (most probably a switch) that it is connected to.
    • Check the latency between the application and the DB (pertains to applications connecting to DB over WAN links)
  • System Related
    • Check if a rouge process is using all the system resources.
    • Check if the disk sub system is performing optimally
      • Recommend using RAID 10 for transactional systems.
      • Don’t forget to check those batteries on the RAID controllers πŸ™‚
    • Check if the DB is just running out of gas.
      • Long term capacity trending records come in handy here.
  • Database Related
    • Views are evil.. if created the wrong way. Esp, on data that is accessed frequently. Remember that you are now making two calls to the database. One to read the data, One to create the view.
    • Ensure your logs are not being writted ot (thx Ray for pointing out the typo) written to the same disk subsystem as your data files.
    • Indexes are good.. But only to an extent. If the size of your indexes is twice the size of your data.. you have an issue.
    • Check for invalid objects. You will be surprised how many times, people overlook this.
    • Sometimes, it helps to flush the SGA (Oracle specific). Be aware that it will slow down the response time for a while (until the cache gets populated again).
    • Avoid excessive monitoring. Esp. with tools that query the system tables quite frequently. This has a negative impact on the database performance.

Did you run into any strange situations and figured out a solution? Please feel free to add your comments below…

Can you still write?

i.e. Can you still write with your hand? I ran across this article (http://news.bbc.co.uk/2/hi/uk_news/magazine/7907888.stm) on the BBC, which predicts that we will have forgotten the art of handwriting in another 100 years or so. Imagine, a specialist having to decipher handwritten notes, although I should confess that I think it takes a specialist to read my handwriting now :).

As with most people of my age, I actually went through a formal “handwriting” class. I remember, we used to have special assignments, where all you did was write πŸ™‚ . I used to write a lot of handwritten letters during my childhood, but as I grew up and started to use computers, my need to hand write something became less and less. If I remember correctly, the last handwritten letter I wrote was ~6 years ago!! It is so easy to type up an e-mail and send it off, but writing a letter makes you think and reflect on what you are writing. I do miss it πŸ™‚

Speaking of things that are going to be “things of past”, I also think that most of the regional languages in this world will fade away in another 200-300 years. Everyone will speak some form of English :)..

So when was the last time, you wrote something (meaningful) with a pen or pencil?

New Toy : Kindle 2.0

I have been looking at getting an e-book reader for some time now (yes.. even though I don’t have time, I still like to think I can read πŸ™‚ ).. My sister and brother in law surprised me by getting me the newly released Kindle 2.0 (Thx Guys!!).. I think I am one of the first few people to receive it!!. Here are some pictures of the unpacking and the device itself

The Kindle in it’s original packing.. Getting pretty close to being as cool as Apple packaging

The most amazing thing (for me).. the USB/Power Cable.. Look how small the power brick is!!

 

First Thoughts??

Since, I didn’t have a previous e-book or the Kindle 1.0, I don’t have anything to compare it to. I think the styling of the device is very sleek and sexy. I like the alumunium backend (Reminds you of the first gen iPhone). The interface is OK.. Was not very impressed with it. I love the fact that you can browse Wikipedia anytime/anywhere with the built-in wireless connection for free!!

My next task is to figure out a way to get some content onto this baby. There are several books in the public domain (like the ones on Gutenberg.org) that I would like to get onto the Kindle first. Once, I feel comfortable with the unit, I will try some e-books from the Kindle store.

HOW TO : Simple perl script to replace lines in file

Nothing fancy.. but here is a simple perl script to open a file, search for specific content in the a line and replace it with some other content.

open (SOURCE, "< source.xml") or die "Could not open file source.xml: $!\n"; open (DESTINATION, ">modfile.xml")
or die "Could not open file modfile.xml: $!\n";

while (defined($line =)) {
if ($line =~ m/YYYYYYYY/i) {
$line = "XXXXXXXXXXXXXXXXXXX\n";
}
print DESTINATION "$line";
}

close (SOURCE);
close (DESTINATION);

You are opening a file named source.xml, reading every line and if there is some text that matches “YYYYYYYY”, you are replacing the whole line with “XXXXXXXXXXXXXXXXXXX”. I am sure there are more elegant ways to write this :).. but this will do the trick too..

I am a Disco Dancer..

What am I listening to now a days on my runs? This classic from the 1982 movie “Disco Dancer“..

Love the bling bling shiny dress of Mithun and the side kick girls with their saxophones and shorts πŸ™‚

Check out two crazy moves… One is at 4:35 and the other at 7:10

And yes.. I love Disco πŸ™‚