Search

Dienstag, 11. April 2017

Using C++ in your project is risky for your business success!!

I decided to write two articles, because one day i was asked by one of my clients why i refuse to work on projects where C++ mixed with Java, second reason I want to capture my thought pattern after reading book  Bjarne Stroustrup Programming principles and practice using C++ (1634 pages book!).
Before you read further, please notice this is my personal subjective opinion, I am Oracle certified Java developer after all, so consider this as last warning. This article consist two parts one is technical only and another business only.

How exactly C++ can affect your business operations?
Through all of my carrier I saw many project some good and some bad, I consider IT professionals 100 % responsible for business decisions, so if we techies make bad decisions we can actually can harm the company revenue and make it bankrupt!
Let me put a business hat on, okay assume you are a hardware manufacturer who develops equipment for communication companies, the software for this equipment written in C++. For the next years your revenue numbers are great and the codebase of your product is huge. One day one of the customers tell you, that your competitor sells better equipment and has cheap prices. So what will you do? Typical management decision will be to go the R&D department and ask the folks to make even better product and research what new features the customer is willing to pay. You schedule new plan (hopefully agile!) and all should go well, right?
Remember you have a legacy product and devs heavily at “working” and typical C++ thing happens, you starting to get notice the development slowdown, seniors and teamleads starting to report about strange and very difficult bugs to fix (hire new devs?), estimates must be adjusted and future release at danger ? Did you ask yourself why development based on legacy code slow down?
This is even worse in C++ projects, so I decide to give you some hints:
Basically C++ programming language gives to a programmer ultimate access to the memory of a device , there no restriction at all! Typical pattern of C++ Programmer will be to write an algorithm which does some complicated logic and then release memory back to the operating system.  Let’s imagine that some bad day happens and C++ Programmer forgets to free up the memory and strangely enough everything works! The QA department report that sometimes software takes too much time and freeze or slow down, the developers say it must be the testing computers are too bad and the QA should upgrade them. It can be truth sometimes, but it can be a simple lie, because of the bug which is difficult to catch which cause the memory leaking.
If you happened to be in such case, then you have only one possible solution : to make a code review  and hire external workforce which should be very good trained professional c++  developer, who can go through tons lines of codes and exactly pinpoint where the bug was created and fix it. From business point of view such development activity can only result in 100% failure in delivery of product on time and there no guarantee that new bugs wouldn’t introduce or discovered!
There I make my point, C++ can be very dangerous for your business if you  don’t check and test your code base, in general most times programmers are highly trainer, but it doesn’t mean that they can’t make a dumb mistakes for example because of short attention span of human being and other distractions(meetings, telephone calls, music, after work party).
Many senior C++ developers would 100% disagree with my opinion, but this is reality in which they live, they are used to it and personally I am ok with it. To be successful in C++ you must continuous check your codebase and make sure that no memory leak bugs appear and don’t forget C++ is a heavily dependent on hardware, as C++ programmer one should be aware about compiler optimization options. So let’s summarize:

C++ provides direct access for memory which is good and bad , bad because as developer you can make a mistake and forget about it and only when you test the application your realize it, by that time you already burn your money! Good you can make very fast and robust application but is a price high enough (slow development phases, random at runtime memory leaks) ?
I consider C/C++ as interesting and useful languages but I have a feeling that this languages after many years usage by the developers worldwide did transformed from general purpose languages to very specialized ones with domains like automobile, avionics and other very specialized industries and where hardware platforms are stable and work at least 10 year without any failure. Another point which I must underline, C++ must be used only by highly trained professionals, in my experience this is actually a very high cost-active expense, but what is better to allow memory leak bugs or to have somebody that caution at any time about such issues?
My last advise for business make sure that developer teams write unit tests, I saw to many projects which fails, because the developers assume that they don’t have enough time to test they stuff!

Keine Kommentare:

Kommentar veröffentlichen

All comments are pre moderated be polite and respectful!

Blog-Archiv

Blog readers favorites