Sometimes it can be helpful to test your apps not only on a local machine, but also using other devices within or outside, your network. In my current example, I use an ASP.NET Core web application that contains an API that I can in turn access via an Android app. I debug the Android app on a physical device that is on the same network as the ASP.NET Core application.
If you are reading this, chances are you already use a password manager. I have been doing that for several years now. But I have to admit that my password manager has only run on my phone so far and I have always transferred passwords that I use on my PC by hand. Probably out of sheer laziness. Today, I use this blog post to finally synchronise my password database between any number of devices - and to show you how to do it.
If you follow my blog a bit more closely, you might know that my most time-consuming hobby is triathlon. Strength training in the gym or at home is and remains part of it, but is more a means to an end. Then in October 2020 I had my first experience with CrossFit - (very) short, very intense workouts without too much equipment, leaving you with a feeling like the one you have after finishing a very hard interval session on the running track - I was immediately captivated.
ASP .NET Core already has quite a decent di-container built in. However, there are some quirks you might need to be aware of. In one of my applications, I’ve been using a factory pattern to register my views by using open generics. To be more clear about that: I have an Interface IView<TView>, and I want to register all of this interfaces implementations.
As I found out, Microsofts DI-Container currently doesn’t support that by default (text me if I’m wrong!
I’ve been starting a new blog on my domain, for which I wanted to use the ‘blog’ subdomain. However, this subdomain was already in use for all my coding-related stuff. So, I decided to move my current blog from /blog to /coding and upload my new blog to /blog. So far, so good. Now I have both of my blogs up and running. There’s just one problem: Any incoming traffic to existing posts on my blog would resolve to 404s.
Have you been implementing the validation of your ViewModels in ASP.NET (Core) using DataAttributes so far? If so, chances are you’ve always been dissatisfied because your classes became messy and full of unnecessarily replicated code. Yes? Then today’s post is for you.
FluentValidation FluentValidation is a way to define strongly typed validation for classes in the form of a Fluent API. The term fluent in this case refers to a code structure where a function always return the modified object.
GitHub has been secretly pushing out a new feature in early july, that allows you to create a profile-level README-file. In todays post, I’ll be showing you, how you can create your own profile README to customize your own profile page according to your preferences.
First of all, you won’t find this feature in your settings. To get started, you have to create a new repository with the same name as your username.
I’ve been using Zwift pretty extensively for the last few months. For anyone unfamiliar: Zwift is a VR Biking platform. That means, you can put your bike on a smarttrainer, connect it to your pc (directly via ant+ / ble or by bridging with your phone), and then you can ride virtual worlds without having to go outside. Sounds not too bad, right?
After a few sessions, just riding became kind of tedious, so I’ve tried to do some of the preconfigured workouts.
It’s been quiet for way too long here. I don’t really have an excuse for my absence but I’ve been kind of busy, both personally and professionally. But I’m planning to post on here more frequently from now on.
As always, trying something new in software development helps to become motivated and excited. In the last months, I’ve been using Jekyll as a static site generator to build this site. Though I enjoyed using Jekyll, I never really got into the Ruby environment and have been looking for something more familiar.
Today I would like to briefly introduce you to a Web application, which I have been stumpled across. I’ve tried several tools for db modeling, some more and some less appealing.
Well, the tool doesn’t offer explicit ER modeling, but a SQL-like structure and allows you to import and export directly to SQL and other formats.
You can find the app I’m talking about on dbdiagram.io. The website offers a simple graphical interface, which includes a code editor and a graphical representation of the table structure.
ProBuilder allows you to bring more complex objects into your Unity scene without requiring in-depth knowledge of modeling programs such as Blender or Cinema4D. By now ProBuilder is integrated into Unity and can also be used free of charge in the Community Edition. In todays article I want to show you how you can integrate ProBuilder into your project and start modeling.
ProBuilder is not installed on your project by default, but you can add it via Window - Packages - All.
As a developer you have probably already worked with Regular Expressions. If you’re like me and didn’t need them too often, you probably googled them up more than you wrote them yourself.
So today I’d like to go through the basics of Regex and show you how to build regular expressions and how to write them yourself.
If you haven’t had anything to do with this topic before, this post is still for you, of course.
The ability to work with the terminal under MacOS and use my familiar Linux workflow is awesome, but I have always missed a crucial component: a package manager.
Homebrew is a package manager for MacOS, according to the developers “The missing package Manager for macOS (or Linux)”. Today I would like to explain how you install and use Homebrew productively.
First of all: You can find the project’s website here, there you will find all the information and documentation you could wish for.
Some time ago I moved this website from WordPress to Jekyll, but I never really explained the reasons. That’s why I want to discuss in today’s post the option of managing websites using an offline CMS or Static Site Generator.
CMS like WordPress are often ridiculed and devalued by their complexity or their overall structure. In the meantime, there is a variety of similar content management systems available, but they usually share the core functionalities and structure.
Today’s post is about learning new things more efficiently, i.e. wasting as little time as possible on learning. I use the Feynman technique, named after the physicist Richard Feynman. Feynman was known for his ability to break down complex facts into their core message and to convey them very easily.
You certainly know the concept of being able to explain things to others in order to better understand them yourself. That’s exactly what I’m doing with my blog and that’s also the goal of the Feynman technique.
The Raspberry Pi is one of my favorite toys when it comes to hosting local applications or services like relational databases for testing purposes. At the moment I am trying to test an ASP.NET core application with this setup. However, getting .NET Core to run on the Raspberry Pi is not as easy as I thought, so I’d like to briefly outline the necessary steps.
On GitHub you will find the download links we need.
The partial keyword in C# allows you to spread a class definition across multiple files. You’ve probably seen this before when you created a WinForms application and viewed the MyForm.Designer.cs file, which contains the properties you define in the Designer. So the Visual Designer stores the entire definition of your user interface in this separate file. The class of your form itself is always marked partial. Files of partial methods must not be in different assemblies and will be merged during compilation.
The team behind GitHub has created its own interesting open source projects in addition to the web platform. One of them is Electron, a cross-platform desktop solution used for the Atom editor. Microsoft also uses Electron for Visual Studio Code.
An Electron.NET application hosts the ASP.
During the development with C# you have certainly already encountered attributes, whether consciously or unaware. Today I want to go a little deeper into what attributes are, what kind of them are already present in the .NET framework, and how you can define your own attributes.
Microsoft defines attributes as a powerful way to associate metadata or descriptive information with code. But what exactly does that mean?
Classes have, among other characteristics, fields, methods, properties, but also a state and behavior.
I have already written about the advantages of a CSS preprocessor like LESS in this post. Today I want to show you how you can easily implement support for such a preprocessor in your ASP.NET Core project. I will use Gulp to create the ability to write LESS files and convert them to CSS files so that they can be integrated into the ASP.NET Core application. Finally, I will automate the whole thing so that the LESS file is converted without manual interaction on every build.
Hey, today just a short note on a few changes to my website.
Basically I planned to take up various topics in the area of software development and to capture my thoughts on this blog. However, as you may have noticed, I have published a lot about other subjects lately. I want to return to my roots on this site, so I decided to set up a separate blog. From now on you will only find posts on software development and related topics on this blog.
There are lots of articles and even books about the art of writing clean code. But when exactly is code actually to be considered clean? Today I’d like to give you a brief overview of how you can assess and improve your code quality. I should perhaps note that writing good code, and therefore this article, is independent of the programming language used and is rather methodical in nature. However, for more detailed information, I recommend that you really get a book on the subject.
Writing down your goals is extremely helpful for really achieving them. With fixed, terminable goals with fixed intermediate steps, you make it much easier for yourself to really achieve your self-imposed goals.
Today I would like to show you a way to define your goals with the help of the so-called “Impossible List”. At first glance this list looks like an Impossible List, but it is definitely not: Joel Runyon, the author of the first Impossible List describes the classic Bucket List as a static list that was written at some point in life and usually none of the points written down really affect the life of the creator.
I have been asked all too often which programming language to learn first. And I’ve heard almost the same number of different opinions. Java or C++? Python or C#? Or maybe C?
High-level programming languages like Java offer the big advantage that the entry hurdle is very low. You can quickly put together a functional application that does what it’s supposed to do. The extensive ecosystem allows you to make rapid progress and concentrate on the functionality of your software.
With my LifeCounter app for Magic The Gathering, I released my first Android app on the Google PlayStore over two years ago. Besides my first release, this was also another milestone for me: My first real app. Over two years later, I am proud to announce a completely revamped version of the app. Several complete revisions have taken place in the meantime and I’m already planning the next one, as I admittedly tried to learn the MVP pattern with the app and now, a few months later, I’m completely dissatisfied and want to switch to MVVM.
Gold medal at the Olympics, world record holder at the 70.3 World Championships in Roth and a world champion title at the Ironman in Kona - Jan Frodeno is a name that certainly does not only ring a bell for triathlon enthusiasts. Frodeno is celebrated by the fans like no other. But who is the athlete? Today I’m reviewing his book “Winning Matters - Success through courage and passion” and try to find an answer to this question.
In his biography Frank Thelen describes the various aspects of his life. From childhood, skating, the first company foundation and private debts in the millions to successful exits, everything is included. In this article you will find a summary of some important points of the book, but for more details I suggest you take a look at the book, it’s definitely worth the time.
In Germany, Thelen is certainly best known for the TV show “The Lion’s Cave”, but from an entrepreneurial point of view, he’s already done a lot.
Today I want to show you how to use a 360° panorama picture as a skybox for Unity. As you may know, skyboxes are usually created from 6 images (cubemaps), with each image representing one of the sides. However, 360° photos usually use a so-called “Equirectangular” format, which looks something like this:
So in order to be able to use such an image in Unity, the idea of creating a cubemap from a 360° photo is obvious.
When you’re at the beginning of your career as a software developer, like me, you probably know the feeling that you’re being overwhelmed by everything you want to learn. Especially at the beginning it is often not easy to work productively and to learn why I want to show you which methodologies I have developed for myself. Even though I use my own experience, my approach is of course not limited to the industry.
Today I want to show you how to develop your first API with .NET Core.
.NET Core is an alternative to the classic .NET Framework. In contrast to the .NET Framework, .NET Core offers a huge advantage: It is platform-independent and therefore compatible with MacOS, Linux and Windows.
The purpose of this article is to build a small REST-based API, which will respond to HTTP GET-requests. Of course you can extend the project according to your own ideas and experiment around.
You might be familiar with the following situation: You are in your first job as a software developer and spend less and less time with your own projects? Or the time you spend on them is generally getting less and less? I have the problem right now and I’ve been thinking about what’s causing it and how I can work on it. Well, the main problem, in my opinion, is that I no longer have the pressure from my studies to learn to take an exam, for example.
Have you ever wondered what kind of methodology you should use to label the releases of your software? Many projects use a structure with three numbers, each separated by a dot. I have good news for you: This structure is very common and well documented. It’s called Semantic Versioning and you’ll find all the details about it here.
Building Version Identifiers with SemVer Version numbers are structured according to the X.
Almost all programming projects work with some kind of version control. When I started to work with Git, I used the tool also directly for my private projects. But especially at the beginning I found it hard to structure my commits and branches in a practical way. For this reason I would like to show you some common strategies today, the so-called Git Workflows.
Simple Workflow The simple workflow consists of a single master branch.
If you had told me a year ago that I would run an entire Tough Mudder in a year, I probably would have made fun of you. Well, to be honest, I didn’t even know about the existence of obstacle course races (OCR) of this kind at the time. If that were the case, I would certainly have been able to motivate myself quickly.
Briefly to my prehistory: I am in my early 20s and have tried various sports since my childhood.
Today I would like to give you an overview of how the garbage collector of the .NET framework works. Knowledge of it makes a lot of sense to improve your programming skills regarding object creation and lifetime.
Garbage Collection in General I want to start with some general theory - what is garbage collection and what do I need it for? Garbage collection (GC) is basically a feature that relieves developers of the work of allocating and deallocating memory for their objects.
If you already have a little experience in cross-platform development with Xamarin.Forms, you probably know the problem: Navigation between different pages works very well, but there is no easy solution to display dialog boxes overlaying an active page.
Today I want to show you how you can implement this feature in your Xamarin.Forms application. I have created an example project for this purpose, which you can download from my GitHub site.
The term MVP - Minimum Viable Product is no longer a new word. The term was first coined by Frank Robinson in 2001 and is now used very frequently.
The basic idea of an MVP is to make a version of a product available to the customer as quickly as possible. The goal is not to generate sales, but to learn. Of course it’s not a bad idea and it’s also the intention to earn money with your product, but the idea here is to put yourself in the customer’s shoes and better understand their needs and requirements.
I have already written two articles about the basics of Docker. While these should provide a general overview of you technology, I would like to illustrate a concrete application example today. I will show you the whole process, from writing a simple application to using it in the form of a Docker Container.
If you haven’t read my previous articles, you may not have the idea why you should use Docker at all.
Todays focus is on how you can test your applications automatically to detect bugs early and improve your code quality.
I want to introduce you to the concept of automated testing. In order to make the content accessible to as many users as possible, I will not use code examples and concentrate purely on the underlying idea instead. Once you understand them, you will have no problems implementing the concept in the programming language of your choice.
As a software developer, you are probably well aware of the feeling: You are overwhelmed by the amount of interesting stuff you want to test and learn. But I’m sure that this problem is also very common in other fields.
If you feel like me, you may read and watch various books, blog articles or online courses, but you won’t really keep much of their contents.
In today’s article, I’d like to help you to learn more effectively about the topics that really interest you, wasting less time.
Especially when you are at the beginning of your career as a software developer, you probably know that: You have already picked up the term “Dependency Injection”, but can’t do anything with it directly? Then today’s post is for you!
I will introduce you to the principle, functionality and the types of dependency injection. Finally, I’ll show you how to write a simple IoC container. And don’t worry if you are unfamiliar with the different terms, I will explain everything, you don’t need any previous knowledge.
After I introduced Scrum in my last article, today will be about Kanban. Like Scrum, Kanban is an agile software development methodology and I have to say that I apply the principles I present today to most of my personal side projects.
Kanban is Japanese and can be translated as “billboard”. Kanban was first introduced by Toyota in the automotive industry and is now mostly associated with just-in-time concepts. But I don’t want to bore you with historical details, I want to show you the usage in software development.
As a software developer you are certainly aware of Scrum. You may have already used Scrum or heard about it only marginally. With this article I would like to give you an overview of what Scrum is and how you can apply this methodology. Plus: You can also use many of the principles even for working on your side projects alone or in a small group.
Scrum is probably the best known process model of agile software development.
After outlining the theory behind container management with Docker in last week’s article, I would like to continue the topic in a more hands-on way today.
I’ll show you the installation and the first steps in Docker. Let’s get started!
Installation Docker is available for Windows, Linux and Mac OS. For the download you’ll need to sign up for a free account.
I would like to point out that the Windows version is not intended for production use, only for development and testing.
Most of you may already know the book by Tim Ferriss. Nevertheless, I would like to hold my thoughts here, because some approaches and concepts have really made an impression on me.
The basic idea of the book is that you can work from any location and thus combine work and travelling. The modern definition of wealth is not defined by the bank account balance, but by the ability to freely manage one’s time.
As a software developer, you’ve probably heard about Docker and perhaps already used it. But if you’re like me, you’ve been observing the topic from a distance with some interest, but you haven’t gotten into it yet.
In this article I would like to introduce you to the concept of docker and the “big picture”. This post will not be a detailed tutorial, but will give you an overview of the technology and help you get started.
When you start learning to program, you rarely think about how you will be able to work on a project at the same time with other people. By the time your side projects take on larger dimensions or you work in a team, you will be confronted with the topic of version control.
Version control is basically the management of source code, so that several developers can work on the same files at the same time.
In todays post I want to show you how to use attributes in C#. I have to apologize in advance, though, as I’m going to focus only to a limited extent on why they make sense and what you can use them for, that’s a topic for one of the following articles. Nevertheless, I would like to give you a basic understanding so that you can incorporate this concept into your own applications.
First things first: I am not a web developer and certainly not a designer. The following examples are not intended to represent good practices in terms of design or aesthetics.
It is finally time to announce my latest side project. ClubGrid was originally designed to make it easier for my coach to manage our baseball games. However, the result can be used for clubs of any kind and I hope that I can also help others with my software.
The problem we had was the organization of games and events. Some players posted their acceptance or rejection via Whatsapp, others via Facebook, some via email and others personally.
We humans tend to make ourselves comfortable. We take the easiest way we can find. But there are so many things we miss this way. In many cases it is the small things that make a big difference. Today I would like to show you how I have taken such a step and what has changed since then.
Photo by Jenny Hill on Unsplash
As a child I did athletics for several years.
There’s a very large number of articles about the repository pattern out there. Nevertheless, most of them overlap in the description and cause confusion among developers. For this reason I decided to write my own article to document my opinion.
In this article I will first clarify the what and why of the repository pattern. Afterwards I will explain how the pattern can look like in C#.
In his book, Patterns of Enterprise Application Architecture, Martin Fowler describes the Repository Pattern as a “Mediate between the domain and data mapping layers, acting like an in-memory collection of domain objects”.
How often did you tell yourself that you want to learn a specific skill and you either stopped while learning it or learned it but never managed to apply it in your workflow?
I bet you encountered both situations more than once. In this article, I’ll cover my method on how I learn new skills efficiently and actually remember the stuff I read.
In this post, I’d like to share my thoughts and experiences in learning new skilly.
Delegates and Events are powerful tools in C#, but they can definitely be confusing in the beginning. Todays article covers the basics of this topic and helps you to get comfortable implementing this approach in your own applications.
Delegates I think, the main problem is that delegates are often explained unnecessarily complicated. For this reason, I want to give you an easily understandable introduction. Let’s look at a basic delegate declaration:
Remember when you could simply download official Windows ISO images to burn on DVDs and install? Microsoft now uses this thing called ‘Media Creation Tool’ to download ISOs, but there’s a simple way to bypass this and download actual images.
When searching for Windows10 ISOs, you’ll likely find this url, which provides a download for the Media Creation Tool.
https://www.microsoft.com/de-de/software-download/windows10 But: there’s also this url
https://www.microsoft.com/de-de/software-download/windows10ISO However, when browsing this site on a windows machine, it automatically redirects you to the first of the pages I linked.
In one of my previous posts, I went over the details why I moved my blog from WordPress to Jekyll. So far, I really appreciate my new system, but I miss one particular feature: searching through my posts.
Since Jekyll is a static site generator and does not rely on a database for the posts, you can’t simply add a search functionality like WordPress does. So, I have to work with some frontend / clientside stuff.
It’s time to announce a new sideproject-launch!
Some days ago, I’ve been looking for an app which allowed my to keep track of shopping lists in a simple and fast way. While there are lots of such apps available for Android, all I tested seemed to be overkill for what I really wanted. So I decided to create my own app for this purpose.
Besides creating a simple app, my goal was to learn something new while developing the app.
I decided that it is time for some changes. When I started this blog, I decided to use WordPress. My goal was to be able to write posts without having to focus on anything other than actual writing. Wordpress was the tool of my choice due to its simplicity.
Nevertheless, I wasn’t always really happy with the CMS. Problems occurred again and again, mainly in connection with performance, loading times and general page speed.
Once again, it’s time to announce one of my side projects: Pefeggt - A boiling time calculator for eggs. Actually, I’ve been sitting on this one for quite a while and I decided to complete a working release this weekend. The app is built for Android and it helps you to calculate the perfect time you need to boil eggs to your preferred consistency.
Functionality & Usage To calculate the time, I’m using Charles D.
In today’s article I would like to give you an insight into the usage of a tiling window manager, which I will illustrate with the example of i3.
A tiling window manager divides the screen into non-overlapping areas. You are probably more used to a stack-based system where windows can overlap. However, the concept of avoiding overlapping offers a major advantage: Due to the pure operation of the computer via keyboard, it is possible to work at a faster pace after a short training period.
While being fun, programming is not easy. To be able to dive into a flow state in which you’re completely focussed on the topic, you need to cut off all distractions. With this article I would like to introduce you to my methods of working in a more focused manner and give you some tips that might make your life much easier. My experiences mostly come from the programming area, but the following tips can be extended to various other topics.
In the context of I/O 2017, Google released the Room Persistence Library, an intermediate layer between application logic and Android’s SQLite database. Using Room, you no longer have to handle stuff like network connection errors or caching yourself. Today’s article will help you get started with the library and teach you all the skills you need to implement Room in your own applications.
Background of my sample application The following code snippets are part of one of my side projects.
Traditionally, you were using a listview to display several homogeneous elements in you Android app. However, this view is now deprecated. Android now offers an alternative, which aims to increase performance by only loading those elements, that are currently rendered on-screen: the RecyclerView.
This article shows you how to get started with the RecyclerView. To make things a bit more interesting, we will be using Kotlin instead of Java.
You can set up an Android project for Kotlin by simply clicking the checkbox for Kotlin support in the new project wizard.
When using GitHub via SSH, port 22 will be used per default. However, often times you’ll see this port being blocked on public WIFI networks. On a Linux machine, there is a simple way to change the default port.
To test if our plan works out, you can use the following command:
bash >ssh -T -p 443 firstname.lastname@example.org
This will test the ssh connection by using port 443. If this returns a positive result, you can change the port in your ssh config file.
Most of the built-in operators that are available in C# can be redefined. In todays article, I’ll be showing you how you can redefine operators to match your custom classes. Additionally, I’ll cover which operators actually can be overwritten.
To create custom functionality for operators in combination with your own classes, you’ll simply need to create methods matching a specific pattern. These methods require the usage of the keyword operator, followed by the actual operator you’ll want to overwrite.
As a programmer with definite lack of visual skills, MagicaVoxel is a gift from God to create usable 3D models. Unfortunately, there is no installation option for Linux on the official website. With the help of Wine it is possible to use MagicaVoxel under Linux. And it really works great!
Installation Prerequisites As I said you need to run Wine. As stated on their landing page, Wine is a compatibility layer that allows Windows applications to run under POSIX-compliant operating systems such as Linux, macOS and BSD.
Are you one of the people who are easily intimidated by complicated-looking things? I felt a little bit like that when I saw lambda expressions for the first time. But let me tell you this: they really only look scary on the very first look. This article covers the basics of using lambda expressions and should be seen as quick introduction rather than extensive documentation.
What are Lambda Expressions? Lambda expressions somehow belong to the anonymous methods.
Xamarin utilizes the Android Debug Bridge (ADB) for debugging on physical devices, which are usually connected over usb. While this feature definitely is useful, it would sometimes be more practical if you could do this over WIFI instead.
Luckily, that is possible! You can simple switch between using USB and TCP/IP for debugging. To get started, you need to connect your device via USB to the computer you’re debugging from. I’m using Windows, so the commands I’ll execute the following commands from the commandline (which runs as an administrator), but since they are adb commands, they should be the same on Linux or macOS.
In my introductory post on git, I told you that git uses three areas to track changes. Well, maybe I lied to you in this case. There are actually four areas available and I will cover this fourth area in todays post.
The fourth area is called Stash. Basically, it works like a clipboard to which you can save current changes.
Concepts of the Stash … Imagine the following scenario: You are working on a change.
In one of my earliest posts, I wrote an introduction to version control, more specifically: git. The topic I will cover today extends this article by a topic which is actually not that complicated. However, people seem to find it hard to deal with it and use it as a highway to StackOverflow.
I talk about git reset. This command can be used to reset changes in your working area or to remove staged files from the index.
Today, I’ll talk about how you can set up PGP for Thunderbird. PGP (Pretty Good Privacy) allows you to encrypt and digitally sign your emails. I wanted to publish this post for quite some time now and thanks to some help from the 34C3, I finally managed to do it.
Pretty Good Privacy (PGP) Before we can start installing all the requirements and setting up PGP, I’d like to give you a short introduction to PGP.
In todays episode, I’ll show you how to use three advanced statements in C#. I’ll go over the so-called null-conditional operator, the null-coalescing operator and the ternary operator.
Null-Conditional Operator You can use the null-conditional operator to prevent _NullReferenceException_s. The basic principle of the operator is to return a value if it is not null, and return null if it is. The following code shows you how to use the operator, which is initiated by a question mark, followed by a dot.
Being tired of running back and forth to my 3D-printer to change stl files and starting / stopping prints, I decided to give Octoprint a shot. Octoprint basically provides a webinterface for 3D-printers, which allows you to send tasks over your local network to the printer and to monitor the prints. The software also provides a plugin functionality, so you can create your custom addons if required.
Note that you can use Octoprint for slicing, but in my case I will be starting of with only sending pre sliced stl files to print.
In this series, I go over the very basics of the C# programming language. In todays guide, I will focus on writing custom extension methods for existing, prebuilt classes.
You can use extension methods to add custom functionality to classes that are built by others. In my very case, I’d like to extend the functionality of the String class to set its first letter to upper case. I already implemented this functionality in my sideproject CryptoFolio, be sure to check out my article on the topic!
Altough the topic “Collections” matches programming in general, I’ve decided to add it to my series on mastering the basics of C#. For this reason, you will find some content here that is generally applicable, but I will also discuss different language-specific elements.
Collections support several different use cases, e. g. searching through a set for objects with certain properties, or iterating through multiple elements by predefined sorting specifications.
In the first part of this article, I will cover the two basic types of collections in C#, lists and dictionaries.
Hello Internet! Today, we will try to develop and run .NET Core Apps on a Macbook running Arch Linux! Because what could go wrong!
(Honestly, this went way better than I thought.)
Installation Before we can start writing .NET Core applications on Linux, we need to install some packages. The Arch Wiki states that to run .NET Core applications, the dotnet-runtime package needs to be installed. Additionally, we will need dotnet-sdk-2.
Comments are used in a lot of programming languages. While this concept is useful for a lot of purposes, beginners often start bad habits when commenting their code. In this article I will explain when comments are useful and on the other hand illustrate problems where commenting can be less meaningful or even disturbing.
Bad Comments … At first sight (especially at the beginning of your programming career), you might think of comments as the perfect way to describe elements of your code that you don’t fully understand.
In my new sideproject CryptoFolio, which I announced in this article, I described that I’d like to use LiteDB to locally store data that I received from the coinmarketcap-API. LiteDB is basically a NoSQL database, in particular a document store. It functions on a serverless file basis and can be accessed via a simple API.
While it is quite easy to implement the databases functionality itself, testing the resulting data structure is somewhat more difficult.
Today I would like to introduce my current side project. I’m currently developing CryptoFolio, an app that allows you to keep track of your investments in cryptocurrencies.
Functionality & MVP The first release of the application will allow you to view the current rates of the top 100 cryptocurrencies with the highest market capitalization. You can then add investments, where input, output and the date of the transaction is recorded.
Besides my series on how to get started with ServiceStack, I have already published a few articles that are related to the topic, but do not belong directly to the introductory series. In the last such article, I used the example of coinmarketcap.com to show how to access third-party APIs using the C# client.
Today, I’ll show you how to use ServiceStacks Logging API and link it to a slack channel.
In the first article of my series on using ServiceStack I mentioned the feature of the framework that the individual components can be used independently of each other.
This short article is intended as an example of how the C# client can be used separately from a custom service to communicate with third-party APIs. If you would like to know more about the client specifically, you can read my article on this feature.
You can use preprocessor directives in csharp to provide straightforward instructions to the compiler. For example, these directives allow you to execute certain code elements only under predefined conditions. Another possible field of use is simply the structuring of your source code into blocks, which can be folded in and out of Visual Studio.
In this article I will discuss some of these directives. Preprocessor directives are always started with a #-symbol.
This is the fourth part on my series on how to get started using ServiceStack. Be sure to check out the earlier articles, if you haven’t read them already:
Part 1 - What is ServiceStack and why should I use it? Part 2 - Building a Simple Service Part 3 - Using the C#-Client Today, I’ll be adding basic authentication and authorization to the project we’ve created over the last parts.
After we covered the basics of ServiceStack in part one and how to set up a service in part two of this series. Today we’ll go through how the C#-Client can be utilized to make communication between applications even easier. The sourcecode for todays article is available GitHub. If you missed one of the previous parts, feel free to check out Part 1 - What is ServiceStack and why should I use it?
What if there was a technology that could entirely change the basic elements of our society and our understanding of economy? This technology already exists and it is called crypto currency. Many people think of bitcoin when this buzzword comes up, but if you take a closer look, you will find out that the monetary point of view of the technology behind is only the tip of the iceberg.
Bitcoin and crypto currencies are currently a highly controversial issue.
This is the second post in my series on building web services with ServiceStack. In the first part, I covered the benefits of using ServiceStack, this article continues with the setup of a basic service and its several components.
In this and the following parts I will create a simple example project to illustrate the use of servicestack. This project will be an expenses tracker. In this part, we will develop the functionality to add expenses and establish an overall balance.
In this series, I discuss the optimization of the basics of programming in C#. This article deals with the basic structure of an application and its different components.
C# Application Architecture The top level always represents the so-called solution. A solution can contain several different projects, whereby a project can be used by different solutions, which allows to reuse source code. Each of a solutions projects compiles into either an executable or a dll.
This article is the beginning of a series of articles in which I want to discuss the basics of building web services and designing REST APIs using ServiceStack. This first article discusses the question of what ServiceStack is all about, the benefits of it, and why you should use (or at least try out) this framework. The following articles will then discuss the design of a simple service by using a simple example to illustrate the various possibilities it offers.
Android runs on a variety of different devices. In order to improve the way your app looks on different phones, depending on their screen size and resolution, Android offers the possibility to use different layouts for different screen sizes. This is the topic I’ll discuss in this article.
Summarizing the Demo Application First of all, I would like to briefly discuss the app, the optimization of which will be discussed below.
The dxGrid grid control for Xamarin, which DevExpress provides free of charge, is a powerful feature for mobile application development. However, many of the functions are a little bit hidden. In this article I will discuss how to customize the display of column values.
In my concrete example my grid contains a numeric column, which can contain numbers with or without decimal places. I want these decimal places to be displayed only if they exist.
View definitions under android are often used for many different controls. However, there is an easy way to recycle defined styles and use them for other controls, often saving a lot of code. So, styles basically allow you to move your repeatedly used styles out of the layout file into a styles.xml file (which is located in the values-folder). This article covers the basics of using styles on Android.
Think of the following layout, which represents two simple buttons inside a LinearLayout:
This article describes the process of creating voxel explosions in Unity by using particles. For our models, we use MagicaVoxel, but every other tool can be used as well. The final result will look similar to this:
Setting up the test environment For test purposes, I’ve set up a basic FPS environment using the built-in CharacterController package. I then added a gun model to the _FirstPersonCharacter _game object, which is located as child element in the hierarchy of the FPSController.
Some time ago, I created this game (online playable version) in Unity, and I wanted to be able to play it on my Android phone. Since the input options on the smartphone are slightly different from those on the pc, a certain amount of adjustments were necessary. I won’t go over the specific details on the game mechanics, you can check out these on GitHub, they are described in the README file.
In this post, I’ll be covering the basics of building a simple chess game in Unity and C#.
The MVP of this project will be a fully playable 3D chess game for two players. Each character will only be able to make moves that comply with the rules. After slaying a king, the game is reset. To improve the game, menu scenes, statistics and a simple AI will be added later.
As a software developer, you’ve probably stumbled across old source code you’ve written from time to time and you’ve just been thinking ‘how the hell can someone come up with such bullshit?’. I don’t see myself as an exception regarding this topic and just recently had such a case, which I would like to document in this article. More specifically, I want to discuss the decoupling of views under xamarin. The source I use in this article is available on my GitHub profile.
Everyone has different programs and tools that they particularly appreciate. One of these programs is syncthing for me, so I will briefly discuss how it works and how it is set up in this article. Syncthing is used to synchronize files between different devices and also supports versioning of these files. Syncthing is available for Windows, Android and as cross-platform wrapper. I personally use it on Windows 10, Arch Linux and Android (via Playstore or FDroid).
During my participation in various software development projects, I have noticed one thing they usually have in common. While it is often very easy to find the motivation to start a new project, many of them end up unfinished or not in a way you would like them to.
Laying Focus As you can see on GitHub, I don’t see myself as an exception, where I’ve started a lot of projects, but only a few end up finished.
In order to get professional elements, side projects, sport and social contacts under one roof, I have recently been busy designing my daily schedule to maximize my productivity. this article presents the results of my reflections.
As a software developer it is almost self-evident to work on various own side projects, which in my case are currently mostly developed in the form of Android apps. Starting with an originally simple LifeCounter for Magic the Gathering, over smaller games up to the design of websites, my GitHub profile has meanwhile reached a considerable size.
As a Windows user with Linux knowledge there are several things under Linux that I would like to have on for Windows. Since a complete switch from Windows to Linux is not feasible for me due to different requirements, I looked for alternatives. An important component of various Linux distributions is their package manager. This article discusses the implementation of such a feature under Windows and shows how it can be used.
In my last post, I’ve set up a basic RESTful service using ServiceStack. This article deals with the implementation of a corresponding functionality on the client side. The application will query the path provided by the server and apply the pre-defined authentication method, requiring the user to log in with username and password before the application delivers the desired content.
Both projects, client and server are located on my GitHub-profile and can be viewed and downloaded there.
This articles covers the basic usage of ServiceStack, a .NET-framework for creating RESTful services. The framework has a really great documentation, where you can check out all the details.
Configuration To get started, you’ll want to create a new ASP.NET project, and load the ServiceStack package via NuGet. Then, you’ll have to edit your Web.config to look like the following (mentioned versions may differ from your project):
<?xml version="1.0" encoding="utf-8"?> <!
After Kim Dotcom announced his new service, I just had to sign up for an invitation. After receiving it an hour later, I tried it out. In this article, I’ll document my experience with k.im.
I have to admit that I didn’t exactly know what I was getting into. After clicking the received URL, a very minimalistic website is displayed.
So, the service allows you to upload files. I never would have thought of that.
Due to the release of Sublime Text 3, I thought I’ll give this editor a shot. Currently, I’m using both Notepad++ and Atom. Altough I really like atom and the several useful plugins, it has one huge problem: speed. The initial loading time is one thing, over 100 mb. of RAM in idle mode is another. For quickly editing stuff, this is not acceptable.
Sublime Text seems to be a nice alternative, this article documents my switch from Atom to Sublime Text.
In this article, I’ll document the process of building an android app from scratch by using the MVP approach of clean architecture. The app itself will represent a minimalistic umpire indicator for tracking baseball games. Please consider using this in the dugout only. Since this will be a longer post, you can use the following links to jump between sections.
What is MVP? Background on the app to be built Constructing the GUI Managing interfaces Building the model Connecting view and model by adding the presenter 1.
When using github, you usually have to enter your login credentials each time you push. You could solve this problem by saving the credentials or by setting up ssh for your account. In this post, the process of adding and using ssh keys will be explained.
I’m using git bash, if you use git gui/sourcetree/etc. you should consider switching, at least for this process.
At first, SSH keys are generated. The command for this is the following:
This post represents an overview of version control with git. The mentioned commands and parameters are only a small part of what’s possible. Git is a popular system for version control. Projects on git are called Repositories. Repositories can be used local or with a server. There are several free hosters, for example:
Github GitLab BitBucket Installation Linux (Debian-based) apt-get install git-all Windows Mac Elements Git-Repositories are separated into working directory, staging area and repository.
In this series, I’ll be creating a videogame from scratch using unity. I hope that I’ll be able to keep everything understandable for beginners, but if something gets too complex, just contact me and I’ll update the specific post.
This first part covers the basic concepts of what I’ll be building, and what tools you may need.
About the game I’d like to build an arcade style, shoot ‘em up, top down shooter like space invaders.