5 ms·
A lot of engineering is ensuring you're making an even number of sign errors.
by ryandrake 3y ago
A lot of engineering is ensuring you're making an even number of sign errors.
- malux85 3y agoSame in finance!
- hamandcheese 3y agoThis reminds me of how one time in an interview, I realized I had an off-by-one error. Instead of actually trying to understand the source of the error, I just sped-run tweaking different values +/- 1 until I got the expected result. In the moment I felt quite clever, but the interviewer apparently did not appreciate that technique.
- actionfromafar 3y agoWell, the three hardest things in computer science are after all naming things and off-by-one errors.
- biomcgary 3y agoI thought the two hardest things in CS was naming things, off-by-by one errors, and cache invalidation, but I must be remembering that incorrectly.
- klabb3 3y agosynchronization. Don’t forget
- sdenton4 3y agoThe whole reason for the off by one error in the standard joke is that we forgot to use a mutex.
- actionfromafar 3y agoDon’t forget synchronisation.
- spenczar5 3y agosynchronization, too
- Sduic 3y agoOK, the two hardest things in CS are naming things, off-by-one errors, cache invalidation, and synchronisation...and consensus... I'll come in again.
- hnburnsy 3y agoDamn you beat me to it, I knew this felt like a Monty Python skit... >“Nobody expects the Spanish Inquisition! Our chief weapon is surprise... surprise and fear... fear and surprise... Our two weapons are fear and surprise... and ruthless efficiency.... Our three weapons are fear, and surprise, and ruthless efficiency... and an almost fanatical devotion to the Pope... Our four... no... Amongst our weapons... Amongst our weaponry... are such elements as fear, surprise... I'll come in again.”
- bostik 3y agoConsensus is a distributed systems problem. And in that space there are only two hard problems: 2. Exactly-once delivery 1. Guaranteed order of messages 2. Exactly-once delivery
- AceJohnny2 3y agoLove to hear it. Interviewing sucks from all perspectives, so as an interviewer I try to give leeway for the stress and time pressure the interviewee is under. But the key thing is they must express their reasoning for their approach, and "I don't have time to dig into this" will get you a long way, at least under me. (Obviously there are nuances, but there is not enough space in this comment to elaborate)
- hackernewds 3y agowhich makes interviewing all the more annoying because then your success applies to which interviewer you get
- Mtinie 3y agoSuch is every aspect of life, fortunately or unfortunately.
- eitland 3y agoIf you fail an interview because the interviewer was unreasonable, sometimes you should be thankful and think of it as a bullet dodged. Yes, an otherwise good company might have a bad interviewer, but if they don't have some feedback loop to catch it, chances are there are other things they also don't catch.
- insertchatbot 3y agoHad an interview once over Zoom. Dude has me do a coding test: normal String manipulation algorithmic problem solving stuff. So I’m screen sharing and try to google something and he’s like “STOP! What are you doing?” I’m like “well I don’t remember the exact name of the function” and he’s like “You can’t do that, this is a Test!!” So I flunked his “test” and then immediately contacted the recruiter and said “no thanks” before he could muahahaha
- bee_rider 3y agoI mean, in this case… it is nice to get an interviewer that lets stuff slip, but brute-forcing bugs in an interview problem doesn’t seem very good, right?
- notatoad 3y ago>I just sped-run tweaking different values +/- 1 until I got the expected result we call this "ML" now, and it pays extra
- ensignavenger 3y agoReally, the marketers seem to call it "AI".
- notatoad 3y agoin a job interview, it's ML. in a product, it's AI.
- geoduck14 3y ago>in a job interview, it's ML. in a product, it's AI. Oh. This is good. I'm using this!
- 3D30497420 3y agoReminds me of this classic: https://www.reddit.com/r/ProgrammerHumor/comments/a07d0u/ai_in_nutshell/ https://www.reddit.com/r/ProgrammerHumor/comments/a07d0u/ai_...
- m463 3y agoWhat about a job interview between marketing folks?
- bee_rider 3y agoI suspect they just call it the product.
- sen 3y agoWrap up that speed-run up in an automation and refer to it as “fuzzing” and you can sell it for millions these days.
- edflsafoiewq 3y agoCan often be justified by the fact you know the correct form is aX+b, so you only need to get it right at two points to make it right everywhere.
- lloeki 3y ago> Instead of actually trying to understand the source of the error, I just sped-run tweaking different values +/- 1 until I got the expected result. That's perfectly valid, when one knows a specific step or result must be positive or negative. Not that much different from dimensional analysis, which speedruns you to get/fix to proper formula (at the cost of skimming on dimensionless constants). Similarly, interviewer was not impressed when they cut me short and started walking me through some step and I pointed to them that their result was obviously wrong as it was dimensionally inconsistent and if they didn't cut me out the formula must have been something like baz*foo/bar^2 or something and now we just have to figure out the constants.
- pmontra 3y agoMany years ago before a demo we discovered that a program failed to run properly but it did run successfully the next time. We couldn't figure why and the clock was ticking. We made a script to run it twice, fail then success, and the demo was good. Then we debugged the issue, which was something trivial (I can't remember the details) but proper debugging and fixing under time pressure is never trivial. So, an interviewer might appreciate that balancing of signs if told that it is the fastest way make it work (and pass your demo,) only to fix it later. Once proven that the hacked code gives the right solution maybe you could have offered to send them the correct code on the next day or keep working on it if they wished so.
- Elte 3y agoLong ago in high school, I entered a LEGO robot competition with some friends. Tests were line following, collision detection, etc. One of the tests involved the bot being sent on a collision course with a wall. It had to detect running into it and turn around. This was one of the easiest ones to complete, but shortly before the test started we realized that our pressure sensor was malfunctioning and didn't send any more signals. There was no more time to swap it out, I don't even think we had a spare to be honest. Not wanting to give up points on an easy test, we gauged the distance the bot had to cover in the test, and quickly uploaded some new software. At the start of the test, our bot moved forward for 4 seconds, stopped, then turned around. Full points on that one! Some times things just need to work and we can worry about them working _correctly_ later...
- salawat 3y agoYou... Literally made a test defeat device. In other words, you pulled a Dieselgate, in LEGO form. Were I to judge your implementation, not only would you sacrifice those points, I'd have disqualified you from the competition on ethical grounds. There is never an excuse for smoke and mirrors. Never.
- taneq 3y agoThis joke is used at the start of Abrash’s Graphics Programming Black Book, followed by “If you laughed, you’re a graphics nerd.” :D
- _moof 3y agoThe rest of engineering is doing very careful math and then multiplying everything by two just to be sure.
- martyvis 3y agoAnd when estimating the effort required, multiply by pi. https://news.ycombinator.com/item?id=28667174 https://news.ycombinator.com/item?id=28667174
- hackernewds 3y ago"Now let's assume our chicken is a sphere.."
- rcxdude 3y agoThe tricky bit is when you have multiple interacting systems which see different combinations of those sign errors: it makes it a lot more important to know where all the sign flips should actually be. For example, it's quite easy to make a PID controller where the D term is actually the opposite sign to the others.
- m463 3y agothat is so not not !false
- onionisafruit 3y agoReminds me of one of my favorite lines of code: i = i - 2 // because I'm bad at this
- idiotsecant 3y agoI just want you to know how hard I'm going to steal this and pretend I invented it when people think its clever.
- mensetmanusman 3y agoWe would joke in physics class that you either need to memorize the right-hand rule; or if you were right handed while doing the test, the negative left-hand rule. (because students would often make the mistake while holding their pencil during the exam of how to calculate the curl)
- ryandrake 3y agoI'm doing the same thing. I didn't[1] invent it either. 1: https://twitter.com/id_aa_carmack/status/419313776463077377 https://twitter.com/id_aa_carmack/status/419313776463077377
- ReptileMan 3y agoIt was common saying 30 years ago when we were preparing for IT Olympiads in Eastern Europe - if you do even number of errors chances are your program will work ok.
- littlestymaar 3y agoCarmack didn't invent it either, my physics teacher was saying that a lot 17 years ago so it's clearly a common thing.
- gattilorenz 3y agoa possible source is in the replies to that tweet: https://twitter.com/RobbieBC/status/419324772754132992 https://twitter.com/RobbieBC/status/419324772754132992
- littlestymaar 3y agoHonestly it wouldn't surprise me if it had been invented multiple times independently, it's just too obvious to anyone that has had to deal with calculation. (But thanks for sharing what us without a Twitter account cannot see otherwise anymore…)
- dekhn 3y agoalso known as "a fortuitous cancellation of errors"