* You are viewing Posts Tagged ‘Ruby’

Tried out Shoes

I got bored tonight and wanted to write a little script to calculate the amount of time left in my propane tank. Instead of just doing it in Ruby (or Numbers, for that matter), I figured I’d play with Shoes a little. Then I got bored, and really just spat it out and am done with it.

Anyways, for those curious or who want to calculate the time left in their propane tank, here’s the code:

PROPANE_GALLON_WEIGHT = 4.23
BTUS_PER_GALLON = 91_690

Shoes.app do
stack do
para “Let’s figure out how much time you have left in your … Continue Reading

Ruby: drop the superiority complex, give us a damn final keyword

Sorry. I know that headline is a little inflammatory, but after reading comments about legitimate complaints against Ruby, it’s needed. Don’t get me wrong - I love Ruby. It’s a huge step up compared to Java, C++, or VB/C#.NET when it comes to expressions. What’s 20 painful lines in J++# is 2 in Ruby, and much easier to read. But it’s time to realize that it’s a language - not a religion. It has bad things about it. 

If you’re coming in for an interview, and somehow come across my name (I don’t name companies on my blog), then here’s a heads … Continue Reading

Transposing Banner

I’ve lived on unix shells for a decent amount of time (I’d say about 1/4 my life, at this point, or 6 years, for those counting), and have occasionally been bored and started playing with the banner program. It’s pretty simple. You type “banner hello” and it gives you a big printout of the word “hello.” The problem is that it’s vertically aligned, so it looks like this:

Well, this kind of sucks for trying to make fun of people. So I’ve always wanted to fix it to where it puts out horizontal text, but have been too lazy, until today when I had some time at Lone Star Ruby Conf. Got a way to solve it? Click in to see my leet solution.
Continue Reading

So, Ruby, you’re kinda plain…

I work almost all day, every day in knee deep Ruby nowadays. It’s actually fantastic, because it’s made so many aspects of my job trivial. Rearranging, shuffling, sorting through collections is a snap. Coding is kinda fun, just because I can knock out stuff so quickly.

It’s similar to my Mac as far as coolness and usability goes. When I converted over to using Apple stuff full time, I lost a lot of interest in hardware and how drivers and crap worked. My computer just works now. I don’t know why your printer doesn’t work, but I can tell you that … Continue Reading