Saturday, December 28, 2013

Game review: Little Inferno

I'm sick of casual games. Do repetitive stuff to get coins/stars/points. Spend points to get better equipment. Continue doing more repetitive stuff. After the first five minutes, they aren't fun at all. Games with in-app purchases are particularly bad, as they force you to do the same mindless chores again.

A few months ago, I had purchased a game called Little Inferno but I only just got around to playing it. It is brilliant. Estimating by the game content, I have played one tenth of the total content. Made by the same people who made the World of Goo, it is as enjoyable as my experience with the World of Goo.

The basic concept is boringly simple: you have a fireplace and you burn things. That gives you coins, with which you can purchase other things. But in a crazy twist, there are no in-app purchases. You get more coins when burning your things, so your cash keeps growing. Even if you somehow run out of money, there are small bugs that will give you coins for free. It gets even twisted...

There is no aim, there is no goal. You never lose.

You play for fun.

There is some story-line in the game, but that doesn't keep you going. What keeps you going is that this game is fun. You burn stuff, and it does interesting things. Sometimes burning things together does interesting things. It is difficult to explain why anyone would want to play it. Ever threw something in a camp-fire to see what happens? Well, this game is like that. You burn stuff, then head to your catalog to see what else you can burn. You could be done in five minutes and stop playing. Or you could burn stuff for hours. Either way, you get calm and enjoyment. That sets it apart from a significant chunk of the games already.

This game does two things which are remarkable. First, it has a commentary about the state of the world that unravels as you play it. I'm far from the finish, but the hints till now suggest an interesting message about the world we live in. The game is also a hilarious look at casual games, and how inane casual games have become. If it were that alone, it would be a gem. However, more importantly, this game is truly funny. The things you get are funny. The way they burn is funny. As it proceeds, the game introduces you to more elements. The instructions are funny, the in-game characters are funny.

Why must games be about the same boring concept? Why are half the games about being a soldier -- fighting or shooting? Computers are limitless: games should experiment and develop their own message and goals. How does it feel to be a honeybee? Maybe a game should allow you to find out.

Little Inferno is available from their product website. For the next two days, you can buy the Humble Bundle which includes Little Inferno. Runs on Linux, Android, Mac, Windows, toasters, ...

It is surprisingly, funnily, engagingly good. Now throw this review in a fire!


(Thermometer courtesy: Sugar Plumps)

Wednesday, December 25, 2013

E911 testing

A few months ago, I was working on a component that interacted with the Enhanced 911 dialing on a mobile platform. 911 is the emergency telephone number in the US for medical and law enforcement services. Other countries have something similar, like 112 in the European Union.

When I was developing my feature, I had to test out 911 functionality to ensure it was still working. My hope was to substitute the emergency number with something safe, like the number of my spouse. That way, I could call my fake emergency number without actually bothering the police.

I found that there are special requirements placed on mobile platforms for emergency dialing. Even if a GSM device does not have a SIM card, 911 dialing is required to work. An encrypted device does not have to be decrypted for 911 dialing to work, etc. Perhaps to ensure that the strict requirements are met, 911 dialing is handled directly by the telephony chipset. A mobile platform has little control over how 911 dialing works.

So, my testing plan wouldn't work. I would be forced to call 911. The real emergency number. Repeatedly. Now that was a scary thought. I had called 911 only once before that, for a true emergency. I wasn't looking forward to calling the emergency operators. When calling emergency operators, it is inadvisable to hang up immediately. This is for your own safety: you could be in a life-threatening situation. So 911 operators usually call you back or route the police to your location.

I developed a script that I would read out. The basic idea is to convey the following ideas as quickly as possible:
  1. It is not an emergency.
  2. You are an engineer testing stuff.
  3. This is your job, a routine matter for you.
  4. You are happy to be placed on hold.
The last part is important. 911 operators handle life-threatening emergencies all day and all night. They need to prioritize the events and dispatch them as quickly as possible. You want them to put you at the bottom of their priority list.

Here was my full script, which I now know by heart:
Hello, this is not an emergency. I am an engineer working at <company> testing out 911 functionality. Please tell me when to hang up.
While it is only three sentences, I am proud of my writing. The script conveys all the important points. It eliminates words, saving time. Instead of saying "Please let me know when it is safe to hang up", I chose a much more bland "Please tell me when to hang up." It avoids the tricky word safe, which could be misinterpreted to mean that I am in an unsafe situation. It introduces tell me to convey that I am at leisure to be instructed by the operator. Said in a calm and mechanical voice, that script accurately conveys my low rank in their priority list and my very routine intent. It lets the operator know that I am completely safe, and awaiting their instruction. I debated whether I should waste time with a Hello. Saying hello makes the conversation calm and highlights the lack of emergency. Removing it saves a second. After some thought, I kept it.

Somewhere around my second sentence, the operator would cut in and speak, "Please hold" and put me on hold.

There was no wait music.

I don't remember how long I waited, it was well over ten minutes on most calls. It was rare for me to finish all three sentences. On exactly one occasion, the operator listened to my entire script, and then said, "What do we do now?" I replied, "That's it. Please let me know when I can hang up." The operator allowed me to hang up, and we were both done.

On most calls, I was placed on hold.  I would hold the phone very, very patiently. I couldn't hang up, and I couldn't get distracted with something else. In addition, my phone had to stay charging because running out of battery would hang up the call. I couldn't attend a meeting or talk to a colleague. I couldn't go to the bathroom to relieve the stress of calling 911. On my first few calls I was tense. I was worried that I would do the wrong thing and cops would storm into my office building. Luckily, I didn't mess up. After calling them over a dozen times, these calls became routine. The stress involved with calling 911 for testing never went away though.

The operators were always calm and professional. They have to quickly evaluate the emergency of each call, determine the appropriate course of action, and move on to the next call. They don't have time to smile. They don't have time for pleasantries. During the testing, I developed great respect for their capacity. It must be a frustrating and stressful job: dealing with one difficult situation after another. Yet, they were calm, professional, and direct.

After I was off hold, the operator would sometimes quiz me on the nature of my testing. Sometimes they would ask what else was required of them. I was only testing outbound 911 dialing, so I required nothing else. After a polite and serious "thank you", I would hang up. I don't recall the operators ever thanking me or saying bye-bye. Like I said: no time for pleasantries.

My office-mates would perk up when they heard me call 911. It was a serious matter for everyone. Frankly, they were glad it was me making the calls and not them! For my part, I tried making the calls when the office was quiet and empty.

During the development of my feature, I called 911 frequently. I have lost count of how many calls I made. When the feature was done, I was glad to be done with 911 testing. It is one part of my software development I won't miss.


Qt Creator: a superb IDE for Linux

