[HN Gopher] No dogs were harmed in the making of this app
       ___________________________________________________________________
        
       No dogs were harmed in the making of this app
        
       Author : ShMcK
       Score  : 347 points
       Date   : 2023-11-03 13:47 UTC (9 hours ago)
        
 (HTM) web link (shmck.substack.com)
 (TXT) w3m dump (shmck.substack.com)
        
       | jjgreen wrote:
       | A good Friday story.
        
       | imchillyb wrote:
       | I read this on break and needed to hear these words of
       | encouragement and hope.
       | 
       | Thank you for sharing your misadventure with us.
        
       | feintruled wrote:
       | That's quite a tale, a parable almost about how software
       | engineering differs from other jobs (I want to say 'real' jobs
       | but tongue in cheek). I like this one too, it's even snappier.
       | 
       | A software engineer, a hardware engineer and a department manager
       | were on their way to a meeting in Switzerland. They were driving
       | down a steep mountain road when suddenly the brakes on their car
       | failed. The car careened almost out of control down the road,
       | bouncing off the crash barriers, until it miraculously ground to
       | a halt scraping along the mountainside.
       | 
       | The car's occupants, shaken but unhurt, now had a problem: they
       | were stuck halfway down a mountain in a car with no brakes. What
       | were they to do?
       | 
       | "I know," said the department manager, "Let's have a meeting,
       | propose a Vision, formulate a Mission Statement, define some
       | Goals and by a process of Continuous Improvement find a solution
       | to the Critical Problems, and we can be on our way."
       | 
       | "No, no," said the hardware engineer, "That will take far too
       | long, and besides, that method has never worked before. I've got
       | my Swiss Army knife with me, and in no time at all I can strip
       | down the car's braking system, isolate the fault, fix it and we
       | can be on our way."
       | 
       | "Well," said the software engineer, "Before we do anything, I
       | think we should push the car back up the road and see if it
       | happens again."
        
         | shadowgovt wrote:
         | The big advantage to software engineering is we deal in
         | abstractions. I liken it to building castles in the clouds;
         | everything down to the foundation is reshapeable.
         | 
         | ... the big disadvantage to software engineering is we deal in
         | abstractions. Everything down to the foundation moves.
         | 
         | http://thecodelesscode.com/case/154
        
           | xkcd-sucks wrote:
           | Also, software is right now primarily a means of codifying
           | human thought, which means it embodies the whole spectrum of
           | human sanity and competence
        
             | hathawsh wrote:
             | That deep thought seems especially appropriate for XKCD,
             | yet your username curiously suggests you would disagree.
        
           | lostlogin wrote:
           | > I liken it to building castles in the clouds
           | 
           | You're very positive. When you see a developer dealing with a
           | bug, it seems more like they are dealing with a turd palace
           | floating in a sewer.
        
             | qup wrote:
             | Turds are shapeable, too. Hard to polish, I've heard.
             | 
             | But you control the poopy stack.
        
               | cgriswald wrote:
               | > [Turds are] hard to polish, I've heard.
               | 
               | Mythbusters did it:
               | 
               | > Adam and Jamie first visited the zoo to obtain a
               | variety of feces to try to polish. Poop collected, they
               | tried to pick the most polishable candidates, and then
               | baked them to remove the moisture. Adam tried to shine
               | his poop with a buffing wheel, while Jamie's tactic of
               | applying a furniture polish caused a philosophical
               | disagreement between the two. Adam eventually brought in
               | an outside expert to teach them dorodango, a Japanese art
               | form that allows a practitioner to apply a shine to dirt
               | using nothing but water and physical effort. Applying
               | this technique, Adam and Jamie were both able to polish
               | balls of poop without using any foreign materials as
               | judged by a gloss meter, exceeding a standard of 70 gloss
               | units for high gloss.[0]
               | 
               | [0] - https://en.wikipedia.org/wiki/MythBusters_(2008_sea
               | son)#Epis... (Section: You Can't Polish Poop)
        
         | s1artibartfast wrote:
         | Is the moral of the story that the hardware engineer is simply
         | correct? - a mechanical engineer
        
           | lostlogin wrote:
           | No, it was a modern car and an unusual set of circumstances
           | lead to a software bug occurring in the regenerative
           | breaking. It needs further testing on that incline, at that
           | time, in that weather with that weight in the car.
        
             | bozhark wrote:
             | Was it pulling an F-150?
        
           | smt88 wrote:
           | It's mostly just a joke about how these roles do their jobs.
           | 
           | But I think it's also partly illuminating the fact that
           | hardware engineers are true engineers, while software
           | engineers mostly aren't.
        
             | renewiltord wrote:
             | True. We're scientists. Replication is important! :)
        
               | fhd2 wrote:
               | "Empirical science" sounds better than "have you tried
               | turning it off and on again?", doesn't it.
        
               | monista wrote:
               | I read is as a reference to https://xkcd.com/242/
        
               | tmpz22 wrote:
               | > True. We're scientists. Replication is important! :)
               | 
               | Yes replication:
               | 
               | Oops we got hacked. I wonder what happens if we write
               | insecure code again.
               | 
               | Oops we got hacked. I wonder what happens if we write
               | insecure code again.
               | 
               | Oops we missed a deadline. I wonder what happens if we
               | underestimate again.
               | 
               | Oops we missed a deadline. I wonder what happens if we
               | underestimate again.
        
               | sophacles wrote:
               | When did software estimates ever factor into deadlines? I
               | have always found that my estimates + a bit of padding
               | are generally correct. Then management just picks an
               | arbitrary due date that has nothing to do with programmer
               | estimates.
        
               | mock-possum wrote:
               | Wow somebody's salty
        
               | alpaca128 wrote:
               | It isn't difficult to find non-software projects that
               | overshot deadlines by years and costs by tens of millions
               | or more, just to still have a leaky roof. Including,
               | whether you believe it or not, engineering work.
        
             | wruza wrote:
             | Why not hire hardware engineers to write software then?
        
               | smt88 wrote:
               | Software engineers are cheaper and more plentiful
        
               | s1artibartfast wrote:
               | Because software development isnt an engineering task.
               | 
               | Engineers are good at building bridges, and artists are
               | good at making paintings. That doesnt mean it is a good
               | idea to have the engineers paint paintings.
        
               | ganzuul wrote:
               | To artists, engineers are artists who are good at math.
               | 
               | Art is for everyone. Painting is a special form of art.
               | Math makes for beautiful art, so download LibreCAD and
               | free your mind.
               | 
               | (Speaking as an ex. IT guy, ex. CNC machinist who is
               | attending art school at the age of 40 as a form of
               | rehab.)
        
               | stronglikedan wrote:
               | Software engineers for critical systems would like a
               | word.
        
               | gretch wrote:
               | Yeah it makes no sense. Like, you build an airplane and
               | clearly the airplane needs both it's software and it's
               | hardware in order to fly.
               | 
               | Somehow the people who made the hardware are engineers,
               | but the people who made the software aren't engineers.
        
               | s1artibartfast wrote:
               | Nobody reasonable is saying that software isn't
               | important, technical, or valuable. It isnt a dig.
               | 
               | It just has to do with the subject matter and definition
               | of Engineer. The clearest delineation is that an
               | Engineers work is the application the laws of physics.
               | Software developers are more akin to Scientists than
               | Engineers. They work in the arrangement of logic and the
               | semantic relation of abstractions.
               | 
               | That is to say, Engineers work within a framework of
               | rules, and Computer scientists construct frameworks of
               | rules.
        
               | gretch wrote:
               | The definitions you just came up with are completely
               | arbitrary. Worst yet, your definitions aren't even
               | shared.
               | 
               | It's hard to pin down exact agreed upon definitions in
               | English, but I searched many popular dictionaries and
               | none of them have "Engineers work is the application the
               | laws of physics".
               | 
               | Fair enough if you want to have personal definitions of
               | words, but don't try to gaslight the rest of us into
               | thinking your understanding is the canonical one.
               | 
               | Here's my facetious definition to illustrate how dumb the
               | discussion - I think an engineer is a person who works
               | with ENGINES (duh it's in the name). Obviously people who
               | build bridges aren't engineers; do bridges have engines?
        
               | toast0 wrote:
               | Some bridges do have engines, many more have motive
               | force. Of course, a lot of them just stand there, not
               | doing much at all.
               | 
               | But, someone who isn't wearing a blue and white stripey
               | hat can't possibly be an engineer.
        
               | s1artibartfast wrote:
               | I brought up a definition shared by many people, and did
               | so without hostility. Do you have a real definition that
               | you can bring to the table? Is there a reason why you are
               | taking things personally?
               | 
               | Can you articulate the difference between an engineer and
               | a scientist?
        
               | tom_ wrote:
               | Try it and report back!
        
               | QuadmasterXLII wrote:
               | Building as practiced by hardware engineers is not linear
               | in number of unique components. Building as practiced by
               | software engineers is, at a terrible price.
        
             | organian wrote:
             | I think "software engineers aren't really engineers" is
             | putting "real engineering" on a pedestal that is borne of
             | ignorance. Hillel Wayne's engineer interviews were eye-
             | opening on this: https://www.hillelwayne.com/post/are-we-
             | really-engineers/
        
           | kd5bjo wrote:
           | Or perhaps that nobody had the common sense to _call a tow
           | truck_ , so that they can get down the mountain without
           | relying on a field repair to a safety-critical system.
        
             | tigen wrote:
             | NIH syndrome
        
               | s1artibartfast wrote:
               | Not invented here is the tendency to avoid using or
               | buying products, research, standards, or knowledge from
               | external origins. It is usually adopted by social,
               | corporate, or institutional cultures. Research
               | illustrates a strong bias against ideas from the outside.
        
             | slingnow wrote:
             | This makes a lot of assumptions about how far into the
             | wilderness they were, time of day, accessibility of the
             | roads, cell phone signal, and so on. To just hand wave and
             | call it "common sense" is silly without the rest of the
             | context.
             | 
             | And for me, 100 times out of 100 I'm taking the capable guy
             | who can fix the brakes on a trip like this over someone
             | who's first and (likely) only instinct is to call a tow
             | truck.
        
               | atq2119 wrote:
               | As long as we're overanalyzing a joke, it's Switzerland.
               | There isn't really a lot of wilderness there ...
        
               | kridsdale3 wrote:
               | This is true. I spent a week hiking the mountains, where
               | I often could see exactly the same environment that has
               | existed for millions of years. But at all those times, a
               | hut serving beer and warm soup was always an hour's walk
               | away.
        
             | toast0 wrote:
             | Sounds like they were already down the mountain. Stopping
             | to call a tow truck while traveling down the mountain would
             | involve having working brakes, which the scenario suggested
             | wasn't the case.
        
           | FrankoDelMar wrote:
           | Turn the car backwards and use forward engine power to slow
           | the descent ;) or engine brake with the parking brake set and
           | hope for the best
        
         | wizzwizz4 wrote:
         | This story feels quite different without the context of the
         | story this thread is about.
        
         | frutiger wrote:
         | > "Well," said the software engineer, "Before we do anything, I
         | think we should push the car back up the road and see if it
         | happens again."
         | 
         | Only the brakes don't work - the engine still does. Why would
         | they need to push the car uphill?
        
           | mewpmewp2 wrote:
           | It's preferable the fuel state stays as it is. How do you
           | know it's not the amount of fuel otherwise?
        
             | cgriswald wrote:
             | Presumably the engine was only idling during their decent
             | if the only thing that slowed their car was 'miraculously'
             | grinding the car against the mountainside.
             | 
             | So, using previous records, they should estimate fuel usage
             | during the decent. Then they should walk to the nearest
             | fuel station, purchase fuel, and walk back. During that
             | time, they can calculate the amount of fuel that will
             | evaporate while they have the gas cap off and the amount of
             | fuel that will stick to the walls of the piping between the
             | gas cap and the fuel tank. This way when they return to the
             | car, they can put in almost exactly the amount of fuel that
             | was consumed during their harrowing stop.
             | 
             | This presumes the fuel station has the same mixture as they
             | have in their tank. Otherwise all bets are off and they
             | should simply give up.
        
               | ganzuul wrote:
               | OBVIOUSLY, you could have solved the problem with motor
               | braking. The driver is not going to accept fault until
               | there is conclusive evidence of the their wrongdoing, but
               | you can't let the team know you are going to repeat the
               | test again but with a different driver because then they
               | will invent objections to pushing the car up the hill.
        
               | kridsdale3 wrote:
               | Turn the car around 180 degrees facing up. Coast down the
               | hill in reverse and control your descent with the
               | throttle.
        
           | ganzuul wrote:
           | "Magic", "More magic."
        
           | xboxnolifes wrote:
           | The brakes failed, but nothing claimed that they will fail
           | again. So, it's suggested to run the test again.
        
             | frutiger wrote:
             | Of course but they could run the engine instead of pushing
             | the car.
        
           | pests wrote:
           | Reminds me of the Family Guy episode (I think) when Peter and
           | Lous are both running for Mayor (or whatever) and were going
           | to a debate. Peter had his brakes cut and when he arrives
           | says "Sorry I'm late! Breaks failed" to which the response
           | was "Shouldn't you have gotten here sooner?"
        
         | kriro wrote:
         | Let me retell this tale...
         | 
         | "I know," said the department manager, "Let's have a meeting,
         | propose a Vision, formulate a Mission Statement, define some
         | Goals and by a process of Continuous Improvement find a
         | solution to the Critical Problems, and we can be on our way."
         | 
         | Knowingly the hardware engineer and the software engineer
         | looked at each other. "Actually the car is fine, but let's pick
         | a driver that knows what they are doing this time. You simply
         | don't know how to use the breaks and were randomly steering
         | left and right while thinking you're on track, management guy."
        
         | amelius wrote:
         | I think it is possible to end this story in three possible
         | ways, where each will be in favor of one of the professions.
        
           | geraldhh wrote:
           | please, go ahead
        
         | buttercraft wrote:
         | I would close all the windows and restart it.
        
         | mock-possum wrote:
         | If you could click 'relaunch' and the car would miraculously
         | reappear at the top of the hill and repeat the event, allowing
         | you to freeze time at the instant the brakes failed, then pull
         | apart every piece of the car so you could precisely observe the
         | failure in real-time, in slow mo, and in reverse - to pinpoint
         | exactly what the problem was
         | 
         | You're saying the power to do that makes software engineers
         | ridiculous or impractical?
         | 
         | Engineering inside a digital space gives the kind of debugging
         | abilities that would be straight up miraculous in a physical
         | disciple. If I have one thing, and I want to make ten more of
         | those to test in ten different ways, it's literally just
         | CTRL+C, CTRL+V. Let's see a mechanic do that.
        
           | brandensilva wrote:
           | Right with software we have abstractions and flexibility.
           | With hardware they are grounded more to the physical
           | capabilities of the hardware.
           | 
           | Of course software is also limited by hardware capabilities
           | but we can code whatever we want on that hardware as long as
           | it fits within the provided specs.
        
       | acomms wrote:
       | Wow what incredible timing. I am currently working on an Image
       | Uploader component and the gotchas are hiding around every
       | corner.
        
         | rnicholus wrote:
         | This is one of those things I wouldn't suggest you solve with
         | the "roll your own" approach. There are some good libraries out
         | there that will handle this and more. Uppy is one that comes to
         | mind. I created and maintained another popular one for 7 years
         | that i sunset in 2017.
        
           | acomms wrote:
           | Currently using react-dropzone seems to solve most of the
           | major issues for me. Use that to get a signed URL via API,
           | then upload from client to image server directly.
        
             | uoaei wrote:
             | Many exploits involve running arbitrary code hidden in
             | encoded image and video files, notably Pegasus among
             | others. This should be treated as cryptography.
        
       | lamroger wrote:
       | Reminder that vets have it extra hard.
       | 
       | And a reminder to myself to do good.
        
       | shadowgovt wrote:
       | I'm feeling the anecdote about the wasp nest.
       | 
       | Landlord in our office complex installed a touchscreen interface
       | on the outside of the building to dial the various front desks,
       | all of which could buzz a person in. They did this because they
       | had no front-desk receptionist who could see the door.
       | 
       | The thing lasted six months and then started to malfunction
       | badly. The culprit? The interface is running on essentially a big
       | black Android tablet and they installed it on the side of the
       | building that faces East. Mid-spring rolled around and it caught
       | enough sun every day to overheat and fry the touch electronics
       | and part of the screen hardware.
       | 
       | As a software engineer, writing the kind of software I do, I
       | _never_ have to worry about thermal load.
        
         | philk10 wrote:
         | Which reminds me of he story of sun stopping trains - Services
         | at Lewisham, south-east London, were disrupted because of the
         | angle of the 'low winter' sun, train operator Southeastern
         | said.
         | 
         | The rail firm posted on Twitter: 'We had severe congestion
         | through Lewisham due to dispatching issues as a result of
         | strong sunlight.'
         | 
         | It added: 'The low winter sun has been hitting the dispatch
         | monitor which prevents the driver from being able to see.'
        
       | darkwater wrote:
       | A very nice post, well written and with a positive outlook on our
       | position.
       | 
       | And while there are many developers that write software that
       | directly impact in one way or another the lives of other human
       | beings, generally speaking we need to recognize we are in a
       | fairly privileged position, as the author states.
        
       | castis wrote:
       | Thank you for this. Its lovely to be reminded that a lot of us
       | share some the same ups and downs whatever we're doing.
        
       | hasbot wrote:
       | As a software engineer I always kinda enjoyed debugging. It
       | allowed me to use a different skill and mind set than creating
       | designs and implementing them.
       | 
       | Not to say I didn't get stressed out debugging. I had one demo
       | while developing software for AT&T's 5ESS telephone switch. We
       | had only one phone line in the test lab configured for our
       | feature. Attempt after attempt the software just wouldn't work.
       | Knowing the software worked, I checked everything I could all the
       | while stressing out. Finally I asked the lab tech to check the
       | line. Somehow our only configured line was disconnected. The
       | problem was a stupid hardware issue.
        
         | fatnoah wrote:
         | > As a software engineer I always kinda enjoyed debugging. It
         | allowed me to use a different skill and mind set than creating
         | designs and implementing them.
         | 
         | Same here. I always enjoyed the challenge of it, especially in
         | complicated systems.
        
           | iainmerrick wrote:
           | I always feel that debugging is much more of a science than
           | normal software development.
           | 
           | You need to spot unusual behavior, figure out ways to isolate
           | and reproduce it, come up with hypotheses as to what might be
           | happening, design tests for those hypotheses, run the tests,
           | find the solution, test the solution -- exactly like the
           | interplay of experimental and theoretical science.
        
             | kill_nate_kill wrote:
             | ... Detective work.
             | 
             | (*_*)
             | 
             | ( *_*)>[?]#-#
             | 
             | ([?]#_#)
        
       | travisgriggs wrote:
       | Loved this story. A bit skeptical that that kind empathetic
       | manager really exists in the field, but maybe.
       | 
       | Most telling that no sales/marketting/product managers showed up
       | to console the guy. Satire just couldn't plausibly stretch that
       | far. But maybe I'm too jaded. Would love to see the reply that
       | posited a section to this story where the empathetic individual
       | from one of those domains gave solace to the main character.
        
       | thedanbob wrote:
       | > I sent a message to my friend, "Cracked it at last. It was the
       | letter 'E'."
       | 
       | Funny how the simplest, tiniest bugs are often the hardest to
       | find. Just this morning I burned an hour or two hunting down an
       | off-by-one error. Turns out it was an "index + 1" that I had
       | forgotten to change when I refactored (facepalm).
        
         | deredede wrote:
         | As the saying goes, there are two hard problems in computer
         | science: cache invalidation, naming things, and off-by-one
         | errors.
        
           | ohthatsnotright wrote:
           | You forgot Dates, Times and Timezones
        
             | wildzzz wrote:
             | Timezones: if you operate my code across timezones, you're
             | wrong. Date and time: %Y%m%d_%H%M%S. Don't you dare ask for
             | it to be shown any other way.
        
           | Robin_Message wrote:
           | Three ha you missed out rd problems;concurrency.
        
       | yafbum wrote:
       | A physicist friend used to quote Rutherford, all science is
       | either physics or stamp collecting.
       | 
       | By which my friend meant, physics has a way of being checked by
       | physical reality in a way that math or computer science don't.
       | 
       | His area of work was extreme magnetic fields. Experimenting meant
       | building giant copper coils, running enough current in them to
       | melt them in place, and then very quickly detonating explosive
       | around the coil so that, for a fraction of a second, the magnetic
       | field at the center of the coil became the most intense ever
       | built by mankind, before the whole setup was destroyed by the
       | splattering of liquid copper thousands of degrees hot. Errors and
       | miscalculations in that work environment meant that people could
       | die unpleasant deaths very quickly.
       | 
       | So when he looked at math PhD students who at most got chalk dust
       | onto their sweater, calling themselves scientists, he disagreed.
        
         | computerfriend wrote:
         | Leave it to a physicist to misinterpret that quotation.
        
           | kwhitefoot wrote:
           | Perhaps you could enlighten us oh wise one.
        
         | civilitty wrote:
         | _> His area of work was extreme magnetic fields. Experimenting
         | meant building giant copper coils, running enough current in
         | them to melt them in place, and then very quickly detonating
         | explosive around the coil so that, for a fraction of a second,
         | the magnetic field at the center of the coil became the most
         | intense ever built by mankind, before the whole setup was
         | destroyed by the splattering of liquid copper thousands of
         | degrees hot._
         | 
         | Explosively pumped flux compression generators [1] are fun!
         | 
         | That's how real EMPs are made, in case anyone is interested in
         | a career in super villainy but doesn't know where to start.
         | 
         | [1]
         | https://en.m.wikipedia.org/wiki/Explosively_pumped_flux_comp...
        
         | skrebbel wrote:
         | I used to wonder why Dijkstra was so arrogant, and then I
         | learned that he graduated in theoretical physics.
        
         | kens wrote:
         | That's a rather unusual interpretation of the quote. According
         | to several books, the meaning of that quote is that science is
         | either mathematical and quantitative, or descriptive. In other
         | words, you're either attempting to understand the dynamics of
         | the subject or merely collecting interesting facts and naming
         | items of interest.
        
       | firefoxd wrote:
       | I giggled at the end. Just yesterday, we solved an issue that
       | plagued the company for 3 years. For us it was the letter 'A'.
       | 
       | Someone had been doing manual fixes inserting and removing data
       | for the past 3 years. It became part of his job. He added a
       | recurring event in his calendar just to do that regular clean up.
       | Millions of customers depended on this one individual making sure
       | they had the correct data plan on their phone line.
       | 
       | You can imagine the chaos when he forgets or goes on PTO.
       | 
       | Turns out: if $line->status == STATUS_ACTIVE
       | 
       | one was 'Active' the other was 'active'. No dogs were harmed, but
       | incalculable money was lost over the years.
        
         | A4ET8a8uTh0 wrote:
         | If this was a law case, the joke would have been:
         | 
         | 'What have you done? You solved the case that put our entire
         | family through law school!'
         | 
         | That poor soul is no longer indispensable. I am only half
         | joking. Software is about making things more efficient, but I
         | like to look at the human motivations.
        
         | tialaramex wrote:
         | So somehow in some parts of the code STATUS_ACTIVE is defined
         | wrong?
         | 
         | I guess there is always a risk that some "helpful" contributor
         | will fix the typo in your definition of HttpHeader::REFERRER as
         | "referer" to make it "referrer" instead, thus completely
         | breaking all the software because nope, that typo is enshrined
         | in the HTTP standard, it's Phillip Hallam-Baker's fault while
         | he was at CERN.
        
           | Crespyl wrote:
           | > So somehow in some parts of the code STATUS_ACTIVE is
           | defined wrong?
           | 
           | I would guess that some other part of the app doesn't even
           | use the constant at all, and just hardcodes "Active" as a
           | string on its own. Maybe taking the value of a dropdown from
           | the UI and never mapping that back to the actual constant.
        
         | lostlogin wrote:
         | A tricky one that I've seen cause harm is white space or
         | otherwise invisible characters (eg line breaks).
         | 
         | Super frustratingly, Macs populating HL7 fields caused intense
         | pain. It turns out that the character ' when typed on a Mac
         | keyboard is not compatible with all versions of HL7, or perhaps
         | wasn't compatible with what the HL7 was passed off to. It's a
         | distant memory now but it was words like o'clock versus
         | o'clock, or something like that which broke radiology report
         | distribution.
         | 
         | It went on for years before being caught.
         | 
         | Edit: HN is displaying the ' differently to how it looks when I
         | type it, but it's still the same character. The fact that we
         | couldn't see the difference when debugging was half the
         | problem, so this is quite funny.
        
           | matsemann wrote:
           | Encoding is hard. Recently had a problem where some
           | proxy/load balancer (I think) in Go would crash, as it
           | couldn't handle aeoa in some headers which was returned from
           | some service doing ip lookups before passing on the request.
           | Which of course hit our workers in the city of Tonsberg.
           | 
           | Another example I remember from earlier days is the BOM in
           | xml files. When it was wrong things could crash in all kind
           | of weird ways, and impossible to see.
        
       | swatcoder wrote:
       | > As software developers, it's easy to overlook the privileges we
       | enjoy. We have the unique ability to delve deep into intricate
       | processes, monitor real-time activities, log what's happening,
       | and even pause time with a debugger. This remarkable capability
       | is not only cheap but fast, bordering on thoughtless.
       | 
       | > While many other professions struggle to understand and resolve
       | their issues, we have the advantage of being able to experiment
       | multiple times a day with just a few clicks.
       | 
       | So much strained positivity, as if the author was tasked to find
       | something to be thankful for. Look, software engineering is a
       | great job if you enjoy the work. But even in this parable, the
       | problem is the author's week of distress and flailing. It has
       | nothing to do with the work and everything to do with the author.
       | 
       | All the others he turns towards, no matter their discipline,
       | their tools for investigation, or the constraints they faced in a
       | dilemma, relate stories where they have a mature understanding of
       | how their industry works and how they navigate its system. They
       | encounter problems in the course of their work and they resolve
       | them in the course of their work. Maybe it takes a little while
       | to proceed with diagnosis. Maybe it takes a long while to
       | integrate improvements into a later product. Maybe they need to
       | forgo some procedure that they prefer to use.
       | 
       | By the authors account, the embedded engineer, the hardware
       | engineer, the CEO and veterinarian all face greater challenges
       | when solving problems in their work, yet they all speak of their
       | road through those challenges with a confidence that the author
       | lacks. They try to soothe the author and empathize, but none of
       | their stories hint at a week of panicked flailing.
       | 
       | So if they handle their work so much more confidently, is it true
       | that their dilemmas are worse and that the author is lucky to be
       | a software engineer?
       | 
       | If the author listened to their own invented characters, the
       | realization to come to is not that the author is lucky to work in
       | a field with purported "privileges" and that everyone else has it
       | worse (gross!), but that _everyone_ faces dilemmas in their work
       | and that the real skill is in staying cool and confidently
       | relying on the processes of their discipline. And this has
       | everything to do with the person doing the work and nothing to do
       | with the discipline. The realization is that challenges arise in
       | all professions and that you can proceed through them without
       | distress and flailing if you allow yourself patience and
       | confidence.
       | 
       | It's funny because they wrote this as a parable, but they missed
       | the real lesson in the very piece they wrote. Four people
       | reassure them that "We've been there! We all go through this!"
       | and their takeaway is "I need to remember that I'm lucky and that
       | everybody else has it even worse."
        
       | munchler wrote:
       | The dog's owner paid for surgery, but wouldn't pay for an x-ray?
        
         | pie420 wrote:
         | Don't let facts get in the way of a good blog post
        
         | harrymit907 wrote:
         | Cost to benefits probably. Vet X-rays are surprisingly
         | expensive and then surgery had to be done anyway.
        
           | gcheong wrote:
           | True but as the vet in the article states she couldn't be
           | sure that the extent of the problem was just the corn cob
           | without an x-ray so to me it would seem more logical to take
           | the x-ray once you've decided on surgery.
        
           | krallja wrote:
           | They're like $100... aren't they?
        
             | LastTrain wrote:
             | Something like that, should we get out out pitchforks now?
        
             | gcheong wrote:
             | Our cat had follow-up x-rays after radiation treatment for
             | a thymoma. Cost for the 3-view X-rays was $605.00, and the
             | consult with the radiologist was $189.00. Bay Area, but
             | still...
        
           | tialaramex wrote:
           | Even in human medicine some of the things on the "Do not do"
           | guidance are diagnostic steps which are pointless because you
           | will always do the same thing next regardless.
           | 
           | A bunch of them are for infant minor injury where it's like
           | don't do an X-ray. If you can see a break on the image you'd
           | do A, but if you can't you'd figure the break might be too
           | small to show up and do A anyway. Kids don't need more
           | radiation, just do A immediately without requesting an X-ray.
           | 
           | I have wondered if my cancer diagnosis is at the edge of this
           | case. There's a step where they do a needle biopsy. But, as
           | far as I can tell that biopsy always either says "Cancer" or
           | "Don't know" and I'm not sure what else they'd do for "Not
           | sure" beyond the next step in the cancer diagnosis...
        
             | ninju wrote:
             | Sorry to hear that...hope everything works out okay
        
               | tialaramex wrote:
               | Yeah, it went fine. I had Hodgkins, like 20+ years ago,
               | it's very curable and (I didn't know at the time) occurs
               | relatively often in young men. They fixed it. It's fun
               | because I'm a walking example of why universal healthcare
               | makes sense - even economic sense. I was a broke student,
               | if healthcare cost money there's no way I'd have even
               | gone to a doctor to ask about my weird symptoms - they
               | weren't even really annoying, just it seemed like it's
               | something doctors should check. If it cost money I'd have
               | waited until I was in serious pain, at which point it's
               | more likely they can't fix it or that if they can fix it
               | the fix is really drastic.
               | 
               | I didn't stay a broke student. I got a job, bought a
               | home, I became a productive (tax revenue generating)
               | citizen, instead of a corpse as would happen with no
               | healthcare.
        
             | SoftTalker wrote:
             | There's also the cases where you don't do the test because
             | you do _not_ want to do the next step. E.g. the test
             | results would indicate a need for a very invasive surgery
             | or aggressive medical treatment, but you are 80 years old
             | and you don 't want to spend your remaining time recovering
             | from surgery or sick from side-effects.
        
         | ShMcK wrote:
         | My friend thought this was weird as well, but apparently
         | common. People think vet's are trying to rip them off when they
         | ask for a $70 x-ray, but they're okay with paying for a blind
         | surgery.
        
       | ryandrake wrote:
       | I always like to see upstream corrective action after something
       | like this. If there was adequate logging / error reporting, this
       | wouldn't have taken a week to fix. Whatever library he sent the
       | invalid "image/jpg" MIME type to should have thrown an exception,
       | crashed, or at the very least, logged loudly. I wonder if OP
       | filed a bug against it.
        
         | hathawsh wrote:
         | The relevant paragraph in the article bothers me a bit:
         | 
         | "I re-uploaded a version with improved error handling, but
         | image uploads were failing without any feedback. You see,
         | normally code screams its errors at you in red text - silence
         | is the goal. Here silence was the problem."
         | 
         | Silence is not quite the goal. Too many developers think
         | silence is the goal, but the goal is actually accuracy. If
         | there's no error, yes, it should be silent. If there's an error
         | that affects the user, there should be a big red alert box. I
         | believe developers should come to love error messages. Well
         | written error messages reveal causes quickly and save everyone
         | a lot of time.
         | 
         | I hope this developer has learned to show error messages more
         | often. That would be a great outcome.
        
           | GrinningFool wrote:
           | I would say it should be a big red alert box with a simple
           | error code that the end user can reference when trying to
           | find help.
           | 
           | The applications (CLIs, native, web, etc) I've seen that
           | present me with non-actionable errors is a perpetual source
           | of irritation.
           | 
           | "Failed to open file"
           | 
           | "File could not be uploaded"
           | 
           | etc
           | 
           | Not only are these useless to the user who can't do a thing
           | about them except try the same thing again, they're useless
           | to the developer or support engineer who might be trying to
           | help them.
        
         | gwbas1c wrote:
         | Yeah, at the end of the article I even wondered what kind of
         | environment Shawn (author) works in where it would take so long
         | to diagnose?
         | 
         | Was Shawn able to access _anything_ on the server that would
         | confirm /deny that the image upload was coming through? Why did
         | the image upload work in the test environment but not in the
         | released version of the app? What was different about the test
         | environment?
         | 
         | In theory, Shawn should have had enough access to the server
         | environment (either by running the servers himself or asking
         | someone to help him diagnose why an upload failed silently)
         | that he should have had a reasonably quick answer to "why is
         | this upload succeeding but not showing up?"
         | 
         | IMO, those lessons (why the upload worked in test but not in
         | production) are significantly more important than "the image
         | mime type was set to 'jpg' but should have been 'jpeg'" The bug
         | is much more inconsequential to why the environment made it so
         | hard to find the bug.
         | 
         | In my case, I had a situation where a desktop application was
         | severely malfunctioning, but errors were not being logged. It
         | took me multiple days to realize that the application was
         | running out of file handles, and that log4net wouldn't log if
         | it couldn't get a file handle. Even though the fix (reverting a
         | very small bugfix) was simple; the _real_ fix was to customize
         | log4net to always keep the log file open. This way, if the
         | application ran out of file handles, the error would be logged.
        
           | kr0bat wrote:
           | Yup, that one paragraph left me scratching my head. In my
           | mind the (very thinly described) image upload functionality
           | should have failed regardless of configuration.
           | 
           | Maybe by "the images simply wouldn't upload." the author
           | meant "did not display", and the file was being uploaded to
           | the data store, was visible when viewed in the data store
           | directly, but would not be displayed in app when requested.
           | 
           | I got the feeling that this is one of those 500-mile email[1]
           | stories, where technical details are omitted for easier
           | storytelling
           | 
           | [1] https://news.ycombinator.com/item?id=9338708
        
       | city41 wrote:
       | Several times throughout my career I've been hit with something
       | erroring and it just being silent and completely stumping us. No
       | error output, nothing. In a lot of these situations, we were able
       | to track it down to some low level third party library doing
       | `catch (e) {}`. The first one happened early in my career, and it
       | was a good lesson. I don't take any error for granted, at the
       | bare minimum I log it. You just never know, your software could
       | still be used 5 years from now and in a totally different
       | environment than you ever imagined.
        
         | csours wrote:
         | Oh this function is totally obvious to everyone on the team, no
         | need to comment it.
         | 
         | 30 years later:
         | 
         | /* X systems I modul body I 14.09.1990 */
         | 
         | void xxvcda(int *addr, int sizeof)
        
         | maxwelljoslyn wrote:
         | Ohhhhh yeah. I'm working on some code right now where the
         | previous drive-by author trapped the underlying library's
         | exceptions, then raised completely useless ones instead. He
         | also didn't know how to use the language mechanism where you
         | raise one exception "from" the previous one, to preserve
         | context in the stack trace.
         | 
         | Fun stuff. At least this isn't for my job, which has its own
         | fun.
        
       | zoogeny wrote:
       | This reminds me of a colleague I had that would often say "we
       | aren't making air-traffic control systems here". The implication
       | being that no lives were on the line if we made a mistake. This
       | was when I was making games but it also applies to just about
       | every CRUD app I've written.
       | 
       | Tangentially, one thing I often ask other senior technical
       | leaders (especially Director, VP or CTO) is: what is the most
       | costly mistake you have made? If you are a junior engineer, make
       | sure you do it sometime. Many/most high-level leaders in tech can
       | tell stories in the $100k to $1m range. I've seen people lose
       | millions of dollars on a project and get promoted immediately
       | after. It is important to understand why that can happen and why
       | it can even be a good thing.
        
         | knaidofngio wrote:
         | >The implication being that no lives were on the line if we
         | made a mistake. This was when I was making games but it also
         | applies to just about every CRUD app I've written.
         | 
         | I don't agree. Maybe a failure won't result in people dying in
         | a ball of fire, but it can still cause harm. Even minor harm
         | can still add up at scale.
         | 
         | Frustration from a buggy game could lead to real-world road
         | rage or shouting matches. People have killed themselves because
         | a computer sent them a bogus bill. Businesses have failed
         | because software lost valuable data. People have been murdered
         | because of silly social media apps. People have organized
         | pogroms on Twitter. People have been stalked and assaulted
         | using information leaked by Pokemon Go.
         | 
         | Software has real power. If it didn't, there would be no point
         | in writing it.
        
           | zoogeny wrote:
           | It is fair to misunderstand what I was saying since all
           | things are ambiguous. Without context I could see this being
           | interpreted as permission for people to be lazy, incautious
           | or even negligent.
           | 
           | But I urge you to consider the other side of the spectrum and
           | the pressures that people can put on themselves. For some, in
           | their search for perfection, they can ruin their own lives.
           | They can see every mistake they make as a personal failure.
           | It is useful to remember that in the vast majority of cases
           | people bounce back from these failures.
           | 
           | You will hear over and over how many entrepreneurs fail in
           | their first businesses, often several times. Most often in
           | life you don't just get a second chance, you get many
           | chances. There a only a few places in life where a single
           | failure is truly catastrophic.
           | 
           | So if you find yourself overwhelmed as a junior engineer, as
           | described in this story. If you feel your stomach in knots
           | and you are terrified your lead in going to eviscerate you in
           | front of a cheering audience - just know you have more
           | latitude to fail and try again than you might expect.
        
             | knaidofngio wrote:
             | I never thought you said that sloppiness is acceptable. I
             | edited my comment to try to make that clearer.
             | 
             | But I think we should remember that _everything_ matters.
             | People 's lives are not mostly made of weddings and
             | funerals and gun fights and plane crashes. They're mostly
             | made of chores and small talk and dumb little mobile games.
             | Nothing is really trivial. You shouldn't beat yourself up
             | over mistakes, but that's not because they don't matter.
        
               | zoogeny wrote:
               | Sure, everything matters. But some things matter more
               | than others. If my internet fails for an afternoon that
               | seems to matter less than if my wedding is a catastrophe.
               | If my video game crashes that seems to matter less than a
               | plane crash. We call this "putting things into
               | perspective".
               | 
               | I mentioned the word "humility" in another response and
               | that is the crux of what I'm trying to communicate. It is
               | often the case that we can exaggerate the importance of
               | our own work and it often helps to take a step back and
               | humble oneself. If you find yourself losing sleep over
               | your work, if you find your anxiety levels high, perhaps
               | you need some perspective. Perhaps you find it
               | distasteful for me to suggest that the engineering work
               | of air-traffic control software matters more than most
               | CRUD apps. That doesn't mean every other kind of software
               | has zero worth. It just provides an anchor for
               | perspective - a kind of software where literally
               | thousands of lives are at stake 24 hours per day. Most
               | developers are not under that kind of stress.
        
         | gwbas1c wrote:
         | > we aren't making air-traffic control systems here
         | 
         | I also find that attitude troubling.
         | 
         | I've worked on software that could loose peoples' cherished
         | data. Now I work on software that could cause flooding if it
         | misbehaves.
         | 
         | Take a bit more pride in your work.
        
           | zoogeny wrote:
           | You can definitely take the comment in the worst way possible
           | if you desire.
           | 
           | This was in the early 2000s in the games industry. I'm not
           | sure if you are familiar with that culture, but it was a time
           | when the engineers were working 12+ hour days for months at a
           | time. People were pouring their heart, souls and sanity into
           | shipping software, often working until they literally broke
           | down. I remember one engineer boasting that he had worked for
           | 2 months straight without taking a single day off.
           | 
           | In that environment the stress was high and technical
           | discussions could often escalate into heated arguments. We
           | often had to remind ourselves that we were making _games_ and
           | many people working there were supposedly living their
           | childhood dreams. It was important to remember that.
           | 
           | The idea that we didn't take pride in our work or didn't do
           | everything in our abilities to ship the highest quality
           | software is beyond incorrect. It was that excessive pride
           | that we needed to guard against by checking in to reality. It
           | wasn't a call to laziness, it was a call to humility.
        
       | stavros wrote:
       | I miss working on low-risk stuff like that. I now work in
       | healthcare, and a missing letter can mean that someone dies.
        
       | stavros wrote:
       | Wait, how was this not caught in testing? It's not like this
       | would differ between testing and production.
        
         | gardenhedge wrote:
         | And a roll back should have worked for this issue
        
         | ShMcK wrote:
         | I believe the mimetype check on Android must have only been
         | applied to production environments. It's an odd one.
        
       | failrate wrote:
       | I always dogfood my own software, but now I guess I also need to
       | corn cob dog my software, too.
        
       | nusl wrote:
       | Perhaps the jpg -> jpeg tidbit will save my ass someday. Thanks
        
       | teaearlgraycold wrote:
       | I now feel very validated for using TypeScript to statically
       | validate mime types.
        
       | jerf wrote:
       | I've developed a real distaste for the people whining about how
       | we aren't real engineers and we "just" need to solve that by
       | working more like real engineers and having all these massive up-
       | front design meetings and making tons more plans, etc. etc.
       | 
       | It betrays a profound misunderstanding of the situation. The
       | other engineering disciplines don't work like that because
       | they're just soooo much more professional than us. They don't
       | work like that because it is a better way. They work like that
       | because for them, it is the _only_ way. You do not build a hotel,
       | and then realize the ceilings need to be six inches higher, and
       | tear the whole thing down and start over.
       | 
       | If they _could_ work by running ceilingHeight += 6 and hitting
       | "Rebuild", see the hotel rebuilt and the automated unit tests
       | automatically double-check the usability of everything inside for
       | handicapped people etc., all for a grand total of about $2.82,
       | they absolutely would.
       | 
       | Shed your inferiority complex. We are not squalling babies
       | drooling on our blocks while Real Men (with all the pejorative
       | connotations modern political sensibilities see in that term
       | fully intended) are building bridges and dams. We engineer with
       | better tools than they could dream of having, and it's completely
       | expected that that results in highly significant changes to our
       | processes.
       | 
       | Do we sometimes fail to bring enough process to a problem? Yup.
       | But if you think that's a problem unique to programming, I
       | prescribe to you spending several hours with
       | https://www.imdb.com/title/tt4788946/ .
        
         | 4gotunameagain wrote:
         | > Shed your inferiority complex. We are not squalling babies
         | drooling on our blocks while Real Men (with all the pejorative
         | connotations modern political sensibilities see in that term
         | fully intended) are building bridges and dams. *We engineer
         | with better tools than they could dream of having, and it's
         | completely expected that that results in highly significant
         | changes to our processes.*
         | 
         | I just want to add, that this comes off as originating from an
         | inferiority complex ;)
         | 
         | Why is the term engineer so important to you ? Just do your
         | job, do it right, and ignore criticism.
        
           | jerf wrote:
           | I don't have the inferiority complex. I see it in others.
           | 
           | They are, frankly, welcome to it, right up until they try to
           | ruin my job by adding negative-value processes because of
           | their complex.
        
         | dudeofea wrote:
         | you can certainly fix an engineering design in-situ, just look
         | at all the airplanes/jets designed pre-CAD software that were
         | made "just-so" with all the know how embedded in the brains of
         | those that made them/fixed them
         | https://www.youtube.com/watch?v=NPVT2lvMvOk
        
           | jerf wrote:
           | Of course you can... _sometimes_.
           | 
           | And you can't always do it in software, either. I keep a
           | mental list of "things you can't really retrofit onto a
           | mature piece of software" that I keep kicking myself to turn
           | into a blog post sometime. I suppose a quick & trivial
           | example is that pretty much by definition switching languages
           | involves a rewrite.
           | 
           | (Though that involves a bit of definitional footwork where I
           | declare using a compiler that goes from language A to B isn't
           | really "switching to B". Anyone who has tried that maneuver
           | in real life can attest it certainly isn't the same thing as
           | a real full rewrite in the target language, even if it does
           | sometimes have its utility.)
           | 
           | Still, there's literally orders of magnitude difference in
           | how likely a given retrofit is to work and how easy it is for
           | us to add it, and proof of that is precisely in the enormous
           | signature this difference leaves on our processes.
        
         | gretch wrote:
         | I completely agree, it's 2 separate mediums with their own
         | optimized process/technique.
         | 
         | It's like sculpting Clay vs Marble. If you make a boo-boo in
         | clay, it just takes you a second to readjust. If you are
         | working in Marble, and you took a piece out that you weren't
         | supposed to - well it's time to order a new marble block.
         | 
         | Taking the techniques and processes of marble sculpting into
         | the world of clay would just make you a bad (or at least highly
         | inefficient) clay sculptor.
         | 
         | And there's really no point to a dick measuring contest of
         | whether clay or marble sculpting is more worthwhile - they both
         | have their own place in our society.
        
         | zemvpferreira wrote:
         | I might be misreading but I think you're missing the forest for
         | the trees. It's not about the upfront planning, meetings or
         | whatnot, those are consequences of prior criteria. This is what
         | engineering is:
         | 
         | 1-A practical problem is being solved in a scientific way.
         | 
         | 2-The person solving the problem has been credentialed as an
         | engineer in both ethics and scientific rigour.
         | 
         | 3-There is liability for the engineer signing off on the
         | solution.
         | 
         | No whining or superiority intended, but if any of the three
         | criteria is missing, you're not practicing engineering. In my
         | experience most software development is missing all three.
         | That's not necessarily a bad thing, it's just that...most
         | software development isn't engineering.
        
       | NKosmatos wrote:
       | Besides the debuggers/analyzers/simulators/emulators... we have
       | at our disposal, a more powerful "ancient" mechanism exist: code
       | inspection/review/desk-check by a fellow programmer.
       | 
       | I understand it's not applicable in all positions/companies and
       | heavily depends on the team and project size, but I've seen it
       | work too many times.
       | 
       | Following this, the next best thing is testing (as others have
       | commented).
        
       | assimpleaspossi wrote:
       | We had a presentation of our new medical instrument to marketing
       | on Wednesday so there was a big push on Monday to get the display
       | up and running perfectly. There was a dot on the screen. I didn't
       | know why there was a dot but I was under pressure to finish
       | everything else. So I semi-ignored it.
       | 
       | The the Engineering Manager walked by. "There's a dot," he said,
       | "Get rid of it before Wednesday."
       | 
       | With all the other things going right with the project, why this
       | dot--a single pixel--was so important drove us all crazy. I ran
       | through the assembly code that handled all this over and over
       | again and couldn't see anything wrong. Never a reported error by
       | the assembler. Neither could the project manager. Stayed at work
       | all night to wrap it all up and, on Wednesday morning, everything
       | was done and working perfectly just as the Engineering Manager
       | walked into the room at 8am.
       | 
       | "That dot is still there."
       | 
       | Like the author of the article, I questioned whether I should be
       | in this line of work. I continued rewriting, assembling, and
       | testing every variation of the code I could. At 3:00PM on Friday,
       | I found the issue.
       | 
       | MOVE B #0,D0
       | 
       | Do you see it? Imagine this is the 1990s, with a green screen
       | monitor and a PDP-11.
        
         | mandarax8 wrote:
         | No I don't see it. Are moving D0 into B? What's the #0 doing?
        
       | jaffee wrote:
       | wait... but why did it work in the development environment?
        
       | danwee wrote:
       | > By Thursday, I began to worry about my own job security. I had
       | been spinning on a feature I said I would ship 3 days ago.
       | 
       | Off-topic: is it really like that in the US? (I'm assuming he's
       | from the US). Like, if you get stuck for a few days, you start to
       | worry about being fired or reprimanded?
        
         | tedunangst wrote:
         | As real as the rest of the story.
        
       | mgaunard wrote:
       | The article is nonsense from the first sentence.
       | 
       | Software development has all of diagnoses, audits and
       | proofreading.
       | 
       | It's an all-encompassing discipline.
        
       ___________________________________________________________________
       (page generated 2023-11-03 23:00 UTC)