Switching lanes as a developer

Switching lanes as a developer

I’ve chosen my study called technical informatics education for a deeper knowledge of computers. After i’ve successfully got my Bachelor degree I’ve worked for a middle sized company and short thereafter I’ve worked for a IT -consultancy company in the Netherlands. During my study I’ve encountered and learned a lot of languages like for example: Assembly, C/C++, Java and Python. However after i’ve completed my studies I choose to work mainly with Java.

But sometimes the thought crosses my mind, what if.. I could switch lane and switch my main language and related ecosystem?

Which language am i talking about? C/C++, which in my honest opinion is a language which is low-level and has quit some performance. But then I thought of a quote we’ve said to each other at the university: “If you can code within a language, you can do it with any language”.

This made me think and it got me curious, what comes to mind if i switch to C++ as main language. So I’ve made a small table with items about what to think about when we talk about a language and it’s ecosystem.

Small topics to start with:

  • Language version history
  • Language structure
  • Best known/used frameworks
  • Tools
  • Testing
  • Code storage / versioning
  • Methods used for development ( Prince / Agile / Scrum )

But how to know what’s hot on the current market, what’s expected of a experienced C++ developer or an embedded engineer?

I basically searched on job sites for job offers and what’s expected of the ideal candidate. I wrote down the names of the frameworks asked for and started counting per framework how many times it’s asked for.

Based on that I’ve made a top 3 and started a deep-dive in to the framework and it’s use. I also made a ecosystem based on the job offer requirements. With the use of docker I’ve managed to made a quick draft of the ecosystem like Jenkins, Conan, SonarQube and Gitlab for example.

C++Java
Version historyVersion history
C++11
C++14
C++17
C++20 (expected)
Java 1.6
Java 1.7
Java 8
Java 9
Java 11
Java 15 (expected)
FrameworksFrameworks
Qt
Boost
STL
Dlib
Reason
Spring
Java EE
Jakarta EE
Struts
Vaadin
ToolingTooling
Jenkins
SonarQube
SpecFlow
Conan
Jenkins
SonarQube
Cucumber
Nexus
Version managementversion management
SVN
Git
SVN
Git
OtherOther
FreeRTOS
IAR Editor
Microcontrollers
Elektronica
Realtime debugging
Draadloze techniek (BLE, Xigbee )
Kubernetes
Azure DevOps
AWS
Contract testing ( pact.io)
Docker
intellij IDEA
Administration ToolsAdministration Tools
Jira
Confluence
Trello
Jira
Confluence
Trello
Azure DevOps boards

So basically I’ve tried to look from my within my comfort zone and try to map it to the other language it’s ecosystem.

After some searching a lot of job offers the c++ development ecosystem is very wide for which Java is mainly use din the Netherlands for administrative systems like creating API’s and connecting them for business logical database parameters. An example is to create a child bank account and link it to it’s parents bank account.

C++ has a lot of diversity in it’s job offers. It’s mainly used for Robotics, Electronics/Embedded Systems, Artificial Intelligence but also with Qt for user interface applications. This challenges you which subject to focus on.

That’s why I looked for similarities like:

JavaC++
JavaFXQt
SpringBoost

Let’s start with a simple GUI

So i’ve started to create an application with JavaFX and Qt and look how it’s similar to each other. I’ve used JavaFX version 15 from openjfx.io with the combination of Java 14 and with Qt i’ve used Qt version 5.15 with the C++ compiler gcc version 10.1.0 which also supports the compiler standards of C++ 11, C++14 and C++17.

As Java just announces updates as in a version, it’s hard to compare the C++ standards to a Java relevant topic. One could say it are the Long Term Support releases but then the versions are still different, C++ 11 standard is available from gcc compiler 4.8.1 while the C++14 standars is available from gcc compiler version 5.0. Maybe if someone has a great idea or suggestion I might use it, please let me know.

I made a simple graphical application with a button and a background color in both Java and C++. So let’s say the application I’ve made is a high-end application ready to be released to thousands of customer pc’s. How do we distribute the application?

JavaFX depends on jPackage which has awesome features to create a standalone installer for each OS, read more about it here. Also Qt has it’s own deployer which I’ve chosen cqtdeployer for being more similar to the jPackage variant as cqtdeployer is able to create an application for both Linux and Windows.

Both deployment executables states that you need to execute the build and deployment on the Operating System you target to deploy. The pros about Qt is that it automatically gather all the code and compile it in one application which is runnable on the system you’re building it. The con about this is that there is no installer created in this process so you need to create an installer by yourself with the Qt Installer framework.

