Pages

October 11, 2006

House of Mouse: see you in 7

We're off to Disney World! We'll be gone for a week or so, so... see you then :)

The kids have been packed for a week and had their suitcases by the door - just in case we have a vacation emergency.

Soooooo fun!

October 10, 2006

GooTube: Google buys YouTube

WWWWoooooowwww.

I guess they can
afford it, and its nice to extend the brand (if you're hunting for some rationalization - which we all are :)), but still - it's a bit nutsy (and they're potentially risking more than the invested cash).

Well, no matter how you slice it , its a bold move in the citizen video space - and it should be interesting to see what Google make of it, if nothing else. In particular, if they can stick to their new mantra ("features, not products") seriously with this acquisition - well, could be very interesting. All in all, I'd say: crazy deal, but probably not a bad idea for the involved parties.

Let the good times roll - :) remember this?
Dot-com-2.0 craz-azee-zaniness (and some background).

October 6, 2006

Google Code Search

Yesterday, Google publicly released their source code search tool - which is pretty nice. I'd not like to be koders or krugle just now (hey, this is just like when Microsoft used to release products, back in the day!)

When people wonder what possible
chink there could be in Google's armor: this is it. Specialization of presentation - of interface - tends to win over time. This is at once less of a chink and more of chink than I think people generally think (I think :)).

That is, although I do believe in the power of specialization over consolidation, from a UI perspective, that doesn't necessarily speak to economies of scale, from an execution perspective - it only addresses
user fickleness and opportunities for behaviour disruptions.

On a minor note, I'd wish they'd be a *tiny* bit more consistent with the root URLs for their products - as a user, its annoying. For example, their
code search product is at http://www.google.com/codesearch, while you reach their blog search at http://blogsearch.google.com or http://www.google.com/blogsearch. For a company that pays attention to the little details of experience, you'd have hoped they'd have codified that at least.

Updated: I take it back (I did say that Google cares about details :)) - http://codesearch.google.com works now; it didn't until well after my post.

October 4, 2006

Some new AOL software

You should check out Light AIM (*ahem* LAIM) and AOL OpenRide.

Very different product, uh, vectors, for lack of a better term, but both are interesting because they're DIFFERENT (yay!). Good to see some products that are not just cloning the marketplace from AOL... whether they're great or just flops I guess the market will tell us, but certainly they're not attempts to produce "good enough".

October 3, 2006

Problems with Integer Overflow Math and Detection, pt 3:
Easy overflow arithmetic, no assembly required.

Updated: Some nice profile results on GCC from Eric O'Laughlen. Full optimizations on I think is the important case.

Continued from Part 2. Inspired by this post from Google.

I think I'll do a full article on this shortly - covering the full range of mathematical operations, because this is fairly simple but important (for example). Oddly, most of the default answers seem to be 64-bit math (Microsoft and Linus/Linux) or assembly (everybody else). I'm not sure why - perhaps I'm missing something? But first, some performance results:

--------- Testing Addition
--------- Math requiring no overflow detection, but still testing for it
-------------------- This is for speed (overhead)
Test Simple........... total: 100000001 Time = 651.314 ms (1)
Test ASM Safe......... total: 100000001 Time = 1799.14 ms (2)
Test MS Safe.......... total: 100000001 Time = 1205.74 ms (3)
Test ASM SETTO Safe... total: 100000001 Time = 706.609 ms (4)
Test Sree C Safe...... total: 100000001 Time = 694.44 ms (5)

Key:
(1) is a+b, just for a baseline
(2) is the common Assembly solution I've seen a few places on the web
(3) is the Microsoft SafeInt class
(4) is the assembly recommended by Eric, following Mike
(5) is my C version (below)

The basic idea is really simple, and pretty obvious for the unsigned integer case, as everyone points out. If you add two positive numbers, and the result is smaller than either number, your addition overflowed.

It gets a little more complicated for the signed case, but not really THAT much more complicated. Basically, if you want to test if the result of an addition is supposed to be greater or less than a specific number, you only have to look at the sign of the OTHER number. That is, if you're testing if "a+b" overflowed, the unsigned test is "a is greater than c" and the signed test is "(a greater than c)!=(b less than zero)" (we can optimize that "b is less than zero" test, such that this becomes two compares and one jump).

So the code for my fast C version - you can plug it into the benchmark source I posted yourself:

__forceinline long __sreeSafeadd(long a, long b)
{
long c = a + b;
if ((a<=c)==(unsigned long(b)>>31))
SafeIntOnOverflow();

return c;
}

Its not what I might call "maximally" portable, in that it presumes two's-complement and basic processor oveflow arithmetic, but its basically as good as it gets (IMHO). It also uses one of my favored "mini-patterns" - using comparison as a computation value, as opposed to just as just a branch variable. This pattern extends fairly well to all the common overflow arithmetic math operations, amongst other things, though being a graphics guy, I really just want the stuff to clamp - I'm not sure that people are prepared to deal with integer overflow exceptions. I only used that in these examples because that's how the MS stuff worked that I started with as a benchmark for performance - I think exceptions are generally bad for most programmers and should not be used.

But what suprised me about all this, was (a) lack of "first order" information online, with real benchmarks, and, relatedly, (b) the assumptions folks tended to make about performance (particularly the "its Assembly so its faster"). This is a pretty basic simple (but important) thing, but the error propagation of information on the web was quite high - seems like people have just pushed around the same code and ideas from site to site, as opposed to actually investigating from first principles.

This assumption driven "error propagation" seems like a common problem that I'd hope at least technologists would be more immune from - not so much. I wish I saw more stuff like this for developers.

October 2, 2006

Tech Geeks, Inc.

Heh. Veeeerrry funny, over generalizations, blah blah blah, etc. - but consistent with my experiences with tech culture delusions of grandeur - read this if you're a geek with start-up dreams (and you're vaguely serious about it).

Funniest (to me) were #6 and #7 (Hah! Lisp sux because it is SO productive it makes you anti-social - brilliant!).

Courtesy of Slashdot, naturally (news for nerds).

Somebody should produce the counter - top ten business-guy business myths; any doofus who starts quoting "Good to Great" should Google "logical fallacy" and "appeal to authority"... :) (you know who you are... :P)