The Old Blog Archive, 2005-2009

Archive for the 'tekhnologia' Category

WWDC ’07, Day 1

I haven’t got time to check out what other blogs are saying about this year’s WWDC, but many complained that the keynote speech was a bit dull and flat, not too much excitement.

The afternoon sessions were much better from my perspective, but they are much more in-depth and more technical than last year’s state of the unions. I’m glad that Apple is addressing the trend of applications moving to the web. But whether the iPhone factor would actually become a Cocoa killer. That is, now that iPhone only has JavaScript/HTML/CSS, and people are moving to the web anyway, why should we bother with Cocoa?

WWDC ’07 Day 0 (or -1 ?)

My kudos to the organizers of sf/Mac indie soirĂ©e. That was really the meet-up that I was looking for at last year’s WWDC!

In San Francisco

I’ll be attending WWDC 2007 from 6/11 to 6/15. Things to watch closely: CoreText, CoreAnimation, PDFKit, WebKit-Cocoa integration (and all those RIA–Rich Internet Application–talk), and Ruby-Cocoa bridge, and how to put everything above together to cook an evil app. Some possibilities for iPhone dev are also very welcome.

Overall, as this is a good year for Apple, hype and optimism should abound. The delayed shipment of Leopard is but a factor to be considered. Because none of the “cool and edgy” application tech will exist on Tiger (CoreText, CoreAnimation, Objective-C 2.0). Apple may also need to answer the challenge from Adobe (Apollo) and Microsoft (SilverLight) in an age where platform is at the same time irrelevant (the only platform that matters is the web browser) and still makes differences (in terms of productivity, availability of tools, etc.).

This WWDC will be important to me as I’ll decide my own “tech roadmap” from what I’ve learned and heard there. One crucial piece among them will be how Apple respond the RIA challenge. I’m also eager to learn how indie software developers response to the web app challenge and the trend to open source. Let the show begin.

launchd ain’t like no daemons

It turns out that launchd, Apple’s take of rc.d and all those init stuff, doesn’t like daemons. For the traditional services to be launched by launchd as a daemon, you have to first turn off the “daemonize” option, and let launchd takes care of it for you.

So as things migrate from StartupItems to LaunchDaemons, many packages of MacPorts (formerly known as DarwinPorts) have followed suite. The problem is some services only come with daemon mode. So MacPorts comes up with a helper utility called daemondo, which launches the daemon in another process and monitors its starting up, so as to pamper launchd.

mongrel_cluster_ctl, in this case, requires daemondo (mongrel_rails comes with no-daemon mode though), because it spawns a number of mongrel processes in a daemon-like way, which launchd doesn’t like. Copy any script that involves daemondo, and turns every debug message on. Tracing launchd can be a tricky thing, you’ll need every verbosity at hand. And just skip any script that does not mention the keyword daemondo–they are guaranteed not to work.

sqlite3 bombed in Rails 1.2.2

Lately I have found the an app under Rails 1.2.2 bombed every now and then, and I thought the culprit was Mongrel.

Turned out that the error was “too many open files” and the culprit was the sqlite3 connector. This ticket explains the reason, but this patch didn’t seem to go into the 1.2.2 (even though it’s fixed before the 1.2.2 release date). The resolution is either switching to Edge just for that (and starting living on the edge…) or patching it on your own. Just follow the ticket’s diff and everything’s back to normal.

I wouldn’t have been able to found that without using the UNIX tool lsof. Apparently some knowledge on the UNIX utils can definitely save your day when in need.

ObjectiveFlickr 0.9.5 (Objective-C and Ruby) Released

ObjectiveFlickr is a Flickr API library available in two versions, one for Objective-C (hence its name) and one for Ruby.

This is a major update, and finally the Objective-C version catches up with its Ruby counterpart (in terms of version number at least).

The most important change of this version is that it now works with Flickr’s new original photo URL scheme. Original photos on Flickr will have different “secrets”, and API consumers need to give an extra parameter (original_format) when they call methods like flickr.photo.search in order to get that piece of information.

