The
Ultimate
Business Machine

Technology, business
and innovation.

And, not least, about
the Mac.

Weblog Archive Cutedge

by: Bernard Teo








Creative Commons License

Copyright © 2003-2012
Bernard Teo
Some Rights Reserved.

Tue 08 Dec 2009

Bandung

Category : Travel/Bandung.txt

Just got back from a week in Bandung, a one-and-a-half hour plane ride from Singapore. Bandung is Indonesia's 4th largest city and the capital city of West Java. It's on relatively high ground (2500 ft), so it's cooler, less humid than Singapore. And it offers great food, pleasant shopping, and friendly hosts.

Bandung is also Factory Outlet Central. There are textile factories presumably for fashion brands like Zara, Hugo Boss, Ralph Lauren, etc., outside the city and you can find their goods, marked "sisa export" (rejected or over-produced export quality items), in the dozens of factory outlets at the three or four major shopping districts - Setiabudi, Dago, Riau and Cihampelas.

We stayed for half our week at the very nice Hotel New Sany Rosa at Setiabudi (but do take note that it's close to a mosque and you'll be greatly disturbed in the small hours of the morning by the call to the devout for prayers). One other thing to recommend this hotel. It is only a 10 minute walk away from the delightful Rumah Mode.

Ahh, Rumah Mode. I would go to Bandung again just to re-visit it. It's like a Bali-themed Polo Ralph Lauren, with a nicely integrated food court. And such great service - have your jeans potong'ed (cut and altered), gratis (a word that seems to have been absorbed into their language), while you wait.

Two other notable factory outlets, as much for their decor as for their range of quality merchandise, are The Secret and the Heritage/Cascade (bottom right corner picture, above), both at the Riau district.

We stayed at a hotel near the Riau road for the second half of our stay but that hotel wasn't too good and will remain nameless.

But Bandung is not all shopping. You can visit a volcano crater, strawberry fields, and hot springs, and these are all cool (even chilly) places on the mountain ranges around Bandung.

It wasn't always so easy to get to Bandung. You had to take a plane to Jakarta and then take a bus trip to Bandung. But now, with budget airlines like Air Asia providing daily cheap flights direct from Singapore, going to Bandung is like hopping on a bus.

I've been to Shanghai, Beijing, Saigon, and now Bandung and the things you can get at each of these places are of very good quality, though significantly cheaper (I don't even bother to go out shopping in Singapore anymore), and they're all so easy to get to, with better climate (though not Saigon). These are all going to clobber Singapore's future as a shopper's paradise. I think you can bet on it. If we are to survive and remain prosperous, the solution has to be found elsewhere. But how do you Think Different if you're so conditioned to think the Microsoft way?

Posted at 9:51AM UTC | permalink

Sat 28 Nov 2009

"If you have land, how can you not have money?"

Category : Commentary/PresentAtTheCreation.txt

I've been reading "Prisoner of the State: The Secret Journal of Premier Zhao Ziyang". I think it's a very important book - essential reading for anyone who's fascinated by China's rapid development. There's a "present at the creation" quality to all these pages.

For example, if you've ever been to Shanghai you'd invariably hear about how the east bank of the river Pu, across from the Bund, had all been farmland just a few years back. Now it's full of skyscrapers. How did it all happen? How were the seeds laid from which this growth occurred.

'During the early days of reform, the first problem in attracting foreigners to open factories and businesses was that our infrastructure was not good enough. ... We had no funds to build roads for cities or to bring in water and electricity. A lot of land was lying idle.

It was perhaps 1985 or 1986 when I talked to Huo Yingdong [a Hong Kong tycoon better known as Henry Fok] and mentioned that we didn't have funds for urban development. He asked me, "If you have land, how can you not have money?"

I thought this was a strange comment. Having land was one issue; a lack of funds was another. What did the two have to do with one another? He said, "If municipalities have land, they should get permission to lease some of it, bring in some income, and let other people develop the land."

Indeed, I had noticed how in Hong Kong buildings and streets were constructed quickly. A place could be quickly transformed. But for us, it was difficult. ... We had land but no funds, while the Hong Kong government auctioned off a piece of land every year, not only bringing in income for the government, but also allowing the area to develop quickly.

I thought about this later when visiting Shanghai. The Pudong area was right across the river from Shanghai's city center. In order to develop Shanghai, building up this area would require less investment and be more efficient. It was an extremely good location. However, in order to develop this area, we needed a huge amount of funds to build infrastructure and then attract foreign businesses.

