Entries Tagged 'Planet' ↓
July 21st, 2010 — Planet, Uncategorized
A new version of Rhotoalbum, a simple but powerful photo album generator written in Ruby, has been released.
The version 0.8 contains a number of features (well, after two years) like RSS support (try with cooliris), options per album, pagination, cool thumbnail effects for photos and album covers and improved album cover managing.
The project web page [...]
April 2nd, 2010 — Planet, Uncategorized
One of the most common ways how to control a command line application is to use options, e.g. almost every command line application would understand -h or --help or /? (common in the MS-DOS world) as a request to show some instruction.
Ruby (but also other programming languages such as Java) has a basic support for [...]
March 29th, 2010 — Planet, Uncategorized
Flickr is a well known site for sharing photos and it is one of the most popular sites that published their services and allow to use them freely.
It is not necessary to work on a photo uploader, photo printing site or a mashup solution to become an user of the services. Sometimes it is interesting [...]
December 14th, 2009 — Planet
According to last week's Economist, the United States Air Force are buying 2,200 units of Sony PlayStation 3. The idea is to get a cheap hardware (subsidized by SONY as their actual revenue comes from selling the games), install Linux and have a super-powerful cluster at 10% of the normal cost. I've had a similar idea last year - coming out the economic boom left me with number of spare notebooks and number of customer needing a server but with advancing recession with less and less money for a new one. Out of necessity I set up temporary servers using my spare laptops. While I did expect some problems - like failing hard drives, performance issues and so on... surprisingly enough 1 year later not one of those laptops/servers failed. Not only that - I even found the performance on a par with my other
regular servers.
That got me thinking...according to the Moore's law the computing power is doubling fast enough to make last month's average laptop faster than last year's high end server. Over the years I've worked with number of servers and number of brands - from Dell, through HP, Compaq to NEC. Strangely enough, no matter how expensive the server (or any computer for that matter) - the only sure thing is that it will break. E.g. I use MacBook Pro 17" that cost me over $5,000. Yet, everything (with the exception of keyboard) has already failed and I spent on repairs more than the initial amount. Just the display with the motherboard was more than $4,000. The worst thing about it was that every time something happened the notebook spent at least a month (up to 2 months) in the workshop. My old Dell notebook broke down just as much and it used to be very frustrating to wait until the next business day for technician to come to my office and fix it. Having to actually go to the workshop, spend 1 hour there + 1 hour on the way and have your bloody expensive notebook taken for a month... Anyway, the point is that even my high end servers fail. I once had 4 out of 5 hot-swap SCSI drives fail at the same time. Another time just 3 of them did. At the end I found it much more important to prepare for the hardware failure than trying to prevent it.
Coming back to the cheap notebooks - you can get a reasonably good notebook with 4GB RAM for around $800. With Dell's next business day service (or even better the 4 hour service) you pretty much don't have to worry about it for the next 2 or 3 years. Should anything happen you can simply swap it for a spare one. This actually addresses whole set of points and issues I face with conventional servers. The installation and troubleshooting usually requires a senior person going onsite wasting at least half a day. The notebooks, on the other hand, can be pre-installed in the office and simply delivered to the customer by a junior staff who just needs to plug it to the network and everything is done. I still remember moving 4U servers (54kg each) a few years back. This obviously requires a proper backup strategy. The software part of which (i.e. what to backup and when and how and offsite strategy) is the same as on a regular server. For faster recovery in notebook servers I clone the drive to an external USB drive and have the backup copied also on this external drive (pgpool-II is really great for this). The cloning can actually be automated on monthly or weekly basis to have a reasonably fresh image on the external drive. If the drive fails (by far the most common thing on my servers as well as notebooks) all that needs to be done is to replace the drive. This takes a couple of minutes on my Dell and Compaq notebooks and even a non-technical person can do it. Once the system is back on-line, with everything installed and the backup conveniently on the drive, it takes less than 5 minutes to restore the database and deploy the latest revision of the system. And of course, can be done from anywhere.
I am not saying that notebook servers are fit for every situation - I am only saying that they're fit for most of our customers - situations where there's limited number of users (typically around 30 - 50) and most of them in the same location. While the internet connection for businesses in SG is as slow as it is expensive, it still still usable for even several offices accessing the system. I am still finding it hard to understand why in such a high tech place like SG it costs around $100 a month to get 100MB downstream/10MB upstream for residential connection yet it costs over $200 to get 1.5MB down/374kB for the office. There's so many initiatives for bringing internet to consumers - from free Wireless@SG, through iCell's lighting up East Cost Park and food courts, internet on the buses to great quality and dirt cheap 3G internet (I pay $20 for 50GB a month) - yet there is very little for the content providers. There's been a big push coming from government and SingTel for cloud computing. I haven't really heard of any local cloud provider worth mentioning - there are several offering either ridiculously high prices or ridiculously low specs or both. We've been using Rackspace's cloud servers ever since they became available - besides the lowest price they offer really great support - yet I've been moving more and more customers away to the notebook servers - from the peak of 19 servers I now only have 4 left. The main reason is actually price/performance ratio. My usual application requires (at least) 1GB memory instance the price of which comes to around S$70 (around 50 USD) which comes to around S$800 a year. The problem is that 1MB instance is sufficient only for average performance - it is not enough during peaks - and even small performance hiccups during peak result in great frustrations for the users. As S$1000 can buy you a 4GB Dell with next day on-site service for 2 years - it's quite compelling - especially when budgets are tight.
November 29th, 2009 — Planet
I don't know what is wrong with me but, somehow, I ended up on an underdog technology again. With the recent and still fragile recovery of the economy we've seen a lot of interest for mobile access to our applications. As our applications are web based the basic access is there but with more and more sophisticated smartphones just simplified CSS and layout that fits the small screen doesn't cut it anymore.
I've been using iPhone for quite some time now. Besides the usual stuff everybody would do I also spent some time testing out the API for the kind of boring business applications we do. While the basic search/form screens are pretty easy to do (I can hardly imagine a platform where that would be difficult) I hit quite a number of problems with more complicated apps. While most of those issues disappeared on a jail-broken phone, I can foresee some resistance asking my customers to jailbreak their 20 phones. Technology issues aside there's still a major problem with distribution. Pretty much the only way to effectively distribute the iPhone applications is through AppStore, which may not be the most ideal way for our kind of applications used by a few people. While there is an enterprise license that allows private AppStore it's available for companies with minimum of 500 employees...
Thanks to the CodeXtreme competition I got to play with Android. Of course, it doesn't feel as 'cool' as iPhone...which, luckily is not so much of an issue with enterprise apps. Despite the fact I was happily (almost) Java-free for the past 4 years I found the java based development to be a positive thing. Not only because Java has become THE language at universities around and even fresh grads don't feel totally lost and overwhelmed by a completely new language and environment but I actually found it quite efficient for writing our kind of apps. There's already quite a number of open source apps around that can help with inspiration or solutions to many problems. To mention freedom...Android allows me to do whatever I need or want without any artificial restrictions. I have to do whatever the customers require and it's quite enough to fight with actual constrains, like screen size, Internet connection, GPS timeouts without having to worry about someone's idea of what should or should not be allowed. On top of all that Android not only allows me to do whatever I want - it actually allows me to deploy my apps. The distribution channel is open (not to mention free). While I understand the arguments for AppStore as a guardian of purity and quality of distributed applications...it's not really workable or applicable in my business.
My point is that just like with many other technologies, smartphones are slowly moving from home user to corporate user. And corporate users have quite different needs and expectations. It's not so much about coolness and effects as it is about getting the job done. Whether it is to access CRM, process on-site sale, collect data, fleet/position monitoring, authenticate access... Currently, we're working on a few bigger projects with Android integration. Two of them are mostly for data collection. While data collection has been around since like forever - a simple integration of camera, barcode scanning support, GPS and immediate data update on the server gives it a completely different dimension. Instead of waiting months for the paper forms to be processed you have instant results with a lot of important metadata. You can immediately see the trends and adjust as you go. The rest of the applications we're working on utilize GPS (location based systems). Just recently, the government implemented a system for tracking social workers. They fixed an RFID tag on the doors of senior citizens that the social workers need to visit. The social workers are given portable RFID readers and on arrival to the place they scan the tag. On their return the scanned data is synchronized with the system to plot the social worker's visits. We've got similar requests from a number of companies - from courier companies, through transportation companies to pretty much any company that provides delivery or onsite services. In many such cases it's not an option to use RFID (aircond repair shop can hardly put RFID tag on all their customers doors). While there are solutions for fleet tracking, the cost of $200 per vehicle per month is not only too much for a small company but it's also tied to a vehicle. While the AGPS is far from perfect even with all the timeouts and wrong position readings it still can provide quite accurate and very timely position.
The technology usually doesn't change in the vacuum. During the previous economic boom we were replacing DOS and Access based applications with web based systems thanks to the rise of cheap Internet and cheap portable computers. Most of our clients (especially business owners) didn't initially really grasp the advantage of being able to access their applications from anywhere - what really mattered at the end was that they could access it from home. After all, they've been working from the office their whole lives - as that's where all the resources and all the data were. Then they slowly started using the systems from outside the office...you know check customer's phone number, check the order status because they got a call from customer...soon they were leaving office early able to do parts of the work in evenings from living room, coming in late - being able to check sales, invoicing, bills, attendance, work orders or any other operational details from home just as well as from the office. Today, the same customers have smartphones...not just because it's cool - but because they can access their data from ANYWHERE...which is kind of cool, after all. The paradigm is shifting again.
November 27th, 2009 — Planet
Just a few days ago I was laughing at real-estate agents that they may soon be required to pass an entrance examination to test them in practical knowledge as well as moral soundness (out of curiosity will this be a multiple choice test?). While it was expected - they are pretty much the last profession without any education or knowledge required, yet they represent you on your single highest monthly expense (in SG). The fact that there is no law regulating the real estate market does not make the situation easier - it doesn't mean no law - nothing to know - everybody plays by they own rules. Two days later I stopped laughing...seems that we're next...
As I've said so many times on so many places, I really believe in professional certification (and I completely respect those who don't), however, it really matters how this certification is done. For that reason I (mostly) don't really care about academic (university) results as they mostly represent ability to know a little about many things but nothing about one thing. They are very important in other aspects, though. As explained in books like The Talent Code and Talent is Overrated I believe that to really know something you need to clock-in your 10,000 hours of practice. I teach ruby/rails programming in 2.5 days course and I am able to cover almost everything to get you started writing even ERP solution, but does that mean that after 2.5 days of intensive training you're proficient in ruby or rails? Yes - if you spend the next few years working with it.
As such I was first quite enthusiastic to read that the government is stepping in to regulate our profession as well. Thanks to the thousands of failed projects and millions of government money wasted they decided that the current practice of audit after the project completion is as effective in weeding out failing vendors as a postmortem is in weeding out smoking. While many times the problem is on both sides - the vendor's as well as the client's - the experience of the vendor can make up for a lot of issues on clients side. Most of our clients went through a software development experience once or twice in their lives - while we go through it every day. I am talking about SME market here - where the projects go anything but as planned. Running a small business is like yachting - constantly monitoring the wind, the sea and reacting to every small change - either capitalize on it or run from devastating effects. While it's essential to standardize the processes - otherwise there's no business to run - you have to be ever ready to unfreeze the process adjust and freeze again. And your IT infrastructure either moves with you or against you. That's why the SME landscape looks so different to government regulated, without exception SAP dominated MNC market.
Back to certification, imagine my surprise to find out that the certification has been outsourced to an NGO that specializes in Microsoft certification. In fact, they do exclusively Microsoft certification and now this. First I thought, this may not be so bad - I can surely brush up on some VB craft if that's what it takes to be professional in 2010. But it gets worse. There is no preparation and there is no exam. Your professional level is black box decided solely based on 4,000 words self assessment essay of your past 6 years. No interview, no actual review of your work - 4,000 words of narration. On top of this you of course have to sign up for membership in this great organization because the certificate is only valid with a paid membership. Talk about business model - the costs - read a short essay - the revenue $800 for reading and $100 every year after. And since it's becoming a government requirement - not only the new members HAVE to come to you - even the old ones HAVE to stay - a truly new level of marketing and retention. I think universities have a lot to learn here - imagine your degree is valid so long that you pay a yearly fee. But I understand - even NGOs have to make money - and if you liken it to bar certificates lawyers have to pay every year it's not even so unusual. What still worries me a little is that Microsoft is to decide my professional level. I have a great respect for them - the company as well as the products. The problem is that I simply slipped during university and I somehow didn't get to back the right path ever since. I can only imagine a Microsoft grown professional reading my essay - my master thesis was on open source (this was back in 2000 when open source was fairly new to the business as well as academia). Besides having converted number of companies data centers from windows to linux with the exception of 1 software project all the others were done using non-microsoft technologies like Ruby, Java, Python, PostgreSql. If it was not enough we've been pioneering agile methodologies since maybe 2002 - I have not worked on waterfall model project since 2001.
Some of my friends actually suggested to write the essay as I normally would and then simply search and replace...Linux for windows, posgresql for MS Sql, java for J++, ruby for VB.net or C#, agile for waterfall.
Don't get me wrong - I am all for professional certification. All the other professions have it - so why not us. Lawyers have to pass the bar, accountants have ACCA and CPA, doctors have their attestations, even my mother as a teacher has to get recertified every 2 years. Even not so knowledge intensive professions have certifications - e.g. taxi drivers here are tested on the knowledge of the shortest path between any two points in Singapore. Of course, all those tests are considered only a prerequisite for practice - nobody really things that passing a bar will make you Allan Shore or Denny Crane. What it does is that it gives you guarantee that your lawyer or your doctor or your accountant achieved certain industry recognized standard and passed independent assesment. Why is independence of this assesment so important? After all, market numbers (or any numbers for that matter) clearly show that MS knows best how to do things. How would you like if every doctor would have to be certified by Pfizer or Merck or whoever had the best market numbers last year? Every doctor has to use their drugs anyway...
I definitelly think the governmet deserves a lot of credit for trying to improve current situation. Maybe it won't be as simple as appointing one company to award black box professional certifications...but it certainly is a step forward. And of course I know it won't be so hard...we'll all have to pass it after all.
November 16th, 2009 — Planet

