Archive for July, 2007

July 31st 2007

Programming.

I recently opened my Mini-Programming Competition #2 (not a plug, open to UWCS peoples only).

The challenge was made up about an hour before I announced it, and, as such, I didn’t even try coding it before announcing it, I just “guestimated” the size of the problem, I think I did reasonably well, and I think this makes me a good programmer.

A few I have spoken to (especially among the non-hobby-programming crowd) have not been able to come up with a(ny) algorithm within a quarter of an hour or so, I didn’t measure, but I guess I had a codeable solution within a minute of imagining the problem. I’d hope this makes me a good programmer.

As for solutions, I spent a reasonably amount of time coming up with a single (good) algorithm and have tried to “optimise” it, and port it to other languages, etc. Others have come up with many algorithms and trialed them. I have to admit that my solution was pretty poor, regardless of optimisations. The really interesting question here is, does this make me a better or worse programmer than the many-algorithm people?

Aside: Golf as a programming benchmark.

Golf, the art of writing short (by character) programs (as apposed to fast programs), is often sneered upon by programmers (especially the employed ones).

As I mentioned above, it’s far more about algorithmics (an important skill, regardless of language or formatting) than the simple ability to delete whitespace and use short variable names (although being able to follow code in this form is a (useful?) skill). Alongside this, it’s a great way to use language features you don’t see very often (for instance, I now actually have experience programming with raw pointers :p).

My rules for the MPC are carefully chosen such that it doesn’t matter if a language is “better” than another for writing short code in, although, obviously, points are awarded for the combined best choice of language and solution.

No Comments yet »

July 29th 2007

Amazon Accounts

I have, for a while, suspected that I have more than one Amazon account associated with my main e-mail address. I’ve dismissed it as silliness, as, in no sane system, would this be possible, regardless of the fact that recommendations always seem to be incredibly similar.

After having all kinds of crazy things happen to my shopping basket today, I decided to have a poke around.

It appears that I do have two amazon accounts (or possibly more!) associated with my e-mail address, with different passwords. I can easily see this happening, as I have a set of ten or so passwords that I use for random websites, and just guess if I can’t remember which it is for the current site.

Showing how “brilliant” their database design is, even though they allow two accounts with the same e-mail address, they check that there are no e-mail-address/password collisions:

“The e-mail address and password that you selected may not be used at this time. Please select a different e-mail/password combination below.”

Which basically means “You’ve just sucessfully guessed someone else’s password. Please log-into their account and buy stuff.”.

Continuing, even worse, creating a new account with the same e-mail address as an existing account (with a different password, obviously) (note that this doesn’t require access to the e-mail account in question) allows you to skim some details from the existing (or one of the existing) accounts. For instance, the “Change your name, e-mail address or password” seemingly always gives me the wrong name.

Dyoooooooooh.

Update:

You can use the “forgot password” form to see if you have more than one account (“We can’t seem to identify you using your email address alone.”), and the Wishlist Search to guess how many accounts you have.

2 Comments »