Search This Blog

Posts

We ran into an interesting issue with IE, we aggregate CSS at build time per JSP file and recently we introduced Jquery and colorbox into the current release that caused the css size to grow beyond 300K. Everything would work find locally as we dont do aggregation in development mode but things wont work in QA environment on IE, Firefox would work fine. Some of the images wont show up in IE no matter what you do and one of the developer found that IE will ignore any css beyond 288 KB and even gzipping content doesn't matter because its the final size the IE will have to parse that matters. Fortunately the solution was to just create two aggregate css instead of one and that solved the issue.

Just discovered SVN uses merge command to revert a changelist. Suppose some developer checks in a changelist number 20404 in wrong branch, use the below command to revert it
svn up
svn merge -r 20404:20403 http://zzz.xxx.com:8080/repos/trunk
svn st
svn diff
svn ci
Just remember to give the higher changelist number before lower one and use svn diff to diff the changes before commiting it.

Apparently there is no easy way to look at the content of messages in RabbitMQ. the list_queues only will give you a count but if you want to look at all the messages content then there is no easy way. I had few thumbnail generation messages in the queue that the code failed to ACK because of exceptions in code. Now I want to see what files are stuck for thumbnail generation. The best way is to restart the program and Rabbit would redeliver the messages but we cant restart a live system. So the trick is to just write a python program that would consume the message but wont acknowledge it.

I had to use redis in our project in both python and Java. In this post I will cover a basic example of generating counters using Redis. I had to use cassandra db to push data but cassandra doesnt have autoincrement counters at this moment so we will use redis till the new version of cassandra supports it. Redis has memcache like API but the advantage is that its has atomic operations and the data is saved so server restarts will survive the data. The only disadvantage I see is that the java client yet doesnt support consistent hashing but eventually it will.

I am a java programmer but I can code in python too so for some work I had to code in python and I installed pydev in eclipse but It messed up with my Open Type (CTRL +SHIFT+ T) binding and when I now hit that it asks me a popup to tell whether to open python class browser or java open type, off course I hate it because 99% of the time I want Java open Type. The way to get it working back was to go to

Windows->preferences->General->Keys and go to the python "Show Class Browser" binding and instead of choosing "In Windows" choose "Pydev editor scope" and you are all set.

My Windows7 crashed and as we do our most of the development in ubuntu it makes sense to install ubuntu as host. But when I installed Windows7 there was no sound coming in it. Thanks to ubuntu community the solution was tedious due to my mistake but finally I did it. The way to do is :

1) Make sure you have proper virtualbox version. I had the OSE version but my ubuntu is lucid version so I needed that virtual box. If you get "Error: Conflicts with the installed package 'virtualbox-ose'" that means you have to use Applications->Ubuntu Software Centre to uninstall all virtualbox OSE package (in my case there were 3 packages).
2) Download and install the virtualbox lucid version. It will automatically detect old hardisks and upgrade it.
3) You need to VM settings in virtualbox and go to audio and select Alsa Ac97 driver.
4) start your VM and now go to realtek AC97 driver http://www.download3k.com/System-Utilities/System-Maintenance/Download-Realtek-AC-97-Drivers.h…

About Me

I like writing good code and improve myself every day by learning new things. I like working for startups as they give you tons of challenges than working for a big company, not sure if you guys feel it but simple programming quirks give me tons of joy. This blog is about the things that I worked on and found worth sharing with fellow programmers who are googling for solutions like me.
This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.