News for hackers. Stuff that matters.
Re:Things I wished more developers knew about databases by harikb on Wednesday April 22, 2020 @10:43AM (#22946073)
Not really. That is exactly the point the article is trying to make. Developers need to care about these things - _enough to know who to go get help from_. That is the minimum. Also 10 years is an exaggeration. 2 years working on a non-trivial backend should expose one to these problems.

From what I have seen, products built without caring about these will usually get rebuilt a year from the original release - either by the same company or by a competitor who killed them.

Re:Things I wished more developers knew about databases by mgkimsal on Wednesday April 22, 2020 @10:54AM (#22946165)
> 2 years working on a non-trivial backend should expose one to these problems.

You can be exposed to them, but without understanding them, and experiencing both good, bad, and really bad 'solutions' to them, and understand the impact (on the business, on the code, on security, on maintainability, etc)... you just can't really get all that in 2 years.

I know plenty of people who've been 'exposed' to certain type of tech problems, and the solutions they decide on are objectively really bad for any metric other than "stop this error from showing up on the screen right now".

I've been doing this for a bit over 25 years, professionally now, and... there's a lot I don't 'get' with current stuff. But I've seen and lived enough projects, in enough different situations, to have a good idea of impact of tech decisions, and to understand how to make tradeoff decisions.

I had someone call me up to 'fix' a problem in a system I'd given then 15 years earlier. It was still running, more or less the same, and... spelunking your own code 15 years later gives you a new perspective on the impact and value of decisions you make. Many of the things people get hung up on (code style, tabs/spaces/etc, particular naming conventions, etc) provide pretty much no value in digging in to old code that no one has touched or thought about in a decade. Correct comments, sample data, repeatable tests hold so much more value, but are harder to get people to commit to following through on.

Re:Things I wished more developers knew about databases by bdamm on Wednesday April 22, 2020 @10:59AM (#22946238)
I wish I could slap anyone who gives a hoot about tabs vs spaces. Fortunately modern languages like go are removing the version control problem that not caring about style and using auto-formatting IDEs produces.
Re:Things I wished more developers knew about databases by lowercased on Wednesday April 22, 2020 @11:09AM (#22946362)
I'm working in a couple of projects where there's a bunch of linter-checker things that prevent any PR merges (another... imo somewhat over-used tool) and... I split my time between Java, PHP, various SQL engines and various JS frameworks (react, extjs, vue, etc) and I'm constantly battling different mental models with various IDEs always showing different colored squiggles and highlights telling me all the ways I'm "wrong" about the code I've just typed.

Can't use double quotes! Always to use double quotes! "Prefer string/template interpolation" in JS Always do string concatenation per another project's standards.

Lots of different frameworks, languages, projects and companies all force different types of ceremony on formatting. "Hey, just let the tooling tell you!" turns in to constant UI distractions telling you that you're 'wrong' degrades (my?) performance. And... the value of most of these formatting things is pretty low, long term. I know that's heresy to some folks, and everyone I talk to sort of agrees, then says "yeah, but I really think standard XYZ is a good thing", but... it's nearly all preference, just like tabs/spaces.

Re:Things I wished more developers knew about databases by yjftsjthsd-h on Wednesday April 22, 2020 @11:55AM (#22946917)
That sounds like bad tooling. Why not have every project use https://editorconfig.org/ and then have your IDE auto-format? It shouldn't be popping up and making you fix it, it should fix it for you.
Re:Things I wished more developers knew about databases by lowercased on Wednesday April 22, 2020 @12:07PM (#22947055)
So there are tools that autoformat as you type?

let longVariableName = "hello " + this.name;

magically becomes

const longVariableName = `hello ${this.name}`;

without visually flagging it, just autocorrects as I type?

And... I can just quickly swap settings for different clients? Because one has eslint block any PRs that don't have "prefer template" rules followed but another client doesn't like that style, and don't want that style in their code because it conflicts with existing style.

Re:Things I wished more developers knew about databases by yjftsjthsd-h on Wednesday April 22, 2020 @12:10PM (#22947096)
I don't think that counts as a formatting issue. Yes, if your clients have hard rules about different coding styles at that level then it's not a technology problem (nor is it likely solvable with technology). I assumed we were talking about formatting issues like tabs-vs-spaces, in which case yes every single project could be different but auto-fixed.
Re:Things I wished more developers knew about databases by lowercased on Wednesday April 22, 2020 @12:49PM (#22947553)
thx. sorry, i sounded a bit snarky before and wasn't meaning to be. it's just easier for people to focus on visual issues vs operational/functionality. and switching between multiple projects/clients/standards illustrates to me how relatively unimportant some of these things are (but of course just imo).
Re:Things I wished more developers knew about databases by infogulch on Wednesday April 22, 2020 @04:26PM (#22949805)
I would encourage you should check out editorconfig more closely. The whole idea is that each project has a file that defines the simple formatting rules for various file types in the project/directory tree and your editor will automatically follow them on a per-project basis. It's surprisingly well supported across editors.
Re:Things I wished more developers knew about databases by wwweston on Wednesday April 22, 2020 @02:59PM (#22948970)
> using auto-formatting IDEs produces.

I strongly suspect a lot of the remainder of the tabs vs spaces reminder is actually about how it either constrains editor / IDE choices OR requires and investment of time to deal with whichever choice someone else made.

"Why do you care, my IDE just handles this" is pretty close to saying "use my IDE," on top of "use my convention."

Re:Things I wished more developers knew about databases by infogulch on Wednesday April 22, 2020 @04:20PM (#22949752)
That's why people are asking to push this problem down to the language level the way Go has done. Go defines both the "correct" format of the code as well as a standard way for any/every editor to enforce it (gofmt etc). That eliminates the double-headed subjectivity of both "use my IDE" AND "use my convention" down to just "use the standard convention defined by the language". And people love it because finally we can stop arguing about the stupid color of paint for the bikeshed and just bloody build the damn thing.
Re:Things I wished more developers knew about databases by PunksATawnyFill on Wednesday April 22, 2020 @05:05PM (#22950171)
The solution isn't to force style on programmers within the language. It's to fix the shitty diff tools that flag whitespace changes as significant.
Re:Things I wished more developers knew about databases by lowercased on Wednesday April 22, 2020 @05:56PM (#22950608)
when people care whether you have

    if(foo) {
or

    if (foo) { 
or

    if (foo) 
    {
you end up in pointless arguments. I don't care about this sort of formatting very much (I have my own default style developed over years), but I do care when other people care about it, often to the exclusion of other factors.

"but we need these tools so that we don't argue about how to format code". Well... you could... just not argue about it in the first place.

Re:Things I wished more developers knew about databases by MaxBarraclough on Thursday April 23, 2020 @07:07AM (#22954689)
Disagree. There's value in consistency, even for the shallow matter of formatting. There's a reason so many large-scale software-development companies care about coding standards.

You're right that it's not a matter of there being one true style. I agree with Kevlin Henney though that there are certainly wrong ways to format code - https://youtu.be/ZsHMHukIlJY?t=1027

Re:Things I wished more developers knew about databases by ivanche on Thursday April 23, 2020 @10:56AM (#22956709)
I think it's not at all pointless to have consistent code style throughout codebase. I agree, though, it's pointless to argue (thus losing time) about "correct" style. It should be enforced on project or company level, no discussions between developers there.
Re:Things I wished more developers knew about databases by watwut on Thursday April 23, 2020 @03:25AM (#22953609)
> You can be exposed to them, but without understanding them, and experiencing both good, bad, and really bad 'solutions' to them, and understand the impact (on the business, on the code, on security, on maintainability, etc)... you just can't really get all that in 2 years.

I don't think this is about becoming expert. This is about learning at least very basics in multiple areas so that you are not completely clueless and know issues exist. When you redefine requirements to "2 years active learning worth of knowledge", you moved goalpost quite far.

> I've been doing this for a bit over 25 years, professionally now, and... there's a lot I don't 'get' with current stuff. But I've seen and lived enough projects, in enough different situations, to have a good idea of impact of tech decisions, and to understand how to make tradeoff decisions.

This is being senior.

Re:Things I wished more developers knew about databases by vsareto on Wednesday April 22, 2020 @11:17AM (#22946453)
>Not really. That is exactly the point the article is trying to make. Developers need to care about these things - _enough to know who to go get help from_.

That isn't it. They aren't telling you to learn about database details for the sole purpose of "DBA handles databases. Go ask the DBA database questions".

It's more than that. They're offloading specific knowledge onto the dev and then making them accountable for it. It's a reaction to common questions and an attempt to answer them all at once by teaching devs answers to common questions. This is a noble goal, but it's problematic in aggregate from multiple perspectives.

The aggregate goal of all of these areas trying to teach developers their own specialties is to make developers the masters of low-hanging fruit.