Archive for the ‘Linux’ Category

Diving Back To Linux

Posted on June 19th, 2012 in Linux, Mac, Open Source, Programming | No Comments »

The current laptop I use for work is a Macbook Pro I bought back in 2009. To be honest, I bought this laptop because I was insanely jealous of TextMate. Also, this was a period when it seemed all the cool Rubyists were developing on the Mac, and I sort of felt like I had to keep up with everyone else. But I haven’t regretted my purchase at all. I’ve never had a single problem with this laptop in the 3+ years I’ve owned it. As its age has been showing, I’ve tried to keep it running as smoothly as possible with a myriad of upgrades, from an SSD drive to adding the maximum of 8 GB of RAM, and even an additional hard drive with the excellent OptiBay drive kit. However, there’s just so much that I can do, and I think I’ve maxed out all the power I can out of this laptop.

I’ve been thinking for a while about getting a new Macbook Pro, and with last week’s announcement of a new lineup, including the sexy Macbook Pro with Retina display, I’ve been dangerously close to heading to the nearest Apple Store (and thanks to living in the Bay Area, I have about a billion stores in less than a 30-minute drive in any direction) and just blindly giving my credit card to whoever has a blue shirt. However, a recent purchase I made about a month ago has made me reconsider this option.

For a while now, I had the urge to tinker with Linux as a desktop again and had been looking for a low-cost way to do so. Fry’s Electronics had a sale on a cheap laptop last month – an Acer Aspire laptop for about $270 plus tax, so I decided to spring for it. As evidenced by the price, it’s a current low-end system (Dual-Core Pentium B940, 4 GB of RAM, slow 500 GB hard drive). For the time being, I also purchased 8 gigs of memory for $30, so it turned out to be a cheap investment in technology.

The last time I tinkered with Linux as a desktop system was when Ubuntu unveiled its Unity interface, and I didn’t have a good experience with it back then, particularly since I was testing it on an underpowered PC. Since the laptop I purchased was a low-end one, I decided to skip Ubuntu entirely and try something different. I almost decided on Linux Mint, since it’s already based on Ubuntu and Debian, which is what I was most comfortable with. But lately, I had been hearing quite a bit of fanfare about Arch Linux.

Arch Linux is touted as being one of the more flexible Linux distros out there. The secret of its flexibility is due to keeping everything very simple – installation only includes a minimal working system (essentially just the shell), giving you the choice to install whatever you’d like. The caveat is that this distribution is not for beginners. You’re expected to know a bit about Linux and the command line, and especially not be afraid of tinkering around with files in the /etc directory. Having very fond memories of playing around with Slackware back in my college days, I thought it would be fun to try it out.

After installing Arch Linux to my laptop, I was greeted with a command line prompt and not much else. I had no idea what to do next. Thankfully, there’s a rather large and active community for Arch Linux, and the wiki is full of useful information, especially for newbies to the Arch Linux world, like myself. After getting familiar with Pacman, the Arch Linux package manager, I was well on my way to getting my desktop environment installed. While I did stumble a bit along the way, especially with my wireless connection (which has always been one of the main issues with most Linux distributions anyway), I was able to get a shiny new Gnome 3.4 desktop set up. With very little tweaking all my hardware seemed to be up and running. I think it was a relatively smooth process to what I expected, since I read a lot of warnings about needing to spend some time tinkering around to get things right.

It’s been a few weeks since I’ve been using Linux as my after-work hacking environment. While it takes some time getting used to the new desktop environment, and I’m sort of missing some of the polish and small things from Mac OS X that I apparently take for granted, I’m liking the Linux setup a lot for my development work. Since I do mostly Ruby and Javascript work, this system handles it all perfectly. I honestly don’t think that I would miss the Mac development environment much if I had a full-time Linux machine. That’s what I think I’m going to do for my next laptop. Instead of spending at least $1500 on a Mac with decent specs, I’m sure I’d be able to get a high-end work laptop for about $1000, install Linux on it, and be perfectly happy with it. It’s good to be back where I was so many years ago.

Fail Notifier – Get Real-Time Notifications When Stuff Fails

Posted on October 27th, 2010 in Announcements, Linux, Open Source, Programming, Ruby, Services | 1 Comment »

