Tuesday, June 30, 2009

Sandwich Sodomy

It's been a long long while since I've had the motivation to blog publicly about anything. But I went to lunch today at a large sandwich franchise and was fascinated to witness the effects of truly dumb corporate decision-making.

So I shot off a customer complaint on their website:
Seriously guys, WTF.

First, the following comments do not apply specifically to the store I visited but to your company as a whole.

I can understand as a growing company the need to find ways to cut expenses. But this recent change to basic sandwich packaging is utterly myopic and is the dumbest thing I've seen in a month. It's a terrible decision for your store employees and a terrible decision for your customers.

1) The paper sandwich bag. It's designed to fit so snugly that it can hardly be called a bag. Maybe a sandwich sock. I feel sorry for the employee working the end of the counter but I'm amused that it looks like he's trying to shove an erection into a dry asshole. Whoever came up with this idea is unconscionably disconnected from your real labor force. Given the marketing info on the bags, I wouldn't be surprised if your whole damn marketing department were responsible since this actually fell through the gaps of peer review. If it doesn't fit, the sandwich needs to be smashed. If it doesn't fit, tear the corners of the bag. If it doesn't fit, shake the sandwich into the bag and guarantee that everything that was put into the sandwich in the first place ends up at the bottom of the bag. There's a reason you used to use a simple large sheet of paper and it's because it provides employees economy of motion on the serving line. Put the sandwich in the middle, fold, fold, fold, roll. Next. Is the bag really cheaper to make than sheets of paper?

2) The metal grating basket. The old plastic basket served a dual purpose by not having holes. People in the modern western world eat sandwiches on a plate, OK? An 8"x8" sheet of paper on top of a metal grating is not a plate. There are crumbs everywhere! Where the hell do you put chips or a pickle? I watched a lady construct a placemat out of carefully positioned napkins for her torpedo (which happens to ridiculously oversize the metal basket). Are these metal baskets cheaper than the plastic baskets? Are they supposed to be easier to clean?

If you're going to make a change, make sure it has positive effects throughout the entire process.

Thursday, October 19, 2006

Night Elves eat Korean food

I just noticed a couple days ago that select Night Elf vendors in World of Warcraft offer various kimchi dishes. Nice to see Blizzard give a little nod to its huge Korean fanbase. There's also Bean Soup, Wild Rice Cakes, and Steamed Mandu. But Darnassus Kimchi Pie sounds absolutely revolting. I'm not sure if it's a tongue-in-cheek joke about Korean cuisine (*everything* is pickled!). Personally, I'd like to see Kalbi or Bulgogi cooking recipes added in the Burning Crusade expansion.

Wednesday, August 23, 2006

A review of "Snow Crash (Bantam Spectra Book)"

by Neal Stephenson

Cyberpunk is a niche of science-fiction where I found a fascinating milieu steeped in world cultures and technology but never really found what I considered to be great stories. Neal Stephenson doesn’t accomplish it here either with Snow Crash, but it’s nevertheless a fun ride. And one that isn’t so utterly bleak, in contrast to Gibson. The characters never stray too far from cookie-cutter personas with the exception of Y.T. Hiro mostly serves to move the plot along. And with the Librarian, he’s an exposition device for Stephenson’s elaborate ideas on language and cognition which provide the true value for the book.

The painting of this cyberpunk universe in the very first chapter is what resonates so clearly for me in these uncertain times. Ridiculous inflation of the dollar. Global trade imbalances. Utilizing data mining to reengineer the most mundane of business processes. All converging towards an empty backyard swimming pool.

Friday, August 11, 2006

Comparing Inspirons

Inspiron 7000

  • Pentium II 300MHz
  • 256MB RAM

Since the CPU is several years old, I decided to go with a minimal Gentoo installation. My original intent was to just install screen, ruby, rails, mono, lighttpd, and sqlite. Now that I've discovered overlays, I think it'll be a nice place to smoke-test new GNOME releases and the evolving C# bindings for DBus. Thanks to steev, I'll also be able to see if I can get the Ruby bindings up to speed with the latest DBus release (0.91). There's already a project on RubyForge which hasn't seen love in many moons, so I'm very tempted to dive headfirst into it.


Inspiron 8200

  • Pentium 4 1.6GHz
  • 256MB RAM

Ubuntu Dapper is a little too memory hungry for 256MB, but this laptop has better battery life and expandability. I'm currently straddling the fence on purchasing a Dell TrueMobile 1150 mini PCI wireless card (an Orinoco-based chipset that's fully supported by Linux) and some more RAM. While the memory limit is supposed to be 1GB, there are successful reports of installing 2GB. I don't think spending $320 on this laptop is quite worth it at the moment though (that's almost a Nokia 770!). So I think I'll settle for a 512MB SODIMM and the wireless card.

