Archive for December, 2008

GUI C++ TDD

Sunday, December 14th, 2008

Mocking out native gui control classes for testing is a righteous pain in my ass.

I’m just sayin’ yo.

annddd… this one goes out to all you cat lovers out there

Friday, December 12th, 2008


UPDATE: Let’s try that again shall we? Mmm kay. (f’ing “visual” mode)

Buh bye limewire

Friday, December 12th, 2008

No, not the filesharing service.  I haven’t used THAT in a dog’s age.  Ok, well it is that, but different…

For months now I’ve been getting these weird site hits to old MovableType URLs (from back in the day.)   Something’s clearly been trying to snake the site using an old list of pretty exhaustive links and an algorithm that’s really impressively bad.

I’ll give them credit for being “polite” as far as their bandwidth utilization.  There seems to be about one full page load (images, etc) every couple/few hours.

Those all get redirected to my front page (as do some very confused google searchers) so they’re always getting the exact same content.

It’s polluting my already anemic blog hits with craptastic data, so today I finally decided to go block the ip address and, while I was there, go dig around and figure out what it was.  Turns out it’s from a server in Tulsa owned/operated by Limewire.

The IP is 208.111.154.249

Bring me Solo and the Wookie

Thursday, December 11th, 2008

Careful what you ask for

Thursday, December 11th, 2008

So yesterday was the “day without a gay” protest.

The notion was that, in protest of Prop 8 (you remember, the proposed and passed by democratic vote ban on gay marriage in California?) that gays would call in “gay” on Wednesday (semantically equivalent to calling in sick) so that… ahem…

People would see the social and economic relevance of gays.

Well guess what?

It worked.

Paglia knocks another one out of the park

Wednesday, December 10th, 2008

I can read her columns all day.  She’s without a doubt my favorite thinker from the loyal opposition.

Here she talks about Hillary, Mumbai, Prop 8 and a host of other juiciness…

What do the Clintons have on Obama?

Disco Inferno

Monday, December 8th, 2008

Does my cold black heart good.

Times Co. to borrow against building

The New York Times Company plans to borrow up to $225 million against its mid-Manhattan headquarters building, to ease a potential cash flow squeeze as the company grapples with tighter credit and shrinking profits.

Of course the article doesn’t mention the part of the emergence of new media having illuminated the Grey Lady’s decent into the land of suck.

But that’s ok.

High-Res Society

Monday, December 8th, 2008

I saw this little post a few days ago and it’s been bugging the shit out of me for a few reasons. My plan was to wait until I’d collected my thoughts, then go post a comment. Frankly my tolerance for “you must register to comment” is exactly zero, so to hell with that.

Instead here’s a fragment of my thoughts.

But first, the first paragraph:

The High-Res Society

For nearly all of history the success of a society was proportionate to its ability to assemble large and disciplined organizations. Those who bet on economies of scale generally won, which meant the largest organizations were the most successful ones.

The first thing that strikes me here is that organizations aren’t successful because they’re large, they’re large because they’re successful. THAT in turn gives them the resilience to move forward.

From that point, most of Graham’s argument seems to have some major structural flaws. There are always and have always been entrepreneurs.

YES, the information landscape has brought that into the realm of everyman (read: those without the entrepreneurial drive and motivation to have previously done the work to start a business.) So there will be an awful lot more start-ups per capita. And that can only be a good thing. (More grist for the mill, etc.)

But the underlying smell in the piece of “small is the new large” is, well… dopey.

Fits and Starts

Sunday, December 7th, 2008

By looking at my last half dozen posts it oughta be clear that I’ve got something in the pipe. It’s not going to set the world on fire, but it is going to put a stone on the ground I can stand on to help me reach the torch.

But I find it nigh imPOSSIBLE to write software when it’s light out.

It’s always been true.

I try all the environmental tricks. I put on the Buddha Bar playlist (great for working to.)

But now matter what I try it’s as though I’m uberADD during the day. I’ve been forcing the issue this weekend, which is tough. But I have to get this application to the DogfoodStage soon or it simply won’t have enough momentum behind it and it’ll be relegated to the boneyard like so much else.

Ya know what we need?

Sunday, December 7th, 2008

And by we I mean I.

We need a Best Buy up here near but not in Brooklyn Heights. Put it about 8-10 blocks deeper in to Brooklyn on Atlantic Avenue or something.

good god am I whiny

Sunday, December 7th, 2008

I took a claritin (sp?) thinking that would dry my head up a bit.

Now everything is dry but my nose.

