Something I have been noticing when trying out a couple of new frameworks and technologies is that everything seems to be having generators or initializers to get you going. One generator is not the same as another, and this is something I want to discuss with you. Like always I am curious to find out what you think about this evolution, so leave a comment.
I haven’t really had a lot of time to work on my own projects so it has been quiet and nothing much has been going on. But this will change and I have started to work on them more actively again. So you can expect to see more updates regarding this as I explore new technologies and experiment with some new ideas. This blog post is simply here to tell you want you can expect to see over the coming weeks and maybe even months.
When looking for a new job about 1.5 years ago, I was eager to start working with C++ again. Now after I have freshened up my knowledge and gained some new experience, it is time to evaluate the situation. I will try to make an objective assessment and clearly specify why I feel certain things. Some may be caused by the situation of way of working, where others are caused bye the language itself.
For a new project I will be developing an application, and like all applications it should support both Android and iOS. I don’t have any experience with app development, but it was touched during a course at the university. So I remember that back in those days app development wasn’t that easy and if you wanted to support both platforms, you basically had to write two apps. While doing some research for this app I discovered that this still has not changed.
In my previous blog post, I did an experiment to see how the different ways of passing an argument hold up against each other. And it was clear that for larger objects a reference or raw pointers was the fastest way to pass an argument. But since raw pointers should not be used in new modern C++ code anymore, I did a similar experiment with the smart pointers. The results of this experiment can be found in this blog post.
C++ allows us to pass arguments in many different ways, and although most of them will allow you to do the same thing, there are subtle difference in what is actually done behind the scenes and how strict it is about the things you can do with the argument. Another important aspect is whether or not changes made to the argument are reflected to the original value as well.
This blog post will mostly focus on the performance of the different ways of passing the arguments, but it is important to first discuss exactly what each approach allows you to do, since this will determine whether or not you can pass the argument in such a way in the first place.
I have heard many things about Spring, and I have seen it appear on many job listings but in the end all I knew about Spring was that it was a framework to build REST services. Due to its importance in the industry and out of curiosity I decided to use it for my next project. I am still by no means an expert in Spring, but what I have learned so far has already opened up a whole new world for me.
Where I was just expecting to find a framework to build a REST interface, as you would do with plain JAX-RS. However I quickly found out that it is a framework to build entire web services, including all the aspects that come with it.
Python offers many features with its mocking framework, the most interesting and fascinating ones are of course those that are related to mocking. It isn’t hard to simply check whether a certain return value matches what is expected. Mocking however is very much tied with the language the the design as it requires you to cut the connections and replace it. I will look into these fascinating features and how to use them.
If you know me, or if you have read some of my other blog posts you will already be aware that I am not the biggest fan of Python. But I do give credit when credit is deserved, and the first time I had to do some mocking with python I was baffled. While most of the process was very easy there are some more complicated things, but what really amazed me was how easy it is to mock system functions and most interesting is the dependency on files.
As mentioned in my previous blog post, I hope to examine a more interesting comparison for the different types of methods. Note that this comparison completely ignores the different use-cases for each type, it is therefor only relevant for ‘pure functions’, as in that case it doesn’t matter whether they belong to a class or whether they are static or not.
In comparison to Java, C++ does not force you to make all methods part of a class. Instead you can also have regular methods, which are often used for helper methods that only rely on their input parameters to generate an output. It is obvious that these methods don’t have to be part of a class as they do not require any state, they are what we call pure methods.
But you can also have regular methods and static methods outside of a class. Although this seems odd since isn’t static only saying that it does not require a class to be called, but since the method isn’t part of a class in the first place, what is the point of doing this?
In the previous blog post I wrote how you can have a simple ‘to string‘ method for a C++ object. My proposed solutions however, like in all languages, require you to have access to the code of that class and be able to alter it. There is however a way that allows you to ‘extend’ a class with some methods without needing actual access to the source code. In this blog post I will show you how you can implement output stream operator <<, and then discuss this approach more generally.
The concept of a static variable exists in every language, and it is a feature that enables multiple objects to share a common variable. It enables communication between these multiple objects and can be used to avoid creating copies of certain data if this data is constant. There is however a big difference between Java and C++, whereas in Java you can only have static members, in C++ you can have static on all levels going from global variables all the way down to (function) local ones.
In this blog post I will briefly discuss the sense and nonsense of static variables and how they perform. Based on that I will give my opinion of when and how they should be used.
It may not be a big secret to you that the popularity of python has been rising for many years now. It becomes hard to find a job vacancy where python is not listed. It also keeps going up on popularity lists such as TIOBE.
But what exactly makes this language so favored with many developers? In this blog post I will go into depth on the arguments python fans use to explain why they choose python over any other language.
Something that is almost impossible to look ignore now is the concept of an ‘app store’. Ever since the introduction of Windows 10, every big system now has this concept in place. But if you think about it, it’s not a very new concept and it has been around for years on Linux. In this post, I will discuss the benefits an downsides of having an app store as well as the different ways on how they are (or can be) used.