Wednesday, July 16, 2014

Windows 9 will be a smashing hit!

I just spent some time with Windows 8 on a computer I purchased for a family member.  Windows 8 marks such a huge departure from Windows that you might consider either holding off a PC purchase, or just get a Mac or a Linux machine instead. Even a Mac will feel more familiar.

Some caveats before we start. I don't know all the terminology around Windows 8 (neither would any new user).  My primary Windows experience has been the Windows XP.  My primary system is Linux because I am a developer, and I use Windows really only for playing games. That said, I can claim some knowledge of computers.

My entire experience can be summed in two words: just baffling.
  1. Metro versus classic apps: this is a confusing minefield. The metro apps don't show up under Control Panel -> Programs. You can launch them only from the Metro interface, and then they take up the full screen where the UI is hilariously large. One of the applications I used was a third-party webcam application bundled with the computer. It had no close button, no menu bar, and the bottom was filled with immense Fisher-Price buttons. Luckily Alt-F4 still worked and closed the window.
    The real confusion here is that the Windows Taskbar no longer shows Metro applications. So the Task Bar doesn't show all running applications anymore. Alt-Tab moves you through Metro and classic applications, but they might as well be on two different systems. It felt like Metro apps were first-class citizens and classic was a Virtual Machine instance. In this world, why bother with the taskbar anymore?
  2. No overlapping Metro apps. Wow, and this isn't the first time that this was tried.
  3. Within minutes of using the new Start shell, I had to install Classic Start. The entire interface for launching applications is totally horrifically broken. To go into all applications, you have to press the Start button, and then click on the down arrow. Then you get an overwhelming list of every application there is, including websites like eBay.  How on earth are people supposed to navigate through this every time they start a new application?
  4. Settings -> "Search and apps" under the Metro Start shows completely different things from "Settings -> Programs" in the Control Panel in the Classic menu. Not just the names, the actual programs listed in the two is different. The Metro Settings contains programs that take 16kb: magical stuff like 'eBay' and 'Skype' which are most likely URLs. The Control Panel in the Classic menu contains the usual Windows XP items like McAfee, Windows .NET libraries. As far as I see, they have no intersection. "Search and apps" contains Metro apps, some of which are URLs and some of which are real programs. The distinction is deliciously vague, so some of them launch in Firefox, while others start an application.
  5. Screen-gestures to navigate around is retarded. There is no way I can use this on a daily basis without my right arm cramping up. Whoever came up with this probably doesn't use a PC for a living. I suspect the goal is to make it like a tablet: but a tablet use-case is so very different from a PC that they might as well be different appliances. And if you choose to use the trackpad for everything, the pointer traversal to go from one edge of the screen (charms) to the other edge of the screen (switcher) will quickly fatigue your fingers.
  6. UEFI secure boot. You can turn off secure boot to test out Knoppix or Ubuntu. But if you do, you get a prominent error message drawn on top of the bottom right of the screen. As far as I can tell, there is no way to turn off this annoyance. There is a special update to disable this watermark though.
  7. The default theme has insanely fat window borders. I looked for some sort of Classic Windows theme to make my window decorations sane again, but didn't find anything in the five minutes I spent on it. Turns our you either have to edit the registry or download a third-party application to do this.
  8. The menu bar on most Windows applications is the ribbon. Again, no way to turn this into something sane.
The entire operating system feels like a cruel joke. At many points I was amazed that this product actually shipped without someone realizing what a terrible idea this is. I suspect people used it on tablets where this works (better than Windows 7). Then they convinced themselves that PCs would be fixed in the next release and that capturing the tablet market was worth the head-shot to the PC users. The system is a Frankenstein-style collection of Chrome OS, Apple's App Store, and everyone's tablet UI bolted together on top of Windows. It feels like Windows 9 Early Preview Beta rather than Windows 8.

I predict huge adoption problems. This is Vista v2.  Microsoft has a crazy version of Intel's tick-tock cycle  where every alternate Windows is broken. The next release looks like cutting-edge engineering: Windows 95, Windows ME (dud!), XP, Vista (dud!), Windows 7, Windows 8(dud!).

