Thursday, July 29, 2010

Spanish version of Facebook got hacked

Did Facebook all of the sudden got very impolite? mmmm nope, it seems that the Spanish version of the social network giant was hacked and (at least for some profiles) now instead of wishing you happy birthday it says... well check the image below

Well another day, another hacked site...

JVM Heap Size Tuning

Earlier this week I had to solve a major performance issue affecting our application, in the end it turned out to be a database (missing statistics) problem that lead to a slow response from a query, but in the mean time I had the opportunity to play a little bit more with Websphere’s JVM Heap size settings.

First of all, what is the JVM Heap size? The simple answer is: The amount of memory used by the virtual machine to allocate new objects created by your Java applications.

You can find tons of details about it online, but here I’ll post the main ones:

·It directly affects performance, so it’s one of the most important JVM tuning parameters

·If you set the max heap size too low, your apps will reach the max level soon and you’ll get the following error:

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

·In case you choose big amount for the max heap size setting, then your applications will have all the room needed to create objects, but then the Garbage Collection (GC) process will take longer. The effect of this setting will depend on the GC policy you choose.

By default the GC policy is set to “Optthruput” which means your app will not respond during GC. The second option is “Optavgpause”, that runs the GC concurrently with the app and gives a better response time. Finally “Gencon”, that treats long-lived and short-lived objects in a different way by allocating the latter ones in a special area (Nursery space) that can be disposed more often, hence reducing the time spent during GC.

In the end the value of the heap size will depend on the needs and resources available in each case, so now it’s time for you to go and give it a try ;)

Wednesday, July 28, 2010

The Inner History of Devices

An interesting presentation by the famous MIT sociologist Sherry Turkle called "The Inner History of Devices". In the 30 minutes of her presentation (followed by 30 minutes of Q&A) the talk brings you back to a hidden subject within our daily lives: the feelings we have for our devices.

Check it out and you'll come up with your own ideas about the subject, in my case it made me realize that my wife's idea of me having an emotional attachment to my laptop actually makes sense! Think about it, I work, talk to my family, connect with old friends and have fun through the same device, so who could blame me?

Now take a couple of minutes, and think about the device that has or is affecting you the most ;)

Tuesday, July 27, 2010

My Anti-Creativity Checklist

I was just working today when Victor, my officemate, told me to check out the following video. It summarizes some of the most commonly used excuses to avoid creativity and challenges in our daily lives.

Is it something new? No, then why did I post it? Because I think we all need to remind ourselves about this from time to time, otherwise we may lose our focus on what we are aiming for at work and even in our lives.

I hope these 4 minutes sparked your creativity at least a little bit ;)

Sunday, July 25, 2010

Internet Explorer giving a run-time error when executing object.innerHTML

By any chance did you get an “unknown run-time error” while using the following javascript method object.innerHTML=”yourhtml” in Internet Explorer? well I just did and obviously the very helpful (sarcastic) message by Microsoft didn't help at all.

Fortunately the solution is quite simple, for example in this case:

 document.getElementById('cartAddSpecContent').innerHTML = spec;  

All you have to do is to replace the 'cart'AddSpecContent' element (that used to be a


) for a block-level one like


and that's it ;)

Monday, July 19, 2010

Creative Web Cam VF0330 not working with Skype

This weekend I tried to have a video call with my sister that unfortunately didn't work. What happened? Skype didn't like my Creative Webcame VF0330! why do I blame Skype? cause Kopete doesn't have to have any issues with it ;)

So after a couple of hours of googling and I ended up stuck while trying to compile the Ov51xJPEG hacked driver, then after reading a little bit more I found the following forum entry with a pretty simple solution to my problem:

First I renamed the old skype executable:

 sudo editor /usr/bin/skypemv /usr/bin/skype /usr/bin/skypewithoutcam  

Then I created the new executable

 sudo editor /usr/bin/skype  

And included the following code

 LD_PRELOAD=/usr/lib/libv4l/ /your-skype-folder/skypewithoutcam  

That's it! enjoy your video calls ;)