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.

Mon 20 Feb 2012

Postgres Fixes in Liya 2.0.4

Category : Technology/Liya2dot0dot4.txt

I've fixed some annoying Postgres problems that Liya was having. I was trying to make Postgres work exactly like MySQL, from the point of view of a Liya user, although they work very differently in the way they are set up.

For example, I wanted to be able to create a new user for either database in Liya, and have this user be able to access either database system from any client machine.

And this user would then be able to create and modify new databases, tables and fields.

With Liya 2.0.4, I think I've finally nailed it so both database systems work exactly alike to a Liya user. I've been able to hide the internal differences between the two systems behind a common programming interface, so this benefit will also accrue to other database-centred applications that we are developing, like Luca

So Liya for Lion 2.0.4 is available for download now. It'll be available also at the Mac App Store, soon as Apple approves it.

I also have a new version of our PostgreSQL installer for Mac OS X Lion. It installs the latest PostgreSQL version 9.1.4. I'll release it tonight when I can get a faster internet connection. I'm now working at the King Albert Park McDonald's while my kid is studying for his exams.

Posted at 7:27AM UTC | permalink

Fri 17 Feb 2012

Luca for Lion 4.0.3

Category : Technology/LucaForLion4dot0dot3.txt

Luca can now handle exporting to PostgreSQL versions 8.4.x, 9.0.x and 9.1.x databases.

Download Luca for Lion 4.0.3 now. 

Posted at 11:04AM UTC | permalink

Mountain Lion

Category : Technology/MountainLion.txt

Just when I thought I could settle down to work on all my apps, here's another big change coming. Mountain Lion!

 

Posted at 12:51AM UTC | permalink

Luca 4.0.2 Update

Category : Technology/Luca4dot0dot2.txt

I've just released an update to Luca for Lion, to version 4.0.2.

Luca now has the ability to save and re-use any number of connections, for people who store different companies' data in different Lucadb's.

Luca4dot0dot2.png

And this version restored Luca's ability to export Lucadb to another SQLite database.


Posted at 12:06AM UTC | permalink

Tue 14 Feb 2012

Luca for Lion 4.0.1

Category : Technology/LucaForLion4dot0dot1.txt

I released Luca for Lion 4.0.1 this morning. I'm cleaning up and simplifying the code, and reducing the number of buttons everywhere - to use only the minimum necessary to get the job done. The more I simplify, the cleaner the code-base that I can build from to put in the long-requested enhancements.

LucaForLion4dot0dot1.png

From the Release Notes :

Luca looks first for a Lucadb database containing the accounting data next to the app. If it can't find one, it looks for a Lucadb in the user's Documents folder. If it still can't find one, it creates a fresh Lucadb in Documents, with an example Chart of Accounts and sample vouchers (payments, receipts, payables and receivables) created for the current month. 

Luca can export the Lucadb to either MySQL or PostgreSQL. Changes have been made to simplify this. You choose which place to export the database to. Luca allows you to test the connection (the destination database must already been created, but which can be left empty) first. If the connection is OK, you're allowed to proceed with the export. Once the export finishes, the connection is saved in a pop-up menu, so you can switch to it. 

This is designed to give Luca only one place where the user can switch databases, so that all the set-up tables and the default currencies are all changed cleanly.

PS: I'll work on Luca for a while more before I go back to build on MailServe, DNS Enabler, etc. I hope Apple will stick with Lion for a while more. It's really tiring keeping up with the changes to the system.

Posted at 11:16AM UTC | permalink

Fri 03 Feb 2012

Mac OS X Lion 10.7.3

Category : Technology/10dot7dot3.txt

I've updated my server to Mac OS X Lion 10.7.3. Things look OK still, so I guess it's safe to say it's safe to upgrade.

Posted at 2:57AM UTC | permalink

Mon 30 Jan 2012

Luca for Lion

Category : Technology/LucaForLion.txt

I've released Luca for Lion. It's now available for download. Luca Snow users can upgrade now.

I'm now working on a version for the Mac App Store.

Posted at 11:59PM UTC | permalink

Sun 13 Nov 2011

DNS Agent

Category : Technology/DNSAgentUpdate.txt

I've updated both the Lion and Snow Leopard versions of DNS Agent, my app for dynamically updating dyndns.com's servers with your Mac's current public IP address.

In April last year, I updated DNS Agent for Snow Leopard to 1.0.1 because I realised that dyndns.com servers have started to ignore pings, by working in stealth mode. I ping the dyndns servers to make sure that they were available before attempting to make my updates. So, since pings don't work, I check instead that the DNS Server is actually listening on the appropriate port (for updates from clients) before trying to update to server.

Then sometime recently, dyndns.com servers have also started to ignore telnet probes on these well-known ports. So since these checks don't work anymore, DNS Agent gets stuck waiting to update the dyndns.com server.

So, with version 1.0.3 of DNS Agent for Snow Leopard (and version 2.0.1 of DNS Agent for Lion), I now stop doing these checks and simply proceed to update the dyndns.com server, trusting that it would be there, as they should be.

This should probably (reasonably) work almost all the time. I log any failure to update the dyndns.com server, but up to now, my log shows that updates do work all the time.

