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.

Wed 20 Dec 2006

Leopard!

Category : Commentary/Leopard.txt

I've given Apple their pound of flesh in exchange for that Leopard Early Start Kit. The CD will come tomorrow but I've started downloading Leopard client. It's going to take 24 hours, by the look of it. I'll probably still be downloading when the CD arrives. (But the CD may not contain this latest build.)

It's not so early any more, but it's only now that I'm ready to take a look at it. Of course, I'm not going to be able to talk about it, under the NDA.

But, onwards, to wherever that is going to take us. Hope it's going to be fun.

Posted at 1:45PM UTC | permalink

Tue 19 Dec 2006

Maven 0.3.5 Beta

Category : Technology/Maven0dot3dot5.txt

Maven now has the ability to create tables, delete tables, and add new table columns (for SQLite3, PostgreSQL 8.x and MySQL 5 databases).

It can also now delete and modify table columns (only for PostgreSQL 8.x and MySQL 5 because you can't delete table columns in SQLite).

Three more steps, and I'll be able to get Maven to where I want it to be :

1) create databases from scratch, 2) allow drag and drop of data and table structures between the three supported databases, and 3) to support a broadening of the things we can specify on the table structures - e.g., foreign keys, default values, and especially various types of constraints.

Then Maven will start to get useful.

If I can do that, then I can keep Luca focused solely on accounting (and take away all those database management functions) because the user can use Maven to move the data across any of the supported databases.

Also, Luca can just restrict itself to providing the standard accounting reports and, hopefully, I can develop Maven so that the user can do all sorts of ad-hoc analytical reporting on it.

That, at least, is where I'm hoping to go with these two projects.

If I can use Maven to help me design and organise the data structures quickly, then I might be able to work faster on the applications I plan to overlay on top of Luca from next year, e.g., inventory, invoicing, time billing, etc...

Posted at 9:39AM UTC | permalink

Mon 18 Dec 2006

Normalcy

Category : Technology/AccidentalDoS.txt

This server has, very thankfully, settled back to normal levels of service. The bots look like they're gone, hopefully for good.

It probably wasn't a Denial of Service attack after all. More like, Incidental or Accidental Denial of Service. But, tell that to the victims of a drive-by shooting. It's no fun getting pummeled, intentional or not.

But why were the bots so smart to hit the same two pages that had a lot of images?

Here's something that could explain what happened :

"SAN FRANCISCO - A computer worm is attacking some business PCs through a flaw in antivirus software by Symantec Corp., a security company warned Friday.

"EEye Digital Security, based in Aliso Viejo, Calif., said the worm, dubbed "Big Yellow," began attacking some computer systems on Thursday...

"Big Yellow enters machines through a security hole in the corporate version of Symantec's antivirus software. Once infected with the worm's "bot" program, a hacker can use it as a way to connect with other computers for malicious attacks."

Last Thursday, US Time. It was Friday, my time. That was when I started hearing my Mac Mini server's fan whirring like a jet engine. The Mac Mini is usually so dead quiet. So that was when I realised something was up. Something was making it go into overdrive ... it was those bots.

So, if things are quietening down now, it's probably because those infected PCs are getting shut down, or the ISP admins are filtering them off their firewalls.

So, like the Christians say, "all good things happen for good...". I've got the kick I need to look at firewalls and computer security. And, so far, that looks like another fascinating area for study, now that I have the context.

I've been thinking that I had taken this with some equanimity because it's not like I had built this business so big I couldn't walk away from it. But if I were to have crossed some tipping point, then losing the ability to transact business at this particular domain - one that I had spent years building on - that would then become a crushing blow.

And this experience shows how easy it is to lose it all. Your web server and mail server get hit so hard you can't keep the ports open without your system come crashing down. Closing the ports means closing off contacts with your customers. How would they reach you then? How would you do business, bring in revenue, keep your reputation, hold on to your world?

Here's a real world case - it just happened. Look how easy it is to lose control of even your domain name. And look at how painful the consequences. Could any business recover from it?

So, with this context, the technical issues come alive. How does denial of service work? What to do immediately when it happens? Where are the choke points? How do you parry it? Where do you place your blocks? How do you trace the attacks so you block the attacks with surgical precision without bringing down the whole site, because that is precisely what the attacks are meant to do - to put you out of business.

It's clear to me now that the time to think about these things is while we're still building our business - so that our means of protecting it grow as our business grows. If we wait till it's worth the world to us, we may not have time to secure it before we lose it all. Apocalyptic and dramatic? Technology is the double-edged sword. The speed you exploit to build up is the same speed that can used to cut you down. If anything, I've seen how now.