Last week, I was doing some routine maintenance on my VPS (which I should definitely do more often, as well as writing some more blog posts) and I noticed that one of my cron jobs that backed up some files to Tarsnap was incorrect and silently failing. Now, I could modify this simple Bash script to shoot off an email to me whenever something happens. But I was feeling a bit creative and didn’t want to just write a few lines of Bash and be done with it.

As any software engineer is prone to do, I wanted to build something a bit more cool. That’s when I figured out that this would be the perfect chance to finally do something useful with Notifo. Notifo is an awesome service that provides real-time notifications to a number of devices, in particular to iPhones (although their list of supported devices seems to be rapidly expanding). I’ve been using Notifo just for setting up simple timed reminders and to get notified of replies and mentions from Twitter using push.ly. Getting notifications in real-time of failures would be something great to have.

Using Ruby,, Sinatra and the Notifo gem, I quickly whipped up a small app called Fail Notifier. Basically it’s a service where any application / server can make a simple HTTP POST to where Fail Notifier is running, and it will relay the message to the user in real-time using Notifo. Simple, but very useful. The best thing is that you can use it anywhere to notify you about anything from any app, programming language, server, or anything else that can make a simple HTTP request. For example, I have Fail Notifier installed on my VPS (nginx and the recently-released cURL about some failures, and I also have some notifications for very important background tasks in a Rails app.

Of course, Fail Notifier is entirely open-source for you to do with it as you please. Feel free to fork the code on Github and hack away to your hearts content.

Bye, Slicehost – Hello, Linode

Posted on July 26th, 2010 in Linux, Open Source, Opinion, Ruby, Ruby On Rails, Services | 1 Comment »

It’s been a few months since my last post around these parts. I’ve mostly been keeping busy with fitting into the whole West Coast lifestyle and, of course, busy at the job. Although I do miss New York City from time to time, particularly while watching older episodes of How I Met Your Mother, I’ve really enjoyed my time in the Bay Area. People here are interesting, and tech is such a huge part of the culture. It’s been a fun ride.

This post, however, is not about the adventures of a Puerto Rican being thousands of miles from home (although it could certainly make for an interesting story for another day). This post is about me pulling the trigger on something I’ve wanted to do for a long time – switch my VPS (which is where this very blog is running) from Slicehost to Linode.

To begin, I wanted to state that Slicehost is very, very awesome. I’ve been a customer of theirs for more than two years, and never had any major issues with them. With the exception of some outages, their service ran smoothly for the most part. This is more than anyone can ask for. So, if Slicehost is so awesome, why didn’t I marry them? I was perfectly content in staying with them.

However, as I was experimenting more and more with Ruby, Rails, Python and other languages / frameworks, my VPS – which was the smallest slice available at 256 MB – was obviously starting to suffer under the memory constraints. Since these were mostly experiments, I didn’t want to splurge and pay almost double for a 512 MB slice. That’s when Linode announced that they would be increasing the RAM sizes of all their slices. So it was either to stay with Slicehost and have my VPS struggle to keep up with my experiments (or pay more per month), or switch VPS providers. After reading all around the Internet about how good Linode was, I decided to go for it.

I opened an account with Linode and instantly had my sparkling new VPS running. I transferred all my files from the old Slicehost VPS and just had to point my domain names to the new Linode VPS. My main concern initially was that Slicehost had really spoiled me with their control panel, especially for DNS management. It was what had initially drawn me into their service to begin with, so leaving that behind was a bit scary. Thankfully, Linode has their own control panel that’s equally great to use. I was able to configure and point my domain names to the Linode VPS, and had everything working quickly.

As far as performance, I had been reading for years how Linode has faster I/O performance than Slicehost. Turns out that those tests seem to be true – The VPS as a whole feels much snappier, from logging in via SSH to serving up this very blog.

One of the major issues people had against Linode in the past was that they lacked any integrated backup system, a la Slicehost. They actually introduced backups a few months ago. This wasn’t a major concern for me (I’m using Tarsnap, which deserves a blog post of its own), but for those who need this sort of service, know that they have you covered.

Like I mentioned, Slicehost is great, and I wouldn’t encourage people to not use their services. I just had different needs that Linode seems to be handling as well as I expected. It’s only been a couple of days, but I think I’ll be shutting down my Slicehost VPS for good.

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 | 2 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