Geek Rant dot org

 

Mon 2008-06-09

Typical URLs and how to shorten them

Filed under: — daniel @ 22:10

Some web sites have very well designed, brief, URLs.

But some have URLs that are way too long. And you don’t always want to be putting them through TinyURL.

Here’s how some of them can be shortened if sending them via email (when they might break when text wraps) or in print.

Anything that’s not bold can be chopped out. And remember when putting it in print, drop the http:// — it’s not necessary to key in, and only slows people down. The same is usually true for the www — though I’m in two minds about that. For publicity etc, it sometimes helps to jog people’s minds that we’re talking about web addresses.

Amazon — it’s the ISBN or other identifier which is critical here
http://www.amazon.com/Doctor-Who-Complete-David-Tennant/dp/B000UVV2GA/ref=pd_bbs_sr_1?ie=UTF8&s=dvd&qid=1212896155&sr=8-1

YouTube — remove the country, and any extraneous arguments such as “Featured”
http://uk.youtube.com/watch?v=-BOYAl0F6xs&feature=user

The Age (and other Fairfax sites) — remove the headline text. (This works for their older articles/older URLs too.)
http://www.theage.com.au/national/clouds-loom-as-oil-price-soars-and-petrol-hits-170-20080607-2n9n.html?page=-1

Google Maps — the co-ordinates and zoom quotient (or whatever it’s called) matter the most. Though if you’re trying to specifically point out an address, you’ll need to leave the query in.
http://maps.google.com.au/maps?f=q&q=247+flinders+lane,+melbourne,+vic,+AU&ie=UTF8&ll=-37.813751,144.964621&spn=0.011188,0.018196&z=16&iwloc=addr

Realestateview — gets really messy depending on how you find the property. Some of the arguments tell it what navigation options to show, but when it all comes down to it, it’s the OID which is the critical argument. Mind you, leaving the “rev=on” stuff gives you the area map by default, so better to leave that on if emailing.
http://www.realestateview.com.au/cgi-bin/view.pl?OID=1136439&rev=on&s=102294592&Sub=bentleigh&BeL=0&BeH=9999&PrL=0&PrH=99999&Surr=&IKW=bolinda&PT=hou&PT=uni&PT=tow&PT=stu&PT=lan&PT=dev&PT=inv&PT=ter&PT=vil&PT=sem&PT=dup&PT=pen&PT=wac&PT=hol&PT=rta&PT=alp&PT=car&PT=bof&PTr=&CS=VIC&OrderBy=listed&OrderStr=&Con=S&SearchPage=/buy/residential/melbourne.shtml&Bkmk=_&OFI=&OFIDays=&BS=10&Thu=&Qui=n

BBC News — these aren’t overly long, but can still be shortened.
http://news.bbc.co.uk/2/hi/south_asia/7442323.stm

MS KB — all kinds of different versions of their URLs fly around the place, though a lot of their new links use the most sensible, concise version.
One of many of the old style: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q917925
Better: http://support.microsoft.com/kb/917925
(Of course to many geeks, just say Q917925.)

For other sites? No doubt people will have their suggestions.

For myself, when I’m sending a URL to someone, and I have the time, I tend to muck about and remove what look like the extraneous parameters and see what still works. Mind you, some sites don’t work very well for this — Dick Smith (dse.com.au) for example, relies on some kind of weird-arse session parameter, so it’s best to use their own “email this link” feature.

And always check it before you send it.

Digg this

Wed 2008-05-28

Weird bug

Filed under: — josh @ 16:41

Let’s say, for example, that a system supplies you the time of some event in UTC, you convert it to local and shove the date/time up on the display. Say, for argument’s sake, you also include the Day Of Week, ending up with a format of DD/MM, DOW HH:MM. Everything looks fine, until someone notices that the Day Of Week is wrong. The 28th of May is a Wednesday, not a Thursday.

What happened?

The date conversion routine that generates the DOW string does a bunch of odd stuff, but seems to work correctly; it certainly works in other parts of the code, and generates the right string there.

WTF?

The UTC time seemed to be converted to local time twice, but that wasn’t the culprit; surprisingly, no-one is killed in an explosion of silicon splinters when that code is double-executed. Whatever.

