Emacs tip: Prevent too many buffers in Dired

    This is for the users of the Emacs editor

    Dired mode is the default way of visiting directories on Emacs. Whenever you open a file using C-x C-f, you would see the current directory. If you chose to press Enter without entering a file name, you would visit the current directory in Dired mode.

    I don’t use the Dired mode very much to browse directories. I would rather use Windows explorer or Nautilus. Don’t get me wrong, I do find Dired extremely useful to locate a file. But for every directory you visit it adds a new buffer. This quickly becomes very unmanageable.

    However, I recently found out that you can make Dired re-use the same buffer if you press a (dired-find-alternate-file) rather than ‘Enter’ for visiting a directory in Dired mode. This is can be even used to open a file which results in the last Dired buffer being completely removed (alternatively you can use v or dired-view-file to view a read-only version of the file).

    With this tip, I am finding myself using Emacs more for browsing around my file system.

    Comments →

    Top 7 Inexpensive but Indispensible Things

    I was shifting to a new house in Mangalore recently. I realised that some of the things that I value the most were not the typical big screen home theatre system or a luxurious jacuzzi.

    Without sounding too cliched, let me say that some of the best things in life are not expensive. Here are some of the best things you can buy for less than Rs. 8K (around $160):

    Wifi Router

    This is a blessing for those with frequently off working hours calls or if you have multiple laptops. The convenience of being able to work near the balcony enjoying the quiet scenery and sipping tea is divine.

    Small Water Heater

    This is a pet peeve of mine. Hot water is absolutely essential for a bath. Even in summer. Yep. Nothing gives you a better satisfaction that a hot bath after a warm day. And in Mangalore it’s either raining in buckets or it’s hot and humid. I would recommend that you go for a 8l one if you want a good tradeoff between heating time and power consumption.

    Portable Harddisk

    I am sure most of us have tried using CDs for backing up all those wonderful photos and songs we have. The problem is - CD are not really great for organising data. It is readonly and once you burn it, there is no way to go back and change it. There are, of course, other problems like limited space and suceptibility to scratches.

    Harddisk prices have gone down… a lot. So there is really no excuse for not getting one. There are sub-terrabyte ones at throwaway prices. I recommend the Western Digital’s handy Passport 500 GB.

    Ebooks

    Can anyone guess what’s the most heaviest thing to transport? Yep, it is undoubtedly books. The weight of a carton of books can exceed that of a TV, Microwave or even a carton full of iron boxes. I think everyone who love books would have had to part with them if they have had to travel a lot. They would have given away most of it to friends or relatives, never to see them back again.

    This is sad. I don’t like giving away books. Neither do I want to kill my desire to create a personal library. I suggest an eco-friendly compromise - make a digital library. Do invest in Ebooks and Audio books. I have invested heavily in a collection that I am sure I can use anywhere once ebook readers become more cheaper. For now, I don’t mind reading them on my laptop. And yes, my library weighs less than a kilo ;)

    Gamepad

    I am a guy who is always tempted to buy game consoles. I have made up my mind a hundred times to buy a playstation or a nintendo, only to find that the latest PC is much better at it. And you know what PCs are always ahead in terms of sheer processing power. Except that they have clumsy input devices. Ever tried to play a racing game with a keyboard? Then you will know what I am talking about.

    This is easily fixable. A USB gamepad (which looks like a PS2 Gamepad) comes in for less than Rs. 500. It is a great value for money. It has all the 4 way controls, shoulder buttons and 2 joysticks. Plus it has a built-in vibrator (no batteries needed)! I am planning to go for a second one. Now you can safely give your PC to your 5-year old cousin to play Mario Kart without fearing that he with smash your keyboard to bits shouting ‘Maaario’:)

    Decent Mattress

    Some one rightly said that we spend one-thirds of our life on a mattress. So why not in a really good one? There are cots in the market all the way from Rs 200 to branded mattresses worth several tens of thousands. Go for a really good branded mattress. It might cost a couple of grand, but you will not lose sleep over it ;)

    Portable Home-kit

    A briefcase sized kit that contains a small drill, spanners, measuring tape, pipe wrench, screwdriver set etc costs less that Rs. 2000 these days. I think it is well worth the price.


    Those were, in my opinion, the best little things that don’t cost you a fortune. What are the ones you feel give you great value for money? Do add in your comments.

    Comments →

    Poem: Little by little

    Little by little

    Soft pink tiny hands
    Thump, thump… thump, thump
    Travel to unexplored lands
    Thump, thump… thump, thump

    A gingerly turn
    A confident roll
    Ebbing everywhere
    Her ropey drool

    Bangled hands on plastic chairs
    Tap, tap…. tap, tap
    Music to her little ears
    Tap, tap…. tap, tap

    Kitten eyes
    On a sorry face
    When I sigh
    upon a broken vase

    Grandfather clock smiling above
    Tick, tock… tick, tock
    She smiles back beaming with love
    Tick, tock…. tick, tock

    Comments →

    This is It: Remembering the Performer Extraordinaire

    How do you exactly remember Michael Jackson? A pale faced ageing popstar with bad plastic surgery artifacts? His controversial child molestation charges cases settled out of court? Or his unnaturally feminine voice?

    this is it
    For a normal kid who grew up in the eighties, Michael Jackson was a part of growing up. MJ - the legend - was a larger-than-life icon. We spent hours trying to copy his moves and create that illusion of ‘Break Dance’, a style of dance that Michael defined and redefined continually. Some of us were pretty good. There was a Michael Jackson imitator in every school or college dancing competition. There were many who could manage a close imitation (Prabhu Deva for instance) but never truly ‘perfect’. To know what’s perfection, one had to rent out a copy of Michael Jackson’s videos. And then watch the jaw-dropping performance for the hundredth time.

    Yes, MJ has had more than his share of controversies. The multi-millioniare King of Pop residing in the amusement-park like estate of Neverland Ranch was easy to be hated. Media loved to lampoon every excess of his. But when MJ stepped on stage, when the arc lights shone, something extraordinary happened. When he made his spectacular entry there were goosebumps on every person in the audience. When he moved, the laws of physics would not apply. When he sang, he could dive into pathos and immediately hit a howling yell with remarkable ease. He was in every sense of the term, a performer extraordinaire.

    Two days back, in a small packed screening of perhaps a hundred people, I saw one of the most moving homage to this incredible artist. It was aptly called ‘This is It’. Rather than a boring documentary with interviews and flashbacks, the film directly took you to the auditions for MJ’s final tour of the same name. In the next few minutes, you are taken through the gruelling preparations Michael had for what could possibly have been a stage performance never experienced before.

    To appreciate the genius of his performances, you need to look no further than the immense amount of improvisation and perfection in every performance of Michael. He doesn’t mime his old soundtracks. He doesn’t even sing to a recorded soundtrack. Everything which happens in an MJ’s show is being performed Live. Yes, today’s teen popstars who can barely mime their performances on stage surely have it easy, don’t they?

    As we watch the rehearsals of several iconic hits like ‘Billy Jean’, ‘Thriller’ and ‘Beat It’, you don’t feel for a minute that you are watching an ageing fifty year-old. He effortlessly performs his trademark moves that, despite millions of imitators (including the very talented and cherry-picked stage extras), only Michael could convincingly perform. When he sings, he doesn’t gasp for breath or lose his tempo. He, in fact, single-handedly resurrects his hit numbers performing frighteningly close to what how did when he was a teenager.

    As you watch these songs, you cannot help wondering the immense capacity of MJ to entertain his audience. He can stir a range of human emotions be it Romance, Empathy, Frustration or Terror in the deepest possible way through his songs. His audience escape to a world that’s very uniquely Michael’s creation. A surreal world inhabited by gangsters, zombies, and panthers in locales varying from Egyptian deserts to lush tropical rain-forests.

    Michael was not just an exceptional artist but an extraordinary human being. In the rehearsals, he treats every artist on crew with respect and humility. He has been credited with supporting more charities than any other artist - 39 charitable organizations - either with monetary donations through sponsorships of their projects or participation in their activities.

    His songs broke all boundaries of culture or race. His songs like ‘Heal the World’ leaves a lump in one’s throat and stirs your heart everytime you hear them. For millions of fans, there will be more pop crooners or dazzling dancers, but there will be only one King of Pop. And he will be missed - Forever.

    Yes…. This is IT!

    Comments →

    PyCon India Talk 2009: Game Programming in Pyglet

    Thanks to everyone who enjoyed and commented on my talk today titled ‘Accelerate Your Game Development with Pyglet’. I am happy to see so much enthusiasm within the python community for game development. This was my first lightning talk (and the first one for the day as well) and though, I slightly overshot the timelimit, it was a great experience.

    The talk was about creating a simple casual game using Pyglet called ‘FruitCatch’. The source code is really small and very readable. I also compared Pyglet with Pygame and why I prefer Pyglet (in certain situations:)). The demo showed the working game in the end.

    You can download the game source code and presentation slides (PDF) here. I’ve shared this with the organisers as well, so it will be put up at the Pycon site as well

    UPDATE: The video of the lightning talk is now available and has been added below:

    UPDATE 2: Fruitcatch source code is on github now.

    Comments →

    « Newer Page 17 of 39 Older »