The pro about jPackage is because that the tool is provided by the Java installation and supports deployment for Linux, MacOS and Windows. However you need to specify an installation tool to use for creating the installer, like for example with WiX, but the con is that you have to do more configuration when you have an application which depends on certain libraries which are not your own but for example from maven central.

So that went well and i’ve learned to create and deploy a small GUI in C++ with the Qt Framework.

Struggles

However it was kind of a struggle to find the right page to download the Qt framework as it’s available for free but non-commercial use. You just need to create an account, login and head for the opensource page of Qt. There you can find a download page. When you’ve downloaded the online installer the installer has a window which asks which other elements you’d like to download and install. There you can click on the Qt Framework versions, IDE and Installer Framework. This took me a lot of time even with a fast internet connection because i downloaded multiple versions for further study, maybe if you install only one version of the Qt framework it will save you some time.

Also when i was finally at the deployment phase and searched the Qt website for more documentation about deployment it wasn’t quit clear to me. I downloaded the application from the original website as it’s from a third party but widely known in the Qt community. There is a build and install page but it depends on which Linux distro you’re using and which config you’re having if it will install easily. I just downloaded it from their releases page of their GitHub which can be found here.

I’ve used an laptop which i bought a year ago and wiped it to install Parrot Linux on it. Therefore I’ve had the newest binaries and updates but almost no adjusted config for other applications. You may encounter issues which I didn’t had because of that.

Next step: Programming with ‘real’ technology!

The other side of C/C++ which I really favour is to program for robots, cobots or microcontrollers for example. And the most similar situation I can think of at this moment is that for a Java project within an DTAP environment it is built and tested through a pipeline and after success the application is deployed on a server. Whether it’s an application in a docker image or a jar/war file directly on a server. However this is a completely different way of working!

Programming your hardware also knows some kind of deployment phase. However when an compiled program needs to be deployed, it’s uploaded to the microcontroller/electronic device directly. So in this case there’s not one server which is 24/7 available but there are multiple stand-alone devices which need the application/firmware. Ofcourse this is an example scenario, there are scenarios which differ from the one which i just sketched.

In a Java project I used to make a Docker image file where the application would run on as a single running instance. I can communicate between docker by setting some values and configuration. This has the upside that the application always runs on a independent isolated part of the system. When the application passed the testing phase I can upload it to a server where the application will run until a newer version is deployed. Also this a scenario for example.

So how does the SDLC works when the main goal is to program hardware devices. The software development lifecycle is a crucial proces to understand what’s going on but also how the proces works. It all starts with the same, which is a great idea! Whether it’s for business or for your hobby project, without ideas we’re nowhere.

But when we think and theoretically spar with people about an idea we slightly move to the planning phase as we need time to accomplish our goals. But quickly after planning comes the design phase. How are we getting things done. The greatest part for developers is the building part, let’s develop! Then comes the testing phase, does it do what we specified in the beginning. If the project manages to pass all tests the deployment phase is a fact!

I want to zoom into the way of working with hardware as I searched the internet and grabbed some old study material from the darkest part of my attic. To program a microcontroller directly from the pc you need something called an UART, JTAG, Programmer or a Segger among others. So I got this circuit board ( in my case an Arduino ) and i need to upload my code to it, that’s where the UART cable comes in. But as you can imagine, this isn’t made for automated deployment. I need a driver for it to work properly on my Windows machine and my Linux has the need for some libraries to before my laptop can support the circuit board or microcontroller. After installing the drivers I can upload with my IDE to the recognised device.

Also when you want to debug directly on the board ( or machine ) the driver comes in handy. I’ve chosen to program in C++ but you can choose for an other language as well. In some cases you’ll need to install a driver to let the OS be able to communicate with the device. My hardware which i’ve used was the Arduino UNO R3 with a SG90 Servo Motor and the HM-10 BLE module. This is fairly easy as Arduino provides a lot of libraries for working with the Arduino boards and modules.

However when you hit the industrial robotics, it’s a different kind of level. And after that there are a lot of new worlds to explore. Which are all a projects concerning robotics but also different in every way. For example, an Agro robot for recognising and harvesting crops to a healthcare robot for being a companion for people. For me it’s the closest to innovation we can get.

I got started with the C++ as a point-of-view to slowly deep dive in the world of C++ and then got deeper into embedded or robotics world. This isn’t pure C++ but it needed a point to start looking from. you can also start from another angle.

In my case i’ve got very exciting about this world of innovation, so I joined…

Leave a Reply

Your email address will not be published. Required fields are marked *