Bad Code Is Good

preview_player
Показать описание
As I've hired more engineers I've noticed that many especially more senior engineers struggle to write code that's "bad".

The point of this video is that sometimes writing hacky code is not just necessary but the actual best solution for the problem a developer or company is faced with.

I took kinda a new editing direction with this. I hope you like it :)
Рекомендации по теме
Комментарии
Автор

this aged very well over the span of a few hours

clrk_sh
Автор

"poorly abstracted" - I would definitely take "not abstracted" over that! Code with a lack of abstractions, i.e. very procedural and lots of repetitive code, that's the best "bad code" in my experience. When the time comes, it's so easy to sail through that code and create very good abstractions based on the information the code is presenting to you.

Автор

"Not over engineered" != "Bad code"

But we agree on the core principle: Unjustified complexity is a bad thing

manuszmark
Автор

Very agree- no point in building an api system with a hyper-accurate token bucket if the whole thing is in-house and called a grand total of once in the code.

BattyBest
Автор

To everybody commenting, "Worst timing, lol!" The target audience for this video obviously isn't people writing kernel-level security software that powers half the internet.

It's for the 15 person agency that will get 3 chat requests per day, that will never scale to need millions of concurrent requests, and if they do, that's a very good problem for them to have (and at that point they can throw money and developers at the problem).

theguitarslinger
Автор

This is the worst timed video of the year

hippopperbear
Автор

I think a better term will be "Imperfect code". Bad code gives negative vibes, such as "if you change this code, the app crashes for some weird reasons".

Often times we waste time by perfecting our code, which hinders us from building something meaningful. The opposite is to write really convoluted and obfuscated code. It may help you in achieving your short-term goals but it may not be long before you regret it when management starts to question why every minor UI change takes a few days to complete. Only experience helps you decide the best trade-off.

SufianBabri
Автор

This aged like milk in like a day. You: ah yes write bad code... bad code: takes down half the internet with bluescreens.

dylsplazy
Автор

A developer at CrowdStrike took your advice.

BobKane-gx
Автор

recommended aboutt to go wild with this one

liylaliyla
Автор

The simplest, dumbest code that gets the job done is the best imo

taylorallred
Автор

I agree with the sentiment, but I think you’re describing is “mediocre code”.

Bad code is often over engineered, where the wrong tools have been used and is broken with lots of barely understood edge cases. It’s code that provides negative business value over time.

oscarfriberg
Автор

"yeah so we're going to deploy a scalable sharded database over several kubernetes clusters with multiple caches for performance"
"dude we are storing literally fifteen kilobytes of data here. why"

ShadowKestrel
Автор

Thank you for inspiring me to code more and i have realised when errors occurs i am able to sort the errors and this makes me feel that today i have learnt something new.😊

bhavanimantur
Автор

As I've evolved my programming skills, I have noticed that the more organized I develop my systems, the easier it is for mantaining them. The only situation where "bad code" was a proper choice, was in situations where the codebase was already bad and I had to make some weird hacks to deliver a feature.

In the end, a bad code is just... bad. There is a minimum quality threshold that you need to achieve, simple stuff, that's enough. You don't need to make a masterpiece, just don't commit any programming crimes..

gustavosalmeron
Автор

Here's some nuggets
- stay away from fancy data structures if you can just use a hashmap
- try forming your code as a long recipe where immutable things are created and consumed
- break out functions and classes very late, maybe never
- add validation and types at the edges of your interface (input and output) and don't worry about the middle (if it doesn't mutate things or interact with the outside world)

You should think of useful code as a little factory conveyor belt with machines along it doing meaningful changes to the end product.

nathanfranck
Автор

So you’re the one who inspired the the intern who pushed bad code from crowdstrike!!! 😮





Jk 😂

yosephalabdulwahab
Автор

Great video; my philosophy is as long as you write tests, we can always come back to it later and make it better if needed.

stefnirk
Автор

So many people mindlessly commenting about this aging like milk due to the Crowd-strike bug. What you are suggesting does not align with what happened at crowd-strike.

indianjitsingh
Автор

i think it might be better if the “bad code” is quoted. 😀

CattenLinger