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.

Sun 16 Aug 2009

The brick in the wall

Category : Commentary/BrickInTheWall.txt

Now that wasn't hard, right. That first post after a long long time.

It's like what I read in Zen and the Art of Motorcycle Maintenance, when Robert Pirsig was speaking as the protagonist, Phaedrus, who was teaching a student how to overcome a writer's block.

So he says, instead of writing about the whole street, you concentrate on just one house, say the church, and you think aboout the church and then its wall, and you pick a single brick in that whole wall to think about, and you start writing about that brick. And you notice the words will come, just now maybe a trickle, but now it's pouring forth, and you go with the flow, and that's how you get past that block.

Do it one step at a time.

It all started when I thought it would be nice to be able to update this weblog directly from my iPhone. That brought me from one thing to another - building our SQL frameworks so they'll be able to work on the iPhone, diversions into WebKit, building our Maven (which is a Cocoa MySQL-type tool) as a SQL front-end for the iPhone, etc. Then I got lost. And exhausted. And all the while Snow Leopard was looming. And then it all stopped. Log-jammed. Nothing was moving.

But it was a pretty nice place to be in - inactivity, serenity, bliss. While it lasted.

But I've got going again. Had been for quite a while. But it took this move to a new server to run Snow Leopard to get me writing again.

I still hadn't be able to update the weblog from the iPhone. But I'll come back to work on it after I've got everything - MailServe, DNS Enabler, WebMon, Luca and Maven - working properly on Snow Leopard.

P.S. : Wonder who's still reading all this.

Posted at 3:30PM UTC | permalink

Snow Leopard

Category : Technology/SnowLeopard10A432.txt

I've just moved my server to a new iMac server running the 10A432 release of Snow Leopard, with the mail, web and DNS services set up with the help of the new versions of MailServe Pro, DNS Enabler and WebMon that I'm working on for Snow Leopard.

It's just so I know how these services will hold up when Snow Leopard is released. It's been a lot of work just to get everything working again. There are still some kinks to work out. Nothing's ever easy with these OS X upgrades. Don't be fooled when they all just work, as they should in two weeks' time. Hope I'll have more time, though.

Posted at 2:42PM UTC | permalink

Sat 10 Jan 2009

Luca 2.6.10

Category : Technology/Luca2dot6dot10.txt

I've updated Luca to 2.6.10.

This fixed a bug with the Cocoa Number Formatter that appeared with Leopard 10.5.6. This caused the voucher reference numbers to be displayed with the format "P0710.00/19.00" instead of "P0710/0019". So we've needed to add a call to NSNumberFormatter to "setFormatterBehavior" to "NSNumberFormatterBehavior10_4" to make the formatting work as it did before.

I've also updated all my systems, including my live server, to the very latest Apple Software and Security Updates for Leopard 10.5.6. All the services, like SMTP, POP, IMAP, Dovecot, Fetchmail, DNS, and LDAP continue to work as they did before, without any new problems (though I'm always tempting fate when I make such declarations).

Posted at 1:38PM UTC | permalink

Mon 27 Oct 2008

MailServe Pro 4.0.1

Category : Technology/MailServePro4dot0dot1.txt

I've released a new version of MailServe Pro. This solves a problem with the Fetchmail Log growing too big with time.

In version MailServe Pro 4.0.1, Fetchmail logs its activity in the System Log, which, of course, does get archived and rotated automatically. You can still view the Fetchmail-related activity in the System Log using MailServe Pro's Log Panel. But from this point on, /var/log/fetchmail.log is not used by MailServe Pro and can be deleted to reclaim disk space.

If I continue to use /var/log/fetchmail.log, I have to write my own script to rotate and archive the log file periodically. But Fetchmail needs a restart when the log is rotated. So it's all very complicated. Then I realised I could achieve the same result by telling Fetchmail to funnel all its log activity to the syslog daemon and letting syslog deal with all the log rotation stuff. It worked.

