Page 1 of 1

Coding, in general

Posted: Thu Mar 17, 2022 7:22 pm
by punt
I recently have been doing a lot of updating my understanding and knowledge of some of the programming languages. Getting to see how new features are used, the build process has changed, etc. It has been very interesting and informative. In doing this, I have a few thoughts:

1. In todays update cycle, knowledge of a language can become dated rapidly. Not just the library, but the core language. This is especially true with C++ and C. Those core languages have "modernized" quite a bit, and look quite different from before (which can be easy to not appreciate, given how long they stayed unchanged before 2011, when changes for both started to really pick up speed).

2. Learning "system" languages is still valuable in gaining an understanding of core principles in basic concepts, which can help you even as one changes across the suite of languages available today.

3. If one really wants to improve their understanding and how to write portable code ( appreciate abstraction at key points), write for two different operating systems. It can greatly improve your thinking of organization, and result in more maintainable code.

4. Build tools have really improved, and I encourage all to not just stay within IDE. IDEs may be ones main development environment, and but get an understanding of the tools available to build an maintain projects (especially if taking item 3 to heart, and needing to build on multiple platforms). CMAKE, ninja, etc have made this job far easier, ONCE those tools themselves are mastered.

Finally, let me reiterate item 1 again. C++ (perhaps not as much C), has actually made a slight comeback. The main reason is speed/performance matter once more. There is an interesting book, "The Beast Roars Back", which touches on this. It points out that in the 90s, with the increase in performance, lower level languages performance benefits were not as important. But then came the large data centers, with heat/power becoming a significant factor of cost. And these languages made a resurgence in those areas. (As a side note, it is interest to see how Facebook will use custom new and other operators to gain a 1% performance gain in their base, which for a large Data center, can result in significant cost savings). That coupled with the "Modern C++", it definitely is still seeing a strong base.

Even if you don't plan on doing many things in C/C++, understanding them (or any lower level language can improve you knowledge of programming in general, and what is actually going on under the hood, to better understand why perhaps you don't want to pass a large variable by value, or why different containers exists.

Anyway, just an observation. But if you do decide to tackle a lower level language, take the time to understand what is going on, to really understand and learn.
I for one have started back in C. I like to stay proficient in C for it is almost universal on all types of processors, especially for small embedded 8 bit and speciality processors. Doing so, has definitely helped in my thinking and breaking down problems. That transfers well to Swift, and other languages I dabble in.