Archive for the ‘Linux’ Category

No Rest For The Unemployed

Posted on January 26th, 2010 in Books, Computer Science, Databases, Linux, Mac, Open Source, Opinion, Programming, Ruby, Ruby On Rails, tips | Comments

After two years, yesterday was my final day of being a developer for BarterQuest. As anyone living in expensive New York City in the same situation, I have been focusing part of my energy looking for a new gig. I’m pretty confident, despite the current economy, that I will land on my feet sooner rather than later. I have a few leads, with one in particular that I am really hoping will come through.

In the meantime, I’m not just throwing my resumé in the face of companies everywhere in the U.S. I have also decided that since now that I have quite a few extra hours in my days, I should really do productive things instead of sitting on my couch and re-watching all previous seasons of 24 (believe me, I would watch all 7 seasons in a row if I could) or jamming away to Guitar Hero. This is a perfect chance to do lots of technical things I’ve been wanting to do for months, but just never got the time to do so. Here’s a short list of some goals I’d like to get started on.

Learning new stuff

For the past two years, I’ve been exclusively using Ruby and Ruby on Rails at my day job. I’ve always wanted to broaden my skills by doing other types of programming, but when you take into consideration that I would usually be at work more between 9-10 hours per day, plus a commute that would sap an additional two hours, there wasn’t much time for me to be able to do personal things, let along learn new stuff. Now that I’m finally free, I can now spend more time with those things I’ve wanted to experiment with.

I’ve always wanted to learn iPhone application development. I know the basics of Objective-C, and have the book iPhone SDK Development by Bill Dudney, but I was never able to sit down and code something up. I have a few ideas for apps, so even if I can make a simple app that’s accepted to Apple’s App Store will be an achievement for me.

I’ve been very interested in implementing Push technology to web apps, like Comet or Web Sockets, using nginx’s Push Module and Orbited.

Although I’ve never had the opportunity to work with extremely large data sets, I’ve always been curious about frameworks like Google’s MapReduce and Apache Hadoop, particularly how well they can “crunch” the data thrown at them.

Keep on with what I already know

As I mentioned, I’ve been using Ruby for years now, and I know Ruby on Rails and Sinatra pretty well. However, just because I want to learn new things doesn’t mean that I want to abandon this awesome language. In fact, I want to keep using it more with the latest toys.

Thanks to Ruby Version Manager, I was able to safely install the latest versions of Ruby 1.9 and MacRuby and start learning their new features. I was also able to check any possible compatibility issues in my older applications with different major Ruby versions. Seriously, if you are a Ruby developer using a Mac or Linux, install RVM now if you haven’t.

Recently, there have been more and more news about Ruby on Rails 3, the next major release for the wonderful framework. I’d like to stay one step ahead of the pack and start learning about the new changes before it officially hits the web. One of the leaders of the newest Rails changes, Yahuda Katz, has written lots of blog posts relating to the changes in Rails 3. They’re definitely worth a read.

Strengthening my shortcomings

There are quite a few things – development-wise – that have been bugging me for a long time, yet I’ve never taken the proper steps to correct. Now is as good a time as any to take on these things and finally conquer them.

My main weakness, as a web developer, is that I’m pretty bad at design. I know CSS and its properties, I know about browser incompatibilities (having been a victim many times before by the evil and immortal Internet Explorer 6 browser) and all that stuff. But as far as design goes, like font sizes, element placement, usability and colors, these things are not my strong suit. I’ve actually stocked up on some books about these subjects (like Don’t Make Me Think by Steve Krug and Web Design for Developers by Brian Hogan), so I hope that by the time my unemployment ends, I’ll be much better off making my work look good – or at least decent.

Another weakness I consider is that I get distracted from development from time to time. It’s not frequent enough to affect the quality of my work, but it’s enough to annoy me when I do it subconsciously and I then catch myself in the act. I have read some people who had some success using the Pomodoro technique, so starting tomorrow I decided that I’ll give it a try. There’s a nice little app called Concentrate for the Mac that seems to be just the thing I need during those times when I need to get stuff done and not get distracted.