I'd rather spend my energy improving the other aspects of configuring and setting up a mail server. But having the Fetchmail log grow uncontrollably to infinite size was rather troubling. So I'm glad I at least got that out of the way. I'll have to update plain old MailServe for Leopard too, next, if there proves to be no trouble or nasty side-effect due to this change.

Posted at 2:56PM UTC | permalink

Tue 16 Sep 2008

Mac OS X Leopard 10.5.5 Update

Category : Commentary/Leopard10dot5dot5.txt

I've updated all my Macs to the new 10.5.5 Software Update. I've done the usual tests - Postfix, Fetchmail, UW/IMAP, Dovecot, and the web and DNS server - they all continue to work as before.

I had a jolt early this morning when I had an email about Dovecot refusing to start up for one MailServe Pro user after he had applied the 10.5.5 update. But a restart seemed to have fixed that, and all now seems well in MacLand.

Hope I hadn't spoken too soon.

It's the responsibility. Imagine a Software Update, and Dovecot or UW/IMAP or Fetchmail, all or singly, refusing to start up. And I can't find the answer. Can't make it work again. With 12,000 users (or at least those that paid) bearing down on the thin edge. What jolly good fun. I must have a death wish.

Posted at 8:32AM UTC | permalink

Tue 12 Aug 2008

R & D

Category : Commentary/RandD.txt

This is a little application I made to test my understanding of Cocoa's System Configuration Framework, to see if I can mimic the behaviour of the Mac's Network Preferences panel.

To build more intelligence into MailServe and DNS Enabler I need to tell, for example, what network range the Mac is on, and whether there is a DNS Server already assigned to it and, if not, to be able to assign it for the user.

And I need to know what location the Mac is on because, if I know that, I can assign the right smart host that will work in that location.

This is something I've been wanting to work on for some time and I think I've finally cracked it.

All these will find their way into future versions of MailServe and DNS Enabler.

Mac OS X plus Cocoa is a fantastically powerful development platform. The System Configuration framework is at the heart of why the Mac often appears to be so smart, especially when it knows how to reconfigure itself so smoothly when you move around networks. And the fun thing is that your own application can get access to all these intelligences and plug itself onto all these notifications, too. Oh, the things you can do with it ...

Posted at 5:11PM UTC | permalink

Maven 0.7 Beta

Category : Technology/MavenContentsDraAndDrop.txt

I've been using my own CocoaMySQL work-alike, which I'm calling Maven, quite a lot lately.

So I've done some bug fixes and added the ability to move selected data rows and columns from one database to another, just by dragging and dropping - even across database types, like from MySQL to PostgreSQL.

I've also added a keyboard short-cut (Command-D) for deleting tables, columns, and selected data rows.

This latest version (0.7 Beta) can be downloaded from the Maven page.

I've been told there's already an Apache project called Maven. But I'm stubborn about calling this Maven because I think it fits the name more. When I'm through with this, you'll see why.

Posted at 4:30PM UTC | permalink

Sun 20 Jul 2008

11469 customers in every corner of the world

Category : Commentary/11469Customers.txt

I have this "Mail we love to get" page where I stick the messages I've enjoyed getting from people who've found our products helpful - enough to want to write some nice words about how they've been using MailServe, DNS Enabler, etc.

At the top right hand corner of this page, I have a count of the number of customers we've had, based on the number of unique email addresses we've recorded onto our database. Admittedly this is not a scientifically accurate count because the same person could use more than one email address, but it should be a close enough approximation.

I've been manually updating this figure. But what I really wanted to do is to automate this via a PHP call to MySQL. So, I've just done that. Proves I can still code :-)

Posted at 2:31PM UTC | permalink

Mon 14 Jul 2008

From Marconi to the iPhone 3G
- Reaching Across 100 years, Wirelessly

Category : Technology/Marconi.txt

The iPhone 3G is here (though not where I am). But are we so blasé that we don't retain a sense of wonder that the thing could even work at all - as a telephone - without wires?

