Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Westie
May 30, 2013



Baboon Simulator

TheresaJayne posted:

Address validation is even worse,

I had to enter a town name into an online form

I tried to enter the Town Name : Münster

Invalid Address : Can only contain Alpha Characters

I cant Put Munster as that is a different town in a different Country....

FAIL......

Muenster.

Adbot
ADBOT LOVES YOU

canis minor
May 4, 2011

FoiledAgain posted:

My brother was born in a city which has since changed its name, in a territory which has since changed its name. He sometimes runs into the problem of a system asking for his birthplace, then rejecting it as an actual location.

City: Munster, Country: Germany (unless there's Munster in Germany as well)?

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Or let postal code or whatever disambiguate. An address being rendered undeliverable by the loss of an umlaut seems unlikely, given that humans address mail.

Vanadium
Jan 8, 2005

I hear postal services are pretty enthusiastic about reconstructing damaged delivery addresses

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

Wow. Russian KOI-8 mis-decoded as Latin-1?

quote:

In [1]: s = 'ÒÏÓÓÉÑ'

In [2]: s.encode('latin-1').decode('koi8-r')
Out[2]: 'россия'

(Can't use code tags because vBulletin double-escapes the HTML entities)

Vanadium
Jan 8, 2005

Yeah, the story I'm reading is someone emailed a westerner their mail address, and the westerner just transcribed what they saw on their screen.

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

eithedog posted:

City: Munster, Country: Germany (unless there's Munster in Germany as well)?

http://de.wikipedia.org/wiki/Munster
http://de.wikipedia.org/wiki/Münster

Paul MaudDib
May 3, 2006

TEAM NVIDIA:
FORUM POLICE

Westie posted:

Muenster.

Yeah, the standard way to transliterate umlauts into alpha characters is to follow the umlaut'ed character with an e, so Münster becomes Muenster. The postal service will figure it out from there.

See also, the ess-tset, which is transliterated as "ss". So "Fuß" becomes "Fuss".

Really the problem isn't the transliteration though, it's the fact that the software is requiring validated addresses. I've run into that sometimes with cities and zip codes, places like universities tend to have their own mail systems with their own zip coding or +4 coding and those tend not to be in the databases used to validate addresses. It's gotten better over the years, most electronic addressing systems will now try to auto-correct the address to the closest thing it can validate but also let you override it and put in a different address if you're really sure.

Paul MaudDib fucked around with this message at 18:31 on Jul 21, 2014

canis minor
May 4, 2011


So indeed there is: http://de.wikipedia.org/wiki/Munster_(%C3%96rtze). I guess that's where counties and post codes should come in as well, though I imagine that wasn't the case here.

For longest time my place of birth on Facebook was spelled with L¹, because even though Google Maps was finding correct place, the whatever service that FB was using to transcribe characters failed to put in correct letters. It was correct for other place in Poland - Łódź though, so, idk (probably my home city being smaller than the other one could have had something to do with it)

canis minor fucked around with this message at 20:08 on Jul 21, 2014

TrampolineTales
Oct 9, 2012

I detect the presence of scum.
I wrote this a few years back when I apparently didn't think formatting my code was necessary:

code:
public function ArtStuff(e:Event):void { Heart1.scaleX = 5; Heart1.scaleY = 5; Heart2.scaleX = 5; Heart2.scaleY = 5; score = 0;
	Heart3.scaleX = 5; Heart3.scaleY = 5; Heart1.x = 5; Heart1.y = 555; Heart2.x = 47; Heart2.y = 555; Heart3.x = 89; Heart3.y = 555;
	addChild(Heart1); addChild(Heart2); addChild(Heart3); health = 3;  hudformat.color = 0xFFFFFF; score = 0; combo = 0;
	huda.embedFonts = true; huda.text = "A"; huda.setTextFormat(hudformat); huds.embedFonts = true; huds.text = "S"; huds.setTextFormat(hudformat);
	hudd.embedFonts = true; hudd.text = "D"; hudd.setTextFormat(hudformat); hudf.embedFonts = true; hudf.text = "F"; hudf.setTextFormat(hudformat);
	scoretext.embedFonts = true; scoretext.text = String(score); scoretext.setTextFormat(hudformat); scoretext.width = 135; scoretext.x = 765;
	scoretext.y = 550; scoretext.scaleX = 1.2; scoretext.scaleY = 1.2; addChild(scoretext);
	combotext.embedFonts = true; combotext.text = "x" + String(combo); combotext.setTextFormat(hudformat); combotext.x = 750; combotext.y = 525;
	addChild(combotext); songchoice = 1; //MAKE PLAYER PICK IN FINAL VERSION
	huda.x = 2; huda.y = 35; huds.x = 2; huds.y = 165; hudd.x = 2; hudd.y = 235; hudf.x = 2; hudf.y = 370;
	addChild(huda); addChild(huds); addChild(hudd); addChild(hudf);
	TopJaw.x = 30; TopJaw.y = 450; TopJaw.scaleX = 3; TopJaw.scaleY = 3; addChild(TopJaw);
	LowJaw.x = 30; LowJaw.y = 518; LowJaw.scaleX = 3; LowJaw.scaleY = 3; addChild(LowJaw); SongPart = 1;
	stage.addEventListener(KeyboardEvent.KEY_DOWN, JawPosition);
	switch (songchoice) {
	case 1: SongTimer.addEventListener("timer", TestSong);
	} SongTimer.start();
	}

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Why is ArtStuff an event handler?

xtal
Jan 9, 2011

by Fluffdaddy

Suspicious Dish posted:

Why is ArtStuff an event handler?

Is that what stood out to you? :)

down with slavery
Dec 23, 2013
STOP QUOTING MY POSTS SO PEOPLE THAT AREN'T IDIOTS DON'T HAVE TO READ MY FUCKING TERRIBLE OPINIONS THANKS

Suspicious Dish posted:

Why is ArtStuff an event handler?

I think you're in the wrong thread

Pudgygiant
Apr 8, 2004

Garnet and black? More like gold and blue or whatever the fuck colors these are

ShadowHawk posted:

This is probably a regex attempting to prevent people from getting their own registration system to email bomb themselves.

Hilarious (and slightly unrelated) story, you can set your out of office message on Outlook to CC a mail group you're a member of, and prior to Exchange 2010 this would do exactly what you think it does.

Damiya
Jul 3, 2012

TrampolineTales posted:

I wrote this a few years back when I apparently didn't think formatting my code was necessary:

code:
public function ArtStuff(e:Event):void { Heart1.scaleX = 5; Heart1.scaleY = 5; Heart2.scaleX = 5; Heart2.scaleY = 5; score = 0;
	Heart3.scaleX = 5; Heart3.scaleY = 5; Heart1.x = 5; Heart1.y = 555; Heart2.x = 47; Heart2.y = 555; Heart3.x = 89; Heart3.y = 555;
	addChild(Heart1); addChild(Heart2); addChild(Heart3); health = 3;  hudformat.color = 0xFFFFFF; score = 0; combo = 0;
	huda.embedFonts = true; huda.text = "A"; huda.setTextFormat(hudformat); huds.embedFonts = true; huds.text = "S"; huds.setTextFormat(hudformat);
	hudd.embedFonts = true; hudd.text = "D"; hudd.setTextFormat(hudformat); hudf.embedFonts = true; hudf.text = "F"; hudf.setTextFormat(hudformat);
	scoretext.embedFonts = true; scoretext.text = String(score); scoretext.setTextFormat(hudformat); scoretext.width = 135; scoretext.x = 765;
	scoretext.y = 550; scoretext.scaleX = 1.2; scoretext.scaleY = 1.2; addChild(scoretext);
	combotext.embedFonts = true; combotext.text = "x" + String(combo); combotext.setTextFormat(hudformat); combotext.x = 750; combotext.y = 525;
	addChild(combotext); songchoice = 1; //MAKE PLAYER PICK IN FINAL VERSION
	huda.x = 2; huda.y = 35; huds.x = 2; huds.y = 165; hudd.x = 2; hudd.y = 235; hudf.x = 2; hudf.y = 370;
	addChild(huda); addChild(huds); addChild(hudd); addChild(hudf);
	TopJaw.x = 30; TopJaw.y = 450; TopJaw.scaleX = 3; TopJaw.scaleY = 3; addChild(TopJaw);
	LowJaw.x = 30; LowJaw.y = 518; LowJaw.scaleX = 3; LowJaw.scaleY = 3; addChild(LowJaw); SongPart = 1;
	stage.addEventListener(KeyboardEvent.KEY_DOWN, JawPosition);
	switch (songchoice) {
	case 1: SongTimer.addEventListener("timer", TestSong);
	} SongTimer.start();
	}

In fairness nobody's ever written good ActionScript.

hobbesmaster
Jan 28, 2008

Pudgygiant posted:

Hilarious (and slightly unrelated) story, you can set your out of office message on Outlook to CC a mail group you're a member of, and prior to Exchange 2010 this would do exactly what you think it does.

Me too!

TheresaJayne
Jul 1, 2011

Paul MaudDib posted:

Yeah, the standard way to transliterate umlauts into alpha characters is to follow the umlaut'ed character with an e, so Münster becomes Muenster. The postal service will figure it out from there.

See also, the ess-tset, which is transliterated as "ss". So "Fuß" becomes "Fuss".

Really the problem isn't the transliteration though, it's the fact that the software is requiring validated addresses. I've run into that sometimes with cities and zip codes, places like universities tend to have their own mail systems with their own zip coding or +4 coding and those tend not to be in the databases used to validate addresses. It's gotten better over the years, most electronic addressing systems will now try to auto-correct the address to the closest thing it can validate but also let you override it and put in a different address if you're really sure.

Can i also point out that the Postcode lookup didn't. Entering a valid postocde always returned 0 results

ShadowHawk
Jun 25, 2000

CERTIFIED PRE OWNED TESLA OWNER

Pudgygiant posted:

Hilarious (and slightly unrelated) story, you can set your out of office message on Outlook to CC a mail group you're a member of, and prior to Exchange 2010 this would do exactly what you think it does.
I read somewhere that approximately 10% of email is auto-reply loops. I've also read that approximately 90% of email is spam. I'm willing to believe both things.

Westie
May 30, 2013



Baboon Simulator

ShadowHawk posted:

I read somewhere that approximately 10% of email is auto-reply loops. I've also read that approximately 90% of email is spam. I'm willing to believe both things.

Pea roast (and modified):

Westie posted:

Comments being added on client's Facebook app page because boss has his FB set up to send comments to his inbox, and he had an auto-responder :getin:

astr0man
Feb 21, 2007

hollyeo deuroga
This isn't exactly a coding horror, but the product I work on does text extraction from PDFs. Today I encountered a PDF file with an embedded font that had the glyphs for parentheses reversed - i.e. the PDF contained the unicode text string ')foobar(' in order for it to be displayed graphically as '(foobar)'. Naturally I got a customer issue complaining that our extracted text had backwards parentheses. Who the gently caress makes these fonts and why? :argh:

edit: basically everyone who has ever made a pdf writer sucks

astr0man fucked around with this message at 17:13 on Jul 22, 2014

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



McGlockenshire posted:

I hope you never have to write sales tax code for a jurisdiction that requires the tax be levied based on where the buyer lives. Not just postal code, not just city, not just street, but the complete address can end up mattering, and it all has to be correct the first time.

The real horror is that you can move one house down on the same street in the same city and change sales tax districts. gently caress Washington state.

I think that could happen in any state that allows counties or cities to levy a tax which I'm assuming is most if not all of them.

Also, not going to bother looking up whoever said 'Java: now you've got a problem factory' but "now you've got a ProblemFactoryImpl" :D

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

astr0man posted:

This isn't exactly a coding horror, but the product I work on does text extraction from PDFs. Today I encountered a PDF file with an embedded font that had the glyphs for parentheses reversed - i.e. the PDF contained the unicode text string ')foobar(' in order for it to be displayed graphically as '(foobar)'. Naturally I got a customer issue complaining that our extracted text had backwards parentheses. Who the gently caress makes these fonts and why? :argh:

edit: basically everyone who has ever made a pdf writer sucks

I feel bad for the person that had to relearn how to type parenthesis in order to create that PDF.

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.

Munkeymon posted:

I think that could happen in any state that allows counties or cities to levy a tax which I'm assuming is most if not all of them.

Wildly offtopic: Some get their taxes as part of the income tax, not sales tax.

1337JiveTurkey
Feb 17, 2005

Munkeymon posted:

I think that could happen in any state that allows counties or cities to levy a tax which I'm assuming is most if not all of them.

Also, not going to bother looking up whoever said 'Java: now you've got a problem factory' but "now you've got a ProblemFactoryImpl" :D

C'mon it's the 21st century, obviously it's a @Inject @EnterpriseAsFuck Provider<ProblemFactory>

Jewel
May 2, 2009

To be fair if you want to swap characters you can just find+replace "(" and replace it with "TOREPLACE" then find+replace ")" with "(" and "TOREPLACE" with ")". Would have been an easy fix to change the extracted text. Though wow yeah who made that font.

Edit: vvv It's literally a five second job, and this isn't the issue of the programmer/program in this case. It's one specific pdf file with reversed glyphs, writing something to detect and fix that is waaay way way overkill.

Jewel fucked around with this message at 09:36 on Jul 23, 2014

Soricidus
Oct 21, 2010
freedom-hating statist shill
Multiple passes of manual search and replace: definitely the first option that should enter a programmer's mind when the program they have written is not producing the desired output.

qntm
Jun 17, 2009
Good job the PDF doesn't have the string "TOREPLACE" in it already.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Uh this is the coding horrors thread, TOREPLACE is absolutely welcome here!

Jewel
May 2, 2009

pokeyman posted:

Uh this is the coding horrors thread, TOREPLACE is absolutely welcome here!

In my opinion spending time on something as inconsequential as "a font inside a single pdf is messed up by other means unrelated to yourself or your program, and has two character swapped; let's write a program to fix that or to automatically detect and adjust" is more of a horror when the solution is literally a five second job by hand. You're wasting your time and potentially your money if you could be working on another job (if you were doing something like this freelance).

I guess if it's a commercial product (which I didn't notice at first) then sure; it's not like you could find/replace, but even then is it up to you to ensure that the user's wacky messed up font is extracted properly? What if I sent in a PDF where every glyph was replaced with another glyph?

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Writing a program to replace ( with ) and vice versa is also literally a five-second job.

tr "()" ")("

canis minor
May 4, 2011

Due to code ruse I'm still finding templates / HTML referencing projects from 3 years ago (as - links to URLs that don't exist, are not supported by controllers / images that are hardcoded that don't exist).

:aaa:

astr0man
Feb 21, 2007

hollyeo deuroga

Jewel posted:

I guess if it's a commercial product (which I didn't notice at first) then sure; it's not like you could find/replace, but even then is it up to you to ensure that the user's wacky messed up font is extracted properly?

