Ew no.
Abusing language features like this (boolean expression short circuit) just makes it harder for other people to come and maintain your code.
The function does have opportunity for improvement by checking one thing at a time. This flattens the ifs and changes them into proper sentry clauses. It also opens the door to encapsulating their logic and refactoring this function into a proper validator that can return all the reasons a user is invalid.
Good code is not “elegant” code. It’s code that is simple and unsurprising and can be easily understood by a hungover fresh graduate new hire.
Gotcha. So all horses are purple?
None built in from what I recall. That was from back in 2011, so it’s possible things changed since.
Reading through, it looks like retries do exist, but remember that duplicate packets are treated as a window reset, so it’s possible that transmission succeeded but the ack was lost.
I remember the project demos from the course though - one team implemented some form of fast retry on two laptops and had one guy walk out and away. With regular wifi he didn’t even make it to the end of the hall before the video dropped out. With their custom stack he made it out of the building before it went.
I’ll need to dig through to find the name of what they did.
To be fair, because of window size management it only takes 1% packet loss to cause a catastrophic drop in speed.
Packet loss in TCP is only ever handled as a signal of extreme network congestion. It was never intended to go over a lossy link like wifi.
Seriously though - JIRA isn’t always a massive pain in the ass. It’s just the way it’s used that sucks. Workflow restrictions so devs can’t move tickets from testing back to in progress, dozens of mandatory fields, etc.
When your tools start dictating your workflow rather than the other way around then it’s time to switch tools.
Friends don’t let friends use JIRA
I have either written or gotten a variant of every single one of these comments 🫠:
Please include the JIRA task in the commit title.
Did you run any manual testing?
Where’s the PRD link in the commit message?
Can you please split this into multiple smaller commits?
Can you combine these two commits?
Did you email Jon about this because he’s working on that project with Sarah and you might be duplicating efforts.
This should be named BarFoo instead of FooBar.
Why aren’t you using CorporateInternalLib16 that does 90% of this?
Why aren’t you using ThirdPartyPaidLibByExEmployee?
Why aren’t you using StandardLib thing you forgot existed?
All our I/O should be async.
All our hot loop code needs to be sync.
This will increase latency of NonCoreBusinessFlow by 0.01%. can you shave some time off so we can push in feature B also?
Please add a feature flag so we can do gradual rollout.
What operational levers does this have?
Lgtm - just address those comments
All images are stacked bar charts if you try hard enough
Does that mean the engagement band is just a semiring?
There’s a fine line between disrespecting a fallible opinion and disrespecting the person. In writing, it’s easy to cross that line. It’s ok to disagree with people, but it’s important to sometimes take the step back and remember that the person is larger than any singular decision. There’s likely context you’re missing that lead them to that decision.
The biggest thing to remember is that more likely than not, if you really and truly fuck up your job, chances are the worst you do is create extra work for your team. They probably won’t even be in danger of losing their jobs if you truly screw up. It’s not likely that people will die. The blast radius of most software engineering jobs is incredibly small.
Good luck with it!
It is “fun”, and there are lessons that Ruby has that should be taken elsewhere, like the principle of least surprise. The most important one is MINASWAN: Matz is nice and so we are nice.
Matz described Ruby as Lisp with C semantics, and Perl convenience.
There’s a reason the CLI flags can put it in “perl mode”
The actual SEC report is relatively short - and surprisingly accessible.
The correct term is “Computational Statistics”
So to be clear: you didn’t laugh?
Nope. Bitkeeper used it in the master-slave pairing and the term was carried forward. Gitlab did a whole writeup about it.
.gitattributes can invoke Word on windows to diff versions, and there are plenty of open source scripts that can do it if you don’t have a copy of Word (or Windows) lying around.
But Word is like shit for papers. Use LaTeX instead.
Older C compilers would truncate a variable name if it was too long, so VeryLongGlobalConstantInsideALibraryInSeconds
might accidentally collide with VeryLongGlobalConstantInsideALibraryInMinutes
.
Legend says that they used to do it after a single letter with Dennis declaring “26 variables ought to be enough for anyone”.
One upvote is not enough.
I once wrote a commit message the length of a full blog post comparing 10 different alternatives for micro optimization, with benchmarks and more. The diff itself was ten lines. Shaved around 4% off the hot path (based on a sampling profiler that ran over the weekend).