Skip to main content

Posts

On the Value of Tools

Maybe to a fault, I tend to think that tools play a big role in the success of a software development projects. The benefits can largely be summarized under the following categories: leverage or force multiplication positive reinforcement or behavioral modification The first one is the primary reason for using tools ever since early hominids started to pick up rocks or sticks and using them as tools. They allow us to go beyond the immediate capacity of our hands or our brains. Even though according to hacker folklore, Real Programmers need nothing but cat > a.out to write code, but the days of writing programs in raw binary form by flipping switches or by punching cards are over. High-level languages and interactive programming - i.e. using a computer workstation to write, compile and test programs in quick iterations, have brought such a leap in programmer productivity, that without it, we could hardly manage the complexity of some of the software systems we are working on today. ...

Essential Startup Software Development Infrastructure - 2000 Edition

When we started a company in early days of 2000, I spent some time setting up what should become our minimal IT infrastructure and software development environment (That's how I ended up with UID 500...). Since we did not have any money (yet), it had to be free/open-source software, and since we did not have any time for evaluation or in-depth research, we tried to go with what seemed to be the most obvious, conservative or mainstream choice at the time for each piece of the solution. Initially our entire server infrastructure was based on a single Linux box from Penguin Computing since that was about all we could afford with an empty bank account. In the hope there would soon be more machines to come, it was running a NIS and NFS server for a centralized network wide login, DHCP and DNS (bind) servers for IP network configuration, a http server (apache) as the intranet homepage and SMTP (sendmail), POP and IMAP servers for basic email service. Many of these initial choices were ...

FIRST robotics competition

I was volunteering today at a robot competition for high-school age kids organized by FIRST , a non-profit to promote interest in science and engineering among high-school students. They organize a series of robotics tournaments, where teams of middle-school or high-school age students have to build a robot in 6 weeks to compete in a particular challenge. The teams work with adult mentors, who are typically real-life engineers or scientists. I was impressed by the quality of the work the students brought to today's NY regional competition at the Javits convention center. Most of the robots where highly functional and held up well through multiple rounds of competition. With the disappearance of the industrial middle-class in the US, education has become the single biggest factor in economic success (other than simply being born rich). The service economy consists of at one end of the spectrum of gold-color jobs which typically require advance college degrees and McJobs at the other...

SMS Remote Control for Android Apps

I wanted to add an remote control feature to the NoiseAlert application for Android, where menu options could be triggered remotely by sending an SMS to the phone. SMS messages should be delivered to the application only if it is running and the commands should be executed by the foreground activity. Instead of registering a BroadcastReceiver globally in the AndroidManifest.xml file, the following object can dynamically register and unregister itself for receiving all SMS during the time it is active. All incoming SMS are passed to the objects onReceive method, encoded as an Intent in slightly obscure ways: public class SmsRemote extends BroadcastReceiver { Boolean mActive = false; Context mContext; @Override public void onReceive(Context context, Intent intent) { Bundle bundle = intent.getExtras(); if (bundle == null) return; Object pdus[] = (Object[]) bundle.get("pdus"); for (int n = 0; n < pdus.length; n++) { SmsMessage message = SmsM...

Source-Code Samples in Blogger

Blogger makes it a bit hard to include properly formated source-code snippets in postings as it does not have a mode for entering raw pre-formatted text, which should not be molested by any of the further processing and rendering. You can always use the raw HTML edit mode, but then all the all the html and xml-isms have to be escaped before pasting in the code sample. Fortunately there is a convenient online service at formatmysourcecode.blogspot.com which does just that. Here is an example of how the resulting output looks: main() { printf("hello, world"); }

The other Benefit of Open-Source

Software development must be one of the fields where the gap between best practices and average practices is the widest. A poll in 2001 showed that only about two thirds of software development teams are using version control and only about one third use some kind of bug tracking system. C'mon people how many high-rise window cleaning crews are working without a safety harness? Open-source projects with many collaborators distributed throughout the world generally need to adopt solid collaborative development practices and often build themselves the tools to support collaboration at such a large scale. With the popularity of open-source software, an increasing number of people in the technical community have been exposed to the ways these projects operate and to the tools they use. Today, it is a lot harder to find fresh college grads who would not find it completely naturally to use version control, after all this is how you get the pre-release version of "insert-your-favori...

Startups in the Age of Web 2.0

The current generation of web startups reminds me a lot of rock bands in the 60ies. Before the transistor radio and the record player, there were many bands who toured the local dance-hall circuit, since life music was the only kind of entertainment possible. It was rather hard to get very rich as a musician. Records and radio changed the game - it became "winner takes it all". Suddenly the whole country could be swooning to the songs of a few long-haired boys from Liverpool for example - who became unimaginably rich and famous, where many unnamed musicians lost their income. Many of them played a mean guitar too - why was it the Beatles who became famous? But no matter who made it - the record companies always made money... Today web technology is pretty well understood. Many people could build a pretty state of the art web application and to get started it takes about as many people as for starting a garage band. The web as a delivery platform has made it very cheap and ea...

The Thing we do - or why this Section is called Software Development

I do computer stuff for a living, my current job title is software engineer. I could also be called a programmer. But my favorite term to describe what we do is Software Development . It emphasizes on the evolutionary and incremental nature of the process. Because not unlike a Hollywood screen-play, software is typically not written in one shot, but developed over multiple iterations by various authors, based on feed-back from various sources. Programming is a skill, a craft or - if done exceptionally well - maybe an art. It's the stuff that is thought in schools, that textbooks are about - on algorithms and data structures, programming languages etc. (Some Computer Science purists may argue that CS isn't really about programming, but that is a whole different debate.) In the beginning, there used to be just programming. Computer were new, exciting, largely irrelevant in the grand scheme of things and there was no formal training yet for how to write programs for them. Pe...

Android Apps Reviews

After some ego-surfing, here are a few reviews on my Android apps, at least in the languages, I can understand... BistroMath AndroidApp Review Source Android Market Place Rankings Review on www.androidpit.de (German) Planete Android (French) NetMeter Android Market Place Rankings Review on www.androidpit.de (German) Der Sicherheitsgurt für Android (Auslands)nutzer (German) NoiseAlert AppVee Android Apps Review Android Apps of the Week: 01 Top 5 Most Clever Android Apps for your T-Mobile G1 Android Market Place Rankings

AppEngine

I have been playing a bit with AppEngine lately. I is a cloud computing service geared towards running Python based web applications on Google's data-center infrastructure. Applications can only run short-lived http request handlers, which will be terminated if they exceed their CPU quota. On the other hand, many parallel instance of the same application can be spawned transparently if the load requires it. AppEngine comes with its own proprietary non-relational data-store, which maps well to Django 's object persistence model for example. And since Django is such a popular framework for web development in Python, it comes pre-packaged in the AppEngine API. I think this is a very compelling solution for many new web applications since it takes a lot of pain out of building and scaling infrastructure. For those who don't believe that this is a significant problem, here is a very interesting presentation from the MySQL 04 conference about how LifeJournal scaled up from a ho...

In Support of Code Reviews

Very few people doubt the usefulness of peer code reviews to improve software quality. Intuitively I would put it as one of the factors with the highest impact on quality, right up there with good design and thorough testing/validation. Most projects I have worked on, did at least lip-service to code-reviews, but most failed to actually do it systematically. Not surprisingly since code-reviews done well are very time-consuming and put a huge burden on someone else other than the author of the code. The key to success would seem to minimize the hassle and burden put on the reviewer. Some common ways to do that might be Pair programming : the burden of review and credit for delivering the code are shared equally. While pair programming certainly seems to have many advantages and some very enthusiastic followers, it may be hard to implement in some places. While two pair of eyes certainly see more than one, it might also be helpful to get fresh pair of eyes do the review, who was not part...

Cyrket

Cyrket.com provides web based interface to browse the Android Market. Sadly this is something which the official market site or the developer console still do not provide (and Google wouldn't even have to reverse-engineer their own protocol). Here are the most recent ratings & comments on my apps: BistroMath NoiseAlert NetMeter

Market Featured Application

BistroMath, the tip calculator is by far the most popular of my little Android applications. While introducing paid applications, the web interface has been revamped a bit. BistroMath even made it into the list of featured applications.

Party like its 1234567890

Today is party time for Unix geeks all over the world. Not because it's Friday the 13th or Valentine's day, but because today the Unix clock reaches the memorable state of '1234567890' . That is the number of seconds since 00:00 UTC on January 1st 1970. To see when to celebrate in your timezone, run: python -c 'import time; print time.ctime(1234567890)'

NetMeter

My third android application grew out of the frustration for not knowing what is going on with device behind my back. Many of the early apps - probably written on the emulator or with little field test and experience on real devices are pretty aggressive in resource usage - some of them in the background. From my own experience with Android programming, it can be pretty hard sometimes not to mess up and do something which is very power-consuming merely by accident. Mobile programming requires a particular style and attention to resource efficiency, which many programmers from a desktop/server background are not used to. NetMeter makes use of data from the /proc filesystem of the linux kernel which is deep underneath the Android platform. As opposed to using supported and documented APIs this is quite a bit more hacky and uncertain to work on any device or even future releases. On the other hand, the /proc filesystem is a pretty standard mechanism for making kernel state accessible to u...

BistroMath

My second Android application is a special-purpose calculator for solving some of the problems which often arise when it comes to paying the bill in a restaurant - like computing the tip or splitting the bill among N people. This seemed like a reasonably useful application for a device which the user always carries around and one that is very simple to do. In fact it turns out that tip calculators are somewhat the " hello world " equivalent of mobile application development. To be useful, the user experience would have to be very simple and rapid - not necessarily obvious with the clunky keyboard setup of the G1! The calculator uses a table view of buttons as a virtual keypad for inputting numbers and another table on the top to display the results. The display table is fully specified in the XML layout file, while the cells of the keypad table are generated by the code. There is a menu to select the input fields (price, tax, tip, number of people and currency exchange rate) ...

NoiseAlert

While on paternity leave, I wrote this first Android application as a kind of remote baby monitor - even though I would never dare to suggesting using it as such in public... The basic functionality is that when running the application monitors the sound volume through the microphone and if it exceeds a certain threshold automatically dials a number which previously has been configured. Based on existing examples which come with the SDK distribution it is pretty easy to put together the basic application skeleton - including the XML description of the UI layout. If you don't know what you are looking for the documentation on the Android SDK site is a bit sparse but is great to look up details. The application consists of an Activity, the Android abstraction for a single self-contained screen with some associated behavior and user interaction. This screen has a layout and a main menu defined in XML and provides framework methods to handle I/O and life-cycle events. For simple apps ...

Android / T-Mobile G1

I have been using the new T-Mobile G1 as my primary phone for a while now. It is the first phone which runs the open-source Android mobile software stack. I agree with most of the reviewers that the G1 or even the Android software is no iPhone when it comes to stylish elegance, attention to detail and consistency in the user experience. However, this is somewhat besides the point. Android is a developers dream - designed from the ground up as a 3rd party application delivery platform. I have also played around with the application development toolkit and written 2 small Android applications - which even for somebody without any prior experience in Java or mobile device programming is surprisingly easy. The main criticism for the G1 hardware is that it seems to have been designed by former soviet industrial planers - I can't quite figure out if it is meant to be retro Brezhnev or Khrushchev era styling... I would also prefer a 100% touch-screen driven device instead of the neither ...

Poor-Man's Time-Machine

Since my previous experiments with Apple's Time-Machine online backup solution had not turned out as expected, but I really like the idea of continuous online backup - specially since the new 10.5 Leopard release does not seem as stable any more as my old 10.2 Panther release. The basic idea is to use rsync, which is an efficient and robust way to synchronize two file-system trees over the network. This article for example explains in much detail, how to use rsync and unix-file system hard-links to create multiple snapshots of a filesystem tree over time and only consume disk-space for the files which have change in the meantime. Minus the fancy GUI, sounds a lot like what Time-Machine is trying to do... For my purpose a few monthly snapshots are more than good enough with the current one being kept reasonably well in sync - daily at least, as long as the laptop happens to be online long enough for the changes to be pushed over. Since the network is private, I am using a native...

Playing with Time-Machine

The latest version of Mac Os comes with automated backup system called time machine, which besides the cool GUI is basically taking periodic snapshots of all changes and saves them to an attached disk. Since my new 17' Powerbook is suspended most of the time and moving back and forth between home and office, any solution which assumes a static environment is going to be challenging. I was hoping for a solution which would automatically back up any changes incrementally to my linux server at home, whenever the laptop finds itself on that network. This means, the system would have to auto discover its network environment and deal with interruptions, since I am not going to wait for any invisible backup job to complete before closing the laptop again. Following these instructions , I created an AFP share from my linux server, including a bonjour zero-conf advertisement, which can easily be discovered in the network neighborhood and mounted as a share on the mac. Despite Apple...