Monday, 30 June 2008

Can't set a cookie on a redirect

Not that I use cookies much, but I found something interesting today: you cannot set a cookie on a redirect. From that post it looks like if you use a non-session cookie (has expires attribute) it will work.

The reason why this was found? Firefox barfs on it with a The page is not redirecting properly message. Of course IE 6 doesn't do this...

I've had to know http enough to have to reference the spec for close to 10 years now, and I'm still learning stuff.

Update: apparently I was full of shit. The problem was that there is a cookie size limit in FF that that was the part that wasn't working. The cookies still work on the redirect. Now that makes me wonder what all those other people were talking about. :-/

Friday, 27 June 2008

What the deaf man heard

I've got a slight hearing problem. Nothing that bothers me in any way. I only have troubles where there is a lot of background noise.

We went out to the Heart and Crown last night for a work thing for Laura. As I was sitting there wondering what the hell people were talking about and trying not to look like too much of a freak while I cupped my hand around my ear, I thought up a way to describe what's it like for me at a bar.

Picture yourself sitting beside a loud set of rapids. Now turn on 3 stereo's pretty loud so all the sounds blends so there isn't really much that's distinguishable. That's the background sound. Now try and listen to a tv where the sound is turned all the way down to like 1 bar. That's the conversation.

For the most part I hear about 1/2 of a word, every 4-5 words. I can sort of keep up with the gist of what's going on, but a lot of the time that's not enough. I just sit there and try and look interested and watch for clues where I should laugh or look concerned at the right time. That's harder than it looks.

That's why I like drinking at home better. That and it's cheaper. :-P

Update: Okay, to be clear: I love going to pubs. I love the atmosphere, the people, the drinks. However, if you're going to a loud pub to have long conversation to get caught up with someone, it might not be the best place. Please don't read my above post and think that I am a "pub hater".

Thursday, 26 June 2008

Don't bike on sidewalks (apparently)

If you do bike on the sidewalk you could have a run in with the po-po, 5-0, coppers, flatfoots, fuzz, the heat, the man... You get the idea.

Now, this didn't happen to me personally, but someone I know. While they were biking to work they cross the canal at the pretoria bridge. Apparently a pedestrian was hit by a biker the other day, so the 5-0 was out handing out pamphlets about bike safety and how you're "more likely to be hit by a car or seriously injured if you bike on the sidewalk". Okay. Sure. Maybe. But I can't see how that holds true at that intersection where most people go from bike path to bike path, and the only way to do it is to 1) walk your bike or 2) bike on the road there were drivers are making quick turns.

This post isn't an argument about how people should be able to bike on the sidewalks. I see both sides of the argument and I understand it. I think that the lesson we can all take away from this incident is this: make sure you look and see if there are any cops around before you break the law. :-P

Saturday, 21 June 2008

Write in the style of the language you are working in

Like any programming language, there are certain styles for declaring variables, formatting, etc. I find that it usually turns into some kind of religious argument, based on the first language that the person worked in. What you like shouldn't matter: follow the style of the language.

I think that it reflects poorly if the programmer is not able to adapt to the language they are working with to follow the best practices for style etc. It makes it distracting when you read java code and go "oh, this was a C developer" or when you read ruby and know that the person's first language was java and they were too lazy to change.

Just like when you travel: try to respect the customs of the natives and don't stir up shit because that's how you're most comfortable with things. When in Rome...

Friday, 20 June 2008

The awesome bar is... well, awesome

There was a lot of flack about the new awesome bar in firefox 3. I was wondering if I'd have to turn it off and revert to v2 behaviour.

Well, after about 1 day of use I'm enjoying it. No longer am I digging around my bookmarks. I just go to the bar and *boom* I can get something that I've bookmarked or gone to recently. At first I thought that it was doing a check against google, but it's just all local which is even better. ;-)

Thursday, 19 June 2008

Firefox 3

At work I've upgraded to firefox 3. Pretty good so far. I'm most impressed with how fast it is. I didn't think that I would notice any difference, but I do.

So far it hasn't crashed with using the newest version of gmail (which is something). My disappointment is that some plugins that I use (like adblock) aren't FF3 compatible yet. Most of all I'm sad that google browser sync won't be ported to FF3. So I've decided to try out Mozilla Weave and take that for a test spin. So far, so good.

Ah browser progress...

Wednesday, 18 June 2008

Ribs Ottawa

It's that time of year again: rib fest. Mmmm..... I just hope that it's not raining too much to enjoy it.

Friday, 13 June 2008

QotD - Boys have all the fun

I heard this today and it totally cracked me up: "Boys have all the fun: they get twice the meat and all the alcohol."

Too funny. I love being a guy. ;-)

Tuesday, 10 June 2008

Can't make it drink...

Like the expression goes: you can lead a horse to water by you can't make it drink. That's the way I feel sometimes. You can do work to help people work and help out with tools, but for some that's just not enough. You have to hand hold, baby sit, monitor. But none of that is really needed if people use common sense and think about what work would be needed for the next person to take over the project.

I've come to grips with not caring how other people work. Not my project, I don't know what issues were going on so who am I to judge. But it still ticks me off when I have to pick up the mess that someone else did and the mess was just because they were too lazy to do it right the first time.

So many issues would go away if people just did the best they know how to at the time. I can't fault anyone for that. Doing it the short cut way usually just ends up being the long cut over time and that makes me angry. You wouldn't like me when I'm angry.

*sigh*

Sunday, 8 June 2008

Stupid trick for those born in 1980

A friend pointed out a somewhat interesting thing for figuring out the age of people born in 1980. Say, for instance the current year is 2031: you take the first 2 digits (20) and add them to the last 2 in order to get the age of the person. eg: 20+31=51.

Neat but trivial trick that will only work for this century. I just wish that I had not spent as much time tonight as I did trying to explain it though... :-/

Wednesday, 4 June 2008

Cook for the joy of it

Something that I've always enjoyed playing around with is cooking. I just find it fun and a creative experience. Not that everything I do turns out great, but it's edible (most of the time). Cooking to just eat and add fuel to your body gets old, really fast. Playing around with different types of flavours, textures, contrasts and colours doesn't really add a lot of time to food prep, but it makes the experience of eating so much more enjoyable. It actually makes dinner an experience rather than just a normal thing that you do like brushing your teeth.

Like anything, I think that it would be good to take classes to expand my skills and knowledge. I found some with a quick search, but at 139 $ / night, that's pretty steep.

Maybe I should just pick up a part time job to learn more and actually get paid for my time... :-P