Development Musings

Sunday, July 10, 2011

I started using Scala recently to develop a movie player as a side project, with the goal of using functional constructs whenever possible. I found myself using imperative-style programming when interacting with the UI framework. This got me thinking, is there a functional state-less way to develop UIs? A bit of Googling revealed the following:

Thursday, January 13, 2011

Imagine if Firebug disappeared all of a sudden and you have to build a website/app without it?

I came across 3 Drupal modules for development that will help you do better customization, improve performance and responsiveness of the beast, and help flatten that learning curve. These modules may even get you to start thinking about using Drupal in the web application space, as opposed to a mere brochure-ware. After spending 30 minutes with these modules, you're going to feel like you've been developing without Firebug. Drupal development may even be fun.

Devel - 61k sites report using it, which probably means that you should be using it. This is the core development module that provides the usual SQL query profiling, node debugging, etc..

DrupalForFirebug - 5k sites using it. The name is exactly what you think. Never again will you do var_dump($node). You can see SQL queries profiled. And it's all organized in Firebug into separate Drupal tab (as opposed to a Firebug console dump). There's even a Chrome extension.

Devel Themer - 2k sites using it. The Firebug Drupal extension is a sleeper compared to this. When enabled, you can hover almost any piece of content (like Firebug) and see the Drupal function call and/or theme file that emitted it. It even shows the arguments of the method and tells you what template file to create to override the function. This makes it MUCH easier to customize the output of piece of content because you no longer have to track down the 10s/100s of files and piece together what is calling what. Watch this screencast: http://ftp.drupal.org/files/videocasts/moshe-theme-developer.mov.

Saturday, December 25, 2010

Web fonts can be boring. There are much nicer fonts on your desktop operating system or application. But these fonts are not free and can be very costly to distribute. Fortunately, there are nice looking free fonts for free distribution, provided by Google:

Saturday, October 30, 2010

The page itself is a 5-minute read but download PDF for a more detailed explanation of the rationale for these guidelines, which are sort of a common realization among folks who have gone through the trials and tribulations of extensive unit testing.

There's also quite a bit of other interesting stuff on his blog, including: augular, a RAD platform for developing CRUD apps on the web with only HTML (no server-side, no SQL); and CoffeeScript, a terser way of writing JavaScript.

Saturday, June 19, 2010

I have an old hard disk with corrupt NTFS volumes and I want to recover the data. I'm not sure how the drives got corrupt but they cannot be fixed by chkdsk /f. Fortunately, there's a plethora of open source data recovery tools available. Two such tools are foremost and photorec which specialize in combing through hard drive partitions to recover files based on header information. They can even recover files after accidental reformatting.

Foremost is a tool originally developed by the U.S. Air Force and is available via sudo apt-get install foremost. It can recover common file types such as txt, jpg, avi, andetc.. Foremost was last updated in 2008 which means that its knowledge of file headers is, at best, two years dated.

Photorec is part of the testdisk suite and is available via sudo apt-get install testdisk. Testdisk is a tool that not only "tests your disk" but also rebuilds your partition table. This is the tool to use if your hard drive's master boot record or partition table is corrupt. Photorec, like testdisk, is a poorly named command-line tool. Like foremost, photorec recovers files (not just photos) based on file headers. In fact, photorec supports more file types and is more up-to-date than foremost, which is evident by the fact that I was able to recover more files with photorec than foremost.

The problem with both foremost and photorec is that they recover file content but not file names. So you end up with directories of randomly named files with only the file extension preserved. It's not ideal but it's still better than not having the data at all.

Sunday, February 28, 2010

The Syntax Olevia LT30HV, like many off-brand low cost LCD HDTV, does not provide accurate EDID information which prevented me from running the LCD at the native resolution 1280x768. After extensive Googling, I finally found the necessary configuration to put in my /etc/X11/xorg.conf.

1. First, make sure you have the proper Modeline in your Monitor Section:

Ego (aka About Me)

I am a software developer with about 6 years of experience in various roles such as a university researcher, independent consultant, and enterprise developer.

My criteria for good software code can be reduced to a single axiom: Good code is easily testable code. This is based on my belief that software code are ultimately theories of how a business process should work. And it is well-accepted in the scientific community that good theories are testable theories. So, good code is testable code.

I hate the word "enterprise" even though I use it quite a bit.

This blog is written for the sole purpose of shameless self-promotion. :)