I learned programming in school with an ancient IDE: Turbo C++. I never got over the idea: the command-line is great for productivity, but there are times when you just want to explore. An IDE feels just right for such recreation. You can poke around and learn the environment. I developed an itch to test out a C/C++ IDE a few weeks ago.

Many people recommend Microsoft Visual Studio Express, and there is a free version for Windows XP. I spend most of my time on Linux machines so it would be a lot more useful to develop for Linux. In addition, my Windows XP machine is anemic compared to my Linux desktop. So I began looking for a good contemporary Linux IDE. Anjuta and QT creator both get good reviews. Anjuta was built for Gnome development, while QT creator focuses on the Qt toolkit. I am unfamiliar with Qt and have wanted to explore it, so I tried QT creator.

...and I found that QT creator is impressive! You can navigate to their web page or their Wikipedia entry to learn more. In short, it is a one-stop shop for project development, debugging, inspection. They have detailed tutorials through which you can learn the Qt toolkit. You can debug right from the IDE, inspect variables, set breakpoints.

My favorite feature is the integrated assembly debugging. You can get the disassembled output and step over an instruction at a time. You can view registers and it will highlight the ones that have changed after each line gets executed. This is a great way to learn assembly. The code is interspersed with assembly instructions. Even comments are included in the disassembly so you can find your way around. Now I wonder if we could install Qt creator on a Raspberry pi and use it to learn ARM assembly directly on the device. Here is a screenshot of the assembly output on the left and C++ source on the right. Pop quiz: what's my architecture?



Good C++ programmers understand what is going on under the hood. The innocuous line " : QWidget(parent)" produces a lot of assembly above because the child class (AddressBook) is initializing its parent (QWidget). Looking at the generated assembly code, you can learn the innards of C++, in addition to learning about your architecture. There are many books on 32 bit Intel assembly but few on 64-bit Intel assembly. So poking at toy examples is a great way to learn how something is implemented.

Qt creator integrates with good source control tools like git, subversion, ... And it integrates with memory analysis tools like valgrind.

This is an amazing tool, highly recommended for casual C++ hacking. Here's the full screenshot. You can click on it to expand the image.



Image courtesy: me.

Tuesday, December 17, 2013

Article about how children perceive pain

This is a brilliant article about how children perceive pain, and how to reduce their anxiety around a specific task. It is from a doctor who needs to address anxiety on a daily basis. From the article, it sounds like he has a great hold of the issue.

I won't paraphrase the article because the real article is much more valuable than isolated soundbites. It is a great read for parents: many difficult spots in parenting revolve around reducing anxiety and establishing rapport.

I am glad I am not a doctor in such a difficult role. I am also a little jealous about how much Dr. Baruch Krauss has gained from his experience. Luckily he can share his wisdom.

Sunday, December 08, 2013

A fun programming book: Land of Lisp

Do you want to read a fun programming book? Grab a copy of Land of Lisp.  Still undecided? Read on.


The recent explosion in programming languages and platforms has led to a similar explosion in books about programming. You can get a dozen books on each of a dozen popular languages: C++, Java, Python, PERL, Ruby, Scala, Haskellapackman.  There is a large variety of books, but I feel all of them miss out an essential ingredient.


None of them are any fun.

Remember fun? When you popped open an arcane book with funny cartoons and typed out a program filled with cryptic letters? And if you were right, the game worked!  You could change the source to see what happened.  That was truly fun: experimentation without an objective. You could imagine a wide expanse of possibility: there was so much a computer could do. Sometimes you typed hundreds of lines, and nothing worked. But that was fun too, in its own frustrating way. Sometimes you figured out how to make it work and felt very good about yourself.

Fast forward twenty years and modern computer programming is a mindless drudgery. Books are all about the techniques: how to combine five libraries to produce an XML parser. How to combine visual elements to make an application for a bank. None of these books would inspire anyone to learn a new language. They are all about how to get specific skills. Boring and dry, these books are made so a career software engineer can learn the buzzwords and stay employed for a few more months.

Learn <language> in 20 days: data types, branches, functions, objects, network programming, advanced techniques. That describes half of the books I see in bookshops.


So amidst this very boring scene I stumbled on The Land of Lisp. This book could be about an arcane and completely useless language and it would still be a lot of fun!  The book revolves around writing games in LISP.  Unlike old books containing BASIC code, the LISP code in this book is well explained and motivated. You can see why the author writes a specific function one way. Little functions are presented highlighting what their purpose is. You are told how to get CLISP and run code inside it. The games are fun! And there are cartoons.

Funny cartoons.
In a programming book about LISP. Hell just froze over.

This book gets you to enjoy programming. It could be written for Java or C++, and it would still be a lot of fun. Because programming, like any other hobby, is a heck of a lot of fun.  You could be a dentist and write code for fun. Isn't that a crazy thought?

To be fair, this book won't work for children. It is quite a detailed look into LISP, and requires a lot of motivation to get through. Children might enjoy looking at the cartoons (my kid certainly does) but they might not understand the intricacies (my kid certainly doesn't). It is like Calvin and Hobbes: a child will enjoy it but not understand a word.


For younger kids, a simpler book would be welcome. I'd love to see more books written in this style.  Let's make programming fun, and kids will learn it without any further incentive. A similar book on BASIC or Python might just work for young children. Yes, BASIC, that language nobody uses because grandpa won't stop talking about it. Well, that ancient language is still a lot of fun for children because children don't care about infix versus prefix, or cyclomatic complexity. They care about doing cool things with a computer. Children want to have fun while playing with their computer.


And while we are hoping, let's see more books like this for adults. I'm waiting for a book on Android programming or C++ that makes it fun!

(Image courtesy: Land of Lisp website)

Saturday, December 07, 2013

Simple program for a two year old child

I had blogged earlier about a program for a one year old.

Since then, my child has started identifying alphabets and has great fun hammering keys on his keyboard to produce letters. He has also started identifying numbers and lower case alphabets. Finally, he has strong preference on the color of the alphabets and the background.

So I present an update for my program, now for two year olds!

The basic structure is the same: it is a full screen GTK program that shows a number or alphabets. A number is shown in the middle of the screen. Alphabets are shown in both upper case and lower case. Finally, stars (an asterisk) is a recent favourite, so I allow typing that one special character. A brown bar at the bottom fills up as sleep-time approaches. This was useful in making the child aware of time: as the bar filled up, night time was approaching.

The full program is presented below.


#!/usr/bin/python

import datetime, gtk, string, pango

