Archive for April, 2008

Ubuntu 8.04 is Out

Friday, April 25th, 2008

It was Clean Thursday yesterday and hopefully you were cleaning your hard drive for a great new Ubuntu 8.04. It made it to the download sites in the evening and since then they creak under a heaviest load.

Have you ever wondered why they version their releases in that strange way — …, 7.04, 7.10, 8.04? I never mulled over that, but yesterday I was enlightened. Look at the numbers closely: 2007.04, 2007.10, 2008.04. Alright, now it does make perfect sense, doesn’t it?

While we are at it, let me explain briefly how I partition my hard drive to aid quick and painless system upgrades. Keeping in mind that Canonical releases a new version precisely once a half year, it is judicious to keep OS on a separate partition so that it can be easily replaced, while your home directories stay intact. This is how I do it:

  • / (root) partition — 5 Gb
  • /home partition — 5 Gb
  • swap partition — 2 Gb

Every time a new version of Ubuntu comes out, I simply format the root partition and install the release there from a Live CD. Certainly I need to restore all apps later, but it’s not a big deal actually as I maintain a nice list for this matter.

I know Ubuntu has a mechanism to upgrade itself to a newer version through the Updates manager, but, in practice, being upgraded in this fashion, OS doesn’t unveil its full potential, and more like “mimics” the previous version. I compared the two in the past and am inexpressibly happy about the discovery.

Hopefully this information will be valuable in the light of upcoming wave of upgrades.

Ableton 7 Suite Box Received

Wednesday, April 23rd, 2008

Finally, it’s here in my hands. I’m very excited about it as it took 2 days to come to Kiev from Germany and long 2 weeks to travel a fraction of that distance to my city. The negative side is that customs took another $360 (given that the box cost $999) to give it to me, and UPS got $10 to perform a radiology test that never happened (just a rubber stamp on a paper). That’s the sad part about this country I’m going to leave with a special pleasure very soon. Everyone is robbing everyone else on the legal terms here and it’s fine. No one cares. Even those being robbed.

Anyway, it’s here and it’s what matters after all. Thank you Ableton for a great product!

Here’s a little nice video from their office in Germany:

Further thoughts on Git and Rails

Friday, April 18th, 2008

The idea of replacing (or augmenting) Subversion with Git in the development practice is quite fascinating. It’s a part of an agile development methodology to respond to client feedback and changes of mind quickly. Sometimes they ask for a small change that has to go before that monstrous feature you are already working for quite a while, and it hammers on the head. What on Earth do I need to do now? Roll everything back, apply a change, deploy and then paste my changes back and move on? That’s fine once, twice, but hey when it’s a habit… It’s a reality and this is how it is most of the time in development, in real life, everywhere.

Because of its ridiculously expensive and slow nature in a centralized version control environments, branching was always considered as a no-no for such “stupid” applications. You use branches for a Real Job only and, yes, never check in until it’s fully tested!

With the distributed version control things change dramatically. I still have very little experience with Git, but several resources I discovered today gave a lot of food for thought.

  • It’s no longer a taboo to fork a branch for an experimental feature, a quick test, a bug fix to be tested independently and merged later, for literally anything you may need to do with sources
  • It’s cheap to create, cheap to maintain and easy as it never was before to merge back
  • You check in, check in and check in like crazy to your private branch and no one cares until you push (or they pull) your changes to the trunk (master)
  • You can use both Subversion for the centralized code versioning and Git for your local development until the global migration of the project to Git is finally discussed and performed (it’s inevitable, calm down)
  • Finally, Capistrano works with Git as well as it does with Subversion / CVS and your Rails development is still in good hands

Here’s a couple of resources for your reading and watching pleasure. I found both intriguing and invaluable at the same time.

The last one could be two times shorter, but still is well-put and leaves a pleasant aftertaste.

Enjoy your weekend!

Rails, TinyMCE and JavaScript in IFrame

Thursday, April 17th, 2008

Browsers developed some really bizarre means of user data protection over the year of evolution. One of many is the JavaScript cross-domain protection. If you load a web-page into an IFRAME and access its DOM model or the model of the parent document from the loaded page, you get what you deserve — a permissions violation error that looks like “Permissions Exception” (in IE) and “uncaught exception: Permission denied to get property …” or similar in (FireFox). All is simple and clear once you know what to expect. It’s all logical. Today however I faced something different, really different and odd.

In the application I work on we need to upload images from the post editing page (right, much like a regular blog). As all sane people, we have an editor (Tiny MCE), an IFRAME to post files being uploaded through and some code to glue it all together. Previously we were using a different WYSIWYG editor, but recently replaced that with Tiny MCE for its Safari 3 support.

