- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
SRSLY, when was any post ON topic?
Admin
I get the feeling that Canada Post would be wise enough to know where to deliver mail marked for St. John, NF.
Admin
Also, this:
derpAdmin
German mail did something like this once when somebody got two numbers in the postal code wrong (21 instead of 12 or something like that). "Hmmm, this is not in the list of german postal codes" "Well, let's do a global search for it!" "Found it!!! It's in Australia!!!" So the letter went to Australia. Australian postal services couldn't deliver it because the address didn't exist, so it went back to Germany. Only then did someone have the brilliant idea to look at the written address instead of the postal code.
Admin
uber nerd contests are trickey, because there are so many potential fields of battle.
Admin
Maybe we need a category for that. Call it... ForumWarz!
Admin
And something like a postal code that starts off A1E wouldn't be enough?
(you're also using the term "postal code" when I belive that you want "postal abbreviation")
Admin
I'm guessing this is similar logic to what Singapore Post used when they sent my package (addressed to Canada) to Norway.
Filed under: Discourse helpfully stripped out all the line breaks in that quote | probably a known issue
Admin
Admin
caffeine hasn't hit yet. I read that entire comment as one example, not two.
Admin
Admin
Come on, I think it was even in AVGN once.
Admin
Is that somehow not obscure?
Admin
Of course there might be other "optimizations" that one could do. Since the curent code uses a linear search, one could put the two letter abbreviations in a "frequency" order (most populous state first, etc..). Lacking that, since the comparison uses 'short' for the test, if the list is in alphabetical order, if the test is '<' then it won't compare any further, and the loop could be exited. But in most cases, a 58 (isn't that how many states there are?) step loop given caches and modern CPUs isn't going to be much of a deal breaker, and given alternatives with calling overhead and the like might be the best solution out there. All of this begs the question: How many times IS this called? if it isn't that many, I'd leave it be and look for other WTFs (which I suspect are many, given the experience of this site).
Admin
Only if you're the President. For everyone else, there are 50.
Filed Under: Unsure if joke attempt, or just not American
Admin
Note that DC has a "state code". As do various territories. Both were included in list in the article.
Admin
Ah well, I pretty much TL;DR'd the article.
Can we go all pedantic dickweed about the meaning of "state" now? :smile:
Admin
Especially about some countries that aren't states but bend over backwards sufficiently that they might as well be. See: United Kingdom.
Admin
Bonus points if the address was waßer St or something.
My wife ordered something from the US to Australia and it looks like this task really confused the usps workers. The tracking put it going into three different states and Canada before being returned to NY before dropping off tracking for weeks. The seller was good and replaced it but we ended up with two
Admin
Australia uses 4 digit post codes though. So the German postal workers are an even bigger WTF
Admin
If only there existed a data structure with constant lookup time.
Admin
Better than the UK's.
Admin
Yeah, the UK's does look a bit of a mess (my main exposure to it has been from early Top Gear episodes, where not even Clarkson, Hammond and May can get it right). But apparently they're specific enough that postal workers don't need to look at much else in the address for sorting to be extremely accurate?
Admin
Correct, a post code is specific enough to a single road - or sometimes even one side of a road, meaning that invariably one only needs the house name/number (or additionally an apartment number if the building is a block of flats or something) plus post code to get delivered.
You could scrape a 'valid form' with regex if you were brave or insane, depending on the specificity of accuracy. There's a 1 or 2 alpha code indicating region, e.g. B for Birmingham, L for Liverpool, M for Manchester. (London has several, based on geographic regions within the Greater London area), followed by a 1 or 2 digit number, representing an area within that district. For very densely populated areas, there may be a letter after it.
For example, Brighton is not crazy-densely populated, so it has BN and a number indicating regions in the Brighton and Hove area, while west London is WxY where W is west London, x is a number within west London and Y is an optional letter which extends the number range (as I understand it)
Then it's an optional space, followed by a digit and one or (usually) two letters.
The list of regions is fixed, so you could just shove that into a regex, you could even go to the trouble of identifying what numbers or number/letter combinations would be valid per region but it's an awful mess.
Admin
I guess that's the tradeoff - messy but extremely narrow, or simple but broad.
The first of the 4 digits in Australian post codes indicates which state, and the second will help you narrow down the area somewhat - capital cities are 0* (with the exception of Perth, which is 68**), then expands out (again, with exceptions, like Petrie, 4502, which is a suburb of Brisbane, capital of Queensland).
But an individual post code can cover a suburb, several suburbs/towns, or just a fraction of a suburb. There are even more exceptions, where the nearest post office is across a state border (Murray Downs has 3585, indicating the post office is in Victoria, but Murray Downs itself is in New South Wales), but then that causes further fun when you combine a post code covering several towns with one of those towns being across the border (4377 covers Maryland, NSW, Glen Niven, Qld and The Summit, Qld).
That's just the human readable system. There's another, 12 digit (maybe) system that's used for machine sorting that employs an orange barcode, or the Rapid Addressing Tool System (called RATS) that prints a different barcode for the DPID; Delivery Point ID, a delivery point being, well, i'm not sure (the Wiki page is light on this) but I assume a unique address, meaning that the DPID barcodes cover every single mailbox (street, building and PO Box) in the country.
Admin
US Zip®+4 (9 digits total) is specific enough to get within a group of four apartments in my old apartment complex. However, if you are sending mail to Austria or Australia, don't be surprised if it takes a scenic vacation to the other country on its way, since USPS workers (and USians in general) are known being clueless about foreign geography.
Admin
Uh, Perth cbd postcode is 6000. Each state has a unique initial digit with the territories using with 0 or whatever is convenient. Check wiki. 68** is for post boxes in WA only, not general delivery.
General delivery post codes do generally increase as they get further away from the capital city: but it's not a given that n+1 is further than n. FTR Petrie is not a suburb of Brisbane but just outside.
Admin
So they just keep putting it on a boat or plane until they luck onto the correct one or someone else takes responsibility?
"This package is going to Foreign, this vehicle is leaving the united states, put it on that!"
Admin
rulesguidelines, there are many exceptions/anomolies that break away from them. The entire of the Morton Bay area is still considered part of Brisbane (though not part of the Brisbane City Council), rather than part of the Sunshine Coast. The boundary is somewhere near Burpengary or Deception Bay.Interesting trivia I just discovered, the state identifier in the post codes was adopted from what was used for radio call signs (I'm surprised I hadn't picked up on that sooner, though I had only known call signs in Queensland).
Admin
Pfft.. all foreign states can easily be classified into "liberated", "soon to be liberated" and "liberation unlikely--decapitation imminent".
Admin
Wouldn't disagree.
Apparently watching the video of the decapitation of that journalist is possibly illegal in the UK. But only possibly.
http://www.theregister.co.uk/2014/08/20/met_police_reg_hack_is_not_a_terrorist_hes_not_even_a_naughty_boy/
Admin
I only recently imported the update postcode list into our system. AFAIR, 6001 is still for Perth GPO boxes but other postcodes for other PO boxes and high volume receivers. Queensland has 9*** postcodes for this. For example I used to work on the Gold Coast and we had a PO box at the mail centre: postcode 9726: normal postcode for the office was 4217 which was less than 1km away.
Mostly for the convenience of Australia Post. Like phone numbers: Tweed uses 07 numbers despite being in NSW.
I live in "Logan" but it could be "Brisbane" or "Gold Coast" depending who you talk to. I have a 42** postcode rather than a 41** that the northern half of Logan has because the mail centre is over the border in Yatala.
And Australian radio stations officially begin with VL, so Brisbane's ABC radio station should really be VL4QR. But it was dropped because it is redundant.
Admin
Saw that. Couldn't detect any reasonable law mentioned that could be broken by either (1) being in possession of said video or (2) viewing it.
http://www.independent.co.uk/news/uk/home-news/james-foley-beheading-met-police-warn-public-watching-murder-video-could-be-criminal-offence-9681316.html
I'd like to see that stand up in court, given the actual content of the video.
Text only but probably NSFL: [spoiler]Not that, it was particularly gory. (1) Desert shot with James on knees in orange jumpsuit with hands tied behind back, Black clothed and hooded bloke standing next to him blathering on. This is the majority of the video - or the version I watched (2) Bloke makes to start cutting throat by pulling James' head back. Never actually see the act. Cut scene to (3) body chest-down on ground with decapitated head resting on the back of the body.
Given the length of the video I saw, I don't think there's been much put out between (2) and (3)
To be honest I've seen worse in horror flicks.
Nick Berg's was worse.[/spoiler]
Admin
I found the video on liveleak. Instantly regretted watching it. I'm glad they didn't show the gory stuff. Very considerate of ISIS (I know, I know, whoever released the video probably censored it)...
Hey, don't you guys in UK have a bunch of crazy laws where sites are blocked left and right and you basically have to register yourself with the police if you want to watch porn on the internet? Seems like laws like that are pretty much around the corner...
Admin
Slightly over-egging the pudding, but there was talk of having a 'by default, for everyone regardless of whether you have children' porn-filter in place and you would have to go begging to your ISP to allow you to unsubscribe from their filter to allow you to view porn (and by the power of slipper slope, anything the government of the day deemed 'inappropriate.')
Arguments left, right and center about how this was an opt-out/opt-in about the whole thing.
Nowt's been put in place, by law anyway, yet.
Admin
what ordered lists? all i see is arrays.