class BigChar():
    """ Create a Gtk window for a single giant textview that accepts all keyboard input. """
    def on_key_press(self, widget, data=None):
        """ Intercept all keypress events and show ascii
            characters. This requires the CAPS_LOCK to be off.  We
            don't intercept CAPS NUM or SCROLL lock, probably
            should."""
        # Start out by setting the current time
        self.set_time()
        ascii_value = data.keyval
        # Print the keycode received
        print ascii_value
        changedText = False
        # Lowercase alphabet should be shown as uppercase chars.
        if (ascii_value >= 97 and ascii_value <= 122):
            self.textBuffer.set_text(string.ascii_uppercase[ascii_value-97] + " "
                                     + string.ascii_lowercase[ascii_value-97])
            changedText = True
        # Uppercase alphabet should be shown as uppercase chars.
        if (ascii_value >= 65 and ascii_value <= 90):
            self.textBuffer.set_text(string.ascii_uppercase[ascii_value-65] + " "
                                     + string.ascii_lowercase[ascii_value-65])
            changedText = True
        # Numbers
        if (ascii_value >= 48 and ascii_value <= 57):
            self.textBuffer.set_text("%d" % (ascii_value - 48))
            changedText = True
        if (ascii_value >= 65456 and ascii_value <= 65466):
            self.textBuffer.set_text("%d" % (ascii_value - 65456))
            changedText = True
        if (ascii_value == 65450):
            self.textBuffer.set_text("*")
            changedText = True
        if (changedText):
            start = self.textBuffer.get_start_iter()
            end = self.textBuffer.get_end_iter()
            self.textBuffer.apply_tag_by_name("real_big", start, end)


    def realize_handler(self, widget):
        pixmap = gtk.gdk.Pixmap(None, 1, 1, 1)
        color = gtk.gdk.Color()
        cursor = gtk.gdk.Cursor(pixmap, pixmap, color, color, 0, 0)
        widget.window.set_cursor(cursor)

    def set_time(self):
        """Set the progress indicator to the current time.  The idea
        is to show time in a horizontal access with the morning being
        near the left edge and night being near the right edge."""
        current_time = datetime.datetime.now()
        # Total hours past since 6am
        # (Assume Dev wakes up at 6am)
        minutes_past = (current_time.hour - 6) * 60.0 + current_time.minute
        # Minutes are capped at 8am, which is when Dev goes to
        # bed. Expressed as minutes after 6am
        day_end = ((20 - 6) * 60.0)
        if (minutes_past < day_end):
            fraction = minutes_past / day_end
        else:
            fraction = 1.0
        self.progress.set_fraction(fraction)

    def __init__(self):
        """ Create a window with a single giant text view. Disables all chrome.
        """
        # Foreground and background color are read from here.
        background_color = "black"
        foreground_color = "#1133ff"

        self.w = gtk.Window(gtk.WINDOW_TOPLEVEL)
        # No border
        self.w.set_border_width(0)
        # Take over the entire screen
        self.w.fullscreen()

        # Connect the callback on_key_press to the signal key_press.
        self.w.connect("key_press_event", self.on_key_press)
        # self.w.connect("realize", self.realize_handler)
        # Make the widget aware of the signal to catch.
        self.w.set_events(gtk.gdk.KEY_PRESS_MASK)

        # Add a text view to show the key pressed
        textView = gtk.TextView()
        # Disable a cursor in the text view.
        textView.set_editable(False)
        textView.set_can_focus(False)
        # Show the single character in the middle
        textView.set_justification(gtk.JUSTIFY_CENTER)
        # This is the place we will write the character to
        self.textBuffer = textView.get_buffer()
        # Make the text view huge and bold
        fontdesc = pango.FontDescription("monospace bold 400")
        textView.modify_font(fontdesc)

        # Creates a tag that is applied to the text every time
        tag = self.textBuffer.create_tag(
            "real_big", background=background_color, foreground=foreground_color)
        # The progress bar shows the current proportion of awake-time for a child.
        self.progress = gtk.ProgressBar()
        self.set_time()

        
        # Make the text view take the entire window
        vbox = gtk.VBox(homogeneous=False, spacing=0)
        color = gtk.gdk.color_parse(background_color)
        self.progress.modify_bg(gtk.STATE_NORMAL, color)
        self.progress.modify_fg(gtk.STATE_NORMAL, color)
        textView.modify_base(gtk.STATE_NORMAL, color)

        vbox.pack_start(textView, expand=True, fill=False)
        vbox.pack_start(self.progress, expand=True, fill=True)

        self.w.modify_bg(gtk.STATE_NORMAL, color)
        self.w.add(vbox)

    def show(self):
        """ Show the window"""
        self.w.show_all()
        # gdkWindow = self.textView.get_window(gtk.TEXT_WINDOW_WIDGET)
        # display = self.textView.get_display()
        # cursor = gtk.gdk.Cursor(display, gtk.gdk.BLANK_CURSOR)
        # gdkWindow.set_cursor(cursor)


if __name__ == '__main__':
    # Create a bigchar window, and show it.
    bigchar = BigChar()
    bigchar.show()
    gtk.main()

Wednesday, November 27, 2013

Poor contrast websites: how to lose your users

The golden rule in designing interfaces is to think of the user. Consider what task they are trying to accomplish, and make that task easy to do. Every bit of good advice derives from that simple rule. This is why we make websites fast, because users want to accomplish their task quickly. This is why we make the most common actions stand out, to ease the user's job. Many books have been written about usable design and how best to serve the user.

Yet, there is a growing trend towards websites that are superficially gorgeous but are difficult to use. The biggest pain point is the lack of contrast. Many common mobile applications and websites are awash in a sea of grey. Readability is sacrificed to make the page look good from a distance.

A quick word about my setup.  I have two monitors: a 22" LCD monitor and a 27" LCD monitor (in portrait mode) at home. I have 20-20 vision. These observations are true when carried out on my work monitor as well. My work monitor is more expensive and newer than my home monitors. Screenshots don't capture the image I see. So I have photographs of the screen with a digital SLR camera with a fast lens.

On to the examples.

This is from Gitorious, a website that holds source code. Reading the source code is the entire reason for that web page. This is the page with the Makefile. Utterly and completely unreadable.


The 27" display is better at displaying the same text. But even here, the text is nearly impossible to read. Also, I noticed a yellow highlight that was invisible on the 22" display. In either case, this website is completely unusable on my displays since I can only read with eye strain.

Github is next. The github page of this project is only marginally better. The text is light blue and light grey against a background of grey. A truly nauseating sight after a few minutes. Again, the entire reason for this page is so the user can read the directory structure and navigate the project.  The main content is pretty bad, but the various widgets on the top: number of commits, number of branches is even harder to read.


Apple used to be a herald of good design. This has changed in favour of catchy and beautiful, at the expense of readability. On my monitor, many pages are completely unreadable. Here is an image of the bottom of the iPad product page. The page shows the same color scheme as github: light blue or light grey text set against a light grey background. In addition, the fonts are too thin to be readable even with good contrast.



