ID:91453
 
Keywords: personal
Well, my first day in full-time employment went pretty well. I may have previously mentioned my cadetship thing in the military-industrial complex - the idea was that when I graduated, they would hire me, assuming they liked my work.

Well I've graduated, and they liked my work, so now I'm a permanent employee at BAE Systems Australia, doing software engineering.

I'm going to be stuck on a reasonably interesting demonstration project once the contract gets under way - some of the programming I was doing as a cadet is associated, so I spent the first day debugging an issue associated with an application I'd been writing as a cadet. Finally got it nailed to the floor. Much as it's famous last words, I think the program in question is now lacking in major bugs, which makes me pretty happy.

The program is, at the moment, basically just a map. It loads up maps in a particular format, and then renders them. Pretty simple, right?

Except that these are high-resolution maps of the entire world, stored in a vector format. And I'm rendering in three projections (planeterre, mercator, gnomonic). And this needs to be pretty close to real time.

Turns out that calling six trig functions for something on the order 2 million points is really slow, so there's a variety of optimisations so that I'm only projecting the points that I need to. Unfortunately, that makes things a helluva lot more complicated. That's where the bug came in. For some reason, in the gnomonic projection, if you kept going north, over the north pole, to a latitude of ~-170 degrees (That is, longitude 180, latitude 80, upside down), everything on screen would vanish. -180 and 170 degrees had the same problem. This would occur no matter what your longitude was.

Turns out that the way I was calculating the bounding box we were using to determine which points needed reprojecting meant that when the map was 'flipped' like that the bounding box was inside out - the calculated top left corner was basically the bottom right corner, and vice versa. The problem would have kicked in the instant the centre of the map went over the poles, except that any case where you're over the top of the poles is specially handled, because otherwise you need the full range of longitude if you can see a pole.

Basically the upshot of all of this is that sometimes I wish we were living on the Discworld.

EDIT: Speaking of the gnomonic projection, I have awesome friends. At a friend's 21st semi-recently, at about 2 AM, we decided we had to solve a problem in projective geometry that was causing me issues in work. Our approach was to get out a globe of the Earth, a translucent plastic lid, a Yu-Gi-Oh card, and a torch, and a whiteboard marker, and use them all together in a devilish scheme to determine how a rectangle projects onto a sphere under the gnomonic projection.

None of us had had a single drop of alcohol.
Sounds awesome, but a 21st birthday without alcohol isn't a real 21st birthday. I hope you guys plan on hitting the bar. ;)
Ulterior Motives wrote:
Sounds awesome, but a 21st birthday without alcohol isn't a real 21st birthday. I hope you guys plan on hitting the bar. ;)

Congratulations on landing a full-time job. Many people would love to be in your shoes. =)
Ulterior Motives wrote:
Sounds awesome, but a 21st birthday without alcohol isn't a real 21st birthday. I hope you guys plan on hitting the bar. ;)

He's an Aussie. He's been able to drink for four years.
Actually, two-and-a-bit years, Pop. Drinking age is 18, I'm 20.

But regardless, I don't drink, and nor do most of my friends. :P
Er, yeah. 18 + 3 = 21. Silly me.
Don't drink? That's no fun.
Disturbed Puppy wrote:
Don't drink? That's no fun.

... the implication being that without drinking, you can't have fun? =|

(That's what alcoholics do.)
That's clearly what he was suggesting.
Popisfizzy wrote:
... the implication being that without drinking, you can't have fun? =|

Sure you can have fun without drinking, but that's not to say cutting loose every now and then isn't a good time. And never drinking is just lame.

(That's what alcoholics do.)

Ever watched an alcoholic break down? THAT's comedy. Also, if you're an alcoholic, you need to learn to have fun without the monster.
I enjoy drinking, I don't enjoy being drunk as much as I enjoy the act of drinking. Therefore, I'll drink, but avoid getting drunk if at all possible. =D

And Jp lives in Adelaide, he doesn't need to drink. The amount of farms growing Weed in the outer suburbs there is enough to put any organised crime syndicate pushing weed to shame.

Believe me, there's plenty more for him to do than drink. ;)

Also, congratulations on getting your job Jp.
I don't do that either, Tib. :P

Disturbed Puppy, I'm just not really all that interested in alcohol. It's not a moral decision or anything - I don't think alcohol is bad or wrong or evil, I'm just personally not interested in it. I still manage to have fun when I'm with friends, funnily enough.
Jp wrote:
I don't do that either, Tib. :P

You can say that, but we both know what you really mean. *Nonchalant touch of nose and a wink*
Disturbed Puppy wrote:
Ever watched an alcoholic break down? THAT's comedy.

No it's not.
Disturbed Puppy wrote:
Ever watched an alcoholic break down? THAT's comedy. Also, if you're an alcoholic, you need to learn to have fun without the monster.

No, seeing people wasted period is comedy.

Hey, if you can have fun and not drink, that's your call. Where I live there's not much else to do though...still, good for you!
Well, it would make sense that he's not much of a drinker. After all, Adelaide has quite the nude beach. ;)
Tiberath wrote:
Well, it would make sense that he's not much of a drinker. After all, Adelaide has quite the nude beach. ;)

Christ, if I'm not a pothead, I'm a nudist, according to Tibby. :P

I couldn't just be a reasonably boring geek, now, could I? :P
Jp wrote:
I couldn't just be a reasonably boring geek, now, could I? :P

Not in such a suggestive city, I'm afraid not. ;)