Happy Holidays

So much for being able to post more to this site since starting my new job. Not that I haven't had a bit more time, well...

I'm not spending as much time on the road, however, I am having more fun and spending more time on projects, or learning new things. I did take some time to correct some of the uglyness that I created in my last template update. The site kinda looked like it belonged back in the mid-90's. I removed the buttons and bright colors that were a staple back then. Although I didn't have any of those animated GIF files on the site, I think it looks better now. Yes, I am using some embedded fonts that may be hard to read but only for the main menu at the top and I really like the way it looks.

I have been working on a project for a colleague of mine, and I was writing an entire website in PHP from scratch to store data and only allow the creator of the data to modify it, and allow who has access to it. I've got the session management and user creation, verification and "forgot password" stuff down. Now I'm a bit stuck on how to allow these "views" based on permissions.

Several times over the last few years Ruby and Ruby on Rails has been put in front of me and my thought has been "bah, I can do it in PHP or PERL, I don't have time to learn a new language." and "besides, I know enough about PHP and PERL to get by". This week I started to take a closer look at what Rail and PHPonTrax which is based on Ruby on Rails have to offer and am starting to get excited. Now, I'm not a "programmer" per se, just a hard-core geek who likes to twiddle with things and a bit of a visual artist. (Photography, Drawing, Painting, Web/Graphic design, etc.)

It looks like these tools will allow me to get up and running faster and work on making it look good. In order to learn RoR, I'm going to do something very similar to what I did when I started to learn PERL. When I started to learn PERL, I was given a couple of Books, such as the Camel book, and Ram book (for those of you who don't know what I'm talking about that's "Programming Perl" {Camel} and "The Perl Cookbook" {Ram}). I never actually read these books cover to cover, but I found them very useful and still use them 12 years later. What I did was I took some existing scripts that I had written in BASH and re-wrote and extended them in PERL.

In order to learn RoR I'm going to effectively do the same thing. This time, I'm going to start with my website Inn.ocuo.us which is my version of TinyURL / Bit.Ly, etc. I wrote Innocuous using PHP and Mysql entirely. It does not currently use RESTful creation and retrieval (well, retrieval it sort of does).

Anyway, I figure this will be a good place to start since the site is fully operational and all the functionality that I am currently looking for is effectively built into Rails.

The logic is simple:

  • Shrink:
    • User submits a URL to be shorted
    • Application stores URL in Database and returns the row ID as a base62 string appended to the URL domain.
  • Expand
    • User requests base62 string as a Uniform resource identifier
    • Application converts that to base10 integer, selects that row from the database and provides the long version to the user.

Now, I have some other functionality already built into that application which I will be bringing over, and I will be adding some additional functionality that I have already started playing with such as a bookmarklet (a piece of Javascript code that is placed in your bookmarks or favorites). User and link based statistics, some of which already exist.

Yes, there are hundreds of URL shorteners out there, so why right my own. Originally, so that could prove to myself that I could do it and because I'm a hard-core geek who likes to twiddle. Now I'm going to re-write it so I can add some functionality to it, learn RoR and again because I can and I'm a hard-core geek who likes to learn things and figure out how things work.