Microsoft isn't alone. Canonical and Gnome tried this same story with Unity.  A team is given the mandate to do something daring, something refreshingly new and bold. They try it, and convince themselves that it works. Either external feedback is not solicited or they believe that once people spend enough time with it, they will grow to like it too. Unfortunately, the real world doesn't have an extra month to re-learn basic computer skills And the real world isn't invested in the Windows 8 outcome. If it doesn't work in the first week, it will be replaced by something that does, perhaps the previous version of the software. Perhaps the competitor's version. Forcing it down people's throat only makes them antagonistic and belligerent. I'm sure Unity is a lot better today. But Canonical's aggressive upgrade has pushed me towards XFCE and KDE.

Computers are an essential tool now.  Online discussions are filled with car-analogies, but that is not even close to reality. Most people spend an hour each day in a car, but many hours in front of a computer. Computers are as essential as your fingers.

Luckily you don't have to spend much money to get a feel for Windows 8. Just use your existing computer while wearing thick gloves.


(Broken Windows image courtesy: Wikipedia)

Monday, July 14, 2014

Game Review: Type:Rider

Want to play a fun platform game which is as enlightening as it is enjoyable? Pick up Type:Rider.


As I mentioned earlier, mainstream gaming is rehashing the same tired concepts. We don't need fifteen different World War 2 shooters made every year.  I don't have any numbers to prove it but I suspect that compared to the early days of gaming, there is less diversity in games. There are some gems, but if you look through the top titles of the past year, they are all familiar concepts.

So here is a platform game, which is a concept that has been done to death. But the main character is a set of two dots. And you move though a land of fonts, collecting alphabets and stars. For the stars that you collect, you get some information about the font that you  are currently exploring. It sounds very strange when written down like this, but it is really fun. The environments capture the mood of the time, and include the historical moment when that font was being developed. The atmosphere is brilliantly done, and the music beautifully matches the mood.

And the game mechanics change subtly. Different levels introduce new challenges. I'm past the half-way point but I haven't grown tired of anything yet. It is superb.

 Type:Rider is available for all the main platforms, including mobile. I purchased this as part of the Humble Bundle so I have tried this both on Android and PC, and I highly recommend the PC version. Games such as these require a good gamepad and touchscreen controls are not yet to the point where they are enjoyable. But that's just me, my friends have tried this on tablets and found it works great for them.

The one downside is that the game is devlishly hard towards the end, so I gave up half-way in the Pixel level. But I enjoyed the majority of the program and it was fun.



Image courtesy: The two dots.

Friday, July 11, 2014

Game Review: Need for Speed III Hot Pursuit

If you want to play a fun car racing and chasing game, get a copy of Need for Speed III: Hot Pursuit.  If you can find a 32-bit Windows XP machine, that is.

I've blogged earlier about being a patient consumer. You gain a lot when you play games that are old. By then the hype has died down, and the only games that survive are good games. So feast your eyes on the stellar reviews that Need For Speed III: Hot Pursuit gets on Amazon. Many of the reviews were written in the last few years. And used copies of this old game still sell for a good price.

I picked up this game as a bargain priced CD in 2003 with my room-mate, and we ended up racing in our college room. My room-mate had a game controller and was much better than me at games, so I usually lost. But the game was fun so I played it on and off since. I have tried other "Need For Speed" titles since, but they have all been sore disappointments compared to Need For Speed 3 (NFS3).

The game is just plain fun to play! You can race your car against the computer AI, or split-screen with a friend, or duel them on a TCP network. And you can be a cop and pull over racing cars and get points for that.  The graphics are pretty basic, so they load up super quick on most modern computers.  Since it is an old game, you never see annoying "Loading..." screens.  And if you know how to create an ISO image from a physical CD, you can store the entire disk on your hard-disk and load it up as virtual CD ROM drive, further speeding up access.  You get North American locations that look average: good enough while you are racing at breakneck speed and don't have time to smell the roses. You get to drive fun cars: Lamborghini, Corvette, ...

There are lots of things this game does right. The game starts with fun cars. There is no stupid career mode to artificially limit your options. In newer Need For Speed games, I am disappointed by the starter cars. They are worse than the decade-old car that I commute in. And if I put in the hours of mindless driving, then I'll be rewarded with a half-decent car. In NFS3, you start out with fast and exotic cars, and they all handle very well. There are a few bonus cars. I might have unlocked them in the past, but I don't any more. If memory serves well, the police Diablo was crazy good to drive. Oh wait a minute, let me unlock that. There, done.

In newer games, the night-time atmosphere feels nauseating and the depiction of women is demeaning. This game isn't about night-racing or crime. This game is about honest people racing in the daytime.

