· Naughties
· · 2006
· · · June
· · · · 15 (3 entries)

More Binary-Search Breakage · Peter Luschny writes in with yet an­oth­er way to break my sup­pos­ed­ly bullet-proof bi­na­ry search al­go­rithm. You’re search­ing an ar­ray of what­ev­er­s; well sup­pose that ar­ray is de­clared:
What­ev­er[] w = new What­ev­er[In­te­ger.MAX_VALUE * 2];
I checked, and Ja­va will com­pile that hap­pi­ly. Bi­nary search fall down go boom. Sigh. So, if you think you might have more than a cou­ple bil­lion el­e­ments in your ar­ray, you’d be bet­ter off declar­ing all your in­dex­ing vari­ables as long. (Which should be free on a 64-bit com­put­er, right?) I’ll go up­date the binary-search ar­ti­cle to add this cau­tion. [Up­date: Maybe not. Greg Thomp­son and A. Sun­darara­jan both point out that the Ja­va Lan­guage Def­i­ni­tion re­quires ar­ray in­dices to be in­te­gers, not longs. So I won­der why this com­piles?]

Time to Switch? · Ear­ly this mon­th, Mark Pil­grim made waves when he went shop­ping for a new Mac, but de­cid­ed not to buy one, and, in When the bough breaks, wrote at length about switch­ing to Ubun­tu. I’ve been think­ing about this a lot re­cent­ly, and now John Gruber’s writ­ten And Oranges, a fine ex­cur­sus on Mark’s piece. I’m pon­der­ing the switch away my­self, too, and maybe shar­ing my thoughts will be help­ful. [Up­date: Lots of feed­back on the state of the Ubun­tu art.] [Up­date: More from Mark. I feel sick, phys­i­cal­ly nau­se­at­ed, that Ap­ple has hid­den my email—the record of my life—away in a pro­pri­etary un­doc­u­ment­ed for­mat. I’ve had this hap­pen once be­fore (the cul­prit was Eu­do­ra); fool me twice, shame on me. Hear a fun­ny sound? That’s a camel’s back, break­ing.]  ...
Why SavaJe? · A cou­ple of weeks ago, I wrote about my rather mixed ini­tial ex­pe­ri­ence of the SavaJe Jasper S20. I’m mak­ing pro­gress, and I’m go­ing to in­vest a bit more work in this de­vice, be­cause I think it’s im­por­tan­t. In this frag­ment I ex­plain why I think so, with a bit more hands-on nar­ra­tive ...
author · Dad · software · colophon · rights
Random image, linked to its containing fragment

By .

I am an employee
of Amazon.com, but
the opinions expressed here
are my own, and no other party
necessarily agrees with them.

A full disclosure of my
professional interests is
on the author page.