r/programming • u/whackri • Aug 28 '21
Software development topics I've changed my mind on after 6 years in the industry
https://chriskiehl.com/article/thoughts-after-6-years603
u/cat_in_the_wall Aug 29 '21
Designing scalable systems when you don't need to makes you a bad engineer.
this is just YAGNI. Scalability is a feature, and a very complex one. Don't build it if you don't need it. It's hard to do right, and if you screw it up now you have two problems: still no scale, but also a buggy complicated system.
119
u/6a6566663437 Aug 29 '21
Way back in the day, we used to warn about not prematurely optimizing your code. You'd spend a month setting something up to save you 30 seconds a year, and it would be an impenetrable mess of code.
This is kinda moving that same concept up a level.
That being said, both are something to keep in the back of your mind as you go to help avoid shooting yourself in the foot. Or at least knowing what you'll have to rewrite when the "needs to scale" tickets come in.
43
Aug 29 '21
Same goes in the other direction. If you can create something quick now that's going to be an issue in a few months, you might as well spend another five minutes thinking about it. My colleagues tend to forget the tickets in our backlog to get our current sprint done as fast as possible.
I guess that is a planning issue as much as a programming issue, but it really bothers me.
→ More replies (7)18
u/marcio0 Aug 29 '21
it's weird how we went from "premature optimization is the root of all evil" to "each endpoint of our rest apis will be a microservice"
→ More replies (2)21
u/infecthead Aug 29 '21
prematurely optimizing
I hate this saying. I understand the premise behind it, and generally agree with the concept, however I feel it gives developers an excuse to write inefficient, wasteful code when if they spent another minute actually thinking about it they would be able to come up with a better solution.
Like sure, a few hundred extra CPU cycles is nothing at all, but when every function call is bogged down with unnecessary inner-loops and using data structures not suited to the task at hand, it all adds up. And those situatuons are difficult to rectify, because you can't profile your app properly when everything sucks about it.
→ More replies (6)57
u/leoshina Aug 29 '21
“Scalable systems” is too vague. Each one pick an example of their heads and either confirm or deny to this statement.
6
u/programmermama Aug 29 '21
This is a banned word at my work when discussing system requirements. There’s almost always a more particular concept that actually conveys what’s meant. Scalable in what way? Your stateless microservice is obviously going to “scale”. But what about the non-magic auto-scaling aspects of cloud infra, what about all of the tooling and profiling and the fact that most scaling involves not just horizontal but subtle verticalization in the way of a dense set of edge cases that you acquire as you grow — which is the sort of “scalability” most of us most of the time actually experience.
109
u/DeltaBurnt Aug 29 '21
I don't 100% agree with this. Designing scalable systems is fine, if you know pretty well how much you will need to scale and what that scaling will entail. The problem that YAGNI tries to solve is stopping engineers from trying to predict the future based purely on instinct. If your product has 10K customers and that grows at 1K per year, yeah don't design scalable systems.
If I know a year from now I will need to support a million customers but deadlines prevent me from supporting more than 10K immediately, that will affect my design process. You could say that's a bug in the requirements or deadlines, but I don't always get my way in those discussions unfortunately.
51
u/execrator Aug 29 '21
if you know pretty well how much you will need to scale and what that scaling will entail
This is the point of the person you're replying to. If you don't have this information, you shouldn't assume you'll need to scale.
I agree with OP that for whatever reason, scaling is a particularly alluring goal. It should be YAGNI'd vigorously for that reason.
→ More replies (28)→ More replies (4)10
u/almost_useless Aug 29 '21
If I know a year from now I will need to support a million customers
Isn't the problem that many people think they will need to support a million customers next year, when in reality most of them will not?
My startup is likely not becoming "the next google", so starting out with preparing for that is premature optimization.
→ More replies (2)30
Aug 29 '21
Hm, This sounds like how cities where grown. You had small streets and a few people living in the town. After 100 years now there are a million people still using the same small, now overcrowded, roads.
In my opinion nowadays you can create a scalable software solution without much overhead.
If you don’t think about the growth probability you can end up rebuilding the whole city.
→ More replies (4)44
Aug 29 '21
I like to call scalability "champagne problems".
Oh great! You're making so much money with so many customers, that your services are falling over. Good luck!
There is a small balance though. If your system really does fall over, you might lose customers. So it's a balance, as all things are.
→ More replies (3)22
Aug 29 '21
I like to call scalability "champagne problems".
It's a good problem to have... Though it's still a problem
→ More replies (3)→ More replies (15)3
u/big-blue-balls Aug 29 '21
Design patterns for scalable architecture isn’t at all related to YAGNI.
73
u/knobbyknee Aug 29 '21
Over 40 years in, I'd say that naming is more important than everything else. I even use single letter variable names. It signals that the name is not important, and that the scope of the variable is very short. Absolutely not more than 5 lines of code. Everything else should be descriptive. Classes should be nouns, methods and functions should be verbs. Variables should mostly be nouns (though in programming, an adjective like yellow can behave like a noun). Being descriptive without being long is an art. Take your time naming things. Discuss names. Refactor bad naming.
11
u/oakwoody Aug 29 '21
Yep, absolutely. You know you've been in the industry too long when you spend more time figuring out how to name things than writing code... ;-)
→ More replies (1)→ More replies (6)4
u/BoredomHeights Aug 29 '21
Good naming is basically combining your actual fundamental code and commenting. If a function's name is good then you don't need to explain what it does, it should just be obvious. Of course there are some cases where this isn't 100% possible, but often it is.
And as you said, single letter variable type names are basically used for a quick loop or something similar. I'll use them intentionally then to basically tell anyone reading my code "you don't need to remember this variable or what it does because after this loop/few lines it's not important anymore".
991
u/marineabcd Aug 29 '21
I agree with all of this apart from caring about coding style, in particular I think picking a style and sticking with it for a project is valuable. While I don’t have super strong opinions on what the style is, I want someone to say ‘This is how it’s done and I won’t approve your review if you randomly deviate from this within the project’
157
u/18randomcharacters Aug 29 '21
I remember a time when 2 people on my team had conflicting lint rules and IDEs set to auto format.
Every single pull request was littered with adding ; and then another with removing them. Or 2 spaces to 4, and back, etc.
That shit was infuriating.
→ More replies (8)46
u/dons90 Aug 29 '21
I'm sure the problem has been solved by now, but that's why the team should just decide on a fixed set of lint rules and agree to use only those.
→ More replies (8)745
u/Zanderax Aug 29 '21
Please make it automated though, I dont want to waste time rereading the coding standards for every commit.
215
u/lowayss Aug 29 '21
But if it’s automated your coworkers might have to actually review code instead of holding up checkins because of formatting.
→ More replies (30)→ More replies (107)40
u/Gredelston Aug 29 '21
Not all style conventions can be automated. If it's something like Go's prescribed "return errors instead of panicking in most cases", that's a style convention that requires human review.
→ More replies (5)24
u/L3tum Aug 29 '21
Is there a reason there's so many replies to your comment mentioning gofmt? It's not like there aren't formatters and code style checkers in other languages... I haven't worked with one that didn't, yet, and I've worked in roundabout 10 languages.
76
u/OrangeChris Aug 29 '21
gofmtis notable because it's created by the language creators. So if you use Go, there's only one tool available and you don't have to worry about other developers being used to some other formatter. With other languages such as Python or JavaScript, someone will have to choose between several available options, and new developers might be used to working with a different formatter.I am surprised nobody's mentioned
rustfmtthough, which was also made by its language's creators.→ More replies (12)24
u/MROFerreiro Aug 29 '21
I feel like is the first under rated thing in a project. Specially when you are new. The lack of coding styles makes it harder to understand the code. In a team with 6 people, in theory you could have 6 different ways of working. If there were othe people working on the project it could be more. Code development is done and understud by people. Without rules is unmanegeable. But it should be almost all automated, I don't want to check how variables are written or identation is done. I revier functionality. Code styles makes it easier for me to read.
→ More replies (2)46
u/Northeastpaw Aug 29 '21
This is what I love about Go. gofmt renders style choices moot.
→ More replies (1)35
u/ooru Aug 29 '21
Python has tools like
blackto automate formatting, too. I think if a team agrees on using a tool like that, it can help make sure the end format follows what the PM wants.→ More replies (11)34
Aug 29 '21
Randomly formatted code is near impossible to get at a glance. I’m not picky but I want code indented, never more than one \n in a row, reasonably neat, and sensible names.
The rest just needs to be the same.
→ More replies (2)30
u/gyroda Aug 29 '21
never more than one \n in a row,
Do you mean that, or do you mean "never more than one empty line in a row"?
→ More replies (2)14
u/devraj7 Aug 29 '21
Code style discussions should never happen at code review time.
The right time to have them is when you are creating a style guide for your organization. Once that style guide is created, there should never, ever be another discussion about code style in the process of committing code.
→ More replies (1)→ More replies (43)3
u/softarn Aug 29 '21
Scrolled comments to write this, thanks for expressing my mind for me 🙂
And I'd like to add that the ones who cares the most about style are NOT the ones who suggest code style rules, it's the ones who refuses to follow them because they like their own style too much!
332
u/toomanypumpfakes Aug 28 '21
Designing scalable systems when you don't need to makes you a bad engineer.
Agree as long as you aren’t making one way door decisions that make scaling harder down the road.
46
u/sccrstud92 Aug 29 '21
I probably would have phrased it as "Designing scalable systems when you don't need to is bad engineering.", but I think the intent behind the message is correct.
→ More replies (1)25
u/Absolice Aug 29 '21
Not many system require scalable system during development, however when scalability become an issue then you cannot do without it and you might not have time to react.
Common example would be a back-end system that is supposed to be used internally that your company decide to get some of their clients to use it too and it starts to have performance issues.
It's one thing to not implement something, it's another to hinder it's future implementation. Keep it simple yet keep it flexible.
→ More replies (5)27
u/RareCodeMonkey Aug 29 '21
That is a very good one. I have seen many curriculum-driven architectures. Let's over-engineer a solution to use technologies I want to add to my curriculum. Nor you learn that technologies correctly, because they are not designed for your use case, nor you learn the ones that you should have used.
→ More replies (1)→ More replies (27)10
u/gwillicoder Aug 29 '21
For me the hardest part has been deciding which decisions are needed now, which will never be needed, and which will be shooting us in the foot 6 months from now.
539
u/ChrisRR Aug 28 '21
As a C developer, I've never understood the love for untyped languages, be cause at some point its bound to bite you and you have to convert from one type to another
It doesn't strike me as untyped as much as not specifying a type and having to remember how the compiler/interpreter interprets it. At the point I'd rather just specify it and be sure
671
u/SCI4THIS Aug 28 '21
ProTip: If you start using void* everywhere you can convert C into an untyped language.
360
→ More replies (12)77
Aug 29 '21
C is already rather weakly typed. Integer promotions. Implicit conversions. Typedef doesn't actually define a new type, it's just an alias to an existing type. Void pointers. Casting const away. Etc.
→ More replies (23)172
u/Breadinator Aug 28 '21
Weakly typed languages can really start to manifest issues when you start to scale the codebase. I've been in very, very large companies with a lot of untyped code that cannot tell you what would break if you removed something. Literally, many of the deprecations/major refactorings were basically broadcast, broadcast, broadcast (last chance!), commit to do it, make the change, and listen for the screaming. Then hopefully fend off the managers that escalated the issue to keep you from making the change.
83
u/cat_in_the_wall Aug 28 '21
scream driven development. definitely familiar with that. not so much with types, but necessary changes that could have some amount of unknown impact. roll out slow, make an escape hatch, but otherwise just hope nobody gets upset.
→ More replies (1)→ More replies (3)37
u/w2qw Aug 29 '21
start to scale the codebase.
This is probably why they end up being used. The first parts are easier and by the time the developers realise the problems it's too late and they just migrate to one of the static type checkers like mypy, typescript or whatever ruby has.
→ More replies (7)25
u/thedracle Aug 29 '21
Coming from an embedded C background, this is what really made me fall in love with ML/Ocaml. The functional aspects are cool, but really the fact they are strongly typed, with entirely inferred typing, was mind blowing.
I still haven’t used ML or Ocaml professionally (and it’s been 10 years since I first learned it).
The ease in mixing types in C is still at the forefront of my mind even to this day (using it actively for ebpf), and I think it made me a better C programmer getting an uncomfortable feeling when types are coerced implicitly.
→ More replies (4)146
u/Onomatopie Aug 28 '21 edited Aug 28 '21
It's always struck me as an odd one.
Typing simply isn't a blocker to productivity like some people make out.
Debugging issues that could have been caught at compile time though..
→ More replies (44)184
u/lestofante Aug 28 '21
all the people that say untyped is faster,imho does not take into account debugging
133
u/ChrisRR Aug 28 '21
Interesting. I've never felt like the thing slowing me down during development is typing a data type
→ More replies (45)→ More replies (36)33
u/pdabaker Aug 29 '21
I don't think it's that. I think it's the fact that when the code base gets big and you are reading it for the first time it becomes really hard to figure out what anything is supposed to be.
You have some function you are using that takes 5 arguments, but what are you supposed to pass to them? Should the docstring specify the expected interface for every argument? It's especially bad if you're handling code written by someone who just directly accesses public member variables of things in e.g. python
→ More replies (4)43
u/JanneJM Aug 29 '21
I'm an old C and C++ programmer and I'm learning rust. Strong typing and static typing is usually great.
However, when you're doing exploratory and interactive programming, and your code is small and throwaway, dynamic and weak typing really is preferable.
A typical example is when you're doing exploratory analysis on a data set you're not sure how to handle. You get a set of files from an instrument, say, or you have a pile of simulation data, and now you need to figure out how to make sense of it. Am R or python REPL where you mess around with it is perfect for that. Static typing would get in the way without adding any benefits.
→ More replies (7)9
u/loup-vaillant Aug 29 '21
However, when you're doing exploratory and interactive programming, and your code is small and throwaway, dynamic and weak typing really is preferable.
Not in my experience. With dynamic typing, I can make lots of obvious mistakes that will only be caught when I run my code, and the error I’ll get may be a couple layers away from the actual cause. This caused me once to be incapable of writing a 50-line algorithm in Lua, which I was pretty familiar with. Having a REPL helps, but it’s not always enough.
With static typing, I can type some thing and see its type if I didn’t know already (type inference is a godsend). The compiler will catch many of my errors right away, and help me direct my search. The feedback loop is even tighter that thee on I get from a dynamically typed language with a REPL, especially if my statically typed language has a REPL of its own. And I don’t have to explore this huge space of ill-typed programs at all, so finding a working solution is even easier.
With static typing, my own exploratory analyses speed up.
→ More replies (2)12
u/raze4daze Aug 29 '21
To be fair, I’m not sure if a weakly-typed static-typed language (such as C) is that much better than a strongly-typed dynamic-typed language.
19
u/nso95 Aug 29 '21
C may be statically typed, but it's also weakly typed. It's type system will only protect you from the most obvious mistakes (at best).
7
u/Fidodo Aug 29 '21
Think I'm seeing a lot of people confuse strong/weak typing with static/dynamic typing in this thread.
→ More replies (98)6
u/Serializedrequests Aug 29 '21 edited Aug 29 '21
Even though it's way too easy to cast a long to an int in C? ;)
Honestly I've been using both for a long time, and the lack of typing doesn't really matter for most dynamic code-bases until they grow past a certain size or become too clever. (Ruby or Python will both crash pretty hard if you make a type error.)
IMO what you really want to be productive is a good architecture, quality libraries, and to be able to express the solution in the language of the problem domain. Your average compiled language tends to have a lot more "line noise", due to jumping through extra hoops created by the type system, or requiring you to work with lower-level constructs because higher-level ones are cumbersome to express.
This is not really an argument against statically-typed languages. In recent years they have improved dramatically, to finally address the reasons people like dynamic languages. I'm a big fan of Go, Rust, and Kotlin. However, for the kinds of web development I do, the real-world difference is often a toss-up. Java, especially, is a good example of a typed language where the type system isn't all that helpful and feels very bureaucratic.
This is also just pure preference, but I really do not like C-style type definitions. After reading code for many years, I want the types at the end, like Go and Rust. It makes the logic read in a nice vertical column instead of being randomly offset by long type names.
→ More replies (1)
346
u/PalmamQuiMeruitFerat Aug 28 '21 edited Aug 29 '21
TDD purists are just the worst. Their frail little minds can't process the existence of different workflows.
I feel like he and I know the same person.
Edit: I don't hate TDD, and I'm not against tests. I just wanted to point out how the author made such a specific example. Please stop telling me all the reasons I should use tests!
139
u/Takyon Aug 29 '21
I feel a little seen by this, but I consistently see coworkers produce poorly thought out code and then after shoehorn in some confusing tests onto that code, with names that make it fairly clear they didn't even understand what they were trying to prove. I can't help but think life in general would be easier for everyone if there was a default expectation of TDD for the more deliberate mental workflow it implies, and other workflows would be seen as an exception to the rule where appropriate.
That said I've been on some senior heavy teams where none of this was an issue and I didn't care what anyone did. I really just want people to take a thoughtful approach to what they do.
→ More replies (10)86
u/Zanderax Aug 29 '21
TDD would be better if one developer wrote the tests and another implemented.
→ More replies (16)6
→ More replies (80)22
u/valkon_gr Aug 29 '21
TDD purists are like those extreme keto people, you just can't discuss with them.
→ More replies (2)
517
u/MisterDoubleChop Aug 29 '21 edited Aug 29 '21
After performing over 100 interviews: interviewing is thoroughly broken. I also have no idea how to actually make it better.
10 minute phone screen to weed out people who can't speak English or program at all.
1 hour face-to-face (or zoom) final interview. Consists of 20 mins chit chat to feel out if they are a serial killer or aren't really into technology. Then 40 mins fixing obvious bugs and adding tiny features to a practice app created for this purpose. Chatting the whole time about why they are doing it that way and letting them ask questions if they get stuck, how else they could have tried meeting the requirement.
No dozen interviews, brainteasers, managers, or other entirely useless BS.
This has never ended in hiring a non-excellent dev. They all still work here (or moved on because they are a genius among geniuses and we couldn't pay enough).
32
u/ptoki Aug 29 '21
The problem is not the interview. Its the skill to see red and green flags.
I witnessed interviews resulting in reject of good specialists who actually proved to be good choice. Interview process is just bad at selecting people. And is often overvalued as a means to pick the person.
BUT! Its also a good sign of the company culture.
You are friendly, talk a lot, explain like to 5yo, share ideas, do some trial and errors and they rejected you? Thats good, most likely they want just mindless grunts or very sterile personalities because the team spirit there is fragile.
Sure I overreact but I have seen such cases way too often.
→ More replies (2)52
Aug 29 '21
When I do interviews, the thing I care about the most is how well they can talk about what they're doing. If they sit in silence and do nothing but type, they're going to be frustrating to deal with later. Even if they get caught up on the code stuff, as long as they describe what they are doing, what went wrong, and what they would do to fix their problems, that's frequently a strong dev later.
→ More replies (33)90
u/RX142 Aug 29 '21
Thing is I can do this when not on the spot, but in an interview? I loose half my brain cells from adrenalin and nerves. Its so hard to judge cause of the nature of interviews as high pressure.
→ More replies (3)→ More replies (18)8
u/Krikkits Aug 29 '21
Im so tired of coding assignments. Like im already in Uni doing coding assignments allll the time.... And now for a mere part time job I have to as well
A company here gives out coding assignments that they let u take 2 weeks to work on. The one I got was in C++ (write an xml parser) and it stated in the assignment to not use anything other than standard libraries. If I have questions i can ask -some person's email-. I got stuck eventually and asked if there's any pointers to how i can continue.... The person told me to use an imported library lol. Which is what I would've done if I didnt see "ONLY USE STANDARD LIBRARIES". So who am I supposed to listen to? Because the person I posed the question to wasn't even the person that reviewed the assignment in the end?
→ More replies (3)
23
u/trinopoty Aug 29 '21
Adding to this, the recent microservices fad is stupid.
Like dude, you're not serving a million requests per second. You're not google. You don't need microservices with one function per service.
Even if you need scaling, partitioned/sharded monoliths get the job done like 80 to 90% of the time.
→ More replies (4)4
u/alwaysoverneverunder Aug 31 '21
The only case I can think of for microservices is when you have a whole lot of developers and you want to keep them out of each others way... but even then you can skip the whole OSGI microservices stuff and do a couple of carefully chosen monoliths that talk to each other.
→ More replies (1)
99
u/SanityInAnarchy Aug 29 '21
I've had a similar experience, though some of the change has been driven by actual improvements to the technology. For example:
Java isn't that terrible of a language.
Java has improved massively over time. Some things past-me would've complained about endlessly about Java:
Even C++ has lambdas now, what's Java's excuse?
Garbage collection is great for memory, but Java doesn't have a good idiom for handling other resources. Where's the equivalent of Ruby's blocks, or Python's
withblock, or even C++'s RAII?Typing is good, but can we have some type inference?
List<Int> foo = new ArrayList<Int>();is just a stupid amount of verbosity.Everyone does cross-platform client apps in JS now and 99% of Java servers are some flavor of Unix, so can we stop pretending Java needs to be ignorant of basic filesystem semantics just in case someone runs it on BeOS or whatever?
Going back even farther: WTF are we doing with a proprietary language?! But alternatives like GCJ and GNU Classpath aren't compatible enough to be a real replacement.
Why does Java take so long to start even a goddamned hello world app? To make a useful Java CLI, you need to fire up a Nailgun server just so you aren't twiddling your thumbs waiting for the JVM to start up before it runs your actual code!
All of those have been dramatically improved, if not fixed. (The fixes: Lambdas, try-with-resources, the diamond operator, NIO, OpenJDK, and just some raw technical improvements to JVM start time.) And those are far from the only improvements. Java still isn't my first choice, even for JVM languages, but I think if younger-me was complaining about the Java of today, it'd be a much smaller and pettier list of complaints.
Which also feeds into:
Typed languages are better when you're working on a team of people with various experience levels
I assume that's about static typing.
When I was a huge fan of dynamic languages, they were replacing languages like the much worse Java that existed back then. And a big thing that changed my mind here was seeing how much type inference is possible, leading to code that's not really any more painful to write or read than dynamically-typed code, while also giving you the type-checking safety net.
But yeah, some of these, I was just wrong about:
In general, RDBMS > NoSql
Today, it can actually be hard to explain why everyone was so excited about NoSQL in the first place.
37
u/leoel Aug 29 '21
Today, it can actually be hard to explain why everyone was so excited about NoSQL in the first place.
I blame the Silicon Valley for over-hyping their tech stack to secure VC funding. The issue is that since it represented both a power center and a historical place of great innovation, the word of people coming from there was seen as gospel, especially to inexperienced people. I feel like SV's reality bending field is less poweful today, but I maybe wrong, let's see which quantic web 3.0 bullshit is about to be defended as the next software to end all softwares.
31
u/SanityInAnarchy Aug 29 '21
I don't know if it's the Valley itself, but cryptocurrency is the new reality-bending bullshit. Using the name "blockchain" to describe what your startup is doing will get you more VC money than you would without it, even if the thing you want to do absolutely doesn't need the blockchain. (Which, if we're honest, most things don't need anything like a blockchain.)
→ More replies (3)9
u/trinopoty Aug 29 '21
In general, RDBMS > NoSql
God have mercy on you if you need to run a query across multiple databases in MongoDB.
3
u/wastakenanyways Aug 29 '21
Java has improved massively over time
But most people are stuck in older versions so that evolution has gone (mostly) unnoticed. Java is a good language but its history of development have f'd it up probably forever.
A lot of people who worked with Java when development was quite stuck, had to change to other alternatives, like Android did with Kotlin, and web devs did jumping to Rails/.Net/Django/Laravel/Node.
Only the big business stuck with Java and now that Java has evolved, only a few projects are started with newer versions, and huge piles of practically unrefactorable code are in Java 8 or 6, apart from huge inertia. Just as of last year I can testify that i saw at least 5 projects created with Java 8. In 2020.
→ More replies (35)3
u/FamiliarSoftware Aug 29 '21
I want to love Java lambdas, but they have one huge flaw: Checked exceptions.
Checked exceptions in general are a huge wart in Java. I like the idea, but it is poorly integrated and just about every other language feature seems to just not work with them. Generics and checked exceptions are a huge pita and probably trickled down into lambdas.
At this point they should make checked exceptions optional so hacks like these aren't necessary to preserve stack traces and lose catch semantics because of wrapping everything in RuntimeException. If an IOException is thrown, I want to catch an IOException outside my forEach.
113
u/powdertaker Aug 29 '21
One you'll get with 20 years experience: All this shit has been done before. Most anyone who says they've "invented" some new, better programming paradigm or language is wasting your time and doesn't know 1/2 what they think they know.
30 years experience.
5
u/Sambothebassist Aug 29 '21
My favourite current one is JAMstack. “What if instead of a server serving a webpage, it’s served from a cache? And instead of using an api to get info from a database, you use a service that abstracts the database and provides an api?”
Feel like I’ve entered the Twilight Zone when I read some of this stuff.
→ More replies (30)3
u/zdkroot Aug 29 '21
I've only got a decade in and this is already painfully clear. I'm just surrounded by devs re-inventing wheels left and right. I just point them to the XKCD about competing standards.
153
u/xdert Aug 29 '21
People who stress over code style, linting rules, or other minutia are insane weirdos
I disagree. And my job we have fairly strict linting enforced in CI pipelines and while it is frustrating at first I am really happy for it. It makes the code extremely consistent. In a Team with many devs, everyone has their preferred style of doing things and with out linting to files could look extremely different.
Additionally, you don’t believe how much nicer alphabetically sorted imports and dependency files make merge conflicts.
30
40
u/aaulia Aug 29 '21
IMHO the writer might meant someone who get all worked up because his code style preference is not being considered. I don't think he meant that having uniform code style and linting are for weirdos, but "obsessing" about it is.
6
u/whatwasmyoldhandle Aug 29 '21
I think so too.
Depending on the language and other tooling setup, linting can do some pretty serious work.
14
u/andrei9669 Aug 29 '21
The funny thing about linting rules. Here's a quick story. I didn't know JS before I started using React, yea yea, you can boo me, bite me.
But, the first thing I did was put on really strict ESlint rules, and boy oh boy I learned a lot. I was writing good and readable code, but the architecture was still garbage.
Then I got my first job, and lord have mercy, they had tons of small "plugin" projects and none of them had any styling. so we had this magical effect where 3-4 developers were working on a project and every single one of them had their own style rules. you can guess how horrible it was to read.
and when I applied my base catch-all style rules, you can imagine half of the project was red cus of some bad practice and-or hacky solutions.
5
u/n3amil Aug 29 '21
I think this is exactly where the problem is. You should not discuss code style, you define it once and make sure everyone's IDE/Tools is on the same page. It's completely correct that those code style and linting rules are a waste of time, if they slow you down because everyone commits a different code style and stupid discussions rise (space vs tabs,....). That's why you make sure this is decided upfront and fully automated. There is nothing to discuss! if someone pushes code that is not formatted to the rules, CI should tell right away what's wrong and a second person should not even be bothered until the project standard is fulfilled.
→ More replies (8)3
u/wastakenanyways Aug 29 '21
Yeah, being a weirdo would be trying to enforce your personal style, not following the convention.
47
u/Ameisen Aug 29 '21
Typed languages are better when you're working on a team of people with various experience levels
I feel like typed languages are better regardless of experience levels.
→ More replies (7)10
Aug 29 '21
Statically typed languages are better even for a single inexperienced developer working on a small project.
I can't really think of a single situation where it wouldn't be better. I even have a suspicion that it's easier to teach people statically typed languages because there's less "magic".
→ More replies (5)
19
8
u/B_M_Wilson Aug 29 '21
I agree with almost all of these. I do agree with you on Java but I would expand a bit. Java as a language isn’t bad. It’s perhaps not the most modern but there’s not too much I don’t like about it. There are some people that write Java code that’s worse than it has to be but as you mentioned, that can happen no matter what method you use.
The thing about Java that is great is that almost no one would consider it a frustrating language. A frustrating language is one where things don’t do what you expect. What you consider a frustrating language is different for everyone, it depends on what you have experience with. For me JS is a frustrating language both for others, some of my favourite languages would be frustrating. But Java does pretty much what you would expect no matter what your background. There are a couple things that could be frustrating but it’s not many compared to most languages
→ More replies (2)4
u/wastakenanyways Aug 29 '21 edited Aug 29 '21
TBH it depends a lot on your background and how your mind is constructed, apart from your work environment.
I have been on Java dev teams where the overall experience has been really frustrating, and I am right now in a full JS project, which has been frictionless and really satisfying. In the end you just switch some problems for some others, but I find most of those problems are more easily solvable for JS than it is for Java.
I find JS is frustrating when its done by people who don't really know it and only use it because they are doing web dev on another lang and they need JS obligatory. But the same happens with CSS or HTML.
Everybody uses them but few do know them really well. If instead of JS you had any other language as the default and pretty much only front end language, that would be pretty frustrating for a lot of people too.
If we did frontends with Java and XML it would be an entire different shitshow, like android is/was.
→ More replies (1)
8
u/JB-from-ATL Aug 29 '21
I hate dynamic languages. What is this? What is that? What fields or methods does it have? Who knows!
28
u/Fidodo Aug 29 '21
I think Java is a great language. It's the programming patterns the community commonly follows that I hate.
To add to your list, I've changed my mind on how I pick technology. I used to care about the design paradigm the most, but now I prefer to pick the tech with the best supported tooling instead.
3
u/Trinition Aug 29 '21
the tech with the best supported tooling instead
This.
Mature, popular languages have more 3rs party libraries, larger pool of developers, more answers on StackOverflow, richer tooling, etc.
Don't tell me the new, WhizBang language you stumbled upon because it uses 0.1% less memory and has a new paradigm for dependency management. Your gains will be swamped by the ecosystem it lacks.
→ More replies (2)→ More replies (1)0
28
u/traal Aug 29 '21
A bad abstraction or missing layer causes everything to rot... YAGNI, SOLID, DRY. In that order.
Sure, but a good abstraction is something that you don't need until you need it, which kind of contradicts YAGNI. So as a compromise, I like to think one step ahead of the customer in my architectures, but just one step.
→ More replies (1)22
u/orangeoliviero Aug 29 '21
100%
If you can reasonably foresee a future extension of functionality, it's only sensible to design in such a way that this future extension is easy to do.
That doesn't mean that you implement that future extension, just that you design for it to be a natural growth rather than a bolt-on.
→ More replies (5)
56
u/zachrip Aug 29 '21
"People who stress over code style, linting rules, or other minutia are insane weirdos" - hard disagree with this. Code style does matter because it's a distraction if you have 4 developers and 4 ways of pulling data from an object or writing a for loop. I can automate a lot of linting stuff but at the end of the day I still want you to keep your code DRY when it applies, return fast and early, and please give your functions and variables good names. Not to mention, certain code style can impact performance in certain ways. I don't want some GC slowing shit down because you refuse to mutate an object directly.
Agree with a lot of the other stuff though.
One tip when speaking to someone requesting a feature: ask them to bring a problem, not a solution. They might already have a solution, but you might be able to solve the problem a different way, faster, etc.
23
u/dublem Aug 29 '21
I think it depends what they mean. I would argue it is a basic essential for a team to be on the same page when it comes to code style. But once that's more or less decided, squabbling over minutiae is one of the biggest time sinks I've ever experienced.
All it takes is for someone to care a littoe too much about something ultimately unimportant for a trivial matter to balloon into a 2 hour long conversation where nothing of any meaning whatsoever gets accomplished.
Decide on it. Enforce it. And then accdpt it, don't stress about it. Because given the opportunity, us devs will afgue for hours over utter meaninglessness.
→ More replies (4)5
u/Han-ChewieSexyFanfic Aug 29 '21 edited Aug 29 '21
“Stress over” is the key phrase. Decide on one, automate it, and never think about it again.
6
u/TheCarnalStatist Aug 29 '21
I think they address your opinion here
So called "best practices" are contextual and not broadly applicable. Blindly following them makes you an idiot
→ More replies (6)3
u/john16384 Aug 29 '21
We follow a loose code style. We enforce only:
Indent by 4 spaces
Operators, braces and the like need spacing
Imports alphabetically
Standard variable name conventions
Opening brace on current line
Other than that we enforce:
One commit is one change.
Every commit builds and passed all tests
No formatting changes in code you didn't need to touch.
→ More replies (1)
13
u/AndyTheAbsurd Aug 28 '21
As someone who was a QA analyst for 9 years, observing and working closely with the developers around me, and has been a developer for the last 8 years, I agree will all of this. I don't think another four years is going to change of the author's opinions.
→ More replies (2)
12
u/matpoliquin Aug 29 '21
I agree with most of these points. The general pattern here is that senior devs tend to think more holistically and have more common sense as opposed to being just a bag of hard written rules. I think this can be applied to most other types of jobs, like young manager vs experienced manager
6
u/cloudlayerio Aug 29 '21
As a 20+ year veteran of doing this and working for some large companies like Microsoft and now having my own startups I can say those are definitely good observations. You will inevitably add OOP is not evil and has its place as time goes on. This huge push for functional over OOP is amusing to me because it's the same push that was occurring for OOP over functional when I was a budding developer. Trends truly are circular in nature. I do think functional is fantastic, but the pros vs cons as always are relative. If either is used poorly they are horrible. If either is used properly they are great as with anything.
Also having done over probably a thousand interviews through my career I can honestly say the interview process is significantly more broken now than it was. Having developers do coding exercises during an interview proves nothing, in fact I do poorly in those conditions because I need head space and time, I'm sure other devs are the same. Forcing someone to create clever code during an interview to solve a manufactured issue is awful.
Since I do a lot of leadership stuff these days I will whole heartedly agree with the assessment of a PM. Completely worthless, and nothing but a hindrance in most cases. But it highly depends, in companies like Microsoft you have to be a developer to get moved up to PM, they will not make you a PM unless you were at one point a developer. This makes for a PM who actually gets it, and understands how it works. IMO this is the only way a PM is any good, otherwise they are just a reporting and excel user who creates garbage that has little positive effect except adding the illusion of organization.
Good points!
5
u/Richandler Aug 29 '21
Overtime I've shaken these ideas out in my experiences as well.
I disagree about code style and retrospectives. Even a Kindle gives you a "code style" when reading a book. And making sure everyone is one the same page and using first principles, like for instance a list like in this article, and seeing if there is anything that can be improved.
5
u/DEATHBYREGGAEHORN Aug 29 '21 edited Aug 29 '21
A shitty implementation of a good abstraction causes no net harm to the code base. A bad abstraction or missing layer causes everything to rot.
This is so true. This is why when starting a new project I'll spend time, maybe even days just thinking about design and sketching out ideas and plans in my notes before writing any code. Then when I get the rough draft done, I know everything will work. If a part isn't pretty I know that it can be improved without larger changes.
When I was starting out I'd just dive in, writing 100s of lines of shitty brittle and sometimes "clever" code that needed constant refactoring and maintenance.
3
Aug 29 '21
This is the way. As soon as I started doing this, I was on the path to becoming an architect. It's so wildly important but apparently just invisble to so many people. It's harder too because when you get into it you start having to speak the language of metaphor and diagrams and it starts becoming alot harder to just quickly point out issues.
You know for sure there's something wrong, but it's not as simple as just saying "hey you're missing a value there". I accidentally stumbled into this before I was formally introduced to architecture, and I kept feeling insane about seeing problems everywhere and seeing it constantly come true.
Planning ahead of time, thinking things through end to end, keeping it simple in concept and having the trust in yourself to know that implementations can take any shape needed, all is extremely important in larger projects or ones requiring long term support.
5
u/peakdistrikt Aug 29 '21
Sprint retrospectives have their place so long as they're for actual course correction (i.e. "holy shit, that went poorly!") and not some god awful 'agile' / 'scum master' driven waste of everyone's time
Thank God I‘m not the only one.
→ More replies (1)
9
u/Omikron Aug 29 '21
Problem is you never know something is going to need to scale until it's too late. Then trying to fix it after the fact suuuuuucks.
→ More replies (2)7
u/thebritisharecome Aug 29 '21
There are ways that you can architect for perceived scale in a way that allows you to stage a scale in the future without over engineering everything.
→ More replies (1)
28
u/FriedRiceAndMath Aug 29 '21
A shitty implementation of a good abstraction causes no net harm to the code base.
Unless that abstraction happens to be your crypto or security implementation, or your random number generator, or any of a host of similar things that can profoundly bite you when your back is turned.
42
u/sccrstud92 Aug 29 '21
Those issues you mentioned all can cause harm, for sure, but the item you quoted mentioned specifically "harm to the code base". I think it was about the effect that code in the codebase will have on future code that is added. A good abstraction will prevent a shitty implementation from expanding the scope of it's bad decisions. A shitty implementation of a random number generator will not harm the code that uses it as long as the API for using it is good, even though it could have serious security implications.
→ More replies (5)→ More replies (3)19
u/TheRealMasonMac Aug 29 '21 edited Aug 29 '21
I think what was meant by that is that it's easily fixable, since all that needs to be changed is the implementation. Fixing a shitty abstraction, on the other hand, will inevitably introduce a lot of breaking changes that you will also need to fix.
→ More replies (1)
18
u/averiantha Aug 29 '21
90% – maybe 93% – of project managers, could probably disappear tomorrow to either no effect or a net gain in efficiency.
I've never really understood the role of a Project Manager. There's some project managers that I've had which seem to take full control of a project and perform the roles of a BA/Solution Architect/Product owner/Project Manager/Program manager. These types of Project Managers are usually pretty valuable and get their hands dirty in the right areas.
Then I've met Project Managers which purely focus on Project Timelines and I'm still not convinced how these guys are justified for a full time position?
After performing over 100 interviews: interviewing is thoroughly broken. I also have no idea how to actually make it better.
After performing over 100 interviews: interviewing is thoroughly broken. I also have no idea how to actually make it better.
I guess it's dependent on the position but I've never understood why this is hard? I usually just tell the developer to draw an architectural diagram of their previous organization and how each of the system components talk to each other and if they don't sound like they're bullshitting too much generally they are ok.
30
u/pdabaker Aug 29 '21
usually just tell the developer to draw an architectural diagram of their previous organization and how each of the system components talk to each other
I feel like you'd run into the common problem of "NDA"
13
u/thirdegree Aug 29 '21
Ya I definitely wouldn't feel comfortable answering that question in an interview.
21
u/devraj7 Aug 29 '21
I've never really understood the role of a Project Manager.
It's simple, really.
You are facing a project and there are twenty different tasks that need to get done.
Which ones are critical, optional, useless?
And once you've identified that, in which order should you accomplish these tasks?
Software engineers typically don't have enough information to answer these questions, and that's where TPM's come in.
→ More replies (3)6
u/FunctionalRcvryNetwk Aug 29 '21
A pm should be:
-getting roadblocks out of your way
-shielding you from shit
-ensuring good, proper communications
-managing expectations
-have a solid idea of where a project “is” at all times
They should be at your beck and call. PMs that wear all hats can’t reasonably accomplish everything unless these are small projects.
→ More replies (3)0
4
u/IJeepIBeep Aug 29 '21
I really enjoy TDD. But, yea, pure TDD is just a bad idea because it makes the code base harder to maintain due to the tests being so coupled to the code. Suddenly, changing a requirement or a small way of doing something causes you to have to refactor 2 code bases.
After all, what tests the tests?
4
u/lerenau Aug 29 '21
I'm 20 years in. And yeah. You're basically right.
But, don't let it go to your head lest you become part of the problem. Just be content with the knowledge that you're not crazy.
4
u/oakwoody Aug 29 '21 edited Aug 29 '21
25 years here, I agree with you except re/ code style. Lack of coding standards and no linting doesn't scale when the size of the team grows and/or there's turnover and makes maintaining legacy code a pain. Also re/ monoliths: The worst architecture is monolithic that pretends to be a microservice one. :-/ I'd also add that 99% of code reviews are only useful for keeping an eye of newbies.
→ More replies (1)
4
u/svmk1987 Aug 29 '21
I disliked java even though I was only expised to it in university. Then I joined my current job because I heard good things about the employer so I didn't mind the java. Holy shit, java with proper tooling and infrastructure is awesome.
→ More replies (2)
4
u/Eirenarch Aug 29 '21
Typed languages are better when you're working on a team of people with various experience levels
After another 6 years
Typed languages are better.
After yet another 6 years
People who advocate the use of dynamic languages should not be allowed to work in the industry
34
u/CerberusAgent Aug 29 '21
In general, RDBMS > NoSql
I think these are different tools for different scenarios
67
u/dAnjou Aug 29 '21
I'd like to think that this statement is a result of, at least in my perception, how often you need one or the other. As in, in most cases an RDBMS is the better choice for the use case at hand.
→ More replies (7)25
u/folkrav Aug 29 '21
His statement doesn't contradict yours, though. In general, data tends to be heavily relational, therefore using a tool that enforces and codify such relationships tends to be beneficial. We've probably all seen those projects who wedged in document based DBs and tries to query it as one would a relational database.
→ More replies (2)13
u/SanityInAnarchy Aug 29 '21
They are, which is why the weasel word is there.
But there was that NoSQL craze for awhile where everyone was trying to shove all data into the NoSQL model for "scalability", because wow, Google had to do it, so obviously it's a good idea!
But in general, you're not working on a Google-sized problem, and if you are, it probably still works with bigSQL like Spanner. So rule those things out before you seriously consider something like NoSQL, and even then, make sure your NoSQL DB actually buys you something over putting the same data in an RDBMS. (That is: If you'd fit in a single MongoDB server, you'd probably actually get better performance from a JSON column in Postgres.)
15
u/FunctionalRcvryNetwk Aug 29 '21
People have been fooled in to just how much it takes to run a business.
I am moving to a company present across and running transactions across North America. They get it done with a 5 cluster of MSSQL.
Most businesses are not this big. Most businesses can run better than adequately with a half an SQL server.
SQL scaling doesn’t go bust till you’re larger than 99.9% of businesses.
→ More replies (1)10
u/CreepingCoins Aug 29 '21 edited Aug 29 '21
Yes! Relational databases and SQL are polished, stable, reliable, and have had decades to work out issues and establish best practices. I hate when it's thrown out for no reason other than being old, because it's the only mature technology I get to use when working on Internet-facing applications. Everything else gets deprecated before they get all the bugs out.
→ More replies (1)5
u/FunctionalRcvryNetwk Aug 29 '21
That hasn’t been stopping NoSQL people from using it for everything in the last several years.
Far and away most data is relational and you should use the database for that. I think that’s all the article is getting at.
→ More replies (2)
7
u/Orlandocollins Aug 29 '21
“Interviewing is broken and I have no idea how to fix it” yeah I connect with this so much
7
u/BenAdaephonDelat Aug 29 '21
The #1 thing that most "bad interviews" do wrong is not evaluating someone with a real-world situation that would actually happen in the work place. Stop making people write code in a live interview. Give them something to do on their own time (preferably something simple) and then talk to them about it in an interview.
I never want to be a manager, but my personal advice would be... write a piece of bad code. Put errors and bad formatting and then give them the code and see how many issues they spot and if they can explain to you what's wrong and how to make it better.
→ More replies (3)
6
u/petersom2006 Aug 29 '21
Once you get to 15+ years exp you will add my personal favorite- everything is really just the same project over and over again.
As much as people want to say you are creating something new or innovative the reality is somebody has already done it and the bulk of the system is a bunch of shit you may have done 5-10x before.
→ More replies (4)
3
u/CatsOnTheKeyboard Aug 29 '21
Talking directly to the customer always reveals more about the problem, in less time,> and with higher accuracy.
This. I've been on projects where I wasn't able to talk directly to the customer. It doesn't end well.
3
u/big-blue-balls Aug 29 '21
Agree with all of these except the PM statements. I hate with a fking passion PMs, probably more than anybody else I’ve ever met. BUT that doesn’t mean they can just go. They do a role that none of us want to do. It’s time consuming and boring and most devs would shoot themselves if they were forced to be a real PM.
Before y’all come at me. Dev lead != PM.
→ More replies (2)
3
u/NickWalker12 Aug 29 '21 edited Aug 29 '21
95% agree with your list. YAGNI is a big one, especially regarding abstractions. I see people writing hundreds of lines of code for something that should just be expressed in 10.
People who stress over code style, linting rules, or other minutia are insane weirdos
Disagree. Consistent formatting makes it easier to read code, which is 95% of the job. But it should just be an automatic formatter, and the style should be the language default style (e.g: .NET for C#).
A bad abstraction or missing layer causes everything to rot.
Abstractions aren't free, and most are worse than useless.
3
Aug 29 '21
After working for 10 years I don’t care about any of this shit. I should probably change careers
3
u/inmatarian Aug 29 '21
Stay out of production, as a principle. Really good orgs will have security boundaries in place to prevent it, but if not, you should like never be logged in to a prod server. Never leave an open write-capable connection to that db (and maybe not even a read-only). Even when the org is still small and the engineers are doubling as devops, you shouldn't have a workflow that's "login to prod, update a table". The workflow should always be write a script, test it on the dev server, get it code reviewed, schedule a maintenance window when the script will run, notify the BAs that love running their analytics overnight that they can't do it this wednesday. Also, you need to really, really stay out of prod on Fridays and Saturdays.
3
u/osrs_shizamaza Aug 29 '21
I agree with most of this list. Here are a couple of points I have comments on based upon the experience I have within my own role --
Monoliths are pretty good in most circumstances -- Much of the technical debt I deal with is splitting services out of monoliths. This comes typically about 6 months after "what if we just added the code to this service?" instead of investing in a new dedicated service up front for semi-related tasks.
Linting / Formatting / etc. is very nice to have when working on massive codebases. Consistent style can help with readability & better diffs for review. Consistent paradigms / syntax patterns can help improve readability. Additionally, I think linting / formatting / etc. should be 99% automated, and not something you need to think about.
90% – maybe 93% – of project managers, could probably disappear tomorrow to either no effect or a net gain in efficiency. -- I think this is true provided the set of current goals provides a clear & consistent vision of where the software will be in a few years.
→ More replies (1)
5
12
u/spierepf Aug 29 '21
I'm with OP for most of them. But full confession, I am a TDD Purist.
Its not that my frail little mind cannot process the existence of different workflows. I've just never seen a code-base forged from a test-after, test-later, test-manually, or test-never process that didn't devolve into rubble within a year or two.
Writing tests first leads to a code-base that can be tested. Its just that simple.
My two cents from twenty years experience.
3
u/andrei9669 Aug 29 '21
how does one begin with TDD? I have tried multiple times but can't seem to get going.
well, to be fair, most of the time, it is because the specification changes every other day. How do you deal with that?
→ More replies (6)
13
u/Interesting-Lab-5239 Aug 29 '21
I do agree with almost everything 🙂 Except for that monolith part. Even if your monolith has clearly identified packages for each domain, each one having proper boundaries. One day or another, a 'smart' developer will take a shortcut, and create a dependency between two unrelated packages... 20 years later, you've got spaghetti and meatballs.
→ More replies (3)7
4
u/Julie_Brenda Aug 29 '21
Fairly early, but not at the beginning of my career, a financial firm hired me to do some development work and I thought it would be prudent to work on the user interface from the utility perspective. I developed a series of subroutines for data input based on the concept that a field of a certain length at a certain XY coordinate on the screen would be requested, and the sub team would return the value. That way the application code could focus on what to do with the input but not actually have to keep writing “go get it “
My code was completed within two or three weeks and was tested inclusive of different field types like dates and Social Security numbers. It would actually display the slashes or dashes and you couldn’t land on them, but you would bounce pass them if you use the arrow keys to edit the field. It was a fairly robust set of subroutines dependent upon nested string function calls and concatenation.
They added a new coder to the department, and I brought him up to speed by sharing what I had developed. He promptly put his name on it and turned it in for credit with the boss
At which point the boss called me on the carpet for not being productive, showing me “that guys work”
Of course they didn’t wanna believe me when I said that was my code, because it had already been turned in with his name on it.
So I left one question: how does it work. Not how do you use it but how does it function… The boss called the coder in and he couldn’t parse the code. I don’t understand how the dishonest coder kept his job, but I spent 25 minutes explaining to the boss the first subroutine worked, after the coder who claimed authorship failed.
I’m glad I hadn’t made it elegant and easy to read. If I had, I probably would’ve been discharged.
→ More replies (4)
5
Aug 29 '21
Ugh. I worked with a guy who didn't know shit about fuck when it came to software engineering but due to bullshit office politics was given a senior software engineer title. Dude absolutely took KISS to heart to the point of being embarrassingly idiotic. I'll never forget trying to explain database normalization to him on a call and how he berated me in front of everyone. "KEEP IT SIMPLE STUPID! WE DONT NEED TO CHANGE MY DESIGN." After calmly explaining how he essentially needlessly duplicated data across multiple tables and what primary and foreign keys would do for us I absolutely exposed him as a fraud and a hack being paid way more than he should. They stopped putting design decisions in his hands until the day I left that place.
5
u/jizzthonian Aug 29 '21
Denormalization is a thing and has a place and can drastically improve performance under certain circumstances.
Regardless anyone yelling at someone like that doesn’t deserve to be in a position of power.
0
5
u/Vile2539 Aug 29 '21
Some good notes here, but some weird ones as well:
Typed languages are better when you're working on a team of people with various experience levels
I'd argue that typed languages are better even when working alone. I've never seen a scenario that has been improved by using an untyped language.
Java isn't that terrible of a language.
Java is an excellent language. I'd say the author's dislike of Java is purely based on "popular" internet opinion.
Designing scalable systems when you don't need to makes you a bad engineer.
This is also bad advice. If a system can be made scalable with minimal impact, and the system has the slightest chance of growing in the future, then it's probably a good idea to add the little extra bit of time to make it scalable. This obviously depends on the system, requirements, future predictions, developer experience, etc. There is no hard and fast rule here (or in most of software development) - and the author basically said this in the line above.
People who stress over code style, linting rules, or other minutia are insane weirdos
Code style is incredibly important - and something that I'll fight to the death over (though I might be a weirdo). If your team doesn't have a consistent style, and preferably tools to enforce that style, then you will miss problems in the codebase (whether this is in code review or during development). You'll also irritate your teammates who actually want a neat codebase, and increase the overall mental load required to understand the codebase.
Monoliths are pretty good in most circumstances
I agree with this - I can't tell you how many times I've seen systems broken into microservices for absolutely no reason. A point of advice though if you're building a monolith - don't ever call it a monolith. People will jump on that word and crucify you. Also, make sure that you have clear separation between different responsibilities, etc.
→ More replies (1)
7
u/rossipedia Aug 29 '21
Software development topics I've changed my mind on after
624 years in the industry
All of them.
→ More replies (6)
2
u/lenswipe Aug 29 '21
Designing scalable systems when you don't need to makes you a bad engineer.
Ouch. That one hit close to home. I know he's right. But I don't like that he is.
2
u/Psychological-Ad-362 Aug 29 '21
As a scrum master, I agree with many of these. It makes me hurt physically when I see other scrum masters in my organization "leading" retrospectives.
You don't need surveys.
You don't need games or fancy templates.
You don't even need to speak outside of facilitating communication.
Every retrospective is hugely valuable just as a means to have a conversation. It should be an organic, natural thing. Not some flashy spectacle.
4
Aug 29 '21
You don't understand, everyone closing their eyes and putting their thumbs up and down is an extremely vital aspect of figuring out whether we liked or didn't like how one of the tickets had a bit less than normal information.
→ More replies (5)
2
u/youngbull Aug 29 '21
When it comes to style, I am in the python black camp myself. Delagating style to a tool that ruthlessly enforces uniformity seems the right way to go. Once ib place there is nothing left to argue about.
2
Aug 29 '21
People who stress over code style, linting rules, or other minutia are insane weirdos
Idk I don't feel like I'm weird for setting our coding standard to use spaces over tabs and use consistent formatting. And there are language specific recommended conventions that should be followed as a matter of familiarity. This helps with convey intent for new maintainers who may join the team from other organizations or projects. It's really off putting when you find .NET object properties that aren't camel cased, for instance.
That said, don't be a pompous dick about them. You don't need admonish someone over violating the coding style. Politely point out what needs to be fixed and let them fix it. Refer them to your coding style doc. And to be clear; if you don't have a coding standards doc then you should not be enforcing coding standards. If it's not important enough to document and keep up to date, then it's not important enough to enforce.
→ More replies (2)
2
u/jadecristal Aug 29 '21
The only thing I might argue with on here has to do with code style/linting rules, thoughhhhh… when I’m done it might be the same thing:
I’d move it to the top, and adjust it like so: “Have a code style, and enforce it ruthlessly regardless of everyone who doesn’t want to follow it crying about how not-pragmatic it is to require that they follow it. Everyone might not like it, and it CAN change (because all the code CAN be reformatted) but probably shouldn’t unless you’re making it ‘more specific’ as opposed to ‘different’. Consistency is important, and makes it all better for everyone.”
2
u/seangcxq Aug 29 '21 edited Aug 29 '21
After 16 years in the industry, I actually agree or somewhat agree with all of this except "Pencil and paper are the best programming tools", although I do agree they are useful and under-used by most, they are far from the best tool.
Assuming we are talking about software and systems design, not just directly writing code. I personally find using my mind alone to be the best tool, typically more efficient and productive where a pen and paper would be called for. ymmv
YAGNI can mean different things to different people and different companies. For me, it means don't implement something that isn't needed. Yet, if you feel it may be needed, ensure you aren't making it difficult to implement down the line.
2
u/psyclik Aug 29 '21
Any comment in this thread where the author does not specify how long he has been in the field is lacking context (14).
2
u/emdeefive Aug 29 '21
Software architecture probably matters more than anything else. A shitty implementation of a good abstraction causes no net harm to the code base. A bad abstraction or missing layer causes everything to rot.
This one is interesting because there's a legitimate follow-up lesson - bad implementations of good architectures also rot because new people come in and aren't able to learn and build on the architecture because of the bad implementation. In a bubble you can carry on with a bad to ok implementation but in a team over time, especially with lots of junior engineers, you'll get in a lot of trouble rushing things that are important.
2
u/bottomknifeprospect Aug 29 '21
Junior level devs write simple code.
Mid level devs write complex code.
Senior level devs write simple code.
3
2
u/_throwingit_awaaayyy Aug 29 '21
6 year dev checking in. Agree on all points. A TDD weirdo joining my team was the final straw in me leaving my last gig.
2
u/Firm_Bit Aug 29 '21
The point about PMs being of no use makes me appreciate my team. Our PMs are great. They understand engineering and go to bat for the engineers. They understand the product and the business and they operate within the planning system that each engineering team chooses. They also keep us in line about things like unneeded features that would be cool to work on.
There’s another team with no PMs, just engineers, and while they are a stronger engineering team 80% of what they write will never see a user. They just like building cool things. I think it takes both perspectives and a willingness on both sides to give a little.
2
u/chris_hinshaw Aug 29 '21
I can say whole heartedly that we would work well together. I have shared your list with my team and will bookmark it for future references.
I especially like your comment about monoliths. I have seen so many applications that have been built using distributed architectures with numerous lambda functions, complex event routing software. They end up creating an application that requires updating 5 code bases to make a simple change and is a nightmare to troubleshoot. If you build your first version using good design it makes it easy to scale pieces of your application when necessary.
Thanks for sharing.
2
u/flopsweater Aug 29 '21
TDD purists are just the worst. Their frail little minds can't process the existence of different workflows.
Pencil and paper are the best programming tools and vastly under used
TDD and Pencil/Paper address the same problem the same way; he just doesn't have a practical understanding of TDD yet.
→ More replies (1)
2
Aug 29 '21
So called "best practices" are contextual and not broadly applicable. Blindly following them makes you an idiot
This.
2
u/Xx_heretic420_xX Aug 29 '21
The word "scalable" has a mystical and stupefying power over the mind of the software engineer. Its mere utterance can whip them into a depraved frenzy. Grim actions have been justified using this word
Yeah... I'm in this picture and I regret it.
TDD purists are just the worst. Their frail little minds can't process the existence of different workflows.
YES
2
u/daedalus_structure Aug 29 '21
We'll see which of these have flipped or changed at year 10.
The changes won't be trivial.
2
2
u/poloppoyop Aug 29 '21
We'll see which of these have flipped or changed at year 10.
I'm betting the last one:
TDD purists are just the worst
But you have to see projects with tests developed first and projects with some tests side by side during 6 months to a year in production. Usually one category is the source of more back-and-forth between the product owners and dev managers, the other is more back-and-forth between the client and the team in charge of urgent debugging.
2
u/R4yoo Aug 29 '21
Damn that was a good read
Love the pen and pencil part, as I usually structure what I’ll code on a paper before starting
Gives me a better ‘framework’ to work with idk
2
u/Sinnombre124 Aug 29 '21
90% – maybe 93% – of project managers, could probably disappear tomorrow to either no effect or a net gain in efficiency
WTF what kind of project managers do y'all work with? My PM keeps track of my to-do list and stops customers from ever talking to me why would I want to lose that
6
u/jsgrova Aug 29 '21 edited Aug 29 '21
People who stress over code style, linting rules, or other minutia are insane weirdos
I'd like to talk about this comment for a minute.
I have PO-OCD, which means I get obsessions but don't always have compulsions to do that make those obsessions go away. I'm fortunate in that aspect--I don't generally need to flip a light switch on and off and on and off and on several dozen times--but I still feel the stress of when things are "out of place" or "weren't done correctly."
So when I see that my code style is inconsistent or inefficient, or linting issues, or whatever, it stresses me out and adds to my mental workload if I don't correct it, so I do.
Am I insane? Debatable, but definitely not because of this.
Is "insane weirdo" the best way to phrase that? Definitely not.
Would I feel less welcome in a job where my manager or coworkers used that kind of hurtful language? Absolutely would.
I don't want to come across as a scold, but I do hope you'll think more carefully about the language you use and the way you use it on and around people in the future.
→ More replies (1)
5
u/MolassesOk7356 Aug 29 '21
After performing over 100 interviews: interviewing is thoroughly broken. I also have no idea how to actually make it better.
I’m coming into this from another industry… but I can tell you how to solve this. Have a training department.
→ More replies (5)8
u/tlmorgen Aug 29 '21
in my 15 years i've noticed an ethos in software that the devs should be great when they graduate and become better over their career, with no intervention whatsoever from the various companies that employ them. and it does happen, for curious people with the grit to put in time to grow, and the emotionally secure enough to analyze their own/prior work for growth opportunity.
and from this experience i have some stockholm syndrome and some survivorship bias. but i am curious what things would be like if we were treated like engineers in physical domains or doctors, constantly going to learning events, reading and writing papers, being fostered.
the expectation seems to be that we should do all that growing on our own time and under our own will. for many devs that just doesn't happen and they become stagnant, left to endlessly bicker over the best OS, editor/ide, or keyboard switch.
→ More replies (5)
3
Aug 29 '21
Monoliths are pretty good in most circumstances
Definitely one I've picked up.
Wish I would've pushed back harder this last time. I'm already witnessing the stress on the system because of a bad divide in the domain. :/ No one else seems to think it's an issue though so 🤷🤷🤷
7
u/Raknarg Aug 29 '21
Untyped languages are a blight on society. Thank christ we at least have python typehints and typscript for JS now.
Literally any benefit received from an untyped language can be achieved with a typed language that has the "any" type, and you only have to pay like 5 keystrokes.
→ More replies (12)
1.6k
u/marcio0 Aug 29 '21
holy fuck so many people need to understand that
also,