As a cop, you get points for apprehending racers.  This pursuit mode is great fun.  You turn your police siren on and drive like a madman to pull over the racers.  The non-racing traffic dutifully pulls over when your siren is on. Your goal is to pull over all the racers though it is tempting to race alongside them in your spiffy police vehicle.

This game is more fun than many Nintendo Wii and PC games I have played since. I haven't tried NFS3 in a virtual machine yet, but that is something I intend to do when my Windows XP machine finally dies.

I feel the game industry is chasing the wrong goals. Instead of making the games fun, we now have a focus on in-app purchases (which make the game mind-numbing) or spectacular graphics (which increase loading time). The only recent games I enjoyed have all been indie games. Mainstream gaming seems to be on a slow death-spiral, blissfully unaware. Luckily, we can continue playing old games till the industry gets back to its senses and starts making fun games again.



(Image courtesy: The fake cop)

Sunday, June 01, 2014

Kingdom Rush for programmers

Read on to learn how to play Kingdom Rush as a hacker.


As I might have alluded to: I dislike games with in-app purchases. A recent Humble Bundle included a game called Kingdom Rush that has in-app purchases. Kingdom Rush is a tower defence game where you build towers while monsters come along stupidly predictable paths. While I started out enjoying the game, it quickly became too difficult to be fun. I had two options: play the easy levels repeatedly and gain the in-game currency, or stop playing the game.

So you'll be happy to know that I chose option #3: use my mad Android skillz to win the game with little effort.

The game came as part of a Humble Bundle, so I downloaded the Android apk and installed it on a rooted device. I could have done this on a PC as well, but an Android device is easier to experiment with. First I started poking around the /data/data directory. The data for the game was in /data/data/com.ironhidegames.android.kingdomrush.humble. I looked around using adb shell. All I found was a few Linux shared objects: .so files. There was a .plist file but that contained some trivial settings. I also found shared preferences which also had nothing useful. At this point I thought the game might get all its state from the network. So I put the device in airplane mode. It was still able to show me the levels I had won, and my score. So the information was stored somewhere. After a process of experimentation, I eliminated the sdcard as a possibility.

Then I copied all of /data/data/com.ironhidegames.android.kingdomrush.humble onto my desktop for analysis. One of the files, .Defaults.plist was particularly interesting. Kingdom Rush is developed using a framework called Apportable. This compiles a game written in Objective-C with minor shims for Android. Objective-C uses .plist files for resources. The file opened in a simple text editor and is a simple XML format. The file contains all the game state: the total number of stars, stars earned at each level,  the number of diamonds, the amount of power-ups (dynamite, extra ammo) you have.

From there it was a simple matter of figuring out what the values mean, made easier because the XML file had descriptive variable names. I stopped the game from the Android device, and loaded up a modified file onto it. After starting the game again, I had a shockingly large number diamonds and power-ups. I continued playing the game, progressing through levels at an easy pace. My strategy was to start out making crazy amounts of money using a special gold-coin power-up. Then I made towers of blindingly superior firepower using my newly acquired mountain of money. The final step was to leave the game running as my towers made confetti out of the enemy army.

It was glorious to watch: like a well made action movie in which the bad guys lose.
I highly recommend it.


This raises some interesting questions about the nature of my activity. Did I just cheat the Kingdom Rush team out of large sums of money by not legally paying them for the diamonds? Were they cheating me by making the game too difficult to play without in-app purchases?  Am I entitled to change files on my own Android device, or do I need someone's permission to modify certain files?


More importantly, what else can I play in this manner?
This is my kind of game!


(Image courtesy: Vikram)

Tuesday, May 27, 2014

The death of in-app purchases

In-app purchases for games are dying a slow death. The idea was to give out a free version of the game and charge for the extras. This way you could broaden your userbase by attracting cheapskates, and still retain big bucks from the users who wanted extra.

Entire books were written about this and the idea got a lot of attention. Unfortunately, for games this is the wrong model entirely. I was sceptical of this model from early on. At best this was a way to get some free publicity like a demo version of the application. But when you charge for every upgrade and every goodie, the game mechanic centres on  squeezing the user for money and not on fun. Every game I played which had in-app purchases was boring and repetitive. You can pay money to get to the next level. Initially, the game and challenging and engaging, but very soon you find yourself hitting a brick wall and you need to pay to continue. No amount of skill or determination will get you past the hurdle.

