Archive for July, 2009

Removing Glycerin: A Trick to make your Indian beer taste like Bud

Why do Indian Beers taste bad? I have had this question buzzing in the back of my mind for quite a long time. Till now I believe that all my friends and colleagues think we Indians just don’t know to make Beer. Like how hard is it?Indian-Beer

In my Tharavadu (Ancestral home), I have drunk pure Toddy made from the sap of a Coconut or Palm Tree. Believe me this light alcoholic drink can blow away all the products of UB group currently in the market. You might have heard of Fenny and other Indian Locally Brewed delights. So with the rich history and wealth of knowledge for creating alcoholic drinks, why do we still suck at making Beer. I got a small tip from my friend Rohit Sakhwalkar (Sakhu) during my recent visit to Gurgaon. A million thanks to him for making not just my day but the whole drinking career ahead :D.

Why do Indian Beers taste bad? The answer is some organic compound which behaves like Glycerin. This is the reason why there is a bitter aftertaste. Yes, Glycerin exists in the alcoholic state as Glycerol. My mother who is a whiz at Organic Chemistry had given me some insight into this molecule. Due to its higher molecular weight and inductive effect of the Hydrogen atoms, Glycerol is less soluble than Ethanol in water. So after a bit of google search and poking around beer forums, I was convinced that this was the culprit behind the bad tase. Glycerin is added to beer as a preservative. As you know Indian climate is close to being ideal for beer storage. But all major sources of information like Wikipedia denies this fact. They also says that pure glycerine is sweet in taste. And that Glycerine is a major constituent of Bio Diesel which is gonna run the vehicles in the future. So basically it is gonna run both man and machine alike.

So with the help of Rohit’s tip, I tried his method of separation of the contaminent from Beer. Here are the steps and photographs of the same

Step By Step: Removal of Glycerin from BeerRemoving-Glycerrine

  1. Get a Glass/tumbler of water.
  2. Open the bottle of beer slowly so as to create less turbulence.
  3. Cover the mouth of the beer with your thumb and slowly turn it upside down with mouth inside the water. This is the trickiest part, ensure you do not shake the bottle and cause the dissolved Carbon Dioxide to effervesce. The reason will be clear below.
  4. As soon as the bottle is upside down you will see thick yellow colored liquid coming out. Which I believe is the organic compound mixed with  the colouring agents in the beer.
  5. Keep it there for some time. Maybe a min or two. I kept it for over 5 mins. Hoping to drain out the stuff completely losing some beer in the process.
  6. Put it back and enjoy the amazing taste of what is actually Beer. Yes my friend that is how Beer tastes like. If it doesnt taste close to Budweiser beer :P, you might have done something seriously wrong. I even feel that Carlsberg is de-glycerinified Kalyani beer, Who knows!. I dont care as long my b rew tastes awesome.

Take look at the only video I found online talking about this. I couldnt take one myself for my camera wasn’t distinguishing the colors
Video showing the removal of Glycerine from beer

Get ready for some geek funda. The science (or atleast my hypothesis) behind this method.