Beef up my GitHub profile

I have to admit that I’m a little bit ashamed to see my GitHub profile virtually empty. For a long time, I’ve been wanting to add more of the projects that I have in my laptop to GitHub and see if some of them take a life of their own. Sadly, for whatever reason, I haven’t done that. Most of the times I’m a bit too critical at my code and think it’s embarrassing to make public, but that’s really what I need to do to get better as a developer. I can take criticism with the best of them, so there’s really no excuse. I need to make more of my code open-source, period.

Not only do I want to show my own work, I also want to give back to the community. I have used so many open-source projects over the years, yet I’ve only submitted a handful of patches to very few projects. I don’t want to be a person who takes, takes, takes and never gives anything back in return. So I’m going to take steps to correct that. I’ve started cloning some repositories of my favorite projects from GitHub to my computer to start reading their code more in-depth, which I had been doing anyway. I’ll check if these projects have Lighthouse pages with open tickets, or if there are any open issues on their GitHub page. A few years ago, Dr. Nic wrote an excellent post titled “8 steps for fixing other people’s code” that inspired me to start finding features or defects that I can handle.

I have to say, I’m only one day into this routine, and I don’t remember the last time I felt this free and liberated doing what I wanted to do. Full-time employment is great for earning money and making substantial stuff, but sometimes there’s a feeling of emptiness due to not being able to explore on your own. Being unemployed doesn’t mean that you need to spend all your time looking for work. Unless you’re truly struggling economically and can’t pay the bills in the next couple of weeks or even days, why not spend part of your time gearing up for the future?

Redis rocks!

Posted on November 5th, 2009 in Databases, Linux, Mac, Open Source, Opinion, Programming, Software | Comments

In my development blog, I previously wrote that MongoDB was the future of database storage. I might reconsider my decision, now that I’ve discovered Redis. In a nutshell, Redis is a key-value store. But it’s not a simple key-value database, as it has lots of commands and extra goodies, such as file persistence (so data can be stored from memory to a file, and restored in case of failure) and awesome data structures like lists (with push / pop) and sets (even ordered sets). Besides that, Redis boasts atomicity and even master-slave replication. It’s quite a lot of stuff for a lean package.

One of the things I love the most about Redis is it’s speed. Believe me, this little database is fast. Redis includes a benchmark tool, so I ran the default benchmark (Approximately 10,000 total requests per command, from 50 simultaneous clients) just to demonstrate its raw speed. These tests were run on a Mac Mini (1.83 GHz Intel Core 2 Duo, 2 GB RAM) under Ubuntu 9.10 Server:


dennmart@ubuntu:~$ redis-benchmark
====== SET ======
10005 requests completed in 0.14 seconds
50 parallel clients
3 bytes payload
keep alive: 1

34.89% <= 0 milliseconds
99.19% <= 1 milliseconds
100.00% <= 2 milliseconds
74111.11 requests per second

====== GET ======
10003 requests completed in 0.13 seconds
50 parallel clients
3 bytes payload
keep alive: 1

34.62% <= 0 milliseconds
99.79% <= 1 milliseconds
99.83% <= 2 milliseconds
99.87% <= 3 milliseconds
99.91% <= 4 milliseconds
99.94% <= 5 milliseconds
99.97% <= 6 milliseconds
99.99% <= 7 milliseconds
100.00% <= 8 milliseconds
74649.25 requests per second

====== INCR ======
10005 requests completed in 0.15 seconds
50 parallel clients
3 bytes payload
keep alive: 1

25.60% <= 0 milliseconds
99.73% <= 1 milliseconds
99.80% <= 2 milliseconds
99.83% <= 3 milliseconds
99.86% <= 4 milliseconds
99.89% <= 5 milliseconds
99.92% <= 6 milliseconds
99.95% <= 7 milliseconds
99.97% <= 8 milliseconds
100.00% <= 9 milliseconds
65392.16 requests per second

====== LPUSH ======
10001 requests completed in 0.13 seconds
50 parallel clients
3 bytes payload
keep alive: 1

