Friday, August 31, 2007

Guess That Dish

I'm buying: vinegar, Worcestershire sauce, brown sugar and chili sauce.

What are we making?

The flowers role is easy - I'm trying shamelessly to impress Shira.

--Ben

Update: The answer: Sloppy Joe's. And boy was it good.

Surprise, All The Good Names Aren't Taken

Anyone who's ever tried to find a domain name for a website they want to launch has known the frustration of trying to find an available name to purchase. It sometimes seems like all the good ones are gone.

Gavin pointed me to a really impressive site that helps overcome a bad case of namers-block. Check it out: bustaname.com.

The idea is simple: give Bustname.com a few words, and it will tell you which combinations of those words are available in the form of a domain name. Bustname.com also lets you easily add synonyms and tune other options like whether it should find .com domains only, or branch out to other domains.

The site makes use of Web 2.0 style AJAX - and it does so beautifully. The interaction with the site is nothing short of remarkable. This is yet another site to review just for the UI alone, not to mention the cool service it offers.

Let's look at an example of how it might be used. Suppose I've messed up with Shira (I know, unlikely, but it occasionally happens) and I'd like to put up a website that's sort of the geek's version of buying flowers. I need a name domain name, but which one to choose? According to Bustname.com here are some options:

 veryregrettable.com
 wronghusband.com
 iamregrettable.com
 wrongiam.com
 sorrywrong.com
 wrongsorry.com

The site also offers a quick check facility for names - good news - wrong-and-sorry.com is also available.

Godaddy - you would be insane not to throw piles of money at this guy to buy his site. You'll sell way more domains if people have a really easy interface for finding them.

Hmmm, that apology website doesn't seem like such a bad idea now...

Thursday, August 30, 2007

Dinner With Lavine

Shira's out of town - but I'm not starving. Greg got me out on the town,
on a school night no less!

If all goes well, I should be seeing a lot more of Greg as he's just
moved to the area. He's thinking about settling down in Maryland, so I
have to talk him out of that decision.

Welcome Greg - enjoy the humidity and traffic, there's plenty to go
around.

--Ben

Ben's Law Of Chinese Leftovers

No matter how secure you think a takeout container of Chinese food is,
it will leak all over the other food in your lunch bag.

Corollary: If you take additional time to store said food container in
its own secure plastic bag, it will under no circumstances leak.

--Ben

Wednesday, August 29, 2007

T-Mobile Wing Sample Photo

For the record, here's a sample photo I took while playing with the T-mobile Wing.

The quality seems quite reasonable - far better than my Sidekick, but that's not saying much.

As much as I kvetch about the Wing, it does have pretty much every feature I could ever ask for. Including a nice camera - a must have for mobile blogging.

T-Mobile Redeemed, Wing Played With

Good news - T-mobile is back on my good side. I stopped by another store this evening and spent a good 20 minutes playing with a Wing. When a sales person came over, he asked me if I had any questions. I told him I was mostly just playing - to which he asked if I wanted his opinion.

Did I every! This is what he told me: the Wing is slick, but basically painful (in his opinion) to use as a phone. Windows is simply painful to use. The switch from vertical writing mode to horizontal keyboard is accompanied by a noticeable lag of a few seconds. And, if you do leave the WiFi on, it will eat through your batteries in 4 hours.

I couldn't confirm the battery comment - but the rest of the feedback I had noticed in my 20 minutes of playing.

I so wanted to like the Windows UI. But, at the end of the day, it's a desktop UI crammed into a phone - what a mistake. There do appear to be a few keyboard shortcuts, but not as many as I had hoped for.

The only surprise was that the keyboard was nicer than I thought I was going to be. I could see learning to touch type on that sucker with a minimum of effort.

The clerk's recommendation was this: wait till late September and buy the latest Blackberry due out. It will have a GPS, 2.0 MP camera and a full keyboard.

I'm not in love with the Blackberry UI, but nothing is as bad as the Windows UI. As Shira told me - you'll adapt way easier to the Blackberry over Windows.

Someone, anyone, tell me my synopsis of the Windows Mobile User Experience is all wrong. Tell me that once I learn it I'll be flying all over the UI like I do on my Sidekick.

At the very least, my faith in T-mobile is restored.

--Ben

Tuesday, August 28, 2007

Mental Auto-Complete - Need to find the off button

I spend enough time around a keyboard that I've found once I start typing a familiar word, my brain goes into a sort of auto complete mode, typing out the rest of what I normally type. It's basically a muscle memory thing - I may know the word I want to type, but my fingers might type something else.

For example, if I've been working on a schema for the last few days, and I want to type a message about scheme, I find myself constantly typing: schema <backspace> e throughout the message.

Surely this is a common brain thing right?

Boy did it nearly get me in a heap of trouble tonight.

Shira's on travel, and I was IM'ing her a good night message. I wanted to say miss you tons - but there's a problem. I work with Tonya, and send her quite a few e-mails.

So what do you think my brain auto-completed: I miss you ton... to? I came awfully close to typing tonya, but ended up instead with tonys. Whew, that was a close one.

Shira knew exactly what I did. I really need to find an off switch to this feature before I really get myself in hot water.

Postgres Tip List

Here's a really handy list of Postgres tips. It takes just a few minutes to browse through it, but has quite a few gems to offer.

Here's an example:

Ditch All Output Of Query by xinu on Jan 12, 2005 10:25 AM

If you want to run a query or a function and ditch the output, you can do something like this:

xinu=# select my_void_function() \g /dev/null

So, if you want to redirect the output of a command you can say: \g /path/to/a/file instead of the usual ;.

T-Mobile Disappointment

I just attempted to go shopping for a new cell phone. I wanted to check out the Wing. I know it's a product of the Evil Empire, but it has all the bells and whistles. Not to mention, my Sidekick lasted less than 9 hours today before running out of battery juice. I'm getting desperate and not loving Danger.

So I headed over to a T-mobile store in the Balston Mall.

I could quickly tell they had a Wing in stock. Whew, didn't waste my time getting out here.

Then I asked to handle one. You know, before I spend like $400 on a phone I'd like to use it.

The rep at the counter explained they didn't have a live one. I could play with a dummy phone. Excuse me? What about the live one secured to the counter in a Fort-Knox grade security device? He can't give me access to that one - against the rules.

I had no choice, I thanked the guy and walked away.

A cell phone is an incredibly tactile device, not to mention a complex one. How can I choose to buy one if I can't play with it? I need to feel its weight, notice the delay in the screen flip and shoot some video. What an absolutely absurd policy.

That's like going to a Toyota showroom and not being allowed to drive a Prius. Sure, you can sit in the one parked on the sales floor. But drive it? Please, that's against the rules.

It didn't help that when I asked him about the phone in general he said I needed to be more specific. Then I asked him if people had any complaints about it? Nope, not that he knew of.

This is a $400 computer we are talking about here - not a $30 cordless phone. Argh. I'm officially unimpressed with this shopping experience.

--Ben

Bow Tie Hack

About 10 minutes before we had to leave for Aaron and Michelle's wedding, I realized I had left the bow tie for my tuxedo on the floor of my bedroom. One small catch, my bedroom floor was 395 miles away from parents house, where I was getting dressed.

What to do?

I scrounged around looking for a bow tie - but had no luck. Shira's mom couldn't dig up one either. We didn't have time to stop at a store. Things were looking pretty grim.

Then I got a text message from my mom - the problem had been solved. She had one for me.

I arrived at the wedding, and sure enough, my mom handed me a black bow tie.

How did she pull this miracle off? She asked a waitress if she, or one of her fellow wait staffers had an extra. Sure enough, they did.

Brilliant! This is a hack I'm definitely going to remember. Just more proof - moms can fix anything.

Monday, August 27, 2007

