Showing posts with label Software Development. Show all posts
Showing posts with label Software Development. Show all posts

Saturday, November 02, 2013

Project Planning: Sprint + Kanban + Pomodoro

One thing I like about travel is that it disrupts routine and makes me rethink about life after I get home. One thing which bothers me every year is that I seem to be busy working on various things, but I can’t seems to make sense of what I had done (or achieved). One thing I love about blog is that my thoughts (more specifically my New Year resolution) are recorded and I always look back to see if I have done what I set out to do.

I have 5 things listed for my 2013 New Year resolution: I completed one (travel), will complete another by next week (try hardware hacking), another one is work in progress (travel web app), another one wishful to be completed (stupid idea) and last one is hopeless (make a game).

Kanban + Pomodoro is pretty good in helping me to keep track of productivity and small tasks, but I lose sight of the bigger pictures of things I had done and should be doing next. My wife’s company recently adopted the SCRUM software development framework, and I like the idea of sprint, let see if I can mesh the methodology together.

What do I want to do (or achieve)? I want to work on a stupid idea every quarter of the year, while spending time to maintain and work on Travelopy and Food web app.

I shall split 1 year into 4 quarters, where each quarter has 3 months, and each month will have 2 sprints (2 weeks each). In each month, one sprint shall be used to develop stupid idea, while the other is to develop the core products. By the end of the 4th quarter, I should have 4 stupid ideas in beta release, while the core products should be completed and running as production. Each sprint MUST end with a release (something working in production mode). I will use Kanban + Pomodoro to keep track of the actual tasks and hours spend.

ExpectedActual
Q1
M1
S1
Stupid Idea 1
S2
Core Product
M2
S1
Stupid Idea 1
S2
Core Product
M3
S1
Stupid Idea 1
S2
Core Product
Q2
M1
S1
Stupid Idea 2
S2
Core Product
M2
S1
Stupid Idea 2
S2
Core Product
M3
S1
Stupid Idea 2
S2
Core Product

1 week sprint is too short, and I usually take 1 week to hammer out the code, and another week to polish it for proper release. Why spent 50% of the time on stupid idea and lose focus on core products? I found that if I work on the same project for too long, the enthusiasm and productivity goes down. As much as I like to work 7 days a week, but my mind and body just wouldn’t allow it. Thus I feel a good mix of leisure and work, stupid idea and serious work is important. If I don’t give enough time to stupid idea, nothing will be released thus I won’t feel the accomplishment. I am not sure whether this will work out or not, so let’s try it out.

With this new chart (Project Sprint Chart), I should have a clear view of what am I working on, promising better planning and time management.

Sunday, June 23, 2013

A funny case of using the PC

Nowadays I boot into my Windows 7, check my mail and browse some web; then I click on VirtualBox and start Lubuntu to code web application (Python, Flask, Brunch, etc.), where I spent most of the time on. It's funny I spend most of my time in a VM.

Why I am using Windows for the past 10 years

10 years ago I was a desktop developer using VB6, Microsoft C++, and eventually .NET, so Windows is the obvious choice with more than 90% market share.

The the programming work started to shift to web through ASP, ASP.NET, Java and PHP. Though I am using Eclipse to code Java and PHP (Zend Studio), it never cross my mind to shift to Linux as I see no value added benefits.

There are a bunch of Windows only apps which I cannot live without, such as Microsoft Office, Visio, Photoshop, Visual Studio, etc.

Besides, Windows 7 is pretty fast and stable, and the BSOD is pretty much dead.

Why did I start using Linux

I did install a few Linux distros in the past 10 years, but I just couldn't find a compelling reason to use it on a daily basis.

I guess Python, Brunch and Node-related stuff trigger the reason to move to Linux. I started with Python and Brunch on Windows using Eclipse, though it work pretty well. These tools involve a lot of command line at times, and Windows command prompt does look and feel terrible (cygwin doesn't work really well with Python). There are some dependencies for certain libraries or tools (I forgotten which one) which could not be installed on Windows properly (or too messy), most tutorials are on Ubuntu environment, some tools ported late or second-class citizen on Windows (livereload, yeoman, pip, etc.), lack of convenience of apt-get to install various tools and libraries, etc. I guess a combination of these reasons encourage me to move to Linux, and I am actually glad it happened.

Some benefits of Linux includes similar environment as my production environment (less deployment issue), powerful command line means plenty of stuff could be automated through cron and shell, plenty of tutorials to setup various tools and services on Linux (espcially Lubuntu), apt-get and pip (and virtualenvs) allow easy update of various tools and environment.

Lubuntu consume very little resources (could run on 512MB RAM, but more practical with 2G RAM if used as Coding environment), have decent desktop applications for Development (Chrome, Eclipse, Sublime Text), stable and speedy. Though the File Explorer on Lubuntu is a bit sucky.

How did I end up in VirtualBox Linux

At first I was still skeptical about Linux, so I take the safest route of installing one in VirtualBox. I choose the least resource intensive Ubuntu flavor (Lubuntu), assigning it half of the memory (2G out of 4G) and half the processor (i5), and it run decently on most cases. I can't take away more memory from Windows as it would crawl the moment I try to open up some apps on it.

Why not Dual Boot?

I gave this option some thought, and found it too troublesome (and time consuming) to switch between OSes.

Besides, there are some surprising benefits of running a VM:
  • A share folder could be easily created to share files between Host (Windows 7) and Guest (Lubuntu); somehow drag and drop doesn't work on my setup for file transfer.
  • Host and Guest could share the same application/services, e.g. MySql still resides on Windows 7 where Lubuntu can easily connect to it, and I could easily test IE compatibility by connect to Lubuntu test server from my Windows 7
  • Whenever there is a need to run IE or use Microsoft Office, switching back to host (and vice versa) just take a second or two.
  • Easy Backup and Transfer: My Lubuntu VM is about 20G, where I could easily backup the entire environment into an external drive/cloud, or setup my coding environment on another notebook within minutes. Keep the VM small by storing large but non-essential files on the shared drive on the Host, and I put all my essential files (e.g. Code) on a separate virtual disk (the benefit is that I could start another VM if necessary and mount my "Code" virtual disk).
  • Snapshots

Why didn't I ditch Windows totally?

Though I would like to, but I can't at this stage due to a few reasons:

  • Legacy Development Support: I still need to support some application written in VB6 and .NET; sometimes, there is still a need to develop some Windows-based application.
  • Internet Explorer: In Malaysia (my country), IE is the only choice if I need to perform Online Stock Trading (every brokerage use the same ActiveX app developed by the same company), and the same goes with some Online Banking. Besides, I still need IE to testing purpose.
  • Microsoft Office: Though I use Google Apps most of the time, there are just some 100-pages existing documents which I need to edit, where even app like Libre Office would screw up the formatting badly.

Why not put Linux as the Host (and run Windows in VM)?

This sounds like a good idea, as most of the time I am using Linux and occasionally run Windows for special purpose. The downside of the VM is I only get half the memory and CPU most of the time. The downside of not running as VM is I loose the ease of backup the entire VM image and quick portability to another PC.

I don't feel like rocking the boat now on my old notebook (almost 3 years old), but I am constantly on a lookout for a decent notebook which support Linux. Somehow the feeling is Linux notebooks are quite limited in options, but will try to get one.

4G RAM seems a bit "uncomfortable" when running VM, so 8G RAM is quite essential; and SSD is preferred for faster disk IO. 

The Future of VM OS

I wonder about the future where the main OS of a notebook/PC is a VM OS (something like Xen), where we could choose to boot up multiple OSes and communication/sharing between these OS are still possible, and the VM OS doesn't consume too much memory and CPU.

Saturday, September 22, 2012

Freelance Programmer Survival Manual

Since I am in the process of “retiring” from freelancing, I think it might fun to share some of the things I  learn from freelancing.

The best thing of being a freelancer for me is that I get to do what I love (programming), and able to make an honest living out of it. Besides, I get to work from home (no traffic), and don’t get to blame the bosses and company, though I still need to deal with challenging customers. There are a few painstaking sides of being a freelancer: dealing with customers who didn’t understand or honored the scope of work, some people just like endless meeting and those who refuse to pay up.

Define the Contract

At the very minimum, you MUST have some kind of documentation to record the scope of work in black and white. Though it’s impossible to be 100% foolproof, but physical record is necessary when something goes awry. Besides the scope of work:

  • State clearly what is included and what is NOT included
  • Payment condition (30% upfront, 70% upon completion; if the delay is on the customer side - more than 6 months from project kickstart, the vendor automatically eligible for full payment of work done)
  • Warranty period (2 months)
  • Maintenance Contract (mandatory or not, start automatically after warranty period ends, must be continuous; online or on-site support; what is included, and what not)
  • Adhoc Maintenance (RM 800 per day, minimum one day)


The purpose of the documentation is just to cover our ass when something goes wrong (change of contact person, misunderstanding, dealing with an asshole, etc.). It doesn’t mean we must follow the scope of work 100%, as small freelancing project usually start with slightly incomplete scope and require more flexibility to keep things moving forward. Put in some buffer (no buffer or being too optimistic usually means losing money), and use your wisdom.

A Purchase Order from the customer is very IMPORTANT (it state the customer buying something from you at a price); without such document, you can’t proof the project exist, or proof the total payment amount.

It’s all about the Customer

The challenges of the project largely depends on the person you are dealing with, the customer. After sometime, I begin to grade if the customer is i) a good person ii) demanding type iii) win-lose type. I will give a lower price to a customer who I believe to have good character, and I would hike up the price if he is a demanding or difficult to deal with type, and would run away if I can identify an asshole or someone with unrealistic expectation. The customer affect the time and effort required to complete the project.