Posted at 4:35PM UTC | permalink

Sat 16 Dec 2006

A Denial of Service Attack?

Category : Technology/DoS.txt

I think I'm getting what looks like a Denial of Service attack, since 12 hours ago, and it looks like it's getting worse.

The way it works is that my web server is getting lots of hits from all over and since the server can't distinguish between "real" and "simulated" hits, it wastes resources responding to the evil ones and so deny service to the legitimate users. This can bring the site down.

It's probably some Windows guy who doesn't like what I wrote in these pages.

For some time it has been suggested that I write Firewall software, like Brickwall (now known as Flying Buttress), to round up my collection. But I never could find the time.

Looks like I've been forced to go down this road, to understand what is going on. I'll be a computer security expert, at the end of all this, if I can figure out how to put a stop to this.

Help would be most appreciated.

So, if you're wondering why this site is slow, this is the reason :-(

Posted at 4:08AM UTC | permalink

Wed 06 Dec 2006

Frameworks

Category : Technology/Maven0dot3dot1.txt

This is embarrassing. I just realised when, I was loading up my gleaming new white MacBook, that Maven wouldn't run on any Mac other the one I had developed it on.

I screwed up the path settings for the database connectivity frameworks that I embed into Maven, so the application couldn't find them when it's loaded on another Mac. That's why Maven wouldn't run. But I've fixed it now in version 0.3.1 beta.

In this version, I've fixed some more bugs, and you can enter, modify, add or delete database records on any of the three currently supported databases - SQLite3, PostgreSQL 8.1 and MySQL5. I've made sure to test all three databases by now.

I'm now working on the ability to alter any of the table structures on any of these databases, e.g., to add or delete fields, indices, and constraints. To make all three databases work like they're the same to a Mac user, even though they're all quite different from each other in myriad ways - that's going to be the challenge.

A word about frameworks. They're like DLLs on the PC. They add functionality to an application and they can be shared by applications, e.g., Luca and Maven share the use of the same database connectivity frameworks, in which case they're normally stored in a common location, like/Library/Frameworks. But what if you want to delete Luca and Maven from your system and don't know enough to go find the associated frameworks in /Library and delete them, too? Then they live on as junk in our systems - our very own form of DLL Hell.

There's an alternate approach - embed the frameworks inside the application so they come in as one package and they die together when you later drag the application to the trash.

The picture below shows where I've embedded the connectivity frameworks - you can see them when you Control-click on Maven or Luca and do a "Show Package Contents" :

I love the thoughtfulness of this particular design - it hides the complexities from the end user so everything comes in and out as one convenient whole.

But the thoughtfulness didn't just end there, otherwise the PC geeks would have just another example of how Mac users are such wimps. The problem for a developer is, it's a pain to move each of these frameworks into the each of the applications that use them, each and every time you need to make a change to any of the pieces, just so you can test them together.

So, while developing applications, you would prefer a shared model whereby once you've made a bug fix to a framework, all the applications that use it will automatically be able to access its latest state without your having to manually move it into each application. And that's what Xcode allows the developer to do. We get the best of both world - a convenient shared library approach while in development, and it smoothly dovetails to build an integrated package out of all these little pieces that a Mac user can then conveniently use.

Maybe it's a little hard to explain this, but when I discovered how to do this, I thought, this is so neat, because I don't have to keep so many things in my head. I don't have time for the Microsoft measure of intelligence, like how many manholes are there in New York or how to move Mount Fuji, because I find, first of all, that that intelligence is without context. But I love these ideas, like frameworks on the Mac, because these are ideas that have been put together by people who understood the context in which the tools had been used and who then went on and really made them work better. That's why we can fall in love with these things.

Posted at 6:44PM UTC | permalink

Thu 30 Nov 2006

Maven beta 0.3

Category : Technology/Maven0dot3beta.txt

I've released Maven beta 0.3. It's now able to modify, delete and add data rows in the Contents table view. You can save these changes back safely to the database, or revert to the last saved status or revert selected rows. And I've enabled printing, plus you can drag & drop the data rows into Excel.

I'll work on the Structure table view, next, so we can alter the table structure, and add or delete fields, indices, and constraints. This is really going to be the crux of why I'm doing Maven (and not just as a CocoaMySQL alternative). I want to be able to get the data in and out of databases with surgical precision and use the database connectivity frameworks that I'm building to hide the differences in data types between SQLite, MySQL and PostgreSQL.