waaaa :(

C++ TDD ROFLMAO

Saturday, December 6th, 2008

When doing TestDrivenDevelopment with your own homebrew xUnit test framework that uses extensive exception handling for test failures, don’t flip out when, while running the test app in the debugger, the debugger breaks a nail screaming about thrown exceptions.

Then definitely do NOT spend a half hour looking for errors in the library code.

I’m just sayin’ yo.

Well it’s good for a yuck anyway.

I’m glad I’m working on this project. My chops are clearly still there, but I’ve forgotten so much of the plain old stupid shit that just happens.

I don’t know how far I’m going to get on this project over this weekend, since I’m at least as likely as not to see something shiny. So I’m not going to start pumping it up yet.

gick

Saturday, December 6th, 2008

I feel like somebody snuck into my bedroom last night and pumped half a gallon of toothpaste in my sinuses.

Bettie Page

Saturday, December 6th, 2008
Bettie Page Hospitalized

LOS ANGELES (AP) — Bettie Page, one of the most notable models of the 20th century, is hospitalized in intensive care after suffering a heart attack in Los Angeles.

Mark Roesler, Page’s agent and attorney, says Friday that the 85-year-old is “critically ill.” He says she suffered a heart attack Tuesday and remains hospitalized.

Keep a good thought, peeples.

(h/t: SondraK)

ninja kitty

Friday, December 5th, 2008

I loled

default CType bad in gui but not console?

Friday, December 5th, 2008

I’ve been cruising along developing this app in Borland’s C++ Builder when I ran into the strangest stumbling block.

When I open an ofstream in the test application like so:

std::ofstream outFile(”foo.bar”);

everything works just duckiliciously.

However, when I execute the same line of code within the context of a gui app’s menu save event trigger, I get a huge explosion.

Over the last 45 minutes I’ve been back and forth, tracing it through and I’ve come down to a problem with the locale. the getloc() method in std::ios_base (which is just returning a dereferenced _Ploc) is crapping out all over the place, as if the default _Ctype doesn’t exist in the context of the gui app.

Is there some kind of standard library initialization that’s going on in the console app that isn’t going on in the gui? I’ve been pouring over the build and link options and everything SEEMS ok. But I have to be missing something.

“Oh yeah, development’s going great. I mean, aside from the fact that I can’t get it to SAVE” doesn’t work.

As a goof, here’s the stack:

std::ios_base::getloc(this=:0012FB48)
std::basic_ios >::widen(this=:0012FB48, _Byte=’ ‘)
std::basic_ios >::init(this=:0012FB48, _Strbuf=:0012FAF0, _Isstd=false)
std::basic_ostream >::basic_ostream >(this=:0012FAE8, _Strbuf=:0012FAF0, _Isstd=false)
std::basic_ofstream >::basic_ofstream >(this=:0012FAE8, _Filename=:004071F6, _Mode=2, _Prot=438)

UPDATE: Well I’ll never run in to this problem again, so I’ll put the answer here just in case I’m wrong about that too.

The call to the std::ofstream constructor in the gui app was taking place inside a dependent library that had options incompatible with the gui application itself, but not with the console application. So in one case it was using the correct (read: matched) ctype and locale information and in the other case it wasn’t.

Pulling it out of the library (where frankly it didn’t really belong anyway, I was prematurely optimizing) into the main project worked just duckiliciously.

I’ll bet you all were really worried huh?

YOUCH!

Friday, December 5th, 2008

I’d completely forgotten that, when taken right out of the microwave and eaten, Hot Pockets are little doughy envelopes of napalm.

I’m not going to be able to taste anything for a day and a half. S’pose I should use the opportunity to eat a bunch of broccoli or something.

Yeah.

Right.

Silly Us

Friday, December 5th, 2008

Comment Status

Friday, December 5th, 2008

For some reason, when I imported all the 3400 or so posts from the previous two incarnations of this blog the comment status was set to ‘closed’ on all the imported posts.

I just logged in to the WP database and ran some DML to open everything. So we’ll see what happens.

iDock?

Friday, December 5th, 2008

So, can someone tell me why Apple doesn’t make any kind of docking station for their mactops? I love the keyboard on the thing but I have a pathological hatred for trackpads, so much so that all I use this for is watching the market and writing while I’m sitting in bed.

It would be such a simple piece of hardware.  You could even make it some sort of dongle thingie that plugged in to the right-side of the ‘top, since the dvi, 1384, usb and network plugs are all right there.  I’m pretty sure some enterprising fabricator could bang something out that would serve the purpose.  I, unfortunately have no idea what it takes to get something like that done.

I’d use it an awful lot more.  Hell, I might even bias towards using this as my primary box.

I’m just sayin’ is all.