When the first “permissions” error showed up upon receiving the on-upload-completed GUI update code, the immediate reaction was “hey, there must be a port number somewhere, since I know we talk to the same domain, or otherwise it wouldn’t breathe at all”. A quick check showed that no, there was no explicit port number either in the main document URL or in the URL of the IFRAME part. Ouch.

Next few hours I spent reading the code of the editor, experimenting, scanning forums, playing with JS console in FireBug and no matter what I did the result remained the same. Finally, I decided to make a copy of the sources and remove HTML / JavaScript of the page piece by piece until a bare minimum of stuff stays, then analyze it under the looking glass. The bare minimum appeared to be two Rails javascript_include_tag lines (for Prototype and Tiny MCE) and one text field with the submit button. Not much, but fairly sufficient.

What I need to mention here is that we use an asset distribution plug-in for Rails (distributed_assets by Ezra Zygmuntovicz) to load static files from 4 different domains (which in fact are the same server with 4 different names). Every time you call image_tag, javascript_include_tag and any other helper returning the static asset tag code, the plug-in intercepts the call and uses the domain name of one of these servers to spread the load between them.

When there was nothing but few <script> tags and 2 lines of HTML, the answer became excitingly obvious. Here’s the short rule of thumb derived from this lesson:

When you use Tiny MCE and planning to access parent DOM from within an IFRAME somewhere on the same page, make sure that:

  • The code you load into IFRAME comes from the domain with the name that matches the domain name of the main document to the last letter
  • JavaScript of the Tiny MCE editor is loaded from exactly the same domain
  • Port numbers matter

The end of the story.

Thoughts on Git

Monday, April 14th, 2008

Many of you, my readers, do programming for a living. Those who started early used CVS before they switched to Subversion, and there are many who still use it thinking it’s the best this world can offer. We, as lazy beings, look for faster and easier ways to accomplish things. We use version control systems that fit our needs, and personally, I felt that I’m doing the right thing when migrated to Subversion several years ago. So far, working mostly solely on the code base of the projects, I find it sufficient and convincingly simple.

Lately the magical word “git” made its way into the vocabulary of the programmers community. It’s an SCM system that aids project development in a highly distributed environment and makes all branching and merging chores a breeze. It’s built by Linus Torvalds for the Kernel project and didn’t received any popularity before now for its geeky user interface. Now as the latest develops quickly, the project started to occupy more and more minds. I’m still on the fence, but here are some notes for your consideration.

What I liked to hear:

  • I have all repository locally at any given moment, which makes it easy to diff, commit continuously without waiting for the code to become stable (days and weeks on some complex tasks), work offline (e.g. in the forest or on the sea side — a dream, isn’t it?).
  • The first point also inspires having any number of branches (versions) of the code for testing new features, making refactoring etc
  • The same makes it easy to have any number of repositories for any number of environments separately (dev, stable, production) and to build a flexible workflow around the setup
  • The internal data structures are extremely optimized and take times less disk space than competitive systems
  • The emphasis of the system is on the content rather than on files. A good example is when you move two lines of code from one file to another, git can tell you the migration path of these two lines instead of the changes in two separate files. In other words, content matters more than individual local changes.

What I didn’t like:

  • IMO, multi-node distributed version control may not be worth for mid-sized teams. When there is a single author, it’s great to keep several branches / nodes to test things, work offline etc — it becomes a convenience and aids the development seriously. In large companies with multiple nodes it’s much easier to merge chunks of code and it along is a great plus since none of existing systems handle it easily. For the mid-sized teams, I can see the the maintenance costs defeat the benefits. I must be awfully ignorant, but it’s what my gut says.
  • Even though the content-over-files concept sounds great, I don’t feel really comfortable with it (yet). Probably I just need to go deeper into these waters to judge, but that’s how I feel right now.

Hopefully it gave you some food for thought. See if you find it useful and let’s discuss. Here’s a good place to start looking for more info — Git and Ruby: Git tutorials, articles and links for Rubyists.

New iPod Nano 8Gb

Monday, April 14th, 2008

Kate prepared a mind blending surprise for me today. When I got back from my streetball game a shiny new black iPod Nano 8Gb was sitting in its stylish leather jacket on my table. Ahhhhh. I love you my dear. She is full of surprises, isn’t she?

The screen of my first iPod Nano 1Gb was crashed half a year ago. I was walking out the house holding it in my jeans pocket and metal railings of the outside staircase served just right to make an iPod Shuffle out of my old nano friend. It played like that for a day or two, but then battery problems became obvious. Eventually it ended up on the book shelf. A sad story. Well, anyway…

The kind is dead. Long live the king!

Checking fav.or.it

Friday, April 11th, 2008