I really ought to be working on Luca, e.g., to add the ability to compute and record different tax rates on each line item so our Canadian friends can use it, as well as to add the invoicing and inventory modules. But I believe that the time I'm spending now on Maven, to improve the database connectivity frameworks, will pay back in terms of increased productivity and a greater ability to leverage the power of databases, when I get back to doing Luca and its add-ons.

And, to whet your appetite as to what we can expect, increasingly, to see the Mac do, here's a link that Kevin Mickey sent me about what someone had done to enable barcode scanning using the Mac's built-in isight camera - http://www.bruji.com/cocoa/barcode.html. The picture below shows Bruji's BarcodeScanner application scanning a barcode into the Mac using my Intel iMac's built-in camera :

And, to complete the cycle, I went and found another site that demonstrates how to get those barcodes printed in the first place, from a Cocoa application, without needing special barcode fonts - http://www.lamarchefamily.net/nakedsoft/ :

And so, you see, the Mac can do some amazing things. There's iCal integration with Address Book, Open Directory, and email-iCal-To Do integration. There are lots of things we can do. (My particular dream is to put these things together so they work seamlessly.)

If you're a soccer fan, you know the saying, that the great strikers like Ruud van Nistelrooy, they don't go where the ball is - they move to where they think the ball is likeliest to fall next. It's the same here. You see all these stuff happening on the Mac and you know you're heading towards the most productive time to be a Mac developer. And it's gonna be the most rewarding time, ever, to be a Mac user.

Posted at 8:26AM UTC | permalink

Wed 15 Nov 2006

Maven beta 0.2

Category : Technology/Maven0dot2Beta.txt

I've changed Maven's layout to implement split views. This is how I've been wanting to work with the data when I'm studying a database and its structure :

I've also implemented drag-and-drop of table names and columns to build, for the moment, single-table queries. Will work, next, on adding the ability to update the database, alter the database, and then move on to add support for multi-table drag and drop to build up a query.

Posted at 2:50PM UTC | permalink

Sun 12 Nov 2006

Workaround Bonjour No More on Intel Macs?

Category : Technology/WorkaroundBonjourIntelMac.txt

This is interesting. I just realised that I don't get the Workaround Bonjour stall on my Intel iMac anymore.

I wonder when that started to happen. I remember checking if it's still there when I updated my machines to 10.4.8, and was disappointed that it still was.

Perhaps, I've only tested it on my G4 iBook? So, to be sure, I went back to the G4 iBook and, sure enough, it's still there. It still stalls everytime a call is made to launchd load.

So, maybe I hadn't tested it on my Intel iMac. Anyway, it's gone, on that machine. I've only got that one Intel Mac. I would love to hear it if anyone else can confirm it.

Posted at 1:26PM UTC | permalink

Fri 10 Nov 2006

Maven

Category : Technology/Maven.txt

I'm working on something I'm calling Maven. This is how it fits.

But before that, let me back up a bit and explain how my world view had been shaped. I believe I'm lucky to be living in Singapore at just this point in time - just one generation earlier, and I would have been engulfged in the deprivation brought on by the Japanese invasion of World War II - no Internet and definitely no Mac, and no career as a software developer.

But when I see some parts of Bangkok that looked a bit like how Singapore used to be, I'm old enough to remember how we had made that progression.

It started with infrastructure - the building of the roads, the airport, the harbour, and then the neat, clean factories and pioneer industries.

Actually, it started with the rule of law, which we were fortunate to have inherited from the British. Read William Bernstein's fascinating and illuminating "The Birth of Plenty" about how democracy follows economic and material progress and not the other way round. But, then, I digress.

So, that's what I have been working on - building the infrastructure. The mail server, web server, and database server - these are the roads, rail and harbour when you're setting up a business.

I was at a Red Hat Linux talk yesterday and much of what was said was so much IT talk - IT guys talking to each other - of backports, and escalation, and service level agreements - all hot air over the heads of end users.

I see a different movement - of people who're coalescing around much smaller scale enterprises. Just because they can. And they've got no room for IT departments. They use consumer-level tools. And they want (and need) software that works like their consumer-level tools. Works first time, with a slip of paper for the manual, or no more than five pages. Because who has got the time to read the manual?

As organisations, they may be small in size - but as a market, in aggregate, they're huge - they're going to be huger than the old-line enterprises, if they not already are.

So what all these enablers (like MailServe, WebMon, and DNS Enabler) do is help these bands of people or individuals snap on and set up their computing/communications infrastructure, in a fashion that tries at least to match the joy of using a Mac.

But what people also need are databases - to store, organise, record and analyse their business data. A good database mirrors the health of the business. We have great database solutions on the Mac - SQLite3, MySQL5 and PostgreSQL - and they're all free and very powerful. But they remain hidden, unless there's a way to help people tap their potential.

