Showing posts with label wtf. Show all posts
Showing posts with label wtf. Show all posts

Sunday, August 12, 2007

Python Comment of the Week (Aug 12 2007)

# Assorted functions for various things

Thank you, developers of yore. You've made things oh so much clearer to this lowly maintenance programmer.

Saturday, March 3, 2007

Error Handling & Pay Phones

It's not enough to handle all error cases; you have to respond to them properly as well.

While waiting in the Ottawa International Airport, I placed a call to my sister from a pay phone. The number is local, so I entered the seven digits. The phone's response was to play a recording for me: "To dial this local number, you must enter the area code." I tried again, entering 1+<area code>+<local number>, what I had assumed to be the only way to dial a number with an area code. To this, the phone played another recording: "This is a local call. You must not begin the number with a one." Finally, I dialed <area code>+<local number>; this worked.

In both failed cases, the phone system detected an error and alerted me, as well as suggesting the solution. So it did one thing right, and two things wrong. The suggested solution was not clear enough, but more importantly, the phone system knew the number I was trying to connect to; it should have adjusted the number and connected me, without notifying me of any perceived errors.

Monday, February 12, 2007

Shredded Wheat

If the serving size of shredded wheat is two biscuits, why are they packaged in threes?

Friday, February 9, 2007

Mercurial Head Scratcher

I'm trying to generate a patch to send to a project that uses Mercurial for their scm. In the middle of some commits, I did an 'hg pull' and 'hg merge'. Since I did not have 'git rebase' available, I now have the merged code right in the middle of my commits. If all of my commits were adjacent, I could run 'hg diff -r a -r b' to get a patch containing all of the changes. They're not, so I can't.

In git, I could run 'git diff master' to compare my branch to the master branch, and get a single diff containing all the changes. I tried to find a similar command for hg. The closest I could find was 'hg outgoing -p'; but this still contains the changes from the merged upstream code. Other examples for accomplishing this on the hg website are so convoluted as to make the average perl programmer balk.

In the end, I had to do a fresh clone, then diff the two directories.

Maybe I'm missing something, but how is it people can think that Mercurial is easier than git?

Wednesday, January 24, 2007

Seperated at birth?

Linspire announced Click N’ Run support for distributions beyond their own the other day. What I find interesting is the logo for Freespire shown on the cnr page, conveniently adjacent to the Fedora logo:

linux-logos

Obviously, the logos are on the wrong sides of each other. Freespire should be the left, or sinister twin.
© 2012 James Bowes. Icons by glyphicons. Powered by Blogger.