It was around 1987 when Shanghai referred a Chinese American, Lin Tung-Yen [the founder of T. Y. Lin International], to speak with me in Beijing. He asked whether it was possible to rent Pudong. The term of the lease had to be long enough: thirty to fifty years. After leasing the land, he would need to have transfer rights. Investors would then get mortgage loans from the banks. I asked him if foreigners would be willing to invest after such a land transfer and what else was needed. He said it was easy and that the conditions of the SEZs [Special Economic Zones] were not needed; the conditions for Shanghai's Minhang economic zone were sufficient. I had thought that the conditions offered could be even more preferential than Minghang's, approaching those of the SEZs, so I was indeed interested.

Because this was Shanghai, the move was sure to attract everyone's attention...'

And so it did, with predictable results, and the development of Shanghai was delayed much longer than it should, until 1992, when Deng Xiaoping, worried that the Tiananmen incident had forever tarnished his legacy, took his famous tour of the southern regions to revive reform.

But Shanghai eventually did develop, and at such frightening pace, probably because it was filled with people "skilled and familiar with capitalist behaviour", as anti-reform hardliner [party elder] Chen Yun had feared.

Posted at 2:34PM UTC | permalink

Wed 18 Nov 2009

Death to the Spinning Rainbow Beach Ball

Category : Technology/MavenSnowAndDeathToRainbowBeachBall.txt

On the Mac, if your application doesn't respond to user events for more than 5 seconds (e.g., on Maven when it's searching through 15,000 records looking for just the one you want), the cursor changes to the Spinning Rainbow Beach Ball. To the user, the application looks like it's gone dead and you're tempted to force-quit it.

So I've always wanted to kill this Spinning Rainbow Beach Ball of Death. On the latest release of Maven Snow, I've been able to do just that.

Snow Leopard brings with it Grand Central Dispatch which makes it easier for a Cocoa programmer to take advantage of the multiple CPUs we have in modern-day Macs to do concurrent programming without getting down and dirty with threads.

But I've started off with a slightly older technique - Operation Queues, which will also work on the iPhone (one day, it'll have a multi-core). On Maven for Snow Leopard, you can have multiple windows open and trigger a search on each window without waiting for the previous one to finish. In a long search, you never get the spinning beach ball. The application remains responsive to user action and it feels more natural working with the app.

The best thing is, it takes only four to five lines of additional code to do all that. Smart programmers will love Cocoa. The others, being Ballmer's Hordes, continue to extol the virtues of Microsoft and they're welcome to stay that way.

I've added this to the latest development build of Luca that I'm working on in Snow Leopard. I can do a Trial Balance, and while it's doing that, do a Statement of Accounts report simultaneously, and it doesn't tie up the GUI.

On my Snow Leopard iMac it works great and both reports finish not much longer than it took one report on the current Luca on Leopard. Of course, there you had to run each report sequentially, waiting for one to finish before starting the other. So the world looks good, going forward.

But the problem is that Snow Leopard breaks a lot of things in Luca, especially the date handling routines which are at the core of a lot things we do in Luca. So I'm still struggling to get thru all of these. But I'm enthusiastic about Snow Leopard and what it can do to help Luca become an even more powerful and useful system, so I'm not complaining.

Posted at 2:57AM UTC | permalink

Tue 10 Nov 2009

Snow Leopard 10.6.2 and WebMon Snow 4.0.3

Category : Technology/SnowLeopard10dot6dot2.txt

Snow Leopard 10.6.2 is out but it brings with it a few problems that I have to solve in a hurry.

WebMon Snow was hit. I had just updated it to 4.0.2 but now I have a new 4.0.3 version out.

The problem is, the Apache web server in Snow Leopard 10.6.2 has been updated to version 2.2.13. With Apache 2.2.13, SSL only works for the primary domain.

Prior to 2.2.13, we can still turn on SSL for the secondary virtual domains (but, of course, the cert can only be associated with the primary domain).

But with 2.2.13, we cannot even turn on the Virtual Host directive for the secondary domains within the IfModule SSL_module block. If we do that, we get an "[error] Illegal attempt to re-initialise SSL for server (theoretically shouldn't happen!)" message.

WebMon Snow 4.0.3 has been updated to disable attempts to turn on SSL for secondary domains.

Other problems with 10.6.2 - I had some problems wth the Snow Leopard firewall - the SMTP port refused to accept connections. I had to Stop and the re-Start the firewall and also reboot the system once or twice to make the firewall work properly again.