Could it be that the system supplying you the time of that event in UTC is off by a year? One year into the future. That would give you that behaviour.

Check it.

Digg this

Mon 2008-03-10

Freebie database dev tools

Filed under: — daniel @ 23:23

I used TOAD for a while for browsing around Oracle databases. Good stuff, though the free version is a bit limited, and Quest Software, who sell it, have the annoying thing of not selling it retail, but negotiating licence prices, making purchasing it a long drawn-out process.

Turns out there’s now an alternative: Oracle’s SQL Developer, which does a pretty good job at doing the same thing, and it’s free. It runs on Windows, Mac and Linux, and it uses Java and the JDBC client and apparently doesn’t need the humungous Oracle client software (though I haven’t actually verified that yet).

(Tony found the SQL Server equivalent some time ago, though it’s moved slightly. MySQL? MySQL GUI Tools.)

Digg this

Mon 2008-01-21

The importance of filenames

Filed under: — daniel @ 12:27

When I’m putting PDFs (or any kind of downloadable file) on web sites, I’m always sure to publish them with a filename which is meaningful, including some indication of the web site it came from. ‘Cos if the average user is like me, they save PDFs etc all over the place, and some kind of identifier makes it heaps easier to find the file later.

Digg this

Sun 2007-10-28

Car rental web sites again

Filed under: — daniel @ 20:29

(Previous rant)

Trying to hire a car in Adelaide for a single day, a Sunday. I’d really rather not have it overnight, so I don’t have to park it somewhere. As it turns out, it looks like none of the car rental places are open beyond 4pm on Sundays, but the problem with their web sites is how they tell you this:

Budget: “Your return time is after the location’s closing time.” — So what’s the location’s closing time? Surely you’re not going to make me guess? Wait, check the Locations page. OK, found the list of nearby branches. Click on the chosen one. No opening hours shown. … (sometime later) … Wait, if I mouse over the location on the map, it tells me the opening hours! Not that there’s any prompt to the user to say that’s how it works.

Hertz: “Return Date or Time - This location is closed at the time indicated. Please adjust your return or select an alternate location. [DE357]” — But at least there on the screen it’s showing me what the times are.

Thrifty: “Your rental details could not be processed because the return time is outside the opening hours for the return location. The return time has been changed to be the location closing time.” — Better, but why didn’t you tell me the opening hours when I was checking what your locations are?

Europcar: “Your Return Time could not be accepted because the operating hours for our Adelaide City Branch on 10/28/2007 7:00:00 PM are between the hours of 09:00 and 16:00.” Bravo!

Avis: tells as I click through where the branch is and what its hours are, but ignores it for another screen or two. But when it does notice, it eventually tells me everything I need to know in one message: “The Return Location selected is closed at the time requested. The Return Location operates from Sun 08:00AM-02:00PM; Mon-Fri 07:30AM-06:00PM; Sat 08:00AM-02:00PM. The Return Location Service may be available after hours. Please call this number (61) 08-84105727 to contact this location for further details.” — Bravo Avis, you win.

Of course, the aggregator sites like VroomVroomVroom don’t do too well out of this either. Oh well. SimilarlyDriveNow.

I ended up booking with Avis (closest to the hotel) via DriveNow (the best mix of good prices and nice web interface). And when I discovered (after placing the booking) that I’d entered the wrong dates, I went to avis.com and changed them. Neato.

Digg this

Thu 2007-10-25

The logo doesn’t make it secure

Filed under: — josh @ 06:43

http://www.greatreads.com.au/the7deadlysins/competition1.htm

See the protocol on the front? On the page, net to the big verisign logo:

We guarantee that every transaction you make on our website will be safe. Our secure server software (SSL) is the best software available today for secure commerce transactions. It encrypts all of your personal information, including credit card number, name, and address, so that it cannot be read as the information travels over the Internet. When an order is received, SSL is again used to unscramble the message, check that it came from the correct sender, and verify that it has

Has what? It’s a mystery.

What is it with these half-baked web pages?

Digg this

Tue 2007-10-23

They never learn

Filed under: — josh @ 18:04