In some generous serving of humble pie, the games industry is suffering from a backlash against free games.  Recently, Dungeon Hunter got slammed for implementing in-app purchases poorly. Freemium has come under fire before, for luring children into spending money unknowingly. But this time the problem is more central.

It is difficult to make a fun game with in-app purchases.

In-app purchases require constant payment. They require the gamer to be stuck so that they spend money. It isn't about enjoyment anymore. Rather it is about erecting artificial walls to make sure that a paid level-up is required. The games that are the worst offenders are ones where you have a paid "energy", which can only be filled either by waiting or by paying money. After spending five or so rounds of gameplay, you find that you are arbitrarily locked out. There's no way to make this mechanic fun. EA fixed Dungeon Hunter by making in-app purchases cheaper and more generous. An easier fix would have been to sell the first half of the game for free, and charge $3 for the full game.


It might be possible to make in-app purchases mesh with gameplay if they are not central to the gameplay.  Additional level-packs for a flat-rate work.  Customized costumes and accoutrements work for reasons I might never understand.  New scenery or characters might work if you can still finish the game without it.

Or just skip all this confusion and focus on making a fun game. There will always be a market for those.



(Image courtesy: SlaveToTrends)

Game Review: The Shivah

I loved the adventure game "The Shivah" because it was short, crisp and enjoyable. Read on to find out why.

The game follows the adventures of a rabbi who is accused of murder. The game follows his attempt to clear his name. I'm not religious but I still enjoyed seeing through the eyes of the characters and sympathizing with them. The plot was well done and your choices can cause the game to end in failure. Luckily, the game allows you to learn from you mistakes and weaves this superbly into the story.

Adventure games have a long history. This genre includes popular games such as "Monkey Island" where you are a fierce pirate in a whimsical land filled with colourful characters. Most adventure games started out in the early PC world, and their keyboard/mouse control and game layout reflect this. The Shivah is an adventure game with evolves the genre with many subtle refinements.

The first refinement is simplification. The inventory system is greatly reduced: you don't have to grab everything on the scene with the fond hope that it might be useful five hours later. Also, the inventory items don't interact. While this was innovative in early games, it does lead to frustrating game play where you patiently try use every inventory item with everything else on the scene. In Shivah, the inventory is useful in its own unique way. Interaction with scene elements is also simplified. You get two actions: a hand and a spyglass. The spyglass allows you to look at the object; the hand allows you to use the object. This is much simpler than a rich vocabulary of actions: pull, push, give, pick-up, see, ...

The second refinement is in the choice of dialog. Instead of choosing the exact words you speak, you choose your mood: stern response, nonchalant response, etc. This works very well. Unlike other adventure games, you can choose the wrong response and end up in failure. So you need to think while responding. This also works well.

The game is also short compared to a classic adventure game. This works well for me,  I spend less time with games and still get a sense of achievement. A tasty nugget is better than a bowl of insipid mush.

I played it on Android: the graphics are gorgeous and the on-screen controls are responsive and intuitive. The dialog has well done voices and fitting background music. It is more fun on a mobile device while you are on the go and have a few moments to kill.

Highly recommended. Just two dollars on the Android Play Store. Worth every cent.



(Image courtesy: Wadjeteye games.)

Sunday, May 25, 2014

There's no such thing as real programming

There are lots of confusion online about what "real programming" is.  Most people aren't programmers, and the myths that programmers create about their own profession result in a lot of confusion.

My interest was piqued when I saw this question on a very popular programming site. I could imagine a confused kid, sitting through a boring lecture, wondering why a language was not 'real' enough for the programming world. And it is a confusing: there is no distinction between Physics and "real" Physics, so why programming?

There is a cottage industry of people claiming to teach you the tools that professional programmers use. I suspect these people are exploiting the confusion and fear related to programming.  A non-programming parent looks at the course curriculum to finds that their kids are being taught BASIC. "Basic? Wow, that stuff is dead. My child should learn what Google and Facebook engineers use so my kid can earn his first million right out of high school."


I write software for a living.  I am as real as a programmer gets. And I'm here to tell you that
 This notion of a "real programmer" is completely bogus.

It started out as typical male machismo about programming. And it has only gained in bullshit with time. It is an easy way to deride honest programming activity because it isn't as painful as the work that programmers do all day. The claim is that unless you are working with gigabytes of code and are fixing painful bugs you are an imposter.

