Showing posts with label Tech Stuff. Show all posts
Showing posts with label Tech Stuff. Show all posts

Friday, October 07, 2011

Steve Jobs is dead. Long live Steve Jobs.

He was a polarizing figure; a lot of people loved him like a seer, a lot loathed his ability to make others love him like a seer. Most admired him from a safe distance.

Apparently, he was a mercurial, highly unsentimental man. One of his first acts as CEO was to empty out displays of old products on company premises. He never believed in looking back, he considered it baggage, an anathema to be shunned. He went to great lengths to say the great products of Apple were not made by him alone, but by an army of talented people, doing difficult work.

Despite the 300 or so patents to his name, anybody that has been involved in the making of anything non-trivial knows the many pairs of hands and eyes something has to go through, to make something great. The fact that none of his patents are solely under his own name, bears witness to this fact.

What will really live on is the story of his life. He was born a child out of wedlock, given up for adoption after his birth to relatively poor parents, who could not even finance his education. When success came, he was kicked out of his own company, betrayed. And the final setback that ultimately took his life, contracting a rare form of pancreatic cancer.

Despite all this, he oversaw some of the greatest successes of our time. We love turnaround stories, and Steve Jobs, and by extension, the company he founded, is one of the greatest turnaround stories of our time.

He achieved it not through luck, but through sheer determination of will, faith in himself, and the vision to realize that the times, they are-a changin'.

That will be his legacy. And it won't be just his legacy, but of many unassuming men and women before him, who overcame similar odds to achieve similarly lofty goals.

Mr. Jobs will live longer than most of his mourners. Some of them will rise to the occasion, and live the lessons he espoused. Most will fail, some will succeed. But all of them will be happier for it. And we will all be better off for it.

May he journey well, to whatever lies beyond.

Sunday, July 17, 2011

Awesome Tool to Justify Text: Par

I recently came across a problem: I wanted to format text in my favorite text editor (vim) in a very specific format. Lines should have a maximum of n number of characters on them, and it should justify properly, nice and pretty, and I shouldn't have to think about it. It should be automagic.

I came across a utility called par. It's a very powerful utility that can process a block of text into an organized format, and I think not enough is being said about it!

http://jmcpherson.org/par.html

It's an open-source project, and it adopts one of the core tenets of the Unix philosophy: do one thing, and do it well.

All I can say is when I use it, it does all the magic I need it to do, and in a sense, the technology 'disappears.' It's a funny thing to say that since it is a tool designed by a technical person, for technical people (very few non-techies use vim). But it's true, even at this relatively deep level of technology, the really good tools... simply disappear.

It's coming across gems like these that make me wonder why we put up day in and day out with all the poorly written, poorly designed software out there. From the cruft of Microsoft Word, to the sluggishness of Firefox, we have to put up with these things regularly.

A lot of it has to do with the fact that writing good software is actually quite hard. But most of it is really to do with our intransigence. We get used to a toolchain and refuse to be flexible and move around.

I think a bit more toolchain promiscuity would make us all a little happier.

Wednesday, June 15, 2011

Bash Color Prompt Problems With Reverse-I-Search in Terminal.app

I recently colorized my bash prompt. It's a nice touch, and with a bit of taste, it's good design. Makes visual parsing very quick.

Gone are the days of souped up command-line prompts that look like they're about to lift off into orbit. For a trip down memory lane, check this out. I stumbled across it while Google'ing this problem. Good fun. :-)

No, my prompt is very Spartan:



shaque@marius is user@host (so you know what computer you're on), ~/git_tree/users is the present working directory, and ihaque/vim-tweaks is my git branch.

All of this is awesome. The colors are awesome too (Solarized), they're specially picked colors for a low contrast delta between the foreground and the background, while maintaining excellent readability over prolonged periods. Prevents tired eyes. Go to Ethan Schoonover's website I've linked to, and integrate it into your environment. Srsly.

The problem: once you have colors, and if you use bash's builtin reverse-i-search for previously typed commands, things get fudged. Terminal.app doesn't write the characters properly on-screen so if you reverse-i-search for a previous command, then scroll backward or forward to edit it, it doesn't display correctly.

I spent a lot of hours tinkering with my bash prompt to make this work. It was awful, because bash syntax is very un-pretty. Look at the code for my prompt:

export PS1="\[\e[0;36m\]\u@\h\[\e[m\] \[\e[0;34m\]\w\[\e[m\] \[\e[0;33m\]\$(parse_git_branch)\[\e[m\]\$ "

Uffffff.

The fix: use iTerm.app. Terminal.app doesn't render color properly, apparently. I don't have an explanation for this yet, but iTerm.app will gladly handle your colorized prompt and finicky interactive shell features with barely a sweat.

It's also an actively maintained open source project with a shorter release cycle (read: one that is not pinned to that of OS X's).

Bless the folks at Apple, I think they did a pretty good job with Terminal.app. It's miles and miles better than any stock CLI shell Microsoft ever shipped with their operating systems, and the anti-aliasing and opacity control is better than anything I've seen on Linux (though Terminal.app is not nearly as feature rich, or as responsive as anything on Linux).

