[ad_1]
470 points, 25 comments.
[ad_2]
Humor | ReportWire publishes the latest breaking U.S. and world news, trending topics and developing stories from around globe.
[ad_1]
Frequent contributor Argle Bargle (recently, or even in last week’s Errord) works with a programmer called “Jimbo”. Jimbo is a solid co-worker and a good programmer. He has more tenure at the company than Argle, which means Jimbo is who Argle goes to when he has questions.
Recently, Argle worked his way through a rather complicated bit of code. It involved passing data between two different languages inside of a real-time system. Much of its functionality was opaque and complicated, so Argle wrote literal paragraphs of documentation explaining what the code did, how to invoke it, what the gotchas might be, and how to avoid them.
Argle expected the pull request to take some time to complete, but Jimbo was on the spot and approved it quickly. Another reviewer chimed in, and in went the code.
The next day, Argle and Jimbo were working together through some fresh code which depended on that request.
“Wait a second,” Jimbo asked, “how does this data make it from one thread to another? It’s mallocd. I don’t see how it gets past that boundary.”
“You realize,” Argle replied, “I documented this, in detail, in the code you reviewed yesterday afternoon.”
“Oh, that? I didn’t read it.”
“That defeats the purpose of code reviews.”
Jimbo shrugged. “I’m sure it’s fine.”
Argle writes:
I have worked in two aerospace firms in my life and there are days I wonder that I risk setting foot in an airplane.
[ad_2]
Remy Porter
Source link
[ad_1]
“My mom trusted sitting her baby boy on the terrifying clown’s lap. I think the balloon was my cry for help.”
(submitted by James)
The post I’m Not Really Lovin’ It appeared first on AwkwardFamilyPhotos.com.
[ad_2]
Team Awkward
Source link
[ad_1]
Ever feel like it'd all fall to pieces if you so much as turned your head? In the comments section of our article seeking your seasonal horror stories, Wayne shared a holiday WTF of a different sort that's too good not to share:
Not a holiday problem, but a me being on holiday problem.
I was the sole SQL Server database admin back in the '90s for a pretty good-sized police department. Everything ran pretty darn smooth, and I took a week off, probably to go to ComicCon. I left VERY specific instructions to call me if there was a problem.
We had a consultant working with us, I was never clear on what he was doing, but he sat in his office every day typing away and looking busy. Apparently he was writing mods to our payroll pre-process system. Police payroll is complicated because pretty much every rank has a different union, and contract, that changes how things are paid out: if you hold or are paid overtime, how sick leave works, it's all pretty weird. Or was at the time. It was wonderful getting the Peoplesoft programmer saying "We can't do that!" when they wanted us to put our preprocess into their system.
ANYWAY, this system ran an extract every week which produced two files, overtime and leave, which was then sneakernetted down the street to the mainframe. On pay weeks, there was an absolute time window for when that 3.5" floppy had to be there as it could hold up mainframe jobs. We ran the extract at about noon and the disk was there by 1. Very solid.
Until I went on vacation.
Consultant in his infinite wisdom pushed his changes to our payroll database on an extract day. And crashed the database, making it impossible to run the extract. And it was payroll week. AND they didn't call me. He spent 4-5 hours MANUALLY UNDOING HIS CHANGES. And holding up the mainframe processing schedules.
Had they called me, I could have told them that the system automatically backed itself up, and they could have done a rollback to undo his changes and reverted to a good state and run the extract.
Come to think of it, I never did find out what his modifications were supposed to do.
It's baffling why Wayne was never called, but I assume it's because the consultant had assured everyone that he had the situation under control. He was either in a mad, panicked rush to fix what he'd broken, or, he was calm and fully confident in his own abilities.
Doth pride goeth before the missed paycheck?
[ad_2]
Ellis Morning
Source link
[ad_1]
|
Our 5 year old cat needs three doses of medicine every day to minimize her seizures. After we give her the liquid medicine by syringe she will calmly walk over to a ramen box in the kitchen and sit in it for 20 minutes to an hour. submitted by /u/wkarraker |
[ad_2]
/u/wkarraker
Source link
[ad_1]
It's common to see code in the form of if (false == true). We get a fair bit of it in our inbox, and we generally don't post it often, because, well, it's usually just a sign that someone generated the code. There's a WTF in that, somewhere, but there's not much to say about the code, beyond, "Don't generate code, pass data from backend to frontend instead."
But Nicholas sends us one that shows a little more of interest in it.
if ('N' == 'Y') {
document.getElementById("USERID").disabled=true;
document.getElementById("PASSWORD").disabled=true;
}
Again, this is almost certainly being generated by the backend and sent to the frontend. I mean, it might be someone manually disabling a block of code by writing an if that'll never be true, but probably not in this case.
And what this tells us is that the backend is getting inputs, probaly from some sort of option field, and treating them as booleans. Y and N are clearly meant to be "yes" and "no", aka "true" and "false", but we're taking the stringly typed approach on the backend.
For future developers, I reiterate: send data to the frontend, so your 'if' looks more like: if(backendData.userSelectedOption=="Y"), or at the very least if you're going to evaluate the boolean expression, evaluate it on the backend, so the generated code is just if(false).
[ad_2]
Remy Porter
Source link