Wednesday, November 28, 2007

The tale of Mister Splashy Pants

Online polling is broken.

With sites like digg and reddit and many others, the ease with which a group of people can sway the vote is demonstrated time and again. The problem is differentiating “real” voters from “funny” voters. It is just too easy for someone to give a voting link to a large number of people who are not really interested in the outcome of the poll, who will totally unbalance the results.

Perhaps what online polls need is to use some of the mechanics of regular political voting systems. An electoral roll with a defined closing date that is before polling commences. No need to keep voter information long term, just long enough to have the people interested in a certain poll indicate their participation, and ensure that there are no band-wagon jumpers at the last minute. An online news site post saying “Quick, register to vote on the name of the Greenpeace whale - there is sure to be a funny option: we will let you know which option we think is the funniest in a few days!” is not likely to attract the same level of attention.

Wednesday, November 07, 2007

‘S not my job.

“It's not my responsibility to fix that” or “I did not think I had the authority to ask for a certain action” You have to ask yourself a question. Am I happy with my current position in the hierarchy? If you want advancement, more responsibility, one way to get it is to assume it. Take on new roles and new responsibilities and they will become yours. That or you will be put in your place. (It may be time to move on.)

There is nothing more frustrating than someone who continually counters your requests with one of the two phrases at the top there. When I hear it some from someone's mouth what I really hear is “I am quite happy just plodding along in my job and I never want a raise again.” If I hear it come out of my own mouth... (It may be time to move on!)

Don't wait to be given responsibility. Don't wait for the person who should be doing something to do it - make it happen. It makes you look dynamic. Perhaps you will overstep the bounds of your current position, but that may just make someone realise that you don't belong there.

Thursday, September 20, 2007

I smells somethin'

Programmer 1: “What the... That code is horrible. Who did that?”

Programmer 2: “Erm... Yeah that was me. I know it's crap.”

Programmer 1: “Crap? This code gives crap a bad name. This code goes right by crap and out the other...”

Programmer 2: “Yeah, yeah okay, that'll do, I know, but I wrote that shit like 3 years ago.”

Programmer 1: “Uhuh. Umm... This code over here is just as bad... You wrote this shit yesterday!”

Everyone knows that the worst code you have ever seen is the code that you wrote 6 months ago. However you are supposed to learn from your mistakes*.

* That way you get to make new and interesting ones each time.

Wednesday, September 19, 2007

So don't press that button!

It was (probably) Murphy who said (something like) if there are two ways to do something and one of them with have disastrous consequences, the probability that someone will do it that way is 1. Thus, all good programmers ensure that pressing the wrong button at the wrong time will not cause things to blow up. Lumped in here are things like checking input, clicking in the wrong spot, pressing the delete key at the wrong moment. For these things and more we can ignore, correct or confirm inputs. Good. But you can't be pissed off when you click the wrong, but valid from the context, button and that functionality completes successfully.

