Monday, June 27, 2011

life is good

Writing a fair amount of python these days.
Today was the two noobs pair programming. I think we were half as productive as expected. Maybe less. I didn't get to anything I was supposed to look at, but I read through it for percolating this evening.
Lots of programming does well when it steeps in my head. Sort of. I don't know.
I do know if you take away Gmail and chat programs I do a fuckload more work, that's certain.

Holy cow. I'm not even unhappy about it; pair programming keeps you close to on task. There's never a "hey let's google lolcats" moment when you're working with somebody.

I don't know if I'd run up against that in this environment; there's a metric ton for me to learn about python and the financial services industry before I stand a chance at being bored.

Today this blew my mind in Python:
class CaseOfSpam():
    Case = []
    def spamYourKids(self, spam):
        self.Case.append(spam)

So that looked pretty innocuous to me, coming from Java.
but when you do something like this:
>>> a = CaseOfSpam()
>>> b = CaseOfSpam()
>>> a.Case
[]
>>> b.Case
[]
>>> a.spamYourKids('spamYourWife')
>>> b.Case
Quick, what do you think b.Case should be? Nothing, right? We didn't add anything to it. Ahh, but we did:
['spamYourWife']
>>> 
Oh no, they're everywhere!!
In fact, instantiating additional CaseOfSpam()s will give you prepacked Cases, with whatever you've appended.

This is actually totally OK, but I flipped out for about ten minutes, muttering "everything I know is wrong" over and over.
What I expected was an object field, not a class field.
Class Fields are global.
Object Fields behave as I'd want, where each object has its own stuff in it.
I'll add 2 functions and an object member to show this. (why two functions? I'm going to add an __init__ call to construct the object field we need)
class CaseOfSpam():
    Case = []
    def spamYourKids(self, spam ):
        self.Case.append(spam)

    def cuzEtc(self, spam ):
        self.Box.append(spam)
    
    def __init__(self):
        self.Box = []   

Now I can add stuff with the instance object -
>>> a = spam.CaseOfSpam()
>>> b = spam.CaseOfSpam()
>>> a.cuzEtc('Brian')
>>> b.cuzEtc('Filthy Lumberjacks')
>>> a.Box
['Brian']
>>> b.Box
['Filthy Lumberjacks']
>>> a.spamYourKids('I SAID EVERYBODY')
>>> b.Case
['I SAID EVERYBODY']
>>>

And that's how I play Crack The Whip with my readers.
Scott, are you still here? I expect you're the only one.

Thursday, June 23, 2011

too soon, sure but when isn't it?

John Barry the composer has been dead for ten months. I think I should get the domain name, as the next relevant living John Barry.
This doubly stings because there's a programmer that's done work at Wizards of the Coast who currently occupies the johnbarry.com website.
He's being better at John Barry than me.

MY FACE IS SO ANGRY ABOUT IT

I've been programming in python at work for the last two weeks, so this seemed appropriate:

Bottoms up, philosophers!

Frozen Synapse is still great. Can't recommend it enough; it reminds me of chess and go, but with blood. So Battle Chess, sort of.
It's god mode first person team combat. Good times. Hard. Rewarding. (as far as video games can be considered "rewarding")

Sunday, June 19, 2011

Happy Father's Day

Happy Father's Day!
Don't worry, I'm not going to pontificate and blow hard about anything regarding the larval parasite stealing a third of my wife's nutrients.

I have a father.

There's a benefit to having a gigantic father - at no point did I ever think "I'm gonna just kick his ass".
My father is 6' 4". He fills doorways, and has ridiculous reach. He play fought one time against my brother and I. We never got nearer than his kneecap.
Kicking his ass was unthinkable.
Not that he didn't deserve it.
He told me Eddie Murphy died in a car accident one evening when I was in high school. No context on why, just came home and said, "Hey Eddie Murphy died in a car crash."
This didn't humiliate me the next day, but weeks later when someone mentioned him and I said, "isn't he dead?" like some sort of an idiot.
The internet would have been nice growing up with my father.
I would have verified that there wasn't an at-large axe murderer in the Rocky Mountains who liked to kill Boy Scouts. (an elaborate ploy to save money on boy scout uniforms, I suspect)
I wouldn't have thought lobster tastes terrible to kids. He told this whopper when I was 6 years old. Actually brilliant, in hindsight. Better than Santa. Will probably use on my daughter.

