Archive for Travanj, 2006

The Stuff I’ve Been Listening To Lately…

Travanj 20, 2006

Although I listen to a lot of music every day, there are a few bands that really caught my attention in the last few weeks… They're pretty diverse, so I think there's something for everyone in here…

The first of them is Death Cab For Cutie. It's a great indie-pop band with really nice melodies, although the vocals can be irritating sometimes, especially on the first few listens. I've listened to their album "Transatlanticism" and a few other songs – I'd say the song Photobooth stands out.

A bit more conventional, but nonetheless great is Keane. Piano-oriented (alternative) pop/rock – not really something I'd usually listen to (although the last Coldplay album rocks :)), but these guys are great. A friend of mine gave me the album "Hopes and Fears" and it kicks ass :). The song This Is The Last Time has some really nice melodies, and the whole album has a bit of a theatrical sound.

Modest Mouse is an emo / indie rock band, but they do experiment a bit. Their debut, "The Moon & Antrarctica" is a bit strange and tiresome at moments, but after a few listens, everything fits in almost perfectly. The friend responsible for the introduction to Keane is responsible for this one too, and I'd like to thank him for that :). The songs The Cold Part and Gravity Rides Everything would be my reccommendations.

The last, but definitely not the least, is an Australian post rock band, Clann Zu. Combining noise, post rock, Australian native (etno) music and interesting melodies with strange vocals, they created an impressive piece of music called "Black Coats And Bandages." I consider this a must-listen for every fan of experimental and/or post rock. The songs So Complicated Was The Fall and From an Unholy Height are just beautiful.

There you go… I hope you find something for your listening pleasure. Enjoy!

Modifying a TinyMCE-powered Textarea

Travanj 18, 2006

TinyMCE is a great WYSIWYG JavaScript control which can easily convert any textbox on your site to a powerful WYSIWYG editor. The problem with TinyMCE is that it limits you – it filters out the HTML code, trying to keep the code it generates clean and standards-compliant.

Although there's really nothing wrong with that (it's nice actually), it causes trouble when you try to edit the textbox (using the DOM) from anything outside of TinyMCE – your own JavaScript, for instance – and refuses to insert any HTML into the textbox.

The workaround? Disable TinyMCE, make and apply your modifications and enable it again:

tinyMCE.execCommand("mceRemoveControl", false, elemid);
tinyMCEmode = false;
// the code for manipulating the text box
tinyMCE.execCommand("mceAddControl", false, elemid);
tinyMCEmode = true;

Note that you should replace the "elemid" variable with the ID of the HTML element you're modifying.

This also works from a popup window (assuming it has been opened by the page which contains the HTML element you want to modify): 

window.opener.tinyMCE.execCommand("mceRemoveControl", false, elemid);
window.opener.tinyMCEmode = false;
// the code for manipulating the text box
window.opener.tinyMCE.execCommand("mceAddControl", false, elemid);
window.opener.tinyMCEmode = true;

The same note for "elemid" applies here, too. 

There you go… And it wasn't that hard, either :). 

SciTE + UTF-8 / iPodLinux

Travanj 17, 2006

One of my favorite source code editors under both Linux and Windows is definitely SciTE. It's a small, compact text editor built to demonstrate the powers of Scintilla, a source code editing component for Windows and GTK+, but it soon grew to be a useful editor.

I use it almost exclusively (although I get some of the work done in Dreamweaver when I'm at work), but one thing bothered me – I couldn't make the UTF-8 support with the Croatian diacritic letters, like č, ć etc., to work correctly on Linux. The SciTE manual helps, but isn't very clear on this subject, so here's a way to enable that… Copy these lines and insert them into your SciTEUser.properties file (go to Options -> Open User Options File or manually edit / create the file ~/.SciTEUser.properties):

code.page=0
character.set=238
LC_CTYPE=hr_HR.UTF-8

That's about it. You can find other character set numbers on the SciTE documentation page.

I also found some time to try to install iPodLinux to my 1st generation iPod mini, and it wasn't successful at all. I tried to install the app both from Linux and Windows following the instructions on their website, but after the installation, the iPod just wouldn't boot – it showed some error icon on the screen with the Apple iPod support page URL written underneath.

I managed to bring it back to life using Dark and Mysterious Ways – by formatting it with the HP USB format utility (to FAT, not FAT32!), reinstalling the iPod software from the iPod CD, formatting it again when / if prompted by the iPod installation and restoring the old iPod firmware version (the one I got on the CD, from 2004 :)). Only then would my iPod finally boot – then I installed the latest version of iTunes and updated the firmware to the latest version. Simple firmware restore using the latest version of the firmware wouldn't work.

After the iPL installation failed for the second time (even from Windows), I decided it ain't worth the hassle of taking the above steps every time, so I gave up for now. I can't wait for the release of Rockbox software for the Mini 1G, but I hope it will work better than iPL.

Alternative iPod Firmware

Travanj 15, 2006

As an owner of a 4GB iPod mini (1st generation), I'm not happy with the software I have to use to upload music to the drive. It's not that I don't like iTunes, but I don't like the idea of being limited to one app (and one operating system) to be able to put some music on my portable music player. It would be way much better if I could just drag'n'drop the music to the player from Nautilus / Windows Explorer / whatever. I'm aware of gtkpod, but I my experience with the app isn't really good, and it still doesn't allow greater portability and drag'n'drop support.