I'm not sure about the other ports. I had to do things in a blur because my server was down for too long. Next time, I'd better do the OS X updates on a test server before doing in on the live server. But Apple had been quite good with the updates for quite a while. Getting lax.

Posted at 9:31AM UTC | permalink

WebMon Snow 4.0.2

Category : Technology/WebMon4dot0dot2.txt

I've updated WebMon Snow to 4.0.2. WebMon Snow can now set up WebDAV folders for each and every domain, instead of only for the primary domain. However, WebDAV over SSL will only work for the primary domain.

I also fixed a problem where WebDAV folders appear to be read-only when the root folder for the domain is changed from the default "/Library/WebServer/Documents".

Posted at 9:13AM UTC | permalink

Fri 16 Oct 2009

Maven Snow Update

Category : Technology/MavenSnowUpdate.txt

I released Maven Snow too quickly yesterday without testing on another machine that didn't have my development libraries (for MySQL and PostgreSQL) installed. They crashed on launch.

Investigating the crash report -

Dyld Error Message: Library not loaded:
/Users/bernard/Library/SDKs/macosx.sdk/
lib/mysql/libmysqlclient.16.dylib
Referenced from:
/Applications/MavenSnow.app/Contents/MacOS/../Frameworks/
CEDatabaseMySQL.framework/Versions/A/CEDatabaseMySQL
Reason: image not found

The "lib/mysql/libmysqlclient.16.dylib" was detritus left behind from my (ultimately successful) attempt to set up on single code base to build database connectors for three platforms - Mac OS X, iPhone, and the iPhone simulator.

I've made it such that if I can think of algorithms that can make our database access code run faster, I only need to implement it once in one piece of code and Xcode will build libraries that will work for the Mac and the iPhone, including the iPhone simulator. Considering that the Mac and the iPhone are actually two different hardware architectures, and that my own C code has to link with client libraries from MySQL and PostgreSQL that I have to build from source, that all goes to show why Xcode - Apple's development environment - is so good. There's really a Mac way of looking at the world and if you are in synch with that world view, life is good.

I didn't need libmysqlclient.16.dylib and a few other dylibs from MySQL and PostgreSQL in order to make Maven (or Luca) run. But they were there when Maven was being linked with its libraries and, since I didn't need them, I didn't package them with the Maven app, of course they couldn't be found, at launch time, at some other person's Mac. Hence the crash.

Removing all these garbage from my build environment cleared the crash. Lesson : do not leave your workspace in a mess. These things will trip you up and, at the least, give you untold embarassment.

Speaking of embarassment, Nick Lo asks :

Also, this feels like a stupid question so I'm hesitant to bring it up, but I was reading your "Maven for Snow Leopard" post and noted you say...

"I think it's gotten a lot faster now than Cocoa MySQL. I believe I can work faster now using Maven's interface than with Cocoa MySQL.

But there's still quite a few things that Cocoa MySQL has that Maven hasn't, including the ability to do searches on the data and that's what I'm working on next."

...and was wondering why you are comparing your new version of Maven with what is now an abandoned project rather than to its successor Sequel Pro?

The answer is, "I'm out of touch". I don't know about Cocoa MySQL being abandoned but it's what I use, still, on my desktop (e.g., to check up serial numbers for people who've lost theirs, or to update my apps' version numbers) and my aim was to make Maven good enough that I could stop using it.

So maybe I'm aiming too low. But the truth is, as a GUI for SQL databases, Maven has still a long way to go. But as a Cocoa framework for database access, so that I can have one unified way of accessing three different bases from both the Mac and the iPhone (and one unified way of making SQL calls), Maven is coming along fine and I can't wait to get some current stuff out of the way so that I can move on to iPhone development.

Posted at 3:55AM UTC | permalink

Thu 15 Oct 2009

Maven for Snow Leopard

Category : Technology/MavenSnow1dot0.txt

This is a completely new build of Maven for Snow Leopard. It's 32/64 bit Intel. It's compiled using the new Clang LLVM compiler that helps produces cleaner, faster code. But it'll only run on Snow Leopard.

From now on, all improvements to Maven will only be made to this version.

I've fixed incompatiblities in the code with the 10.6 SDK. And I've fixed a crashing problem when Maven has to work with tens of thousands of records.

I think it's gotten a lot faster now than Cocoa MySQL. I believe I can work faster now using Maven's interface than with Cocoa MySQL.

But there's still quite a few things that Cocoa MySQL has that Maven hasn't, including the ability to do searches on the data and that's what I'm working on next.

