Last time I did anything on the job with C++ was about 8 years ago. Here’s what I learned. It may still be relevant.
C++14 was alright, but still wasn’t everything you need. The language has improved a lot since, so take this with a grain of salt. We had to use Boost to really make the most of things and avoid stupid memory management problems through use of smart (ref-counted) pointers. The overhead was worth it.
C++ relies heavily on idioms for good code quality that can only be learned from a book and/or the community. “RAII” is a good example here. The language itself is simply too flexible and low-level to force that kind of behavior on you. To make matters worse, idiomatic practices wind up adding substantial weight to manual code review, since there’s no other way to enforce them or check for their absence.
I wound up writing a post-processor to make sense of template errors since it had a habit of completely exploding any template use to the fullest possible expression expansion; it was like typedefs didn’t exist. My tool replaced common patterns with expressions that more closely resembled our sourcecode^1^. This helped a lot with understanding what was actually going wrong. At the same time, it was ridiculous that was even necessary.
A team style guide is a hard must with C++. The language spec is so mindbogglingly huge that no two “C++ programmers” possess the same experience with the language. Yes, their skillsets will overlap, but the non-overlapping areas can be quite large and have profound ramifications on coding preferences. This is why my team got into serious disagreements with style and approach without one: there was no tie-breaker to end disagreement. We eventually adopted one after a lot of lost effort and hurt feelings.
Coding C++ is less like having a conversation with the target CPU and more like a conversation with the compiler. Templates, const, constexpr, inline, volatile, are all about steering the compiler to generate the code you want. As a consequence, you spend a lot more of your time troubleshooting code generation and compilation errors than with other languages.
At some point you will need valgrind or at least a really good IDE that’s dialed in for your process and target platform. Letting the rest of the team get away without these tools will negatively impact the team’s ability to fix serious problems.
C++ assumes that CPU performance and memory management are your biggest problems. You absolutely have to be aware of stack allocation, heap allocation, copies, copy-free, references, pointers, and v-tables, which are needed to navigate the nuances of code generation and how it impacts run-time and memory.
Multithreading in C++14 was made approachable through Boost and some primitives built on top of pthreads. Deadlocks and races were a programmer problem; the language has nothing to help you here. My recommendation: take a page from Go’s book. Use a really good threadsafe mutable queue, copy (no references/pointers) everything into it, and use it for moving mutable state between threads until performance benchmarks tell you to do otherwise.
Test-driven design and DevOps best-practice is needed to make any C++ project of scale manageable. I cannot stress this enough. Use every automated quality gate you can to catch errors before live/integration testing, as using valgrind and other in-situ tools can be painful (if not impossible).
1 - I borrowed this idea from working on J2EE apps, of all places, where stack traces get so huge/deep that there are plugins designed to filter out method calls (sometimes, entire libraries) that are just noise. The idea of post-processing errors just kind of stuck after that - it’s just more data, after all.
fedora is a whole another system webview. Where did webview come from? If I type “is” the rest of the string is the same regardless of the first word. Samsung keyboard.
As other have said, housing, at least in the US, has always been seen as an investment, and investments are supposed to appreciate in value. It is difficult to sell to political bases that one of two things must then be true: 1) People who bought houses 20+ years ago will have to lose equity on the house which they potentially were relying on for some amount of retirement, or 2) The government will have to step in and fill the gap (a la systems similar to agricultural subsidies). Neither of those things would you be able to sell to a wide enough base that they could be acted on.
In the end, this was caused by two things. On a practical level, prices continued climbing while wages stagnated over the past 40 years. On a more philosophical level, I personally don’t think that necessities such as housing should be commodified.
This also brings up the fact that single family homes, the predominant home type in the US, are not good from an environmental standpoint or an urban planning standpoint. It would be better to convert into duplexes and such. In the end, I agree that buying a home is way too much, but in the long run it may be good that the market is pushing more people towards lower impact forms of housing
What!? Witchcraft? Magic? I don’t believe in that bullshit, but you most definitely can win a woman’s heart with cheese. That’s just a scientific fact.
Honestly I am really proud of everything in my life. I have learned English all by myself and I have always helped people around school with it which made me (plus being good looking and an interesting person) made me “the popular kid” in the school. In high school I was in a boys only school which really made me anxious when I speak with a girl my age. Guess that’s what happens when you don’t talk to a single girl of your age for 4 years. I’m not joking. I really have no female friends.
Another thing I’m proud of is my knowledge on computers. Which I assume is the majority here so I’ll skip that.
I have befriended people of many types. Some were confident, outgoing people. And some were anxious, shy, insecure people. The kind of people that are afraid of making eye contact with you when speaking. I have seen those people change around me. I learned that simply listening engaging in conversation with them opens them up. And now those people are not shy anymore! They engage in activities with other people and are happy. My companionship helped them navigate through their issues and they realized that if a person such as me listens and cares about them, there are people out there that will. And I’m really proud of myself for changing their lives.
I know a dude who moved to the town I live in. He couldn’t find a place where people like him hang out. So he created one. It grew into a bar. A lot of people loved that place. He just recently closed it after 13 years.
kbin.life
Oldest