High Level Low Level Compilation

I have been staring at Ruby for so long that I have become disgusted with low level languages like C or C++. Mid level languages like Java still make me cringe when I look at them. As I sit and write code in Ruby that runs on a terribly slow VM I begin to think. Why don’t high level languages like Ruby or Python compile into assembly level code like C does when it is compiled? ...

August 8, 2012

Exceptional Rails Handling

When I am writing a Rails application it starts out simple with a few if @something.save lines that are pretty self explanatory. Then the application grows and starts to become hairy. Take my contrived example with a grain of salt as I can’t show you production code that I am using. # app/controllers/widgets_controller.rb class WidgetsController < ApplicationController # # Other methods go here # def something # Maybe we handle the update in a special way widget = Widget.find(params[:id]) widget.some_method(params[:widget]) # for the sake of simplicity let's change the owner foobar = widget.foobar foobar.owner = current_user respond_to do |format| if widget.save if foobar.save format.html { redirect_to widgets_path, :notice => 'Huzzah!' } else widget.some_special_rollback format.html { redirect_to widgets_path, :notice => "You're a moron" } end else format.html { redirect_to widgets_path, :notice => "Not even close"} end end end end What did we learn here? Terribly contrived examples can prove anything, No! Though I liked how easy it was to come up with it but that is not why I wrote the code above. I have seen applications get to that point and when I see it now I start to shake my fist violently at the computer and wonder just what in the world were they thinking. ...

March 25, 2012

New Job

Well I transitioned out from my previous job working for Enfocus Solutions to working for ZippyKid. I love my new job and I am super excited to work with a cool team of developers. I haven’t worked with PHP in over a year and it’s interesting coming back to it from working with Ruby and Java for a while. PHP makes me angry but also makes me happy. After playing with PHP again I started to love some of the old features like die, vardump, and print_r. ...

March 1, 2012

Effective Programming

I’ve been programming for the last 6 years and I have a bunch of programming languages under my belt. But just because I know other languages doesn’t make me a desireable programmer. Any decent programmer can pick up a new language within a few weeks and pick up the new programming paradigms after. What makes me desireable is how effective I am when I program. You need to be effective else you risk being left behind ...

January 14, 2012