And it's here. I am in rehab. Okay...not really...I managed to sneak in my iPhone. But otherwise rehab in it's nicest form.
We left in the morning to have some nice breakfast...changed the plans midway to maybe make it an 'overseas' trip and get lunch in Indonesia (just a boat trip away) and when we got here we decided to stay a night in one of the resorts...
Man, how I miss these short trips...they yank you out of reality and maybe because of the sudden nature have even stronger effect than long planned holiday. This time it's even amplified by the fact that I left my notebook at home (completely unsuspecting). Over the years I got used to working pretty much anywhere...on planes, airports, coaches, starbucks and even public transport. Anyway, I've been planning on running away for some time now. Usually when we go somewhere we set up the main tent around bar area with wifi and easy access to drinks. Not this time...as all I have is iPhone...and luckily free 3G Internet from SG (only on the beach). BTW the photo is real - it's the view from the hotel restaurant.
Anyway...computer is not the only addiction I got the break from lately. Thanks to the economic meltdown I got at least a short breather from the break neck speed of events of the past few years and finally got time to sit down and think. Think what out of the 1000 things I did which was the one that actually made some sense. Should I look at it as Thomas Edison...I had no failures I just found 1000 ways of how not to do things. If I look at it from any sane point of view the statistics are much more bleak. But...the new day is coming...and hopefully yesterday won't be forgotten. At least by me I hope. One thing I learned when helping out in changi prison and later working with the guys after release is that no matter how long the rehab, no matter how much time you have to contemplate everything wrong and every possible better way, your old ways only become more and more traecherous. You already know what and how can get wrong and that makes you believe that, as Eddison, you are getting better when, in fact, you're falling into the same trap...but because of your experience you'll be able to get deeper and deeper. I met number of different people inside...mostly drug addicts (careful - the word has a different meaning in SG than in many other countries) but also gamblers, fraudsters and fighters (even a hit man). While the drug addicts are pretty much doomed (all of them desparately plan to leave for another country but as they can get passport only after 2 years most most most most most of them can't last clean longer than a year...that was a 'most' for every hope). The fighters have it hard but they stand a bit better chance. Whom I found especially interesting were gamblers. Entrepreneurship and gambling have surprisingly a lot in common...way more than someone on a regular salary would imagine. You could almost say that gambling is enterpreneurship stripped of the hassle of idea, product, employees and pretty much everything besides the money. You start with no or very little idea where you'll end up. Sunshine doesn't last all morning...clobber doesn't last all day. What's the difference? When you run a business all this neusances become your chips. They can turn against you or they can turn to be your winning asset. Your only asset. I've probably lost more in wrong investments than any of my gambling friends...just like I've (l)earned way more than most of them. Not because the stakes are higher...because every failure or win is not just about winning or loosing...because it's not about what happens after I've won or lost....it's the journey (battle) that counts. As Andrey Bolkonsky in war and peace said....wars are not won by strategies or numbers....they're won by soldiers that want to win the war. And in every single case it comes down to that...I should say it again...but no matter how many times you've heard it you cannot possibly feel the pain of those words until you've lived through it. It's like listening to a marathon runner saying it was realy hard on 24th kilometer but than I decided to go on. If you've ever been there you know that he's saying that his feet were hurting like crazy, his knees checked out, his heart throbbing, his breath was nowhere to be found and the last pieces of sanity was saying you've proved your point...of course you can do it..,but who really cares??? Foolish...stupid even...ask any enlighten egoless swami....yet all this vanity...is it really vain? I don't know...I feel like I don't know much anymore.
I do hope that this coming upturn I will have more faith in me and in what I am doing than any opportunity hunter will have in me parting with my money. After all it has, without exception, paid for all the other 'cannot lose' ideas. The other ideas were not much more stupid than whatever I am doing...in fact the strategy was way better...in most cases the numbers were incomparably better...yet it somehow reached a point were it stopped being worth fighting for. But...why? Recently I was asked if I blieve in feng shui. After all, I did spend quite an amount of money on feng shui consultants. It never had any effect...when the consultant said you have a wealth door and I was sitting in wealth section we were in fact loosing money. When they said we should move out immediately we were in fact making money. When I pointed that out to one of the feng shui master he seemed completely unsurprised...he said I am trying to do things first and hope to believe in them later (ie when the facts can substantiate it) - unfortunatelly faith works the other way round. It picks up where reason leaves of...but if it's not there before reason took over it want be there after neither.
It's easy to believe when you see the proof sitting in front of you...but by than it's not believing any more...it's simply accepting the facts.
September 4th, 2009 — Planet
Last week I wrote about The Passionate Programmer, about my and Chad's very similar ideas on many things. I closed by saying that it's hardly feasible or sustainable for any SME to base the business on passionate programmers. Imagine my surprise opening the PragPub Magazine yesterday where Chad Fowler talks about replacing your people with the worst people available.
The idea is quite old and comes from Michael Gerber's The E-Myth Revisited. I read this book back in 2005 and I've been in internal fight with this book ever since. Even in my bookshelf it sits right next to it's antithesis Good to Great by Jim Collins. The idea Chad is getting at is that you should replace great people with great systems and get mediocre people to be run by those systems. Much like a clock - made of hundreds of small cogs and pieces, each easily replaceable and while totally insignificant alone, having a specific, clearly defined and essential role in the clock.
Let's backtrack a bit. I really loved The E-Myth Revisited book for the questions it asks. In fact, a bigger part of the book is dedicated to depicting a typical small business. Painstakingly describing day after day with such a detail and accuracy - I don't know a business owner who wouldn't resonate with every page. Unfortunately, it leaves out most of the answers. Actually, the answers are there, but while you can really feel the pain of the questions, the answers are put almost bluntly - like an external consultant just took over and reads his 6 steps to happiness. It took 10 years for the real answers to arrive.
They're in the E-Myth Mastery. While this book never neared the popularity of the first one, I found it infinitely more useful. The main difference is that while the questions remained, the second book provides actual answers. While the first one is based on observation and consultancy, the second is based on first hand experience and the author lives through every sentence. I bought the book in 2006 but I didn't get round to reading it until late 2008. And it was a deja-vu. I read maybe 50 books over those 2 years - yet I didn't read the one that could/would have actually helped me. It was like somebody wrote a book about the what was going to happen, but I couldn't read it because I was too busy heading for the catastrophes I could have avoided if I just read the damn book.
Now back to the good vs. bad people question. Our business is streamlining and automating of business processes. Over the years we worked with companies from more than 30 different industries. Anything from travel agents, through media, manufacturing, logistics to financial consultants and portfolio management. People usually get our systems to either decrease their staff numbers while increasing performance or keep the numbers and radically improve performance. The way to do it is based on what Michael Gerber says - take a process and orchestrate it. In our case, it's followed by computerization, where the computer system does the heavy lifting. In Michael Gerber's case, once the system is orchestrated, the cogs (aka the least qualified people you can find) can be put in places and the show is ready to go on. Your role as a mastermind, is to grease the cogs, innovate and move from technician to manager (and later to businessman). This has worked remarkably well - just look around - this is the principle behind every McDonald's, Burger King, Starbucks, Subway, and so on. As a freshman in university I applied for job in McDonald's but at the end chose to work in research institute. I regret that decision to this very day. While I made considerably more money working in the research institute I lost opportunity to learn about how one of the very successful businesses is run.
On the other hand, I've seen a number of places where just systemizing didn't work all that well. Take accounting as an example. The process is well defined (even though with considerable amount of leeway in asian countries), there are formal checks in place like audit, tax checks and so on. Yet I've seen it in quite a mess in a number of places. While there are better accountants just like there are not so great accountants most of them are able to do accounting. The cause was usually somewhere else. Most of the business owners are masters of their trade, they are the masterminds behind the systems and they are the puppet masters running the operation. When it comes to accounting, however, they're lost. So they hire an accountant. And then another. And data entry clerk. And temp staff because of the back log. And still the accounts are in mess. Buying a better (more expensive) accounting system doesn't help much neither. What's missing is usually leadership. It's not an accountant the technician but accountant the puppet master. Human systems don't tend to be as iron clad as the clockwork or jet engine. That's where the 1 obsession of the extraordinary executive (build and maintain a cohesive leadership team) comes from. You cannot be everything to everybody and people are not cogs - you can't just put them in places and expect them to function flawlessly.
I've always believed that you get only as good people as you deserve. And I've paid the price to learn this again and again and again. Most of the work I've been around is not linear. You can hardly say that if one CEO produces 1 mil of profits five CEOs would turn the same company in 5 mil business. Just like if a system takes 1 developer 3 months to develop it doesn't mean it would take 3 developers (offshore or not) 1 month. Just like if one sales person can close deals worth 100k per month it doesn't mean 3 of them will close 300k.
The Chad's article goes on to explain business automation likening it to automation of software development. While interesting to read - this is how software developers must feel when being compared to construction workers :-). I guess (literally guess) that Chad has passed the euphoric stage in his business and tries to see where is all that going. I wouldn't be surprised if it looked awful lot like working in a big company he left, but with way more responsibilities and way less money. That's where I went through the same Freedom musings. Hopefully, I am wrong and the wine and roses will last forever. They didn't for me, though. Time came when I realized that my business was just a business - without the magic IT formula from The 50 Great E-Businesses and instead of counting millions or billions on my account I had (and still have to) change from passionate programmer passionately pursuing his own sweet career to someone running the business. It's not just about me anymore...
Anyway, today I found a book that does a great job explaining just how different running a business is from software development. The book is The 100 Best Business Books of All Time. I am not saying that reading this book or even all 100 books listed will make you the best business person of the century or that it will solve all your problems. I merely believe that reading some of them will help you see what's on the other side and consider it before it's too late. There's a saying that smart people learn from mistakes of others...Never happened to me, but I hear it's great :-)
August 29th, 2009 — Planet
It's really been some time since I wrote something. I've been really busy - more than usual busy with all the projects but additionally busy trying to workout a solution to some of my perennial problems.
I finally managed to read The Passionate Programmer. It almost felt like reading my own notes. Over the past few years I've been talking and writing about quite a number of issues from this book. It's almost unbelievable that somebody has so similar views. Starting with the saxophone experience - I played saxophone for 10 years - I can relate really well to Chad's stories and parallels. Of course, that's not to say that because some things work in music they will work in programming as well. As Martin Fowler once said software development is software development and we shouldn't be comparing ourselves to other industries and drawing misleading or wrong parallels. Anyway, regardless of whether the conclusions are right or wrong the flashbacks to saxophone playing experience added extra level of depth (at least for me).
Out of the many ideas that struck a cord with me...here are a few I noted down
Invest in Learning
The nerve!!! Judging by the reactions I receive whenever I talk about importance of proper education and practice for programmers - it's ranking among the worst insults you can ever make. Every programmer worth his salt knows that learning is for dummies. We were born better than them (basically everybody else). Sarcasm aside, I believe that a lot of programmers would benefit from experience of playing a musical instrument. Daily (i.e. every day) practice and performances. When you're performing on stage without practice - okay let me rephrase that - when you're on stage without hundreds of hours of practice - you're very likely to screw up - and if you do you're like naked. There's nowhere to hide. The whole audience looking at you and everybody knows it was you who screwed up. Believe me, the next time you'll think more than twice before coming on stage without proper practice. When you program without practice (or learn on the job) you're just as likely to screw up...the only difference is that you can blame it on the customer, on the specs, on the technology, or whatever or whoever else around you. Many times you can just comfortably hide behind your boss as he/she is the one facing the customer.
Work expands so as to fill the time available for its completion
This is an interesting concept. In the industry where everybody complains about way too tight deadlines - Chad goes on to say that just by making the deadlines even tighter you can easily double or even triple your productivity. While I am still to meet an employee that would confirm this - it's definitely true for me and all my ex-staff that went independent. It's really fun to see that things that took them several months to finish while being employed can suddenly be done in a month when they're on their own.
Writing Skills
"If you can’t organize your thoughts in your mother tongue so that others can clearly understand them, how can we expect that you can do it in a programming language? The ability to shape an idea and lead a reader through a thought process to a logical conclusion is not much different from the ability to create a clear design and system implementation that future maintainers will be able to understand." While this politically incorrect statement would get you to prison in a number of countries it's surprisingly true. And quite opposite to the geek stereotype. Interestingly enough, ability to speak and organize thoughts clearly has become a very important factor for us. Try to notice the similarities between way people speak and code - if you have a programmer that is very verbose - talking, talking, talking and still not making the point clear - chances are his code will be very similar - long winded, using unnecessary constructs and never quite clear on what it's supposed to do. On the other hand, if you have an introverted programmer that says 10 words a day, chances are his code will be very terse, taking one liners to the whole new level.
Businesses and those who run them are interested in business results
A thing you learn really fast when you're on your own but it's your biggest enemy when you're an employee. I remember a fight I had with one of my employees - his conclusion was that he just wanted to have a life. And he was right. Why should he worry about the deadlines or delivering what the customers needed? His goal was to have a life and the work was one of the main constrains - there was no direct link between his performance and quality of life. Not seeing and understanding this was my biggest failure running the business earlier on. While we had the basic performance based structure in place it was so detached from the company's culture and pretty much left for everybody to make their own interpretation. The challenge is to reorganize from a black box to a concert stage where everybody is crystal clear on how his performance is linked to the achievements of the whole team and how that translates to the distribution of rewards. Chad puts it very bluntly: "Sure, you got it done, but what was it? Why did it matter? How was this so-called accomplishment not just a waste of company time?" He couldn't be more right. I cannot even count how many times people told me that they had been making sacrifices, sitting in the office 8 or 9 hours every day and I still complain about their performance. The issue here was that while they counted hours I was counting closed iterations and customer satisfaction.
It's easy to get hung up on technology choices
Especially when our technology of choice is the underdog... I believe this idea comes from the Pragmatic Programmer - something along the lines of when all you have is a hammer everything starts to look like a nail. I've always tried not to be attached to technology, however, having a 50 projects investment in a technology makes you very close to being dependent on whatever choices you made. Yet, an investment in wrong technology - no matter how much you like it is usually much higher than investment in a different technology that is actually right for the job.
Go independent
This is quite a dangerous point. While definitely true - there are uncountable advantages to running your own show - just go for any motivational seminar by T. Harv Eker, Robert Kiyosaki and the likes - but being the best technician is only a start. Even though, based on the book 50 Great eBusinesses there's a number of teenagers without any experience that are managing billion dollar businesses (or one man shows) out of they're parents living rooms - vast majority of businesses and people are not so lucky. While Chad describes this as natural next step and spends only a few pages explaining the benefits and some of the obvious challenges it's a whole new ball game - one that has very little to do with programming.
Finally, the book got me really thinking. I've been running the software business for 7 years now and while we've been fighting with lots of problems, the single most difficult thing has been to get the right developers. I wrote about different aspects of it in a number of posts analyzing it from many different angles. This books is/says exactly what I've been trying to say and find for all this time. So many people told me that my ideal developer is a mix of too many and too different skills, and that such animals are more rare than a unicorn. On one hand it was very encouraging to see that somebody else has the same ideas and expectations, on the other it's quite a gamble to base your business on something so rare. Yes, it's possible to find one or two and get started. It may even be feasible to hack a new Web 4.5 killer app and sell it to Google for millions of dollars, but it may be much harder create a sustainable business out of it. It may work for huge multinationals that Chad is talking about as they can afford $300,000 packages but hardly any SME can do that.
In fact, I couldn't sleep for almost 2 weeks trying to find a solution questioning my every belief and experience with this business. I tried to unhung my self from the technology, the product, the people and try to weigh the price and the risk of each option today and 10 years from now. It's been quite an exercise - I am now iteratively implementing the changes - if at least 25% of it works out this could be a book that totally changed my business and life. We'll see in half a year :-)
July 20th, 2009 — Planet
Yesterday I spent way too much time on another simple thing in EXT that I would have expected to work out of the box. What I needed was to upload a company logo to a profile and, of course, display that logo in the form. While it's very simple to display an image in a panel or box, it's a totally different thing to display the in image in the form and update it together with other form fields. What I needed is something like this:

and after form submit it should automatically load the new image:
For image upload I used the image upload plugin from EXT examples. To display the image I needed to extend the field component like this:
Ext.form.ImageField = Ext.extend(Ext.form.Field, {
autoCreate: {tag: 'img'}
,setValue: function(new_value){
if (new_value == undefined || new_value == null) {
this.el.dom.src = '/images/no_image.png';
} else {
this.el.dom.src = '/images/thumbnail/' + new_value;
}
}
,initValue : function(){
this.setValue(this.value);
}
,initComponent: function() {
Ext.apply(this, {
});
Ext.form.ImageField.superclass.initComponent.apply(this);
}
});
Ext.reg('image_field', Ext.form.ImageField);
This is a bit simplified version as I removed the rails specific code, but anyway the main points are here:
line 2 creates image tag (rather than the default text field tag)
line 5 defaults the image src property to a placeholder (in case there's no image uploaded)
line 7 - in case there is a valid image it will change the src path to that image - in my case it's routed to Images controller and action thumbnail which returns a downscaled version of the image.
Other than this don't forget to set the FormPanel's fileUpload: true and refresh the form on submit success. I usually send the updated object JSON in the response to update action.:
def update
contact = Contact.find(params[:id])
on_bind(contact)
success = contact.save
contact = Contact.find(contact.id) if success
logger.info("saved")
respond_to do |format|
format.ext_json do
json = contact.to_ext_json(:success => success,
:methods => [:image_id],
:includes => [:address],
:messages => {:notice => l(:contact_updated), :warning => l(:contact_update_error)})
render :json => json #:json => {:success => success}
headers["Content-Type" ] = "text/html"
end
end
end
!!!Notice line 16 - you have to manually set the content type to "text/html" because rails will default to "text/javascript" which will not work with file uploads!!! It works with fileUpload: false but it doesn't with fileUpload: true. I don't really know if Rails or EXT is right here but did take me some time to figure this out.
this will produce the following JSON (I removed the unnecessary fields):
{"success": true,
"messages": {"notice": "Contact was successfully updated.", "warning": "contact_update_error"},
"data": {"contact[image_id]": 15, "contact[active]": false, "contact[client_account_id]": 2, "contact[client_account_no]": "100",
"contact[created_at]": "2009-07-07T10:31:54+08:00", "contact[credit_term_id]": 1}}
Now in the forms success method I can use the result.data to update the form:
success: function(form, action) {
form.setValues(action.result.data);
},