The invitation letter from fav.or.it almost made it to my spam folder today. The name looked suspicious and I had not a clue what on Earth do they need from me again. Now I recall asking to drop me a note when the beta-testing becomes available about half a year ago. Quite a wait if you ask me. At least, I got my chance to join in and give it a quick spin. Here are my notes:


Click on the image to get a bigger idea

The immediate impression was that the application is simply adorable. It’s very web 2.0-ish and AJAXy to its fingernails. GUI is thought out extremely well and works quickly with a pleasant after-taste of something solid. In the subscriptions management section I missed instructions or some other help information terribly (had to dig them up in a separate window) which made the whole experience a bit duller, but mainly the impression was positive and I even made notes of some interesting GUI decisions.

One unpleasant aspect though was that the actual reading space was greatly reduced by the header, borders, margins, meta-information rows and all imaginable bloated stuff (see it for yourself in the screen shot). I know, all that is very-very useful, but isn’t it the designer’s talent that makes an elephant fit on the tip of the needle?

Now to functionality. Whole focus is solely on the river-of-news concept where you choose a subject in one way or another and read, read, read. There are several ways of “choosing the subject”: tags, categories, search criteria. With tags, it’s like del.icio.us, where you say where to start, then it shows the next associated tags list, you choose something else and narrow it down (until you end up with the only link :) ).

They didn’t let me import a couple of my favorite Music-related feeds (simply was allowed to import zero feeds for some reason — even not a single, but zero; interesting), so I had to use something from their selection. One curious function that I noticed was following the conversations on the blogs. Even though I didn’t have a chance to test it, the idea looked much like that of coComment to me, but without any extra code on the blog-side to support. I suppose they know many blogging software types and scrape comments from the well-known places. In any case, looked fun to me.

This is all I got to share at the moment. See if you like what you saw and try it yourself. Maybe it’s the next blog reading platform, who knows.

(BTW, it’s powered by Sun Microsystems; at least the logo in the bottom-right corner says exactly that)

Purchased the One and Only

Wednesday, April 9th, 2008

Finally, the Ableton Live 7.0.3 is officially installed and running on my laptop. No, the package hasn’t come yet if you wonder, but they were generous enough to send the download link (for the app only of course) and a bunch of the serials along with the order confirmation to get me started immediately upon charging my credit card. So, I spent 10 minutes downloading all the latest while they packed the boxed version for me.

The Ukraine is famous for its unreliable postal services (well, as many other distant corners of the world), however, I believe UPS or FedEx (still not sure are we in the EU or outside it) will do its best to save some silver hair to me. Hopefully there will be no problems with customs and everything. Even 5%-10% tax would be a LOT given the price I paid.

You may wonder, why am I drawing so much attention to the fact of the purchase? It’s easy to understand if you are in a music geek circles, and almost impossible otherwise. Long story short, (a) it’s the best music production workbench with all sines and saws world ever seen, (b) the fact that you purchased any software product in this country (and bordering Russia) is kind of … extraordinary and deserves attention by itself, and finally, (c) it let’s me immerse deeper into the creative part without a stupid thought “do I deserve to use this, or am I a smelly thief”.

Happy.

Multi-armed Celebrity and Gold

Wednesday, April 9th, 2008

Intriguing title, isn’t it? Heh, well, not so bad. Get your Wednesday morning smile with these two gorgeous findings.

First comes Photoshop Disasters with their way-too-many-arms evidence of what happens when you are photoshoping in an unstable drunk smashed state. But, wait, there’s more to it. Be sure to check the comments for additional fun; you deserve it.

And this one is for a desert. The Cockeyed.com Citizen explores the Lippencott “Gold Kit” offer (don’t miss the second page) inside-out and has incredible fun with it. These two pages gave me a huge smile (as it’s still early and I can’t laugh out loud without a danger to wake up Kate). It’s simply hilarious, don’t you find? This service would never work here on the eastern side of the pond, not to mention the trick itself. Opinions are welcome.

Enjoy your morning!

Ubuntu 8.04 is Coming

Tuesday, April 8th, 2008

You know, I’m a big fan of Ubuntu Linux and using it on my aging HP compaq nx9005 laptop for my business needs just fine for more than 5 years now. I’ve been running it since its childhood and my drawers are still full of Live CDs they generously send to everyone free of charge.

Today, when I was looking for an updated Pidgin 2.4.1 package (currently I’m running 2.2.0), I happened to see the front page of the official Ubuntu site and guess what? It struck me on the head. 16 days left until the next release!

It made my day. I’m well-taught that every next release takes so much enjoyment that it would be fair to make it an official world-wide holiday. No kidding. :) It is much like every next Mac OS X version, but without an additional weight. You still can run the OS on your granny’s i386, and do that comfortably. But if you have an up-to-date roaring monster under the hood, there’s a plenty of options to keep it busy.

Enough words. Let’s count out loud.