That's what I'm trying to do with Maven - to realise the potential of all these database solutions so we get them to play with the rest of the things we're starting to exploit.

Ironically, it is Microsoft that is showing us the way - look at this demo of Microsoft's Office Accounting Express. The power comes from having an integrated workflow - with all the parts coming together to make the whole greater than the sum of its parts. This is what I'm trying to express, to tie all these things I'm doing together. We can do it on the Mac. I, of course, believe we can do it better. That's why I built Luca, the accounting system. Otherwise, why bother?

Posted at 6:15PM UTC | permalink

Thu 26 Oct 2006

Luca 2.4

Category : Technology/Luca2dot4.txt

I've received an updated French localisation from Joselyne Rochaud and Corentin Cras-Méneur for Luca.

I've decided to name this as Luca 2.4 to denote that it's a major change with the addition of the PostgreSQL option. Should have just done it earlier.

Posted at 5:56AM UTC | permalink

Wed 25 Oct 2006

Luca 2.3.2 with PostgreSQL Support Released

Category : Technology/Luca2dot3dot2.txt

I've released Luca 2.3.2 with PostgreSQL support. There are also some minor bug fixes. I've promised some people that I'll do the Postgres version. So that's a promise kept.

A good way to try out PostgreSQL on OS X is via Marc Liyanage's very excellent installer.

The PostgreSQL documentation page provides a nice gentle introduction to SQL. I'm finding that, between the three - SQLite, MySQL and PostgreSQL - I'm using PostgreSQL more like the reference platform for standard SQL. I'm looking for a way to write code that is perfectly portable across the major SQL platforms. I'm encouraged, from this successful port to PostgreSQL (it took only five days), that this is in fact possible. This may point to a commoditising of the database layer, since these products become largely substitutable for one another. Let's see if this proves to be true.

Posted at 1:47PM UTC | permalink

Thu 19 Oct 2006

Luca & PostgreSQL - Client/Server - It Just Works

Category : Technology/LucaPostgreSQLClientServer.txt

I've got Luca on PostgreSQL largely done. Maybe a bit more testing is needed, just to be sure. But every Luca feature works on PostgreSQL.

A few things PostgreSQL does differently from MySQL and SQLite : (1) PostgreSQL "folds" all table and column names to lower-case. I've mentioned that before. (2) It doesn't support DROP TABLE IF EXISTS - so I had to find a way to check that a table exists before dropping (deleting) it in a script. And (3) It's very picky about dates - it won't accept invalid date values. But sometimes we don't yet know an exact date, like a date-of-birth field. Both MySQL and SQLite are much more accomodating and therefore more practical. Quite like the way Java is so dogmatic when compared to the wonderful pragmatism exhibited Objective-C. But other than that, all the SQL code behaved properly when ported over to PostgreSQL. This is better than I had ever dared hope it will be.

I copied this build of Luca over to a machine, my iBook, which doesn't yet have PostgreSQL installed on it. I started up Luca on the iBook, and pointed it towards the machine that does have PostgreSQL and is hosting the accounting database, i.e. my Intel iMac.

And ... it just works. Luca accesses the database over the network. All the magic is packed into the little connectivity framework bundled into Luca. You don't need anything else on the client machine. And the clients can be any Mac, anywhere on the Internet.

Note : MySQL uses port 3306, Oracle uses 1521, and PostgreSQL uses 5432. These are the ports I had to open in my firewall. The only other thing I had to do is to edit the PostgreSQL config file to give my particular Postgres user account the rights to access the database from any IP address. And that's about it.

And I'm thinking just how stupid Oracle is. You have to go to every Oracle client to install SQL*Net - a 20 to 30 minute installation on a PC - even if you just want to access Oracle via a GUI application.

A PostgreSQL or MySQL database installation is done in just minutes. By way of contrast, an Oracle database installation can take you at least half a day. And, believe me, at the end of it all, it doesn't work any better. In fact, you can get a lot more work done, a lot faster on PostgreSQL or MySQL. There are some config file editing for PostgreSQL and MySQL, e.g., for setting up user account access rights. But if I build a Postfix Enabler/DNS Enabler-type interface for this, it can be done in seconds.

All this speed adds up to a tremendous business advantage. You can pack up, go somewhere else, set up shop, and be operational in minutes. This is the holy grail of disaster recovery planning (provided you have off-site backup for your data). Use a Mac. It doesn't just look good. It's got muscles in all the right places.

Posted at 6:19PM 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.