37.62% <= 0 milliseconds
99.78% <= 1 milliseconds
99.82% <= 2 milliseconds
99.86% <= 3 milliseconds
99.89% <= 4 milliseconds
99.93% <= 5 milliseconds
99.96% <= 6 milliseconds
99.99% <= 7 milliseconds
100.00% <= 8 milliseconds
77527.13 requests per second

====== LPOP ======
10000 requests completed in 0.14 seconds
50 parallel clients
3 bytes payload
keep alive: 1

34.13% <= 0 milliseconds
99.69% <= 1 milliseconds
99.82% <= 2 milliseconds
99.86% <= 3 milliseconds
99.90% <= 4 milliseconds
99.93% <= 5 milliseconds
99.96% <= 6 milliseconds
99.98% <= 7 milliseconds
100.00% <= 8 milliseconds
74074.07 requests per second

====== PING ======
10000 requests completed in 0.12 seconds
50 parallel clients
3 bytes payload
keep alive: 1

43.79% <= 0 milliseconds
99.80% <= 1 milliseconds
99.85% <= 2 milliseconds
99.89% <= 3 milliseconds
99.91% <= 4 milliseconds
99.93% <= 5 milliseconds
99.97% <= 6 milliseconds
100.00% <= 7 milliseconds
86206.90 requests per second

Yeah, you read that right. On this somewhat low-end computer (by today's standards), Redis still manages to do over 74,000 SET (write) and GET (read) operations per second. Push and pop list operations also do well over 70,000 requests. On bigger hardware, expect these numbers to be much higher. Besides speed, I've also been impressed by the stability of Redis. I've been running Redis non-stop on the Mac Mini for over two weeks, and I've never had a single issue with it.

I got really interested in Redis after Defunkt (of GitHub fame) open-sourced Hurl. Hurl was an entry in this year's Rails Rumble competition. I used it quite extensively when developing with PayPal's APIs. After it was released, I noticed that Hurl used Redis for persistence. I was kind of puzzled why a key-store value was used for this. However, Defunkt wrote an excellent post mostly explaining the SORT operation, but also included some additional details on how Redis was used in Hurl. It made the decision to use Redis clear. Well, I'm also willing to bet that he used Redis because us programmers love to use the new hotness.

I feel that Redis will be something big soon. There are a few open-source projects using it, including the aforementioned Hurl and Resque. I already have a few ideas where I can use some of this functionality for current sites that I'm working on (such as simple counters, or a tag-like system where we can push and pop tags from a list). Check Redis out if you need some quick and simple storage.

Installing Ubuntu 9.04 on a Mac Mini

Posted on May 25th, 2009 in Linux, Mac, Open Source, Software | Comments

Ever since I bought my MacBook Pro a few months ago, my poor ol’ Mac Mini has been alone and lonely. I really didn’t have much use for it, since I transferred all important work files to my new laptop. So what would I do with it? That’s when Ubuntu 9.04 was released. Back when I was in Puerto Rico, I would always get excited when a new release of my favorite Linux distributions (Fedora, Debian, Slackware and Ubuntu) was announced. It had been a while since I gave one of these new releases a test drive. It would also give me a chance to use my Mac Mini as a server, where I can test some new software that I’ve been wanting to check out for a while.

The Mac Mini seems like a good, cheap alternative for a server if you have one lying around unused. These machines are pretty quiet, consume low amounts of energy and are fast enough for most server tasks. Here were the steps I took to get a fully-functional Ubuntu Server installation on my Mac Mini. As a side-note, my Mac Mini is a Mac Mini Core 2 (1.83 GHz) with 1 GB of RAM and an 80 GB hard drive.

1) Download the Ubuntu Server disc image and burn it to a CD. I chose downloading via BitTorrent. Also, I downloaded the 64-bit version (torrent filename: ubuntu-9.04-server-amd64.iso.torrent), although the 32-bit version should work just fine. Make sure you seed for a while after you download your disc image!