The most important lesson he taught me, however, was about parenting. It's 1988 - he is troubleshooting the computer for me. It was a 286 (maybe an 8088) with a 4 color monitor. It's not working. My dad, who works on computers all day, is now working on one for his oldest son. I'm watching, rapt. I love computers, and have since we got one when I was about 8. It's giving him real problems. He frowns, and looks at me grimly and says, "never do this," and raps the computer with his finger. It starts working again immediately.
For the next six months, whenever I ran into trouble with the computer, I would rap it right on the hard drive. Sometimes multiple times.
It died, of course. The initial symptom he was having trouble with was probably the first sign that the drive was going to fail. But maybe not. The technician said it looked like someone had been beating on it when it was trying to write data. I denied any involvement and fingered my brother Dan.

I learned two important lessons that day. The first was you shouldn't hit computers or they'll die horrible deaths.
The second lesson was that "don't ever do this" will never ever work if you then demonstrate something that fixes an apparent problem.

Happy Father's Day, Dad.
I owe you a new 300 megabyte hard drive.

Thursday, June 16, 2011

just for laughs bust

I went to the "Anti Social Network" show last night for the Just For Laughs festival. The show was good -Sean Flannery did a tight five at the top of the show. Jim Norton hosted, followed by Bill Burr, Jim Breuer, and Dave Attel. Bill Burr stole the show; he's my current favorite. He loves taking something difficult to get a laugh on and turning it into a phenomenal bit.
I missed ALL of Jim Breuer's set waiting in line at a bar. Almost twenty minutes went by, and they served four people. In the only bar in the entire Chicago Theater that was open. They closed all the bars after the first set, I guess; I wouldn't know because the lines were longer than twenty people when we walked in. They were closed when Brueuer came out. The floor the bar was open on actually had two bars - one was closed and counting down, and gave two shits about a line of thirty people.
I gave up when I was halfway there, pissed as hell. I not only miss one of the four acts, but can't even pay an overpriced amount for a lukewarm beer? And more importantly (MOST fucking importantly) not return with a water for my pregnant wife?

Chicago Theater sucks a dick, period.

Tuesday, June 14, 2011

tekmology

The new job's pretty great.

This is a pretty techie post; a couple of you might appreciate it but many won't. If you're not sure what the next sentence reads, you're going to get lost in the weeds so save yourself some frustration and punch out now.

So the new job has rolled their own IDE internally. This means nil support for gvim, my editor of choice. This has naturally frustrated me a bit; gVim is Simply Better than anything out there other than emacs. (I don't know if emacs or vim is better - I started with emacs in college but didn't learn it like I have vim - I'm sure it's a very powerful tool as well)

So, I wrote a quickie script today in autohotkey to grab the buffer I'm in in the IDE, copy it, open a vim window, and paste.
I've got the hotkeys set up for copy/paste; it works ok but it's wicked dangerous. (doesn't respect the fact if you've moved buffers in the original IDE right now)

It's a kludge but it will work until I can rip the guts out of their home-grown stuff. A few months off of that I'd imagine.

But man o man - I'm writing code again. Feels good.

pardon me while I whip this out

So let's see:
  • establish a policy to "end-around" the 8th amendment (no cruel and unusual punishment) so we can torture alleged terrorists
  • Subvert the fourth amendment by instituting a national wire-tapping service, undermining the people's rights for their papers to be private
  • Lie our way into a war that has cost over 5000 Americans and untold Iraqis
  • While in said war, "lose" $6.1 billion
  • Text your dick pic to some girls

Only one of these has caused a hue and cry in the media.
If it's gonna be that kind of party, I'm gonna stick my dick in the mashed potatoes.

Also, fuck you America.

Sunday, June 12, 2011

impending doom