In the last couple of weeks, I found two alternatives to the default iPod firmware – iPodLinux and Rockbox, the latter being more interesting to me than iPL. iPodLinux is an attempt in porting an alternative Linux kernel (uClinux) to the iPod with loads of apps available, while Rockbox is an alternative firmware for many different MP3 players (like iRiver, iPod, iAudio etc.). I really didn't have the time to play around with iPodLinux (I may find some time next week, and I'll post the impressions), but Rockbox really got my attention because it allows simple drag'n'drop song upload.

Unfortunately, Rockbox isn't yet available for my 1st generation iPod mini (they're working on it! :)), but it's available for a range of newer generation iPods and other MP3 players, so you might want to try it out. If anyone has any other suggestions, feel free to e-mail me (you have my e-mail address on the About page) or leave a comment. I'll be glad to try it out.

Happy Easter to everyone! :) 

Linux Workshop, pt. I

Travanj 7, 2006

I was asked by an acquaintance of mine recently to run a Linux workshop at a youth club in Pazin because they were starting a computer section in the club and the people asked for it… I agreed to do it – I'm no expert on Linux, but I'm competent enough to run a class for people who want to be introduced to FLOSS and Linux.

I held the first "class" on Tuesday and started with a gentle (well, at least gentle from my POV :)) introduction to Linux and FLOSS. We didn't do much on the computer (just something to show them how it feels). There were 9 people present, and I handed them out a few of the Ubuntu 5.04/5.10 CDs I ordered through ShipIt that were lying around on my desk unused. To my surprise, almost a half of them tried to install Ubuntu by themselves a few days after – all successfully, and they already had some questions about some of the apps (OpenOffice.org Math, to be exact) and some of the features of Ubuntu.

Now, I'm not that much surprised with that fact because I think the installation is oh, so incredibly hard, but because I wasn't expecting the people would be so willing to accept the relatively new things I said them on the workshop and try them right away. This can only lead me to believe that the software itself being hard to use or install isn't really the problem (with the modern distributions like Mandriva and Ubuntu, who are much more desktop-user oriented, this isn't the case at all – and this only proves it) – the problem is spreading the word, making people aware of the alternatives, educating them about these alternatives and making them aware that they have a whole community around them to help them with any of the problems.

I have yet to see how many of the people will really decide to stick with Linux and use it for some serious work to confirm this. It looks promising for now – we're carrying on with the workshop next Tuesday.

TUX Distribution Smackdown

Travanj 2, 2006

The 12th issue of TUX Magazine, the magazine for the new Linux user, is out. This time they've dealt with a range of distributions, choosing the most suitable one for the new user, and it already caused some polemics on the official website. The distros reviewed were: Debian, Linspire, SuSE 10.0, Fedora Core 5, (K)Ubuntu, MEPIS and Mandriva. The list here is sorted by the results, starting from the last.

I expected to see Mandriva among the first 3, but I expected to see Linspire there, too. I was glad to see my distro of choice among the first 3 (Ubuntu), and wasn't surprised to see Debian at the bottom when speaking about adequate distros for new users, especially when compared to Linspire, SuSE or Mandriva. The main issue with the distros was the media support – many distros didn't have any native MP3 support, DVD playing support etc. That's where the distros lost many points, along with the ease of use and configuration factor.

All in all, it's a useful article (or a set of articles, to be exact), although I'd like to see a similar thing with reviewers not being *nix experts, but ordinary people who are really using Linux for the first time. This way, as far as I could tell, some people reviewed distros they've been using for a longer time, and they're all Linux developers / consultants (except the guy who reviewed Linspire, he's an architect) – they can't look at the problem as a new Linux user would. But, they can (and did) try, and it reflected on the quality of the article. Very useful.

This issue of TUX also brings us a few extra interesting articles (and two great editorials worth a read), so I recommend it. It's free, and it's available for download at the official website.

web.py

Travanj 1, 2006

Creating web apps in Python, which is the language I use most for my programming needs right after PHP, has always been interesting to me. Of course I was aware of the CGI abilities of Python, but I never made myself study it. So, I kinda forgot about it and kept using PHP to write the web apps I've been developing ever since. But, then Harry Fuecks, a Sitepoint PHP blogger, wrote a post about a simple, yet effective web framework for Python.

As I didn't have any experience with any of the "modern" web frameworks, like RoR or Django (which is partially connected to my lack of interest for them, but that's something to write another article about), I was a bit sceptical towards it, but I decided to check it out after all. And I was surprised. Web.py is probably the most minimal, and yet the easiest to use web framework I had the chance working with. It comes with its own little web server which should be okay for most of your testing needs, but it can be integrated through FastCGI with lighttpd or Apache, or through mod_python with Apache for any other, more serious uses.

I really haven't used web.py for any serious work yet, but I've played with it for a while and I can say I'm pretty satisfied. The integration with Cheetah for templates is seamless (but you have to install Cheetah, though :)), and the same goes for MySQLdb. It also supports PostgreSQL for all of you who use it, too, via a third party library psycopg2. Of course, this is a relatively new project, so don't expect wonders, but it's really promising and, as far as I'm concerned, it's headed in the right direction. I'll keep playing with it and testing it, and I'll write some more about it when I find something interesting enough to write about.

'Till then, check it out.

New URL

Travanj 1, 2006

Yeah, I know I've been moving more times than the actual number of posts I wrote, but I find this wordpress.com service great. It has everything I need (WordPress, actually) and it avoids the need for the installation of the software on my webspace. So, I think I'll use it :).

The relevant posts from the old blog have been transferred here, and I'll start writing some more soon. Bye-bye.