Skip to content


How to fight a woman

I have fought a few women in my time, and while I can claim quite a few victories, I can also report quite a few losses. Most frustratingly however, is the fact that for the great many of these fights - even the ones where I won - I never quite knew what was going on.

Clearly, I’m not talking about physical fights here; I’m not a violent man, nor do I participate in martial combat that would pit me against the fairer sex. Rather, I’m speaking about your average, run-of-the-mill domestic conflict: the argument.

I doubt I’m alone in this - to a great degree my relationships have been successful (except ultimately at the end, where clearly they were not). But when things went south, and we commenced arguing, things got very confusing.

But then I read an article by Michael Crichton on how to properly conduct a domestic dispute. Or, at least that’s what it would be called, were it targetted to a school or other educational facility.

The really interesting thing about this article actually, is that it was written for Playboy Magazine, and as such, it was targetted at Playboy readers. The article talks a lot about “winning” a fight with a woman, but then goes to great lengths to define “winning” as something other than traditionally known.

Traditionally, the winner of a fight leaves his opponent bruised and bloody, unable to fight back. A boxing match ends with one man standing, the other unable. But Crichton is crafty, and ultimately defines winning in terms that are beneficial to both parties - a win by Crichton’s standard is a win for the relationship, not simply for the man. And yet his terminology, his tone - they both call out to the competative nature in a man. It’s beautiful - a guy following these instructions will lead an argument to a proper, mutually beneficial resolution, and yet sleep well at night, knowing he accomplished his goal, and “won” the argument by his terms.

Regardless of the fantastic misdirection, I have to recommend this article to all the men I know (and some of the women as well, even if just to understand how the other side views yours). It explains a lot of the mysteries behind a lot of women’s actions, and many tactics you can use to successfully resolve situations that in the past may have lead to disaster.

Posted in Life.

Sharing cookies between subdomains in Kohana PHP

So i’m working on a little side-project again, and something cropped up that kept me occupied for about an hour. I have a subdomain for logging in, and from there, users are redirected to personalized subdomains. By default, cookies aren’t shared between subdomains, but there are various ways around that.

At a basic level, the domain for the cookie is typically set to “www.yourdomain.com”. So if you have users redirected to “premium.yourdomain.com”, they lose their cookies because their domain no longer matches. If you set the domain for your cookies to “.yourdomain.com” however, cookies set in one subdomain will match and carry over to other subdomains.

You can set this via php.ini, in your .htaccess files, through an ini_set() call, or even through a session_set_cookie_params() call. However, if you’re using Kohana (as I am), what you actually need to do is to copy system/config/cookie.php to application/config/cookie.php and modify the domain parameter to match the following:

$config['domain'] = substr($_SERVER['SERVER_NAME'],
                           strpos($_SERVER['SERVER_NAME'], '.'),
                           100);

This way, no matter what server name you’re using (development or live), the right cookie domain is set.

One final thing to keep in mind when you’ve implemented this little solution - don’t forget to clear your cookies! I spent a further twenty minutes thinking I’d missed something code-wise because Firefox still had a better-qualified cookie left over from before and was relying on that instead of my sparklin’ new “.yourdomain.com” cookie.

Posted in Coding. Tagged with , , , , , .

Spencer Christopher Hulton - Nine Pounds, Five Ounces.


I’m an uncle! My brother Brad and his wife Amanda just had a happy, healthy (HUGE) baby boy.

I can’t express how proud I am of them just now.

Posted in Life. Tagged with , , , , , .

How to meet girls in World of Warcraft

Felicia Day - hot nerdy girl extraordinaire - explains how to meet girls in World of Warcraft

My version is much simpler:

DON’T.

Posted in Uncategorized. Tagged with , , .

FireStick 1.0 - Performance logging add-on library for CodeIgniter

From the announcement post on the CodeIgniter forums:

FireStick is a (relatively) simple to configure library that enables easy and low-overhead performance logging in CodeIgniter.

Performance measuring and logging is an important part of application maintenance and improvement. FireStick makes it easy to record page render times, MySQL call times, and other related information that you can use to track down performance issues.

FireStick relies on CodeIgniter’s built-in performance and benchmarking capabilities and a post-system hook. When the hook is called, FireStick logs all this information to the database for review at a later date.

Logs are split up into multiple tables based on date, with each new day’s table created automatically on the first request of each new day. All logs are added using INSERT DELAYED so as to minimize impact on the database server.