Wednesday, June 21, 2006

Ruby, why donchu drop dem pants...

RSpec’s API for verifying collection behavior (not testing!) reads so well I just had to share with a fellow professional .NET coder (albeit a Ruby enthusiast also). Low-brow hilarity ensued…

zerokarmaleft: damn, i just love reading code that looks like this:
specify “all Players’ hands should have 2 cards” do
  @game.players.each { |player| player.hand.should_have( 2 ).cards }
end

zerokarmaleft: instead of:
[Test]
public void TestAllHandsAfterDealing() {
  foreach(Player player in game.Players) {
    Assert.AreEqual( 2, player.Hand.Cards );
  }
}

jm: yeah thats pretty nice code

jm: i’d stick my dick in that code

zerokarmaleft: rofl

jm: its puuuurdy

If you haven’t figured it out already, I started writing a generic card game (buzzword warning) framework to get my feet wet with BDD. Even after my limited foray, I feel that RSpec encourages thinking from a high-level abstraction standpoint and finding descriptive names. Both very good things in my book. To get this particular specification to read naturally, I had to extract an Array attribute out of a class and wrap it in a new class.

class Player
  attr_reader :hand
  def initialize; @hand = Array.new; end
end
became
class Player
  attr_reader :hand
  def initialize; @hand = Hand.new; end
end
class Hand
  attr_reader :cards
  def initialize; @cards = Array.new; end
end

In this minimal form, Hand is fairly worthless, but I wasn’t sure what kind of functionality it needed. So I added some more Player specs to see what would surface. In a card game like Uno, there are many times you have several cards that are the same and playing one is equivalent to playing any other. But Players shouldn’t be concerned with selecting a specific Card instance and deleting it from his/her Hand. They should just be able to say, “I want to play a Skip card, and I don’t care which one.”

class Player
[snip]
  def play( klass_of_card, discard_pile )
    cards = @hand.cards.select { |c| c.is_a? klass_of_card }
    raise CardNotInHandError if cards.empty?
    discard_pile << @hand.cards.delete( cards.first )
  end
end
class Card; end
class Skip < Card; end
@edward = Player.new
@edward.play Skip

Since I want to pass a Card’s class as a parameter instead of an instance I can’t use Array#include? to cleanly test for inclusion. I wanted a similar one-liner with Hand.

class Player
[snip]
  def play( card, discard_pile )
    raise CardNotInHandError unless @hand.has_this? card
    discard_pile << @hand.discard( card )
  end
end
class Hand
[snip]
  def has_this?( klass_of_card )
    @cards.select { |card| card.is_a? klass_of_card }
    @cards.empty?
  end
  def discard( klass_of_card )
    @cards.delete { |card| card.is_a? klass_of_card }
  end
end

Still doesn’t look like much but I think the clarity in Player is increased by isolating class-handling logic in Hand. As far as the Player is concerned, he/she is playing a Card…not a Card.class.

My experience with RSpec has been pretty positive so far. I’ll get back to my humble chess variant project in a bit and see how well test2spec executes Test::Unit migration.

Friday, June 16, 2006

Teach English in a foreign country

My 300th cheer went to kdreyling. Several of my friends have moved to Korea or China to teach English and I also met several expats that were doing the same when I visited the Philippines. So if you’re open to adventure and new cultures, and enjoy teaching, I encourage you to do some research into ESL programs.

Friday, June 02, 2006

Drum Machine

Quite possibly the best Macromedia Flash test ever.

Friday, May 26, 2006

why's Poignant Guide To Ruby in Korean

For a double dose of language learning and kimchi breath, read the Korean translation of Poignant Guide. I haven’t yet read this particular translation, but I wonder how some of why’s humor gets through to Koreans. According to leftsider (because I simply can’t stomach watching the stuff myself), Korean comedy on film tends to focus on behaviors given a social context instead of punchlines. Will readers be compelled to procure a Blixy Tee on the mirth merits of “chunky. bacon.”? Only time will tell.

Monday, May 22, 2006

King Kimchi

Wow. I had no idea kimchi was this important in Korea. Graduate studies and dissertations on kimchi? A flippin' kimchi museum?

Friday, May 19, 2006

Drawing a chess board with Ruby and Cairo

/