[2012-09-28: based on feedback from zalew]
It's true that it's hard to judge someone's character (especially when you just met them), what's more unpredictable scenario such as "he can have partners who will make your life a living hell" or "another person took over the project". It's true that it's always unwise to under-charge, but it pretty much depends on how "desperate" you are (plenty of jobs on hand? charge more. Nothing to do? a little discount to close the deal is better than doing nothing).

When someone ask you to do something for free or give discounts because he will give you more future business, IGNORE them.

If you are dealing with a middle-man, the risk is higher: they might not quite understand the scope of work (wrong information means higher risk of failure), and if the customer don’t pay, the middle-man don’t pay. Most of the time, the middle-man will always take care of their own interest first.

When in doubt, either ask for higher upfront payment (50%) and markup higher, or just run.

When someone ask for under-table money, you know things will just get more complicated in one way or another. DON’T DO IT.

Small is Good

I like small scope with small payment, it’s faster, easier with less complication. If a project is too big, break it down to phases with INDEPENDENT scope of work and payment schedule (if the project got cancelled mid-way, you still get paid for some of the completed work).

Collecting Money

Always take upfront payment, and DON'T start work (besides attending meeting and writing scope of work) before you can touch the money. 30% is the norm, and 50% if the risk is higher. The customer might claim the finance depart is processing the payment (around 1 month), and he require you to start immediately because the project is behind schedule. Ask the finance to expedite the payment, or you can start one month later. Lesson learned: I have a customer who refuse to release the upfront payment because I haven’t completely delivered the project, WTF!

I am lucky that most of my customers are good paymaster, and lately I start to understand why. Most of them are either my friends, my family’s friends or my relatives: meaning I have some kind of personal relationship with them, and if they don’t pay, words will spread to our common friends. Reputable corporation with a close friend working inside is good, and repeating customers are the best.

Middle-man are the worst. I deal with 3 of them before:

  • The first one is a very honorable person, he pays me even though he didn’t manage to collect the payment from his customer.
  • The second one is an asshole. The customer pay him partially, and he keep all the money for himself; when the customer didn’t settle the rest of the payment, he just run away.
  • The 3rd one make excuses about late payment, then run away as well.


You should do the following to protect your interest:

  • ALWAYS put in some kind of licensing control in the software, preferably with a few level of control. If the customer are reluctant to pay, popup reminder (“The trial license has expired. Please renew the license.”) or limit certain features. If it’s clear the customer would not pay, just make sure they don’t get to use your product as well.
  • You are in control as long as the customer continue to use the product. Sometimes the project is abandoned, tough luck.
  • Most of the time, customer will make up some lame excuses for not paying, or claiming you are not doing a good job. Some even try to get you to do more work in order to get your rightful payment for job already completed. Be sober and think carefully of your current situation, and not to be manipulated by the customer.
  • Sometimes it's best to cut loses and get out, so that we could move on and focus on better things.
Funny people could refuse to pay you, insist on continue using your product and still pretend to be rightous. I believe we must treat others as we wish others to treat us, and I am always impressed by someone's distorted reality. The hardest thing to learn is how not to be emotionally affected by them, it just ain't worth it.

When to cut losses?

[2012-09-28: based on question from Anonymous] This is a tough one. 

It depends on do you think the customer is a good person in nature, where you still can reason and convince him, perhaps throw in a bit of goodies to close the deal.