Webform, major financial group. I entered my phone number, only to be presented with an error message:

Contact Number is invalid. Contact Number can contain only numeric digits. There is no need to include a country code.

My crime? Putting in spaces. Heaven forbid that the computer strip them out again.

Digg this

Tue 2007-10-09

ANZ computerised banking is user-hostile

Filed under: — josh @ 10:42

I have an ANZ Bank account. Using their website to pay bills is an exercise in frustration. I only have one account, but the website insists on me picking it out of a dropdown with two entries - the first one, the default, instructing me to pick an account. Failure to do so results in an error - “Please choose a From Account.” I only have ONE! Assume that’s where I want to pay from! Then one must pick who to pay, with an option to pick previous billers from a drop-down list. If you pick from the dropdown without javascript enabled, you get the error “Please select a biller from the drop-down list or enter a biller code.” - with javascript it fills in a few fields for you, but why does it even need you to fill those fields in if you’ve picked your biller already? Fill them in when I click the “I’m done” button!

Finally, we come to a bugbear I have with ANZ currency fields. You can’t enter a dollar amount, it has to include a decimal point with two following cents; they can’t infer from a lack of a decimal point you’re talking about a dollar amount. They inforce this rule on their website, and they insist that at an ATM you enter the number of cents you wish to withdraw from the ATM. Given the smallest unit of currency available from an ATM is $20, what is wrong with this picture?

Digg this

Thu 2007-10-04

Would you like Open Office with that?

Filed under: — daniel @ 23:58

Java update

Digg this

Tue 2007-09-25

How to do null dates in database queries in VB.Net

Filed under: — daniel @ 21:49

They do make you jump through some hoops, but I think I’ve got it worked out.

Dim dYourDateField As Nullable(Of Date)

…then you either set it to be a date (using DateSerial or CDate or whatever, or you set it to Nothing.

Then when you’re using it in a database query, the parameter can be set like this:

oCmd.Parameters.Add(”@YourDateField”, System.Data.OleDb.OleDbType.DBDate).Value = dYourDateField

That’s it. At least, it seems to work okay for me. Touch wood. Apparently it should be okay in the .Net Framework 2 onwards.

[Another in an occasional series of things Daniel posts about so he can easily re-discover it next time he needs to remember how it’s done.]

Digg this

Fri 2007-09-14

Mortgage ‘Calculator’

Filed under: — josh @ 15:30

Have a go at this crappy morgage calculator. Insofaras mortage calculators go, it’s middle of the road. It doesn’t allow for being an investor, which renders it useless to me - I have a substaintial investment income (only matched by my substaintial interest expense), and I’m not trading up from my current house.

But my biggest gripe is how the calculator has been “designed” to only work if you enter a valid, live email address. So this thing turns out to be a marketting tool, not a calculator per se. The address of me@example.com doesn’t work. If you enter an email address that isn’t live, it doesn’t give an error message - it barfs with an ASP error when sending the email fails. WTF? How is J Random User meant to figure that one out? Thankfully, it hands over the results (for what they’re worth) because jobs@google.com is a valid email address. Sorry about that, Google.

Digg this

Mon 2007-06-25

Snopes Love/Hate

Filed under: — daniel @ 17:55

I love Snopes.com. It’s an invaluable resource for urban legends. Every time some idiot forwards me the latest fad email, I can debunk it (or, far more rarely, prove it isn’t true.)

I hate Snopes.com. Because they go out of their way to make their site fiddly to use. There’s popups that beat Firefox’s default blocker. If you click through to another site from their pages, it not only opens in a new window, but they try to hide its URL when you mouse over the link.

And they’ve got code that prevents you clicking or selecting on their page — so for instance if the browser gets focus in the address bar, you can’t click back onto the page to get the up/down keys working again. I guess it’s to stop you copy/pasting text off the site:

if (typeof document.onselectstart!=”undefined”)
   document.onselectstart=new Function (”return false”)
else{
  document.onmousedown=disableselect
  document.onmouseup=reEnable
}

… though right-click / Select All works (at least in Firefox). Right-click also works for getting focus back on the page, thankfully.

Digg this

30 queries. 0.556 seconds. Powered by WordPress