Log in

No account? Create an account
Greg [entries|archive|friends|userinfo]

[ website | gregstoll.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Links:| * Homepage * Mobile apps (Windows Phone, Win8, Android, webOS) * Pictures * LJBackup * Same-sex marriage map * iTunesAnalysis * Where's lunch? ]

random WTF [Dec. 5th, 2007|05:50 pm]
[Tags|, ]
[Current Mood |amusedamused]

I don't usually post stuff like this, but this is possibly the best programming WTF ever. Add() reallocates memory each time (although I guess maybe the C# Array class does the doubling thing for you?), and Remove()...ow, my eyes! O(n^2) FTW.

The explanation at the end, of course, seals the deal.

[User Picture]From: djedi
2007-12-06 03:46 pm (UTC)
(Reply) (Thread)
From: brittongregory
2007-12-06 07:13 pm (UTC)
See, I was almost sympathetic with James -- it's a pretty naive class, but I tend to be naive until I know I need to work on performance -- until the explanation. Then I lost hope. ;)
(Reply) (Thread)
[User Picture]From: othersider
2007-12-09 01:25 pm (UTC)
Wow. I am at a loss for words. Where do you even begin with this guy?
(Reply) (Thread)