Google Plus has the same issues. Here is the best contrast on the site: the side bar which shows the navigation drawer. The chat pane on the right has even worse contrast. Even the navigation drawer is quite difficult to read.

Google Store, the devices section. The contrast on the site is comically bad. Look at the unreadable text in the white boxes. The bottom bar: "Treat yourself to a..." is slightly better because the text size is huge.



To summarize:
  1. Your users have worse monitors than you. High gamut designer displays costing thousands of dollars are a rarity. The screen becomes even harder to view when you add external factors to this: viewing angle, ambient lighting, type of display (CRT vs. LCD), age of display.
  2. Your users have worse eyes than you. These photographs were taken with a reasonable SLR camera and I have perfect vision. Your users are spread across the spectrum of perfect vision and complete blindness.
  3. Your users have lower patience than you. The competitor is just a click away.

Here is one example of a good website. This is Microsoft's product page for the Xbox one. Beautifully readable: good contrast, big legible fonts.


Contrast Rebellion is a website that raises awareness about poor contrast. Here is a website that raises the same issue with more humor.

Sunday, November 24, 2013

Flight Log: 23 November

Somewhere near Germany, June 1942. Two pilots take off from an aircraft carrier in hostile skies. Co-pilot's logs.

10:00am: Seated in our aircraft. Pilot and co-pilot strapped in. Equipment check, surfaces check. Pilot instructs co-pilot to turn on the propeller.

10:02: Pilot confirms that the propeller works. Instructs co-pilot to turn it off. Then instructs the co-pilot to turn it on.

10:04: After two minutes of turning the propeller on and off, the pilot wants to stop flying. Co-pilot convinces pilot to stay and take off.

10:06: Ground control yells at us to: "Stop picking our noses and clear the flight line". Pilot chooses to control throttle. Co-pilot controls direction. Flaps down, thrust to full, chocks off. Flight takes off.

10:10: Pilot instructs co-pilot to turn off the propeller. Co-pilot tells pilot this is a dull move. Pilot not convinced.

10:15: Ground control alerts of threats approaching from the South-West. Co-pilot turns towards the threat.

10:15: Pilot doesn't want to tangle.
Co-pilot asks the pilot if pilot is scared: "No"
Are there threats?: "Yes"
Do you want to tangle?: "No"

10:16: Co-pilot continues towards threat, gaining altitude in preparation.

10:18: Co-pilot convinces pilot that we must face the threat. Pilot discovers the trigger button and carefully shoots a few hundred rounds into empty air.

10:20: Contact: Co-pilot spots four BF-109s flying 2km below at roughly 300kmph. Pilot continues to shoot recklessly, alerting the threat of our presence.

10:20: Co-pilot swings behind #2, shooting it. Pilot wildly moves thrust between idle and full, enjoying the thrust lever. We pass #1, and shoot down left wing. We swing around, shooting #3 bandit's rudder and #4's left wing. All four bandits neutralized. Flight turns towards carrier.

10:30: Flight gracefully approaches the carrier despite the pilot still wildly shifting thrust. Pilot instructed to sit still in preparation of landing. Co-pilot takes control of direction and thrust.

10:31: Flight lands safely. Pilot reminds co-pilot to put chocks on. Pilot jumps off the plane to get a kiss from mama seated nearby and co-pilot papa!

Another successful mission.

Friday, November 08, 2013

Addressing fear in children

I'm a pragmatic father. There are things people should be scared of: chainsaws, power sockets and cars driving past at 60mph while you are walking. And then there are things that are just not scary: strangers, superstitious mumbo-jumbo, and bugs.

So I was a bit surprised when Dev showed signs of a fear of  the dark. He wanted me to read in the kitchen rather than the living room. My wife suspected that the living room had a large window, which was dark. The recent Daylight Savings Time change made early evenings darker than a week ago. Even at 6pm, it was dark outside. Thankfully, my son can identify whether some thing bothers him, and I asked him if the dark was bothering him or if he was scared of it. He said that he was scared of the dark, and said it while staring at the dark window, shrinking back from it. No time like the present: we decided to tackle the issue right then.

First, we had a talk about it. I held him and told him that there was nothing scary about the dark, and that lots of beautiful things are visible at night: the Moon, stars, street-lights. We looked outside and asserted that there really wasn't anything scary there, and that he was safe in my arms. We both looked to see if there was anything particularly strange as we looked out of the window. Neither of us found anything.

Then, I asked him if we should step outside for a peek. He was hesitant, but he agreed. So we put on jackets and shoes and stepped out. Initially, my son clutched my hand tight. He was walking close by, he was subdued and quiet. We listed all the beautiful things about the night as we passed by them. We walked by some shrubs which were beautifully lit by street lighting. We walked by some decorative lighting in people's homes. Then we reached a prominent road. At this point, my son and I continued walking alongside the road, on the pavement. We saw some traffic lights, which were brightly visible from a distance away, we looked at road signs. After two intersections, we walked back.

On the way back, my son asked me to stop holding his hand. He was secure enough and holding my hand is uncomfortable for long walks. Then, he started singing in a  happy and loud voice. He sang all the way back home.  The only reason he wanted to enter the house was to tell mommy about our peek outside.


Parenting is about giving the child the right tools to survive as an adult. Feeding myths and falsehoods about the world are a terrible disservice to a curious child: stories about evil creatures in the night to get the child to stay silent, or stories made to get the child to eat. These stories are far from harmless. Fears grip their mind and children embellish their own fears with stories and falsehoods. Not starting myths and falsehoods is a start, and it is even better to address myths and irrational fears and reveal them as false nonsense.

Children are more capable than we give them credit for.


(Image, courtesy Only HD wallpapers)

Tuesday, November 05, 2013

Welcoming a challenge

Yet another difficult evening.

A few months ago, I would get my son to bed. It was so easy: he expected daddy to tell him a story, and then lie down next to him. And then I stopped doing it for a while and just as easily, his habits changed. Today I had to get him to bed because my wife was busy.

So we start at the appointed hour, and he follows along. He is glad that daddy is with him. We brush his teeth, he hears a story. He is having a great time: smiling and laughing. Things look great.

Then we walk to the bedroom, and all hell breaks loose. He remembers that mommy does this step, and today mommy isn't nearby. It starts: crying, misery, unhappiness, feeling of missing mommy.

I could tell you how I fixed it, but that is not the important part. The important part is that we stuck it together. We trusted each other, and neither forced the other. In the end, he asked me to get him to sleep. He went to sleep happy. And we cemented our bond as father and son.


A few days ago, I wrote about parenting being difficult. Sometimes parenting requires a mental shift. The shift is to realize that difficult times are opportunities. And perhaps tantrums are parents' fault as much as the child's. And that misery and unhappiness have a root cause, which should be addressed with love and affection.