2) You will need to partition your Mac Mini hard drive, to create some space for the Ubuntu installation. If your Mac Mini has Mac OS X 10.5 (Leopard), you can use the Boot Camp Assistant to create a partition. Unfortunately, you won’t be able to use Boot Camp if your Mac Mini is running Mac OS X 10.4 or an older version. When starting the Boot Camp Assistant, you will be asked to specify the size for your new partition. You’ll need at least 10 GB of free space in your hard drive to do this. Depending on how much hard drive space you have available, create a partition. Once completed, the Boot Camp Assistant will ask if you would like to restart to begin installing your new operating system. Don’t do this just yet. Quit the Boot Camp Assistant.

Note: I was having problems creating a partition, even though I had plenty of free space on my hard drive. The reason was because my hard drive was apparently too fragmented, and there were some files that couldn’t be moved to create the new partition. Since I have a 500 GB external drive and use Time Machine to back everything up, I decided it would be best to just do a clean install of Mac OS X 10.5. Once Leopard was installed, I created the new partition using Boot Camp Assistant without any problems.

3) Before restarting your Mac Mini, you will need to install a boot manager called rEFIt. rEFIt will help install Ubuntu easily, and makes selecting between Mac OS X and Linux after installation a breeze. To install rEFIt, download the Mac disk image (.dmg) file. Once the image is mounted, install the boot manager by executing the rEFIt.mpkg file. After installation, to make sure the boot manager was properly installed, there should be a directory named /efi in the root directory of your system. Open the Terminal application on your Mac Mini, and execute the following commands to properly install the boot manager (You will be prompted for your password):


cd /efi/refit
./enable-always.sh

4) After rEFIt is installed, insert the Ubuntu Server CD you created and restart your Mac Mini. When rebooting, you’ll immediately notice the rEFIt boot manager screen. This boot manager should recognize the Ubuntu Server CD (marking it with the ubiquitous Linux penguin logo). Select this option, and the Ubuntu installation process should begin.

5) Installing Ubuntu is beyond the scope of this post, but it’s pretty easy to install if you have never done it before. Don’t be intimidated by the command-line look of the installation process! Just following the instructions and everything should be installed in no time. There were a few things I had to do differently in my case:

  • When the Ubuntu partitioner starts, it will show all available partitions in the hard drive, including the partition for Mac OS X. You’ll recognize the difference between the Mac OS X partition and the one you created using the Boot Camp Assistant by looking at the format of the partition (Mac OS X uses the HFS format, while the one you created is using the FAT32 format). Since I wanted to use a different format for this partition (ext3), I selected the FAT32 partition and deleted it. Once deleted, you’ll see ‘Free Space’ where your partition used to be. Select the free space, and the partitioner should ask if you want to let it create the necessary partitions. This is the easiest way to set up your new partition for Ubuntu.
  • After installing the operating system, the Ubuntu installer will ask where you want to install its boot manager, GRUB. Since we don’t want to over-write rEFIt that’s install on the drive’s Master Boot Record, we need to install the GRUB boot manager in the boot record of the new partition. So where the installer prompts you to write the location where GRUB should be installed, write hd(0,2), which is the location of the new partition (provided you only have the Mac OS X partition and the new Linux partition).

6) If everything went smoothly, your Mac Mini will eject the CD and reboot. rEFIt will be on display once again, this time letting you choose to boot Mac OS X or Linux. Select Linux, and after all of Ubuntu’s processes start, you’ll be presented with a prompt. Congratulations, you have Ubuntu 9.04 installed in your Mac Mini!

I’m sure that installing any other Linux distribution will be more or less the same. Keep in mind that since I installed the server edition of Ubuntu (command-line only), I have no idea if video, sound, wireless connectivity (I connected my Mac Mini to my router using a Cat-6 cable) or other things will work properly in a Mac Mini. I’m sure the Ubuntu community (and the Linux community in general) have solved most common issues by now. If I install a different Linux distribution using a GUI, I’ll write about it and let everybody know.

Fluid and Prism – Site Specific Browsers Are Awesome

