Archive for February, 2007

Too bad it can’t all be Rails

Posted on February 22nd, 2007 in Ruby On Rails, Software | No Comments »

I finally finished the minor remodeling of my personal page, as I transferred the old, plain HTML files to Ruby on Rails. It didn’t take too long, since the site is all static (for the time being). Just in case you’re wondering, I moved everything to Rails mostly because I was tired of having to make a change to a menu, and I had to change every single HTML file. Not anymore. Although this apparently is the only benefit I’ve gained, I’m planning on adding many more things in the future (using Rails, of course).

Anyway, I was explaining what I was doing to the website to a co-worker. Although he doesn’t understand much about programming, he did seem to understand the whole Rails thing. So he asked me if the blog was also made with Rails. I told him no, it was using WordPress, which runs on PHP. SO his next question was a natural one: Why don’t you use a Rails blog?

I’m sure some people who visit this site will ask the same thing. I have a couple of answers to this. I had tried to use Typo previously on this site, but rapidly removed it and started using WordPress. First off, the web hosting company I’m using isn’t the fastest or most reliable host around for Rails applications. So Typo felt damn slow, probably due to the amount of memory it needs to run. I know there’s other blogging software built on Rails, but I haven’t had time to review them thouroughly yet, and I don’t seem to think they’re good for what I want.

Besides the slow speed, Typo hasn’t been updated in quite a while. The last update was in August of last year. Now that normally wouldn’t be a problem. But I think that at the very rapid pace Rails is evolving, most Rails developers need to keep up with this pace. Granted, that’s not always possible. But with all the new additions Rails gets with each release, I’m sure Typo and other Rails software could greatly benefit from those changes.

So for the time being, I’ll stick with WordPress. It’s relatively fast and stable, and very easy to manage. Can’t ask for more. Maybe in the future Typo will be updated, or I’ll switch hosting companies and find Typo to be great, or maybe there’s some blogging software out there built on Rails that can solve this minor dilemma for me. For now, it’s too bad all my site can’t be built on Rails.

Brand-Spankin’ New WordPress!

Posted on February 21st, 2007 in Software | No Comments »

A new version of WordPress, the awesome blogging software used to power this very blog (and millions more out there, as well) is out!. It’s actually just a bug-fix release, but it’s still news, isn’t it? This will be a quickie post, just to let you people know how things have gone with this upgrade.

To tell you the truth, I didn’t think it would be so easy upgrading this software. But it’s basically all in one step, if you don’t count backing up your data. This is very important whenever you do a software upgrade. All I did was back up my original WordPress installation folder on the hosting server, and backed up the MySQL database as well. I won’t go into specifics, as I don’t want to make this post too technical. Also, as a precaution, please de-activate all of your currently activated plugins. This is not necessary, but it’s nice to do this, just in case one of your plugins is incompatible with the current version of WordPress, possibly breaking your installation.