Credit goes to Terminal.app, I stuck with it for a long time, but I'm switching to iTerm.app now. It's just better.

Monday, June 06, 2011

Installing ack with Macports

Macports is awesome. Also, ack is awesome. ack is made to replace 99% of the use-cases of grep, and it's customizable with an runtime configuration too (~/.ackrc). To install one awesome thing with another awesome thing:

user@host $ sudo port install p5-app-ack

Not a very intuitive name for ack, but this is the naming convention for CPAN modules on Macports.

I was having a spot of trouble finding the package name for ack (port search ack returns way too many results to be meaningful, thank goodness for Google), and came across this blog post that complains about Macports deciding as soon as you want to install ack that the stock perl in OS X isn't good enough, and summarily takes over your computer by downloading and installing a more recent perl on your box.

This made me think. That's not nice.

But then I thought some more, and I decided, no, that is nice. In fact, it's awesome.

OS X ships once every couple of years (which is considered a pretty sprightly clip in the world of operating systems) and stock installations of OS X ship with obsolete versions of perl for the majority of the product's life-cycle.

I'm glad Macports takes over and updates my perl for me. It saves me the trouble of doing it, and worrying about dependencies. I don't want to worry about dependencies. That's why I installed Macports. If I wanted to "roll my own," I'd download tarballs and roll up my sleeves (right after I cut myself with shards of glass).

The first thing I'm going to do when I get a new Mac is install Macports. It's really so convenient.

I like to think of these package management systems as open-source App Stores, which they basically are, except you never have to pay. And to consider open source developers had mature implementations of these so many years before App Stores ever entered the mainstream.

Whatever those guys are doin', they're doin' it right.

Basic Usage of launchctl (with MySQL)

Macports is awesome. I've installed Vim 7.3, Emacs 23.3, mutt, and mysql5-server, and it has been as smooth as apt on Debian (a very high compliment!). Dependencies, download sources, building, linking, it's all taken care of.

You need to have developments tools installed on OS X, though, because it uses gcc, and from what I can tell, it compiles everything.

Macports Just Works.™ I recommend. I am a fan.

I needed to install MySQL on my local machine, but I didn't want mysql5 running all the time; I want to start it up whenever I need it, and shut it down when I'm done. When Macports finished the install, it told me to run a command to make it run on start-up, which I ran.

I wanted to undo it, because I wanted to know how to.

launchctl (short for "launch control"), controls what launches on startup on OS X. Very basic usage is:

user@host $ launchctl load -w com.your.daemon.plist

To make sure it starts up on login. Or:

user@host $ launchctl unload -w com.your.daemon.plist

To make it not start up on login.

It does magicks in the background you don't need (immediately) to know about. Just use it to control what goes on startup and what doesn't.

If you're worried things are starting up that you don't know about, go to /Library/LaunchDaemons/, and do an ls -l (-l is important, because they're all symlinks).

It's basically a directory of symlinks to plist files that are read to get details on daemons to start up for you. If you don't like something (I noticed some Microsoft registration thingy there), just launchctl unload it.

Saturday, August 29, 2009

Snow Leopard and the Beginning of an Era

Mac OS X 10.6 Snow Leopard is out!

I don't remember the last time I was so excited about an operating system release. From my pre-Apple years, it would have to be Windows 98. Indeed, that was the last non-Mac operating system that I was last genuinely excited about getting to use.

Right-click menus would slide now, and there was this weird thing called "Screen Font Smoothing" (from Plus! 98) which made me just want to fire up MS Word and type things into it for no reason.

It was everything I knew and loved before, but that little bit cooler. Old things felt new. That is such a cool feeling. Incremental updates.

Car-makers work by incremental improvements. Facebook works that way. GMail works that way. It makes sense: stand on your previous achievements.

Even fast-food outlets work that way! You like the McDonalds' Filet-O-Fish? Well, here's the Double Filet-O-Fish! They have those in Singapore now; I haven't tried them. But "[they're] lovin' it!"

My core point: revolutions should only be made when they're absolutely necessary. Revolutions for the sake of it is, frankly, too much democracy.

It's like that cardinal rule of movie remakes: never remake a good movie, no matter how old it is. Nobody is ever going to remake of Lawrence of Arabia, or Terminator 2.

Snow Leopard is an incremental update. A lot of PC users wonder why the Mac community gets so excited about "service packs." Well, a service pack isn't some fundamental law of the universe, friends, it's just a phrase coined by Microsoft which arbitrarily means possibly a speed-bump, better security, bugfixes, and minor feature updates.

Well, OS X updates are arguably not service packs for a few reasons. It is true, OS X updates represent very few significant user-land updates. Off the top of my head, the only headline grabbers were Expose (introduced in OS X 10.3 Panther), Dashboard (introduced in OS X 10.4 Tiger), and Time Machine and Spaces (introduced in OS X 10.5 Leopard). Apart from that, the biennial "300+" features is mostly marketing fluff.

But despite relatively few user-land updates OS X changes extensively under-the-hood between releases. New APIs and frameworks, much of which had been very fluid up until OS X 10.4 Tiger, have been the real changes in OS X updates. An operating system is only as good as the software that is developed for it, so Apple has been targeting the developer market very aggressively since OS X debuted, and you can plot the quality of third-party software for OS X with each subsequent release.