Photo URL helpers in ObjectiveFlickr (both ObjC and Ruby) have been updated to reflect that change.

Other changes in the Objective-C version include bug fixes, some deprecations, and updates in the demo code. Whereas for the Ruby version we now have HTTP POST support.

The Objective-C version is available at its Google Code hosting site.

Whereas the Ruby version is available at RubyForge and can be installed by simply using “gem install objectiveflickr”.

And of course, its own blog.

One interesting note for those who try to run the unit tests of the Ruby version: one of the tests actually brakes when trying to ask flickr.test.echo to echo back a string that contains angle brackets (< and >). It turns out that Flickr actually returns sqaure brackets back in this case, and this has only been happening since mid-January. Other than this quirk, everything should work just fine as in all previous versions.

A Belated Announcement in English: Yullio Layout Generator

(Announcement in Chinese here.)

hlb and I have created a Rails generator that churns out good-looking layouts (it’s Mollio :) ) for your controllers. Yullio Layout Generator (gem: layout_yullio_generator) is a layout generator that combines the flexibility of YUI Grids with Mollio CSS/HTML templates. Simply generate the layout with:

script/generate layout_yullio  [optional partial name]

And it places a copy of YUI Grids and Mollio CSS files in your public/ directory, instantly giving your views a great look.

This generator is a continuation of Mollio Layout Generator (gem: layout_mollio_generator). Here we combine Mollio’s good theme design with YUI Grids’ flexibility. It’s very easy to change the layout of your views. Just add the following lines in your controller:

  class MyController < ApplicationController
    yullio_page_width :doc2
    yullio_column_template :yui_t2

Here yullio_page_width is followed by YUI Grids page width styles, currently :doc, :doc2 and :doc3 are supported. Column templates follow the same naming rules. YUI calls them yui-t1 to -t7, here we replace the dash with the underline for obvious reasons. The two methods are implemented as a plug-in, which is of course copied for you by the generator. :)

Simply type “script/generator layout_yullio” for usage and description. We hope this generator will help you save time in creating layouts, further speeding up the prototyping stage of Rails app development.

Opacity Quirkiness on Mac Browsers

Dave Shea has discussed the opacity bugs found in both FireFox and Safari. This has been plaguing FireFox 2.0 on Mac for a while: whenever there is an element with a < 1.0 opacity, the page’s font rendering becomes very thin, sometimes causing hard to read pages. Currently there doesn’t seem to be any solution to it, other than not using opacity at all.

Lately I have found that opacity can affect Safari’s performance, too. If your pages contains element overlays that have opacity settings, when there are a few of them (say around 10), Safari becomes extremely slow in loading and rendering the page. If you open the page as a tab, switching to the tab will be very slow too. This badly affects the performance of JavaScript in the page, notably the Scriptaculous sortables. It has misled me to think that Scriptaculous was the culprit. After I removed the opacity settings, the sortables are as smooth as it should be. And no, running Safari on a MacBook Pro doesn’t help.

For testing, please open up both this slow version and fast version. The only difference is that the overlays in the slow version have opacity set.

WebKit and FireFox don’t have such problem.

It’s There! Rails 1.2 Released

Apparently people on the mailing list are watching closely: http://dev.rubyonrails.org/changeset/5982. RubyForge has already got 1.2.1 now. May have wait until it’s clear why 1.2.1 is released just 14 hours after 1.2 came out. There seems to be some last-minute fix to a serious database adaptor defect.

But all in all, this must be the Rails version hitherto mostly waited and expected. Along with the newly published 2nd ed of AWDwR, it seems people will be able to live off the edge for quite a while. :)

Kudos to the Rails people!

Annual Report of the OpenVanilla Fund-Raising Campaign

The annual report of the OpenVanilla Fund-Raising Campaign in 2006 has already been compiled, available in Chinese at http://donate.openvanilla.org/reports/OV-Donation-AnnualReport-2006.txt (gpg signed document, UTF-8 encoding).

« Prev - Next »