So I spent the evening hacking together this little app to draw a standard chess board with some 32×32 chess piece icons from IconBuffet. Sadly, ruby-gnome2 ’s documentation is lacking with respect to Cairo, so I had to switch between using reflection to examine the instance methods of various Cairo classes and their respective C documentation. Since the results are immediate, graphics programming is usually fun. But for the first couple hours I was stumped on a handful of code that was merely supposed to draw a single line and a PNG. The app either drew nothing at all, or painted the entire surface black. I eventually traced the errors to an unnecessary scaling function call that caused things to be drawn much, much larger than normal in a clipped region. So trying to rationalize the app’s odd behavior was like driving while wearing binoculars. Nevertheless, Cairo is cleanly designed and powerful. I look forward to messing around with it some more.

Next up is refactoring this simple do-nothing app into a full-fledged widget and by then I’ll have a good enough grasp of the differences between Cairo’s Ruby bindings and the C API to rewrite Davyd Madeley’s excellent GNOME Journal articles on writing Cairo-based GTK widgets (of which there already exists Pythonized versions).

Thursday, May 18, 2006

rabbits => plinkety plink

I played classical piano from when I was five for a little over six years. Ever since I stopped performing at recitals, I found myself dabbling on some set of keys every other month or so. But music-related goals are taking a forefront this summer and I need to get my chops back soon. So last night I started working on sight-reading and relearning old sonatas and such. Apparently I lost those particular brain wrinkles b/c it was a bitch. I still had the finger dexterity to play intermediate pieces but there was simply no connection between the score and my hands.

Untitled

43Things’ cheers > MySpace friends. Go figure.

Sunday, January 22, 2006

Google Gulp

I was comforted this past week in knowing that Google is doing the right thing and defending privacy rights even though a majority of Americans are willing to throw them away.

Meanwhile, Google appears to have a great sense of humor about the whole controversy. Witness the unveiling of their newest-latest product, Google Gulp!

Google Gulp and Your Privacy
From time to time, in order to improve Google Gulp's usefulness for our users, Google Gulp will send packets of data related to your usage of this product from a wireless transmitter embedded in the base of your Google Gulp bottle to the GulpPlex™, a heavily guarded, massively parallel server farm whose location is known only to Eric Schmidt, who carries its GPS coordinates on a 64-bit-encrypted smart card locked in a stainless-steel briefcase handcuffed to his right wrist. No personally identifiable information of any kind related to your consumption of Google Gulp or any other current or future Google Foods product will ever be given, sold, bartered, auctioned off, tossed into a late-night poker pot, or otherwise transferred in any way to any untrustworthy third party, ever, we swear. See our Privacy Policy.


I only wish I could say, "Fuck off." in such a grandiose manner. But a man can dream.

Tuesday, November 29, 2005

My Red Ryder B.B. Gun for this year is an M-AUDIO MicroTrack 24/96.

These guys have been talking quite a bit about the Nokia 770, which Christian should find under his Christmas tree if he's lucky enough to find one (their online store warns that current orders cannot be fulfilled until February). I admit the 770 looks like a fun development platform, but the official first item on my Christmas wish list is the M-AUDIO MicroTrack 24/96. For $100 more than a 60GB iPod, I could have an affordable mobile audio solution that can also record hi-fi audio (see here for not affordable). The included 64MB CompactFlash card is only enough to record short meetings and lectures. But with a 2GB (or larger) MicroDrive, it's perfect for sneaking into clubs to tape live shows in lossless 24-bit/96kHz glory. And a hell of a lot easier to deal with than DAT. It also comes bundled with Audacity, a free software sample editor that's available for Windows, Mac OS X, and Linux. Too cool!

OK OK, the 770 is on the list now, too.

Monday, November 28, 2005

Blue Brick Server

Every once in awhile my router’s port forwarding rules would become invalid when my desktop box got a new DHCP lease and its IP address changed. Unless I enabled remote HTTP administration, there was no easy way to update the rules for the new IP address unless I was at home to access the webmin console over the LAN. I wanted to configure my router – a venerable Linksys WRT54G 1.0 – to bind static IPs to MAC addresses so the rules would stay valid day after day.

With the testimonies of several of my local LUG members to spur me into action, yesterday I intalled OpenWrt – a free, Linux 2.4-based firmware for the WRT54G (and many other models as well). The router was previously running Linksys’ latest official firmware, so I couldn’t use the recommended method of transferring over TFTP without jumping through some hoops. Instead, I successfully flashed the router by simply using the webmin console just as I would with an official firmware. Most of the settings were saved into NVRAM and migrated automatically. The only thing left to do was to create some port forwarding rules for iptables (which did not migrate, but were easy to create) and test network access on each computer in the house. Strangely enough, the only computer that complained was a laptop running Windows XP.