Is it time to re-learn C++?
So I've been in the tech industry since 2001, and for most of the time I spent interacting and developing for the Java world. Granted I was never ever a huge fan of working with Java. When I was younger I had a mentor (thought he didn't realize he was my mentor) from the AOL days, and he absolutely hated Java. Odd that Java would define so much of my professional career, despite never really caring much for the language.
I was happy to eventually move into the DevOps/Site Reliability Engineer space around 2013, and could use my language of choice Python. Despite having to mess with the odd Netflix API or so (like Cassandra Astynax), I have mostly prided myself as a Python guy, with the occasional Ruby (I'm a DevOps guy after all, and too many DevOps tools are written in Ruby). However, as a hobbyist I never had too many fresh ideas of what to do with Python. As a professional, I always find place where to fit Python into our automation.
Well about a year and a half ago, I decided to get off of the side lines and get involved in the world of cryptocurrencies. I had pondered the idea of getting into Bitcoin and blockchain, but was way too conservative earlier on to consider it. But I eventually bought my first Bitcoin early 2016 and I started to get immersed in this world. As a fiscal illiterate, I made some mistakes, such as selling to quick, going all in, involving myself in shit coins, and mostly having weak hands. To the point where I finally found the one thing I was good at when it came to cryptos... Fundamental analysis. The minute I started doing fundamental analysis, my portfolio became "smarter". And that is because I'm a tech guy, and I love doing the research.
Anyway I guess there is a point I wanted to make. So here it goes. I've finally started to get my feet wet looking into the development of block chain technologies. It is something I've always wanted to do. And I've finally started messing around with Ethereum and Solidity development. I've even compiled a few projects like EOS. However there was just one issue. EVERYTHING IS WRITTEN IN C++. And I mean EVERYTHING.
Now this isn't a problem, I do know some C++ from my college days. But man, this was back when things like MFC and Win32 programming was still in vogue. Anyone remember those ugly MFC macros? Yuck. However C++ as a language has changed quite a bit. There seems to have been a ton of stuff added to the language with C11 and C14. And there are so many build utilities like SCOM and CMake. And what is boost and why does it take so long to compiled!?
I feel like I've been in this C++ coma and I'm just now waking up to a brand new world. But I literally love firing up my CLion compiler and stepping through the bitcoin or EOS code. And while it sounds boring, this stuff really excites me. It feel like I'm learning something new, and it's really amazing. I'm especially enjoying studying the code, although I'm not writing much myself.
And I guess when you think about the world of blockchain and how stateful it is. You can imagine that memory management is of the utmost importance. I've hit some resource limits just trying to get this stuff to compile. And while I do plan to write a small DAPP in Ethereum, just to see how fun it is. Studying the core blockchain code just seems far more exciting.
So is it time to go back into C++? Is it essential to understand blockchain technologies and the tech around it?
C++ is very much underappriciated. Many of the preconceived notions about memory management, etc are out dated. If you follow best practices C++ becomes the fastest, most expressive language there is.
Unfortunately, C++ takes a long time to compile because of some fundamental issues with the structure of include files. When using templates it consumes a ton of memory during compilation too. The good news is that what you pay for at compilation time often results in much better run time performance.
When it comes to smart contracts I am convinced that C++ is the best choice because of the power and expressiveness of its type system.
Resteemed, good stuff!
good
C++ is an amazing language. Its ability to manipulate data structures and the way to can conceptualise objects is unparallelled. My concern though is that it has become way too complicated to use. Writing a basic C++ program is easy enough but to really use the power of the language, the things that set it apart from Java and the others you really need to know quite a bit. Most people don't get there and as a result drop it in favour of one of the other languages that are "easier" to get good at. Any thoughts on this?
I chose to focus in on Python since it's incredibly versatile for the kind of data analysis that I do, but I've noticed this C++ trend, too, although it seems like Solidity is a JavaScript fork. I'm guessing C++ is preferred it can handle the kind of throughput needed for processing blockchain transactions? I'm just taking a stab in the dark here, though.
I think it also has to do with security or perhaps even the insecurities (almost features) in C++ (bufferoverflows due to pointers, etc). And don't forget that C++ is a programming language so it does not need an interpreter while Python (great fan btw) does.
Time for me to pick this up again now, after reading this post. It's at least a decade ago I last finished a program in C++. But it's still my favorite. :)
Thanks @brandonh, well written and upvoted! Same goes for you, @Joshpeterson and @dan.
If A B C D is the basic thing to make a sentence then C++ is the basic thing to make a computer program. So keep learning C++.
I have followed you on Steemit, please be kind enough to follow me as well.
Yeah man, happened the same to me time ago. And nowadays i will like to learn a new programming language, and i think it will be C++.
Thanks for share mate, have a good week.
This gem of a post was discovered by the OCD Team!
Reply to this comment if you accept, and are willing to let us promote your gem of a post! By accepting this, you have a chance to receive extra rewards and one of your photos in this article will be used on our compilation post!
You can follow @ocd – learn more about the project and see other Gems! We strive for transparency.