New job starts tomorrow. Once again, quitting a job didn't mean quitting work. Curses.
What I really want to do is play some frozen synapse - this game is amazing. Imagine if you took your turns in chess at the same time, and there were rules of how pieces ate other pieces, and you get a rough idea of this game.
It's simultaneous turn based strategy - which is hard to parse without playing. Essentially, you have a squad of 2-4 guys with weapons. These can be the close range powerhouse shotguns, the assault rifle for classic area denial, or explosive units - rocket launchers and grenadiers. This is turn based, so you get to contemplate for as long as you want on what you think your guys should do. This includes stuff like ignoring enemies you spot to run for that prime piece of cover; storming a room and quick checking both entrances for hostiles; lobbing a grenade through a window and running like hell.
More importantly, you can predict what your enemies will do, and run simulations as often as you want. You don't have to. Or you can, and make terrible choices anyway. Here's an example of that (I'm green):


I've got a few of those face-palm videos.
But I've also got turns where my opponent says "man, tough break" and then we submit the turns, and he goes "Wait, what?" and he has three blood splatters where his guys used to be.

The mechanic is fascinating because you can play 6-10 games at once, and have turns you can play a lot. You typically sit down and play two turns in a row, but don't know the outcome of the second. Sometimes you play "live" but I normally don't count on it - if you turn his guys into paste he might rage-quit anyway. (You'll still get the win after a little while)

Anyhow, this game is FUN. I haven't looked up real world military tactics for a video game in probably 5 years, but I'm trying to perfect bounding overwatches like nobody's business these days.

Best of all, the business model gets you two copies so you can pull a friend into this mess. Great times. I just had a turn finish where I pasted a guy's two shotgunners and rocket launcher for my one machine gunner; it's all over but the crying unless I screw up. It happens, though; I just fought one guy to a draw after he pasted 3 of my guys. I stuck my head in the right windows at the right times, and shot grenadiers in the backs of their heads, and then hid for the tie.

I'm as noble in real life, too.

Thursday, June 9, 2011

when animal psychologists go bad

I think I'm destroying one of my cat's sanity. I'm not doing it on purpose.
I haven't figured out a way to get him to understand English, is all.
I've tried click training him, I've tried keywords, but the main issue is this: he doesn't want the treat as his reward, he wants to chase it down the hall, crashing into anything in his way.

He's started swatting it more, sometimes chasing it around corners and tokyo drifting his way around it.

There's no method to the madness, though.-It was easy for him to get where being picked up didn't mean punishment. Now we can pick him up without fear he turns into a lashing ball of teeth and claws - he had issues when we got him. I'd pick him up, he'd bristle into attack mode, his mouth would start working, and I'd pop a treat in there. He started to LOVE being picked up.

Then I threw one down the hall. Joyous ecstasy. He's no longer the same cat. He used to tolerate me and love Andrea. He still loves Andrea, but I've become his pusher man. I've associated "the flop" with triggering treats. But Sylvester's been busy creating his own triggers.
For some totally insane reason, me taking a dump in the bathroom downstairs is one of them. What follows is a series of pics of him hearing me in the bathroom, and his treat attempts.


That's him waiting patienly while I do the paperwork.
And again, this time making enough noise that I opened the door to see what was happening:

Sometimes if it takes a while (and lord knows sometimes it takes a while) he'll come in and pretend to pass out from the fumes:

Any way you look at it, it's not normal behavior. I've been rewarding him for not swatting our other cat, Lady. . . she's a bitch and likes to start fights, and he gets treats for not retaliating. I don't know if he's figured that out; he does know if he lays down near her, about 50% of the time he gets a treat.
That's opened up a whole new can of worms because of the hatred she has for him. He sidles up, lays down near her, then looks at me, expectantly.
I think I missed my calling in life.

Wednesday, June 8, 2011

My top rated post here

The big reason I'm linking to this is it's far and away the biggest hitter on the site. Any week's snapshot has my more current posts getting a moderate amount of hits, and this one doubles them. Many of them are from Russia.

I'm guessing it's the title - the phrase "shit on a shingle" is probably very confusing to a foreigner and warrants a google.
It's similar to the confusion foreigners feel about "Sometimes you eat the bar, sometimes the bar eats you."
OK My mind was just blown. I googled the Big Lebowski quote and got the Straight Dope page and discovered it really is bear in a Texas accent. I never knew that.

Anway this is the most popular post.
Kind of makes me wish I'd had something to say.

Tuesday, June 7, 2011

Valar Morghulis

I switched my Status on Microsoft Communicator at work to "Valar Morghulis" the day I gave notice. It's from Game of Thrones - "All Men Must Die".
I'm unbearably cute. I'm a little nauseated, too.

I thought I'd share it with the world.

It doesn't feel like I just quit the job.
I think that will sink in Monday morning, when I'm getting up to go to another job. Right now it's just a surreal 5 day weekend.

I keep thinking about frying pans and fires.
Anyhow, what's done is done.
Hopefully it's not like a breakup - maybe they could use me as a contractor in the future. Who knows. Life is long and I left the bridge intact.

I can't believe I'm acting like a grown up most of the time these days.
I still feel like being a big baby at least 85% of the time.

Ouch, I just hurt my shoulder patting myself on the back there.
Sorry about that.

Anyhow, Glenn Greenwald had something to say about the whole Anthony Weiner kerfuffle. He said what I blundered about with last night . Good reading.

Monday, June 6, 2011

omg weiners

Well. Anthony Weiner's in a fair bit of trouble it seems. The only thing about it that angers me is Breitbart gaining credibility. He's not a journalist, but a hatchet man, and it stinks when he catches true. He's batting pretty good for a major league hitter - only two out of every three stories are fabricated. Not good reporter numbers, though. Think you're shooting for closer to 100% true. (Did we learn nothing from Season Five of the Wire?)

But this is about Weiner's weiner. The big damage is with him and his wife's relationship, but that's his business in privacy, not the public's.
So where's our stake? Should he resign?
I've been reading "he's compromised! He should resign!" a lot. A bit hyperbolic, I think. When the fuck did our standards get so high? Clinton actually received oral sex, he didn't just tweet about it.

I do think that was a pretty funny moment in the karmic sense - the one where Weiner clicked "Tweet" instead of "Private Message". The instantaneous realization of "Oh my god, I just fucked up terribly" while he pushed delete as hard as he could.
The sweats he must have been in until the story broke. The careful prevarications and verbal contortions about whether or not that was his wang. I'm sorry, weiner.
Just knowing it was spinning out of control. And the media. My god, the media. They're motherfuckers who carry water for the elite, and Weiner was unfortunately speaking truth to power. This is blood frenzy for them. Not even Sarah Revere's Moronic Ride can stop this one.

Some politicans do terribly here. They just panic. The first instinct is to hide the bodies. But for god's sake, don't do it alone. At the very least, pull your chief of staff or attorney in on this to tell you what the hell you should say.
"I can't tell for certain if that is or isn't my weiner" isn't a good sound byte ever.
Total aside: I would have been wishy washy in my denial too, that thing was a hog. "Sure it's the right size, but is it mine? Who can tell."

I don't have too much of a political problem with what he did - yes, he's probably dug a real deep hole in his marriage that he's gotta dig out of. He's probably not allowed to tweet any more, for starters. I'd imagine he's getting a blackberry for his next phone instead of something with a camera as well.
But it's none of our business.

What IS our business: Is he fit to serve?
Sure. Why the fuck not?
Vitter was nailing prostitutes. Maybe still is. Receieved a standing ovation when he returned to Congress.
I already mentioned Clinton.
Newt Gingrich needs no introduction, but Very Serious People think he should run for President.
But let's ignore the "look these guys do it too" since it's a bullshit deflection.

It's actually a stretch to include him in the company of the people above - his was cybernetic; no fluids were actually exchanged. It's the modern day equivalent of phone sex - it's weird but I don't really think it's sex.
You wouldn't brag about it in high school, for example.

You could argue it falls under "emotional cheating" which can be a Very Big Deal but it's between two people specifically. And it's hard to get concerned over a politician doing it. If you're going to make a politician resign because they're fucking someone symbolically, we have to fill over 500 seats in special elections, stat.

I figure the main thing we need to know is if he was being blackmailed and voted under duress because of it. If that happened then hell yes throw the bum out.

Otherwise, I think we should let his constituents decide at the polls.
But it was profoundly stupid to be throwing your weiner around on twitter, in a private message or no. Use Facebook so you can tag it.

Bias alert: You're god damned right I don't want him to resign because he's fighting for the little guys. But I would say the same if it were Eric Cantor tweeting pics. There's Bigger Things at Stake than some politician's personal life not conforming to the Judeo-Christian norms of our society. Eric Cantor should resign because his policies either betray a fundamental misunderstanding of governance or are political in nature designed to advance the needs of party over nation. He should resign for THAT.

Conspiracy Theorist Alert:
Establishment Democrats, who bow to the same paymasters as the Republicans and Media, will crucify him and force resignation. Because the truth of the matter is the powerful people are ruthless and you'd better be unimpeachable in character to stand a chance if you plan to take them on.

Friday, June 3, 2011

You Gotta You Gotta You Gotta Be Fresh

You should be watching Workaholics. Well, I won't say you should be watching unless you have a Nielsen ratings box (then please please please watch it) but it is a very funny show.
Similar in nature to It's Always Sunny In Philadelphia, Workaholics centers around three guys that may or may not be likable. It's not Always Sunny's Chaotic Evil. It's more Chaotic Good. Well, neutral. Probably can't consider something Good after "To Friend A Predator". That episode and the latest, "Fully Torqued" with the bodybuilding wizards. . . Christ I laughed. The show's really hitting its stride. It's sophomoric - it is, after all, about some twenty somethings post college in their first jobs. Which is almost by definition sophomoric.
Hell, watch the first episode. They're likable in flashes - "hey I would like to hang out with these dudes" and they are incredible losers in others. But it's recognizable loserdom because it's reflections of my friends and me.
Here's the first episode's main plot point
There's misses, I think; the offices I've worked in didn't have dialogue like that but maybe telemarketing's different. Just doesn't sound like office banter with a boss.
But they are mining some very funny stuff and the writing's getting better.
Hoping we get season 2.

Thursday, June 2, 2011

streak - broken!!

I thought I was going to write a post every day there for about a minute.
Life intruded.
Trying to be a Good Doobie and not post at work as I'm trying to get accustomed to tighter security controls I suspect will be in place at the next gig.

But my wife left for Vegas last night for a week, which sort of makes me feel like this.