Jim Lynch Codes
  • Blog
  • About Jim

Writings about one coder's stories & experiences.

Nice Ebook on the History of C++

10/13/2016

0 Comments

 
A coworker pointed me to a web page with a bunch of links to free ebook downloads from the publisher. One of these titles, was C++ Today by Gašper Ažman and Jon Kalb. I downloaded it, read it, and really enjoyed it. Being a youngin' myself, I wasn't around during the early days of C (well, I wasn't programming at least) so it was interesting to get schooled on the beginning of modern programming. I'll save you the history lesson in this post and give you the actual relevance of C++ today, but I definitely recommend reading the full version.

C++ for Ultimate Control

C and C++ are often called "systems programming languages" because they are used to write the underlying operating systems for various devices, including everyday computers. To really thrive in this niche a language needs to give the developer an api for managing memory and allocating / deallocating memory and well as deal with things like "hardware interrupts". C and C++ are perfect for this and other tasks with similar requirements.

C++ Vs C: High-Level Abstractions at a Low Cost

Pure C is a very low level language. C++ leverages the power of C but gives you access to many more tools that you can use as a programmer to developer software faster and more effectively. For example, in the book the authors cites the stream model in C++:
​
"C++ introduced an I/O model based on streams. The streams model offers an interface that is, in the common case, slightly slower than using native operating system calls. However, in most cases, it is fast enough that programmers choose the superior portability, flexibility, and type-safety of streams to faster but less-friendly native calls."
 
C++ also has a standards committee which recognizes certain libraries as "official" such as the Boost libraries.

C++ For Low-Level Access When You Need It

C++ is a language that's designed for low-level hardware control. As the authors of C++ today write, "It can manipulate memory in arbitrary ways down to the bit level with efficiency on par with hand-written assembly code (and can even support in-line assembly code)". 

The Bottom Line for C++

C++ can be a tough language to code in since it has a somewhat verbose syntax and expects the programmer to really know what he or she is doing. However, with this responsibility it gives you immense power when you need it. For front-end applications C++ would only really make sense for cpu-intensive 3D console games (other than that I'd go with JavaScript on the front-end). For simple server applications I would normally use something simpler like Node.JS or something running on JVM. However, there is a clear use case where C++ shines: when you need extremely fine control of speed and/or memory usage. If you need to respond in fractions of a second and every millisecond counts then C / C++ may be a very good choice. Likewise, if you are running a datacenter and you want to absolutely minimize the amount of cpu power your program uses to run then you might choose C / C++. Knowing how to code in C will also help you to become a respectable programmer and can get you some real brownie points in coding interviews (not always, though) so you always have the option to quickly load up a coderpad.io program in either C or C++ and practice writing the ole' C code again. :)
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    ​Author

    Picture
    The posts on this site are written and maintained by Jim Lynch. About Jim...
    Picture
    Follow @JimLynchCodes
    Follow @JimLynchCodes

    Categories

    All
    Actionscript 3
    Angular
    AngularJS
    Automated Testing
    AWS Lambda
    Behavior Driven Development
    Blockchain
    Blogging
    Business Building
    C#
    C / C++
    ClojureScript / Clojure
    Coding
    Community Service
    CS Philosophy
    Css / Scss
    Dev Ops
    Firebase
    Fitness
    Flash
    Front End
    Functional Programming
    Git
    Go Lang
    Haskell
    Illustrations
    Investing
    Java
    Javascript
    Lean
    Life
    Linux
    Logic Pro
    Music
    Node.js
    Planning
    Productivity
    Professionalism
    Python
    React
    Redux / Ngrx
    Refactoring
    Reusable Components
    Rust
    Security
    Serverless
    Shell Scripting
    Swift
    Test Driven Development
    Things
    TypeScript
    Useful Sites
    Useful Tools
    Video
    Website Development
    WebStorm
    Writing

    Archives

    March 2023
    August 2021
    February 2021
    January 2021
    October 2020
    September 2020
    May 2020
    April 2020
    February 2020
    January 2020
    December 2019
    October 2019
    September 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015

    RSS Feed

  • Blog
  • About Jim
JimLynchCodes © 2023