Monday, September 29, 2008

CoreData and RAD tools under OS X

I've never been a RAD tool enthusiast. However, I recognize they have their utility. Especially when the "rapid" part comes from a well done library and not from drag and drop mumbo jumbo. Besides, I'm a big fan of drag and drop: I just don't think software should be built with drag and drop. About the "rapid" as in library part, I love Django. I was quite fond of Rails as well, but since Django reached the metaphorical age of consent I just dropped the whole Ruby thing.

Back to Cocoa... I'm mostly an OS X user and I'm quite into OS X development as well. Not that I often write desktop software, but when I do, it's often Cocoa stuff (possibly with Python bindings). And when I received Hillegass book (Cocoa(R) Programming for Mac(R) OS X (3rd Edition) ) I knew it was time to tackle Core Data.

Core Data is a nice technology. There is plenty of examples when you create not-completely-trivial applications only with drag and drop. Which looks good (though I never understood what kind of programming language/framework benchmark is writing a hello world program as most software is not constituted of hello world applications -- and you don't get paid to write hello worlds). Well... the drag and drop thing works as expected: even if you don't know about programming more than what I know about Votic literature, you may surprise your suspenders wearing hacker friends (at least until they ask you how the damn thing works).

Unfortunately enough, everything that is not that trivial (which accounts for most software projects, indeed) needs a bit more attention. The first thing you learn is that you must know the underlying technologies. This seems reasonable enough (after all if you want to work in the IT world you must learn a lot of things -- votic excluded). And when we talk about "learning", we are talking about long term investments. You learn Core Data, KV-coding and Cocoa Bindings and you use them for good. Or at least until Apple screws the whole thing up.

Even though when things become complicated you need to write real code, there is a lot of drag and drop/checkbox checking development done in Interface Builder. Of course you could write that code programmatically, but then you don't qualify for the RAD buzzword thing. The point is that bugs in code are usually signaled with tests, code lints or lawyer dispatches about that blown up nuclear plant you wrote the software for. If you don't write a function, the compiler or the interpreter will complain. If you forget to write part of a function, the software will crash (or the tests will fail, if you are a savvy programmer).

Unfortunately, it is dramatically easy to forget to check checkbox (how many checkboxes would a woodchuck check?) or to fill some textbox in Interface Builder, especially if you have a rather complicated UI with lots of elements (and this accounts for most software you want to sell). Error messages are as cryptic as the Delphi oracle (with no known reference to a nice RAD tool and to the most popular commercial DBMS in the world). Cryptic means that most of the time you have no way to understand which UI element wasn't properly connected and generated the error message, you have to browse the bindings of all the widgets. You probably have to set some debugging option (if so I missed the paragraph where this was explained).

Key Value Validation transcends my understanding. As far as I can see it's dramatically easy to do things wrong and put the system in an inconsistent state. Probably I just did not get the rationale behind it. But... Django seems far easier. Sigh.

Monday, September 1, 2008

I'm Back (Back in Black)

I'm kind afraid the few who read this blog kind of regularly (for pretty wide values of regularly) stopped this despicable practice in the last year, as apparently I stopped writing as well.

This is indeed the bare naked truth. In september I graduated and in the last period I was astonishingly busy (and worried for the results). The results were excellent, but my schedule perseverated in being crowded. I also was thrown out from Google indexing since some nice guy proved that no PHP website can be left unattended for months (and did so filling my articles with invisible links to the worse sites of the web -- or the best ones, depending on your point of view --).

Out of the blue, I decided I could start writing again. And I decided to try the nice MacJournal application whose license I got among the ones in the last MacUpdate Bundle.

The bundle itself was quite unsatisfactory. I don't use most of the applications. I don't like Mellel (and in fact I'm a quite satisfied Nisus Pro user) and I find DEVONagent wonderful and mysterious as well (that implies that I was unsuccessful in making something of it). Some of the other applications are great, though I don't really need them.

For example I'm using 1% of Contactizer Pro capabilities and I think I scribbled somewhere I was to learn to use the program, since it seems extremely useful. I'm also very satisfied by LightZone, since I recently bought a nice reflex and plan to use it a lot. Unfortunately enough, I don't seem to have time to spend sightseeing (and consequently taking pictures) and this is how the story ends. Moreover, I really need two things in an image editing program: something to straighten the horizon and Photoshop ‘patch' tool. Appearently even Gimp has it, but not Pixelmator (nor LightZone, but this is because LZ is a totally different kind of program).

DSC_0351-2008-09-1-05-24.JPG

Moreover, I've got no time to learn LightZone and I'm afraid I'll stick with iPhoto even though it can only save edited images as JPEGs. Which kind of sucks, but it's my fault: I paid for more professional and I don't want to learn how to use them. Besides, the meaning of "more professional software" is still under theological scrutiny.

As a pleasant side effect of the MacUpdate Bundle, I got an enormous discount on software from Koingo Software. This particular discount gives me access to all the applications they created or will create and their updates as well. Librarian Pro is among them.

I love Librarian Pro. I love books and LP seems a great way to keep a catalog. And one day or another, I will put it online. But this is another story.

Going back to MacJournal, it seems an extremely good application. Maybe I will write this blog regularly, after all.

What else? We did Pycon Italy 2008, which was great. And since the blog was not actively maintained, I did not write about it then.

And for those of you curious about my yellow dog... it seems a Leopard ate it. Poor dog! :P