For instance, there is functionality A and functionality B that both act on the current input. These functionalities are both executed thousands of times per day, there is no way to tell from context (previous operations) which one is more likely, and there is no time to have a confirmation. So when you have operators that click B when they mean A (and not notice - it is not like you can't cancel you B and put in an A) you have a training issue. There is nothing the system can do about it! That is not the worst of it though. What I really love is the service calls and bug requests saying that the reports for the operations on a certain terminal are “all screwed up, there are B's where there should not be.” So I take the 10 minutes that it takes to verify that there were no problems with the processing and what I find amounts to “That place where there was a B is because the operator pressed B.”

“Why is my transaction cancelled?” Because the operator cancelled it.

“Why did the upstairs bell ring?” Because the person pressed the top button.

“Why is there a charge of $0.01 on my credit card?” Uhh, because the cashier ran a transaction for 1 cent on your card?

Tuesday, July 31, 2007

ClickOnce - or: how to instafuck your whole installed base with one click of the mouse!

Fuck me that was fucked.

We are rolling out a new version of a program which is updated via ClickOnce. We currently (luckily) have about 12 of 80 machines installed - the rest are using the old, manually updated software. I am actually pretty glad that we had today's problem today and not in a couple of days time when the whole thing was rolled out - _that_ would have been a major shit fight.

This morning I got a request for changes. Nothing huge. Thought it would be a nice demonstration for the live update feature of the new system. 10 minutes to code. Took my time testing, 1 hour. Published the changes onto the beta site, let the test machines auto-update. Cool. I sign off on the mods, the client give the go-ahead for live. I publish on the live server. Sweet. Now I keep a test machine connected up to the live publication just so I can have a last minute test to make sure all is well. I go and run the client on that machine. The auto-update barfs. Crap. I go to look in the program group for the program. The machine freezes. Crap crap. I reboot and try again. No go. Now I am starting to get a little worried. I connect up to one of the client's live machines which is not being used at the moment and let the auto-update run. Barf. Crap crap crap. Machine freezes. Fuck. I try to uninstall the program, the item does not disappear from the control panel. I try again. Freeze. Reboot. Uninstall. Okay. Now I reinstall the new version, and it works. However the calls have started to come into the call centre... “We logged out and logged in again and it did its auto-update and now the computer is broken”. Fuuuck. So the technicians get to work some overtime uninstalling the broken update then reinstalling it from scratch, and I get to do some overtime to work out why the fuck it did not work.

After a 30 or so re-deployments in different configurations I find out that some kind soul has installed Windows Installer 3.1 on my testbed. I add it as a prerequisite so it gets installed first - now the auto-update works. So that is why my initial deployment test did not fail - there seems to be some kind of problem with the default version of Windows Installer, and I didn't see it because the testbed already was using a later version. I go check in with the technicians and we run a test on a machine that was not yet fucked up - installed Windows Installer 3.1, then let the auto-update run - no problemo. Fuck. I wanna break someone's fingers!

So after an hour of downtime for > 10% of the system I know what we have to do - re-do the install from scratch with Windows Installer 3.1 as a prerequisite. We have to start again because it has to be installed as Administrator. I am not going to be popular with the technicians...

I used to like ClickOnce. But now I am not so sure. It is very difficult to integrate into a responsible deployment strategy. When the whole system is deployed that way, how can you test a new update? I have never seen a case where the re-install (rather than the auto-update) does not work, so you can't just say that if the clean install works the auto-update will work. So imagine that all the machines are deployed from the live site - the auto-update is kind of all or nothing, you can't point a few machines at a different server to make sure the update works. I guess you could copy the live site to a test site, install from there, then update the test site and let an update go through. There is also no rollback. Once you let the update go, it's gone baby.

Just goes to show you - must have test machine that is identical to the live. Well, I'm off to padlock up the test machine... where did I put those thumbscrews?

Saturday, July 07, 2007

Wake up!

For a while now I have had an alarm clock that can wake you up to a CD. I used it a bit to wake up to music, but I had always thought that I could do better than that and create a playlist specifically for waking up. Mostly I had to have the volume up loud enough to ensure that I woke up eventually, meaning that it was too loud at the start, jarring me awake - which I wanted to avoid.

Some things that I have noted about waking up. Waking up to the beep beep alarm is not nice, but it is certain to make you leave the bed. Waking up to white noise it better, but it is possible to sleep through. Waking up to nice music is the best, but again sleeping through is a distinct possibility. When I am not super tired, I will generally wake up at the sound of the CD spinning up, or the light pop sound the amplifier makes when turning on.

So what I have thought might be nice is a kind of ramping up in the volume and wakeability of the noise. I was thinking something like: Low volume environmental sounds, white noise like, waves, wind. Most time I would wake up to this, perhaps drifting in and out of sleep, remembering dreams, getting ready to get up. Low volume relaxing music. This will make me up if I miss the first sounds, I may even get up now if I was fully awoken by the first phase. Medium volume energetic music. This signals the time to rise. Could be possible to sleep until now, if so this will wake me. Loud music that it is basically not possible to sleep through, techno, metal, something like that. The three remaining are the backup plan. I basically don't see getting to this point very often. Medium to loud white noise tones. Loud beeping. David calls in dead.

So what remains now is choice of musics. I am thinking one of the tracks from the glasshouse CD for the environmental sounds. Either one of the early movements from a Bach cannon and fugue or something from hallucinogen for the relaxing. Good wake up music... indy rock, thinking female vocal, rising crescendo... have to think about this one for the medium volume energetic. Loud music backup. So many choices... PWEI, Rage, anything a bit violent and raucous.

Should play with the audio levels on the MP3s that I create for this so that the volume ramps up nicely. May not even have to worry about the final stages, just put another loud sound on with the levels really tweaked in the MP3.

(Might also be interesting to make the playlist, then merge it all into one track so that I can do different ones with different music and use them on shuffle so I don't get sick of the same music every morning...)

Friday, July 06, 2007

Just do it

I feel like productivity people (the GTD crowd, that sleep guy, zenhabits) explaining how to lose bad habits, how to have a morning routine, how to organise your life is much the same as some happy person telling a depressed person to “just feel happy”.

I read somewhere today that when introducing a new habit into your lifestyle, “the first step is getting yourself to do it”. Fuck no buddy - the WHOLE THING is getting myself to do it. Do you not understand that what I have trouble getting myself to do is ‘getting myself to do things’?

Why so glum little girl? “I'm depressed”. Well cheer up, you'll feel much better if you just smile and be happy. Being happy is the first step on the road to not being depressed.

*Barf*

Friday, June 22, 2007

Not my problem (I wish)

It can suck sometimes to be left working on a project after the original project manager has left the company. All their mistakes and oversights become your property - even the ones that are invisible until the fan is at full speed and the excrement is in flight.

Customer: “We tried to use the system today with the PC disconnected from the network and it does not work.”

Me: “No I don't suppose that it would. It needs to connect via the network to its [hardware device] at all times.”

C: “Well what about each year when we sell things outside of the store with no network?”

Me: “I don't know.”

C: “Why didn't you think of this before?”

Me: (Because it's not my job? How the fuck should I know? Maybe you should ask the guy who is not here anymore. Maybe you should ask why we don't have a project manager at all?) “We will certainly have to look into that.”

C: “You realise we need this to work by [the day two days from now] don't you?”

Wednesday, June 20, 2007

Output filter!

A corollary to the input filtering rule:

Couch your demands in terms that will make your actual desires apparent to the person whose assistance you are soliciting, rather than explicitly telling them what to do.

Let them work with you to solve the problem. Explain what effects you would like to see rather than how they should act. Let them figure that out for themselves.

One, they are probably better qualified than you to judge what they really need to do - assuming that you are involving them because it is their area of expertise.

Two, people are more likely to want to do something if (they think) it was their own idea to do so. Rather than looking at your demand and defensively trying to avoid change, the impetus for the action comes from within and they will likely feel empowered in its performance.

A, B, C

What part of “it has to done in the order A then B then C” do you not understand?

First you do A. Then later you can do B. Finally, when A and B are done, you may do C.

“Okay so, I have not done A yet, but B is done. Can I just do A now then C?”

Nooo! You have to do A first, then B then C.

Input filtering

One important difference between working with a boss and working without one is how you think about what you are asked to do.

Normally when you get a demand from you boss it comes with an express or implied priority, you slip it into your schedule, do it, and report back. Sometimes you may have some say in modifying the priority, sometimes you may question the validity of the task, but mostly you just do it.

Working now without any direct boss, just vague priorities from on high, this sequence of “receive work unit”, “execute” is often counterproductive. I knew that some filtering would be required, but I did fully understand the extent to which one must think about what people are asking for, why they might think they want that, hence what they really want, weigh that with who they are, and decide what I should give them. People seldom take the time to explain why they want something, and often what they want is not the right thing.

I need to focus on getting them to explain the problem they are trying to solve rather than let them specify which actions they think I should take. From there I can understand what really needs to be done (perhaps nothing) and help them to understand how this new action actually solves their problem. Only then can we decide on who will do what and when.

It is the same as with any problem solving. It is important to start with the definition of the problem - particularly when you are asking the help or advice of someone else. It is important not to colour their thinking with your supposed framework for the solution.

Friday, June 01, 2007

Hungarian notation

This (useful) notation prefixes each variable with a label or tag indicating the kind of information that is being stored - what is its purpose.

KIND. Not type. Please, either go and read the original (Simonyi) specification of Hungarian or just don't use it.

Calling your variables bSomething or iNumber or lpszBlahBlah is worse than useless.

Monday, May 28, 2007

Creationism

The universe is complex.

Far too complex to have been produced by random processes from nothing.

It is just not possible for more-complex things to evolve from less-complex things.

There must have been a creator.

The complex universe was created by a creator.

[logical continuation...]

The creator must therefore have been more complex than the universe.

The creator is very complex.

Far, far too complex to have come from nothing...

...

Friday, May 25, 2007

ReSharper - Awesome, Expensive, Slow

ReSharper (R#) is great. The refactorings and code completions and cleanups and warnings are truly awesome. I now really want all the code that I work on to pass with few or no warnings. But I am going to have to uninstall it for two fairly mundane (i.e., should be easy to fix) reasons:

  1. It totally has screwed up all of the keyboard shortcuts. Even after flipping back to all VS 2005 shortcuts there are some things that don't work, and worse, there are many nice features of R# that are no longer available at the touch of a button.
  2. God damn it's slow! Not on a new file, or a small file. But on big old files that have lots (200 or more it seems) warnings. Each time you make an edit to the file it re-analyses it which takes a looong time. (7000 line file, 280 warnings, 15 seconds)

These should both be reasonably easy to fix:

  1. Don't frig with the shortcuts! Give me a list of functions for which you would like to add shortcuts and I will assign them. Maybe this is doable by the end user - I'm sure that I could eventually get my old studio shortcuts working again, but I am not paying US$250 for a tool only to spend hours repairing the damage it has done.
  2. Let me disable the automatic analysis of the current file. Maybe in that nice little coloured box at the top of the colour bar there that had a hand icon but does not seem to actually DO anything.

I have used R# for a couple of days now, and I love it! You have a convert people! But I CAN'T use it like it is.

Wednesday, May 23, 2007

Web 2.0 style guide

Orange! Light green! Dark blue! Light blue!

Very faint diagonal or way off-centre circular gradients.

Dark text on light same coloured background.

Dotted (light coloured) borders (and horizontal rules).

Shiny glass or gel (jelly!) looking buttons (that are not usually buttons) and text.

Text sitting on a shiny table and all manner of other (3d) surface effects.

Big bold headlines. Often multiple down or diagonally across the page.

Smaller (gray) body text with lots of white padding.

Many pointed stars.

Cute icons.

No underlined links.

Digg this, post on reddit, blog this, tag on del.icio.us, etc., etc., etc. buttons.

I'm not saying that any of this is good or bad, just what I have been noticing.

Implementing IExceptionHandler

When using the Enterprise Library Exception Handling Block, there are (at least) two things that you have to do to get your custom handler to work that I missed when I looked at the docs. Specify CustomHandlerData as the ConfigurationElementType for the handler class:

[ConfigurationElementType(typeof(CustomHandlerData))]
public class WatchdogHandler : IExceptionHandler {
...

Provide a constructor that takes a NameValueCollection:

public WatchdogHandler(NameValueCollection attributes) { }

Final note.

I have had weird problems with the Enterprise Library Configuration tool. When I first created the handler class it would not load the assembly in the tool. It said that no class that implemented IExceptionHandler could be found. When I fixed the problems with my class it still would not load. Frustrated, I created another handler class from scratch (no other classes in the assembly, no other bits of code lurking around to cause problems) and that one loaded. Then, magically, the other class loaded as well!? Perhaps it was after all the closing and re-opening of the tool that it started to work, but I am not convinced.

Thursday, May 17, 2007

Phrases which flip my “no-longer debateable” switch

For the bible tells me so.

If you have nothing to hide, what is the problem?

I'm not a racist but...

It's just a theory.

Others that just make my sigh and shake my head:

Anything that is described as having an infinite number of configurations or settings.

That [insert mechanical device here] totally breaks all the laws of physics.

Wednesday, May 02, 2007

Item: Ninjas, two score. Check.

Is there any problem that could not be solved by 40 Ninjas? Didn't think so.

Ninjas: not just for breakfast anymore.

Tuesday, May 01, 2007

No, that's not it, try again.

If there is only one valid entry for some field in an interface, why don't you just put it in for me?

I was using this form created by someone here today, it is a form for our overtime: “Please enter the date for last Saturday” Uh... okay. I guess that was the 22nd of April. 04 22 Bzzt! No sorry that is not the correct date. Please Enter the date for last Saturday. Oh yeah, it is the 21st. Bzzt, that date is too far in the past. Are you serious? The only date that I can enter is 28th April? Bingo.

Well bugger me. If you will only accept one value, and you know what that value is, why don't you just put that in there!? And why can't I enter a date from a past week? It is not an automated system, this gets sent to our HR department for manual human entry into another system. She asked me to resubmit my form from 2 weeks ago. Sheesh. I can see why you would want to make sure that someone selected a Saturday (the start of our billing week), but why force a single Saturday? The people in HR know what they are doing, I am not going to be able to slip in old forms just by putting in an old date, if they are not expecting them they are not going to process them.

If there is really no date selection, don't ask me to select one.

Friday, April 20, 2007

Make ‘em mandatory!

There is a town in the states called Kennesaw with what might be called the opposite of gun control laws. Each household is required to own and maintain a gun. Must be a real shoot-em-up town right? People gettin’ popped left and right? Check out the article.

When you think about it, the proposition “If we make guns illegal there will be less gun crime” is pretty nonsensical. I would suggest the simplified relation “Gun crime is proportional to the difference between the number of armed bad guys and the number of armed good guys”. From this it seems likely that decreasing the number of guns the bad guys have would be good, just as increasing the number of guns the good guys have should have a reducing effect on the level of gun crime. This subtraction however is problematic: it is difficult to actively reduce the number of bad guns. Installing gun control laws causes the good guys who have guns to turn them in and the bad guys to snigger. Arming the populace may well put guns in the hands of the bad guys, but I would argue that on balance more good guns are created than bad - criminals don't feel they need gun licences, don't register their guns, don't pay retail, don't install gun safes, don't enrol in official how to shoot safely courses. Gun control laws have the opposite to the intended effect.

If you make gun ownership criminal, only criminals will own guns.

Wednesday, April 18, 2007

Are you packing?

I would like to live in a world without guns. I would like to live in a world without violence of any sort. If people were never even verbally abusive to one another I would consider that we were on our way to the perfect society. If someone threatens your security with violence, I believe the first response should be to try to defuse the situation, to remove yourself and those dear to you from danger into safety. Only as a last resort would I consider meeting violence with violence. But to not take that last step. To turn the other cheek as it were - well I leave that to other folk. For me, if you threaten me and you leave me no other recourse than to violence, then violence you will get.

I am starting to believe that in some societies this necessarily extends to a willingness to counter gun violence with guns. I have often thought, and heard said by others, that the death toll in shooting rampages would be very much diminished[1] by some of the people involved (witnesses, victims) having guns (heroes). I think that is a very difficult argument to dismiss outright.

I recently watched a video by Penn & Teller on the bullshit that is gun control. Their argument is very America centric (citing constitutional amendments), but I think the arguments within translate nonetheless. Then yesterday there was the shooting at Virginia Tech. I wonder how far a lone gunman would progress into his spree if some significant portion of the populace were armed. I wonder how many criminals, who now find themselves in the wonderful position of being likely the only person with guns in a couple of minute radius, would reconsider all manner of crimes. Overnight there was also a shooting by a security guard of a man in Sydney. Two men approached him with a drawn gun, likely not expecting any resistance. He shot them and they fled. Criminals use guns to have a power advantage. By reducing the power of the populace (removing their guns) you let criminals easily tip the balance in their favour - carry a handgun. An armed populace (maybe as few as 2% carrying weapons) could greatly reduce a lone criminal's expectation of being ‘the most powerful’ in a certain situation merely by carrying a gun.

I am not saying that everyone should or needs to have a gun. But those considered stable enough, those who can show they can do so safely, those who wish to take on the responsibility of using a gun if the situation requires, why not?

Gun control folks are always carrying on about needing to ban guns. “If only we could remove all the guns we would be safe”. Well think about this: Virginia Tech was a gun free zone. For the 30 minutes or so between 9am and 9.30am there was only one person in the area who had a gun, and I think we all know now what he decided to do with it. I just wonder what may have happened if some of the teachers, the RA, the seniors, the janitors were armed. I wonder even what would have been different about that morning if the gunman had even the slightest doubts that perhaps he would meet with people in that place that were armed and prepared to defend themselves and others.

I don't think ideas that appear logically sound ought to be dismissed outright by ‘zero tolerance’ style arguments.

[1] There was a shooting at another school in Virginia, not so many years ago. Though there was a different outcome at the Appalachian School of Law. Two students at the scene were armed. They subdued the gunman after he took his first victims.

Friday, April 06, 2007

*Sniff*

You know how when sometimes you are just sitting there and you smell this smell and like, you smell it and you can't work out whether it's toast or dog shit... Yeah, I hate that.

Moo

The communist utopia can be build from a socialist regime by force in much the same way that a glass of milk can be build from a cow by cutting it in half. (Sounded better before I wrote it down...)

Thursday, April 05, 2007

Turn up the suck

I need to work out why the company I work for sucks.

We all want to know why our product sucks. I guess I could benefit from knowing why (you think) I suck.

Seth Godin's new book The Dip (under the lens here) seems just the ticket. I have not had much trouble in the past knowing when to quit. My problem has been more quitting when it is time to... (I just want to know how they get the little guy on the cover to walk along like that)

[Edit: I totally read “help you see what's causing your organization (or you) to suck” rather than “to get stuck”. Seth: Please tell us why we suck too! But in the end, one could say that people and companies and enterprises and relationships get stuck precisely because they suck.]

Swap Mouse

So I swap sides with the mouse a lot. I have to say I mostly use my left hand (even though I am a righty), but I swap often enough to have looked for a utility to easily swap the buttons.

I downloaded a couple of them and found them to be horrible. Some had graphical interfaces. One wanted to install and run at startup. One wanted to leave its little icon on the notification area. Geez Louise. All I want is a utility that I can double click that will swap the damn buttons around then go away. Silently if possible. So I made one.

It is all of two or three lines of code. (Well, okay, you know what I mean, three that I had to write myself). It is about 20KB, does not install, does its job quietly, and has a cool looking icon (well maybe not, but I had fun making it).

I used this as an opportunity to check out Google Code at the same time. So I have created a project called swapmouse, the executable is there now, the source will be linked up when I get home. Here is a link to the bare executable for SwapMouse for your convenience. Just put it in a directory under Program Files or somewhere (I usually make a Program Files\Utilities just for storing nice little programs that don't need to be installed) and make a shortcut to it. Enjoy.

Wednesday, April 04, 2007

404



    Error 4.04 - Date Not Found     Please try again at a later date. Maybe the 5th.


Tuesday, April 03, 2007

Last.FM gadget

This past weekend I have been working on a windows vista gadget for last.FM

Most of Saturday was spent fooling around with javascript for the first time in a long while. Trying to find syntax errors using notepad. Ugh. I finally relented and downloaded visual web designer. Next time I play with it I will hook up the script debugger. The rest of the time was spent parsing the XML and text responses that the last.fm 'APIs' respond with. It is a shame that the whole thing is not done in XML - the np.php (now playing) for example just responds with name value pairs in text. Not so nice. Plus it seems to me that the whole shebang is a little iffy at times. Just not responding to requests.

I will have a bit more of a look at the last.fm source tomorrow, for now I have only really looked at the myLastFm source code... Perhaps going back to the original source would be better. I want to know for instance whether the 'real' client polls the np.php for track updates (say every 5 seconds) or if it has some other way. I had envisioned getting the remaining track time and then waiting until around about the time the track should finish and then requesting new track info. But time remaining field seems to have been left out of the response (the myLastFm client looks for it too).

So for now I have working:

  • Basic gadget functionality (icons, page sizing, basic css and js)
  • Username and password configuration.
  • Password hashing.
  • Recently played tracks fly-out.
  • Now playing info (artist, album + cover art, track).

I think actual login (send username and password hash, receive sessionid and stream address) is close to working - just that when I was testing it last night the whole last.fm site stopped working, now np.php was not returning etc. Later it worked again, but I was past the stage of wanting to code - Guild Wars...

Thursday, March 29, 2007

x509 Certificates

How do you create a self signed certificate (for SSL) that (don't know how best to put it) carries it's password with it. It is just for testing, I just want the certificate the be used by the server in its call to AuthenticateAsServer. I (eventually) was able to create a self signed Root Authority certificate like this:

makecert -n "CN=Test Root Authority" -r -pe -ss my -sr LocalMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 TestRootAuthority.cer

and from it create a self signed certificate:

makecert -n "CN=Test Certificate" -in "Test Root Authority" -pe -ss my -sr LocalMachine -is my -ir LocalMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 Test.cer

Which works, as long as the server runs on a machine where the certificate is installed in the certificate store. It will not work if I try to just use the Test.cer file. That gives me:

The server mode SSL must use a certificate with the associated private key.

Regardless, I am still seeing the http connection attempt (that I am assuming to be a revocation list check or something) that I am trying to avoid. (thread on microsoft.public.dotnet.security)

Oh I don't know...

Wednesday, March 28, 2007

Spoke too soon!

None of the file operations work from the search results window.

I get “Interface not supported” errors... which I think could have something to do with it being a removable drive (or at least something to do with my specific removable drive) because I can't reproduce the problem using local folders... Grr...

Too late to start looking up error codes now.

Hey now that is cool.

Or: If you can look past the UAC prompts every time you do something outside of your Documents folder there are some neat features hiding there.

I was just looking at some files on my MP3 player. I was going to move some files that somehow got put into the Unknown Artist folder. I went into the folder where there are about five albums that must not have had the right artist info when I synced them.

Neat feature 1: The folder was being displayed as icons (I have not set up all my folders for view as details yet like I normally would...), go into the view dropdown (not sure that I like the fact that in one fell swoop we have decided that the menu bar is a bad idea...) to select details (so I can see the names better). What do I notice but there is a little slider on the left. I wonder what that does? It seems that (as vista is all vector icons and all) you can choose not only small or large icons, but 'any' size from small to HUGE. (We're talkin’ “My screen can show four icons at once” kinda big).

(Really) Neat feature 2: After playing with the icons for a bit. (“Look they're big. Ooh look they're small. Biiig. Widdle. Biiig... Weee” Ahem.) I right clicked on the ‘folder’ over on the left. (here again I don't like the look of that area, don't like the fact that there are no + symbols to tell if a folder had children... maybe you can turn this on somewhere?) Where is Search... Ctrl-F... no, that seems to try to execute a ‘crumb’ or something, which fails with an error and a tasty sounding *bung*. Where is the damn search. Well I'll be... There is is up there in the top right corner (just where it is in Explorer because I did not disable the search and install Google toolbar - trying the get the full Vista experience before I decide to replace everything with 3rd party tools.) And my doesn't it work well. Searching as I type... I like. Really. Search used to be bad on early XP, and then at some point it got totally fucked up (stupid search wizard, make me press back, sometimes I can't go back grr.) But this integrated search seems to work really well.

I like.

Tuesday, March 27, 2007

ASUS = ASUckS (for online software updates anyways)

One problem that I have with my new machine (other than not plugging in all of the power connectors at the start...) is that I am getting a μCode error on POST.

Seems like the BIOS needs to be updated for the latest Intel CPU stepping. Fine, no problem, I can do that.

Friday: Just go on over there to the ASUS support site... Hmm page not working. Saturday: Cool, page is up, search for P5B Deluxe, click on the WiFi edition... Click on downloads... hmm timeout. Saturday afternoon, Sunday: Nice, the downloads page is working now. Find the latest BIOS, there, download from USA - nope timeout, Global - instant timeout, Europe? - nada, China, Japan? - nope and no. Grr. Today: Yeah hay! It works... Well... from the Europe link anyways... But they (6.6MB, 9.6MB, 4.3MB) are downloading at 3.3KB/sec...

This is gonna take a while.

Gimme my gestures back!

Dammit.

Having installed Vista over the weekend I have to say that it does look kind of neat. I also have to say that I really fucking hate having to authorise every action two (or three!) times. The only way that I see to avoid this is to disable UAC after which Vista throws up it's hands and says “okay, no security for you!” and lets any application at any authorisation level do anything. Surely MS can do better than this? You mean to tell me there is no way to tell if a program execution or a file system change or any number of other things is initiated by a direct user interaction or by another running process? Damn.

If it is by a user interaction I should be able to say “You know what? I know what I am doing, if I double click on something I really, really (yes really) mean that I want to execute it.” “Yes I know that is a system file, yes I really want to delete it”. If it is the web browser or something trying the same trick, go ahead and warn me, but otherwise... stfu, ffs.

Worse, my favourite utility ever does not work on Vista. StrokeIt! Oh no! I need my mouse gestures. See, I usually use the mouse with my left hand, and as such ctrl-c ctrl-x etc are just a bit hard to do (without moving my hand from the mouse to the kb back to the mouse each time, and ctrl-c with the right hand is just out of the question), so I use mouse gestures. And let me tell you once you start with the gestures - you never go back. It is just so fast and natural that it really should be a system service. Dragging could really be considered the first ever gesture, it's just that no others followed after. Eg. I use drag up as copy, drag left as cut, drag down as paste. I have little squiggles that I use for inserting comments into source files etc.

I miss you StrokeIt, I hope the developers find the time to update for Vista (could be a mammoth task from what I have seen of the complexity of Vista’s API)

Friday, March 23, 2007

Broadband piggybackers

One other thing that I will be replacing this weekend is my WRT54G wireless router. It seems to be a bit fried, keeps loosing wireless functionality, appears a bit slow. So, they are cheap, I bought a new one.

Anyhow, I was just looking around in the setup of the old router (which I had flashed with DD-WRT actually - undecided whether I will bother again...) to make sure there were not any funky settings that I should note down. What do I see but the list of clients. There are two hosts there that I don't recognise(1). Heh, neighbours piggybacking my broadband... Well, one of them is not connected, and the other has about 11% signal to noise ratio - so they can't be having fun. I was just wondering though... If you were annoyed at your neighbours using your connection(2), maybe you could configure them into the DMZ. The DMZ in case you don't know, is the ‘demilitarised zone’, which means they are totally open on the internet. Normally our machines that are behind the router have only a NAT connection to the internet and thus most incoming requests are blocked by the router. So you accept the consequences if you forward a port from the router to your machine. Putting someone in the DMZ however, forwards all other ports (not forwarded elsewhere) to that machine. I wonder how much that would suck.

(1) Actually it's weird, one has 3 associated MAC addresses and the other has 2.

(2) To tell you the truth, I couldn't care less. I did have it secured before just for the fun of it, but in the end if someone really wants onto your router they can pretty much have it anyways. All the security really does is make it annoying for your friends and flatmates to use the router.

Delivery

Well the last of 3 boxes arrived from NCIX yesterday (other stuff that was out of stock in Vancouver which I ordered from SohoDiffusion here in Montréal was delivered on Tuesday). Nice and fast, everything seems to be there. Should do the build tonight. (Was very tempted to do it last night but needed to sleep) I am taking the day off tomorrow so tonight...

The Thermaltake case is quite neat looking for a cheap case. I should have waited a few days more to order the Microsoft keyboard - I saw their nice laser 6000 desktop just the other day for not much more than I paid for the comfort curve + optical wireless mouse. The Sapphire graphics card is huge and heavy. The Intel core duo is a bit smaller than the last Intel chips that I installed - P3 1GHz (into a dual processor machine 6 or more years ago). Plus it seems to have no pins, looks like it must be those little balls - I have not looked too closely.

So what do I think I need to buy still... 5.1 Headphones, Extra 500GB HDD(s), Wacom tablet, Games! (Oblivion, FEAR, ...) Bye bye weekend :)

Thursday, March 22, 2007

Les yeux bridés

André Boisclair’s use of this term, meaning “slanted eyes” to refer to students (at a certain university) of Asian descent has caused quite a stir both locally and further afield. (M. Boisclair is the leader of the Parti Québécois)

He claims that in French the term is not derogatory, and that he uses it all the time without considering it a racist epithet. Other people here have said similar things to me over the last few days, and I have a few thoughts on the matter.

Firstly, how a term is considered by those who use it is probably not a good basis for judging the term offensive or not. Not too long ago it was natural and normal to refer to black people as 'niggers', to call black men 'boy'. Most of the people guilty of this would probably have also claimed to not see the offense in their words. 'Slanting eyes' was once considered the be inoffensive in English also. Perhaps if ‘yeux bridés’ is not now regarded as offensive, it should become so for the exact same reasons for the change in English. Secondly, it is not really the words (their exact definition nor nuance) that are the problem. It is the objectification, the focusing on characteristics and making generalisations designed to segregate the population into ‘us’ and ‘them’. It may not be that the word ‘bridé’ is offensive, but I assure you that calling out different groups by their attributes (physical, mental, spiritual, sexual, etc) most certainly is.

Mr “I am not a racist but” Boisclair, you do a disservice to your cause with your words, and more so by your self-defence after the fact. Let us not revisit hard fought battles of old over words - if someone is offended by your words, consider them offensive. Admit that you, as a white male in modern society, have ingrained racism (sexism, etc.). Racism that we all have been indoctrinated with from our earliest experiences. I feel it in myself. We are indefensible on that front. The best we can do, all that we can do, that which we must do with every ounce of strength within us it to fight these tendencies of ours, curb our words and deeds (as we can but hope to curb our thoughts). Then perhaps there is some hope for generations future. Hope that they will have not the slightest idea what racism might have been. It is the only way.

Tuesday, March 20, 2007

Do something!

And yes, doing nothing is also doing something. (Thanks Seth.) Though one could argue that it is perhaps not the right thing...

Will Durant said:

One of the lessons of history is that nothing is often a good thing to do and always a clever thing to say.

However I don't think one should get too hung up about being quite that 'clever' all of the time.

It is not slack that I lack Jack.

Saturday, March 17, 2007

Polar(ised) fleece

I tend to be positive during the winter time. Positively charged that is.

I wear polar fleece most of the time and I find that I get a lot of shocks off doors and chairs and people. I just gave someone here at work a wide berth for fear of having all the dust-bunnies, pubes and cat-hairs stuck to his polar fleece leap across onto mine should I venture too close.

Thursday, March 15, 2007

C# Reference types pass by value

(file under “stuff that I knew and forgot but wish I hadn't and probably won't ever again”)

Parameters in C# are, by default, passed by value.

That means that your function cannot modify the value of its arguments. You pass it an int i = 2 and even if internally it does i = 3, once the function returns you still have i == 2.

However for reference types, pass by value does not mean what you might think it means. A reference type is basically a memory address. That memory address is passed (sure enough) by value - the function cannot change the location of your object. But internal to the function the reference type is still pointing to the same location in memory. Thus any changes to the object within the function will be reflected in the calling context - the function will have side effects.

So what do I find in some of our code today?

void function (User user){
    User localUser = user;
    localUser.SomeProperty = "Not the value that you were expecting haha hoho";
}

Hrm. My calling context's value for SomeProperty is not what I was expecting. Seems someone had realised that the reference type was going to cause problems... “I know, I will make a copy of it and change that.” Unfortunately that will not work either. The assignment operator copies the value of the reference type (the memory address) not the object itself. I.e. it is not a deep copy.

How do you fix this? You make a function that performs a deep copy, and call it from within any function that receives your reference type as a parameter.

A good place for this function? A copy constructor. An overloaded constructor in the reference type class that takes one argument - a reference to an object of the same type. Then copies all of the properties to the new instance.

class User{
    public string UserName;
 
    User(User existingUser){
        UserName = existingUser.UserName;
    }
}

How do you enforce the “no messing with my data” rule? Well, the only thing that I can think of is “If you don't want people breaking your toys, don't lend them out” - only let them have a copy.

function(new User(MyUser));

What does explicitly telling a reference type to be passed by reference actually do? Not much as far as I can see.

Would it be nice if passing a reference type by value did something closer to what you might expect? (Could be done by internally making a deep copy of the object at the time of the call) Possibly.

Will I ever forget that “Reference types are always modifiable when passed as parameters”? I wish I could say no.

Wednesday, March 14, 2007

π

Happy Pi day.

3.141592653589793 is about as far as I can get

Pi Day

Me: "Hey, Wednesday is Pi day."

Computer Programmer: "Huh?"

Me: "Well, you know, March 14th. 3.14... We should celebrate at 1:59 hehehe"

CP: "Oh! Oh Pi! Yeah! 3.141516161616 all the way to infinity!"

Me: "Uhh... yeah."

Tuesday, March 13, 2007

Bang Bang

Breaking Open The Head is a wonderfully personal and earnest work on contemporary shamanism, visiting various realms of mind and spirit by way of the psychedelia of the 50s and 60s through to the present day.

Pinchbeck relates to us the story of his personal experiences with several sacred plants, revealing to us some of the insights granted him. Insights into the structure of the natural world, societies past and present, the lost ways of the ancients and humanity's future (fixed or otherwise).

I bought this book after seeing him on The Daily Show plugging his book 2012: The Return of Quetzalcoatl which after some inspection in the bookstore looked just a mite too much the tripped out ravings of a loony. Having now read his earlier work, I am going right back to get the other one. Not that I think he will convince me of the existence of the spirit word, but that I no longer assume that that is his intent, and that at least it will be well written and coherent. Really has me wanting to go back and open that door once again. Maybe even turn on the light this time...

Price Match

Well, well. All approved. I am impressed, and elapsed time of only 2 hours.

So far NCIX are making me happy!

Not the cheapest around, but what does that matter with price matching. Plus you can play breakout on the main page. Sweet.

Blogger editor

You suck too! Geez. I'm using it for 5 minutes (these three posts) and I already hate it. Mind you I imagine (hope) that it is configurable... or at least fixable with Greasemonkey.

Current list of peeves (not bad for a couple hundred words worth or use):

  • no plaintext paste
  • nasty formatting is kept even when you backspace it away
  • anchor tag remains open if you link to the very end of the currently entered text

Why not just use the gmail editor? Is it just that I have never noticed these problems in gmail? Maybe I will go check that out - I don't usually bother formatting links that I sent to people.

Doubleclick

I was just at nytimes looking at an article about some guys' computer game canon and found something really annoying.

They have their doubleclick mapped to some useless contextual dictionary. Now I quite often doubleclick a word to highlight it to keep my place, I click around on stuff and sometimes accidentally doubleclick something. Why does the New York Times want me to stop doing this? Why use doubleclick anyway - it means that you can only search (reliably) for whole words, not for names, or words broken over multiple lines. No I don't need the definition of "at", nor that of "of all time: Spacewar! (1962), Star Raiders", thanks all the same.

If you really want to put this kind of reference on your site, do something nice and have a context menu when the user highlights a word or phrase. That might be useful.

Also, the lookup feature is not enabled in the actual "powered by Answers.com" dictionary - where it might actually be useful to drill down on other words that are unfamiliar. Well done.

I note also that there is an upwelling of support for this new tool.

Painless

Blogger to Google blogger. Simple as that: painless. I like Google.

Buying a computer from NCIX.com. Seems okay (just did it). Using their price matching feature... We will see if all my selections were "approved". Here's hoping.

Nearly 2 years no blogging. Painless? Sure.