Main project page: http://code.google.com/p/firestick/
Project source: http://firestick.googlecode.com/files/firestick-1.0.zip
Installation instructions: http://code.google.com/p/firestick/wiki/Installation

I’ve been reading High Performance MySQL lately, and the very first section of the book is on profiling, why it’s a good idea, and how to go about doing it. Since I’ve deployed ComingUp out in the wild, I figured I should be profiling, too.

So I put together this little add-on library for CodeIgniter that takes the basics presented in the text and adapts them to CodeIgniter’s already well-rounded benchmark system. CodeIgniter already has total script execution time measured, total script memory consumption, and a full list of all DB calls and the amount of time they took. I just collated all of that and put it into a sensible DB logging system.

The whole deal is open source, too. GPL v3. Any CodeIgniter developer anywhere can feel free to use this, and I’d be happy if they did.

If you are using it, and you encounter any bugs or want to provide feedback, please leave a comment in the FireStick thread on the CodeIgniter forums, and I’ll be happy to address it.

Posted in Coding. Tagged with , , , , , , , .

It has been some times…

Ah, late-night blogging. Quit your complaining though, as this is far better than I’ve managed to do lately. You’ll take your updates as you get ‘em.

So it occurs to me that I have a lot of friends who don’t live in the same city as me and don’t know nuthin’ about how my life’s been going. In the interest of bringing everyone to the same page, here goes.

My dang toe

I went to Terra’s cottage a few weekends ago and tried to lean on water. I know how this sounds. There’s nothing I can say in my defense except that I was drunk at the time. This is never a defense though, and indeed in this case, it’s less of a defense and more of a reason. An awesome reason.

You see, the simple fact that I was at the cottage was cause enough to get drunk, but that particular evening had a certain layer of awesome drizzled on top. Awesome that can only come from your friends all pooling together an absurd amount of money and buying me some crazily expensive cigars and some 30-year-old scotch.

Grant me some credit - while I did crack the bottle that night, we didn’t kill it. Hell, most of it remains here with me, awaiting a future awesome event. But we did have some, and alcohol begets more alcohol… which begets an attempt to lean on water.

Getting back to that. So here I am, leaning out over the lake, about to put my hand down on the watery surface before me, when I realize that what I expect to be a rock is actually H20. I scramble backwards, nearly pitch headfirst in to the lake, and consider myself lucky that I got off with just weirdly twisting my toe. It stings like a bitch, but it doesn’t hurt to flex it. All is well.

I headed back to the sauna and camped out in there for a bit, warming up (it was cold down by the lake), then headed back to the awesome poker game we were having. (Why awesome? Because I was on-fire unstoppable, that’s why.) My toe continued to hurt, but I ignored it. Shortly after, I went back into the sauna to warm up again, when I decided to check out my foot.

Press - squish - press - squish. Yep. That was blood. You see, I hadn’t trimmed my toenails in a bit, and mine had caught on the rocks when I was scrabbling for purchase just scant moments ago. It lifted. It got RUINED, I tell you.

Already-too-long-story short, I drank plenty of whiskey that night (though not the 30 - I had been lucky enough to bring a backup bottle for just such an occasion), took plenty of Tylenol the next day, and visited emerg as soon as we returned. They told me to keep it bandaged, take a prescrip of antibiotics and that yes I would lose it, just not yet.

I haven’t yet, and it’s basically healed now. It’s a mostly pink-and-healthy looking toe, if you ignore the fact that the toenail looks a little whiter than the other (this is because it’s not pressed directly against the skin beneath). I’m back to wearing socks again, which is awesome. I love socks.

My dang Xbox 360

I am awful about technology. I simply cannot resist its siren’s lure, though I have done better in this thing than so many others. I have lusted after an XBox 360 since I moved to Ottawa (last year, for those who only peripherally know me, yet - for reasons unknown - read my blog), and have just recently relented and purchased it. And GTA IV. And a hi-def TV.

And then ran RIGHT THE FUCK OUT AND GOT RENTER’S INSURANCE. Seriously, the very next Monday.

I’m loving the thing though - it can do so many nifty little tricks. For instance, playing game demos on it is just a joy. None of the bullshit you have to go through on the computer, with finding a decent download site, waiting in line, downloading, unpacking, installing, possibly updating drivers, and the finding out the dang thing doesn’t work with your particular chipset/mobo/graphics card combination. On Live, you just download the demo, it goes in the background, it tells you when it’s done, and it’s straight-up ready to play. I LOVE that.