This is a commercial product and our customer's use case is mass processing potentially hundreds thousands of documents at once (i.e. search engine document indexing). We can't exactly tell our customer "lol just manually go through all of our results and ctrl-f for parentheses and swap them yourselves." Our response was that this is not an issue in our software since we just extract the actual text from the file.

quote:

What if I sent in a PDF where every glyph was replaced with another glyph?
I've seen PDFs with fonts that do this as well.

Like I said before, everyone who has ever made a PDF writer loving sucks.


edit: also we don't do OCR on the glyphs or anything because that would be a giant waste of time, so there is no way for us to even know that the parentheses are backwards, so how would we know to do find/replace in the first place...

astr0man fucked around with this message at 17:28 on Jul 23, 2014

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.
font_quirks_fixup.cc incoming. Nothing like "hall of shame" lists in software.

fritz
Jul 26, 2003

I don't know if I was the horror again today. I had a PR that changed some (c++) code to read and parse some files asynchronously for faster response in a constructor. When developing, I turned off optimization for debugging, and forgot to turn it on when running all the unit tests. This got caught in review, so I turned it back on, it passed the CI, so we merged it.

Then I started getting a failure in some unit tests, and whoops it turns out that a test constructed one of these objects, passed it to another object constructor, verified nothing went wrong in the second constructor, and exited. But since sometimes the first object went out of scope before all its threads finished, I was getting semi-regular races and segfaults that took way too long to figure out.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Finished my Qt-using project. The editor is pretty annoying, but the worst part is having to use their special-snowflake reimplementation of strings and lists and pairs and maps and smart pointers. Printing the strings from a debugger is...unpleasant, and sometimes you get a QStringRef instead, which is a substring optimization that is completely not transparent since it's not convertible to their other string type.

