|
Mon 24 Jan 2005
Programming on Mac OS X
Category : Technology/Feb2005OSXProgrammingCourses.txt
This is a teaser. There are a couple of courses on Mac OS X software development coming up at Apple Singapore for the month of February. More details will be available soon. Watch this space if you're interested in attending. It'll probably be absolutely free. (That should get some attention.)
Posted at 1:56PM UTC | permalink
Fri 21 Jan 2005
Follow Your Dreams
Category : Commentary/followyourdreams.txt
Bruce Whitred came down all the way from Japan to sit with me through an AppleScript Studio Course at Apple Singapore. (In the picture below, I had asked Hai Hwee, who knows some Japanese, to come along and show Bruce how to do English-to-Japanese localisation using AppleGlot.) 
Actually, at the end of the two-day course yesterday, I realised that it was really my privilege to have met up with Bruce, who's a most interesting guy. Dreamsclub.com is his website and this was what he told me when we first corresponded, which I reproduce below because I feel you really ought to hear him in his own voice : I believe things happen for a reason. Talking to Bruce did jolt me out of a rut I had got into lately. We really ought to be glad we're alive. Living life to the full, stretching ourselves to meet our potential, believing that anything is possible - if we set the goal, put in the effort, and work out the process to get there. I watched Bruce grope around with the key concepts on the first day, clicked into gear at the start of the second, and then accelerate as his understanding took root at the end of the day. This is a guy who can prove that the idea works. I think I learnt more than I had taught.
Posted at 3:54PM UTC | permalink
Mon 03 Jan 2005
I get a breakthrough
Category : Technology/spamblocks.txt
We know for a fact that some mail servers are rather picky. They will reject mail coming from a dynamically assigned IP address, or one without a domain name, or follow any some other rule. I've been wondering why my mail from cutedgesystems.com (which is on a dynamic IP address) sometimes get through to the people at Apple Singapore and sometimes they don't (when Apple's servers' decide that it could be spam). It's puzzled me for over a year - i.e., what has changed in my configuration that makes those servers decide one way or the other, because obviously I want my mail to get through all the time. I rebooted our server today and realised that I couldn't send mail out to Leon Chen at Apple anymore, even though I've been able to do so for months now. So something has changed. I dug around and found the answer - it's the DNS server. I've been playing around with setting up a DNS server, on and off, over the year. Turning the DNS server off causes the mail to be bounced back from a picky server. Turning it back on gets the mail through. If there is a DNS service running on our local network when the mail server starts up, it'll be able to correctly discover its own domain name. (Otherwise it knows itself as, say, roadsteadserver.local). Seems like, when it knows that it should be cutedgesystems.com, it'll be able to send mail out to other servers without getting bounced. (Or some such explanation.) I don't know if I really understand what is happening but the moral of the story is - it's good to be able to run your own DNS service.
Posted at 5:31PM UTC | permalink
The Sun Breaks Through
Category : Commentary/newbeginnings.txt
After four days of torrential rain, we greet the sun for the first time in the New Year. Like the sky has been crying buckets, for the trail of devastation left behind in Asia. 
Posted at 10:37AM UTC | permalink
Wed 29 Dec 2004
Java Debugger in Xcode
Category : Technology/XcodeJavaDebugger.txt
The nice thing about getting hit with problems is that you often discover new things in the process of solving those problems. We thought we had lost the ability to debug Java code when we moved from Xcode 1.2 to Xcode 1.5. That was something that was asked about quite a lot during the "Java on OS X" course last week. So we were planning to move back to Xcode 1.2 the next time. However, while trying to stop the Java code from crashing, doing Cocoa Bindings, we really needed to know what was happening to the code. Finally, Hai Hwee, who could have been a top-notch detective in a previous life, found out how to turn the debugger back on, while fortuitously following a random Google link about remote debugging. The control's hidden in the Get Info pane for the project executable. With the debugger back on, we really made a lot of progress after that. 
The great thing is, we discovered that debugging now works for AppleScript Studio projects, too. At last. So, Xcode 1.5 is it. No use going back. What will 2.0 bring in Tiger?
Posted at 6:53AM UTC | permalink
Mon 27 Dec 2004
At the Sungei Buloh Wetland
Category : Singapore/sungeiBuloh.txt

