HackerTrans
TopNewTrendsCommentsPastAskShowJobs

cultyyy123

no profile record

Submissions

Why do I get down voted when replying for criticism against C++?

3 points·by cultyyy123·hace 5 años·4 comments

comments

cultyyy123
·hace 5 años·discuss
Cult!
cultyyy123
·hace 5 años·discuss
Wow. He used Windows machine at Apple ;)
cultyyy123
·hace 5 años·discuss
I am not good at arithmetic, but I have a doctorate.

For arithmetic, there is calculator or your smartphone.

Arithmetic does not equals to reading.

There is an alternative to arithmetic, it's number sense.

https://en.wikipedia.org/wiki/Number_sense

We should teach kids how to think mathematically and they can learn arithmetic later down the road if they really wants.

Dr Keith Devlin had a great op-ed on this.
cultyyy123
·hace 5 años·discuss
So is Rust. Does Rust has an enforcement flag for RAII-only?

Rust has manual memory management too.

If someone uses Modern C++, he must learn to use RAII.

> “Nuh uh, you can definitely use a car as a boat”.

You can if car supports water such as Amphicar

C++ is liberal. You can write Orthodox C++ if you wants.

I was replying to a Professor. I'm advocating Modern C++.

I've done quite complex projects that uses RAII.
cultyyy123
·hace 5 años·discuss
In reality most people are bad/afraid at Numbers not at Maths. The book Maths without numbers highlight what needs to be done to Education system.
cultyyy123
·hace 5 años·discuss
This is a very, very convoluted way of gate keeping.

> Try to focus on the maths and avoid looking at code examples.

Straight out dictatorship.

> If you want to understand it I highly recommend writing a neural network starting from a basic perceptron (no hidden layer) or even implementing basic linear regression with stochastic gradient descent. Then work your way up to a network with one hidden layer.

Like it's only way to understand backpropagation.

This quote is still valid to date.

“Today's scientists have substituted mathematics for experiments, and they wander off through equation after equation, and eventually build a structure which has no relation to reality. ”

- Nikola Tesla

Trust me, you can't fool people for too long. Abstractions always wins the game.
cultyyy123
·hace 5 años·discuss
Outsystems
cultyyy123
·hace 5 años·discuss
I've done plenty contractual work on larger code bases that has C++98 to some extent. I will tell you what you will never truly understand the whole code base.

Sourcetrail does amazing job at explaining larger code bases. Check it out.
cultyyy123
·hace 5 años·discuss
No. A lot of job posts out there that highlights the language version. For example, I saw a lot of job posts for C++11, C++17 so on. Heck even, some jobs directly mentions Modern C++.

https://jobs.smartrecruiters.com/FireEyeInc1/743999738511776...

They can also look at the creation date of company and make a educated guess.
cultyyy123
·hace 5 años·discuss
Unfortunately, the C ++ Committee knows that universities do a terrible job teaching C ++, except the one Bjarne teaches. If you ask Bjarne, he will tell you the same things I said.

A lot of universities stuck in C++98. It will takes them 1000 years to adopt C++20 tho.

One of mistakes many universities do is teaching either C or Java before C++.

I find C++ as a minimal OOP language to get head start.

C++ -> Java -> C

But if student is a complete noob to programming, I'd suggest to learn Javascript before going to C++

Again, this is to keep the intuition otherwise they will forget what they learnt.

I wish if many universities listened to Kate Gregory talk.

When you teach Java before C++,

Students try to write C++ in Java Style (Eg with new and delete). I answer plenty questions of students on Reddit's cpp sub who are trying to write C++ in Java style. I might make a talk on this in CPPCon.

When you teach C before C++,

Students try to write C with Classes.

But, as once Steve Jobs said,

"I used to think that technology could help education. I’ve probably spearheaded giving away more computer equipment to schools than anybody else on the planet. But I’ve had to come to the inevitable conclusion that the problem is not one that technology can hope to solve. What’s wrong with education cannot be fixed with technology. No amount of technology will make a dent."

You can laugh at me, that's okay. But truth is truth!

By the way, This is my 50th throwaway account. I use them because I'm getting down voted to death when speaking in defense of C++.
cultyyy123
·hace 5 años·discuss
I have worked with decades old codebases. I use up-to-date compiler where you get to use smart pointers and all the Modern C++ features. It's your fault if you not teach them how to upgrade the compiler. There is zero risk when compiling C++98 with C++11.

It's also student fault if he selects a company with C++98 codebase. The student shall do due diligence.

It's my advice for you to teach the Modern C++ before driving into legacy C++ sort of like how you teach History. You start what's current then drive deep under.

It builds intuition.
cultyyy123
·hace 5 años·discuss
"new" and "delete" considered as bad practices.

You claimed that you don't have to teach Manual Memory management in Rust so why not do the same for C++?

"Rust makes all of this go away. They don't have to manage their memory manually"

Both C++ and Rust has manual memory management but rarely needed. Both supports RAII where everything managed automatically.
cultyyy123
·hace 5 años·discuss
No. See what he said,

"C++ is a little better because they have experience with Java, but they are frequently mystified by constructors/destructors and how to manage memory manually"
cultyyy123
·hace 5 años·discuss
It's wise to use Rust in Security Critical Projects. Please see Google Fuchsia, they follow hybrid approach where critical stuff written in Rust and rest in C++
cultyyy123
·hace 5 años·discuss
NOT TRUE!

You are doing it wrong If you are manually managing memory on Modern C++.

C++ has RAII built in even before Rust came to the scene.

I've never had a situation where I had to manage memory manually during my professional career in C++

If your students face seg faults, please show them Valgrind. Valgrind is better than GDB when it comes to seg faults. It can show you where exactly error occurred.

Edit: Oh I got downvoted for saying truth. I now know what they are really up to.