The Desktop Environment week


Nope, it’s not a national holiday. It’s the week that every geek wastes trying new DEs and, usually, it happens every year.

I don’t know if you are aware of this behaviour, but Linux users certainly do.

On regular basis, upgrades are made to all the Desktop Environments like KDE, Gnome, LXDE and so on and so forth. Linux users tend to hang out different social environments such as IRC, Mailing Lists and forums. In these places, there are lots of discussions like “what is the best DE?” and, usually, Gnome and KDE fanboys are the most involved. Users won’t notice this at the beginning of the discussion but, latently, something starts growing into their minds: the lusting after an alternative DE.

And here comes the worst.

Gnome users are typical the ones that brag about the cleanness and ease of use of their desktop. They are very likely to be self-convinced minimalists and they love GTK because they are clean and have thin borders and small buttons.

KDE users are the one exhibiting the most pastel-rounded smoothly-animated desktop ever. They claim that KDE is so gorgeous because of the integration of every single bit and every single app. They love Qt: these library are the most comprehensive and powerful library in the world and they should be used by everyone. Typically this kind of desktop has lots of hiccups because of the huge amount of enabled effects that are shipped with the default installation.

LXDE users are the ones that finally are celebrating the right-click implementation on their desktops.

Of course there are also the ones that do not use a DE at all. I think they are blessed.

When two different DE-users meet each other, the flames of hatred burn and there is some sort of vendor-buyer approach in which the two sides defend their position and aims to “convert” the opponent like priests do with people.
And here the seeds of a new change got planted in each other brains.

Typically, the KDE user, is the one that can hardly be convinced to switch because his creed relies upon getting more effects and more candy stuff. Unfortunately, there is nothing more bloated than KDE.

On the other hand, Gnome users are the one looking for more minimalism and less buttons, effects but more shortcuts and accelerators. Luckily for them, the world has plenty of alternatives.

When the alternatives begin being considered, the DE week starts.

During this week, the user installs thousands of apps, libraries that pull billions of dependencies with the sole scope of devastating the system. Notice that the productivity drops to nearly zero. The user gots distracted by new buttons, different applications promoting different semantics in their usage. The user starts tuning up the system, blaming against developers for missing features and, obviously, bugs.
The week has almost passed and the user has only to fix the so called “just two things” when, suddenly, realises that he quickly needs to do the typical thing that he always did with that specific program that he loves so much but doesn’t fit into the new environment.
Oh my sweet good Lord, tragedy.

Googling, aptituding, emerging, pacmanning and you name it. Nothing does feel the same as before, nothing seems to be so awesome as before. There’s nothing left to do if not rolling back to the previous habitat in which everything was just fine. At this point the exhaust user, whose productivity is back at maximum level, will exclaim “Aw, fuck off stupid douchebags. My system r0x and there’s nothing better than it. I will never ever never do that again. I just wasted up one week of my life”.
You know, though, that in one year you will be back at square one.

I want to conclude saying that I truly and sincerely give my deepest sympathy to all Gnome users. I know that Gnome 3 sucks for most of you and I hope you will eventually find your way. Once again.

How to enable Airdrop on old Macs running Lion

Airdrop is a feature available in Lion that allows users to easily share files between Macs without sharing a connection to the same Wi-Fi Network.
It uses PAN to provide for p2p connection (like Bluetooth does).
It may happen that your old mac does not carry a Wi-Fi module capable of supporting this type of network but there’s a known workaround to make this possible.
Fire up your terminal and issue

defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1

Once you did that, relaunch Finder by Opt+Clicking onto the Finder icon in the dock or by issuing

killall Finder

in a terminal shell.

Now you should have your old-fashioned MacBook running both Lion and Airdrop.

Thank you @LorenzoMMariani that pointed this out to my attention.

Automatically update store schema with Core Data

Today I was playing with Core Data technology and I was trying to check whether it is possible to update the store schema according to the changes I made to the entities, relationships and whatever else.

I found out that the important steps are:

  • Use the versioning: before modifying your current schema you should select “Editor -> Add Model Version..”
  • Edit as much as you like
  • Select the new version as the active one
  • Go to your app delegate file and modify the - (NSPersistentStoreCoordinator *) persistentStoreCoordinator method as follows:
    NSURL *url = [applicationFilesDirectory URLByAppendingPathComponent:@"YourApp.storedata"];
        __persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:mom];
    
    NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
    						 [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption,
    						 [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];
    
    if (![__persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:url options:options error:&error]) {
    		// The rest of the code here
    	}
    
    return __persistentStoreCoordinator;
    



    The highlighted lines are the one to be added. Please notice that row 8 needs to be updated with options:options. I only tried it using NSSQLiteStoreType as persistent store type but it should work fine even with NSXMLStoreType.

References:

  1. Working with Core Data: Schema Versioning and Lightweight Migrations

Migrate from Typo blog to WordPress

Those of you that follow my blog have already noticed that in the past days a major change to the website has happened.

In fact, I moved from Typo to WordPress.
The most difficult part is not to find a theme, fix the CSS, play with the sidebar or anything like that; the mess comes when you have to migrate the data (posts, categories, tags, comments, …).
In order to do so I readapted a Ruby script to work with the latest version of the two blog engines (Typo 6.0.5 vs WordPress 3.1.2). You can find my version here.

To use it, just copy it inside your $TYPO_ROOT/script directory. Then simply issue

RAILS_ENV=production ruby script/wp_export.rb > out.wxr

and wait for the magic to happen.

Once the scripts ends, out.wxr file will contain all the content you had on your previous Typo installation.
In order to proceed, you have to install WordPress Importer, a plugin that allows you to import a WordPress blog from file. Install it, activate it, then import the file generated in the step above and you’re all set.

How to burn Lion boot image once installed

Plenty of websites and users have posted the solution to the problem “How can I burn a Lion image onto a DVD?”. What I was really looking for today is a way to get the installation files back in order to be capable of extracting the dmg file containing the image to burn.

The solution is pretty trivial: fire up the Mac App Store and click on the “Purchased” tab on the top. You’ll get the list of applications you have previously bought. Around the top of such list there should be an entry labeled “OS X Lion”. Keeping your “alt” button pressed, click on that entry (on the name). You will enter the Lion page but the install button is now labeled as “Install”. Keep the “alt” key button pressed and click on the “Install” button. The Mac App Store will ask you again for your Apple ID. Issue your credentials and enjoy (once again) the download.

The following steps are the same proposed in many blogs on how to burn OSX Lion dmg image.

After the download completes, go into “Applications” and search for the “Install OS X Lion.app” file. Right click -> Show package content, locate “SharedSupport” directory and pick up the file named “InstallESD.dmg”. Copy it somewhere else and burn it. Oh you just need a common DVD-R single layer.

See ya!