500 karma · joined June 11, 2012
Reminds me of so many people I've worked with who think it matters to consumers/users why something doesn't work. Like they can justify it, and it's not that big a deal.
More info here - https://www.reddit.com/r/Racket/comments/5g8xse/are_there_an...
So whilst the new edited title is a bit click-baity, it is nevertheless more meaninful than the original.
Why do you think that is? No doubt you'll say it's because the other options are worse, but I'll just say that I like CMake. I miss CMake when I use other languages and I can set up a complicated project with CMake quicker and easier than I can with other tools.
As always, it's what you know.
The author's post, in particular, is excellent as it follows this token introduction with "I don't know anyone else who can write safe C++ code, either". This is further strengthened by "people I know to be skilled programmers (based on what, I don't know), have never professed that they can write safe C++ code, and therefore people who do, are obviously suffering from some psychological effect".
I mean, really? You can't do it, and your friends can't do it, so no one can do it? Even though there is a world of software out there that does exactly what you say can't be done? And further, anyone who says they can do it must be less-skilled and suffering for a form of illusory superiority complex? Get over yourself.
How ironic that he knows about the Dunning-Kruger effect, but fails to apply it to himself.
That, I think, is the mistake many game devs (who write their own engines) make. They make an engine for all possible games, then try to use it for their 2D match-3 puzzler, which uses about 5% of the code they've written, and even then they have to cludge some bits.
There's plenty of quality on Windows, and Windows itself is a very good OS. It's just what you know, and what you're used to.
Indedentally, in over 20 years I've never encountered a show stopping problem, or kafkaesque hoops I've had to jump through. Maybe our definitions are different...
If you've been a developer for any length of time, I'm sure you will have encountered a situation where you've read some code, thought to yourself "wow, that's terrible, I'm going to change that". Then, several hours later, realised why it was done the way it was and actually, you can't really improve it after all. That is why we comment; to save the next person who enters the cave (and, if you're the kind of dev who spends several hours trying to understand something and doesn't retrospectively comment what you've found, then I'm afraid we can never be friends).
And please, don't assume the next person has the same knowledge of the system that you do.
What we don't know is why it was done in the first place, or why it was done a particular way, or why I shouldn't change that line that looks wrong but is really correct.
It rarely ever is, of course, but don't underestimate the will of a developer to push an interesting project that they know in their hearts will not really benifit the company.
If reliability is the top priority for your project, it just means you factor that in to your optimizations. It doesn't mean you just ignore efficiency and write any old shit, as seems to be the custom today.
Your OpenSSL example seems to suggest the Heartbleed exploit was a result of developers daring to write performant code, and not that they simply wrote buggy or insecure code, performant or not.
[1] Addmittedly, Andrei's notion is still completely relevant today (and still, imo, the best C++ book available) but I don't think it's what most people think of when they hear the term "modern c++" these days. - https://en.wikipedia.org/wiki/Modern_C%2B%2B_Design
[2] https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
You can also use the included bcp utility [1] to extract a subset of boost.
[1] http://www.boost.org/doc/libs/1_64_0/tools/bcp/doc/html/inde...
He really shouldn't do that in a header, but if he at least moved it down a couple of lines so it's inside his private namespace, it at least wouldn't affect anyone else. There is no good reason to do it globally.
You say "the same operation just requires pointer changes (after finding where you want to insert or delete)" like it's some trivial thing that doesn't enter the equation. But finding where you want to insert or delete in a non-contiguous linked list is not a consideration that should be an afterthought in brackets.
Furthermore, when you have found the location, it's still not _just_ pointer changes. You actually have to allocate the memory for the node, too.
Traversing pointers and allocating memory is a lot slower than working with a contiguous block of memory (assuming you don't have to re-allocate the contiguous block of memory, of course).
Either way, don't take my word for it. If you're a C++ programmer, just benchmark std::vector against std::list, or watch this video - https://youtu.be/YQs6IC-vgmo
You can do it quite trivially by simply raising an event on every line read, or you can add some kind of transform to the data beforehand, etc. Whatever you need. You can obviously take this further and turn it into a service or something, but that's up to you.
Here's a simple example in C# - https://ghostbin.com/paste/bzgez
For example, generally, people use a lot of static arrays in C. Arrays are efficient. The way you program with fix-sized structures like arrays tends to be different to how you program with dynamically-sized structures and that style of programming tends to be more efficient.
In the vast majority of cases, a C or FORTRAN program will be more efficient than other languages not because they are C or FORTRAN, but because they force you to use an efficient paradigm.
Even other compiled languages like C++ or D are, more often than not, slower than the C counterpart UNLESS they are programmed in a "C style".
e: To be clear, the fact that they are compiled low-level languages obviously does help, but I'm trying to make the point that it's not the only reason.
On the other hand, I also have a 13" 2015 MBP[1]. It is only ever plugged in when it needs charging. I bought it specifically for it's size and battery life, because, as ludicrous as this might sound, I want my laptop to be as portable as possible. I don't _want_ it to be plugged in and I don't want to feel like I've been working out when I've been carrying it.
I know, this is crazy talk, but might I suggest that many of the people complaining are doing so simply because they bought the wrong tool for the job? It sounds to me like an awful lot of the complainers would have been better served by an actual desktop computer.
[1] I had never even used OSX before, and own no other Apple products, but I bought a MBP based entirely on battery life and size, because it was the best option out there.
The PBRT ray tracer is also a production quality ray tracer and uses many advanced techniques you won't find hobby ray tracers, such as differential geometry, which naturally increases it's size.
[1] Some utility classes are left out.
https://blogs.msdn.microsoft.com/ericlippert/tag/shadowcasti...
fr-041: Debris [2], and kkrieger [3] (the 96kb FPS) are particularly worth checking out for the uninitiated.
[1] https://github.com/farbrausch/fr_public