It was in 1894 that Guglielmo (Goo-yee-ail-mo) Marconi first had the idea that messages could be sent over long distance through thin air. He was, then, just twenty years old.

If you're interested in how we got from there to here, read Erik Larson's Thunderstruck which brings that age of discovery to life, when giants like Marconi and Nikola Tesla competed to create those inventions that we now take for granted, yet can't live without. How I love books like these.

That was when I first saw a great new way open before me," Marconi said later. "Not a triumph. Triumph was far distant. But I understood in that moment that I was on a good road. My invention had taken life. I had made an important discovery."

It was a "practician's" discovery. He had so little grasp of the underlying physics that later he would contend that the waves he now harnessed were not Hertzian waves at all but something different and previously unidentified.

Enlisting the help of his older brother, Alfonso, and some of the estate's workers, he experimented now with different heights for his antennas and different configurations. He grounded each by embedding a copper plate in the earth. At the top he attached a cube or cylinder of tin. He put Alfonso in charge of the receiver and had him carry it into the fields in front of the house.

He began to see a pattern. Each increase in the height of his antenna seemed to bring with it an increase in distance that was proportionately far greater. A six-foot antenna allowed him to send a signal sixty feet. With a twelve-foot antenna, he sent it three hundred feet. This relationship seemed to have the force of physical law, though at this point even he could not have imagined the extremes to which he would go to test it.

Eventually Marconi sent Alfonso so far out, he had to equip him with a tall pole topped with a handkerchief, which Alfonso waved upon receipt of a signal.

The gain in distance was encouraging. "But," Marconi said, "I knew my invention would have no importance unless it could make communication possible across natural obstacles like hills and mountains."

Now it was September 1895, and the moment had come for the most important test thus far.

He sat at the window of his attic laboratory and watched as his brother and two workers, a farmer named Mignani and a carpenter named Vornelli, set off across the sun-blasted field in front of the house. The carpenter and the farmer carried a receiver and a tall antenna. Alfonso carried a shotgun.

The plan called for the men to climb a distant hill, the Celestine Hill, and continue down the opposite flank until completely out of sight of the house, at which point Marconi was to transmit a signal. The distance was greater than anything he had yet attempted - about fifteen hundred yards - but far more important was the fact that it would be his first at sending a signal to a receiver out of sight and thus beyond the reach any existing optical means of communication. If Alfonso received signal, he was to fire his shotgun.

The attic was hot, as always. Bees snapped past at high velocity and confettied the banks of flowers below. In a nearby grove silver-gray trees stood stippled with olives.

Slowly the figures in the field shrank with distance and began climbing the Celestine Hill. They continued walking and eventually disappeared over its brow, into a haze of gold.

The house was silent, the air hot and still. Marconi pressed the key on his transmitter.

An instant later a gunshot echoed through the sun-blazed air.

At that moment the world changed, though a good deal of time an turmoil would have to pass before anyone was able to appreciate the true meaning of what just had occurred.

"At that moment, the world changed". The other person at the time who saw the world as we have it today was that great, though tragic, figure Nikola Tesla. There's this passage in Thunderstruck :

In a much-read article in the 1900 issue of The Century Magazine, Tesla alluded to things he had learned from experiments at his laboratory in Colorado Springs, Colorado, which he claimed could generate millions of volts of electricity, the equal of lightning. He wrote that in the course of his experiments he had found proof - "absolute certitude," as he put it - that "communication without wires to any point of the globe is practicable."

The article prompted J. P. Morgan to invite Tesla to his home, where Tesla revealed his idea for a "world system" of wireless that would transmit far more than just Morse code. "We shall be able to communicate with one another instantly irrespective of distance," Tesla wrote in the Century article. "Not only this, but through television and telephone we shall see and hear one another as perfectly as though we were face to face."

That word: television. In 1900.

"That word: television. In 1900."

"Not only this, but through television and telephone we shall see and hear one another as perfectly as though we were face to face."