Reminds me of a long time ago when I was learning juggling. A fellow juggler, let's call him Jack, was really good at juggling. Jack mentioned to me how you can't call yourself a "real juggler" till you could juggle five balls. Since I was a beginning juggler, I thought there must be a good reason for this. The mystery was cleared when another juggler told me that Jack says this to everyone because
A) 5-ball juggling is hard
and more importantly
B) Jack can juggle 5 balls.

For what it's worth, if you enjoy juggling and can juggle more balls than the hands holding them, you are a juggler.


Programming is much the same. If you can write a program to make your life easier, irrespective of language and technical difficulty, then you are a programmer. I use a specific set of tools: an IDE, a debugger, a specific revision system. But plenty of expert programmers use completely different tools. There is no one tool that fits all tasks. An Integrated Development Environment can be great for large, unwieldy code-bases where you need to debug extensively and yet it can be a impediment to understanding and running a simple five-line program. The popularity of Arduino suggests that there is a huge demand for a simple programming environment rather than the complexity of a full IDE with an integrated debugger.

The essence of programming is writing down steps to solve a problem. The problem could be a very complicated one (What webpage matches the words "real programming") or a very simple one (What is the tip on a $20 meal). Since computing has become so pervasive, more problems can be solved with a computer. Previously, you would have a paper address-book with names written in them. Now you have them all written on a computer. This allows you to solve the problem (How many of my contacts live in Delhi) with very little effort. Simple programs can help reduce a lot of repetitive work.

But programming goes beyond. It is an aesthetic activity: making the computer draw fun shapes, or do silly things with sound or letters. All of this can be achieved with programming as well. Many programmers started out writing small fun programs in obscure languages and grew fond of the possibilities.

Programming is as enjoyable as painting.  Even if you never paint a million-dollar masterpiece.



(Image courtesy: Jim Pennucci)

Sunday, May 18, 2014

Basic 256: a great way to learn programming

Want to have some fun programming? Pick up Basic 256, a BASIC interpreter that runs on your system.

Programming is fun, but introducing someone to programming can be difficult. Even a simple program requires a lot of background knowledge, and it takes a long time to write something useful. Most new programming languages require a great deal of understanding: a simple line like 'import string' in Python is devilishly confusing to a child. Most programming books today aren't fun anymore, and that is a real pity. Programming can be as enjoyable as playing with Lego, except that you never run out of bricks and no laws of Physics limit your structures.

So I was very pleased when I recently tried out Basic 256, which is a Basic language interpreter that runs on Linux, Windows and Mac. The default window shows an editor on one side and text and graphical output on the other side. You can start right way, asking the computer to speak out "Hi there" which is this program:

say "Hi There"

That's all there to it: a child could do that. It has support for drawing graphics, accepting mouse input, synthesizing music, and more. The best part is that it is accessible: someone with no programming background could sit down and have a good time modifying programs they find online.

In addition to being an excellent environment to program in, there are two things that make Basic256 a superb resource:
  1. An excellent book: So you want to learn how to program? by James Reneau. The book is available free online, as an inexpensive PDF online, and also as a paper copy. I have read through a few chapters: it does a great job at introducing programming in bite-sized chunks of fun.
  2. A collection of copy-and-paste examples. This is a great collection of simple programs that do something concrete. Complete code samples like this are a great way to see how something works end-to-end and learn by taking things apart and modifying them.
In addition to having everything I remember from my early BASIC days, Basic256 has support for networking, databases, fonts, and a lot more. And it is available to download for free. It is a marvellous resource when showing children real programming and in getting them started with programming.




Monday, May 12, 2014

Simple paint program for children

I had blogged earlier about a simple program to allow children to use a computer without any supervision. That program shows alphabet and numbers and lets the child freely explore a keyboard.

A few weeks ago, my son showed an interest in using the mouse. I looked at a few programs meant for children. The best among them was TuxPaint, which can be put into full-screen mode and allows a child to draw using a mouse. However, for my two-year old, Tuxpaint was still too difficult. My son would click on the palette or the tools by accident and it was frustrating when his paintbrush went away, or the color of the pen changed accidentally. Also, the distinction between a left click and a right click was frustrating for him. It took a lot of patience to tell him the difference between the tools, the canvas, the color wells, all the while teaching him to use the left mouse button.

