Archive for March 15th, 2009

Highlights of the day

Sunday, March 15th, 2009

Well… Highlights might be a bit hifalutin.

- Finished Command & Conquer, Red Alert 3.  I know it doesn’t seem like much but it does feel good to actually FINISH one of these games once in a while, instead of just seeing something else shiny and dropping ‘em.  Plus the C&C games are all just top notch.  I still think Generals: Zero Hour is my favorite.  Dunno what happened to those CDs.  Downloaded  C&C RA3 sequel which came out this week some time (via Direct2Drive.  Digital download distribution FTW!)

- Hot Dog and French Fry Pizza.  Really.  Really horrible. No no, it’s so very much worse than you can imagine. No.  Worse than that.  They should sell t-shirts that say “I ate this crap and lived…sorta.”

- Discovered a new, really bad pizza place (see above.) Crust was too soggy, sauce was watery, cheese was bad, undercooked yet burned on the bottom.  FAIL. FAIL. FAIL. FAIL.

 

Reflexive Ruby Reaction

Sunday, March 15th, 2009

Ya know, I keep hearing all about how wonderful Ruby is and every once in a while I think about picking it up. But then I come across something like this and I come to my senses:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  def download
    dl_opts = params[:dl].nil? ?   attachment : inline
    dl_img  = params[:type].nil? ? "" : "_#{params[:type]}"
    dl_file = FileUpload.find_by_item_id(params[:id])
    unless dl_file.nil?
      dl_file_type   = dl_file.mime_type
      dl_file_ext    = dl_file_type.item.self_title
      dl_file_name   = "#{dl_file.original_name}#{dl_img}.#{dl_file_ext}"
      dl_file_path   = "#{RAILS_ROOT}/public/upload/#{dl_file.id}/"
      dl_file_title  = dl_file.item.self_title
      dl_public_name = dl_file_title == dl_file_name ? dl_file_name :
                                                       "#{dl_file_title}#{dl_img}.#{dl_file_ext}"
      send_file("#{dl_file_path}#{dl_file_name}",
                :disposition => dl_opts,
                :encoding    => utf8,
                :type        => dl_file_type.content_type,
                :filename    => URI.encode(dl_public_name))
    end
  end

Small_logo

Ruby makes Perl look like English. Come on. That’s not software. That’s what happens when you throw a cat at your keyboard.

Sure, maybe getting a snippet from “RefactorMyCode” is salting the dig a bit but good god.

FAIL