We were at this nature reserve at the northern end of the Singapore, just across the Straits from Johore. It's called the Sungei Buloh Wetland Reserve. It's a wonderful place - a transit stop for migratory birds among the mangrove swamps, with crocodiles (though we didn't see one), sandpipers and otters. Siva, otterman and Mac user, writes a blog about nature, bio-diversity, conservation, and the Mac. Glad I've finally had a chance to make it to his home ground.
Posted at 5:17PM UTC | permalink
Doing Cocoa Bindings in Java
Category : Technology/JavaCocoaBindings.txt
We've found a way to stop our Java-Cocoa demo of Cocoa Bindings from crashing - comment out the call to "super.windowControllerDidLoadNib". Of course, why this should be so remains a mystery, since "[super windowControllerDidLoadNib:aController]" works okay on the Objective-C side? But, with this out of the way (for the moment), I've converted the project we use for our Java-Cocoa course to Cocoa Bindings : 
What does this show? One, there are places in the framework where you can step in and make a call to an existing database. The resulting data will get picked up by the Table View. Then, Cocoa Bindings takes over to synchronise the display of the detail view with the table view. This is where we save a lot of writing of Controller-type code. All the notification-related code can disappear. In fact, some of the things handled automatically by Cocoa Bindings work better than the code we write. Then, at the end of the cycle, we should be able to find a convenient place to push the changes back to the database. The things left are to figure out how and when to do data validation, how to open the detail window by double-clicking on a selection in the table view, and how to have more than one detail window open (because it's possible that a user may want to compare two detail records side by side). Also, I still don't yet know how to do handle check-boxes (though I've just had an idea). In summary, this is seriously useful technology, though quite a few kinks remain. I keep watching out for when I'm going to fall off the deep end. Database access is so good on the Java side - we have an embarrassment of riches using JDBC to connect to a wide range of databases, remotely as well as locally. The down-side is that you get more problems using Java with Cocoa than with Objective-C. But then, there is none of the database capability we've come to expect on the Objective-C side (though Tiger promises to correct this - but is the database access there only going to be single-user/single-machine, and only via SQLite?).
Posted at 4:14PM UTC | permalink
Sun 26 Dec 2004
Cocoa Bindings
Category : Technology/CocoaBindingsAndJava.txt
I'm trying to understand Cocoa Bindings, to see if I can write less code. My starting point is Michael Beam's O'Reilly article, "The Cocoa Controller Layer". I've been playing around with extending the sample code and it's starting to become clearer - like when and how to step in and do custom things, like interfacing with a database. 
This will make a great demo (of the jaw-dropping kind). But my databases are all accessed through Java JDBC drivers, and we've got tons of Java code I'd like to plug into. So, I started on a Java-Cocoa version and got things to the point where the Table View shows the right data but the application crashes soon after. Reminds me of Aaron Hillegass' "Don't write Cocoa applications with Java" comment. It's a fair point. But you may have code that already work well in Java - modelling the business rules, putting stuff in and out of databases, running off web servers, and providing web services - and that's often the case in the enterprise. It's possible to map out a large enough part of the Cocoa framework to allow Java programmers to work safely and predictably, putting Cocoa front-ends on top of their Java code. You don't have to be able to build things like Create and OmniGraffle. Enough of Cocoa already work well in Java to allow us to do productive things with it. If that could help us bring a lot of that enterprise data onto the desk of Mac users, wouldn't that be a good thing? Downsides to Java-Cocoa at the moment - like poor documentation, bugs, and lack of speed - ought to go away with time. It shouldn't stop people doing Cocoa using Java. But back to Cocoa Bindings. Other good sources of information include "Introduction to Cocoa Bindings", "Cocoa Bindings Examples and Hints", and the "Cocoa Bindings" discussion at cocoadev.com. I'll put up more links when I find them. I'll leave you with another comment from Aaron Hillegass. Cocoa Bindings look great in demos, but may be less than useful in practice. However, this is a most interesting development with a lot of potential. Hope Apple continues to build on it.
Posted at 11:37AM UTC | permalink
Fri 24 Dec 2004
Java on Mac OS X Course (Dec 21 and 22, 2004)
Category : Technology/JavaOnOSX2122Dec.txt
Usually, when you see a picture like this at Apple Singapore, you would think Final Cut Pro or QuickTime or iLife or, at most, an OS X Server Administration class is underway. 
But we had about 18 people turning up at Apple Singapore for "Java on Mac OS X". Quite a lot of them were Java programmers - some new to the Mac, some already Mac users who will bleed in seven colours, having used the Mac since pre-OS X days. Most are seeing the Mac do these things for the first time - Oracle running on a PowerBook, and an iBook and every other Mac in the room turned into Java 2 Enterprise Edition web servers. Also, by the middle of the second day, they're all not just able to build Cocoa applications, but Cocoa applications using Java. Surely, not your grandfather's Mac anymore. If you put all these things together, it's difficult to deny that the Mac is a serious enterprise-class software development (and delivery) platform. Really, nothing else even comes close. I think we're getting better at explaining things and getting people up to speed doing productive work during the two days they spent with us. The feedback from the attendees has been pretty good and that meant a lot of us. We really put in a lot of effort designing the course so that the topics flow smoothly from start to finish. And all using original material, culled from the systems we have built, unavailable elsewhere on the Internet, at least not as the one single integrated whole - from command line, to Cocoa, and to the web. There is a book in there somewhere.
Posted at 6:58AM UTC | permalink
Mon 20 Dec 2004
Java on OS X Course @ Apple Singapore
Category : Technology/JavaOnOSX21Dec.txt
We're setting up the equipment for tomorrow's Java on Mac OS X course at Apple Singapore. About 17 to 20 people are expected to come (and sit under the gaze of Einstein, Picasso, Gandhi, and company). 
As with all the other sessions we've done at Apple Singapore, we get a wide assortment of Macs to try our stuff on - there're a couple of new PowerMac G5s with the liquid cooling system, the new iMac G5, and the new LCD displays. This is what we hope to cover : Java from the OS X Command Line, Java with Cocoa, and Java on the Web. 
The idea is to show how Java is implemented on the Mac, and how we can be productive re-using our code across all three interfaces. And the sample code we're using as the basis of the exercises is not a toy. It's a complete Cocoa application in miniature - with check boxes, radio buttons, pop-up-menus, sheets, drawers, tables, data source, notification, and handling double-clicks on a table, multiple windows, and accessing a JDBC-compliant database - all callable from Java. Raw material to build a wide range of Cocoa applications from. While building Cocoa applications with Objective-C feels more natural, is smoother, and is a lot more fun, lots of people have code in Java. And it makes a nice continuum being able to deliver enterprise-scale applications across the web and on the desktop, using a wide range of relational databases, including Oracle and MySQL. Java is important for the Mac in the enterprise. But what will tomorrow bring?
Posted at 4:16PM UTC | permalink
Fri 03 Dec 2004
Cutting-Edge Objectives
Category : Technology/OOPs.txt
I'm re-discovering a book I bought in 1987 - "Object-Oriented Programming - An Evolutionary Approach" by Brad J Cox. In it is a description of a language called Objective-C and how it could be used to control code complexity and aid programmer productivity. I re-read it now and come to appreciate, again, how powerful good ideas can be - in this case, ideas that were absorbed into NeXTStep and what is now known as Cocoa. I'm reading all the Cocoa material I can find, to try to develop a style that will help us build applications as quickly as we can. I believe that the way to do that is to understand the philosophy underlying Cocoa's design, and write code that works with it rather than against it. And, yes, I think there is such a thing as a philosophy to programming. And that's the kind of thing missing from the Windows world that makes it such an arid place to be in. Putting aside the religious wars concerning Mac vs PC, let's remember why we're using computers, at least in a business setting. That's to allow us to systematise as many of the business processes as we can, so that the business can function like a machine, and so that we, the owners (and those we hire to run our business) won't have to work like machines. Computers compute results, store data, and do all the steps required in an automated process tirelessly, effortlessly, and accurately. If you wield them well, you can really kill your competition. Businesses ought to choose their computing tools the way Samurais choose their swords. You've got to be able to appreciate craftsmanship. You're going into battle, and you need a philosophy, for living and for fighting. Choose your sword well.
Posted at 7:05AM UTC | permalink
Wed 01 Dec 2004
The Geography of Thought
Category : Commentary/GeographyOfThought.txt
I was re-reading that last sentence in that previous post - "But part of growing up is to accept life for what it is and just move along." That's so typically Asian isn't it? That's what we teach our kids. And bind us to that peasant of long ago, bent beneath the weeping willow, resigned to eternal cycles of flood and famine, and taxation from the Yellow Emperor. But, switching back to our modern age, if that were so, why not throw it all in and accept the dominance of Windows? Surely, resistance is futile. Why spend so much effort trying to change things? I've picked up a book called "The Geography of Thought". It's an interesting discussion about the ways Easterners and Westerners differ in their patterns of thought - and why we differ and how we came to be so. But what if we're tending towards a new synthesis, an amalgam of west and east? It may not necessarily be better, being neither here nor there, and it's quite possible we may end up with all the worst from both cultures. It's quite interesting reading this book, living in Singapore. We're at the cross-roads, subjected to such a hodge-podge of influences that we could go either way. Or neither, and find something uniquely our own, for better or for worse. That's what we're going to leave our children. Because of that, we ought to give it some thought.
Posted at 4:26PM UTC | permalink Read more ...
|