After a month of searching, I finally found a method to install Ruby MySQL bindings on Leopard!
$ ARCHFLAGS="-arch i386"<br/>$ ruby extconf.rb --with-mysql-dir=/usr/local/mysql<br/>$ make<br/>$ sudo make installTaken from: Macosforge.org
After a month of searching, I finally found a method to install Ruby MySQL bindings on Leopard!
$ ARCHFLAGS="-arch i386"<br/>$ ruby extconf.rb --with-mysql-dir=/usr/local/mysql<br/>$ make<br/>$ sudo make installTaken from: Macosforge.org
Mushroomhead – 2nd Thoughts (Live)This was basically my life from 1997 until 2000. Every weekend in this pit. I miss those days sometimes…
I just returned from Vegas last week. Why do I think I already need another vacation? Oh yeah, developing two projects in Ruby on Rails simulaneously as well as overseeing an IT department. Well, that and the 81 hours last week. Or the fact that there are no bonuses this year. Perhaps it’s that my assistant called off today? Ah, it’s because our Sharp MFC is officially dead and the repairman who nearly lives here ran out the door when I wasn’t looking. I bet it’s the Sharp’s lease rep that won’t return my calls. Perhaps. Oh I know. It’s definitely the fact that our backup fax machine is out of toner as well. Wait. Wait. No, it’s definitely the fact that I’m not ‘technically’ IT anymore, but questions and requests still come in at the same rate as when I was, but now they’re prefaced with “I know you’re not IT anymore, but…”. Nope. It’s most likely our main plotter locking up every third print.
People wonder why I drink.
Now that grad school is over with, I’ve already felt the need to find a new challenge to tackle. As you might guess, I get bored very quickly. I’ve chosen to learn Ruby and Rails. I’ve attempted to tackle this challenge in the past but I’ve always ended up frustrated enough to quit. To celebrate the release of Rails 2.0, I figured I would try once again.
I’ve been working with Ruby and Rails 2.0 for the last two days, and I am already a convert. I’ve ported the existing development of my company’s Intranet application from PHP / CakePHP to Ruby / Rails in less than one day. That one day was the first day I worked with RoR, if that tells you anything.
There is currently a holy war surrounding PHP / CakePHP and Ruby on Rails. Having used PHP for eight years and CakePHP for one year I was basically in a mental bind. PHP is great and definitely does the job at hand, but at times it shows its hacked-together nature. One of the main differences between PHP and Ruby is that Ruby is truly an object oriented programming language while PHP is a scripting language. What does this mean? Basically, Ruby handles dealing with logical code elements in a much more refined, repeatable, and logical way.
For example, in CakePHP, an Object (say ‘User’) only lasts as long as it takes for the framework to conjure it from the database. From then on, you’re dealing with an elaborate array of specific information:
// Load User from the database
$user = $this->User->findById(121);// Set User's last login time
$user['User']['last_login'] = date('Y-m-d g:i:s');// Save User back to the database
$this->User->save($user);
Which language looks more friendly and logical to you? Exactly.
- Load User from the database
user = User.find 121- Set User's last login time user.last_login = Time.now
- Save User back to the database user.save
CakePHP is a godsend to the PHP community, and anyone stuck on/with PHP should be using it for every single project they work on. It’s a miracle. That being said, it is a poor clone of Rails in many ways.
Most of CakePHP’s shortcomings are due to PHP itself. PHP is not object oriented, so the CakePHP developers are coding with their hands tied from the start. Another major detraction from the framework is the severe lack of documentation. CakePHP 1.1 (the recommended stable version) does have a fair amount of documentation and an API available, but the latest and greatest version 1.2 does not have any official ‘manual’.
To be fair, most of 1.1’s documentation can be extrapolated to 1.2; however the features that make 1.2 desirable are scarcely documented. Developers close to the project post blogs that are helpful but this is far from a ideal situation. And yes, I do understand that 1.2 is in heavy development. This point is also won by RoR for its wonderful built-in documentation system that makes generating documentation effortless.
RoR is more mature feeling with a robust set of tools and documentation. Ruby itself is amazingly powerful and has a huge plugin library available. Rails has built-in support for the Prototype and script.aculo.us libraries so designing towards ‘Web 2.0’ standards is a cinch. After failing many times to do anything meaningful with Ajax in CakePHP I have already created a CRUD UI for an important Object in my Intranet application. Keep in mind, again, that I started with RoR yesterday and more specifically with Ajax this morning.
There are many more points in which RoR beats Cake/PHP; a few that spring to my mind:
1. Unit testing is built-in (no external libraries are needed)
2. Creating a new application is as easy as running ‘rails project_name’
3. Built-in web server
4. Much more robust debugging and query tracing (great for finding bottlenecks!)
5. Plugin installation is a breeze
The bottom line? If you’re stuck with PHP for you projects, use CakePHP. It’s a miracle for PHP. If you are not stuck with PHP, give Ruby on Rails a whirl. It makes coding fun again and you’ll be amazed on how quickly you’ll pick it up. I’ll be using it for all of my upcoming projects.
I think I’m in love. I will remember 2007 as the year that I dumped Windows and PHP and set myself free. I tend to ignore fanboys, but switching to Mac and Ruby on Rails has made my job exponentially easier and my day much brighter. I’m blissed out.
Going down to the lobby area of the Golden Nugget for a late night (11pm) snack. First in-house restuarant only does take out if you sit down and wait. Tables were at least ten minutes. Fuck that. We go to one of the main bars and wait to order something. Some drunk cunt spills an entire beer all over my wife. All apologies don’t pay dry cleaning. So we go back upstairs upset. I’m so fucking ready to leave this shit-fuck hole of a town in my dust. I want to puke all over this place. I’m really pissed.
Well, I’ve been in Vegas since Monday, and well, it’s definitely a town I could only take for a couple days. We stayed at the Golden Nugget in the Downtown (Old Vegas) area. We hit the strip last night, but there was so many damned people that it’s really not too much fun. The fountain show at the Bellagio was pretty damned impressive, as was the Eiffel Tower Experience at Paris. Otherwise? Eh. Too many people. I felt more like a cow at a cattle corral. Too many Mexicans trying to hand me pr0n leaflets. Not that I disapprove, but hey, enough is enough.
The Freemont Experience is actually pretty neat and felt safe. There were a ton of security and police every time I walked through the main drag. Once you get off the main strip you’re pretty much on your own; it gets seedy quick, but that could be interesting in its own right.
The missus hit a nice $400 jackpot the first night on a Monopoly $0.25 machine and I basically drained that back into the Vegas machine. Gotta keep the lights on somehow.
Fun? Vegas is interesting. It’s too much for me in some respects; too little in others. The pure sensory overload of people and lights is overwhelming in areas, but the fact that once you see one casino, you’ve seen them all definitely comes into play. Would I come again? Probably not. It’s been fun, but once is enough. The next trip is Europe!