Children don't lack discipline: they act according to the rules that they perceive. Saying that "a child is misbehaving" misses the real story. The child is behaving in conformance to previous rules. Either the previous rules are wrong, or you haven't told the child that their behavior was incorrect. A difficult time is an ideal situation to identify and resolve such issues.

A healthy attitude is to expect the worst, with open arms. How bad can things get? At the least, you will learn about your child and gain some experience.

(Image, courtesy Dad Centric)

Monday, November 04, 2013

Games with in-app purchases are not fun

I dislike computer games that allow you to purchase additional content inside the game. Read on if you'd like to find why.

Many years ago, computer games started out in arcade machines: their purpose was to keep you feeding all your coins to them. Some of the games were devilishly hard. You couldn't save your progress, and perfection required a lot of money. Many children got good at them after hours of practice and having squandered a great deal of cash. I never got to play many coin-operated games: the games were frustrating, my patience and skill never improved, and my parents saw that it was a waste of cash.

Then, computers and game consoles became cheap enough for families to own. Games that exclusively ran on computers or game consoles didn't need to prod you to put more cash in the machine. You bought the game in a store for a reasonable sum of money. You could play it as frequently as you wanted. You could save your game and resume from a level. If you took good care of the game media, it lasted you many years. So a single floppy, CD, or cartridge could be used for many hours of gaming. Sometimes you loved the game, played it till your fingers were sore, and got really good at the game. Then you told all your friends about it. Or you got bored, got frustrated, tossed the game in the closet and forgot all about it.  Companies that made boring games couldn't sell their second game. In this model, the interests of the consumer were aligned with that of the game developers: fun games produced more enjoyment for users and that rewarded the game developers.

The best games from this generation were fun to play. Adventure games like Monkey Island were funny, and you identified with the quirky personalities of the characters.  Car racing games like Need for Speed were challenging, you believed that you were driving a Lamborghini. You could drive a police car and chase down speeding racers. I was blown away when I saw Indycar Racing on a friend's computer. I didn't expect games to be this good: you could record the race, and view it from different angles. Game developers had fresh ideas, and they focused on improving the game experience. People remembered which companies made fun games: ID software, Broderbund, Lucas Arts, ... Just the Broderbund logo on the screen would make me smile: they knew how to make fun games! Just seeing that logo for a new game was a promising start: it was probably going to be fun.

The latest trend is mobile gaming. Games are very cheap: sometimes even free. You can download the game and play the first level or the first few levels. It all sounds great! So you download a new car racing game for the low price of $3. The first level is gorgeous: it has stunning graphics, and you are given a slow car. But hey, who cares, right? This game is cheap! You play the tutorial race, and it is so much fun! You come in dead last. No problem, you just got this game. So you play a bit more, and you keep doing a little better.  You might even win a race or two. Then, you hit a wall. No matter how hard you try, you can't unlock good cars anymore. You cannot get additional levels unlocked unless you put in hours of repetitive grind playing the old levels. Why can't you just drive the Lamborghini that is shown on the screenshot? Because it requires 65,000 credits, and wining races only gets you 300 credits. You need to win hundreds of races to get a half-decent car. Or you could play the same five levels again and again. Suddenly, it isn't fun anymore.

The fundamental problem with in-app purchases is that fun takes a back seat to selling content. The game isn't about fun: it is about providing just enough enjoyment to keep you paying more. The game is all about giving you incentives to buy extra credits: just for this car, for that track, for an upgrade on your current car, ... You aren't enjoying yourself anymore: you are constantly chasing the next target. Games are always designed to be profitable. But now, the incentives for the user aren't aligned with the game developer anymore. In order to have fun, the user must pay large sums of money to the game developer. In a popular car racing game, there is an option to purchase all the cars in the game for $99. That is ninety-nine real American dollars. By comparison, my copy of Need for Speed 3 was purchased for $15, and it included all the cars and all the race tracks. Sure, it only had five cars, but I bought it to drive a Lamborghini, not a Ford Focus. On many new racing games, I start off with a car worse than the old family car in my garage! How is that any fun? Much like coin-operated games of my childhood, these games are designed to eat cash at the expense of player frustration.

In theory, you can get all the content if you play the game enough. But the amount of time required to unlock the content is immense: many hundreds of hours at the least. These mobile games are misleading customers in their advertising. Most users get to choose from a small set of slow cars, and three or four race tracks. The fancy cars and fancy racetracks in the screenshots are a mirage.

Now I follow a simple rule: I don't buy games with in-app purchases.

(Image, courtesy Wikipedia)

Friday, October 18, 2013

Utter cuteness: being introduced by your son

Today, I was at my office with my son. On the way to my desk, we met a person that Dev knew. Let's call her Jill.

Jill: "Hello!"
Son:  "Hello. Do you remember papa?"
I translated this out, since his baby diction is hard to follow.

Then my son points to me and says, "This is the papa!"


It is a great feeling to have your son introduce you to your friends. A friend of ours had told us about his daughter doing something similar, which I found hilarious. Seeing it in person, it was even more memorable.


Wednesday, October 16, 2013

Funny stuff children say

"Eric Clapton, could you please sing the 'Crawling up a hill' song again..."
(After hearing the song for the first time)

Mother: How do you mend a broken heart?
"With some tape... and a hot glue gun."

"Is that a baby crying?"
(When listening to a jazz solo)


Monday, October 14, 2013

The most difficult thing to do

Parenting is difficult. Yet, it is the most rewarding thing to do.

People find it strange that parents will talk for hours about how difficult it is. And then, they will end by saying it is the most rewarding thing they have ever done! Yet, if you think about it, difficult tasks are the most rewarding. Nobody wants to play simple games after they have mastered them. The fun is always in pushing your limits, in learning something new. In mastering a skill for the first time. Doing the same thing repeatedly bores us; a challenge keeps us going. Something just past our reach, something we can excel at if we just try!

Parenting pushes your limits of capability. You sleep lesser, you work harder, you get more tolerant and more patient, and you realize how much free time you used to have. Many parents spend their limited time more fruitfully than they previously did.

And what is true of parenting is even more true of parenting a sick child. When your child falls ill, it tests your patience, your communication with your spouse, and the child's trust in you. Any fool can take care of a happy and well child. Handling illness well separates good parents from bad. I never look forward to illness, but there's always something good that comes out of it. Young children are naturally much closer to the mother. However, every bout of illness brings my son closer to me. We spend a lot of time together, and get to understand each other better. He trusts me a bit more, and gets comforted by me. For a short period after the troubled time, both mommy and daddy are equally favored.