The utility library stuff (settings, etc.) is ok, but having their own custom dialect of C++'s standard library pieces sucks.

Edit: ^^^ shared-state multithreading is the horror.

fritz
Jul 26, 2003

Subjunctive posted:

Edit: ^^^ shared-state multithreading is the horror.

Yeah, but do I blame myself or society?

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

fritz posted:

Yeah, but do I blame myself or society?

Why not both? \/:shobon:\/

JawnV6
Jul 4, 2004

So hot ...

fritz posted:

Yeah, but do I blame myself or society?

Probably dereference the same anyway.

hobbesmaster
Jan 28, 2008

Subjunctive posted:

Finished my Qt-using project. The editor is pretty annoying, but the worst part is having to use their special-snowflake reimplementation of strings and lists and pairs and maps and smart pointers. Printing the strings from a debugger is...unpleasant, and sometimes you get a QStringRef instead, which is a substring optimization that is completely not transparent since it's not convertible to their other string type.

The utility library stuff (settings, etc.) is ok, but having their own custom dialect of C++'s standard library pieces sucks.

Edit: ^^^ shared-state multithreading is the horror.

Yes libraries targeting mobile devices and started in 1991 will have their own implementations of stuff a language didn't have until 20 years later.

(All those containers are primarily there to interact with the meta object system and all have stl friendly stuff so you don't have to use them if you don't want to)

Adbot
ADBOT LOVES YOU

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

fritz posted:

Yeah, but do I blame myself or society?

Shared-state multi-threading is like smoking, and we're in the 70s. We grew up watching our heroes manually insert critical sections, recite memory barrier jingoism, pose with locks against fancy cars. After bagging the leading lady, they'd relax with some apartment threading.

Studies are starting to show that it's bad for you, but Big PThread denies it, and points to lots of software that spawns new fibers every event and lives to five nines.

Our kids will look at the pictures of us staring at inconsistent memory state in debuggers and tell us it's gross. They're not wrong, but we didn't know better, and we get a little defensive. After all, they're running node in production and don't know what to do if they hit a deadlock. They just call a consultant and spend $$$$, and we know we could repair it ourselves in a few days.

Message passing is starting to be legal in a lot of jurisdictions, as people realize that the harmful effects of copying are overblown. (The STM people think they've got a way to have the mellow high of message passing without the memory bus hangover, but nobody has long term data on its effects, so we're not willing to experiment on our own software.)

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply