|
Mon 29 Nov 2004
May a Thousand Applications Bloom
Category : Technology/thousandApps.txt
It's really quick, how time flies. Especially when you're doing something engrossing. I've finished the Objective-C version of Postfix Enabler and it works exactly the same way as the current AppleScript Studio version, which shouldn't be surprising because they're both calling the same Cocoa framework underneath. But what was surprising to me was that it didn't take that much more code to do it - almost the same number of lines of code in Objective-C as compared to the AppleScript code, or maybe just a bit more. And I've reached this conclusion - if you're building applications in Real Basic or 4th Dimension, you really ought to take a look at building them directly in Cocoa using Objective-C. You'll be surprised at how much faster and more productive you can be. You'll be coding closer to the metal, so to speak, and so your applications will run faster. But it's not necessarily harder - in fact, the opposite may be true. I can't praise the Cocoa framework enough - or rather, the thought that went into its design. So many things would have made their way in there simply because a programmer would have needed it - to work faster. And I believe now that there's a way to get going on Cocoa quickly - where you can do a lot of productive things right from the start, and where you won't be daunted by how thick the Cocoa API reference guides are. In fact, if you find a way to understand the key concepts and learn how to look for what you want, you'll start to feel reassured whenever you go through a long list of API's - because that will mean that you're that much more likely to find just the right piece of code to help you do what you want to do. And that has been my experience so far. I've been able to find almost all the things I need - or at least enough to think that I'd be able build quite a wide range of stuff with it. Computers become useful because of the applications that run on them. I go the retail stores that sell Macs here and they don't give enough reasons for anyone to buy a Mac - they're always opening and closing windows, showing the genie effect, and showing iTunes, iMovies, and all that old stuff. They're preaching to the converted (or to the ignorant). But we should use the Mac simply because there are so many productive things we can do with it - things limited only by our imagination. So, may a thousand Mac applications bloom, with Objective-C and Cocoa.
Posted at 11:07AM UTC | permalink
Sat 20 Nov 2004
Postfix Enabler in Objective-C
Category : Technology/PFEinObjC.txt
I've been building a version of Postfix Enabler on Objective-C. What started out as a peek into Tiger to see how quickly I can get Postfix Enabler to run on it got diverted into a challenge - to see how quickly I can take the Postfix Enabler nib (Interface Builder) file and wrap Objective-C code around it, rather than the AppleScript I was using. How did I get to Objective-C? Must be the effect of all those WWDC DVD's I sometimes run in the background while working, especially those about Core Data. If it works the way it's supposed to, and Apple continues to build on it, it's going to be something we cannot afford to ignore. It'll make the Mac an even better platform to build business applications on. And, if it doesn't? Well, we still have Java. I've developed an AppleScript Studio course around Postfix Enabler because, if you take a look at it again, you'll find it covers most of the interface elements you're likely to want on a Mac-based application. There are drawers, sheets, pop-up menus, check boxes, radio buttons, alerts, tables, data sources, progress indicators, password fields, interfacing with Unix, an ability to launch web pages, and checking if you're an admin user. Once you know these, you can build any application. (OK, maybe not any - I don't do graphics or music or 3-D). So, by the end of this exercise, I will have an Objective-C application that covers most of the same interfaces, and more (e.g., I've always wanted to be able to read the output of the Unix job asynchronusly - so that I can show the user what's going on, as it happens, and not only at the end of the job, as in the current AppleScript version of Postfix Enabler. With NSTask and NSPipe, I've finally been able to achieve that). This will be just right to be used as the basis of a "Cocoa Using Objective-C" course. Objective-C is really so fun.
Posted at 5:34AM UTC | permalink
The Bull and The Vegetarian
Category : Commentary/BullAndTheVegetarian.txt
"Expecting the world to treat you fairly because you are a good person is like expecting the bull not to charge you because you are a vegetarian." ... Rabbi Harold Kushner
Posted at 3:34AM UTC | permalink
Wed 10 Nov 2004
The Job of Art is to Chase Ugliness Away
Category : Commentary/JobOfArt.txt
"The job of art is to chase ugliness away", I thought I heard Bono say in the U2 iPod special event. I had to rewind to be sure. Yes, it's there and I think it's a wonderful statement. I was watching the event on QuickTime, while I was coming to the end of the book I'm reading by Jeremy Rifkin, "The Age of Access", and I think it's one of those days when everything resonates. I was writing the other day about the idea of key concepts - about how it's important to learn how to learn quickly from scraps of knowledge. But when you've built lots of these key concepts, you need an overarching framework to tie everything together, so you get a holistic feel for how everything is going, and thereby make your own sense of what's happening to our world today. Jeremy Rifkin's "Age of Access" is one of those rare books that come along that does a credible job of tying lots of diverse impressions into a central theme, where you're able to see the patterns and interconnections. We're moving into a time where we value the ability to access an experience more than the possessing of physical goods. For example, when I hear Bob Dylan's "You're a big girl now", lots of memories come flooding back and that's feeling I live for, no matter if I hear it off a radio or an iPod. What's important is to have the rights to turn it on when I want to - I don't need or care to own the CD. Another example - I like the ability to whisk my family off to a few places quickly over the weekend - but I hate the chore of owning and maintaining a car. I'd rather lease one and I can see a day coming when somebody will use the web to coordinate the logistics to make the system work better than it currently does. And I've stopped buying books - I bought enough to fill two life-times and they are just so much baggage when we shift house or office. I never finished Rifkin's last book "The End of Work" and it's now just collecting dust. But I found "The Age of Access" in the library, and I thought the worse that can happen is that it'll just go back into the hole if it's no good. So, I'm glad I read it. But I'm not going to attempt a synthesis; just wanted to make the recommendation. This, and other books like Leonard Shlain's "The Alphabet versus the Goddess", have shaped my thinking about why Apple, alone among the technology companies, have grasped the true signficance of what's changing in our world today, and it's the company that is doing the most interesting and relevant things against this backdrop. In what is coined The Experience Economy, art, aesthetics and alignment with spiritual goals take center-stage. The job of art is to chase ugliness away. And we're willing to pay for it when it does.
Posted at 9:12AM UTC | permalink
Tue 02 Nov 2004
UW/IMAP - Postfix Enabler 1.0.10 Released
Category : Technology/UWIMAP2004Released.txt
I decided to release the latest UW/IMAP POP3 and IMAP binaries that I had built inside Postfix Enabler 1.0.10. Nothing's changed inside 1.0.10 except for the new POP and IMAP binaries. I had earlier wanted to collect a few new features to put together to make a new Postfix Enabler release but I realised I'll never find the time to do that over the next four weeks. The new IMAP binary includes the oft-requested change made to where it stores its mail boxes (so that it doesn't clash with Mail.app). It works so well with Mail.app now. It's fair to say that this is the way it should have worked, from the start. 
I'm sorry I took so long to fix it. That's why I decided to release it immediately. This makes working with IMAP a much better and smoother experience and I can now understand why people would keep coming back to bug me for it. I hope the users are going to be delighted.
Posted at 7:56AM UTC | permalink
DNS Enabler 1.0
Category : Technology/DNSEnabler1dot0Desc.txt
I've got a more "useful" version of DNS Enabler done. It's meant to be used by people who don't know and don't care about things like CNAMES, MX records, PTRs,and A-RECORDS. But they know enough about the domain name system to want to be able to reference machines by human-understandable names. The people who're downloading DNS Enabler now want to be able to do things like this, for a private 10.0.1 network : 
This is because, for one reason or another, they may not be able to hit their server using a domain name, from a machine on their internal network, even though people outside, on the public network, can see the server just fine. For example, you may be acquainted with this problem if you're using the earlier batch of Airport Base Stations. Running a DNS service on their server for the benefit of the machines on the private network will help these internal machines to "see" the server. But you might want to set up a domain name service for a private network for a whole host of other reasons. For example, for doing demos or for testing, where you have no connection to the Internet, but want to simulate your own private Internet. Now, the new version of the Airport Admin Utility allows you to create a private network on any of the three known ones (10.0.1.x or 192.168.1.x or 172.16.1.x). So, I've also allowed the user to set things up on DNS Enabler according. DNS Enabler 1.0 allows a user to set up more than one server. And they can be on any other address beside 201 (which I had hard-coded in the "old" DNS Enabler). And, it allows you to set up more than one domain name pointing to the same machine so you can set up and do virtual hosting in the web and mail servers. I find the ability to change, temporarily, which machines the domain names cutedgesystems.com and roadstead.com are pointing to very useful when I'm doing testing on my iBook. E.g., now that I'm doing a series of tests on the latest UW/IMAP binaries that I have built, using my iBook as both server and client. I find it very useful to be able to tell Mail.app on my iBook that cutedgesystems.com is now also on my iBook because I can re-use the mail accounts that I've already set up on Mail.app. DNS Enabler will create the correct DNS entries and files - as far as I can tell (though I'm still learning and may yet get things wrong). So, after building it, I realised that it can also be used to set up a fully-functional DNS server for the public network, including handling the setting up of the Classless Inter-Domain Routing file (how's that for a mouthful), like the setup shown below: 
And, finally, I'm finding that it works great as a teaching tool. The interface will allow me to explain to someone how the domain name system works and why it was meant to work that way. Then I can go into the system files that DNS Enabler generates automatically and show how all these settings get translated into the proper A-RECORDS and CNAME records, or whatever, that the Domain Name system requires. I've yet to write the documentation. But if anyone wants to try it out before I've got a proper download page set up, you can write to me.
Posted at 7:29AM UTC | permalink
Mon 01 Nov 2004
A UW/IMAP Update
Category : Technology/IMAP2004Update.txt
I've built a new 2004 version of the UW/IMAP (POP3 and IMAP) binaries. And I took the opportunity to correct a mistake I made with the mail sub-directory path that led to problems like these (as excerpted from this page on the Squirrel Mail Wiki) : With this new version, these problems should go away. I should plan on releasing a new version of Postfix Enabler (1.1.10) soon (?) but I've got a series of courses that we're set on doing in a couple of weeks, so there's going to be a lot of things to do.
Posted at 4:48PM UTC | permalink
Address Book Plug In Update
Category : Technology/addressBookPlugInUpdate.txt
I've updated my Singapore Map Plug-In for Address Book so that it will try searching by Postal Code first. If it can't find a Postal Code, then it will try Street Name and Number. You can download it from here. I realised later, from monitoring the referrers on my webserver log, that Takashi Yoshida had already built something like this, so I am probably reinventing the wheel (except maybe for the one-click installer that I'm fond of building). But I had fun doing it. And I did learn something more about scripting the Address Book that, I am sure, will come in handy in a future project.
Posted at 12:13PM UTC | permalink
Fri 29 Oct 2004
The Developer's Mac
Category : Technology/devTalk.txt
"Time is a jet plane, it moves too fast". So sang Bob Dylan on Blood On The Tracks. And I've got blood splattered all over my brain reading Mark Bowden's un-put-downable "Black Hawk Down", which I've reluctantly set aside just to get some work done. Last week, at this time, I was wrapping up my stuff after doing the presentation at Apple WWDR (Asia)'s Mac OS X Development Seminar. Leon Chen's put the photos from the seminar up on his .Mac page. It was pretty warm where I was standing and I think I looked a wreck. But I enjoyed it all the same. To think that I was once so shy, I'd die every time I had to get up and say something in class. But I was forced to overcome it when I was made an instructor while in the Army, and that was the best thing I ever got out of doing National Service. Just one thing I forgot to mention during the talk, and I'd like to address it here. I was showing a series of demos based on the hostel system that we did, below, and I covered the variety of technologies that we exploited: 
And the thing that may have crossed a person's mind, who's currently doing the same on the PC, is "So what?". And I wished I had stopped a while to address that. I think the point I'd like to make is that we're really in the business of helping people understand information. That was the point of the demo - that we could tell a story from the point of view of a person booking a hostel bed, and of the person whose job is to operate the hostel, and of the owner of the hostel. The system proceeds to provide information from all three angles, so that the work could be coordinated. And that's why we have a system - to help people work better. Now, it's very difficult to go a person, whose head is stuck in DLL hell, and ask, "Say, do you know what business we're in? Like, you know, the way Revlon knows that it's not simply in the business of making cosmetics" What business are we really in? It's like having someone coming to you and ask, "Do you know the true meaning of Christmas?" You'll say, "Go away, I've got to get this machine fixed and get back to doing some coding". Now, if you could provide your programmers with tools that will just snap on and work, like the Mac, then you could go, "Now, do I have your attention? What else do you really need to do? So can I ask now, what's really going on here? What story are you telling your users? Can they understand it? And why does it matter?" The tools that we use do shape what we are, what our priorities are, and what we care for. If we want to work like a craftsman, where we're told people enjoy using our products, then we've got to choose our tools carefully, and make sure we understand what we're really doing. And why we're doing it. We're really in the business of helping people understand information better, through cutting away at complexity, and making the difficult things understandable. But we can't do that if we're always quarelling with our tools, or spending most of our time feeding it, or worse, intentionally complexifying things in the hope that that will protect our "marketability". In our age of the Internet, the truth will come out sooner rather than later.
Posted at 11:11AM UTC | permalink
Tue 19 Oct 2004
A Little Learning
Category : Technology/aLittleLearning.txt
They say that a little learning is a dangerous thing. But there's so much information out on the Internet, and so many things to understand, that you've got to figure out how to learn quickly from scraps of knowledge. Take DNS, for instance. I've just finished a version of DNS Enabler that I can use for the upcoming developers' seminar. It's "better" than the one I had left around for download (in the article "OS X, Broadband, and the Airport Base Station"), in the sense that you can set the location of the server (it was always set at 10.0.1.201 in the "old" DNS Enabler). And you can set the IP address range (it used to be only for 10.0.1 networks). And you can set up more than one machine on that network to be addressable by domain names. (In the seminar, I'm using this so that I can let the audience access both a PC and a Mac by domain names, if they want to see how well the same pieces of code run across the two platforms.) So, at the moment, I have a DNS Server that is safe to use in a private network. But by building this, I now know what I don't yet know, and where to look, if I want to go one step further and make it a fully functioning DNS server that can be exposed to the Internet. I remember the first time I attempted to set up a Domain Name Service, using MacDNS, back in the days of OS 9. I repeatedly brought down the Internet connection of our customer, out where we were camped then. I only made progress when I bought QuickDNS Pro from Men and Mice (but they're not looking much like a Mac-type company anymore). They had a nice little DNS Expert application, which can be used to troubleshoot DNS set-ups, and that helped me built knowledge about all these arcane stuff bit by bit - including something called "classless reverse domains". I remember the technician from our ISP throwing out these superior terms, when I had to tell him I was using a Mac, and I was expected to bow down and grovel because the Mac wasn't expected to have "it". I later learnt (rather painfully because this was before the days of the fire hose we now know as Google) that he was only speaking Unix-geek and that there was an equivalent way of setting this up using the more Mac-like QuickDNS Pro. Once I did that, plus a few other new things I learnt to check, the router stopped crashing on me. When OS X came out, QuickDNS Pro didn't work on it. But I had OS X Server, and I could click the DNS-related buttons in Server Admin and go to the command line to see what changed underneath. That was my first taste of BIND. When I realised that even a stock OS X client had a working BIND built-in, I switched and ditched Server. Hurray, but I'm no DNS guru (yet!), and probably never will. But the thing is to be able to do productive things with each little piece of knowledge, because there is way too much data out there. We've got to learn how to learn from the scraps that we get. I have people writing in wanting step-by-step instructions to do this or that. Well, I have the DNS and BIND book next to me and it's 600 pages long. I've got no choice, I can't read more than 10 pages at a time. The more important thing to do, always, is to create a skeleton framework of key concepts - something that will make sense to yourself and, more importantly, that you can use to try to explain to another person. Once you've caught the key concepts (and one should train oneself to do this very quickly), you can use that framework to hang the little pieces of information that will come your way, just-in-time, so that you can get things done when you need them. Don't bother to memorise things. It's not an effective way of learning. Take the trouble to understand concepts. The problem I had with the ISP's technician was that he learnt things by rote. If he had understood things in terms of concepts, he would be able to describe the real issue, and then it would have only taken me a bit more time to say, hey, I have an equivalent way of doing that on my Mac, and thus solve the problem sooner. I know I've got to get down from my soapbox but this is one way I've found that is effective for living in a world of information overload. Understand, don't memorise - that is what we should teach our kids.
Posted at 1:10PM UTC | permalink
Sat 16 Oct 2004
A New DNS Enabler
Category : Technology/NewDNSEnabler.txt
I'm working on an "enhanced" version of DNS Enabler. I haven't worked on this for ages. But, for the upcoming OS X Developers' Seminar (for which, Leon Chen says, almost 50 people registered within the first hour), I'd like to create a local network using my Airport Express Base Station, and then allow people to interact with our demo using domain names rather than IP addresses. (... for people who've brought along their iBooks or PowerBooks or PC laptops, that is). 
I've finished the interface (more or less) and was going to wire it up with the Unix shell scripts when I realised I've forgotten to bring home the picture I drew of which files go where in /var/named and how they should be configured. Now, I drew that on a piece of paper but my first thought was to wish I could somehow just ssh (remote log-in) back to the office and pull that piece of paper back through the Internet and plonk it on my desk in front of me. The fact that I could get so frustrated is a sign of how much my mind had wired itself to the idiom of the Internet. I've spent a lot of time drawing up the connections for just so I could move faster when I got to the Unix scripts. But I'll just have to work from memory. This part of a lazy Saturday afternoon, with my kid having a nap and the birds singing along outside, it's a great time to do some programming.
Posted at 9:05AM UTC | permalink
Thu 14 Oct 2004
The Mac OS X Developer Seminar @ The Temasek Life Sciences Laboratory
Category : Technology/DevSeminar.txt
There's a Mac OS X Developer Seminar next Friday at the Temasek Life Sciences Laboratory at 1.00 pm (to 5.00 pm). It's free. Just register. Leon Chen from Apple will be covering Mac OS X 10.4, the Tiger release, and some of its cool features. I'm also going to be presenting but I'm staying on Panther (10.3.x) and showing how we can go under the hood (of the OS X Aqua interface) and turn on all those delightful stuff in the Unix layer. 
I'm calling my talk, "The Developer's Mac - Productivity, Power and Portability". I'm showing how productive we can be when we have all these tools on tap, ready to use. And we use tools that cut across the arts and sciences, moving effortlessly from one mode of thinking to the other. So, I'll show a complete application built using tools like Photoshop, GoLive, iPhoto, Apache, PHP, Java, WebDav, MySQL, Postfix, etc, all the while sustained by the great music coming out of iTunes (no, I won't show the iTunes part). The power comes from simplicity, from being able to find just the right tool to solve any problem, and being able to express any solution, on a single computing platform. And you do get computational power - you can do a lot on an iBook, let alone an Xserve. Finally, the portability comes from being able to move the work around, both in the sense of being mobile and being platform-agnostic. We can move our finished product to just about any hardware platform on earth. It'll be great if I can show the complete demo on my iBook and then show everything running the same on our PC laptop - with no change of code. We're working on it.
Posted at 11:21AM UTC | permalink Read more ...
|