So I learned Qt programming and wrote a very simple program that allows a child to draw using a mouse.  It accepts no keyboard input and treats all mice buttons equally. You click to start drawing and move the mouse to make a free-formed line. The line ends when the mouse button is released. Well, it does accept very limited keyboard input that is difficult to press accidentally. There are a few hotkeys: Ctrl+Alt+t toggles the menu-bar and there you can see the other actions and their shortcuts. Changing pen width and color is supported even when the menu is not visible. You can quit the program using your platform-specific quit keystroke.

The program borrows heavily from the Scribble example in the Qt documentation. As a result, this is a good starting point into Qt programming: the code is easy to understand and modify. As a starting point, you could try changing the initial thickness of the pen.

The source code is on github. You need an environment capable of compiling Qt applications: this is possible for Mac, Windows and Linux. You can run 'qmake && make' or you could load it up directly in a program like QtCreator. I had blogged earlier about Qt Creator, it is a freely available IDE.

Precompiled Linux binaries for 32 bit and 64 bit are available. A precompiled EXE file for Windows is also available. You need to get Windows libraries which are rather big at 20Mb. These libraries have to be kept in the same directory as the EXE file. I don't update binaries frequently. If you can, the source is the best option.

And here is a screenshot of the program in action. It looks like this on every platform.

Sunday, May 11, 2014

Book Review: Merle's door

Merle's Door is a fantastic book about a man's relationship with his dog, a lovely description of the outdoors, and a rethinking about man-pet relationship. Read on to find out why.

I read Merle's Door because my wife loved it, and highly recommended it. It starts out promisingly with a story of how Ted found Merle and how they had to adapt to life together. It goes on through Merle's life and passions, and how Ted and Merle became one cohesive group.

A few ideas stick out from this book. I'm not sure these are new ideas, but this is the first book I found them. The first is the remarkable camaraderie between Merle and Ted. Not only do they enjoy each others company, but they also have a more understanding relationship.  The book is written from a dog's perspective as much as it is from a human one. At times this can get laborious as numerous online reviews point out. I understand the human urge to dislike Ted foisting human feelings on his dog. There were places where I wasn't sure what Merle was feeling and it felt excessive to force his feelings on the dog. But all writing employs some amount of guesswork of others' feelings.  In total, the portrayal was delightful and refreshing.

The only part which dragged on was Merle's last few days. Ted has written it as a painfully detailed diary, which was too painful and too detailed. I wish this section was concise, but I'm sure other readers love the detail.

This book also makes you think about the life of a dog in the city. Ted's dog had a large area he could run freely in, which is very different from most domesticated dogs. Illustrating from examples, Ted shows why a dog would be miserable in a confined area like an apartment, even if it had a generous yard.

If you have ever enjoyed playing with a dog, get this book. This will give you a fresh new perspective on what a dog's life must be like.


Saturday, May 10, 2014

Book Review: Revolution in the Valley

"Revolution in the Valley" is a heart-warming account of early computer engineering in the Silicon Valley. It recounts the work of the hardware and software engineers behind the original Macintosh. Read on to find out why I loved the book.

I have read over a dozen books about the original Macintosh. I never used the original Macintosh or the Apple II but I am impressed by the ideas that those computers popularized. The book "Revolution in the Valley" by Andy Hertzfeld is the first account that I identified with. Andy was a software engineer, a co-creator of the original Macintosh. I am a software engineer as well, and I got a better understanding of the project through his narrative.

The book is a collection of stories that are online at Andy's website Folklore.org. You don't need to buy the book, but I would recommend the book for two reasons. First, the book is loosely chronologically arranged. You can see the journey as it happened, all the way till the launch of the Macintosh and the break-up of the original team.  Second, the book is filled with lovely illustrations and images of the original team and the developer's notebooks.

After reading the book, I was filled with a deeper appreciation of the original Macintosh team. They worked in a very different engineering environment, and yet produced something exceptional. It is unlikely that their success can be repeated. Making a computer today requires a lot more effort, and the barrier to entry is much higher. The Mac team was a rare combination of talent, idealism and determination that is also difficult to recreate. Andy shows you some of the design decisions and the reasons behind them. As an engineer, it was a wonderful read.

I was filled with conflicting feelings at the end of the book. I doubt I would have survived Andy's experience. They had terrible management, were poorly compensated, and were overworked.