When you put a bottle upside down, the atmospheric pressure is pushing the water in the tumbler, the low pressure created inside the top of the bottle is causing the liquid not to fall down into the tumbler. So at equilibrium, the liquid inside the beer + water starts to settle down based on its density. Glycerine(or whatever Organic compound  being denser than water settles down into the glass of water, Water from the tumbler will go into the beer bottle(but not much, if you dont shake the bottle). If the Carbon Dioxide had started effervescing, the gas content inside the beer bottle would have started increasing, this would have caused the beer to flow into the glass due to increasing air pressure.

Advertisements

Page Faults and Context Switches: Chrome, Flash and Techcrunch are killing my system

Update: Beta News reported a similar performance drop when running chrome 3.0.193.1 on Windows 7 RC

I am a power user. When I surf, I have around 20-25 tabs open. I have many processes running simultaneously on my windows 7 RC.TaskManager When I code, I have a test Ubuntu installation running on VMware.  To do all these, I spent most of my earnings on a 17″, Core2duo 2.4Ghz, 4GB ram, NVidia 8600M GT Dell Inspiron Laptop 1720. I have been using Google Chrome since the day it was made available and i keep up with the latest builds of the same. I also love the fact that it was zipper than my earlier favorite(Firefox) in opening new tabs. But, the whole time Google Chrome has been stressing my laptop’s hardware.

To prove my point, take look at the screenshots from Process Explorer, a Task Manager replacement for Windows. The Laptop was restarted and the screenshots were taken after around 4-5 hours of casual browsing with around 25 tabs open. I also had a Hadoop installation running on a VMware Player. Simultaneously, I was also dabbling  around with some code in eclipse .

The following were my observations

  • The Browser Process of Chrome is doing over 10 Million Page Faults. The closest that comes to this process is the Microsoft AntiMalware service(Morro engine) at 2 Million. As you can see in screenshot 1(below), the whole top list is dominated by Chome processes.
  • The Flash process has over 70 Million Context Switches(see screenshot 2(below) which was taken 20 odd minutes after screenshot 1), @5000 Context Switches/sec which is quite appalling.  The nearest competitors are Interrupts, Chrome again, Google Talk (Another Windows Application from Google)
  • Lastly, Techcrunch.com, Mike Arrington’s “Bloat-ware” Blog , one tab of which is taking around 500MB of RAM taking the total RAM occupied by all  Chrome  processes at 1.05Gb (Note: Firefox was really good at this. I seldom get past 400-500 MB on that many number of tabs). Also funny thing is that,  if you compare Techcrunch to Gmail, the latter  just takes 64MB of ram(see Chrome’s Process Manager screenshot above)

Let me teach my readers a quick Computer Science 101. The following explanations are over simplified, so if you are not satisfied with the explanation, go read Wikipedia for a detailed discussion over the same.

Page Fault: When a processor tries to fetch some block of data from the memory, if doesn’t find the data in the memory it tries to get that data from the hard disk. Operating system manages the blocks of memory and moves some of them to the HDD based on Most Recently used criterion. Since you know the over head of a disk access is way larger than a memory access, too many page faults translate to more spinning of the hard disk. Read Wikipedia for a detailed description

Context Switch: In a multiprocess environment like windows. The cost of switching from one process to another process is quite high. If an application keeps switching very fast, that means it’s not getting enough cpu time to do its work, and it is wreaking havoc on the other applications by decreasing their effective cpu time also. Read Wikipedia for a detailed description

Few things come out of this little insight

  • Flash NPAPI plugin is a useless piece of crap. Even after 10 major versions, they still have an ill designed system. (Some people have told me this was specific to chrome as according to them Flash runs fine on Firefox)
  • Chrome even though is very fast in terms of HTML rendering and JavaScript execution. But, it kills the system by the large number of PageFaults and Context Switches it does.
  • Techcrunch seems to be doing more job than a complex web-application like Gmail. Or is it because the 20 odd flash ads they have on their Blog. They could be even doing mouse pointer/user tracking or even Javascript  code Instrumentation. Who knows!(Just Kidding). What ever it is, they need to find and fix the root cause of the problem.

If my readers believe they are also suffering from the same fate as I am, I would request them to put their stats up in the comments section.

I am using Chrome 3.0.193.0 with Flash 10.0 on a Win7 RC ( Yeah I know that it’s a unstable combination. But, even when I was using Chrome 2.0 on Vista SP1 with Flash 9, I had the same problem)

Process ExplorerProcess Explorer2

Download videos from any sharing site(Youtube, Dailymotion, Metacafe, vimeo etc)

There are a lot of ways to download content from a video sharing sites. Most folks rely on applications to download videos. Applications are really unsuitable for 3 reasons

  • Mostly they are specific to one or two sites
  • In some cases they are shareware
  • They have hardcoded techniques for url retrieval which outdate easily.

A slightly better technique for downloading is relying on sites to decode the url for you. This removes the latter 2 limitations of applications. For most of you who have come here Ripzor will suffice .  However the top limitation still remains if you are looking for a site not listed in ripzor.com. Also some times the url retrieval technique changes and sites do not update their scripts. I will give you the method to retrieve URLs in an easy manner using every day tools.

Tools required

  1. Firefox
  2. Firebug(or any other debugging tool)
  3. [Optional] Downloader ( like flashget or Downthemall)

Dont get scared from the word debugger. This technique is mostly a misuse of the word debugging 🙂 .  Now after you have installed the above “tools” . Lets start

Step 1: Select a video downloading site like youtube.com/dailymotion.com and pick a video. For further screenshots I have picked up this youtube video and this dailymotion video. The same techniques will work on any video site.

Step2: Now open video in Firefox and enable firebug debugging tool from Tools ->Firebug-> Open Firebug in a new window

Open Firebug in Firefox

Open Firebug in Firefox

Step3: Click on the youtube tab and click on Activate Firebug for the firefox tab button in the firebug window

Activate Firebug for Firefox tab

Activate Firebug for Firefox tab

Step 4: Select the Net tab among Console/HTML/ CSS/Script/DOM and Net on the top . Then select the Flash tab. This tab will give you all the web requests that a .swf file will make. Most sites use flash players for playing the video so this tab will work. If the following steps dont work then select the All tab for seeing all requests

Tabs to be used are net and flash

Tabs to be used are net and flash

Step5. Play the video you will get a screen like this in firebug. Now look for requests that look like video requests. For ex. those ending with .flv, .mp4 or in youtube’s case get_video. Right click on that link and select Copy Location. If there is no such link then you need to go back to step3 and select All tab instead of flash.

Copy link location

Copy link location

Step6. Use your downloader to download that video or paste that link in firefox itself to use it for downloading the video. In some cases you will have to close the video site tab to download this video as only one streaming might be allowed.

So now you can download any video from any video sharing site as long as the video is not encrypted with the player. Let me know what all sites you tried below.

Swipeball for iPhone

SwipeBall is fun and addictive yet simple to learn and play! Light up bulbs by bouncing balls off of walls and lines that you draw by swiping your finger on the touchscreen! Balls bounce and change in color as they touch the colored walls.The objective of the game is to light up all bulbs – each with a ball of the same color before time runs out. Light up all bulbs and reach the next level – hit the light bulb with a ball of a different color and you lose. Game gets more exciting and challenging as you complete a level and encounter different wall layouts, colors, speed and number of balls!

SwipeBall is a must have for any user looking for a fun game that gives hours of entertainment and interaction and yet is quick to learn. Different levels of difficulty make it a perfect game to get started on and hone your skills and show off to your friends as you get better. Don’t tell us we didn’t warn you it’s addictive!

Download Now From Apple Appstore for 99 cents http://itunes.com/apps/swipeball

Features

– Multiple levels with different wall colors and layouts
– Touchscreen to create your own barriers while you play
– Sound effects to indicate you have lit a lamp and countdown as time runs out
– Increasing levels of difficulty as you get better
– Twenty-five levels for non-stop fun and action

SwipeBall

SwipeBall - Level 20

SwipeBall - Level 20

SwipeBall - Level Selector

SwipeBall - Level Selector

SwipeBall - Level 15

SwipeBall - Level 20

For support please send an email to “swipeball <at> thinking <dot> me” or post a comment here

PS. It took us over 3 months to get accepted into the Apple Developer Program from India.
Download Now From Apple Appstore for 99 cents http://itunes.com/apps/swipeball