OS X, at 10 years old, is still a fairly young operating system and only really matured at the user and developer level OS X 10.4 Tiger. Not unlike how KDE 4.0, 4.1, and 4.2 are memories I'm trying to block, and how Microsoft is trying to forget Vista ever happened, the transition to the point of Snow Leopard's maturity has been a long one.

Snow Leopard marks the beginning of an era, even though it is, from the user perspective, a service pack. And Mac-lovers will gladly pay, while PC people think its mass-hysteria. But it's not, really. It's not.

You know there's something wrong with your theory when it implies multitudes of people are crazy. Between you being right about everyone being mad and you being wrong because you missed something, statistically, chances are you've missed something.

The explanation is simple: Apple maintains a momentum in its release cycle, and doesn't charge an arm and a leg for it, which is why people gladly pay them for these kinds of upgrades.

At USD 499 (Vista Ultimate's original price), you darn right better not be paying for service packs. Apple charges less per release (steady at USD 129, Snow Leopard has been their first release to break that pattern at USD 29), and releases it more frequently.

It's the community, stupid!

It's a once-in-two-years event now, the operating system release. It's something users have now come to expect. It is a steady, incremental, predictable release cycle, which doesn't reinvent the wheel, or throw users off-balance every time. Once every two years, the Mac community wakes up from its torpor and everyone is abuzz about their "paid service pack."

Microsoft, however, is anything but steady. I don't say this with contempt, but with sadness: I wish they didn't drop the ball so badly. I waited till the cows came home for Longhorn after the disappointment that was Windows XP.

For all the love Windows XP gets now, let's not forget that Windows XP was a disappointment until SP2. The only thing it was, was stable, and that's only relative to their previous releases which is setting the bar quite low (and arguably what they did to make everyone fawn over Windows 7, including myself).

XP was insecure and slow, and came with those awful message pop-ups that made life very difficult for an everyday user out of the box. After using commodity hardware to "locally assemble" my own machines to consistently horrible results, they started losing my mindshare by that point.

By the time SP2 came out and things started settling down to some semblance of sanity, I had moved into the loving arms of OS X 10.2 Jaguar. An operating system which also happened to be border-line unusable, but in my books was a step-up from Windows XP pre-service packs. Not because it was stable, because Windows XP was actually quite stable, despite being slow as molasses. No, not because it was fast, because it wasn't all that much faster than XP.

OS X 10.2 Jaguar had one killer feature: it wasn't Windows.

I hated the PC world so much at that point, I'd have settled with an abacus.

I had lost all faith in computers by that point. I think to this day, I never quite figured out how to install a modem driver in Windows 9x properly. Yes, I might be an idiot, but I’m an otherwise functioning adult who could install other drivers, so why not this one?! I had to take my PC to the workshop for them to take a look at my himem.sys to make my Transport Tycoon work. Randomly failing commodity parts was the bane of my existence, and was touted as the most compelling feature of the PC “ecosystem.”

You can keep your ecosystem.

When I came to the National University of Singapore in June of 2003, and I went to the laptop fair, I made a beeline to the Apple store, and didn't look any other way. I bought a 13.1" iBook G3 at 900 MHz: an underpowered, over-priced machine that only ideologues and die-hard fans would buy, but a machine I loved to bits and used for a good 4 and a half years.

I was just glad to be rid of that damned "Personal Computer."

It was only with the introduction to Linux in 2004, and a steady observation of its internals that I slowly started regaining some faith in the world of computing. I think it was only until very recently that I've started thinking (once again) hey! Computers are kinda cool!

Everything was so neat and clean in the Linux world, it really made an impression on me. Directories for configuration files, clean scripts with consistent interfaces to start and stop services, different ways of interacting with the computer (the CLI or the GUI), solutions to operating system problems which aren't "do a reinstall." What a breath of fresh air! This stuff actually works.

And Linux didn't (and doesn't, to this day) do everything. But whatever it claimed it did, it did well. The rules were simple and elegant, and the philosophy facilitated the process, it didn't get in the way.

So, no thanks to Microsoft for that.

But that's okay. Let by-gones be by-gones. I switched loyalties, Longhorn became Vista, which crashed and burned spectacularly, Apple has been massively successful since, Firefox nudged IE out of cryonic hibernation, and Google has woken Microsoft up from its dominance-induced coma, and Windows 7 is coming about, and it's something even I'm a bit excited about.

And yes, Windows 7 is Vista SP2 and with ripped off ideas from the Mac OS X. And that’s perfectly fine.

I don't mind that OS X steals from Windows or that Window steals from OS X. That's what this is all about, it's a discourse, it’s competition, it’s an arms race. Going “me too!” is not only perfectly fine, but encouraged. Microsoft in the 2000s was so technically inept that Apple had the chance to implement a feature they announced as MBA-driven marketing hype before Microsoft themselves could do it (fast desktop search, now called Spotlight, released first in OS X 10.4 Tiger, well ahead of Vista's release).