Posted on September 11th, 2008 in Linux, Mac, Software | Comments

At my recommendation, my company started using Campfire by the awesome guys at 37signals. In case you don’t know what Campfire is yet, it’s a site where groups of people can chat, upload files, share code and many other collaborative activities. I recommended Campfire because I think this is just what our company needed during this time where we have testers who are in other cities. It’s my first time using Campfire in a business environment, and hopefully it all works out well.

One of the things that initially worried me about Campfire is that being a web-based app, it would be difficult to know when there was any activity on the site. The good thing is that Campfire has an audio alert, a pleasant beep, that alerts me whenever someone wrote something in the chat rooms I’m at, along with changing the title of the page so that I can spot it in my open tabs. However, I’m guessing that I’m not the only web developer who has a myriad of tabs open at any given moment. Site testing, analytics, API specs, build/test results Google – All of them usually occupy a space in my browser. Adding Campfire would mean that it would get lost in a sea of tabulated titles.

After seeing this could be a problem, I immediately thought of Fluid, which I had used previously. Fluid is a browser of sorts. However, instead of being just another browser, Fluid allows you to create an app that’s site-specific, so your web-based apps will act like an independent desktop application, separate from whatever you have in your browser. It’s perfect for those sites which you constantly have open, such as web-based E-Mail like Gmail, social networking sites like Facebook, and, as in my new-found case, chats like Campfire. It will also alert you whenever there’s a change in the site you’re visiting, right on the application icon in the dock. So, as an example, if you’re using Gmail, you’ll see new mail notifications in the dock, instead of needing to open the app window. It’s pretty neat and convenient.

I was happy that I found a solution. One ceveat, though: Fluid is a Mac-only app, and I use Linux at work (at least until the bosses buy souped-up Macbook Pros for their developers… I can dream, can’t I?). So I was bummed out again. Then I remembered that Mozilla was developing an app with a similar concept, called Prism. The functionality is virtually the same: You set up a site to be run as a desktop app, making it totally independent from your regular browser.

Seeing that Prism is in the Mozilla Labs, I didn’t expect much of it. However, it works great on my Linux laptop under Ubuntu 8.04. I was able to create a Campfire app and add it to the desktop with ease. It never crashed on me or gave me any problems during the entire afternoon I was using it. Granted, there wasn’t much activity going on in the chat rooms at the time, but everything worked as if I were working on Firefox.

The main difference between Prism and Fluid is the fact that Mozilla is making Prism available not only for Mac, but for Windows and Linux as well. Of course, Fluid is written with Mac in mind, and it has all sort of goodies for the Mac (like the aforementioned updates in the icon, Growl notifications, its own JavaScript API and more), so you’re much better off with Fluid if you’re on the Mac. For the rest, then Prism seems like a mighty fine solution in the meantime.

With more and more web-based apps taking up the majority of our time in front of a computer, I think these applications will be more widely used in the near future. You can already see some sites adopting it, even including icons for your usage of the desktop, like GitHub and 37signals. There’s even a Flickr group adding more and more site icons every day. If you haven’t checked out either of these apps, you should check them out now.

Don’t let Unicode support be the death of you

Posted on August 19th, 2007 in Linux, Programming, Web Development | Comments

You Americans (and British, Australians and any other English speakers) have it easy. When you need to create a web application, all you need to use for your text is the basic English alphabet, only 26 different characters and 10 digits. The rest of the world, myself included, aren’t so lucky. Our languages are damn complicated, with additional letters, along with such grammatical ‘features’ such as accents to see where the pronunciation is at its strongest.

Seeing that I was born in Chicago, my first language is English. Although my parents are both from Puerto Rico, they never enforced the usage of Spanish upon me. When I moved to Puerto Rico when I was 8 years old, the only word in Spanish I knew was “Gracias”. Unfortunately, I didn’t have Dora The Explorer to help me learn the language when I was a boy. It’s taken years, but I finally consider myself fully bilingual in both English and Spanish, and am usually very careful as far as spelling and grammar go.

