Skip to content

{ Author Archives }

Ruby ‘here document’

Ruby has a cool feature that allows you to embed a document inside your source code.  This is known as a ‘here document’.  The traditional way of defining a string is to assign a variable as follows: def myfunc mystring = “Here’s a great quote: \n\n\”We hold these truths to be self-evident, that all men [...]

Compiling wxruby on Snow Leopard

I am trying to compile wxruby on Snow Leopard.  I am running into issues because wxwidgets 2.8 which wxruby 2.0.1 is based upon only compiles in 32bit mode.  I can compile wxwidgets 2.8.11 using 32 bit mode.  When I try to compile wxruby, I get errors.  I’m not quite sure what I need to do [...]

Ruby on Rails Nested Resources, Namespaces, and RESTful

I am working on a website where I have an admin section to add data and public read only sections.  I like to have a clean hierarchy of URLs.  I first implemented it using the standard generator code.  I had a /restaurants and a /locations url for both.  Locations doesn’t make sense as a top [...]

Install MySql5 on Snow Leopard using MacPorts

Install MacPorts before you do anything. Install MySQL5 sudo port install mysql5 sudo port install mysql5-server  sudo -u mysql mysql_install_db5 Secure MySQL5 To secure your MySQL5 installation, you can either change the password manually like so: /opt/local/lib/mysql5/bin/mysqladmin -u root password {new-password} or on a production system, you can run the secure script and not only [...]

Install Ruby on Rails for Mac Snow Leopard using MacPorts

Not sure why but I had a heck of a time running my ruby on rails code after updating my Mac to Snow Leopard. I use MacPorts to do my development so I simply removed it and all of my ports as well as the gem I had installed in my home folder.  I went [...]

Blackberry preferred development platform is Windows

Well, I am in the middle of learning to write my first blackberry application. Since Blackberry uses the Java platform so heavily, I was excited to be able to develop natively on the Mac. Apparently there is no easy way to actually do this. I am used to using Eclipse for my java development so [...]

Do certain languages attract bad developers?

Why is it that every time I come in to fix a VB project, the code is awful?  This current one is probably the worst.  It is sloppy.  It is riddled with security vulnerabilities.  it is filled with files named “checkout.aspx”, “checkout2.aspx”, etc.  No source control.  No dev or staging enviornment.  They were using the [...]

Login failed after restoring database on SQL Server 2008

After restoring a production database backup on SQL Server 2008, to my development machine, I got a “Login failed for user xyz”. The database user was not associated with a user and was marked as “Without login”. This happens when you do not have a login for the database user.  You can create that user [...]

parsing xml using C++ on iPhone

I am trying to import an X3d file into my iPhone application. I could use the NSXMLParser to do this, but I want to write as much of the application logic in C++ as possible. The reason I want to do this is that I would like to be able to port this application to [...]

Installing scripts in blender on MacOSX

Needed to edit a script for Blender to figure out why I can’t get it to export textures in the x3d format.  All the help on the web say to look for it in .blender/scripts but I couldn’t find such a folder on my machine.  It wasn’t in my home directory and it wasn’t in [...]