dorinlazar
Joined 10 years ago
Joined 10 years ago
A lot of C (and C++) memory-related issues are caused by this assumption that by just passing a `char *` one sends a string out into the world. A point that I made on other occasions in other contexts is that in the end POSIX makes us do this, and perhaps it's time to rewrite from the bottoms up.
That aside, the issue of safety of Rust doesn't change: just because one has the `unsafe` keyword doesn't mean that someone will not use it badly. Maybe the reader of this will not use unsafe unwisely, they will eventually call unsafe-by-design APIs. At their layer they will write safe code, but below them there's a rusty bucket, if one can pardon my pun.
Pepperidge Farm remembers!
And then you have shocked people when they find out that 100% test coverage doesn't mean that you really have a bug-free codebase.
Then you have various optimizations that come from things like templates, constexpr. Look at the qsort method - to have a modicum of genericity you need to pass a function that will be invoked. Instead, a C++ version would be able to be optimized to compare the elements directly, without calling a function, avoiding a big number of function calls.
There's no way to make C faster than well written C++. But C++ is complex and a lot of people write bad C++, that's why it has developed a bad reputation. It's really undeserved.
Somehow related, Google right now demands interviewees to prepare using the Cracking the Coding Interview book. Pretty much it's like someone sells you a door and hands you a set of lockpicking tools instead of you using the key to enter.
For me, there are books that had a negative impact on my work. The GoF book is one such book, and its impact on my development is so distructive I can't even begin to explain. It's not only because it tries to codify coding as a sum of recipes, but people reading it end up with the scary idea that there is only one way of doing things, and that one way has a clear name, and a single possibility for implementation. The GoF buffs are those that keep stressing the most autoerotic interview question: „describe me one design pattern, other than Singleton”.
Now worse than people who read the GoF book are people who dove deeper into the issue and learned about more design patterns from other books. One such people screwed my career development for 7 years because at one internal interview he asked me out of nothing about the „half sync half async pattern”, that solves a problem that he wasn't able to describe to me. And since I failed, I was forever on their s*t list.
I think there are good books that can influence your life in a positive manner, but those are incremental changes, things that add a few things here and there. I would expect to see on lists that „changed careers” books on programming languages, like Kernighan & Ritchie on C, or Stroustrup's or Alexandrescu's books on C++. Or books on fundamentals, like Hennessy and Patterson, like Tannenbaum's Network or Operating systems, Knuth, or Cormen&al on Algorithms. But since I rarely do...
Github is not open. All the things listed there are costly, in one way or another. There's nothing free about anything that makes up open source today. Open source became corporate some time in the late 00s. And while I don't agree with the author (including the fact that he calls the new product Ruby-powered, not Impaired by Ruby), I do agree with that strange assessment that open source communities work that way.