Fairwell Scratch Pad - We Knew Ye Not

While Shira and I were in Rochester this weekend, the topic of the blog came up. My Mom, Dad, Brother and Shira all agree - the Scratch Pad, my Twitter feed, has to go.

Obviously, I thought it was a clever idea. I thought, hey, it'll give me yet another way to blog. Apparently, I was wrong - very wrong.

Opinions on why the Scratch Pad was so bad range from the fact that it is just noise, to the fact that it makes me look less intelligent. Ouch.

It's interesting to note, that while I've blogged about many topics, from relationship advice to Python style Generators, I've never had any opposition to any content from my family. But the Scratch Pad - yuck, useless.

The whole dislike of the twitter feed reminds me of a comment from Wired Magazine on the topic of why the Star Wars Prequels were such a bad idea:

Patton Oswalt: The prequels are like offering someone ice cream, then giving them a bag of rock salt and saying, "Eventually, you can turn this into ice cream." Star Wars is ice cream. Don't give us rock salt.

The Scratch Pad was the rock salt. Nobody cares.

Lesson learned. It's coming down in just a few minutes...

For those who enjoyed the Scratch Pad, you can still follow it on Twitter.

Aaron and Michelle's Big Adventure

Yesterday Shira and I had the pleasure of attending Aaron and Michelle's wedding. We had an awesome time - the ceremony was beautiful and it was great seeing old friends. It didn't hurt that they served two kinds of cake. Mmmm...cake.

We wish them all the best - they should continue to know the kind of joy we all shared last night. Mazel Tov!

I know it's Monday...

...because:

  • My sidekick crashed today, causing me to lose two blog entries I had written on the flight from Rochester to DC
  • The e-mail for my sidekick hasn't synced up properly after the crash because over the weekend T-mobile had a massive outage. Thousands of customers were without Internet over the weekend. I wasn't affected at all until my own crash this morning
  • For unexplained reasons we lost power at the office today for 22 minutes
  • A production MySQL reporting database crashed and wouldn't recover automatically. I ended up having to recreate the entire DB structure, and then had to restore from a mirrored image
  • The TCP/IP route to our Geo-Locator's API server is hosed and is causing ping times around 4 ~ 9 seconds, instead of less than 100 milliseconds

Luckily, I have just as many things to be thankful for.

  • While my phone crashed, my plane didn't. Heck, it wasn't even delayed
  • We left and arrived out of gates that were really close to the security checkpoint
  • Traffic from Baltimore to DC was fairly painless this morning
  • I learned about MySQL and how its databases are structured on disk
  • I discovered a routing problem with our Geo Locator API provider in about 30 seconds after looking at the problem
  • I'm still married to Shira
  • My uncle had an MRI that showed no tumor growth
  • Tomorrow is Tuesday

Anti Burn Strategy

Instead of walking back to my desk while toasting, and returning to find burnt remnants of lunch - I'm bringing my desk to the toaster.

As long as I don't melt any plastic, I should be good.

--Ben

Sidekick Nosedive

Uh, where's all my e-mail?

This morning, on my way back to DC, I was happily blogging on the airplane. I had a bunch of messages queued and ready to be sent when we landed.

As we started our descent, I popped out the SD card I had inserted to upload a few photos from. Apparently, my timing was bad because the phone locked up.

When I rebooted, the device had reset itself. Pretty much everything was gone: contacts, e-mail, etc.

The good news is that the vast majority of my settings and data are on the server. So, when the device finally syncs, things should return to normal. I'll have to recreate the posts from earlier, and I'm without e-mail till the sync is complete.

However, if all goes well, things should be back to normal soon'ish.

Annoyances like this are custom made for Mondays. Argh.

--Ben

Sunday, August 26, 2007

Hot Soup - In Summer?

Yes, it's true - I'm having hot soup for lunch, while wearing a fleece
jacket. Have I gone nuts?

Nope, I've gone to Rochester.

OK, it's not *that* cold here - it's a pleasant 76 ish degrees. Compared
to DC, though, this feels like fall. Yesterday in DC, for instance, it
had a feel like of 96 degrees at 8:00pm at night.

We're in town for under 24 hours. We are attending a friend's wedding,
and tomorrow AM it's back to DC.


--Ben

First Complete Sudoku

I just finished my first complete Sudoku puzzle, with Shira's help, of
course.

Normally, I have no interest in Sudoku, but I've found it's a wonderful
way to pass time on the plane as we taxi to and from the gate.

Usually, I get part way through the puzzle - but not this time. I so
nailed the easy one presented in the in-flight magazine.

I'm not exactly sure why Sudoku is such a hit on the plane. Obviously,
there's the practical matters. It requires no electricity and doesn't
require the same mental investment as reading or working.


However, I think there's more to it than the pragmatic reasons. When I
first started playing, I would manually scan each square looking for a
match. Now, I find myself in a near Flow like state where I'm just
scanning the page, and poof, something clicks. I then get a little
mental boost at every correct answer.

So, basically, Sudoku is a drug. The best kind of drug too, as it's
using the chemicals I already have in my body.

Mmmmm....instant gratification, feels good.

--Ben

One Productive Frosh

Another gem from my Mother-in-Law:

Armed with a soldering iron and energy drinks, a teenager who will soon be a freshman at Rochester Institute of Technology has developed a way to make the Apple iPhone available to a much wider audience.

From the Rochester Democrat & Chronicle

Let's see, as I was heading off to SUNY Buffalo for my freshman year of school, I was more concerned with picking classes, buying books and figuring out how to turn my vax username of VP24NYVM into an e-mail address (yes, that was my username - kids today have it so easy, what with their intelligible e-mail addresses and such).

Hacking the latest technology at the hardware level just wasn't on my radar.

If I were Apple, or better yet, Microsoft, I'd start wooing this kid today.

Friday, August 24, 2007

GPS Moment

I had to make an unexpected* trip to a store in Springfield, VA - a location I know really poorly - this afternoon. Luckily, I had my Garmin eTrex in the car to help get me there.