However, I’ve been wracking my brain for a long time now when making web applications in Spanish. Sometimes the additional characters, like the letter “ñ“, or words like “presentación” are a pain to get working immediately. It’s like I have to jump through hoops to get those characters working right.

In case anyone else shares my pain (or in case I forget in the next couple of months), I’ve compiled a short list with the things you should first look for when these Unicode characters are appearing incorrectly.

Don’t forget the <meta> tag

One common mistake web developers make is forgetting to set the default character set of the page they’re working on. Without this tag, the browser will automatically set the character set to the browser’s default, usually ISO-8859-1, which does not show Unicode characters. To set the character set of the page to UTF-8, which correctly displays Unicode characters, you simply need to add the following meta tag as the first line in the <head> section:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

This should enforce your browser to use UTF-8 when displaying the page’s characters. Remember to set this first, before any other tags in the head section, or else it won’t work at all.

Check your web server configuration

I remember once working with a PHP application, and pulling my hair out because the characters simply wouldn’t display correctly, no matter what I did. After hours of searching through Google, I found out my problem. The Apache Web Server, which was responsible for serving the website, had its default character set set to ISO-8859-1. If you control your own server and can change Apache’s configuration, just go to the configuration file named httpd.conf (this name can vary, depending on your Linux distribution) and make sure the AddDefaultCharset option is correctly set:

AddDefaultCharset UTF-8

After reloading the Apache Web Server, your pages should be displaying Unicode characters correctly. With the Lighttpd Web Server, which I’m using now, I haven’t had to set any option for correct Unicode support. However, in case someone needs it, just go to your Lighttpd configuration file, go to the mimetype.assign section, search for the .html assignment, and add the following at the end:

".html" => "text/html; charset=utf-8"

Another file to verify, although not necessary in most cases, is the PHP configuration file, named php.ini. PHP is responsible enough to use the encoding set in the page by the meta tag mentioned above, but sometimes some joker decides to change the default character set in the configuration file. In this case, simply comment out the default_charset option, and reload your web server.

The database has data too, you know…

With those two fixes above, your static text should be displaying correctly. However, you notice all Unicode characters stored and retrieved from the database are still being incorrectly displayed. This is due to your database character set not being set to UTF-8. In my app, I’m using MySQL, and the database server’s default character set is set to latin1_general_cl, which apparently doesn’t display Unicode at all. If you don’t explicitly indicate which character set you want to use for your database, the default will be used for not only the database, but the rest of the tables (unless explicitly defined, as well). What we want is the utf8_bin character set, which will display the Unicode correctly.

There are different ways to change this default behavior, from starting the database server with an option to change the default character set, to recompiling the entire program (providing it’s Open Source). But I find it much easier to just remember to make your database use the correct character set. In the MySQL prompt on the command line, it’s as simple as this:

CREATE DATABASE database_name CHARACTER SET utf8;

If you have an existing database not using the UTF-8 character set, the easiest way is to use a program like PHPMyAdmin for MySQL, or your preferred GUI for your database server, and change it there. You can also do it through the command line, but I won’t go into those details here. Search Google and you’ll get a ton of information.

Your text editor has a hand in this too

Don’t forget the tool you’re using to create your web pages. They could be the ones giving you major headaches. In my case, I’m testing out Intype, which is still in alpha, but very usable. Intype has the nasty habit (which I wish is fixed soon) to automatically set the file’s character set to ANSI by default. Once you save the file with this character set, it stays that way, wreaking havoc on what you want to see.

To fix this problem, just make sure your text editor, whether it’s Intype, e, Textmate, Vim or any other text editor in vogue right now, is saving your file using the adequate character set. In my case, I’m using UTF-8 Plain with Intype, and my characters are showing up correctly.

These tips should save you a ton of headaches down the road if you’re doing web development for a non-English audience. If you have any to add, feel free to do so.

Site Redesign… With Wordpress?

Posted on August 8th, 2007 in Linux, Open Source | Comments

If you’ve been to this site before, you’ll notice a whole lot has changed since the past week. I decided to make some changes, not only to the site, but to the entire architecture running the site as well.

