Archive for the ‘Ruby On Rails’ Category

Be ready for Intype

Posted on February 16th, 2007 in Programming, Ruby On Rails, Software, Web Development | Comments

Last year, after a friend of mine lent me here Macbook for a week (I want one for myself so bad!), I discovered the most amazing programming software I had ever found, called TextMate. I’m sure many of you have heard about this program. In fact, if you have watched any of the Ruby On Rails screencasts, you know what software I’m talking about. I think it strikes a balance between simplicity and power that’s rarely seen, and that I never even thought was possible. I tell you, once you get used to their snippets function, you’ll never want to try another IDE again.

So I went off, searching for a nice alternative for Windows that would work similarly. Shockingly enough, there wasn’t any program out there that was even similar to TextMate. I thought that was pretty weird. But after doing enough searching, I found a place where some people were making a program for Windows that would basically be a TextMate-like clone for Windows. Unfortunately, the program was only in its initial phase, with no alpha released yet. Sadly, I thought this program would just die out like many other software projects I’ve seen before, never to see the light of day.

But early this year, I received an E-Mail, stating that the very first Alpha release was available for download! Giddy, I went to their site, and lo-and-behold, there it was. I would finally get to use the program known as Intype. I rarely get excited for a software release, but this was an exception.

So I tried out the program, and it worked fine. Of course, as all alpha software, it had its fair share of bugs, and most of the functionality found in other text editors was missing (more noticeably, an Undo / Redo function). Still, it showed lots of promise, and many other people in their forums shared the same excitement as I did.

After a couple of more releases, there is finally a very usable Alpha version - one with an Undo function - available right now. I’ve been using it while I’m learning Rails, and it’s helped greatly, in terms of writing code much faster. I won’t dive into specifics, as there are already a couple of reviews out there in the wild. Even though it’s an Alpha release, it’s coming along really nicely. If the project continues forward, and all the proposed features are added, this will truly be a blessing for the developers - like myself - that are stuck at work with a Windows environment.

Intype

If you have a chance, download the most recent version and give it a spin. Besides helping with bug reports, you’ll probably be pleasantly surprised at the current state of the project, and you’ll certainly be excited as to where it’s headed. Be ready.

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.

Love those Pragmatic guys

Posted on February 13th, 2007 in Programming, Ruby On Rails | Comments

I’ve fallen completely in love with The Pragmatic Programmers.

Well, not literally in love with them. But I’ve really turned into a complete fan of their work in very little time. Obviously, my first foray with their work was the first edition of their awesome Ruby On Rails book, Agile Web Development with Rails, as I mentioned in a previous post. I didn’t get much time to read that book, but I did take time a couple of weeks ago and purchased the second edition. And let me tell you, there hasn’t been a programming book that I’ve understood so quickly, nor have I’ve immersed myself in so deeply.

The laid-back tone Dave Thomas uses in the book makes for easy reading and comprehension. Also, the method the authors choose to help the reader learn, which is explain things while actually building a fully-functional application, is simply great. I have so many programming books at home that I never got around to reading, due to the seemingly forced way they try to shove information about classes, methods and other nuances. This is quite the contrary. I’ve learn so much about Rails this past week, that I’m just about finishing a personal project I was building for quite a while in PHP. And that’s just in a week.

Anyway, the reason why I say I’m in love with these guys is because their books are simply the best. Before picking up the second edition of the Rails book, I picked up the good ol’ Pickaxe book (Programming Ruby), it has the same concept of teaching you the Ruby language. I was hesitant to buy this book due to its sheer size. But really, it teaches a lot without overwhelming the reader. It’s also helped me along in my Ruby learnings.

After seeing that these two books were great and that I was actually learning a lot in such a short time, I went on ahead and bought another Pragmatic book this weekend: Pragmatic Version Control: Using Subversion. I set up a Subversion server at my job, but only used it simply for having a log with the source code changes. I didn’t use it for anything else. After reading this book (I’m almost done after three days!), I now know that Subversion can do so much more. I was totally ignorant to things like branching, tagging and merging, and now that I have this knowledge I’m sure I’ll be using it every week.

After these three books, I know I’ll be buying many more from them. After I learn a bit more about Rails, I’m definitely going to buy the Rails Recipes book. Also, since I manage the servers at work, I’m thinking of getting the newly released book, Everyday Scripting With Ruby. And if I ever get a Macbook, I’ll surely buy their Textmate book.

So really, if you haven’t checked The Pragmatic Programmers or their books out, you really should. They’re the most easy to read and understand books available on programming topics. I guarantee you that you won’t regret shelling out the cash.

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.

Ruby makes me want to rock out

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

During these past few weeks, I’ve been making a conscious effort to learn a couple of new programming languages, more specifically Ruby. As many people on the Internet, I was introduced to the beauty of the Ruby language when Ruby on Rails started to become popular around version 0.14. After reading a lot of Internet beginner tutorials, I decided to take the plunge and start learning Ruby now.

After grabbing the Programming Ruby book (lovingly known as ‘Pickaxe’ around Ruby circles), I have really fallen in love with this programming language. It’s not too difficult to learn, and you can produce really clean, readable and over-all beautiful code. I even feel Ruby has helped me become a better programmer, in the sense that I am striving to have all my code as clean and readable as possible. Being a full-time PHP programmer, you can imagine that clean and readable code isn’t my strong suit. After learning a bit more about Ruby, I’ll go ahead and dedicate myself to start learning Rails. I know I can start using Rails without vast Ruby knowledge, but I want to start with the basics, and I feel that’ll make me better at learning Rails.

However, the reason I’m writing this post today is because of an age-old question I’ve had ever since I started taking my programming courses in college. A lot of people question my choice of music while programming. This has popped up in some conversations because I love Rock music, especially anything that’s Punk Rock or Metal. The harder and faster it is, the better. So in a profession where I need to have absolute concentration to produce the best results possible, how can it be that I can concentrate more with some Bad Religion or Bullet For My Valentine on my MP3 player? It’s really weird.

At my current job, I tend to put some Rock music when no one’s around (just because I’m considerate of others). When I do, I notice I don’t move from my seat, and just start coding away. When I don’t have any music on, I tend to be distracted more easily, and go out for frequent bathroom breaks or just to chat with other co-workers. I wish my current employers could notice this and let me bring my own MP3 player to work and just leave me alone for long periods of time. I can guarantee that I can work much better and efficiently this way. But that seems like wishful thinking for now.

This past week, I think I’ve learned a whole lot with Ruby, partly because I’ve taken more time out of my schedule to sit down and practice hands-on. But it could also be because I just bought a couple of more CD’s for the collection, and I tend to listen to my CD’s completely when I code, instead of just having them in my car and listening to one or two songs before I move on to the next. I should do a formal study of this some day. Has anyone else in the world noticed this?