Parenting is all about tough times. When my son was very young, his favorite toy fell from his hands and shattered. For a while after that he was in a state of shock. I told him that this was normal, that toys broke and that daddy would make sure to get him a toy just like the broken one. I also told him that sadness was normal, because it was his favorite toy. For months after that, he repeated the same words to me. When we were together, he would relive that moment: he spoke of how his toy fell, how sad he was, and how I comforted him.
I could just as easily have blown it. I could have been angry, I could have yelled at him for being careless. And just like that, I would have lost his respect. He was already forlorn. He was aware of his mistake. What he needed was comfort and strength.
A few months later, when he faced another tough situation, I was amazed that he repeated the same words. He talked about how it was difficult, how he was sad, and how the situation would improve.

Parenting is all about "keeping your head about you" in dire times.


Saturday, August 17, 2013

Two videos

Provided here without commentary:


Saturday, August 10, 2013

Travelling with children

It can be incredibly difficult to travel with children. They are keen to see a new place, but they also miss their things. They will ask for the toys you forgot to bring with you. They will miss home, they will miss home food. And yet, they want to be outdoors all the time, seeing new things.

Our failure was sleep. We were reeling from a few nights of poor sleep and uncertain sleep schedules. On most days, my son slept late, even as late as 3am.  We just didn't know how to get him calm, and his usual signs of sleepiness were not working anymore.

Last night he slept at 8pm in a baby carrier, but wasn't in deep sleep. To make matters worse, he woke up at 10am. We tried to get him to sleep in a baby carrier, but he wasn't calm enough. After two hours of walking outdoors at night, I was beginning to get tired and sleepy.

Me: Dev, are you not sleepy?
Dev: No. Want to play.

Me: Dev, did you try to sleep?
Dev: Yes.

