New Website for Merb

It drives me nuts when people can’t tell the difference between Ruby and Rails. Rails is a framework and it’s not the only framework available for the Rubyists. One framework I really like is Merb, created Ezra Zygmuntowicz. It’s basically Mongrel and ERB. You can find out more information at http://www.merbivore.com.

The new website looks really good and it appears that tutorials are coming. I’ve been looking at the API documentation for some time now and I really like what I’m seeing. Merb performs whole lot faster than Rails since well, it doesn’t have as many features as Rails.

Check out the new website and while you’re at it, check out Camping as well. Just looking at the code should be fun.

Installing MySQL (+gem) On Leopard

Here’s how I installed MySQL. Just make sure you have the developer package installed on your Mac.

Step 1 - Source Code

  • Download the source from here.
  • Extract the source code to whatever directory you designate. In my case, it’s ~/Source/mysql-5.0.45/

Step 2 - Configure/make/make install

Go to the source directory and run following commands in sequence.

./configure --prefix=/usr/local/mysql --with-mysqld-user=_mysql
make
sudo make install (will prompt for password)

Step 3 - Post Installation

These are the standard post-installation setups where I’m just setting the permissions to use _mysql account on Mac OS X. Another thing, please add /usr/local/mysql/bin to $PATH so that you don’t have to type the path out each time.

Go to the source directory and run following commands in sequence.

sudo chgrp -R _mysql /usr/local/mysql
sudo chown -R _mysql /usr/local/mysql/var
sudo /usr/local/mysql/bin/mysql_install_db

At this point everything is ready, you’ll just have to start the server manually by

sudo mysqld_safe &

but you can have it start automatically at the startup using MySQLCOM script (ok, it’s a wrapper, but you get the drill). I don’t want to get into details here, but just let me know if you want me to cover this.

Step 4 - MySQL Gem

Just as my previous posting, just run

sudo env ARCHFLAGS=”-arch i386″ gem install mysql — –with-mysql-config=/usr/local/mysql/bin/mysql_config

That’s it!

Adobe CS3 Upgrade

I just can’t imagine not using Adobe Photoshop or Illustrator, even as a developer. It used to be that we’d write the code and have the designers do whatever they need to do. This is no longer the case. Even the component developers must think about the user interface and at times do small graphics manipulations.

Having spent more than $1300 for Adobe Creative Suite 2, I almost died when I found out that I’d have to spend extra $500 for upgrading it to run on my MacBook Pro. I know that the previous version runs on Intel Macs, but really, even a casual user like myself could not deal with the speed.

I thought I can live limiting the use of Illustrator (fantastic for wireframing btw) and Photoshop to my PowerMac G5, but it’s getting to a point where I’m finding myself constantly inconvenienced by the lack of these software on my MacBook Pro. I will probably upgrade sometime next week, but it really really hurts.

I’m really curious how many Rails developers are living without Adobe apps.

Reviewing Refactored Code

I review C# code at work (ok, feel bad for me now) and I have to say, refactored codes ARE NOT easier to read in a big application! To analyze one method, I had to open nearly 20 different files, and the by the time I got to the final code, I completely forgot what I was looking for. Granted, I’m dumber than the most people reading this blog, it’s rather ridiculous to go through so many different files.

Don’t get me wrong, going through a pile of spaghetti code isn’t any better, but I’m somewhat irritated by those insisting that refactoring the code makes it far easier to read. It’s not always the case.

What makes the code easy to read involves several factors. From my experiences, they are 1) strictly implemented coding standard, 2) sticking to chosen design pattern, and 3) functional specification (DHH will disagree with me since he believes that functional specification is a waste of time).

« Previous Page