I'd probably buy Windows 7 it if it was priced a bit cheaper. It's still too expensive after what they charged customers for Vista. Hopefully they'll slash prices, but I'm glad Microsoft is about to come back in the game again. Nothing is set in stone yet, we have to wait till the fat lady sings on this one, and its classic Microsoft to set the bar so low that even a whiff of “not-a-massive-failure” gets people excited, but the outlook is favourable.

The late 90s and most of the 2000s has been a period of stagnation in the computer world with Microsoft's unchallenged domination, which its competitors are to blame as much as Microsoft's predatory market practices.

Now, with competition returning in the browser world with the Phoenix-like comeback of Firefox from the ashes of Netscape, the second-coming of Apple thanks entirely to Steve Jobs, Google's steadily increasing boldness and earthy common sense, and Microsoft's (still-hyped and as of yet unsubstantiated) comeback with (the incremental update that is) Windows 7, we, the customer, have everything to gain. Competition is returning, and users clinging on to 9-year-old operating systems will hopefully be a thing of the past.

Interesting times are ahead.

Thursday, August 06, 2009

Perl as Glue, and the Ebbing of Mindshare

People have lovely things to say about Perl, and one of the first things you'll hear is that it's great glue. It's good for stringing things together, and making them work.

The problem with glue is that it doesn't constitute a "good solution" in the mind. We know of glue as something we apply on our shoe when it comes apart, just as a stop gap until we can finally get a new one. The Tata Nano is held together with glue to cut costs. Make no mistake, this is a technical achievement and an innovation, but we all know what people would rather have used: steel rivets, like what they use on the space shuttle.

Well, that's what the rich people get. Poor people get glue.

This is, of course, technically inaccurate: industrial strength glue holds everything from our iPods to our vehicles together. But the crisis has always been one of perception, not of reality.

Perl is a lot more than "handyman glue". It's like saying steel is good for nails and that's all it's good for. No, you can make ships out of steel as well.

This perception of Perl as that special, weird-looking wrench which fits into corners other wrenches can't fit into is what's holding it back as a serious language. People will only use it when their "normal" tools don't work, so they don't appreciate it's greater applicability.

But it's a difficult problem to solve. Because Perl is great glue. It's Soviet-gymnast-like flexibility is what makes it so powerful, as nails that holds your chair together, and as the stuff that makes up the hull of the USS Enterprise.

Perl has a long, varied, and continuing history in web applications, so it's really quite sad to see it having lost so much of its mindshare after having come so far. It's "sad" for me, because I'm only now at the cusp of my career as a web application developer; I wasn't around for the first 2 acts. So I have very little idea of what "mistakes" Perl must have committed in the past to now be relegated to the rusty toolbox of the IT world, but I'm sure there must have been some.

The company I work at is now seriously reconsidering continuing with Perl. We want to move to Java, and partly, even I'm convinced that a solution in Java is a more sustainable one. In fact, my only argument for sticking with Perl is a not exactly a shining vindication of Perl (although it is ultimately correct): we have too much momentum and expertise in Perl to drop it like a bad habit just yet. If we're going to do it, we have to plot a methodical and gradual migration away from it.

But in this current round of technical naval-gazing within my organization, even if I get everything I ask for, the next few years will see the end of Perl in yet another enterprise environment as we slowly transition to the suited and booted Java Enterprise Edition.

Recursive Dependency on CPAN

Trouble's a-brewin':
Recursive dependency detected:
Bundle::CPAN
=> Test::Harness
=> A/AN/ANDYA/Test-Harness-3.17.tar.gz
=> File::Spec
=> S/SM/SMUELLER/PathTools-3.30.tar.gz
=> Scalar::Util
=> G/GB/GBARR/Scalar-List-Utils-1.21.tar.gz
=> Test::More
=> M/MS/MSCHWERN/Test-Simple-0.88.tar.gz
=> Test::Harness.

Cannot continue.
This is the output from a CPAN shell. This is a fresh install of perl on Ubuntu Hardy Heron (LTS). The CPAN that comes built-in is obsolete, and an install Bundle::CPAN is in order at the CPAN shell after you've initialized it at the first run.

This problem can be fixed by manually installed the "offending" module, which in this case is Test::Harness. It needs to be installed but needs itself to install itself, which makes no sense (even for perl).

Exit CPAN, and go into your cpan directory:
cd ~/.cpan/Build/
cd Test-Harness[tab]*
perl Makefile.PL
make test
make install
Manually installing the module will break the recursive dependency. So fire up CPAN and breathe normally.

Hopefully this will come in handy to someone.

* CPAN distributes modules with the version number appended after the module name. So the build directory for Test::Harness v3.17 is called Test-Harness-3.17/. Sometimes it appends random strings at the end, so that a more recent download of the same Test::Harness v3.17 doesn't overwrite the old download. So press tab to let your shell take care of the details. Tab completion is your friend.

Saturday, July 11, 2009

Perl Is Coming Back

You read it here first.