But here it is, for people who've been following its development : Maven for Snow Leopard version 1.0, and the downloadable zip file.

I'm experimenting with using Apple's Pages for my software manuals and documentation. I wish there's a way to automatically convert a Pages document to web pages - and not just a pdf file viewable in a browser - because that would be perfect.

And I'm also watching how information proliferates. For example, I've not made any announcement about LDAP Enabler for Snow Leopard in places like Version Tracker or MacUpdate, yet it gets picked up by the amorphous thing we call the web. It starts with one or two downloads, and then it beccomes a regular stream. Even that frst download. Besides the couple of people I invited to test it, how did the rest know where and how to find it? Probably Google. That's one institution that has made a dent in the universe. We couldn't do what we do without Google. So far, nothing else comes close.

Posted at 2:29AM UTC | permalink

MacBook Pro crashed - it's Nvidia's fault!

Category : Commentary/MBPandNvidia.txt

My MacBook Pro crashed. I couldn't wake it up from sleep. All I get is a black screen. I powered it off and rebooted. Still the same. It gets progressively worse with each try until I don't even get the startup chime.

Fearing the worse - a logic board replacement without AppleCare coverage - I sent it in for servicing. Turns out, happily, it's a known problem.

There's a MacBook Pro recall program going on due to faulty Nvidia chips.

What luck! My MBP fell into the range of products covered by the recall, so I got a free logic board replacement. But I couldn't work for a couple of days. Couldn't release Maven for Snow Leopard as I had planned. Will do it now.

Posted at 2:03AM UTC | permalink

Sun 04 Oct 2009

LDAP Enabler for Snow Leopard

Category : Technology/LDAPEnabler1dot1dot1.txt

I've released LDAP Enabler 1.1.1 for Snow Leopard. This has been built using the new Clang LLVM compiler on Xcode, which is supposed to produce faster code, and it's 32 bit Intel and 64-bit ready, like all our other Snow Leopard apps. This is the last of my apps that had yet to be transitioned to Snow Leopard. So now everything runs on Snow Leopard.

But Maven and Luca have yet to be made true Snow leopard apps. The latest ones that could run on Snow Leopard were simply built on Leopard with the version check removed (I can do this for these kinds of apps because they don't have to work in sync wth system-supplied files like Postfix and BIND, so I don't have to go through the same kind of work that I do with MailServe and DNS Enabler). I've yet to release a build that's specifically for 10.6 (because you get all sorts of compile errors when you do) but Maven for Snow Leopard is almost done and will be released in a couple of days. Then it'll be Luca's turn.

There's been a change as to how Snow Leopard's Address Book can be made to look up an LDAP directory, so I've updated LDAP Enabler's Address Book How-To panel to reflect that :

So LDAP Enabler ver 1.1.1 for Snow Leopard - download available now.

Posted at 2:57PM UTC | permalink

Fri 02 Oct 2009

The Art of Pricing

Category : Commentary/TheArtofPricing.txt

There's a book by that name that I've read. It has a five-star rating at Amazon and I remember it being one of those books that I would call nourishing, in terms of its contribution to my development as a business-person.

Coming from a family of civil servants, I still find it hard to see myself as a business man. "If you don't study hard", my grandmother would say, "you'll end up as a salesman, like that useless so-and so", no doubt hoping that I'd be the mandarin that I never could be. I still hear her voice, all these years. But, ahh, that's the matriarchal Chinese family.

Then there's also Chris Anderson's "Free - The Future of a Radical Price" that I'm reading now.

It's another day in my personal, custom-made, self-learning MBA course, with a good measure of practical experience thrown in. That's what it's like doing this - designing, building and selling software on the Internet.

So I've ended up as a salesman of some sort - selling software that I've built myself - maybe that isn't quite a large fall from grace (I hope).

I've only now managed to get a break from coding to think about pricing (no doubt getting things ass-backwards, as the Americans would say). But Snow Leopard is so good that I want to get everyone who has ever used any of our products to get on the platform, so we can build on up with the good stuff from this point on. I've changed our system to make it possible for everyone to upgrade to the equivalent Snow Leopard product for USD $15 if they've ever bought any one of our previous products, including going all the way back to Postfix Enabler for Tiger.

I say "our", not because I'm royalty, but because Hai Hwee, who's responsible for a lot of the work in Luca and for our Internet store - every time you buy something, it's her code that is doing the processing - is going to come back and work with me full time from end December after a stint teaching at the local polytechnic (but she's through with all that). Maybe work on Luca will move a lot faster then. Or at least that's what we've planned.