(And that's true, he sincerely tried to sleep. He closed his eyes and was calm.)

Me: Dev, you know, papa is getting very tired. And he is getting a little angry too.
Dev: Dev is a little baby.


That last part broke my heart. I tried to be extra kind to him till he finally slept.

Wednesday, July 31, 2013

MSP430 Serial communication with LInux

In addition to hacking on Arduino, I am interested in other hobbyist microcontroller boards. One of the more promising ones is the MSP430 Launchpad by Texas Instruments. It is a tiny kit with interchangeable microcontrollers, and it runs great on Linux with an IDE called Energia.  Energia is a fork of the Arduino IDE so it should be familiar to most microcontroller hackers.

One downside to the Launchpad is that serial communication for the board don't work on Linux. The problem seems to be that the USB-serial emulation on the launchpad has a bug.  A person on the forums found that the Launchpad device is requesting a disconnect shortly after connecting. Gerald Stanje has an updated cdc-acm kernel module that ignores these disconnects.  That option works in case you don't mind installing a new kernel module. Also, remember to use the normal cdc-acm kernel when using devices other than the Launchpad.

External USB-serial device

A second solution is to purchase an external USB-serial translation device. There is a glut of cheap USB-serial converters available on online sites. Here is one such device based on the PL2303 chipset that costs less than $3, including shipping. If you buy such a device, you can bypass the USB-serial translation on the launchpad and use the PL2303 (or FTDI) based chip.

To use this method, disconnect the jumpers RXD and TXD jumpers that cross the Emulation - MSP-EXP430 line. Then, connect the lines as follows:

  1. GND on USB device to GND on Launchpad
  2. TXD on the USB device to RXD on the Launchpad
  3. RXD on the USB device to TXD on the Launchpad
  4. 5v on the USB device to a solder pad TP1 on the Launchpad near the Launchpad USB connector. This will power on the entire Launchpad device.
Using this, you should be able to communicate with the launchpad. To program it, connect the USB connector to your desktop as before.

This method doesn't require a new kernel module. In addition, this method works with any microcontroller board that can do serial communication: either through hardware UARTs, or through software.

Sunday, July 28, 2013

Tip: External editor for Arduino

I love Arduino: it is the perfect microcontroller platform. It is easy to program on Linux, cheaply available, there is a library for most anything you can think of. And the community is great for when you get stuck.

My only grudge: The Arduino editor doesn't match up to Emacs.

Yes, the IDE is great, but for large programs I find myself yearning for a C mode, proper indenting, incremental search, buffers. You know, a real editor.

Makefile for Arduino

So I experimented with using Emacs and compiling from the console. After experimenting with a few Makefiles, OpenXC works great for me. Clone their project, and set up environment variables according to your setup. I had to change exactly zero variables for their examples to work out of the box on Ubuntu. The Makefile is well documented. You can upload the program to an arduino by doing 'make upload'. This works with simple sketches and for doing everything through a shell script or cron.

It has limitations. It won't do pre-processing: so it will claim that methods or data structures are not defined. It won't work with multiple .ino files. Also, the list of boards is limited, and it doesn't have an easy way to specify Arduino Mini with 8Mhz, which is the device I'm currently hacking on.

External editor for Arduino

Navigate to:
File -> Preferences -> Use external editor.

This should gray out your editor window. Now, your Arduino IDE is only for compiling, uploading, and for the serial monitor, which it excels at. To save screen real estate, you can make the window short, though it wants to be a minimum height. Now edit it in your favorite editor.

When you are ready to compile, switch to Arduino (Alt-Tab), and then compile (Ctrl-R) or upload (Ctrl-U).

I'm waiting for Arduino to tie in with inotify on Linux and automatically compile when the code changes.  But in a pinch, this workflow gets over most of the annoyances of the Arduino IDE while retaining most of its advantages.

Makefile + External Editor

The best approach might be to combine the two above. Switch to an external editor in Arduino, and use a Makefile for automated builds on the command-line. The automated builds on a console will quickly let you know if your incremental edits introduced a compilation bug. And when you want to upload it to your boards, switch over to Arduino IDE.

Saturday, July 27, 2013

The joys of parenting: #1

This morning, walking with my son. We saw some people jogging.

Me: What are these people doing?
Son: (with characteristic enthusiasm) They are all running!
Me: Where are they going?
Son: They are going to papa office!
Me: Why are they running?
Son: <thinks for a minute>
Son: Because they are out of bicycles!

According to my son, everyone is going to my office all the time. Since I bicycle to work, to him everyone bicycles to work. And anyone bicycling is going to my office.


In the evening, we were using a rotary cutter for the first time. My son was watching from inside the house through large windows as I was using the rotary cutter outside. The sound was a loud grinding noise, which is his favorite sound. But the rotary cutter is more shrill than the other appliances, so I saw him back away from the window slowly.  I stopped the cutter, and looked inside.

Me: Are you ok?
Son: Yes.
Me: Are you scared?
Son: No-o.
Me: Are you happy?
Son: (after some hesitation) Yes.
 Then he makes the sign for happy.

But I can tell he is a bit shaken, so I take off my protective gear and go inside.

Me: Were you scared?
Son: No-o.
Me: Were you a little bit scared?
Son: (hugs me warmly) Yes.

I love parenting.

Monday, July 22, 2013

SoundSleep source code

A while ago, I had developed an application to continuously play music on my phone.  The program is called Sound Sleep and is available for free on the Android store. I use this application every night to play sleep-time music for my child.

I have now put the source code to Sound Sleep online. The entire Android source code for Sound Sleep is available at Github under the Apache License version 2.

To clone the entire repository:
$ git clone https://github.com/youngelf/sound-sleep.git

This source is great for learning how to program with Android. It demonstrates:
  1. Running on a wide variety of Android devices.  The minimum SDK version is 3, and I use this on an ancient phone with Android 1.6
  2. Using SD card storage to read music
  3. Setting up a new service and communicating with it using Local Broadcasts
  4. Playing music from Android applications

I'm happy to accept patches and suggestions. I have used it daily since March, and it has been rock solid and indispensable.  It has exactly the feature-set I need. Here is a screenshot of the application.  There are two controls: the top half plays music randomly from SDCARD/music/sleeping. The bottom half plays white noise.

Thursday, July 11, 2013

Hacking with your child

Kids want to be involved in adult activities.  This is so fortunate!  My son has started taking interest in my microcontroller devices.  If I could involve him in building some circuits, I get more time to play with electronics. As a bonus, this would give my wife some free time and distract my son from his usual business of hiding valuables and destroying property.

So we set out to build a simple circuit: we chose a blinking lights circuit.  The core of the circuit is the NE 555 chip in astable mode: with a single LED blinking. If you want to do this, follow along. The point of this post is not what circuit to build, rather it is how to build this circuit to keep the interest of a very young child.

Some overall guidance:

  1. Simple circuits: A friend at work suggested this idea. Select a trivial project that you can get done in no more than 15 minutes. Everything takes longer with a child, and they have shorter concentration spans. Aim to finish in 30 minutes with the child.
  2. Prepare in advance: Depending on how old your child is, you might want to prepare most of the circuit in advance. Remember, you don't want to debug things with a potentially cranky child. One trick I use is to wire everything with long wires and tall leads on the components and get it working. Once it is working, get your kid along and switch all the ugly long wires for short ones, trim the leads, and have the child put the most critical component in, which gets everything going.
  3. Involve the child: The idea is to get them to participate and get a feeling of accomplishment.
  4. Avoid theory: At this age, the child is too young to understand what a resister does. Get them to love the process.
  5. Light-based circuits: Light-based circuits work well. Sound-based circuits get annoying for parents.
  6. Real pieces: The more this looks like a real grown-up thing, the more some kids will be interested. Avoid tacky childish substitutes.
  7. Future hacking: Keep some room for future hacking. Extra room on the breadboard, potential to add a switch for some simple interaction. This will come in handy when the child starts to lose interest, or asks to make another circuit.



The goal: get a 2-3 year-old child to see how a circuit board is built and get the child familiar with some components.
  1. This is the circuit we built. Open the page and print it out.
  2. Obtain twice the parts: a breadboard, a 9V battery and clip, a 555 chip, a capacitor, three resisters and one LED.   You are getting twice the parts because young kids love holding on to some parts. You want a spare sets of parts both to account for loss and for a child getting very affectionate towards a 1uF capacitor.
  3. Prepare the board and make sure you know what you are doing. Your electronics chops might be weak, check if you can get the circuit working.
  4. When your child is free, motivate the idea. "Do you want to make a NEW blinky-blinky?" "Oooh, shall we make a NEW blinky-blinky?". Stress on creation, stress on the fact that you are doing it together. If the child is not interested, wait for an opportune time. Consider involving your spouse in motivating the idea: the child might be going through a mommy-phase or a daddy-phase. It could be that your child just doesn't care about circuits. Respect your child's interests.
  5. Get the child to sit down on the dining table high chair. Consider strapping the child for everyone's protection.
  6. Show the child all the components, name them. You'd be surprised what they can remember. 
  7. Start putting the components in, carefully clipping leads and wires to a precise fit. You want all the components to fit tightly on the board. With any luck, this will be your child's favorite toy for a few weeks. That means high G-forces, and being carried everywhere. You don't want to drop components all over town.
  8. If your child wants to put in components, allow it. Allow incorrect component placement. Don't chastise. Instead, gently correct the component while saying, "Hmm.  That's good, but how about we put it this way..."  Any negative words might turn your child away from this entire affair. And success here can justify that $1000 oscilloscope to your spouse. So be patient, and avoid evil thoughts.
  9. Keep an eye on your child's interest level. If they look bored, stop. Return another day.
  10. Leave the 555 IC for the very end, and perhaps get your child to put it in.
  11. Hopefully, you get the project done. Congratulations! If it helps, call the breadboard something special to enforce that something new was created: "Wow, this is a 555-blinky-blinky!"
  12. Allow your child to hold the breadboard, toss it around. Don't disapprove of rough handling. This is your child's toy, not yours.
  13. Ideas for future hacking:
    A second LED that turns on when output on pin3 is low. You'll need a pull-up resister and an LED. Try a different color if possible.
    You could add another 555 for two extra blinking LEDs. Choose a different period of oscillation.
    You could include a push-button switch to force Pin3 high to keep the LED on as long as the button is pressed.

Things you might do differently depending the age and personality of your child:
  1. Solder: I used a breadboard rather than soldering because the end-product should be non-sharp, and should be child-friendly. Depending on the age of your child, you could use this as an opportunity to teach some soldering.
  2. Explanation: If your child has more background, perhaps from electronic toys, consider explaining what the components do.


Credit: Many people at work for suggesting projects and giving guidance before I started out. You know who you are. Thanks!

Wednesday, July 10, 2013

Camera shutter control for Arduino

I'm building a remote shutter release for my Nikon DSLR. I'm using Arduino to light up an Infra-Red LED.  There are many libraries that provide the correct LED pulse for Nikon cameras. Unfortunately, they don't often work, leading to time-consuming debugging. So here is the current state of affairs when it comes to Nikon IR shutter release through Arduino.

The library that works

The Arduino Multi Camera IR control by Sebastian Setz. I have version 1-91 of the library. My current environment is Arduino 1.0 that is pre-packaged for Ubuntu (I obtained it through apt-get install). I'm using this on an x86 laptop. Currently I'm using an Arduino Mega for this, though I'll switch to an Atmega328 for the real project. The IR LED is a 940nm component I bought many years ago.

I mention this in painful detail to illustrate everything that was under suspicion when the project didn't work out. The sample code involved is trivial.  But when things don't work out, debugging can get quite involved as you check every thing methodically.

The library above is the Swiss-Army knife of shutter control. Not only does it work with Nikon, but it also works with other, lesser known brands. Minolta, Sony, Pentax, Olympus, even obscure brands like Canon.


The libraries that don't work

Von Roth's Nikon library:  I had used this in the past with one of my Arduino boards and it had worked on the first try. So this was the first library I used. I was disappointed when it didn't trigger my shutter. I thought the culprit was the IR LED, since it had sat in the bottom of a parts-box for a few years, and looked rebellious at this mistreatment.

Lady Ada's intervalometer code: Given the considerable reputation of Lady Ada, I was certain that this code would work. But I couldn't get it to work, again, leading to more unjustified suspicion heaped on the IR LED.

The debugging was fun, though only in retrospect. To test whether the LED was working, I pulled out my baby monitor and verified that the LED was indeed emitting some Infra-red. A few Arduino boards were swapped, I switched from x86_64 to x86, I switched to the old installations of Arduino.

Hope this saves you some effort.



Credits for the image and the library: Sebastian Setz

Thursday, May 23, 2013

Linux on the desktop

A common topic of discussion among geeks used to be when Linux would be successful. The tagline was "Year 2000 is the year of Linux on the Desktop". And then it was 2001, and then 2002. Seems like the year never came. Looking at the usage of operating systems, it seems that Linux has never become popular. Desktop operating system trends do suggest that Linux has gone nowhere. People are still using Windows and Mac OS.  Applications are still not written for Linux.

On the other hand: Linux is everywhere.  It is on phones and tablets. It is inside popular ebook readers.  It is on all 10 of the top 10 supercomputers. It is on routers, even cheap home routers. Your desktop might run something else, but there is a good chance there is a device in your home that runs Linux.  And you didn't even know it.

What's the point of this post?  This is not an academic discussion about operating system proliferation. There is a deeper point. Linux is everywhere because of what it enables.

Linux enables experimentation.

Linux allows a random nobody to try out something interesting to them. It might be the most crazy idea ever. But if it works, others might benefit. Everyone might benefit. Let's look at a few examples which might make this idea more concrete.


  1. A $500 router, for $50: DD-WRT is a Linux firmware for routers. It allowed you to take a cheap home wireless router and add features that made it comparable to an expensive commercial router. Now, router vendors pride themselves on whether DD-WRT runs on their router: it spurs sales.
    DD-WRT made it possible to extend the life of your router: updates are frequent and security issues are fixed. While hardware vendors focus on the next version, the "community" ensures that their devices work as well as new.
  2. Linux in your pocket: Knoppix is software designed to boot up any computer, and make it usable without writing anything to the hard disk. It started out as a boot-up CD. You popped the CD in the drive, and booted up the computer with it. You could use Linux, experiment with it, browse the web, listen to music, write some programs. All your changes were local, and lost when you powered down. Now you can write Knoppix on a thumb drive and take it with you everywhere. You can borrow a friend's computer without reading their documents. You can recover a machine where the hard drive has failed. You can try out Linux and see what you think. You can evaluate a laptop at the store.
    Knoppix is possible because it is possible for anyone to modify linux to suit their purpose. Commercial vendors have no interest in giving you a permissive license to their operating system. It hurts their revenue stream. There is no such limitation with Linux. 
  3. The educational computer: If you aren't aware of it yet, computers are now cheap enough to be disposable. Here is the poster-child, the Raspberry PI. It is a full computer that sells for $35. You connect a monitor and a keyboard/mouse and a power supply. It can boot up into Linux and allow you to use a windowing environment. It started out as an educational project, a current generation replacement to the BBC micro. A computer small and cheap enough that every child could have one and could play with. A computer to spark the imagination of the next generation.
    The raspberry PI is possible because the software is free. We used to talk about how the reduced price of computing threatens proprietary operating systems. Who will pay $100 for an operating system license when the computer itself costs $300? Well, now the computer is worth $35. Not only is it absurd to pay 3x for the software, the software itself will not support such a limited computer.  The Raspberry PI is one of the first, but there are many others in this space: BeagleBoard, PandaBoard, ... With the easy availability of mobile chipsets that integrate graphics, computing and RAM, this space is about to get a lot more exciting...
  4. Facebook makes your computer faster:  Everyone improves Linux, even companies. Facebook engineers improved the performance of hard-disks by using small, cheap Solid State Disks (SSDs). Solid state disks are more expensive than traditional (magnetic, spinning platter) disks. Instead of buying an expensive  256Gb SSD, how awesome would it be if you could buy a cheaper 16Gb SSD, and you got performance similar to the bigger disk? Since Facebook owns large datacenters and wants to improve the performance of its computers at minimal cost, their engineers wrote a Linux kernel module to do something similar. It isn't in the main Linux kernel yet, but it will get there. And this obscure kernel module will improve the performance of your computer.
Constant experimentation allows for incremental improvement.  New products emerge, and encourage creativity in others.

While it isn't in your desktop computer, chances are that Linux is on your desktop already.
Image courtesy: South Dade Linux Users Group

Wednesday, May 22, 2013

Parenting

Before I had a child, graduate school was the toughest thing I had ever done. After having a child, graduate school seems trivial.

Parenting is hard. It is relentless: you cannot take a break for a month to recharge. Sometimes, you can't even break for an hour. You have to stay engaged, it takes a lot of energy. Children have vast reserves of curiosity and energy, and they spend all their time exploring and learning. As parents, we have to give them the resources to explore, to engage with the world, and learn as much as they can before they enter it. Small mistakes must be corrected early before they become big ones. And yet, they must be corrected with a gentle voice, with love and with persuasion. All with a child who cannot fully understand you.

And everything gets harder when there are new teeth coming, or when the child falls ill.

The big lesson from parenting is there are few absolutes. There are many styles of parenting, and every child is different. From techniques on sleep-training to meal-time, to potty-training: there is a huge variety of opinion. It helps to see it as just that: opinion. While many people will try to sell their technique as the one true way, realize that their tricks might not work for you. And your trick might not work for them.  If you don't neglect your child, you are probably doing it right. I am not a perfect parent. Nobody is. Everyone starts out being judgmental of parents of poorly behaved children. And then they have kids of their own. Suddenly, others' monsters seem like real angels compared to your own.  The circle is complete...

Parenting tests a relationship like none other. It finds out just how much you love your spouse and how well you resolve conflicts. It is normal to have a conflict every hour. Good parenting requires resolving every issue right away, and giving your child the tools to resolve such a conflict.

While it is difficult, it is the most rewarding experience I have ever had. Every once in a while, your child will do something purely magical. The other day, my son ran up to me yelling, "Kiss Papa", "Kiss Papa", and warmly kissed me on the cheek. Then he ran away, pursuing his next game. Small experiences like these make parenting memorable. Yes, you are sleepless, unwashed and frequently grouchy. But one warm smile from your child, and all the tired nights are worthwhile.