I printed out directions from Yahoo, and made sure to visit GPS Visualizer (http://gpsvisualizer.com) to get the latitude and longitude of the store's address. I then punched it into the GPS when I got to the car.

The Yahoo maps got me to the area, but it was really the Garmin that allowed me to find the place. The lat/long steered me to the very front of the store (hiding in the back corner of a shopping center).

Sure, the eTrex is as basic as it gets. But I love the fact that it sips batteries, so it's always at the ready. It's no replacement for a real car GPS that provides verbal instructions, but it makes a terrific durable backup. Its basic map gave me just the info I needed to see I was headed in the right direction.

If you don't own a GPS, it might be a fun one to try on the cheap.

----

*Unexpected in the sense that Shira only told me a few times this week and I kept forgetting about it

--Ben

Holding a Program in One's Head

Here's another great Paul Graham article, on the topic of programming:

http://www.paulgraham.com/head.html

As usual, it's more propaganda than how-to, but it's certainly a good, fun, read. If you are a programmer, you'll either love or hate his opinion. I happen to enjoy it immensely.

My big question is, how much programming does Paul do these days? I wonder if he's in danger of talking the same talk as always, even though he's not in the trenches anymore.

Hope he's still hacking lisp late into the night.

--Ben

Update: I'm not particularly in love with my quick synopsis of this article. I think it was a bit too hasty. Paul actually does layout quite a few concrete things you can and should do to write great software. I'm also a believer in the fact that a few, expert programmers, can far outdo a large group of mediocre programmers. And, naturally, I agree with this bottom up (read: lisp friendly) approach.

One point where I might depart from Paul is that it isn't an organization vs. hacker issue that keeps great software from being written, but The Dip. It's easy to blame organizations, because, well, they are often to blame. But, even in an ideal environment, a programmer needs to cope with The Dip.

Thursday, August 23, 2007

Charcoal Snack

Rule #1 of using the office toaster: don't put something in and walk away. If you do, you'll end up with charcoal.

Rule #2 of using the office toaster: don't stand around watching the toaster, it'll never heat up with you staring at it. If you break this rule, you'll end up with cold food.

I opted to break rule #1. Mmmmm....carbon. Just like Ma used to have a reputation for making.

--Ben

A New Hope

Yesterday, a battery I ordered off eBay to fix my battery woes finally arrived.

At the moment, I'm at 90% battery life from charging all night. Hmm, it's been unplugged for just a few hours - that seems kinda unimpressive, no?

Is there some sort of ritual I should be going through to condition the battery? Perhaps some voodoo or a misheberach?

For now, I'll let it full drain then fully charge it a few times.

--Ben

Out Gunned

Yesterday, as Beamer walked into my office, I decided to show him who was the real gun slinger around here. I pulled my cell from my holster.

The result, he had his out faster, and mine was on the ground in three pieces. Defeated. He even had his at the ready to snap this photo.

Beaten at my own game.

--Ben

Wednesday, August 22, 2007

Request: Chocolate out of fabric?

I have this friend, we'll call him Gen. Gen is a real slob and keeps spilling food on himself. Of late, he keeps getting bits of candy, mostly chocolate on himself and his surroundings.

How can he get the stains out?

So far, he's tried: rubbing really hard, rubbing really hard with a damp cloth, and anger. No luck so far.

Please, for Gen's sake - how can he remove these blemishes.

I, uh, I mean he, will be forever in thankful for such a solution.

--Ben

Adding Generators - A Language Comparison

Generators - Kinda like Iterators, but Not

Recently, the topic of adding Python style generators to both Java and Scheme has come up. It's interesting to compare the two approaches taken.

Before we jump into the details - what the heck is a generator anyway?

Generators are an approach to encapsulated iteration, much like a java.util.Iterator object is. Here's a trivial Python example:

from __future__ import generators

def foo():
  print 'hello'
  yield 1
  print 'world'
  yield 2

Calling foo above will return a generator back. You can then call next() on that generator (much like an Iterator in Java) to return the values that are associated with the yield statement. Think of yield as being the same as return, with the benefit that calling next() will resume there again.

Why add generators to your language, especially if it already has iterators? Generators simplify your life: rather than manually tracking which value to return next, you have the interpreter handle all the details. This is much like garbage collection - you could manage memory manually, but isn't it nice to have the interpreter do all the book keeping for you. It is.

The Approaches

Here's a description of technique to add generators to Java used by infomancers:

It works by using Java 1.5's facility for hooking user-defined class inspectors/transformers into the classloader, and rewriting the bytecode of a yieldNextCore() method containing calls to yieldReturn(foo) so that its local variables are promoted to members of an anonymous inner class, which also maintains the state of the iterator/generator.

Wow that's slick. Who would have thought to use user-defined class inspectors/transformers to re-write bytecode on the fly? here's a sample of how to use it:

public class PredicateIterable
    implements Iterable {
  private final Collection coll;
  private final Predicate pred;

  public PredicateIterable(Collection coll,
      Predicate pred) {
    this.coll = coll;
    this.pred = pred;
  }

  public Iterator iterator() {
    return new Yielder() {
      public void yieldNextCore() {
        for (Object nextItem : coll) {
          if (pred.evaluate(nextItem)) {
            yieldReturn(nextItem);
          }}}}}}

The Scheme approach was written iteratively, starting off by using the primitive call/cc operator and finishing up by using control.ssand a syntax tweaking macro. Here's the final implementation:

(require (lib "control.ss"))

(define-syntax (define/y stx)
  (syntax-case stx ()
    [(_ (name arg ...) body ...)
     (with-syntax 
         ((yield-name (datum->syntax-object stx 'yield)))
       (syntax
        (define (name arg ...)
          (define (yield-name x)
            (control resume-here
             (set! name 
                   (lambda ()
                     (prompt (resume-here 'dummy))))
             x))
          (prompt body ...))))]))

Here's a sample Scheme usage

(define/y (step) 
  (display "hello\n")
  (yield 1)
  (display "world\n")
  (yield 2)
  'finished)

Lessons Learned

Here's the lessons I took away from this...

In Java, where there's a will, there's a way. It's pretty dang impressive that Java allows you to re-write bytecode on the fly. It may be a relatively crude way to extend the language, but it works.

In Scheme, mere mortals can add experimental concepts to the language. In about the same space it takes to describe the Java solution in English, you can actually write it in Scheme. The implementation doesn't require any low level hacking - just understanding a particular library of control operators, or, if you prefer the basics of how call/cc works. This lowers the bar for adding new language constructs and means that you can bend the language to your project's needs, instead of the other way around.

Scheme's macros allow you to make the new concept blend seamlessly with the language. Comparing the Python and Scheme samples, there isn't a whole lot of difference. Not only can you add new concepts to your language, but you can make them convenient for the programmers who will be using them. Again, the language bends to project, not vice versa.

What concept do you wish your programming language had? Have you tried adding it in 20 lines of Scheme code?

Tuesday, August 21, 2007

Beamer The Cowboy

Beamer's got a new phone - but more importantly, he's got a new hip holster.

He demonstrated his quick draw skills. He's good, and has obviously been practicing in front a mirror.

Surely, he will now be irresistible to the ladies. I stand in awe and will have to do some practicing later tonight myself.

--Ben

Monday, August 20, 2007

Romance Tip Of The Day

Try this with your significant other...

  1. Visit rot13.com
  2. Type in some cute or lovey messages. Maybe something from O'l Willy.
  3. Hit the Cypher button
  4. Send the encrypted text and the link to website to your significant other via e-mail or IM
  5. Sit back and wait for the points to roll in

I'm not exactly sure why the above is a good idea (I think it has to do with both showing effort and a bit of mystery), but I'm pretty sure it should work. If it doesn't, there's always plan B.

Here's a sample:

Fuven,

Lbh ner zl gehr ybir. V'z fbeel gung V'z fhpu n cnva va gur ohgg naq gung V fcraq fb zhpu gvzr oybttvat.

Yvsr jvgubhg lbh vf n yvxr n freire jvgubhg ENZ.

Depending on the fallout from this post, this may very well be my one and only Romatic Tip Of The Day post...ever

Cell phone holder hack

Here's the Cell phone holder I just ran with. Two rubber bands to keep my mini cell phone stuck to my hand. Considering it's all I had on short notice, I'm happy with the solution.

Deep Thought Of The Day

Be prepared to appreciate what you meet
-Fremen saying

From Dune.

Here's an entire list of quotes from the book - many of them quite cool. It's like reading a novel with chunks of Pirkei Avot dropped in between the chapters.

Sunday, August 19, 2007

Sailing Adventure: Skipper Shira

I give you Captain Shira at the wheel. And first mate Jenna dozing.

Shira runs a tight ship. She's yet to make me walk the plank, but we aren't docked yet.

--Ben

Sailing Adventure: Getting our sail on

Having a great time on Dave's boat as we cruise around The Bay.

I'm happy to report that to date Shira has not gotten sea sick. She's been a total trooper. It's even been a bit choppy and she's holding up.

Justin and I helped out Dave with tacking, and Jenna and Shira were spotters.

This whole sailing thing is quite relaxing - throw in a few beers and some Jimmy Buffet music and I could get used to this.

--Ben

Sailing Adventure: And we are sailing

Sails are up and the engine is off. A nice stiff breeze is allowing us to do 5 knots.

This is just too cool!

--Ben

Sailing adventure: Almost out of the harbor

Just feet from leaving the harbor.

Thus whole standing at the front of a rocking boat and blogging is just a bit tricky.

Time to walk back to a more stable part of the boat.

--Ben

Sailing Adventure: Under Way

We are aboard the Freedom and heading for open water.

Man this is fun!

I couldn't resist having a Titanic moment before heading out to he Bay.

Sailing Adventure: The Arrival

We are about to ship off for a fun day of sailing!

Sure, it may not look like much...but it's the crew that matters.

--Ben

Food Fact Of The Day

Mincemeat apparently has no meat in it. Only sugar and high fructose
corn syrup.

Even Wikipedia confirms this:
http://wapedia.mobi/en/Special:Search?search=mincemeat&skl=Go&type=

Q: Why is this interesting?

A: Does everything I post here have to be interesting? It just is.


--Ben

Friday, August 17, 2007

Being The Environmentalist

It's probably an urban legend - but I'll be damned if I'm going to let a bunch of defenseless fish and birds be strangled by this 6-pack 8-pack ring.

What an odd habit to have, that I feel responsible for cutting these up. Do I take the bus to work, make sure I recycle at every possible chance or bring my own bags to the super market? Nope, but I certainly won't let a Coke 6 pack 8-pack ring pass me by.

Why is that? Probably marketing...

--Ben

Thursday, August 16, 2007

Custom Bugzilla Reports

I'm a big fan of Bugzilla and couldn't agree with more with Joel, a bug tracking system is an absolutely essential tool for making a successful dev team.

Where Bugzilla seems to be lacking the most is on the reporting side. I can cut them a bit of slack on this, as reporting needs are going to differ from team to team.

For a while now, my team has been tracking some items manually both in Bugzilla and on a Wiki page. Last week, I finally got fed up enough to do something about it.

So, this morning, Kelly and I decided to peek behind the curtain and actually look into querying Bugzilla's database directly to get the tidbits of info we needed from it.

I'm not quite sure what I was expecting - some sort of hideous, hacked up mess or something. But I was completely wrong. The Bugzilla MySQL database is pretty much exactly what you'd expect. It has a bugs table, products table, components table and lots of there tables exactly where you'd expect them. They are linked together by perfectly sane foreign keys.

In just a few minutes we had our first query written in PHP, and after an hour (with at least 10 minutes before the report was due), we had a working replacement for the report we had been working on manually.

Bugzilla even has a feature which seems custom made for querying stuff behind its back - keywords. Keywords are basically flickr/delicious style tags. You can add an arbitrary number of them to any bug report and then query against them later. Want to see all bugs that involved a problem with deployments - just tag them deployment and query for that after the fact. (Note: Tonya does our deployments, so we don't have bugs in this category.)

As an example, below is a query which will show all bug reports closed out in the last 7 days which have the tag foo.

  SELECT b.bug_id, b.priority, b.resolution,
         b.short_desc, p.name as product,
         c.name as component, u.login_name as owner
  FROM
    bugs b, components c, products p,
    keywords k, keyworddefs d, profiles u
  WHERE b.bug_id = k.bug_id  AND
        k.keywordid = d.id   AND
        d.name = 'foo'       AND
        b.product_id  = p.id AND
        b.component_id = c.id AND
       (b.bug_status = 'CLOSED' OR b.resolution <> '') AND
        b.assigned_to = u.userid  AND
        b.lastdiffed > (now() - interval 7 day)
  ORDER BY b.lastdiffed DESC

I just love the feeling of replacing manual effort with a script.

Eyes in the back of my head

I'm a big believer in moving people around for efficient communications. If two people have to work closely on something, even if only for a week or two, then, I think they should sit side by side.

As a result of this philosophy, we had yet another team office shuffle. My final placement is decent - I can see the door, and passers by can't see my monitor. Though I have folks sitting behind me.

With my wide angle mirror though I can at least get a glimpse of them back there. Theoretically, this would avoiding a heart attach if they tap me on the shoulder and I'm deep in flow.

Mostly I needed the mirror because they were laughing behind me and I needed to be sure they weren't also gesturing at me at the same time.

--Ben

Wednesday, August 15, 2007

On the difference between mostly sealed and sealed

Note to self: don't drop your mostly empty, mostly sealed, Tupperware container of Corn Chowder soup in your briefcase.

Unless of course you like the idea of your laptop, power cord and brief case having a pleasant Corn Chowder smell.

Luckily, I don't carry much in my briefcase and it's easy to clean.

--Ben

Digging Into Dune

I've always shied away from reading sci-fi. Even movies like Lord Of The Rings give get me nervous - what with not only a cast of characters to learn, but different worlds and species as well. I took a chance though on Dune by Frank Herbert.

At first my concerns were well founded. There are 18 CDs in the book. It opens with an introduction of the cast - not single author - who will be acting out the book. Then the clincher - this is just Book 1 they tell me. Gulp. How many books are we talking about?

Things got scarier from there as quotes from an alien religious text is read and the story begins.

As I feared, new species, worlds, and concepts were being introduce by the minute.

I'm now on disk 6. I have to say that I absolutely love the book. I love it for the reasons I like most books: the characters are ones I like and can learn from and the storyline is quite interesting. There's enough action to keep my attention too.

The book clearly has a soap opera quality to it. Try this experiment one day when you are home sick - watch an episode of Days Of Our Lives. Within 3 minutes they will drop enough clues that you'll be totally up to speed. By the end of an episode, you'll be a pro.

Same with Dune. While the book invents new science, history, religion, politics, warcraft and entertainment for an alternate set of worlds and creatures it does so in a way that you can indeed follow along with.

I'm glad I took a chance on this one - it's already paid off.

--Ben

A Must Have Tech Support Tool

Microsoft Rocks!

A while back, I discovered the Windows XP Remote Assistance and my life of giving tech support advice to family and friends changed dramatically. All of a sudden, I had an easy way to get a view into what was on their screen. From giving HTML advice to figuring out why e-mail wasn't being downloaded, I was the Tech Support Man. All I lacked was the nifty headset phone and the possibly foreign accent.

However, I found that under some circumstances Remote Assistance wouldn't work. This was a major pain the neck because without a view into a family member's screen, debugging was reduced to "OK, read me exactly what's on the screen again" - not fun at all.

I finally dug into why I might be having issues with Remote Assistance - it turned out to be obvious. Remote assistance does nothing fancy to deal with routers and firewalls. I thought for sure Microsoft had a really sophisticated approach to dealing with giving support to customers on random home networks. Turns out, they don't support this in the least. When I actually looked into the contents of an invite that wasn't working, I found that the IP address listed to connect to was 192.168.1.18. Well, that's useless.

I could have tried to get around this by having the tech-suportee setup a rule on their router to forward requests from port 3389 to their computer, but please. If I can't explain to them how to fix their e-mail, then there's no way I'm going to be able to explain to them how to setup firewall rules on a random router interface, that of course, I can't see.

OK, Microsoft Doesn't Rock. Now What?

I was just about to gave up, I did one last Google search. Of course, LifeHacker to the rescue.

LifeHacker pointed me to ShowMyPC.com. This totally free service does exactly what I want. With the person on the phone, I have them click on the link labeled Show My PC to a remote user. They then click a button which gives them a unique password. On my side, I enter this password. Poof, a few seconds later, I'm staring at their desktop. All without a single thought about firewalls, NAT routing or a million other details.

No worrying about invitations, e-mail or hand generated passwords. It just works. This is my new preferred way to a share a desktop, hands down.

Tuesday, August 14, 2007

Introducing Ben's Scratch Pad

I've added a new piece to Ben's Journal - Ben's Scratch Pad. Folks will quickly recognize this as my twitter stream.

I've been thinking through twitter, trying to decide if it deserves a place in my publishing toolkit. On one hand, I really like how easy it is to publish with it. Quick thoughts, links, quotes and other small bits of content seem like better candidates for twitter than for my regular blog. Perhaps most importantly, the small format size should make my commitment of almost-daily posting an easier one to fulfill.

On the other hand, I didn't want to divide my already limited effort between two sites. I have enough trouble getting folks to read my blog - getting them to read my twitter stream seems like another big hurdle.

Then it hit me - I have total control over the benjisimon.blogspot.com. Rather than thinking of twitter as a secondary site, I decided to integrate into my existing site. You can't help read one without reading the other.

Now when I have a really busy day, and just have enough time to post a few snippets to twitter, my blog visitors will be treated to at least some fresh content. Mission accomplished. Almost.

What if you don't read my blog by visiting my website? What if you just read the feed. A quick Google search for feed splicing found this useful article on the topic. It turns out, Yahoo offers Pipes which among other things, glues together RSS feeds.

As a side note, Yahoo Pipes really is remarkable. It makes use of a graphical approach to composing feeds. In fact, it's the closest thing to a Graphical Programming Language that I've ever seen work. Check out my pipe here for an example.

The end result is I now have a new feed URL. Click here to subscribe to it. This feed allows you to simultaneously read both my Journal and my Scratch Pad at the same time.

SQL Brain Teaser - Why "an Incorrect datetime value"?

Kostyantyn ran into this issue today. I was totally clueless till he got it sorted out.

Suppose you have a table like so:
  CREATE TABLEE foo(timevalue timestamp);

You successful run the following INSERT:
  INSERT INTO foo(timevalue) values ('2007-03-11 01:53:44');

You attempt to run the following INSERT:
  INSERT INTO foo(timevalue) values ('2007-03-11 02:53:44');

You get the error:
  error# 1292: Incorrect datetime value: '2007-03-11 02:53:44' for column timevalue

What's the problem? How do you fix it?

Commute - Guessed Wrong Today

I'm sitting on 66 going 0 miles per hour. Looks like I guessed wrong on the right path to work today.

In past few days, I've been leaving at this same time and arriving at work in just over 23 minutes.

It's now 22 minutes into my commute and I've barely made it a few miles away from my house.

Argh. Nothing left to do but crawl forward when traffic starts up again and bail out of 66 as soon as possible.

Argh. Better blog rage than road rage.

--Ben

Scenes From A Sunrise

With Shira out of town, I was able to take a walk this morning at 6am'ish. While out, I caught some photos of the sunrise.

I can't remember the last time I watched the sun actually peak up over the horizon, so this turned out to be quite a treat. The Washington, D.C. skyline provided a nice backdrop for the whole event, too.

Monday, August 13, 2007

Windows XP - now as capable as FVWM 98

Back in college, I was a user of X-windows and the FVWM window manager. One of the neat features of this UI was the ability to support multiple desktops. This, of course, would freak people out when they scrolled from one desktop to another unexpectedly and "lost all your work," but once you got the hang of it, it was awesome.

It's now 9 years later, and I just setup my Windows XP box to behave this same way. This functionality has been around for some time, no doubt, but I guess I've never been motivated enough to actually hook set it up.

It turns out, it takes just minutes to get going. Here's what you do:

  • Visit the Microsoft PowerToys page and download Deskman.exe
  • Install it
  • Now here's the tricky part - right click on the Task Bar thingy that runs along the bottom of the screen, and select toolbars, desktop manager. I say this is tricky because depending on where you click on the Task Bar you'll get a different menu, and this menu may or may not have a toolbars option.
  • You can now click on the different desktop windows to switch between them

The real magic comes when you right mouse click on the MSVDM toolbar and select Configure Shortcut Keys. You'll want to pick key combinations that are easy to type. I've set my desktops as Control + Shift + J, Control + Shift + K, Control + Shift + L and Control + Shift + ;. Now I can easily hop between screens. Can you say boss key?

Virtual desktops aren't as nice as having multiple actual desktops, but it's certainly better than nothing.

For more info, check this article.

What other Windows Tools should I be installing?

Rethinking Return Values

The Problem

The other day I wanted to write a function in Scheme that did the following:

Function url-info takes in a URL and does the following. First it follows redirects till it either encounters a real page (response code is 200) or until it receives a server side error, such as a 404 or 500. If a real page is found, the value of the title tag is extracted. Both of the final URL and the value of the title are returned by this function.

For example, suppose I called url-info on http://tinyurl.com/39n5jb the result would be two values: http://benjisimon.blogspot.com and Ben Simon's Journal | ....

Writing this function in SISC is fairly trivial because you can leverage existing libraries like HTTPClient and HtmlParser that will do the heavy lifting. The question I was left with was simple - what should the interface to this function be?

The Java Solution

If I were coding this problem in Java, the answer to the interface question would be probably be:

  public UrlInfo urlInfo(URL url) throws UrlInfoException {
      // magic goes here
  }

The UrlInfo object would be aPOJO with get methods for accessing the resolved URL and the title of the page. UrlInfoException would be a typical exception with methods to get the failed HTTP error code and a reason why it failed.

It's possible to write the Scheme function using the exact same pattern (return an info object, throw an exception). Before I did so, however, I wanted to resolve two nagging issues.

  • Most of the time, when I get back the info object, the first thing I'm going to do is take it apart.
  • The function is biased towards dealing with the successful case. You can definitely try/catch the exception and handle invalid URLs, but the code to do so is clunkier than the code that deals with a successful return value.

The Scheme Solution

After a bit of puzzling over this, I decided I would try a different approach in Scheme:

 (url-info url success-handler failure-handler)

That is, you invoke url-info function not only with a URL to process, but two different functions. One function, the success-handler is invoked when the URL is processed correctly. The other handler, failure-handler is invoked when then URL can't be resolved.

What does url-info return? It returns whatever the handlers return. Here are some example uses of this function (quick Scheme lesson: (lambda (...) ...) is just like function(...) {...} is in JavaScript) :

;; Success: Just return the title of the page, upper cased, 
;;          throwing away resolved-url.
;; Failure: Throw an exception saying the call failed
(url-info url (lambda (resolved-url title)
                 (string-upcase title))
              (error/f "Unable to resolve URL, reason: ~a (~a)"))


;; Success: make an info object for use later
;; Failure: make an error object for use later
(url-info url make-url-info make-url-error)

;; Success: raise an error
;; Failure: store the requested URL in a database
(url-info url (lambda (resolved-url title)
               (error (format "Sorry, ~a already exists. Choose another." 
                               resolved-url)))
              (lambda (code reason)
               (store-new-url! url)))

Here's what I like about this approach:

  • The programmer is explicitly required to handle both the success and failure case. It's all too easy in Java to swallow, print out, or mis-handle an error case.
  • Destructuring can happens automagically for you -- when the handlers are called, your arguments are taken apart for you.
  • The url-info code doesn't need to worry about how it's going to be used. It's just as easy to use the failure case to get work done, as it is to use the success case.
  • It is possible to create a library of handlers that are defined independently of the url-info package. One use for this might be to standardize error handling on a on a per-project basis.
  • Converting this generic handler approach to the Java info object/exception approach is fairly painless. Yet other interesting patterns are available.

What's the down side? The major down side is that the nesting of different calls can get somewhat confusing, and this all breaks aways from the standard C like control flow so many developers are used to. However, given the fact that the above approach can be so powerful, I think the initial readability issue is a reasonable trade off.

I ended up implementing the handler style approach. So far, I'm liking how it works. However, we'll see in a few months if I still love it.

If you were writing this same function, what would you make the API?

Sunday, August 12, 2007

Diet Coke - The Hydrator?!

Here's the marketing text from a package of Diet Coke:

Research shows that all beverages contribute to proper hydration. That means whether it's your first can of the day or your afternoon pick-me-up, Diet Coke helps you stay hydrated all day long.

Talk about chutzpah! It's one thing for Coke to push Diet Coke as a drug distribution method, for "an afternoon pick me up." But to claim it's good for hydration, please.

And look how weak the claim is - "Research shows that all beverages contribute to proper hydration. " I see, so anything wet is good for hydration. I would imagine that Drinking Diet coke is only slightly more hydrating than drinking, say, motor oil. But whatever - it at least contributes to hydration.

My guess is that Diet Coke is making a statement against all those water snobs who claim that water is so pure and good for you. They are giving their drinkers just enough of an excuse to have them feel guilt free about ingesting this chemical concoction, instead of water. My guess is that sadly, it works.

Pardon me, I'm going to go have a hot fudge sundae for the calcium in the cream. It all contributes, you know.

--Ben

Diet Code - The Hydrator?!

Here's the marketing text from a package of Diet Coke:

"Research shows that all beverages contribute to proper hydration. That
means whether it's your first can of the day or your afternoon
pick-me-up, Diet Coke helps you stay hydrated all day long."

Talk about chutzpah! It's one thing for Coke to push Diet Coke as a
drug distribution method, for "an afternoon pick me up." But to claim
it's good for hydration, please.

And look how weak the claim is - "Research shows that all beverages
contribute to proper hydration. " I see, so anything wet is good for
hydration. I would imagine that Drinking Diet coke is only slightly
more hydrating than drinking, say, motor oil. But whatever - it at
least contributes to hydration.

My guess is that Diet Coke is making a statement against all those water
snobs who claim that water is so pure and good for you. They are giving
their drinkers just enough of an excuse to have them feel guilt free
about ingesting this chemical concoction, instead of water. My guess is
that sadly, it works.

Pardon me, I'm going to go have a hot fudge sundae for the calcium in
the cream. It all contributes, you know.

-Ben

--
Ben Simon
My blog: http://benjisimon.blogspot.com
Got a software idea? http://i2x.blogspot.com

Network Hacking Tool Of The Day

I just finished helping a friend get his home network setup. He's moving into a new place that's pre-wired with CAT5 almost everywhere (except the kitchen - kinda strange place to leave off). The cables all come into a box in the basement which has all sort of oddly labeled jacks. For example, what do you plug into the tap-A/modem slot?

Luckily, I had the right tool for this job. In this case it was a Ethernet cable tester which let us cut through the cable fog to reveal what really is connected to what.

Cable testers can be fairly expensive, though I managed to buy a cheap Chinese (or Japanese?) rip-off. I can't understand the manual, but the tester itself works like a champ. If you do get a tester make sure it splits into two pieces to test cables that have end points spread across a distance.

What a difference the right tool makes in getting the job done. Once we knew what connected to what, getting things plugged in was easy.

If you are handling Ethernet cable at all, this is a must have tool.

--Ben

Sunday Breakfast and UI Lesson

We busted out the waffle maker and Bisquick for a real Sunday breakfast. Even though we hadn't used the waffle maker in some time, the waffles still came out perfect. I attribute this to both Shira's cooking skills, and the waffle maker's UI.

Our waffle maker is the Macintosh mouse of kitchen appliances. It has a single light which represents the entire UI. No knobs, LCDs or dashboards. Just a light.

Plug in the waffle maker, light comes on telling you it's alive. Then it goes off when it's ready for use. You add batter, and the light comes on again. When the light goes off, it's time to eat.

I'm sure marketing was annoyed that the whole UI was driven by a single yellow lamp. But where's the color LCD? And what about the built in timer/radio, that our competitor has? Fortunately, elegant engineering won out here, and I had perfectly cooked waffles this morning without needing to consult a manual.

Lesson of the day - prefer simplicity and Doing The Right Thing over feature lists. Bonus lesson: add whip cream whenever possible.

For the record - the sausage links in the photo are Morning Star farms veggie sausage - very yummy stuff.

--Ben

Friday, August 10, 2007

Alarm System Annoyance

Shira got a call at work - the house alarm was going off. After using her past police experience to clear the area when she got home (no, really, she did), we determined the problem.

Apparently, our house is impenetrable by burglars - but is putty in the hands of gravity.

Curse you gravity! You're always causing things (like alarm sensors) to fall.

--Ben

Tip: Remembering to get your parking ticket validated

In the spirit of TipBin:

To remember to get your parking ticket validated at the super market, stick it in your wallet in front of your Visa card. When you go to pay, you'll have to take it out - reminding you to get it validated as you leave the store.

I just made-up/discovered this one while shopping at Harris Teeter.

Christian - I so need the mobile interface to TipBin. How's it coming? ;-)

--Ben

Here's a Tip - TipBin.com

My friend Christian recently finished coding a new web app - TipBin.com. It's a simple and cool concept - the site is a repository of brief tips.

The tips cover a wide variety of topics, from parenting to Linux administration (oh wait, maybe those topics aren't that different). Here's a sample:

Improve the growth of your tomato plants by placing a layer of red material such as plastic, cloth or mulch around the base of the plant. The red color reflects specific wavelengths of light that encourage the plants to grow, ripen and focus growth above ground instead of the root system. --rhall

The best part of TipBin is that it's so easy to contribute to. Once I worked up the courage to post one item, more ideas just started coming to me. As Christian says on the site - You know things that other people don't. So true.

It's actually amazing how much useful advice can be imparted in 320 characters.

Also, I have to say - Christian's wife, Michelle, is officially the tipmaster. She's got a tip for everything. Next time I need advice on anything, I'm going to her.

--Ben

Beamer's New Baby

Look at this proud father - holding his new 3G, Samsung Blackjack phone. Beamer even installed Google maps on it, so he was finally able to make it to work on time.

So, nu, when is he going to start a mobile blog? A Twitter stream?

This is quite an upgrade for Beamer - from an ancient Nokia 3120 candy bar style phone, with a whopping 4 lines of primitive text, to the top of the line.

Welcome to 2007 Beamer, glad to have you.

--Ben

Thursday, August 09, 2007

Definition: PMA

Shira mentioned to me that I've been using the word PMA without defining it for the world. Whoops.

PMA is an acronym for Positive Mental Attitude. It's a label assigned to anything which is designed to lift your spirits.

Sample usage:

After a day like that, you need some serious PMA. Check out these quotes for a healthy dose.

Teresa gets the credit for being the first person who used this phrasing around me.

Of course I love to blog about PMA. Check out all my PMA related posts here.

Contributing To An Open Source Project - Screencasting

I was poking around for Open Source project management tools when I came across activeCollab. On the front page is a introductory screencast, which takes you through the basics of the system.

The screencast is nice - but what really surprised me was that the coders on the project didn't produce it. A user (and no doubt, fan) of the system did.

What an excellent way to give back to a project. The screencast provided a nice balance between an advertisement and documentation for their tool. It inspired me to go to the next level and download it.

What a clever and valuable way to give back to a project.

RPM Fix - Lock table is out of available locker entries

I just noticed one of my servers was acting kind of sluggish. I ran an uptime and was greeted with:

 [xxx@yyy zzzz]$ uptime
 15:34:23  up 277 days,  2:14,  4 users,  load average: 518.68, 196.46, 71.51

Holy smokes!

After killing a whole bunch of processes with:

   sudo kill -9 `ps auxww|grep command-to-kill | awk '{print $2}'`

the system finally recovered. I thought I was out of the woods. But, when I went run an rpm -Uhv on a package I was greeted with this message:

 [xxx@yyy zzz]$ sudo rpm -Uhv php-gd-5.2.3-5.i386.rpm
 rpmdb: Lock table is out of available locker entries
 error: cannot open Packages index using db3 - Cannot allocate memory (12)
 error: cannot open Packages database in /var/lib/rpm

D'oh. After a Google search, I found the fix to this problem here. Which boils down to:

 rm /var/lib/rpm/__db.00*
 rpm --rebuilddb

The rebuild command took a minute or two to run. Then all was well again. Whew.

Review: Dave Barry's Money Secrets

Mr. Barry and I did not start off on a good note. I listened to the first disk of his Money Secrets, and found it more annoying than entertaining.

I then took a break, and listened to a so-so FBI thriller.

With trepidation, I returned to the Dave Barry CD's. The 2nd disk was more palatable. By the 3rd disk I was laughing at every joke. It turned out to be terrifically funny.

While the book is supposed to be about money, Dave manages to cover pretty much whatever topic he wants to. His thoughts on buying a house, travel, and stock brokers are absolutely hilarious, among others.

Take his advice on estate planning. What's the most important issue with estate planning? Choosing your last words. This is key to have this planned out ahead of time, or you could really blow it. And the second most important? Thinking of outrageous requests to make your family fulfill with respect to how to dispose of your body.

I'm not quite sure why I had a near complete turn around with my appreciation for the book. Part of it may have been my mood at the time. Another big chunk may be related to the fact that this was a book on CD. Dave's humor is all about irony, and it may simply have taken some time for me to get use to the way the narrator delivered the text. My guess is that it is much trickier to voice a book that requires a near 100% sarcastic tone the the whole time, versus a typical novel which only requires small doses of this.

I give the book a 8.8/10.0 for being quite funny, even with a rough start.

--Ben

Wednesday, August 08, 2007

A Doctor's Visit Without The Alone Time

Tonight I visited a new doctor (nothing even remotely life threatening, promise) for the first time, and this is my lesson-learned-post. Notice anything that's missing?

The photo, of course.

I usually grab a snapshot of the office as I sit around and wait for doctor to make his or her appearance. I've even written entire blog posts while waiting for a doctor.

But not this evening.

First, let's take a step back. The doctor's office had me (read: Shira) download and fill out the lengthy history form at home. This is pure genius. I just walked in, handed her the form, and I was good to go. I hate arriving at a new office and spending 20 minutes trying to figure out what year I had may tonsils out, or if I'm supposed to check "no" on the pregnancy box or leave it blank.

When they did call, the nurse took me back to the room as usual. She collected a bit of info. Then, rather than disappearing like they usually do, she keyed in the info on a laptop right in the room. In fact, she never left the room. As a side note, she also didn't make me sit around in my skivvies or complain about how expensive a surgical table is, and then proceed to use the side of my face as one. But I digress.

The doctor then came in, and did his thing.

I have no pictures of the room, because I was never alone to snap one.

I find this most impressive.

There may be a few reasons for this policy. On one hand, the office was tiny, and this may just be a space saving device. Or maybe it was the end of the day, so they weren't busy. But, maybe, just maybe, someone realized that as technology advances, so can your customer service practices.

I didn't get a photo, but I did get a sense that someone actually cares about me. It's a fair trade, I guess.

My Vote: Yes On R6RS

I've been debating if it's appropriate to blog my reasoning for my vote yesterday morning on the latest Scheme standard. My decision was finally tipped by Will Farr, who did just this. As far as I can tell, nothing terrible has happened. (Right Will?)

I voted Yes. My comment, though not needed, was:

While there are some aspects of R5.97RS that I'm uncomfortable with, I think it's an overall step in the right direction. I'm confident that time will tell which aspects of the report need to be corrected, and that this will be done for R7RS.

Pretty cheesy, but what do you want for a message composed at 5:30am?

Overall, the standard is really good. I love that Unicode, syntax-case, libraries, byte level access and many other goodies were added. My first thought, like others, was that the core spec was too long, but after looking through it, I really don't think it is. Sure, the page count might be a bit high, but the core spec doesn't appear to have any obvious fluff to me.

So, what did I mean by aspects of R5.97RS that I'm uncomfortable with? Two things. First, I would have preferred to skinny down the standard library part of the report of the report. I would have been more comfortable with making chunks of it various SRFIs.

Currently, SRFIs provide libraries for lists, strings and dates. Why can't that same approach work for records, hashtables, and enumerations?

This strikes me as important because I'd like to see the standard stay as small as possible, and at the same time continue to grow the set of existing SRFIs. I think this is a real issue, because, as Java has shown, there's no limit to how large your standard library can grow. What happens when we want to add in stacks, queues, or more threading support? Does that go into the R7RS, or SRFIs?

The other point that was nagging me was that libraries aren't composable. I've come to really like Chez Scheme Modules, which provide basic control over namespace, yet can be composed together in interesting ways to provide more functionality. It seems more appropriate to provide a low-level, general purpose, feature like modules in the spec to me, rather than the heavier-weight library system.

After asking around, I learned that I'm essentially asking for are local libraries. Here's what the rationale document has to say on that topic:

Moreover it is debatable whether a top-level library should be the same construct as a local module. The job of the library system is to organize the top-level namespace, and not to serve as a target for expansion of sophisticated macros. Of course, the broader roles and syntactic similarity of module and library suggest merging the concepts, but merging the concepts further broadens the role of each. Such generalization may seem intuitively right to Scheme programmers, but all attempts by the editors at such broadening led away from consensus rather than toward it.

In other words, the drafters of the standard and I are on the same page - they just couldn't find a way to make it work. These are very smart folks, if they say they can't figure out a way to merge the concepts, then I believe them.

I'm pretty confident that by the time R7RS comes out, we'll either have figured out the solution to this problem, or will have decided that it's a non-problem altogether.

One final thought: vote yes, vote no, but whatever you do, just vote. Your vote is due Sunday, so get it in.

Tuesday, August 07, 2007

It's not the heat, it's the humidity

I see - it only feels like 101F degrees, it's really a nice cool 92F out there.

Looking outside my office window, I can almost see the humidity floating in the air. How typical for DC.

Shira and I have already started the discussions as to whether I can go for a run tonight outside or not, like I want to. So far, she's winning. Triple digits will do that.

Update: Here's a google talk session I just had with Shira on this topic:

Shira: "People don't realize it, but heat is generally the number-one killer" among weather-related causes, said Ben Miller, a meteorologist for the National Weather Service office in the St. Louis area. "We've gone all year without a serious heat wave so we want people to be aware of what to do to keep themselves safe."

Shira R. Simon is online.
Sent at 2:04 PM on Tuesday
Ben: tell it to the blog

Shira: I'm telling it to you
The weather forced the St. Louis Rams inside for daytime workouts this week.
Ben: it's well know that the St. Louis Rams are a bunch of chicks

Shira: with hand carts?

Sent at 2:10 PM on Tuesday
Ben: perhaps

Update: See, it's later in the evening and it's already cooling down. I have no idea what Shira's so concerned about.

Update: D'oh, we are going the wrong direction. What the heck kind of city has temperatures of 103F at 6pm?

My Twitter Theory

In The Beginning

Blogs have always served a pretty standard purpose: they are individual's publishing platforms. In the early days, they often gave voice to essentially whatever the author was thinking - from political ideas to what they had for lunch. Blogging also came with a novel addition - RSS. RSS allows you to follow dozens of Blogs all with minimal effort.

This combination of a publishing platform and a way to syndicate it, made for huge possibilities.

As the medium grew up, people realized that the more specialized your blog was, the better. Focus just on politics, gadgets or even random web findings, and leave off the stuff about your lunch, and you'll get more readers, revenue and respect.

Along comes Twitter which says that you can keep a blog in 140 character chunks. Do bloggers, who have been refining their craft for years, laugh them off the scene? Nope, they totally embrace them. And here's my theory as to why:

Twitter allows you to maintain an old-school-what-I-had-for-lunch blog alongside your profession, finely tuned one - all with a minimum of effort.

At a 140 characters a pop, Twitter allows you to satisfy your personal blog needs without a minimum of energy. Also, at this point, many blogger's have RSS feed lists that overwhelm them. Twitter comes along solves this by giving you to the option to skip RSS entirely, push the content directly to your readers.

Why do you need a personal blog at all? Well, that's probably another topic for another day. I'd say that the reasons range from: you want to keep Mom and Dad informed of your weekend plans, to having a place to publish your wacky theories.

So What?

Why do I need a theory on Twitter anyway?

  • I'm trying to explain why smart people are so excited about Twitter.
  • I think it explains why Twitter is less interesting to me personally - my blog is a variety show already, I don't need one on the side.
  • If you considering starting a blog, you might want to start with Twitter. You can get all the benefits of a personal publishing platform in a package that couldn't be easier to keep updated.

Any suggestions for improving my theory (or is it a hypothesis? Can't remember which is which.)? Am I way off base?

Monday, August 06, 2007

Twitter As A Publication

Here's another perspective on twitter: it's a publication, not a communication tool. Interesting stuff.

I'm still not 100% sold on twittering as a useful addition to my blog. Though I'm going to keep it up a while longer.

Anybody out there finding it useful? Suggestions how to make it more so? I'm looking for friends to should follow, so let me know if you're a twitterer.

--Ben

Office Makeover

We put the team to work this evening to shuffle around Jade, Tonya and Chris' office.

I think the switch around was a success. The room feels way more open and light now.

Tonya - sorry in advance if you didn't want your desk in this position. It can all be undone.

--Ben

Before

After

Review: The Simpsons Movie

Last night Shira and I saw The Simpsons movie. I have to say, I wasn't that impressed. OK, it got me laughing a few times, and after sleeping on it, I've decided I liked the storyline.

Unfortunately, it just didn't compare to Simpsons during their hayday.

If you aren't a big Simpsons fan, I'd save my money on this movie and invest it in some DVD's of the classic seasons. (Anyone want to say in the comments what seasons are the classic ones?)

Still, it had enough jokes in it that I was still chuckling this morning, so it wasn't a total flop.

If you do see the film, make sure you hang out during the credits. There's at least one historical moment in there.

I give it a 7/10.

--Ben

Update: David thinks I'm full of crap and wouldn't know a good movie if it up and bit me. Well, he didn't quite say that, but check out the comments - he really liked the movie and explained why.

Update: My brother David had a different perspective on this, and really liked the movie. Check out the comments to see why.

Sunday, August 05, 2007

Truck Maintenance

Some of what I saw while Ben and Justin were working on Justin's Truck.

Interesting views.

How To Win Friends and Influence People

Forgot all those self help books. Just buy a buffer and go around buffing out scratches for people. You'll be performing an act of magic.

That's what Justin's doing this afternoon. And I can tell you, he's earned my friendship for life.

(Well, he did so by being a nice guy. The buffer is just a bonus)

--Ben

Before

After

Jr. Assistant Associate Mechanic

I'm helping Justin put new brakes on his truck. My jobs: blogging the experience, giving moral support and pumping the brake pedal to release fluid.

Hey, pumping isn't as easy as it looks.

I even got a whiteboard hack out of this too. I used a whiteboard marker to track where the brake fluid was pre-draining. I could the erase and re-draw the line to track our progress.

We are mid process, so wish us luck.

--Ben

Friday, August 03, 2007

My Next Fridge

Forget fancy stainless steel appliances. And you can keep your internet accessing refrigerator.

Make my next fridge one covered in a whiteboard surface. How cool is that?

Thanks to Simon for sending the link my way.

Productivity Down, Life Good

A bit of excitement at the office, as a pretty nasty looking accident just happened outside our window.

This means that we have to stand at the window to watch the details unfold.

It also means that at as bad as my day may seem, it could be tons worse.

--Ben

Thursday, August 02, 2007

Hacker In Training

I give you the web's next hacker. I asked him if he had his own blog
yet, and he told me no. Though, he may just be keeping it under an
assumed name.

And ladies, to my knowledge, he's not attached.

Shira and I are really enjoying baby sitting duty. The kids are being
fantastic. I know I was never this well behaved. Ever.

I have to say I'm dissapointed in Vtech, the creator of the laptop in
the photo. How could they not make the keyboard qwerty? And providing a
mouse instead of keyboard shortcuts. What kind of bad habits are you
instilling in America's youth?

--Ben

Battery Woes Solution #1 and a 1/2

After my rant last night about the poor battery life of my phone, a
partial "solution" came to mind.

Why don't I take an cell phone I have lying around stash it in my desk
or car? Then, when my Sidekick dies, I will simply grab the sim card
from it, and stick it in my backup phone. I should then be temporarily
back in business.

I'll be able to make calls and write short blog posts. Naturally,
these posts will almostly exclusively be about my sidekick's battery
life and the frustration it causes me.

At least I won't have that sense of dread that comes from being
disconnected. Of course, I'll also lose that odd calm and serentity
that comes from being disconnected. Oh well.

As for the 1/2 a solution to my battery life problem - I dimmed my
screen display.

It's 4pm and I'm at 3 bars - not great but better than yesterday.

I called T-mobile and spoke to a fellow in their Sidekick group. He
couldn't have been nicer. However, at the end of the conversation, all
he could do was sell me a $50.00 battery. I'm going to try to pick one
up cheaper on eBay (no doubt $1.00 for the battery, $49.99 for
shipping).

Mobile devices: the cause of, and the solution to, all of lifes
problems.


--Ben

Lunch Creativity

I think it's safe to say that I'm the first person on the planet to have
my veggie tex-mex meat like substance on, get this, wheat bread.

Some might say I've run out of things to bring to lunch.

I like to think of it as fusion cooking.

--Ben

Wednesday, August 01, 2007

Cell Phone Kvetching

At 4pm I noticed my battery was down to 1 bar. At 7pm tonight, I was completely out of juice.

This is unacceptable.

I charged the phone completely last night, and it can't make it through a full day of usage. It wasn't even particularly heavy usage.

I've officially changed my mind as to the biggest issue with the Sidekick III - it's no longer the camera, it's the battery life.

I totally have the urge to search eBay for a cheap phone with a qwerty keyboard that gets good battery life and would fulfill my basic needs: surfing basic web sites, posting to the blog, and of course the occasional phone call. (Does such a beast exist?) But inevitably, I'll just suck it up and go on with the SK III. I think I'll at least buy an extra adapter or two to keep at work or in the car.

Maybe it's time to buy a replacement battery?

--Ben

Postgres Xid Type Confusion

This morning I was trying to write a query against pg_locks but received this gem of a message:

  ERROR:  could not identify an ordering operator for type xid
  HINT:  Use an explicit ordering operator or modify the query.

It even gave me a hint, and I still have no idea what the heck I'm supposed to do to fix it.

A Google search turned up this promising discussion. Unfortunately, it turned out to be a dead end, as the poster resolved his problem but I couldn't extract a solution from it.

I ended up looking for an alternate approach. From checking the postgres source code, I learned that an xid is output as a cstring. From Googling around, I learned that it's possible to convert cstrings to text by using the very handy function:

create or replace function any2text(anyelement) returns text as '
 begin
  return $1;
 end;
' language plpgsql;

As the name suggests, the function above will convert any argument to text - not just xids.

With any2text I am now able to say any2text(transactionid) to convert this type as text. This means that, among other things, the group by clause can now work and my error above went away.

Warning: the above may in fact be a terrible idea. I'm not quite sure. I just know that it seems to work as advertised, and for my ad hoc queries was what I needed. I'd do a wee bit more research before I used this in a production system.