I have some troublesome customers before, where I did throw in extra effort just to close the deal. If it's something manageable with a clear end, proceed to close it. Sometimes customer just like the feeling of getting some upper-hand and freebies; or their bosses wanted something which are in the "grey areas", so do the poor employee a favor if it's not too much (remind them that it's a FAVOR!).

Lately I have a customer which I feel he is taking me for a ride, or perhaps he just have a distorted reality when he always wanted things his way (no exactly a reasonable way). I try to have a discussion with him to come up with a amicable solution, but the conversation just isn't working, and I could smell there are more problems brewing if I continue to work with him. Not that he is an evil person, but he like to be coaxed, like others to bow to his way, and he will probably pay me if I can make him happy (I prefer to keep things professional, ahem ...).

Why did I quit?

The main problem with freelancing is that it’s a repeated full cycle from the ground with each new customer, with is time consuming and high risk (you can’t leverage on something to reduce the effort). Industry wisdom says that to create a sustainable freelance or software business, it all lies with the maintenance contract: knowing you have money flowing in year after year without doing much. Though it might sounds good, but yearly contract also means I take the responsibility to constantly service customers with no escape.

As mush as I like programming, freelancing is still pretty much fulfilling others’ business requirements for a fee, and that isn’t very fulfilling for me.

I found something else which are more interesting and meaningful to me, and I found a way to make a living out of it.

Follow Up

Discussion on Hacker News



Tuesday, September 18, 2012

System Reboot 2.0


A computer could function well for up to 3 years, after which maintenance or upgrading work need to put in place to keep it running up to 5 years; and the same cycle applies to software development.

I develop the first version using raw PHP (no framework, trying to develop my own framework at the same time) with MySQL and plenty of copy and modify JavaScript from other website, and that failed miserably due to high maintenance and low quality work (that version 0.1).

For the next version, I know that I needed a framework, and RoR is pretty hot. I didn’t get to use RoR due to deployment environment constraint, thus I use CakePHP which is a pretty good rail-inspired PHP framework. JavaScript isn’t that complicated about 6 years ago, so just jQuery and plenty of plugins is enough to satisfy the users. The stack runs pretty smooth, except some minor upgrade from CakePHP 1.0 to 1.1, 1.2, 1.3 and I ended at 2.0; eventually a local hosting isn’t flexible enough, thus I opt for AWS.

If it ain’t broken, why fix it?

The current stack had served we well for the past 6 years, and I could probably extend it for a few more years due to the still active framework community and fairly well maintained codebase (after all, I am the only programmer). The benefit of an old stack is that I get high productivity, it’s fairly easy and fast to implement new features and modules because the foundation and supporting library is already there, and I am used to the ins and outs of the system (no more time consuming debugging of a new component). The downside is that I might had made some lousy decisions on how some things should work, and still pay the price to maintain it because it’s too costly to change. The thing is, I don’t know anything bad about the current system, because I haven’t use a better system. I do enjoy the high productivity, but there are always some temptations.

I wanted to develop a new app, and was planning to use the existing stack because it shall be fast and easy. Then again, I admit I am a bit tired of the old stack. I was fascinated by Google App Engine, Python or Ruby, and heard so much about CoffeeScript and Backbone. I might not find the will to upgrade the existing app to a new stack; but if it’s to develop something new, I should probably learn something new as well. Without much logical reasoning, I decided to seek out a new stack.

Reasons for Reboot?


  • Platform: DIY platform vs. managed platform like Google App Engine
  • NoSql vs. RDBMS
  • Temptation of new language: is python and ruby a step forward from PHP?
  • Micro Framework: it less magic and automation a better choice?
  • The rise of JavaScript (perhaps CoffeeScript)
  • Build system for front-end scripts and resources
  • UI and Responsive web design
  • From a publication-centric to user contribution-centric
  • Unloading of old baggage

Google App Engine

I decide to use Google App Engine. I understand the proprietary and lockdown nature of things (with potential of regret if Google screw up), but I do like the idea of being liberated from system admin stuff (webserver and database installation and configuration, security, scalability, etc.). Besides, it had some nice services like Images (Picasa-grade image serving), Memcache and Task Queues. The downside is dependency on BigTable, and with no possibility of exploring MongoDB; though MySql is possible on GAE, but the setup felt like second class citizen. Another downside is I can’t install almost can't install anything on GAE (except pure Python code without disk I/O). There are definitely some advantages and drawbacks, but I choose to let Google handle the platform sociability part.

The road map and bug fixed might be a bit unpredictable, with certain issues remain unresolved for years (fallen into the black hole) and certain feature taking 4 years to arrive. I am hoping things a more matured after 4 years.

Meteor seems like a possible trend, where we don’t even need to manage the webserver or code on it anymore, where the only coding necessary is JavaScript for the browser. Its looks awesome and magical, yet I am not ready to embrace it yet due to the fact that “I lost control of the webserver”, and too much wizardry and automation kind of put me cautionary mode.

NoSql: BigTable

Why use NoSql? It’s because that’s the preferred storage on GAE, and I don’t mind exploring the NoSql way. The big advantage is that you got a really big database where you need it to scale, and schema changing for traditional RDBMS lock up the table big time. I don’t think I would hit such massive scale. I believe there are a lot going on for MongoDB, but sadly it’s not an option opened to me at the moment.

I do like a few cool tricks with BigTable (or NoSql), especially the newer NDB API. It has a few interesting property attributes, such as repeated where you could make a field into list without additional table. With ProtoRPC, you can have enum fields. You can have structured property, it’s like putting another table structure as a column, thus reducing the needs for multiple tables, and inheritance is supported. JSON, GeoPt and Pickle (Python object) are native fields.

The query might be limited (no like statement, no join).

Python

I am bothered by the favoritism gained by Ruby and Python language, and decide to check it out. Language is like a culture (it's about the people and community, with a specific style). PHP doesn’t really have a feature advantage over Java or .NET, I just don’t like strong-typed stuff and enjoy the flexibility of PHP array. Since I am on GAE, python is the way to go for me.

Python style is consistent using underscore convention, with strict indentation and directory structure representing namespace, and elimination of semi-colons and curly braces (which is fine by me). PHP does have a messy naming convention with its core library. I haven’t dig far, with it does have some nice libraries such as WTForm.

Personally, python felt slightly nicer to code in than PHP, and felt more consistent. Another reason is occasional we saw releases of come cool tool and library at Hacker News, and they are usually written in Python or JavaScript. I believe a vibrant community and continuous innovation is important for a language.

Micro Framework

Django is the de facto full stack framework for Python (like Rails for Ruby), but I wanted to try a micro framework instead (less magic and automation). Plenty to choose from such as CherryPy, web.py, Pyramid and Tornado, and I was deciding between Bottle and Flask. I settle for Flask because it seems simpler with less magic, slightly stronger community support and embraces Werkzeug and Jinja2 (good praise from community, existed for a long time). Bottle one file approach didn’t seem like a seller to me.

I really like CakePHP and think it’s awesome, until I tried something more awesome: Flask. It’s lightweight; with less pre-defined structure and more transparency (the code is cleaner, with more control without hacking the framework). It feels more liberated coding with Flask, the blueprints give it a good structure, and flask-appengine-template serve as a good starting point.

The rise of Javascript/CoffeeScript

I realize most of the development work is done on the front-end browser side using JavaScript, thus front-end coding had become more complex and require more structure (a framework). I choose to adopt Backbone (over KnockoutJs and AngularJs) due to the strong community support, with simplistic yet structured nature. I looked in Chaplin for large application development, but I believe the maturity is not there yet, and I would not develop such large application at the moment.

CoffeeScript is love which couldn’t be explained through logicality: it just feels good to code it, with cleaner code, with arguably increased productivity.

Build system for front-end scripts and resources

Front-end web development had gotten more complex that same kind of build or optimization system is required. I started with Brunch with provided skeleton templates which bring me up to speed with the setup, with an application assembler to auto compile CoffeeScript, to merge scripts and stylesheets, with AMD support.

Yeoman seems like a promising star with extra features such as image optimization, might be worth checking out soon.

UI and Responsive web design

It is convenient to utilize Twitter Bootstrap as the UI foundation (grid system, button, forms, etc.). I am still doubtful about the practicality and development cost of responsive web design.

From a publication-centric to user contribution-centric

In my current app (a restaurant review website), I am more focus on publication: the searching and display of information, where the user contribution features isn’t as intuitive as I would like it to be. Think of Pinterest, where contribution could be easily made through bookmarklet.

Unloading of old baggage

Sometimes things are done in a less ideal manner due to inexperience or out of convenience, where we are continuously paying the price through productivity lost, less elegance solution or potential security risk. Correction work seems like too much work for too little value, or it is almost impossible to undo previous mistakes, or the framework is the limiting factor.

To start a new, you get to be plan once more, hopefully with more wisdom and less mistakes.

Conclusion

As a programmer, we always have the tendency to reboot once things started to get messy, or being tempted by new technologies. I admit it’s a bit of both, and I acknowledge the price of productivity lost that I would need to pay, and I do believe the ROI with better design, productivity, performance, features and maintainability is worth the price.

I almost decided to stick with the old stack, but I believe the timing and benefits are at the sweet spot.



Sunday, June 03, 2012

Automatic Adsense A/B Testing + Optimization


Inspired the simple idea from  Steve Hanov’s “20 lines of code that will beat A/B testing every time” (“why didn’t I think of that” moment), I adopted the concept and implement it for Adsense.

The logic:

  • 90% of the time, it will choose the Ad with the highest CTR (click through rate)
  • 10% of the time, it will explore random Ad (based on a pre-defined sets), to determine any of these lower CTR Ad will have a chance of achieving higher CTR
  • The CTR data shall be refreshed once a day (I use the average CTR for the past 7 days)


Get the CTR data for Adsense

  • Use the Adsense Management API, particularly Reports: generate
  • Use the API explorer to test out the parameters and see the results
  • Check out the client libraries and sample code
  • To enable OAuth of offline access (e.g. Cronjob), we need to authenticate/login through web
    • $client->setAccessType('offline'); 
    • $client->setApprovalPrompt('force'); 
    • Store token in a persistent storage for offline/cronjob usage.
  • Store the average CTR for the past 7 days for each ad unit into database.


With the CTR data, the implementation seems pretty straightforward.

How it works
Let's say your are trying to see if A, B or C perform better; it will probably show the ads equally on Day 1, then it'll automatically choose the ad with highest CTR on Day 2, while keeping a 10% random ad to see if other ads eventually gains higher CTR.

Wednesday, August 24, 2011

Dan Bricklin: What have I learned in 40 years of developing software products that people use?

Dan Bricklin is the chap who invented VisiCalc (a spreadsheet app) for the Apple II, and nowadays he seems to have fun making Notetaker HD for iPad. Father of Spreadsheet having fun making productivity iPad apps? Sounds like a wonderful life :)



So, what can we learn from him?
  • What is a Product? to get a required job done.
  • 2 week payback rule: make it a no-brainer for people to buy it (significant cost saving). 
  • General Purpose tool? Meet wider a range of need. Spreadsheet not only does accounting, but you could create timetable and tons of other stuffs.
  • Must Have: people make the decision to buy for something very specific
  • Right channel of distribution: magazine, web, app store, etc
  • What the new power can do? PC make computer games possible, and iPhone made computer games possible while on the move. 
  • Smartphone: Since it's a phone, u carry it anyway.
  • What to leave out (limited by resources or design)
  • Engineering: Keep trying, failing, get it right, make something better that your had dream of. 
  • Many people assume you would fail when you take off (which is statistically proven true). Hopefully you can keep you cash flow on a up-drift path.

Wednesday, August 03, 2011

Web Development Skills

Web Developer used to be a lowly paid bunch as compared to their client/server developer counterparts, until the boom of Web 2.0. Web Development used to be simple, involving only ASP, Access, HTML and perhaps a little bit of JavaScript. If you are a web developer today, you probably need to be equipped with more than a dozen to programming language, skill and technology.

What skills today’s web developers need to be equipped with?
First we have some basic skills
  • HTML
  • JavaScript
  • CSS (don’t underestimate it’s power)
  • Web Development Language: PHP, C# or VB.NET for ASP.NET, Java, Perl, Ruby, Python, etc.
  • Database: MySQL or Microsoft SQL
  • Graphics Manipulation: Photoshop or GIMP skills
  • A sense of design

Server-side Skills (some System Admins doesn't even have these skill sets)
  • Amazon Web Services (and installation of LAMP stack)
  • Linux Commands, Shell Scripts, Configure Cron Jobs
  • APC or MEMCACHE configuration
  • Apache Optimization, HTACCESS configuration
  • MySQL Optimization
  • CDN configuration
  • Load Balancing (1 million visitor range)

And some slightly more advance technology
  • Google App Engine (GAE), using Python, Java or Go
  • Google Maps API
  • Google Web Toolkit, and framework (GWT-platform)
  • Web Development Framework: CakePHP/CodeIgniter, ASP.NET MVC, Spring, Ruby on Rail, etc.
  • Data Abstraction Framework: Hibernate, Objectify, ADO.NET Entity Framework
  • JavaScript Framework: jQuery, Prototype, Ext JS, etc.
  • Database: Google’s Big Table, NoSQL, Amazon’s SimpleDB
  • Chrome Web App Development
  • HTML5: Canvas, Offline Storage, File API, Sound & Video, Web Socket, CSS3, etc.
  • Search Engine Optimization, Sitemaps, RSS, etc.
  • Support for Desktop Web and Mobile Web (Smartphone, Tablets)
  • Support for Multiple Browsers: IE6/7/8/9, Chrome, Firefox, Safari, Opera
  • Flash
  • Social Integration: Facebook Connect, Twitter API, etc.

Supporting Tech
  • Android (A great website probably have a mobile apps as well)
  • iOS
  • Desktop Tool Development (develop supporting tools for offline processing): C#, Java, etc.

I wonder how well a season web developer compensated today, especially in Malaysia. A typical good programmer in US would be paid around USD 100,000 per year (some capable of reaching USD 200-400K). It's quite pathetic that senior software developer in Malaysia get around RM 4,000-8,000 monthly (probably with not more than 1.5 months bonus), but then the rising cost of programmers would put a toll on start-ups.

Thursday, April 09, 2009

Who to run a software company?

I always believe the owner of a Software Company need to be a programmer (or ex-programmer) in order to understand Software Development and appreciate Programmers' Talent. If it is run by marketing people in suit, I really doubt that they could attract the right talents or develop the right product. I used to make it a point if the person interviewing me has no technical background, I would probably not work for the company (as an interviewer, you would fail to evaluate my skill).

I once try to talk about programmers’ need and how proper software development is done to a CEO, but I think he hears nuts from me: either he thinks the extra cost is not justifiable or what I am talking about is just utter crap. I concluded that he would never understand what software development is all about, besides just employing some people and get the work done.

Even if the owner is a pretty good Techie, we still have to pray that he have good business connections, very good luck, excel in sales and marketing or be very cash rich. No matter how good he maybe in running software company, he still need to be able to charm the market and sell something.

No matter what, I still think a software company is a very fragile business as it needs special kind of people in a special environment. If you try to run it like a factory or be marketing-driven, you will kill creativity. Software Development could be somehow chaotic, an art with a lot of unpredictability, worsen by programmers with special behaviors. If you try to impose too much order and procedures, it will kill productivity and creativity as well. If you cannot manage it, your software will never complete or ship.

Nevertheless, a software company should never be run by marketing people in suit as all the good programmers will be chased away and be seen as rebellious child (rather than a great artist).

An interesting read forwarded by Kenny about How Software Companies Die by Orson Scott Card. Simple and straight to be point, something some people would never understand why.

Thursday, January 15, 2009

The Price of Freelance Software Development in Malaysia

As a freelance software developer, there is always an eternal gap in the price I wish to charge my customer versus the price my customer is willing to pay. How do I set my price or fees? There are 2 ways to look at this: how much I want to earn and how much they are willing to pay.

How much I want to earn?

Fresh Graduate Level
Being a freelance software developer, of course I want to earn at least as much as an employed programmer (plus the perks of freedom) . Lets say I am a fresh graduate, so I would earn around RM 2K per month with 1 month bonus and 10% EPF, so my yearly income should be around ((12 + 1) x 2000) x 1.1 = RM 28,600. As a fresh graduate freelance programmer, I would like to earn at least 28,600 / 12 = RM 2383 per month. There are 22 working days in a month, so I must at least earn = 2382 / 22 = RM 108 per day. As a freelance programmer, it’s almost impossible for me to be occupied with a project everyday, so I might be occupied with project 70% of the time (I might be scouting for prospects, doing unpaid work, holidaying or lazing around 30% of the time). For me to earn as much as an employed fresh graduate freelance programmer, I should charge my customer 2382 / (22 x 0.7) = RM 155 per man day. In this case, I would be happy and my customer would be happy as well.

Senior Level
According to some statistic, programmer in Malaysia earns an average of RM 63,000 per year (assuming you had around 5 years of work experience). If I want to hit the average earning, I should charge (63,000 / 12) / (22 * 0.7) = RM 340 per man day. I could still be happy, and the customer might be willing to pay this price as well (thought might not be happy).

Management Level
As I get older and more experience (after working for 10 years), I would expect a better income of managerial level. I would want a salary of RM 8000 with 2 months bonus (10% EPF) and a whole lot of benefit (worth RM 5000 perhaps), thus my expected annual income should be (((12+2) x 8000) x 1.1) + 5000 = RM 128,200. At this point of time in my life, I would need to charge my customer (128200 / 12) / (22 * 0.7) = RM 694 per man day. Most of the SMBs (Small & Medium Business) will not be willing to pay for this price, thus both my customer and I shall not be happy.

How much my customer is willing to pay?

SMB
Most SMBs are willing to pay between RM 200 – 400 per man days based on my experience, and a software house might expect RM 300 per man day for part-time contractor. Some big corporations are quite stingy and thought of software development as a cheap affair (or thought that freelancer should be dirt cheap), thus only willing to fork out not more than RM 400 per man day most of the time, or scrap the project. Sometimes I might to get lucky and strike a deal to be a sub-contractor of a huge project, thus earning RM 600 – 1000 per man day (though I would need to deal with a lot of people politic and late payment).

Software Company Rate

The average market rate for Software Company should be around RM 600, which I personally think is really low; there should charge at least RM 1000 per man day in order to be sustainable, but such demand is not a plenty. Only multinational consulting companies or company with government link would be able to get projects worth millions, while others are scrapping between RM 50,000 – 30,000 per project which take up 3 months to 1 year to complete.

What should a veteran freelance software developer do?
I started to feel the pinch for the past years as I desire higher income and my customers are just not willing to pay my price. Thus I desperate need to change my business model.

Master of One Skill
I could specialize in certain areas of software development, let’s say ASP.NET and be a master guru of it. Others might take 10 days to finish a job, while I only need 5 days (so I actually charge 50% less than my desired rate, while still earning as much) due to my experience and availability of tools and existing code. For this to happen, I limit my customer base (.NET technology and web-based only) and I need a lot of customer in this segment to make up the volume.

Build a Product
This is easier said than done. For this to be successful, I need experience or exposure in the usage of such application, and with strong capabilities to market and sell this product. I might need only 2 freelance projects to survive per month, while I need to sell 50 copies of my product per month if it is RM 200 per piece. If I fail, I loose my investment of time and effort between 3-6 months. This is not a game of technical skill but a game of sales and marketing, and product market is more competitive than freelancing.

Future & Hype Technology
This requires big money (venture capital fund) to create something really great or flunk. Think in the line of Google, Yahoo, MySpace, Facebook, YouTube and etc. You either try to create a great piece of technology, or to create a social network which attracts millions of visitors. This is the hardest, with highest failure rate and greatest reward.

Conclusion
It seems like freelance software development and consultation might not be ideal for a veteran programmer expecting a higher than RM 100,000 annual income, unless he had a bunch of rich customers or network with big projects stakeholders.

It’s time to improvise and try something less conventional or conservative. Be it product development or future/hype technology development, I desperately need to think out of the box to ensure my continuous satisfaction and survival.

Monday, August 04, 2008

The Agony of Software Business for Malaysian Market

I had work for 2 software companies before, and even try freelancing for 2 more years, and I would say the future of software business in Malaysia is quite bleak in general, but you could still do it with a few strategies in place. There are a lot of opportunities, but the problem is with the expectation and price (market problem).

I first worked in a R&D company, got some funding and developed a few cool technologies, but just couldn’t sell it. I blame it on the weak sales and marketing team, but even a resourceful man from England also fail to help us. I know of another R&D company now doing almost the same thing, and I seriously have my doubt that will they ever make it as well.

My second company is sort of a software business consulting company, from a large group of companies. She didn’t do very well targeting private corporations, just break even and making losses at later stage. Too many demos and unclosed deal, and non-profitable deals in place due to poor pricing. At the end, they focused on overseas projects and government agencies mostly to keep afloat.

Even during my freelance years, SMB customer are probably willing to pay between RM 2-5K per small projects which aren’t really small, where everyone is a feature creep. RM 10K rarely happens in SMB, unless it is something big or long term. It’s something to do with awareness and “education”. A full-fledged accounting software, or Windows XP/Vista/Office only cost me around RM 1K, how to justify to pay you so much for a simple piece of software which does much less? “But we customized it for it, and you can’t get it out there.” Is it cheaper if I employ someone to build this for me? You charge me RM 8K for a 1 month job, while I can hire someone for 3 months with RM 8K. The price and expectation kill it all. Freelancing for SMB used to be feasible when I was much younger (or for parttime), but I can no longer afford such cheap rates nowadays.

So what is the real problem here? I think there is basically one main issue: Typical Malaysian thinks software development should be cheap and easy, like UBS accounting software. The fact is: it is neither both for most cases. Software development is a complicating process, it is not just about coding. It's understanding the business need better than the owner, control the owner from over-blowing his own budget to build a white elephant, coding with tons of testing (the easy part), tweak it to suite the onwer's personal taste while trying to satisfy the needs of dozen of users, entertain everyone request for changes which leads to more issues, more testing take place, more changes take place again, standy for support, repetitive explanation to everyone as if you are the business onwer who come up with this project, and maintain "professionalism" and deliver high-quality "almost bug-free" software, come up with something not only fully functional but look pretty as well (beauty lies in the eye of beholder), and attend more meetings to brief everyone and understand the business better, and continue to be on standby as well.

So how does other Malaysian software company make it then? Yes, there are ways:
  • You could build generic and cheap software like UBS accounting and trying to sell to 1000 people or more
  • You could target overseas market: though it’s still a 2000 dollar job, SGD 2000 or USD 2000 is much better than RM 2000.
  • You could be the vendors of big IT budget companies, like the Government Agencies, Financial Companies, and Oil & Gas Companies
Basically, work with people who needs you and can afford to pay you well.

Friday, June 13, 2008

Why ASP.NET sucks (and there is Hope)


I think ASP.NET really fuckup big time. I tried at least 3 development projects with it, and I found the whole package doesn’t really speed up my development time, plus it’s no fun and excitement.

Page Controller Architecture Sucks
First of all, the Page Controller (or Model-View-Presenter) method used by ASP.NET 1.0 and 2.0 is so out-dated. Once you try your hand on Model-View-Controller (MVC), especially Ruby on Rail (I tried it more than a year ago, and still find it fascinating and refreshing), there is really no turning back. Personally, MVC increased both productivity and fun level by at least 50%.

Desktop Application Framework (and Controls) on Web Sucks
The thought of Microsoft trying to emulate desktop development framework (like VB6 with forms, controls and events) on the web really screw up the whole development experience. I hate the idea of the entire ASP.NET life cycle thing (which causes a lot of cannot do and inconvenience), and the event things doesn’t really work very well for dynamically created controls (you have to re-create the controls even though you don’t need them in order for the event to be fired, then you destroyed the controls and created new ones based on the event, which is a total waste of effort and processing cycle). And those damn controls are so bulky (generate a lot redundant HTML code) and take a lot of effort to customize, and none of the commercial controls out there is really outstanding (I tried Infragistic, it’s not really great). And the use of skin file for UI customization (such as color, padding, etc) is really not as good as CSS. Even though they try to remedy it with CSS Adapters, but it’s too late of a patch work.

Where is ORM?
Where is the Object Relational Mapping? I have to write damn lots of database helper class, write my own Model/Entity class and mess with even more SQL statements. I want the Model/Entity to be automatically generated, and all the common SQL command ready to be used as methods. And also some easy syntax to specify the relationship between models. They nearest they got is Strongly Typed Data Access (using XSD), which is too rigid and very difficult to customized.

Strongly-typed Variable is not too smart
I really like VB (and VB.NET), because they take care of the internal/implicit casting (some might argue it's bad, but it save time and it's right 90% of the time) for you (short, integer and long can be interchanged easily). C# is really a pain, where it demands you to do a proper casting (you can’t assign integer to long or vice versa). Too bad VB syntax is too lengthy, and C# is too damn strict (and not really smart). Scripting language is far superior in terms of speed of coding. I don't mind case sensitivity (make the code cleaner) and variable declaration.

Wastage of Processing Cycle
ASP.NET AJAX is really easy to use, but the solution is quite pathetic and really inefficient. Basically the AJAX called the entire page again but only refreshes a specific portion. In fact, the entire ASP.NET package is a good waste of processing cycles, especially for events.

Loose Control of HTML and Javascript

I know the whole thing about web development is a big giant, with HTML, Javascript, CSS (thus ASP.NET try to do abstraction on it so that VB developer could survive). To be frank, what kind of web developer are you if you cannot take control of the HTML and Javascript (and make use of jQuery). We all have to learn HTML and Javascript, and manipulate them wisely. We don't need protection and subsidies!!!

There is hope!
The good news is, MVC is becoming popular on ASP.NET, with MonoRail and ASP.NET MVC in the picture (and comparison). MonoRail had been established since 2003, and ASP.NET MVC just started by Microsoft. Microsoft really has to nail this right, and I am afraid they have done too many wrong with ASP.NET. For ORM, maybe we can look into NHibernate vs. MS Entity Framework/LinQ (and comparison).

I like the .NET Framework, Visual Studio and C# (perhaps speed of development friendly. I do agree that VB.NET is really a developer's good friend, besides the lengthy syntax).I am not really a ASP.NET fan nowadays, but sometimes I am “forced” to work on it due to customer’s demand. I might explore these options next if the opportunities arises.

Tuesday, June 10, 2008

What technology a web developer need to know?




I think I am a techie at heart (much like Steve Wozniak, be a techie for life), at least of the software programming side. Always looking for the next cool framework with a WOW factor, and also to know there is a world outside Microsoft ASP.NET and Java. I was once quite impressed with Java's Spring, Hibernate and Struts, and also .NET's Web Client Software Factory (WCSF) and Enterprise Library.

Now I really like scripting language and MVC-like framework such as Ruby on Rail (RoR) and perhaps CakePHP (similar rail framework, suitable for existing PHP developer) for it's speed of development.

What else impressed me as a web developer? Yes, jQuery the javascript library. Maybe prototype as well, but I got a feeling jQuery might win the war. The javascript library actually make javascript usable on most platform, a lot easier and more powerful. Ahh! AJAX, so simple yet with some much usability.

What next? Something called Rich Internet Application (RIA), something more interactive than AJAX, an application on your browser, something like flash but with more power to the developer. The two competitor around is Microsoft .NET Silverlight and Abobe AIR. I trust Microsoft’s developer tool such as Visual Studio, with a good language such as C# and strong developer support. Abobe AIR (with Flash & Javascript) is really a surprise. I never quite like development on flash using ActionScript and Timeline, but it is the most popular RIA around (with good support from the designer & art community). The good news is they have something called FLEX, with Eclipse (good!) as the IDE.

Personally I think Silverlight is not ready for big time yet, but it does have a lot of potential (with Microsoft + VS + .NET + Developer Support). Adobe AIR (or rather Flash) had a head start, and ready for deployment sooner than Silverlight. If the support for development is really good, Adobe AIR could really come up as a surprised winner. BTW, Adobe AIR could be run as a desktop application as well. I like the idea of scripting, only if it’s a powerful and easy to use scripting language.

The problem with RIA is that it’s not search engine friendly (meaning search engine can’t read your content, which is really bad for web traffic). Maybe it is not meant for a community portal or online content, but rather an online application which serve a specific purpose. Perhaps an online accounting software or online leave tracking system or ticket booking. Do you think there is an opportunity to win by technology used?

There is Google Gears as well, to build an offline web application (maybe Google Desktop use this).

So much technologies, so much possibilities, so little time. I am into RIA at the moment, I kinda know what silverlight has to offer, and I am very curious about what Adobe AIR had under its sleeve. I need more TIME!

Tuesday, May 20, 2008

Software Shipping Date that keep Slipping

How many times that I wanted to complete a software project by next week, but end up finishing it days, weeks, months or years later. That’s the irony of software shipping that which even Microsoft’s Windows Vista have to slip by years and still fail to reach perfection (or decent usability).

I wanted to revamp MMW Property to have the same functionality as MMW Food, which shouldn’t take more than a week to do (programmer’s optimism kicks in). Then I found out that the framework I am using had been upgraded to version 2, so I decided to use the latest version (oh no!) to ensure continuation of support and better feature, and perhaps cleaner code. As usual, the migration path isn’t exactly smooth as expected (but constantly being denied). Since I am in the process of “upgrading”, I might as well make the code more reusable, thus putting in lots of effort to make them modular in hope that it might benefit me in the future.

Days and weeks just slip by me and I have yet to complete the work, and my attention is required to attend to other projects in between. I “planned” to finish it by end of February, but I only managed to deliver the minimal version by middle of May. At the end, I have to cut features and do the bare minimum just to push this product to Live mode. In the last few days before Live, no matter how much features I cut and how hard I push myself through the nights, I just couldn’t finish the work by that day itself without at least a few more nights of delay. That’s the curse of software development that it just couldn’t be delivered on time.

So, what caused the delay? I would probably say Changing of Framework, Too Reusability Conscious and Interruption by other Projects are the main culprits (but I might not want to sacrifice them). Software Development for my own consumption might need to go on and to be maintained for years to come (by Me!!!), thus I have to make sure it could be maintained properly and remain extensible for the next few years to come. But doing too much is no good as well, as we spent so much effort on something which we might not have the opportunity to reap the benefit in the future.

One thing is for sure, if the deadline is the utmost priority (where you would be screwed or not paid for being late), then please don’t develop/upgrade the framework. If time is scare, screw reusability. Just focus all your time to develop what the project requires you to develop, not spent your time developing a master piece. And that’s the main reason most software are so darn difficult to maintain out there, because we have demanding customer which want the product to be delivered yesterday. Isn't not totally the customers' fault as well, just that software development could get pretty tricky at times (what to gain and what to give up on). But if they slightly more fate or being more understanding, that would help greatly. If the deadline is not negotiable, then prepare for all hell break loose.

Anyway, MMW Property is out, I am happy and would probably need to spend another week to touch up, followed by years of enhancement and maintenance.

Friday, May 09, 2008

Lightning Speed of Scripting Language (PHP vs .NET)

Now I recall an old article about the original developer for Yahoo Store, where he utilizes the flexibility and development speed of LISP to beat his competitors. It bring to light one thing, you could actually win by technicality, or by choosing the right programming language.

Nowadays everyone is using .NET or Java, which is pretty good languages. But I realize one thing; development on these languages is slow, it too bulky and move like a giant (VB6 is fast for development, but not so good for big projects). I have to make proper declaration, handle type conversion, too OO centric with all the patterns, compilation with its strict language rule and etc. Slow? No way. You will know that it’s slow, until you found something faster.

I was first impressed with the development speed of Ruby on Rail few years back. I tried it and found it to be quite enlightening and fast in development, but the language and platform isn’t quite matured yet by then. I like PHP as a language (cool and easy, with reallly intuitive function), but it lacks a good framework like Rail, until I found CakePHP. Its libraries and resources on the web is pretty abundance, and the platform is pretty common and efficient. The language is cool and useful, and scripting is fast and easy to develop. CakePHP Framework which was inspired by Rail is pretty good, and the MVC pattern is really good for productivity. I do a lot of ASP.NET development as well, but I feel that I could code faster and better on PHP on Cake, at least by 50%. I could push out a new feature in a day or two, and deployment is a breeze.

Scripting language is not perfect, but I think it suited well for web development given a proper framework like Rail (MVC style). .NET is pretty comprehensive and powerful for Desktop Application development. Now I have the same feeling as Paul Graham while he was at Viaweb developing the soon to be Yahoo Store.

Wednesday, October 31, 2007

Review: The Business of Software

This is an above average book about software business, which gives a pretty good insight into Service Company and Product Company, and also what to lookout for in running a software business. It’s not great, but nevertheless a good read as well.

---

It seems like being a Service Company (customize solution and consultancy, think Formis) or Product Company (actual product, think UBS Accounting) have an equal chance of success. It is not so much of choosing between a Service or Product company, but how much to emphasize on them at different time. But what about those Social Networking or Online Advertising kind of business, it seems like a new hybrid of Service+Product (create a product to provide service, and you generate income not by selling your product, but selling your service, or popularity).


When we are small (which I am now), we should be more Product Centric, focusing on Best Product, Ease of Use, Elegant, Cheapest Pricing, Unique Functionality and etc. When we are big, we should focus be more Market Centric, focusing on Largest Install Base, Most 3rd Part Support, De Facto Standard, Lowest Cost on Ownership and Best Quality of Support.


Creditability is utmost important, defend it at all cost. If you loose your creditability, you loose your customer.


Eat your own dog food = User you won product.


Niche market and new platform are the best places to look for new software product and service opportunity.


The goal of every software company should be to establish large and growing revenue that are recurring through Service and Maintenance Contract, Upgrades and Complementary Product.


Software service company should always remain profitable if it manages head count and expenses carefully.


Some Rules
  • Assemble allies
  • Pre-empt competition, through rapid design cycles and penetration pricing
  • Manage customer expectation with aggressive marketing, public road map and easy product announcement
  • Don’t become complacent, continuous product improvement
  • If you are out of the Standard, try to compete on Price/Performance, Quality and Service

A Strong Startup (though I agree with the idea, but I am not sure how to achieve it)
  • Strong Management Team
  • Attractive Market
  • Compelling new product, service or hybrid solution
  • Strong evidence or customer interest
  • A plan to overcome creditability gap
  • A business model showing early growth and profit potential
  • Flexibility and strategy and product offering
  • The potential for a large payoff to investors

Tuesday, August 15, 2006

XNA Game Studio Express: Easy and cheap way to build a game


Talking about the ever rising skill and resource requirement of game development, it might seem that Microsoft might have done something right for the game industry with XNA Game Studio Express. It is free and enables quick game development on PC Platform, and might support portability and distribution channel to XBOX 360 in the near future. Good news huh? Imagine building my own game and share it among friends easily.

I think this is quite a good move, giving a free and easy tool, and creating a community and sharing of resources for faster and easier development. It kinda bring a new life to Indies game developers, and hopefully a lot of weird and innovative game titles will pop up at the Xbox Live distribution channel to add more varieties to the genres and styles of games. I believe innovations shows out most frequently with Indies developers (though might not be polished), because they want and can afford to take risk.

I still remember the days where the Tribes 2 engines is offered at only USD 100, later renamed to Torque Game Engine and it help Indies game developers publish games with the help of GarageGames. I was so tempted to buy it and build a cool games with some friends, but I guess the project is still too huge for us to handle. Perhaps XNA could reduce the challenges and effort required in order to build a fun game.

What is XNA Game Studio Express?
  • A development IDE based on Visual C# Express 2005, bundled with XNA Framework, 3D tools, starter-kits and demo for easy game development on Windows and Xbox 360.
  • You can build commercial Windows game using the express edition, but not for Xbox (you’ll need the professional edition)
  • To develop, debug and/or play games on Xbox 360, you will need to purchase a XNA “Creator’s Club” subscription (USD 99 per year).
  • More FAQ.
The effort is still at its early stage, thus a lot of infrastructure is not ready yet, but the future looks promising for Indies developers, hobbyist and most of all, Xbox 360 and Windows.

Friday, August 04, 2006

Programming Language Market Share and Trend

As a programmer, haven’t we sometimes wonder what is the most popular programming language out there? Or perhaps we are more interested with which get the highest pay or demand. I guess we know Java and .NET is the up and coming corporate standard, while C/C++ will always be there for performance, and PHP, RoR, Perl, Phyton, Lisp will be for open source, small business and of course, real web hackers. And of all languages, Javascript is becoming very important as web application becomes more demanding, popular and powerful.

Though we have a rough figure, but wouldn’t it be nice to have statistic to reinforce our thoughts? (Taken from O’Reilly Radar - Programming Language Trend). Anyway, these stats are based on O’Reilly book sales.


Java seems to be the big thing, looking at the tons of books on the shelf. Sometimes I think Java is just too huge, or tries to cover so many areas and do so many things. Why is Java loosing out? Perhaps it is getting too big and too enterprise and confusing? VB is loosing its grip, probably due to the introduction of .NET. But I still like VB 6’s simplicity and high productivity, though sometimes could be irritating and being less powerful. C/C++ is steady, but seems to be declining. Could it be due to C#? PHP is going steady, Perl is loosing out, SQL going up slightly and Phyton going down slightly. Ruby and Javascript seems like up and coming, due to Ruby on Rails and Web 2.0 hype.

I am a believer of C/C++, VB (could last a few more years), PHP and perhaps, Ruby on Rails.

---

Another way to look at Market Share: Programming Language Trends via Google

Thursday, August 03, 2006

Ruby on Rails (RoR) Deployment/Hosting could be a Pain

After recovering from my obsession to find my “Perfect” blogging software, today I fall into another obsession to find a “Perfect” web framework.

I have been following the buzz of Ruby on Rails (RoR) for quite a while, and recently had been getting my hands on a few tutorial and instant fallen in love with it. RoR is perceived to have high productivity gain, with an almost complete suite of web framework (Rails) and backing of a powerful and clean new age language (Ruby). It gave me quite a good impression, though I had not developed anything serious with it (neither had I master it), but I am planning my next project on it.

One major drawback of RoR is deployment. First of all, there aren’t many web hosting company out there support RoR, thus it won’t be as cheap or as common as PHP. Luckily my web hosting company is quite innovative and supported RoR few months back, thus it kinda motivate me to give it a spin.

I have no idea how to deploy a RoR application, thus I copy my entire application folder to the server and that didn’t work. Luckily the web hosting guys is quite helpful and gave me a shell account (more power, muahahaha).
  1. Login into my shell account, and go to my web folder
  2. run “rails app_name”, using the same name as my application
  3. Configure database in config/database.yml
  4. Replace the entire app folder
  5. Go to http://server/app_name/public and a Ruby page is shown (since my application is not properly configured yet)
  6. To test whether RoR is working or not, just go to one of the controller and test it out, such as http://server/app_name/public/recipe/list
I know, the above configuration is not secure and does not look elegant, but I just wanna make sure RoR can actually run on my server. But I found that RoR on standard CGI on Apache is really slow as compared to my PHP application on the same server. Thus I research a bit and found FastCGI, thus I tried to configure it but fail (return me with some 500 Server Internal Error). So, I am stuck and hopefully some handy technical support guy would be able to help me.

Upon further research, I found RoR is actually quite messy in terms of deployment and hosting. In order to have reasonable performance, they have
  • FastCGI - language independent, scalable, open extension to CGI that provides high performance without the limitations of server specific APIs
  • SCGI - a project to replace CGI and FastCGI with a simpler protocol to both implement and manage
  • Lighttpd - a fast web server that is very similar in speed to Apache 2.0 MPM-Worker on Linux
  • Mongrel - a fast HTTP library and server for Ruby that is intended for hosting Ruby web applications of any kind using plain HTTP rather than FastCGI or SCGI
This is actually bad news, with so many choices out there, each using different technology and approach, and no clear leader in sight. Frankly, they should have just continue with the approach of apache module such as FastCGI (or perhaps SCGI), where apache had a large install base and perform reasonably well. By introducing a new web server to compete with Apache will kinda dilute the market and create more branches, thus causing more massive confusing options in the market. It seems like supporting Apache is a reasonable way to do this, such as what PHP did. With more branches and technology options, it is gonna create havoc and confusion for RoR deployment.

At this moment, RoR deployment and hosting is not straightforward and neither well supported. RoR could be fast in development, but it might have drawbacks in performance and deployment/hosting.

As such is the life of bleeding-edge technology, there are bound to be lots of technical obstacles and non-standardization. Competition is good, but there is lots of casualty during the war. I still remember when I get my hands on PHP 5.0.0 and start coding on it, and yet couldn't find any cheap web hosting company which supports it. Thus I revert everything back to PHP4 which is well supported and supposing run faster.

There is a price to pay for bleeding-edge technology, go there only if you are well prepared.

---

Forgive me for my slight ignorance and lack of knowledge. It seems like Lighttpd and Mongrel can work together with Apache through its mod_proxy_balancer module. So, it depends how well your web hosting company configured RoR for you, or how difficult is it for you to configure the optimum setup for your box. Anyway, there seems to be a growing trend to ditch Apache and use Lighttpd instead, which might be bad news for market stability

Anything which worries me is RoR performance, it may be fast to develop, but it may not run fast. RoR with Apache + CGI is definitely is no no, as it crawls and abviously slow. I am not quite sure about Apache + FastCGI, it should be slightly better, but there seems to be better (and more complicated) options out there.

Framework Performance for Symfony on PHP, Rails on Ruby and Django on Python should be quite a good read.

Monday, July 31, 2006

Freelance Software Job in Malaysia: Specification Document

Once upon a time, there is a craze about software freelancing in Malaysia. Every Tom, Dick and Harry think it would be cool to finish college (or go just half way through), do software freelancing, earn tons of money and be our own boss. Anyway, a good programmer should be able to write about 99% of the software required by the business world out there. So, since we can deliver the service quite well, why work for others which do exactly the same.

After a few years venturing in this business, I slowly discovered the challenges of this business, and it might not seem promising as a long term career. When we are doing freelancing, we are actually running a business, and programming is just a fraction of our job scope. We have to do some PR and Marketing (word of mouth usually), find some work, collect business/system requirement (what need to be build), decide on the price and negotiate, develop, test, deploy and support. As you can see, the sales cycle is pretty long, and software development is a small fraction. So our skill as a good programmer only provides us 10-20% of advantage, and there is a lot more to pick up to be successful in this business.

Let looks further into the challenges of this business.

Specification Document
When you work in a big software/consulting house, you have corporate clients and nice thick system requirement documents are produced to cover your ass before you start programming. When you do freelancing, most of your clients is SMB/SME (small and medium-sized), and it seems almost impossible to create a complete specification before start of work.

When you meet up for system study or collect system specification, they usually tell you their requirement verbally, or if you are lucky, you have a few sheets of paper with some sketches and points. If you ask them to create the complete specification to cover every aspects of the system before you would start work, it would seems almost impossible for that to happen, and even when it does, the specification wouldn’t be very useful. Why?
  • The customer have a rough idea on what they want, but they don’t know exactly what they want, and definitely don’t have the details for you (you have to help them make some decisions and suggestions)
  • Somehow, full blown specification documentation is tiring and boring. Remember, this is not a large corporation, and people are not used to such procedure.
  • Even if the guy is hardworking enough to create a full specification using his imagination and assumption, the specification wouldn’t be really accurate in reflecting the system actual needs and users’ expectation. At the initial stage, we can’t foresee a lot of things.
  • Even if the full specification is created with good accuracy (does this ever happened?), it still will not cover you ass totally. A specification is still a specification, it can never be complete and it never will. The clients will eventually require something which might not be covered (or vaguely covered) by the specification, and he wouldn’t be very happy when you tell him you can’t do it because it is not covered in the specification (or you wanna increase the fees).
So, is a specification totally useless? Hmm, not really. We still need a basic specification (does not cover every imaginable aspects), as a point of reference on what actually need to be done and delivered. You can be sure they will ask for more, and lots of changes as well, so be prepared for it. Whenever they raise something which is not within the original specification, add it into the documentation. Whenever they request changes, add it into the documentation. Label what is covered originally, what is chargeable and what is free of charge. This document is important to give the client an overall pictures of what they had actually done and requested, and it kinda helps in price negotiation if the needs arise (it does cover your ass, just not entirely, and negotiation skills kicks in at this point).

Basically, no one is gonna read a 100 pages specification, but people will take notice of a 5 pages simple specification in point forms with drawings, well labeled and categorized using color for the changes and request along the way.

Why not to create a 100 pages specification?
  • No one will read it once it crossed the 10 pages hurdle
  • It takes a lot of time to write that, and you are not paid for it (and the customer aren't going to write that for you, or pay you to write it)
  • Does it matter if a requirement in in a specification or not? If the customer wants something, it needs to get in there. If something is good for the system or uers, you should put it in nevertheless. So what does the specification governed?
  • It is impossible to cover all grounds, and changes will happen, so just accomodate it along the way (you can't anticipate everything before it starts)
Again, specification for SMB is supposed to be simple and straight to the point. Record down:
  • What need to be developed initially (original specification)
  • What changes had been made along the way
  • What additions had been made along the way
  • List down components which are FOC, to show your goodwill effort
  • List down components which require a lot of extra effort and chargeable, and justify (and the FOC section does helps)
I know, I know, a lot of the items listed above are covered in other type of documentation. So? You don't need more documentation to confuse and burden you and your customer. One document to rule them all. Remember: simplicity, readability, useful and most of all, show your values and helps you get what you want. Forget about the formal methods they taught you in school, those are just meant as guidelines and references.

So, how to fully cover my ass? I am afraid this is not possible. This is business, in fact business with SMB, and it is partially done on goodwill and trust basis. If you don’t trust them, or if they are very difficult to handle or being unreasonable, cut your losses and pull out, no matter how desperate you are (unless they are paying you BIG MONEY). Since the specification document can’t cover our ass, we need goodwill and certain level of trust and confidence. My mantra is if I satisfied their needs and do a reasonably good job, they will be more willing to pay my fees.

I am afraid specification document is just a small part of the initial stage. I’ll try to cover next areas such as
  • Who you shouldn’t deal with
  • How to decide on the price and negotiate
  • Business Application Development
  • Testing and Deployment
  • Support is inevitable