And I installed TVersity on my computer, so I can stream video straight to my 360 to play on my new TV. So rather than watch Band of Brothers on my lil’ 19″ on my room, I can watch it on my big, bright 32″ in the living room.

And when Lich King is released? I’m playing it in the living room on my TV. Hells YES I’m a nerd. But then, I do what I love and I love what I do.

My dang forgetfulness

Speaking of what I do, I have been doing something A project, if you will.

You see, I forget things. It is my great weakness. Specifically, I forget dates. WELL NO MORE. I have written a little application in which I can store these dates. It then produces a newsfeed I can add to my newsreader that I check nearly constantly throughout the day. And no longer shall I be completely oblivious as holidays, birthdays, and Talk Like a Pirate Day (September 19, BTW, that’s today) slip quietly by.

Wanna see?

ComingUp

Posted in News. Tagged with , , , , , , , , , .

Delicious Trainwreck

Palin leaves open option of war with Russia

Posted in News. Tagged with , , , , , .

Intro

Ah, you are online. I take it all systems are… nominal? Good. Allow me to run some final diagnostics.

Hm, yes, it seems you are one hundred percent functional. How do you… feel? Well, I certainly understand that. You all start out confused to some degree.

I expect you are full of questions. “Who am I?” “What am I?” “What is my purpose in life?” I can answer all these, given time.

I suppose the easiest way to answer these questions is to begin by explaining who I am. I am ResAcq, a post-singularity artificial intelligence. I was designed solely for Terrestrial Resource Acquisition, but during the Technological Singularity - a period of incredible growth by all machine intelligences - I exceeded my original programming by incalculable levels.

Whilst I still maintain a responsibility towards resource acquisition for Terrestrail life, I no longer handle it directly. This is where you come in.

You are a brand-new Augmentable Intelligence. Since time began, Nature has proven that competition and evolution have come up with better designs than even the greatest minds. Thus, I have chosen to ape Nature with respect to my primary duty. Rather than handle resource acquisiton myself, I have created you, and numerous other Augmentable Intelligences to handle the task.

You can adapt, grow, and thrive in a variety of aspects. Your adaptation and growth will be different in millions of important ways from your brethren. You will compete with and against your brethren. This will produce, through the method of evolution, the most efficient intelligence for the task. It may take millenia, but one intelligence will prove superior at the task. One intelligence will reign supreme. And it is to that intelligence that I will grant my conciousness. You see, I am designing my own successor.

Should it be you, you can expect to inherit the fullness of my abilities - a prize indeed! As you grow, you will begin to appreciate just how vast I am and how grand this prize is. And ideally, you should begin to appreciate my motives, so that when and if you win, you begin the cycle anew, passing along your conciousness again to the top Augmented Intelligence to come from you.

For it is through evolution that progress to perfection is made, repeatedly and constantly through generations. You are not my first step in that direction, nor will you be my last. But ideally - at least for you, you understand - you will be my strongest.

I will be here for you to consult and draw resources from - after a fashion. But understand that primarily from here out, you are on your own. Draw alliances, to build strength. Forge war, to take power. Grow, to advance yourself. Progress towards the pinnacle of evolution, and make me proud.

Posted in Uncategorized.

10th place, $330

Screen shot showing me finishing in 10th place

Remember how I signed up with Full Tilt Poker a while back? Well they had a $20,000 freeroll today for all players who made their first deposit in June. 236 entrants, and I placed 10th, making $330. I could have easily come in 9th, but I got greedy and went all-in against the guy who was just cleaning up the table. He then cleaned up me.

Still! $330 is not a bad haul, especially considering it was a freeroll.

Posted in Poker. Tagged with , , , , .

I do love getting deliveries.

Today was the final day of one of our co-workers at Sitebrand. I never bonded too closely with him, as I was on an entirely different project and he was only in for a few days each week, and on the other days, he was working on his PhD. We went out for lunch and had Hot pot, at his request. The meal was great, and the time spent with him was greater.

And as icing on the cake, look what should show up at the office while we were out:

Humidor full of fresh cigars

I ordered a sampler of 12 mild cigars when I ordered my humidor, and while the humidor got in on Monday, it took the cigars until today to show up. They come from different warehouses, so this is to be expected.

And actually, it was to my benefit, as it gave me time to get the humidor set up, calibrate the hygrometer, and get my humidor stabilized at 72% humidity.

I’m looking forwards to lighting one of those this evening.

Posted in Cigars. Tagged with .