Okay, if you did read it here first, you need to read this as well (it's a bit lengthy). No rush, when you get a moment.

Perl?!

Yes, Perl!

Perl is the oldest of the web scripting languages. Perl 1.0 was released in 1987, which makes Perl 22 years old today, with 4 major releases since then. Perl 5, the latest version, is a good 15 years old now with 10 major releases of its own. It is older than PHP (1995), Visual Basic (1991), Python (1991), or Ruby (1995) all of which were heavily influenced by Perl.

Google uses it. FedEx uses it. The BBC uses it, and they're by and large one of the largest, most pervasive web presences on the internet today (thanks to Firefox and excellent content). Amazon uses it, and by extension, IMDb uses it.

The company I work for uses a custom Perl framework written in the early 2000s, from the dot-com era (and I blame my receding hairline on it; we're moving away from it now).

Everyone uses Perl, just nobody talks about it.

It's mature, it's pervasive, it's user-friendly (how many programming languages can you use that word on?) and it can be a pleasure to write.

It can be hell to read, but flexibility is a double-edged sword. If you're out to cut things, two edges is better than one, so long as you know how to use it.

A few sites that are doing some really good work with regards to Perl as of this writing:

Modern Perl Books

This is a blog by a gentleman aliased "chromatic." This guy sounds like he's been around for ever and he speaks a lot of sense. I'm officially a fan, and this is my Friday afternoon leisure reading.

It's fun to read even if you don't have a clue as to what he's saying. Some of the things he says are just general wisdoms. Plenty of insight available here.

Catalyst Framework

Catalyst is a Perl framework for rapid web application development. It's modeled against Ruby-on-Rails, while maintaining a sense of aplomb about it all, giving the user a tremendous amount of flexibility to leverage the tremendous power (and potential quality) of the CPAN to your advantage.

Non-Perl people will have no idea what I just said. But if you're a non-Perl person, you probably haven't read this far either.

So in case you do know what I'm talking about: wicked, isn't it? And if you don't know what I'm talking about, just know this: Catalyst is cool.

Perl Is Alive!

I was once on irc.freenode.net/#perl and I asked if Perl was dead. Someone directed me to isperldead.com, jokingly.

Well, looks like someone caught on and made a little website called perlisalive.org.

This site is a lot about "raising awareness." A certain Matt Trout, author and maintainer of the very excellent DBIC tools in Perl insists we needn't bandy words, it's "marketing."

Yes, it is about marketing (some of it not very good), so I find it largely a boring and insubstantial resource, but it has an excellent interview with Tom Doran on Catalyst 5.8.

It's like when you see a really great song by an artiste, and you really love it, you buy an album of his (or hers) and then find out that was the only good song in it? That's kind of how I feel about perlisalive.org so far.

But the Tom Doran interview was fascinating enough that I still check back here.

Perl Monks

Perl Monks is one ugly website. Mmm-mmm, my breakfast quickly reconsiders coming out for some air when I fire up this site. It looks like it was designed in the 90s and never got updated, and I'm pretty sure that's exactly what happened.

And yet, it is quite an excellent resource. These guys do some very good work, and their bad-marketing-but-depth-of-substance is somewhat emblematic of the humble competency that is endemic within the silent majority of users of Perl.

Moose

"Moose" is the new object system in Perl.

The current object system in Perl is hacky and bolted on, but Moose makes it all pretty and neat.

What exactly is so cool about it? I really don't have a clue, I haven't seriously started using it yet. But "chromatic" (mentioned above) talks about it to no end. He calls it the "state of the art" in object orientation. Now I haven't heard that phrase used in a long time, and it's certainly a toy I want to get my hands on soon.

Catalyst (also mentioned above) uses Moose extensively now.

So Watch Out...

From the depths of irrelevance and quick-hack sysadmin scripts, Perl is undergoing a renaissance.

Microsoft's "embrace, extend, exterminate" attitude toward standards is slowly petering out. The IT market today is getting more and more heterogenous, and that is good. It makes infrastructure more resilient, and encourages standards-compliance.

Combined with Perl's internal renaissance, Perl has everything to gain from this trend.

We're on our way back.

Sunday, January 25, 2009

Give KDE4 a Chance

KDE4 has received a lot of flak from the OSS community because they took the policy of "release early, release often" really to heart. They released it extremely early: KDE 4.0 was barely an alpha in January 2008, when it was released. Old features didn't work properly or were simply gone, things looked marginally prettier without adding any functionality at all, and it was extremely unstable.

KDE 4.0 is unanimously a train-wreck as a product. If you needed a solid desktop environment, you ought to have stayed away from it. But the developers never pretended otherwise. They said from the get-go that anyone looking for a stable desktop environment were better off with their current ones, and that KDE 4.0 was still very much in active development. Releasing it out in the wild gave it exposure it wasn't having while the developers were working on it in on their own. The influx of bug reports, and the flurry of discussion have only strengthened KDE's featureset and codebase.

The KDE developers committed to a bugfix-release once every month, and a major point release once every 6 months. This is development at a fairly fast and steady clip, and with KDE 4.2 at the cusp of release in January 27th, I'm sure further refinements are on their way.

From my experience with KDE4, it is extremely pretty as desktop environments go, but not nearly as functional as either KDE 3.5.x or Gnome. Basic tasks like unzipping and zipping is not possible from contextual menus on the desktop, and the "K Menu" (analogous to the Windows Start Menu) was horrendously unusable (in fact, the new Windows Start Menu in Vista is quite excellent).

These are pretty fundamental problems with KDE4, but the groundwork is being laid for the future. KDE 4 will, some day, become a good product.

KDE4 is based on the Qt4 GUI framework from Trolltech. Developing on Qt4 basically means a single application can be ported for Windows and OS X with much ease. With the mobile version of Qt4 coming out, and Nokia adopting it for future smartphones (Nokia purchased Trolltech), it will also be portable to handheld devices.

This means it is on the verge of mass-market exposure (mass-market acceptance is another matter entirely). This is the first time that open-source software being developed for the Linux operating system will be usable by people in other operating systems at such a scale.

This would be comparable to Apple's "trojan horse" technique with the iPod + iTunes tie-in. People bought the iPod because it was a good product, and had to use iTunes to run it, and got an idea of how Apple's native OS X software operates. This drew attention to them, increased brand awareness, and created future clientele, as is evident from Apple's almost recession-proof sales data.

Some of the tools available from the K-world would be really handy in the Windows and OS X world. I would love to have the Konsole (KDE's command-line shell), for example, in OS X. Terminal.app in OS X 10.4 Tiger doesn't allow tabbing of console windows, which Konsole does. And the Windows (XP or Vista) cmd.exe is barely useable; I honestly dread to use it.

Konqueror is a very decent, light-weight web browser, and it handles the SFTP and SMB protocols very handily. Very useful for OS X users who don't want to use Terminal.app and look up the man page for "scp" ("secure copy", the command-line tool used for SFTP), or use the horrendous Finder.app to navigate a directory, or for Windows users looking for a decent, no-frills, browser-like SFTP client (Firefox doesn't talk SFTP).

KDE has a lot to contribute to the software ecosystem. Profits-driven, proprietary solution-providers (like Microsoft and Apple) do not have it all covered, and this is where open source software's vital function comes in. Filling niche requirements in older systems where it doesn't make sense to pay for an upgrade, for what may not have been fundamental features at the time of release (like SFTP clients or tabbed console windows), but have become since. What's life without tabs?

In the meantime, Gnome or KDE 3.5.x are perfectly usable, mature, stable products for those of us who need a working desktop environment. From a consumer standpoint, it's always about using the best tool for the job. Until KDE 4 matures, it makes sense to just wait it out with whatever we're currently using (in my case, KDE 3.5).

KDE 3.5, by the way, is still being actively maintained. Bugs are being found and squashed, and it is a tremendously mature and stable desktop environment.

The story of KDE4 is like that of OS X. OS X 10.0 was unanimously a bad operating system. Slow, buggy, and unstable, most of the Mac community initially spurned it. Apple offered OS X 10.1 as a free upgrade to customers, but they didn't abandon it. They continued to refine it and upgrade it.

OS X 10.2 Jaguar was the first version of OS X that Apple charged for, and in my opinion was still terrible. The first version of OS X that worth its salt was OS X 10.3 Panther, after Exposé was introduced.

Since then, the price of OS X has remained the same, with three subsequent updates over the years. Each update delivered additional features, and under-the-hood enhancements, setting the groundwork for future enhancements.

Arguably, Microsoft is undergoing something similar with Windows Vista.

A transition from one system to another is a long and painful task. But it is most certainly worth it when it has become obvious the old system is merely creaking along.

One hopes the outcry from the open source community does not deter others from taking similarly bold courses of action.

Monday, December 22, 2008

World of Goo

I'm not a gamer, and I don't do game reviews. So this is more evangelism than anything else.

World of Goo was developed by independent game writers 2D Boy ("I love you 2D Boy!"), using lots of open source components brought together to make a delightful little game.



Gameplay

The story is really a backdrop to the gameplay, which consists of taking little goo balls and assembling goo-ey structures like towers and bridges that oscillate and undulate under the cumulative weight of the goo balls you attach onto them. Attach too many, and it will buckle. Attach too few, and you won't be able to make it to your target.

Every level has a start and an end point, and you're given a certain number of goo balls to assemble a structure to get there. You're supposed to have a few goo balls as surplus at the end of it, and the challenge is to have enough goo balls free, i.e. not used as part of the structure, to win the level. They get sucked up into a big vacuum machine and put away.

The story has something to do with the "Goo Corporation" and some corporate conspiracy. The goo balls are self-aware and extremely adorable, but not aware that they were designed by the Goo Corporation, are used in "industry", and that they are incredibly tasty.

The Technology

The core of this game is its physics engine, which was used from an open source software library. The goo-ey structures oscillate and undulate under the weight of the additional goo balls you attach onto them, and obey the laws of physics much how you would expect them to, (with sufficient suspension of disbelief). The engine seems to have integrated variables of mass, center of mass, moment of inertia, friction, and joint strength (something I never studied in high school enough to name), where structures that are too heavy buckle under the weight and become mere attachments instead of rigid support.

A host of other open technologies were used to assemble the game, and the core development team was extremely small. But they have done a superb job of integrating these technologies into a cohesive, wholesome product that is fun to use, play, and share.

Re-playability and Value

The game is tremendously replayable. Once you've finished all the levels you can go back and play them and see how you could solve the levels differently, assembling the goo balls in weird ways to achieve your goal.

Also you can play the game under "OCD" rules. Obsessive-Compulsive Disorder sets a higher standard for you to finish the levels, with almost double the number of surplus goo balls you need at the end of the final structure to qualify as having finished it under "OCD" rules. You have to really maximize every goo ball you use, pushing the structure to its very limits and depending on environmental factors to maximize your use of goo balls. Some real "out-of-the-box" thinking goes into this!

You can also upload your scores and structures to the web, and share with others. And all the surplus goo balls you collect at the end of every level is accumulated in a very large, open level where you can build pretty much anything you like. A "carte blanche" for your goo-building needs. The highest point of your structure is represented by a small whiff of cloud with your name and country on it. It bobs up and down, and rises and falls as your structure goes higher and higher, and you can compare with others.

The only very minor downside I found to this game was the menu system, before the actual game starts. It seems a bit neglected and rushed, with the bulk of developer attention going into the gameplay mechanics, no doubt. This product was delayed by almost 6 months (their interview with X-Play had them naming a release date at around Jun. 2008, and it was only released in Dec. 2008). I'm not complaining, though, because the game works where it counts: in the game. This is just a nitpick.

I'd give this game 5 stars out of 5, if I had stars to give. It costs only 20 USD, making it very cheap for the hours of fun you'll have with it.

My Ideological Pitch

I encourage people to support independent game developers, people writing great code in their backyards, people with common sense and will power to use computers to make good, wholesome magic. In a world of re-hashed first-person shooters with gratuitous guts, gore and ample bosom for pimple-faced teenage males, this is a very welcome change. We should support a good product by buying it, especially if it's made by "the little guy." I voted with my dollar on this one, and you should too!

Saturday, October 20, 2007

Why I Think Opera is the Best Browser Available

To me, Opera is the OS X of the browser world. Compared to its competitors, it is polished, fast, quick-loading, powerful, feature-rich, well-thought-out and manages to do all that without getting in your face.

Well-thought-out. That's the key.

I'm not going to go into detail. This isn't a technical or academic opinion. It's a very pedestrian opinion. Why do I like Opera? It comes down to a few features that I just fell in love with when I saw them.

Username and password completion



Opera frames username/password forms that it knows the information to in an unobtrusive brown-yellow colour. If you want to put in information that you know, go ahead and do it, it's not in your way. However, if you want Opera to fill it in for you, just press CTRL+ENTER, and Opera fills it in for you, and submits the form.

It's unobtrusive, it gives you the information you need to know via easy-to-understand visual cues that are not distracting, and it's much better than any other implementation I've seen in Safari when it comes to multiple known usernames and passwords.

In Safari, it auto-completes it for you while you type, akin to someone finishing your sentences for you. It's sweet, but not always fun.

Speed Dial



All that empty space when you press CTRL+T for a new tab. The first implementation of tabs, inherited from Firefox and now implemented in all browsers, focuses your text cursor on the URL bar, so you type in things from there. Shortcuts even, can be put in through there through Firefox and Safari add-ons. Well, the guys at Opera are way above their game by putting in this feature called Speed Dial.

It uses the empty space of a new tab to show you 9 boxes with window previews that you can click on to navigate to. Each box will contain a cached thumbnail of a version of the website you visited. If you want to see what's the latest on them, just click refresh, at this window, and Opera will give you the latest thumbnails by reloading the page.

9 large buttons (taking up a lot of screen real-estate that was formerly unused), so your mouse movement need not be very fine (as opposed to navigating to the correct button on your bookmarks bar). You can use your mouse and keyboard in excellent synchronization. Left hand for CTRL+T, with the right hand still on the mouse, move quickly to a button, click, you're there.

These 2 features alone make me like Opera. The fact that it loads webpages fast, has fun visual indicators while loading pages, launches fast, and has, in my opinion, the best user-interface of any application I've used in Ubuntu Linux (running KDE) so far are still secondary concerns.

I'm sure there's more, but nothing worth me writing about. The guys at Opera have their heads in the right place from my analysis of the application so far.

Personal Note



I use Opera at work, where I work on Ubuntu Feisty Fawn. At home I still use Safari, because Safari is still more widely supported than Opera, and Opera's user-interface still isn't up to Mac standards.

I generally stay away from Firefox. A lumbering beast of an application, it takes for ever to launch, it's memory footprint is huge and it's really become persona non grata in my browsing experience.

Sunday, July 31, 2005

Time Leaps and Us

The path on which we are on, this absolute dependence on science and technology to cure all our ills, divorces us from nature, and enslaves us to the technology that was conceived to liberate us.

Why the US wants to end link between time and sun

Wednesday, May 04, 2005

The Apple of My Eye

I use an Apple Macintosh computer for my personal uses. When the choice came to me at the laptop fair as a dazed freshman in late July 2003, that one issue for me had no contention. I didn't go to the HP stall, the IBM stall or considered for even the briefest moment, any Windows-based notebook. I made a beeline for the Apple stall.

Five minutes of conversation with a very good salesman, and he finally figured out I had been reading the Apple website for the past year and knew more Apple propaganda than even he did. "You know your stuff, man," he said and handed me the form.

Two years later, I am a proud owner of my laptop, a series infamous for logic board errors, but which has served me reasonably well, Masha Allah.

However, the Cult of the Mac is no myth. Mac loyalists clump together like bacteria in a bad broth culture, Steve Jobs their Luke Skywalker, and Bill Gates their Darth Vader. Communalism rears its ugly head in a new form of tribalism. Groping and grasping in the dark, in a globalized world bereft of identity, these people worship their new heroes with unstinted loyalty.

But when it comes down to it all, I have discovered that Apple computer, though technically superior, is headed by a man I just don't like. Steve Jobs's ego is probably one of the largest objects known to man, second to perhaps Tom Cruise's. This article excerpts a little bit of an interview with him on the release of his new operating system, OS X 10.4 Tiger.

Apple co-founder and Chief Executive Steve Jobs has long said that Windows, which runs on nine out of 10 PCs worldwide, has copied Apple.

"They're shamelessly trying to follow us," Jobs said at Apple's annual stockholder meeting two weeks ago, noting that Longhorn has yet to appear. "They can't even copy fast."


Very brave for a man whose company recovered from virtual bankruptcy in 1997. Of course, Apple's recovery from its crisis in 1997 (helped to great effect by Microsoft who owns half the company, ironically) has been consistently called the biggest industry turnaround of a tech-company in history, something that might have something to do with Jobs's attitude.

Bill Gates, software architect, richest man in the world, gracious benefactor and general nice guy, had this to say about Apple's release:

On positive coverage of rival Apple's new Mac OS X Tiger operating system, which has features Microsoft won't have until 2006 in the next Windows: "Because they're the super-small-market share guy, they get all these statements about them. But I actually thought that was great -- there it was, the general press writing about operating systems."


This article is another example of the bully being bullied. The biggest guy is always a target, and Bill Gates takes a lot of flack for it. Oft-times, rightfully so.

But in the end, Bill Gates is a nicer guy than Steve Jobs. But I need a product that works, not a nice guy. And so, I'm typing this blog entry with the Apple of my eye.

Sunday, February 27, 2005

"No!" to the Mechanization of Education

My nostalgia for my old school years runs very deep, reflected very poignantly by a weblog dedicated to that very topic: My Years In Choueifat. Very obvious from the contents of the weblog, my experiences there were rather traumatic. Despite this, our famous regional director, Mr. Germanos (who I renamed in that blog as Mr. Hollandos) insisted that once we went to university, we would be grateful for everything the school did for us.

I've had more than one friend who has done exactly that: they told me that everything the school did for us helped us a lot. Yes, it is true, actually, that I can recall the equation for power as a function of electric current and resistance at will, although I cannot recall to any considerable extent the fundamental concepts of the Michaelis-Menton equation from first-year Biochemistry. However, I still insist, I don't think I have the school to thank for that. No, I wouldn't thank the school at all.

There's something intrinsically learnable, if there is such a word, about a setting where a class of maximum 30 people who all know each other, sit together and put on freeze all social relations and for almost an hour, without talking to each other, sit and listen to someone draw on a blackboard and construct from scratch seminal theories of mathematics, science or whatever topic. Literally, from a blank green board, everything from Einstein's Special Theory of Relativity to allegorical analyses of Shakespeare's Macbeth comes to life.

The traditional blackboard method introduces information from a logical progression. It starts from a clean slate, and progresses as quickly as is needed to teach fundamental topics and advanced constructs in a very effective way. As such, after 2 years of university education, I am sick to death of endless powerpoint slides, ridiculously distracting speaker systems and class sizes of upwards of 350 people.

I say no to powerpoint slides, to microphones and lecture theatres with capacities of anything above 40. This impersonal and dessecated version of teaching and acquiring knowledge and information is destroying what passion there is to be had in such a pursuit. It is to downgrade ourselves from milk and meat, to the mundanity of bread and butter.

I am now moving well into the end of my second year at university, and not only do I not know any of my teachers, I know but a handful of my classmates, and I can barely remember anything I learnt in first year.

The mass-production of university graduates in my field (Life Sciences) at our university (National University of Singapore) is an unfortunate black hole into which I am now irreversibly committed. Increasingly, as time goes by, I find myself growing fonder and fonder of the thought of being under the nose of a cantankerous Chemistry teacher, ready to pounce on my illiterate self like a lioness upon her prey.

In conclusion, this reflects greatly the confusion between means and ends. These technologies are but means to serve the end of education, and there are but many means. To consign oneself without thought or hindsight to any mean is to make it an end. My school was such a one, forcing us to learn kinematics via webcast, from a teacher who was in Dubai, over the internet. I never liked it, and struggled through it, and here I find myself back in the same pit. All over again.

Labels

About Me

My photo
Singapore
I write essays in my spare time on things that are important to me. The ones that I feel are any good, or make any sense, I put them up here. :)