Now that's $15 for a "pro-level" product that's superior, in terms of features, to the product that it replaced in Leopard, and which a significant number of people have shown they're willing to pay $25 for at full price. So I believe $15 represents good value for those who're upgrading to Snow Leopard.

But why $15? After 5 years doing this, I think it's absolutely the lowest point to make this type of venture worthwhile. To compete, someone with another product will have to come in at $10, but that's a very painful place to be in. Just ask me - I've been at that level for 4 of the last 5 years. And 15 USD now has lost so much of its value following the slide in the US$ exchange rate that it's a lot closer to the 10 USD of 4 years ago than it is to 15.

Then there is the element of charging what the market will bear. What has surprised me is the number of people paying the full 25 USD price - even people who could have taken advantage of the upgrade offer if they had wanted to. Over the years I've been bouyed by the sentiments (if not the money) of these people who've signalled with their purchases that the product has at least met, if not exceeded, their expectations even at full price.

But setting the price higher than that could create a shelter for a competing product to slip under. Or at least that's the theory from MBA-land.

But then, what do I know? I'm still learning. Now, off with the suit, and back to coding.

I've just finished Outliers - The Story of Success by Malcolm Gladwell. Like the first book, The Tipping Point, I would give it two thumbs up. I believe there's a lot of truth in what he says. That your success is not a product of just your own hard work, but it's also through a whole lot of luck as to how opportunities had come your way. Like my life would have been vastly different had my grandmother not plucked me out to rear as her own simply because I was the eldest son of her (remaining) eldest son - probably as a substitute for the favoured son she lost to the Japanese in the Second World War. I think my brothers had always felt that.

Posted at 4:12PM UTC | permalink

DNS Enabler 4.0.3

Category : Technology/DNSEnabler4dot0dot3.txt

I've been working on DNS Enabler for Snow Leopard. I've released DNS Enabler 4.0.3, a day after releasing 4.0.2, because while working on adding CIDR-formatted IP address support to 4.0.2, I've realised that people do use DNS Enabler to manage a whole lot of domains.

So, that one line data entry field for Virtual Domains is getting to be vastly inadequate. (And that goes the same for MailServe).

I've extended the length of that field, for the moment, while I take some think about how I should be handling this going forward :

I'm very happy seeing these CIDR addresses (e.g., 12.53.154.64/30.65) in DNS Enabler because those slashes had been rather difficult to handle - they messed with sed when I do text substitution in the Unix scripts. And you're only asking for trouble when you name Unix files with a slash in their name. But I got that sorted out in the end and learnt a few more things about Unix shell programming along the way.

By now I think, comparing features, DNS Enabler is on par with the Quick DNS Pro from Men and Mice that I used to use from some time back. Maybe it can already do some things better and faster. But if I can add BIND views and custom BIND options support, now that would be really taking things forward quite a bit. And I remember paying $200/$300 for Quick DNS Pro then. If only I can find the cheek to charge that much for DNS Enabler :-)

Posted at 8:03AM UTC | permalink

Fri 11 Sep 2009

Snow Leopard 10.6.1

Category : Commentary/SnowLeopard10dot6dot1.txt

I've updated my MacBook Pro and live server to 10.6.1. This time, FTP works. And everything else does, too - web, mail, dns.

So if you're wondering, it's safe to upgrade now.

Posted at 7:55AM UTC | permalink

Read more ...

Mac@Work
Put your Mac to Work

Sivasothi.com? Now how would you do something like that?

Weblogs. Download and start a weblog of your own.

A Mac Business Toolbox
A survey of the possibilities

A Business Scenario
How we could use Macs in businesses

VPN Enabler for Mavericks

MailServe for Mavericks

DNS Enabler for Mavericks

DNS Agent for Mavericks

WebMon for Mavericks

Luca for Mavericks

Liya for Mountain Lion & Mavericks

Postfix Enabler for Tiger and Panther

Sendmail Enabler for Jaguar

Services running on this server, a Mac Mini running Mac OS X 10.9.2 Mavericks:

  • Apache 2 Web Server
  • Postfix Mail Server
  • Dovecot IMAP Server
  • Fetchmail
  • SpamBayes Spam Filter
  • Procmail
  • BIND DNS Server
  • DNS Agent
  • WebDAV Server
  • VPN Server
  • PHP-based weblog
  • MySQL database
  • PostgreSQL database

all set up using MailServe, WebMon, DNS Enabler, DNS Agent, VPN Enabler, Liya and our SQL installers, all on Mavericks.