It needs more thought. I'll update the app again when I have a better idea.

Posted at 1:48PM UTC | permalink

Fri 11 Nov 2011

Liya for iPad

Category : Technology/LiyaForiPad.txt

I just did a version of Liya for the iPad. It's now available at the iOS App Store.

LiyaForiPadScreenShot.jpg

I'm now working on Luca, the accounting system. I'm doing three versions. Two for Lion, one of which will, hopefully, go to the Mac App Store and have support for iCloud (and conform to Apple's Sandboxing rules) but it'll only use the built-in SQLite database.. The other, we'll sell on our own site and will have the usual support for MySQL and PostgreSQL.

Then there's a third version - Luca for the iPad. It's not quite so easy to port an app from the Mac to the iPad, especially one that exploits the ability to launch multiple windows to offer the user multiple views of the same data. The single window on the iPad does initially feel like a straightjacket. I'm still not sure how this could be done.

P.S.: After this, I have to go back to the server apps. The API calls that I've been using to do most of the magic are going away. What if we can't install our own apps on our Macs beside those Apple-sanctioned ones from the App Store? That'll be the time to find another platform to pour the heart into.

Posted at 2:46AM UTC | permalink

Wed 02 Nov 2011

Steve Jobs

Category : Commentary/SteveJobs.txt

I've finished reading "Steve Job". I took my time over it cos I didn't want to come to the end - that had felt sadly like literally closing the book on Jobs. 

About half-way thru, I realized I could write this book myself. I've read all the books on Jobs and Apple over the years. Except for Jeff Young's The Journey is the Reward, most, like Jim Carlton's & Mike Malone's were "hatchet jobs". 

So, this biography, while being thankfully sympathetic, mostly rehashed the things we already know & thereby disappoints. I kept thinking, you idiot, you get to ask Steve Jobs questions? Jobs, for one, would know the loneliness of the contrarian thinker. You can plumb the depths of his soul. 

That's the tragedy - the wasted opportunity. We know it won't come again.

Posted at 1:52AM UTC | permalink

Thu 11 Aug 2011

Liya on the App Stores

Category : Technology/LiyaOnTheAppStores.txt

Liya for Lion is now available on the Mac App Store. It's at version 2.0.

I just wanted to feel what the Mac App Store submission process is like. It's slightly simpler than the App Store for iOS apps. Will think about submitting Luca next. Unfortunately, my server apps will never make it to the App Store because of Apple's restrictions on apps that need to gain supervisor/root privileges.

Liya for iPhone has also been updated to 1.1 on the App Store. I had a sudden spike in downloads the last two days. It had previously been anaemic. I wonder why.

Posted at 3:19AM UTC | permalink

Sat 06 Aug 2011

Handling NULLs in SQL and NSDate Fields

Category : Technology/NULLDates.txt

I've finally managed to solve a long-standing design problem, probably because I'm settled now with Lion and have more time to think.

The problem I was having is with NULLs in date fields. Why do we have NULLs? When we don't know what an actual date will be when we're filling up a form earlier in time - e.g., an insurance claims data entry screen, when we don't know when a surveyor will be able to inspect a vehicle damaged in an accident.

Both PostgreSQL and MySQL will accept NULLs in date fields. But the problem comes when we try to show these dates in a Cocoa Mac OS X (or iOS) screen, using fields that have been formatted as dates. This is because NSDateFormatter requires the data entry to be a properly formatted date value, and NULLs are not.

The problem is compounded when we're working with tabular data and, to retain our sanity, we want all data in a single column to belong to the same data type, so mixing NULLs and proper date values won't do.

I've since worked out a scheme whereby NULL dates from the database get converted to [NSDate distantDate], and when I see as [NSDate distantDate]'s coming back to the database, I convert them to NULLs.

So, inside Cocoa (and iOS), my tabular data will work consistently. Each column is a distinct, consistent data type.

But the problem with showing [NSDate distantDate]'s as actual data values in the user interface is that it clutters up the data in places where the user would have expected blanks in the dates, like below:

[NSDate distantDate] should be 4001-01-01 00:00:00 +0000, but it is 4000-12-31 19:00:00 -0500 in the screen shot above because that is [NSDate distantDate] in Montreal. I set my location to Montreal, or it could be any other city, to make sure my Time Stamp fields continue to work correctly whichever country or locale my Mac happens to be in. This is something I've spent a lot of care on, that my database frameworks and apps like Liya work as fluidly with shifting locales, as Apple's Macs, iPhones and iPads do.

So, I've always wanted NULL dates to show up more naturally, like in the screen shot below, and I've finally solved the problem by writing a custom sub-class for NSDateFormatter. Turns out to be not too hard. I wonder now why I took so long. Probably because it's hard to see clearly when so many things are moving all around, with the migration to Lion.

Liya version 2.0 for Lion is now ready for download.

Somehow I just couldn't make a version work for Snow Leopard anymore - Xcode complaining about some problem with dynamic libraries from 10.6. So, going forward, I'm now going to work only with this Lion version and drop the Snow Leopard version.

I've also submitted this version to the Mac App Store, just to see what the submission process is like. It seems a bit easier than with iOS apps. This is my first Mac App Store app and it's free.

Posted at 10:31AM 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.