Live data from Hacker News

Modern C++ Programming Course

github.com

11–20 of 221 posts

Re: Modern C++ Programming Course

#11

Earlier quoted context omitted.

Genuinely asking: Why many programmers need tools to enforce something upon them? Why not they can't take slow, be mindful about what they write and add a couple of layers as pre-commit hooks? Like a code formatter and maybe a linter? This makes me sad. Programmers have the knowledge base to make some of the most sophisticated things bend to their will, and they tell a programming language is bad, because they can ma…

> Why many programmers need tools to enforce something upon them? Why not they can't take slow, be mindful about what they write and add a couple of layers as pre-commit hooks? Like a code formatter and maybe a linter? Why would I want to? Most of that is boring stuff that's hard to get consistently right and highly amenable to automation. Automation is what the computer is good at, it can have that job. Like, why wo…

> Automation is what the computer is good at, it can have that job.

Pre-commit hook is automation. It formats the code and gives you linting notes the moment you write "git commit".

> Like, why would I want to spend more mental bandwidth on tracking down whether every new goes with every delete than strictly necessary?

It's not more mental bandwidth for me. Because I write the new, and directly delete at the point I need to, then I never think about it again. If I botch something, valgrind will tell me, even pinpointing it with line number.

> ...other things that will do just fine with a smart pointer.

If that works for you, use it. I have no objections.

Re: Modern C++ Programming Course

#12

[flagged]

Genuinely asking: Why many programmers need tools to enforce something upon them? Why not they can't take slow, be mindful about what they write and add a couple of layers as pre-commit hooks? Like a code formatter and maybe a linter? This makes me sad. Programmers have the knowledge base to make some of the most sophisticated things bend to their will, and they tell a programming language is bad, because they can ma…

Because not everyone has the same values, not everyone has an engineering background even though they like to call themselves engineers, most programming projects are delivered by external companies that don't care about quality unless it is required by law (aka liabilities).

Re: Modern C++ Programming Course

#13
Any ideas where to start learning C++ as an embedded developer? I wrote many lines of bare metal C code and want to transit to higher level jobs. I see many expensive or completely free courses, but I am not sure which one is usable in my complicated situation.

Re: Modern C++ Programming Course

#14
post #5

Earlier quoted context omitted.

There is no modern C++ without the old C++. C++ is the success that it is exactly because it has been able to evolve with no shameful past to cancel.

We don't talk about auto_ptr.

`union` is all I need to mark my territory and make sure no one touches my property!

Re: Modern C++ Programming Course

#16

[flagged]

Genuinely asking: Why many programmers need tools to enforce something upon them? Why not they can't take slow, be mindful about what they write and add a couple of layers as pre-commit hooks? Like a code formatter and maybe a linter? This makes me sad. Programmers have the knowledge base to make some of the most sophisticated things bend to their will, and they tell a programming language is bad, because they can ma…

[deleted]

Re: Modern C++ Programming Course

#17

Earlier quoted context omitted.

> Why many programmers need tools to enforce something upon them? Why not they can't take slow, be mindful about what they write and add a couple of layers as pre-commit hooks? Like a code formatter and maybe a linter? Why would I want to? Most of that is boring stuff that's hard to get consistently right and highly amenable to automation. Automation is what the computer is good at, it can have that job. Like, why wo…

> Automation is what the computer is good at, it can have that job. Pre-commit hook is automation. It formats the code and gives you linting notes the moment you write "git commit". > Like, why would I want to spend more mental bandwidth on tracking down whether every new goes with every delete than strictly necessary? It's not more mental bandwidth for me. Because I write the new , and directly delete at the point I…

> Pre-commit hook is automation. It formats the code and gives you linting notes the moment you write "git commit".

So isn't that a tool that enforces something upon the programmer?

> If I botch something, valgrind will tell me, even pinpointing it with line number.

What is the benefit of needing valgrind? Isn't it even better to have the task automated away so that the problem doesn't even come up?

Re: Modern C++ Programming Course

#18

Earlier quoted context omitted.

> Why many programmers need tools to enforce something upon them? Why not they can't take slow, be mindful about what they write and add a couple of layers as pre-commit hooks? Like a code formatter and maybe a linter? Why would I want to? Most of that is boring stuff that's hard to get consistently right and highly amenable to automation. Automation is what the computer is good at, it can have that job. Like, why wo…

So use RAII and smart pointers. I think that's the point.

Yes, exactly what I'm saying. Use tooling to do the boring parts of your job.

Re: Modern C++ Programming Course

#20

Earlier quoted context omitted.

> Automation is what the computer is good at, it can have that job. Pre-commit hook is automation. It formats the code and gives you linting notes the moment you write "git commit". > Like, why would I want to spend more mental bandwidth on tracking down whether every new goes with every delete than strictly necessary? It's not more mental bandwidth for me. Because I write the new , and directly delete at the point I…

> Pre-commit hook is automation. It formats the code and gives you linting notes the moment you write "git commit". So isn't that a tool that enforces something upon the programmer? > If I botch something, valgrind will tell me, even pinpointing it with line number. What is the benefit of needing valgrind? Isn't it even better to have the task automated away so that the problem doesn't even come up?

> So isn't that a tool that enforces something upon the programmer?

It's a tool I voluntarily add to my workflow, which works the way I want, when I want, according to project needs. It's not a limitation put upon me by the language/compiler/whatnot.

> What is the benefit of needing valgrind? Isn't it even better to have the task automated away so that the problem doesn't even come up?

In most cases, performance (think of HPC levels of performance). If I don't need that kind of performance, I can just use the stack or smart pointers.

If we're talking about moving to other programming languages, I'd rather not.

Post reply on HN