Feeds:
Posts
Comments

Kitchen Measures

This is planned to be my one stop for all food related measures. Look out for updates.
Liquid measures:
1 teaspoon is 5 ml
1 tablespoon is 15 ml
1 cup is 240 ml
3 teaspoons is 1 tablespoon
16 tablespoons is 1 cup
8 ounces is 1 cup
2 cups is 1 pint
2 pints is 1 quart
4 quarts is 1 gallon
Hope that saves me some searching the next time.

This is planned to be my one stop for all food related measures. Look out for updates.

Liquid measures:

1 teaspoon is 5 ml

1 tablespoon is 15 ml

1 cup is 240 ml

3 teaspoons is 1 tablespoon

16 tablespoons is 1 cup

8 ounces is 1 cup

2 cups is 1 pint

2 pints is 1 quart

4 quarts is 1 gallon

Hope that saves me some searching the next time.

The Greatest Poirot Ever!

Whose could be considered the best portrayal of Hercule Poirot in the media?

David Suchet is very impressive in the BBC television series but Albert Finney in Murder on the Orient Express is superior by far and was, to me, the epitome of Poirot-ness – until I chanced upon to a collection of BBC radio dramas starring John Moffatt. With his Suchet-esque yet mischievous voice and his array of ominous tut-tutting, hums and grunts, Moffatt as Poirot is everything that ever leapt to your imagination when you first read the books!

Move over Finney and Suchet, Moffatt rules all.

To have Eclipse use a particular Java VM :

Edit the eclipse.ini file and add the vm argument below the line org.eclipse.platform

-vm /absolute/path/to/your/java/executable

I’ve found this particularly useful on Windows when I’ve installed and removed various versions of JDK and eclipse appears completely lost and confused.

Kubuntu left a lot to be desired on my machine so I looked around for another good KDE distro and found Mandriva!

What works out of the box:

  • External Speakers! Hallelujah! Finally!!
  • Desktop effects run right off the live CD

What doesn´t:

  • Webcam still doesn´t work but that´s really low on priority
  • Power management is still a pain (I´m looking into this, expect a post soon)
  • Bluetooth needs a lot of tweaking go get to work

Repository Setup :

Setting up repositories in Mandriva is not quite as easy as Ubuntu´s sources.list way. However, no need to fret. Head over here and follow the instructions. Voila!

Also, you´ll find that the repository locks every now and again with a ¨”URPMI DATABASE LOCKED”¨. This post is what you´ll need.

Very easy and intuitive , Mandriva is the Ubuntu for the KDE fan!

With my recent conversion to Linux one of the first things I missed was a familiar DB client.

I’d been working with Toad on Windows for quite a bit now and had grown rather used to the interface. I needed a similar replacement on Linux. A search for “Toad + Linux” threw up a lot of TOra.

TOra has all the same features as Toad with very similar interface, including schema browser, syntax highlighting and support for common databases.

Trouble is, by default TOra comes packaged with only the PostgreSQL “Connection Provider” .

So if you want to get it to work with MySQL the following Qt dependencies need to be installed as well:

sudo apt-get install tora libqt3-mt-odbc libqt3-mt-mysql

subversion setup