... and now we have iChat AV.

Leonardo, Marconi, Tesla, Jobs :-) Visionaries all.

Posted at 9:00AM UTC | permalink

Thu 10 Jul 2008

"Though I was blind, now I see"

Category : Commentary/scales.txt

"Immediately there fell from his eyes something like scales, and he regained his sight, and he got up ..." and became an apostate.

Reading "god is not Great - How Religion Poisons Everthing" (as capitalised by its author, Christopher Hitchens), and being persuaded by his argument, is like experiencing the conversion of Saul of Tarsus on the road to Damascus, only in reverse.

On the other hand, you may just want to burn the book, and the author with it. There are not many "faiths" left in the world that Christopher Hitchens has not insulted. But insult is in the eyes of the beholder. It depends on how you've come to pick up this book.

It helps if you've read Richard Dawkins' "The God Delusion" and have been persuaded enough to open up - to critical inquiry - all your years of ingrained beliefs.

So, if you're persuaded (note that I use "persuaded" three times - the point being that you're not forced to believe by diktat) that the evidence in favour of evolution (as to how we came to be) is incontrovertible, then Hitchens makes you come face-to-face with the implications of that switch in world-view - with no apologies whatsoever. Not while people are being burned, killed or otherwise dismembered somewhere in the world this very minute, in the name of religion of one stripe or the other.

So, there, I've laid clear my sympathies. Were we ever to go through our very own "Cultural Revolution" (or "Religio Inquisition"), the web being such that everything ever written can be searched, indexed, filed and noted for future action, I may have just signed my own death warrant. Would it be better then following Descartes' injunction, that "He who hid well, lived well"? But, can anyone show me a better way to stop the carnage than to let the scales fall from our eyes?

In Amy Chua's "World on Fire", you'd get rather more prosaic, and rather more believable, reasons for these same killings - or pogroms, fatwas, and ethnic cleansings. "Imagine there's no heaven" - do we believe in John Lennon now?

Posted at 1:31PM UTC | permalink

Mon 07 Jul 2008

China Rail - The Importance of Being Punctual

Category : Commentary/CRH.txt

Okay, last post about China, in case anybody is interested in making a similar trip. We travelled between Shanghai, Suzhou, Nanjing and Hangzhou via China Railway High-Speed (CRH)'s bullet train.

This is the relatve location of the four cities :

China Railway's bullet train system is very impressive. It's always on time and it makes travelling very easy from Shanghai to beyond (just 30 minutes between Shanghai and Suzhou, in the time I take to get from Woodlands in the north of Singapore to the Central Business District in the south via our own Mass Rapid Transit system and we all know how small Singapore is).

There's a bullet train between Shanghai and Beijing that I'd like to try out when I next get the chance. And I think it's possible to get from Shanghai to places like Xian and Chengdu via the same system.

This is a link to a China Rail map.

And in each of these cities that I've mentioned, there's a Ming Town Youth Hostel - which we stayed in and which I highly recommend if you don't mind roughing out (once I saw this, below, in Shanghai, everything else seemed such a bore) :

Another jibe at our MRT (Mass Rapid Transit) system. In the last four years, while we've been building our Circle Line and which we'll still be building next year or two, Shanghai had completed 4 (four !) new lines, making eight in all, including their own circle line, and much of these tunnelled under very dense built-up areas. Have we lost our spark, O people of Singapore? How can we compete? It's frightening, isn't it?

Posted at 6:14PM UTC | permalink

Hangzhou

Category : Commentary/Hangzhou.txt

The joy of traveling is to discover delightful places. These are some of the pictures that I took when we were in Hangzhou :

I can work anywhere in the world, so long as I can get an Internet connection. I don't even need to be where my server is. If not for my kid's schooling, my wife and I would be quite happy to stay a few months each time in a different place. And Hangzhou would be one of those places. And, maybe, Beijing, too, in spite of the pollution, if they would have us.

Posted at 5:06PM 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.