While the original Macintosh was made during a time of bravado, I'm glad that software engineering is a much more mature field now. Software management is better, co-workers are smarter and more numerous, and the general demands of the job are better understood.

(Image courtesy: Andy's wonderful Folklore.org site)

Sunday, January 19, 2014

Book Review: Embedded Android

Just finished reading Embedded Android, a book with deep technical details about the Android platform. Loved it: read my review to find out why.


A few years ago, I downloaded the Android Open Source code (AOSP) to take a look. The download took a long time, and the contents had a confusing directory structure. I could see some familiar directories, but I had no idea what the remaining code did. I understand the Linux filesystem hierarchy and kernel-user space divide and daemons. But Android had none of that, so it made it very difficult for me to transfer any of my understanding. My standard Linux skills were falling short, and the system felt strange and unfamiliar.

"Embedded Android", by Karim Yaghmour covers deep technical details about Android that no other book currently covers. Most Android books give you details about Android programming: Activity/Service/BroadcastReceiver. Karim's book answers questions such as:
  1. How does an activity start up?
  2. How does a package get installed?
  3. Who starts the ActivityManager?
  4. How can you interface with the ActivityManager on the console?
  5. How does the Android system boot up?
  6. Which service does what?
  7. How do I get busybox on there?
Frequently, I marvelled over how clearly something was explained: like the boot process and how the init.rc is structured. Or how detailed the explanation on the build process was. And I kicked myself for not having read this book three years ago -- excusable since this book was written last year.

This book is for advanced Android programmers and Android device makers. This book is for Android programmers who understand Linux and want to see where the lines between Linux and Android blur. If you have ever downloaded the AOSP, you would benefit from reading this book.

Nothing is perfect. The editing on this book could have been better. There are some winding passages and unfocussed sections of text. And some sections could do with expanded explanation. The detailed material makes up for these minor issues. The author has laboriously dug through the AOSP code to make sense of the system, and his depth of understanding makes the book a pleasure to read.

The chapter on Android Framework (chapter 7) was brilliant. The book provides documentation for components that have none. This book explains what Android really is, and how it ticks.

Worth every penny.


(I do not receive evaluation copies of books. The reviews written here are out of my own reading, done in my own time, on my own dime. I try to read the entire book before writing a review.)

(Image courtesy: O'Reilly Media)

Saturday, January 18, 2014

Advice to a younger me

I was talking to an intern candidate to discuss whether our team would be a good match for the candidate. The candidate asked me a couple of questions: about work life, specific project details. And then, the candidate had a brilliant question. I wish I had asked that question when I was starting work as a software engineer. I mentioned that I had interned before, and it was a great learning experience. The candidate's question was:
After your internship, what advice would you give a younger yourself?

 This is both a brilliant and insightful question. Everyone talks about internships being a great learning opportunity. Well, what do you learn?

Everyone learns different things. Here is my attempt at an answer. I learned two broad things during my internship:

  1. Dealing with inadequacy: All through my internship, I was surrounded by people smarter than me. Co-workers, project managers, executives, ..., even my fellow interns were much, much smarter than me. It is difficult to quantify how much smarter, but in some cases, 10x or 100x would probably be right. In some discussions, I felt strange being in the same room with these people. Perhaps for the first time in my life, I felt like a complete idiot.
    A big part of the internship was learning how to cope with that feeling. Learning that it was natural to feel silly and incapable. All these engineers had spent years perfecting their skills, and I was completely inexperienced. Of course they were better. I had to learn that there were some things I might be better at, if I worked hard.
    And I learned that I have some valuable skills, which others might lack. Maybe I am not as technically capable, but I am a strong listener. I can explain a situation clearly and patiently. Sometimes it was a little Linear Algebra. At others, it was shell scripting. But I had to remind myself that I understood some things betters than others.
    I had to learn how to cope with this again as I started a full-time job. I felt like I got in due to a recruiting error and had to remind myself that I was capable.
  2. Learning from others: It was clear that other engineers were more experienced. The other lesson from the internship was how to learn from others. How do you ask for help? How do you suggest you are lost? How do you solicit feedback? If you had an hour of the best engineer's time, how would you use it effectively?  Once you are surrounded by shocking brilliance: how best do you imbibe it?
I haven't conquered these two issues yet. I wish I could feel adequate. I wish I could learn better from others. The internship got me started.