Install subversion on Ubuntu :

  •  	sudo apt-get
  • 	install subversion
    Check the installation :
    • 	svn --version
    • 	svnadmin --version

      Create a repository :

      • 	mkdir ~/svn-repos
      • 	svnadmin create ~/svn-repos

        At this point you should have a folder called svn-repos in your home directory with several folders and a README.txt in it. This will be your repository

        Say you want to import all the contents of your ~/development folder to your repository

        • 	cd ~/development
        •  	svn import -m "this will be the comment for this import" . file:///~/svn-repos/myproject/trunk

          TortoiseSVN

            TortoiseSVN is a windows client for subversion.

            • 	Right click on an empty folder you want to check out the project into
            • 	Select SVNCheckout...
            • 	Use svn as the protocol if you're accessing the repository over a network (file if you're accessing a local repository)
                                         eg: svn://url.of.repository:3690/name_of_repo

              Subclipse

              While trying to install Subclipse with Eclipse Europa (3.3.1.1 ) you may run into some trouble with dependencies. So perform the install as below :

              Help -> Software Updates -> Find and Install -> Search for new features to install
              Add “New Remote site…” in this order
              • Subversive plug-in update site
              • http://download.eclipse.org/technology/subversive/0.7/update-site/
              • Buckminster Update Site
              • http://download.eclipse.org/technology/buckminster/updates
              • Subclipse 1.2.x (Eclipse 3.2+)
              • http://subclipse.tigris.org/update_1.2.x

              That should take care of all dependencies.

              handy writing

              I’m a big fan of GTD and am subscribed to lifehack and a dozen similar sites. As part of the credo I carry around a little notebook to capture notes, thoughts and ideas. I find this very useful especially while I’m waiting in queues or travelling. Trouble is, I tend to leave the notebook lying around, and since I’m the jolly friendly type, I have tons of friends dropping in at my desk who are more than happy to go through any unattended book lying around.

               

              So I thought to myself, some sort of a cipher was in order. For a bit I toyed with the idea of inventing one or using some standard substitution code. but it seemed like too much effort and rather pointless. Then it hit me! Short-hand!! For one, I wouldn’t have to make up my own cipher or learn an otherwise useless code. Two, I could actually end up writing faster. Three , since it was phonetic, it would be harder to decipher. I looked up some of the standard options. Some like Pitman’s depended on pressure of strokes while others depended on the location of the strokes and could only be used with a ruled notebook. Then there was Gregg which was versatile but involved a high learning curve. I had pretty much started started out on Gregg when I found Handywrite. It was quite similar to Gregg but a lot simpler in terms of the rules. The sum total of all information on Handywrite seemed to be limited to just this site but that was enough to convince me.

               

              The script took me just a weekend to master and it suited all my needs. It was simple to read and write, I could use it on any sort of media and could use anything from a pen or a pencil to a piece of chalk. I incorporated madd , tashdid and hamza from Urdu to help me spell proper names and add that extra confusion if faced with someone who actually knew Handywrite.

               

              Actually, learning to write in short-hand doesn’t mean I can write fast. It’s been a month of daily use and I’m still only as fast as my long hand. My reading speed is abysmal. But then speed isn’t my concern, privacy is; which has been met satisfactorily. Colleagues who glance at my notes during meetings are impressed, as are others who pass by my to-do list on the white board in my cubicle. I can now safely leave my planner lying around at my desk. As for speed , it’s just a matter of time I’m sure.

              When I first decided to shift from Windows to Linux, these were the main reasons:

              1. Costly upgrades : I was running XP SP1, however if I needed to play .mp4 files I would need media player 9 for which I would need IE7+ which will only run on XP SP2. So blow up thousands to upgrade the OS? Not bloody likely.
              2. Virus : The cost of good antivirus software and the amount of space it takes up not to mention the amount of time spent scanning files and updating definitions.
              3. Costly software : Any decent software I needed, from file type conversion to antivirus meant I had to buy and maintain it at a cost. If it were free, then you´ve just sucessfully added another denizen to your community of spyware and adware.
              4. Lack of choice : A little research and I was blown over by the number of options you had in the Linux-verse

              I experimented with Ubuntu, like all greenhorns should. Installation is delightfully intuitive and the Gnome DE is easy to use and a lot like the familiar Windows desktop.

              Ubuntu Installation:

              Running ¨sudo lshw¨ in a terminal tells me that among other things, I have a AMD Turion 64 2.2GHz processor, an ATI Radeon Xpress 1100 and an ATI SB450 HDA sound card

              Although I have a 64 bit processor, I went ahead with the 32 bit installation since the 64 bit Ubuntu distro would just freeze up during installation.

              I partitioned the 120 GB hard drive into Primary partitions: / – 10GB, /boot – 400MB
              Swap: 2GB ( I have 1 GB of RAM) and the rest as a Logical partition: /home

              First thing to do after installation would be to sudo gedit /etc/apt/sources.list and uncomment all the repositories.

              Graphics card setup:
              Go to System -> Administration -> Restricted Drivers Manager, then check ATI accelerated graphics driver. Once that downloads, open /etc/X11/xorg.conf and replace “ati” with “fglrx”. Reboot.

              From there everything is a breeze.

              Right. now for what doesn’t work:

              1. No sound from the external speakers – I am unable to get the external speakers working with Ubuntu. And although sound works on the headphones, behaviour was erratic in that even if the Volume Control is set to mute, I volume levels were inconsistent across different applications
              2. Power Management – power management says “no battery present” , refused to recoginse the battery and gives about 1 hourś running time. Which is fine for now.
              3. The integrated acer orbicam doesn´t work but then a lot of digging about in the forums shows that although there seems to be some luck in the desktop department, the era of integrated laptop cameras on linux is yet to come.

              KDE

              I strayed into KDE country via Kubuntu and at once knew I´d never be able to love Gnome again. Not only was the KDE gorgeous compared to the mousy Gnome but one could pop up the settings manager and customize the desktop till it was completely unrecognisable. More importantly, the applications! Rhythmbox couldn´t hold a candle to Amarok, Ktorrent is unmatched in reconfigurability. K3B is simply the best in the business.

              So Kubuntu is the way to go you say? Unfortunately, Kubuntu is Ubuntu´s under-favoured step-brother. Hardware support is shaky in the live CD, repositories aren´t always up to date. I´ve seen some improvement in the new KDE4 version, so perhaps things have changed since. (Disappointingly, I find KDE4 stepping backwards in the Gnome direction. But I´m sure the powers that be will learn and mend their ways)

              The next distro I tried was Mandriva, mainly because of the KDE promise. And has since become my personal favourite. Strongly recommended for laptops.

              However Ubuntu remains my silver bullet. I’ve used my original, straight from Canonical CD for everything from impressing my friends with the live CD concept, to rescuing my machine after problems due to distro hopping, to recovering data from Windows machines left for dead. Can´t imagine life without my trusty live CD.

              urdu in a weekend

              I first met her at a friend’s party. Inevitable, considering she was the only other smoker in the vicinity. Turned out she was practically my neighbour, just a street away from where I live. We decided to catch up over a coffee sometime.

              We did. And again. Often. Every evening. She was delightfully witty, independent, promiscuous, well read, informed, complicated, manic depressive, pretty, average kisser and smelled indeterminate yet nice. A daily dose of hormones, tobacco, caffeine and conversation… didn’t take me long to be smitten silly.

              One such evening she mentioned that she couldn’t read Urdu although it is her mother-tongue and she speaks it well.

              Predictably, my infatuated heart leapt at the opportunity to impress the lady. I told her that by next week, this time, I’d have learned to read (and write in) Urdu. Learning a new language is hard of course but learning just the script of a language that I understood well, now that I knew I could pull off.

              Wonderful thing, the internet. I stumbled upon this site. Ten short chapters, focusing on teaching just the script, not the language or grammar! In fact most of the tutorial is actual English words and sentences written in Urdu script. The chapters are terse and paced well. At five chapters a day, I managed to go through the lot thoroughly over the weekend. And that was enough.

              Urdu script is written right to left. With most letters having three different forms depending on where in the word it appears, the script is like none other I’d encountered before. Many times vowels are not written but guessed whilst being read depending of usage. A very involving task and a strongly recommended activity on a rainy weekend.

              Right then, was the fair maiden impressed, you ask? Never got the chance. That week she found a job in New Delhi and moved there. The relationship then went the way all long distance relationships go.

              < sound of toilet flushing … >

              versus

              Run time polymorphism vs. Compile time polymorphism

              Overriding is polymorphism. Obvious enough. But how the heck is Overloading polymorphism? Which Overloaded method is called isn’t decided at runtime, that is already determined at compile time.  So is Overloading polymorphism simply because, although the signatures vary all over the place, the method name is the same?

              Abstract classes vs. Interfaces:

              When would one prefer to use an interface/abstract class?

              Abstract class:
              1. When the focus is on something an entity HAS
              2. When an attribute is a common factor. E.g.: A Unicorn, a Cow, and a Triceratops are all of type Animal. They all also share the attribute Horns. A good place for inheriting from an abstract class.
              Interface:

              Of course, an interface is just a perfectly abstract class.

              1. When the focus is on something an entity DOES
              2. When the only common factor is behaviour and not attributes. E.g.: A bird flies. Ditto a Plane, Time and $hit. Nevertheless, Bird, Plane, Crap and Time classes can hardly inherit from a common abstract parent. However they can all implement the Flyable interface.

              Procedural vs. OO programming:

              Procedural:
              1. Separation of data from operations. The idea is that data is passed with the expectation that the program at the receiving end knows what to do with the data.
              2. Code is placed in procedures that manipulate the data. Procedures are mostly black boxes – input goes in, out comes output.
              3. Procedural logic is splattered with if-then-else conditional statements.
              Object oriented:
              1. Encapsulation. Objects have attributes and behaviour.
              2. Object has behaviour and thus knows what to do with its data.
              3. OO depends more on polymorphism than on conditional statements. (If your OO principles aren’t good, you’ll end up writing OO code that looks like procedural, with monolithic if-then-else statements. Been there, done that. )

              Older Posts »