The first major change I made was to switch from a regular hosting service to a VPS. It’s made a world of difference. I don’t want to name my previous hosting company, since the service is pretty good, especially for what I paid for it (not too much). However, I felt it was a bit too slow for my tastes. Also, I’m sort of a control freak when it comes to controlling my work. So I scoured the web, and found a company that offers cheap VPS service, so I signed on.

While I do have system administration experience in Linux and am very comfortable working from the command line, it took a while for me to learn how to set up a domain to resolve in your own DNS, how to set up E-Mail accounts with different domains, and other random things. I’ve learned a lot this past week, and for now, my domains are working correctly. It’s fun when you have to bust your ass to get something working, and it finally does. The hard work makes you appreciate it more.

Since my VPS service is limited to 128 MB of RAM (this is just a test VPS to see how it’ll work for my needs, so maybe I’ll spring for more RAM later on), I immediately shut down the Apache Web Server that’s automatically run by default, and grabbed a copy of Lighttpd. After compiling it, learning how to configure it, and making it run, it’s also made a world of difference, as far as speed and ease of administration goes. Although it has some quirks to get some software working (especially Wordpress), it’s not to difficult to figure out on your own.

FInally, my old site ran on Rails. After running it here, I noticed that it consumed too much RAM for my tastes. So I set out on rewriting the page again using PHP, but saw that my Wordpress installation is more than adequate to run the few pages I’ve had for now. I was also convinced to use this because I fell in love with this theme, called Hemingway. So I decided to make it easy on myself and just drop everything in Wordpress. I know Wordpress is used for blogging, but for a simple site as I have now, it’s more than okay to have a few additional non-blog pages around. It just looks good and it was quick to do, and that’s what I wanted all along, since I need to focus my energy on another task that I’ve been doing for the past two weeks.

So, after this switch to a VPS and the redesign, I’m happy with what I have for now. Not only do I have a good-looking site, I not only learned a lot more about Linux, I also have a nice little virtual server running smoothly. Right now, I’m running the server with a web server (Lighttpd), mail server (Postfix + Dovecot), a database server (MySQL) and it’s only consuming 57 MB of RAM. Go Linux!

If you’ve been here before, or even if you haven’t, tell me what you think about the site now, about his it looks, how it runs, whatever you want to comment about. I’ll appreciate any feedback.

Ubuntu – Linux Leader

Posted on February 14th, 2007 in Linux, Open Source, Programming, Ruby On Rails | Comments

It’s been a while since I last used any Linux operating system full-time in my own computer. Back when I was in college and still had tons of free time, I would always try to get the latest and great Linux distribution just to try it out. That’s how I really got familiar with Linux. I always recommend to co-workers and other people interested in Linux to just grab a distribution, even if it’s a Live CD, and just play around with it. If they get stuck, there’s tons of help on the Internet, along with my own help, so any fears they have should disappear.

Anyway, I’m heading off topic with that, and I’ll maybe write about it some other time. For now, I wanted to write about my recent experience. I do use Linux every single day at work, but only at servers, where the command line rules them all. However, I hadn’t used Linux for the desktop in a while. I guess I didn’t want to fiddle around with installing and configuring the OS to my needs. But a friend at work told me he started using Ubuntu, and that basically got me into the Linux mood again.

I had already tried Ubuntu, ever since version 4.10, and I liked it. Still, I thought it was too “user friendly” for me. I know user friendliness is a great thing. But come on – this is Linux! It’s meant to be difficult, right? That was my previous point of view on the subject. But after installing Ubuntu once again, I’m totally hooked. The last version, 6.10, really makes a great name for itself. It has all the user friendliness you can give new users, but it also allows those power users do whatever they can do with other Linux distributions.

I obviously installed Linux to work with Ruby on Rails. I have to tell you, Rails on Windows is a bit of a pain. It just doesn’t feel right to work with Ruby or Rails in a Windows environment. I’ll also save that for some other time. But after installing Ruby and Rails here, I’ve been pretty damn productive with my Rails learnings. It’s been a really great tool.

