Meningitis I thought was food poisoning almost killed me twice
Trump's team eye Iran's parliament speaker as a US-backed leader - despite his repeated threats to America and criticisms of the President
CodeSOD: The Barren Fields
Today, it's not exactly the code that was bad. For some time, a government agency had been collecting information from users using fillable PDF forms. The user would submit the form, and then a data entry clerk would copy the text from the form into a database. This, of course, raised the question: why was someone manually riding the copy/paste button?
Sally was tasked with automating this. The data is already in a digital format, so it should be easy to use a PDF library to parse out the entered data and insert it into the database. And it almost was.
Sally shares with us, not code, but the output of her program which scanned the fields, looking for their names:
FieldType: Text FieldName: T5ZA1 FieldNameAlt: T5ZA1 FieldFlags: 25165824 FieldJustification: Left FieldMaxLength: 3 --- FieldType: Text FieldName: T5ZA2 FieldNameAlt: T5ZA2 FieldFlags: 25165824 FieldJustification: Left FieldMaxLength: 2 --- FieldType: Text FieldName: T5ZA3 FieldNameAlt: T5ZA3 FieldFlags: 25165824 FieldJustification: Left FieldMaxLength: 4I could go on, Sally certainly shared many more examples, but you can get the gist. The names were all cryptic five character blobs. They all start with T5Z, and followed by "letternumber": A3, B9, C2, etc. It has the vibe of being autogenerated; someone just never considered that they might want clear names for the fields, and just let their editor autonumber them, but that has one counterpoint to it: the letter "O" is never used. T5ZN9 is followed by T5ZP1.
Sally was left scratching her head. Of course, she was going to have to write some sort of lookup that would convert the PDF's field names into database field names, but she expected that the PDF would provide at least some sort of guidance on that front.
I really enjoy that the alt-text for every field is also the field name, which is a clear accessibility "win".
Top Essex school to get £1m of taxpayer-funded money from council
Essex firms meet with US trade delegates as they realise the 'American Dream'
New play area in Essex park delayed by 'wet weather'
Petition launched calling for A120 to be dualled between Marks Tey and Braintree
Kelvedon nursery where 'every child thrives' praised in Ofsted report
New National Farmers' Union chairman appointed for Essex
Essex firms meet with US trade delegates as they realise the 'American Dream'
Pro cornhole player with no arms or legs facing murder charges after 'shooting passenger in car,' cops say
Air Canada flight's black box is recovered as investigators work to piece together moments leading up to LaGuardia collision: Live updates
Miley Cyrus shimmers in silver dress and Hannah Montana t-shirt as she leads stars at the 20th Anniversary Special premiere
Head-mounted VR hardware will never happen, says Neal Stephenson - who coined the term ‘metaverse’
Science fiction author Neal Stephenson, who coined the term “metaverse” in his 1992 novel Snow Crash, has argued he and others who believed immersive environments would require head-mounted hardware got it wrong.…
I was told my scratchy throat was just a chest infection. My real diagnosis was shattering - and if I hadn't fought doctors, I wouldn't have survived
STEPHEN POLLARD: The sheer level of brazen anti-Jew hatred leaves us asking: Is it still safe for us here?
'Hot felon' Jeremy Meeks couldn't see his family in prison after superfans took too many visitor passes
Is Tehran linked to ambulance blaze? Hunt for three firebombers who hit London service run by Jewish charity - as police warn of 'grave' threat
Trump Administration To Pay French Company $1 Billion To Stop Offshore Wind Farms
Read more of this story at Slashdot.