Afterwards, I downloaded the new WordPress release, decompressed it, and copied over my old installation directory. Then, all you need to do it go to a special upgrade page in your site (http://your.domain.com/wordpress/wp-admin/upgrade.php, where http://your.domain.com is your domain name (obviously) and http://your.domain.com/wordpress is the main page of your blog. A screen will appear, asking you if you want to go into the upgrade process. Click on the ‘Upgrade’ link, and that’s it! I thought it would be a long, drawn-out process, but it wasn’t. You canj then visit your shiny-new blog! Actually, it’s not that shiny, since it’ll be basically the same. But I’m sure you’ll feel comfortable knowing your blog is running the latest software,, with (hopefully) less bugs and insecurities as before, right?

All of these instructions can be found at the WordPress website. So why did I bother to post this? I guess I wanted to let you all know that this is an easy upgrade, and that I’m up-to-date!

Edit: Seems like a hacker got into the previous WordPress release, and modified some files to allow remote code execution. Just in case, if you have WordPress 2.1.1 installed in your site, there are chances that you have one of these “infected” releases, and should seriously upgrade to WordPress 2.1.2 now.

Can one person do it all?

Posted on February 21st, 2007 in Programming | 1 Comment »

I just read this comic and found it hilariously funny. While this comic depicts a database administrator, this could very well be any single part of the IT chain. Programmers can say they haven’t done a module, architects can say they haven’t designed a spec, even the computer techs can say they don’t have enough resources to fix a computer for any given reason, depending on their mood.

Anyway, the thing with this comic strip was the fact that I remembered the fact that where I work, I’m the only developer. That actually means that I’m the only programmer, the only architect, the only database administrator, the only tester – the only everything. Even the only server administrator here (not too many people apparently know Linux at a server level here in Puerto Rico) And it’s tough, believe me. I’m expected to be able to analyze a module in the programming, create the database schema, code it and test it all by myself. While I’m mostly not too pressed for time, sometimes I’m expected to assume all these roles and do it fast.

At one of my favorite blogs around, Joel On Software, Joel wrote an article about something he calls The Joel Test, which are 12 small steps to program better. I’ll list them out, along with how that currently applies to me:

  • Do you use source control? – Yes, but only because I took the initiative to do it behind my boss’ back, due to him not wanting me to “waste time on that”.
  • Can you make a build in one step? – This really doesn’t apply to me, since we’re only using PHP at the moment.
  • Do you make daily builds? – Same comment as above.
  • Do you have a bug database? – Yes, because I implemented it along with the source control system, thanks to the very excellent Trac software.
  • Do you fix bugs before writing new code? – It depends. Sometimes I’m expected to implement a new feature ASAP before actually fixing something that could affect that new feature directly.
  • Do you have an up-to-date schedule? – Nope. I never will have one. One of the major gripes about my current job is the fact that schedules never last more than a week. They change virtually every time my boss comes up with a new idea.
  • Do you have a spec? – No, unless you count specs as informal conversations, which I have all the time.
  • Do programmers have quiet working conditions? – No, and I can’t seem to stress this to my boss enough. I work exactly in front of his desk, meaning I have to listen to him yap on the phone, or scold other employees during the day.
  • Do you use the best tools money can buy? – Not really, but that’s because I’m a conformist. As long as my work can be done, I’m happy with what I have. Of course, I’d have to answer ‘no’ on this too, because if I ask for a Macbook because it’ll help me work faster, I most likely won’t have it.
  • Do you have testers? – Yes, but only if I can count myself.
  • Do new candidates write code during their interview? – I wasn’t required to code, nor provide samples of my work when I arrived here. And I’ve only had one additional programmer come work here, because the company thinks one programmer is enough, and she didn’t need to code at the interview either.
  • Do you do hallway usability testing? – HA! Sorry, I had to laugh. If I told my boss I had to write some tests to verify the code, even if it’ll save tons of time in the long haul, I’ll probably be at the unemployment line.

Out of twelve, I only have a score of two. Ouch. I don’t like bashing my company, as I think it’s been a wonderful place and my employers have given me this opportunity fresh out of college. But to have such a low score, it’s just sad. I would like to implement a lot of steps here, such as having specs for every program, and the usability testing as well (I’ve been spoiled by Ruby). But I don’t think I’ll be able to work on that, plus do my normal duties by myself.

Seeing that I haven’t worked elsewhere, as far as programming goes, I wonder if there are still places where this exists. I think smaller shops can’t actually employ every single one of these, but I think they’re at least out-sourced or something similar. While I strive to have this sort of pressure on me, it really becomes a burden most of the time. And what that leads to is just complete burn-out. It’s happened to me before, but thanks to a nice week of vacation I took at the most beautiful beach here in Puerto Rico, it didn’t affect me much. But now I’m possibly taking the same route again. Hopefully I’ll be re-energized again. I’m showing signs of it now, due to me trying out new things while completing my job (for example, I’m taking the time to learn AJAX while implementing those features in my current program). So if it continues, I’ll be happy. But I’ll still be wondering if I’m the only one like this out there.

Lots of Rubies around

Posted on February 19th, 2007 in Open Source, Programming, Ruby | No Comments »

I recently came across this blog post, where someone compared various implementations of Ruby, specifically to check the speed of each. When I read this post, I wasn’t surprised at the results. I was totally surprised at how many different Ruby implementations there are. I hadn’t realized how many there were.

Now, my question is, why are there so many different implementations that run Ruby code? I haven’t read about the others, such as Rubinius or Cardinal, so I still don’t know. I would imagine that there’s different needs for each (such as Gardens Point Ruby .NET, as the name suggests). But unless there’s a reason to have all these different ports, I wonder why there are so many.

Why don’t these developers focus on the original Ruby language and strive to make it better, instead of forking off to a different road and possibly confusing new users? Like I said, I haven’t read about these other implementations, so there may be something behind this. I’ll take the afternoon to read about the other implementations, and try to find out why there’s so much interest in making different Ruby implementations instead of focusing on the original.

Is Rails confusing?

Posted on February 18th, 2007 in Programming, Ruby On Rails, Web Development | 1 Comment »

I’ve been learning Rails with great success these past two weeks. I’ve learned so many things during this period, much more than I’ve learned in a similar time frame for other languages / technologies. While there is still much, much more to learn (and memorize), I’m very happy in the time I’m investing in Rails, and don’t mind spending most of my free time reading and coding.

However, something that has happened to me a couple of times is that I get confused with certain things. For example, last week, I was really confused when reading about how forms work in Rails, and how to save and edit records in a database. Basically, it all came down to its simplicity confusing the hell out of me. For example, to save a new user, the only line of code needed in the controller was User.new(params[:user]). After watching this work nicely, I was amazed, but at the same time confused. How did Rails know what to save and in which fields? Where’s the SQL code? After reading a bit more about the form_for and form element helpers, as well as reading the logs, I found out how Rails does this automatically. Really great stuff.

However, some further confusion happened while reading about the form helpers. There were similar tags for the same thing. For example, there’s a form_for helper, as well as a form_tag helper, which create the form in the web page. Same with the elements. The text_field and text_field_tag apparently did the same thing, albeit each had different parameters. So that caused a bit of confusion early on.

So, maybe my mind was just fatigued because of the week I had at work, or I didn’t read my book well, but this caused me to look around to better understand these tags and what each one did, and why two (or more) similar helpers did different things. Thankfully, I’m the type of person who needs to know how things work. I’m never satisfied if I use something and if it works, I never question it. It may be the inner hacker in me.

Be ready for Intype

Posted on February 16th, 2007 in Programming, Ruby On Rails, Software, Web Development | No 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