For now, Ubuntu stands as the leader of the Linux world, at least in my option. This is the distribution that will most likely propel Linux into mainstream usage, not just for geeks like myself who just love to tinker around with these things. Other companies have been doing great on other fronts, such as Novell (with SuSE and OpenSuSE) and Red Hat (with Fedora Core and its own Enterprise Server). But to me, Ubuntu is the distribution that will help get Linux into many homes that have only seen Windows stuff before. And with Windows Vista’s apparent shortcomings (I haven’t tried the OS yet, so I may be misinformed), along with Apple’s very excellent Mac OS X (with increased Apple hardware sales), I think these systems that are in the minority will finally gain some market share that Microsoft has been hogging for years. Look out, Vista.

Don’t take the easy way out

Posted on January 30th, 2007 in Linux, Programming, Ruby, Ruby On Rails | Comments

I remember when I first started using Linux back in the day – “back in the day” referring to about the year 2000 – it was a total pain to work with. From not-so-great hardware detection, to installation and partitioning pains, to the ever-lasting fight against making a Winmodem work, it surely wasn’t for the weak-minded. However, something I sort of enjoyed during that period was downloading and compiling the programs myself. Well, I didn’t enjoy it much when dependency problems arose. But just the fact that I was taking this free and accessible source code, compiling it myself, then having fully functional software made me have a sense of accomplishment.

Nowadays most people have it easy. With friendly and easy-to-use Linux distributions, such as Ubuntu and OpenSUSE, all you need is to just click on a checkmark in a GUI interface and your programs, along with all dependencies, are immediately installed. Nowadays no one even has to use the command-line at all if they wish to do so. So as Linux gets easier to use, less and less people learn how to really use the operating system to its fullest.

Unfortunately, I too have fallen into that trap as well. I remember I used to compile the kernel every single time a new one was announced. Now, I barely do it. If the operating system I’m using at the time doesn’t have a current update, I don’t install it. Every time I see a new program I was to try out, I check first if there are already pre-compiled binaries for my distribution, and only compile the source code if all else fails. It’s kinda sad how much I’ve lost during these past few years.

That will probably change from now on. Last night, I took a spare computer in my apartment (1.0 GHz Athlon with 768 MB of RAM and a 20 GB hard drive) and decided to put it to good use. Seeing that I’m trying to learn Ruby and Rails, I wanted to install an easy-to-use distribution to save me some time with installation and configuration duties. So I chose Ubuntu, and it all installed just fine, until it came time to install Ruby and Rails afterwards. With Ubuntu, installing Ruby is just as easy as doing this:

sudo apt-get install ruby

Ubuntu did its magic, even though I didn’t have a good feeling when I saw it was installing version 1.8.4 (Ruby is now at 1.8.5). Oh well, I thought. It was just a minor revision, no big deal. I then went on to install RubyGems, and it installed okay, until I started getting some warnings. Since it finished the installation, I just kept on going. When it came time to install Rails, This time one of the gems didn’t install (I believe is was Action Web Service). I had installed Rails in other distributions without warnings, even on Windows. Since I had a couple of spare minutes at night, I decided to go the long route, and install everything from scratch, and make sure it’s up-to-date.

I’ll skip the entire process, as I’ll probably cover it in another, more formal, post. But I grabbed the source code of Ruby and after uninstalling all the mess the Ubuntu binaries caused, I compiled everything and I had absolutely no errors at all! I was even able to install the Mongrel gem without any problems.

So, that taught me a lesson as far as relying on pre-compiled binaries goes. Besides the obvious reasons why you should try to compile your own software (if the code is available), such as optimizing the compiled binary for your system and making sure you have the latest versions, you can avoid problems from the beginning, even if package managers such as Ubuntu’s apt are supposed to help you there. Also, it brought back that sense of accomplishment I used to previously have. So from now on, as long as time and skill allows me, I’ll be compiling my own code.

Time to pay a visit to the Linux Kernel Archives. Long time I haven’t been there.