My first C++-code I wrote was a finite-element-solver ( in short FE ) for my master-thesis. The task was complex: implement a non-linear algorithm to calculate the maximum possible load for user-defined 2D-steal structures by using the plastical capacity of steal-beams. You can use this algorithm to design much more filigree steel-structures than using only…
Tag: c#
Dealing with Legacy Code Part 2: Extract the API out of your interfaces
Think about the following situation: There is an interface / class interface / function in your application used by others which conains non-standard enums / types / whatever coming from an external API like OpenGL, DirectX, some kind of commercial API. The underlying code strongly uses this API. So using parts of this API was…
C#: Use System.Diagnostics.Trace and DbgView within a WPF-Application
One of my favorite tools to debug MFC-Applications was the Win32-call: You can use it to trace information withing your application during runtime without a log-file. You only have to run the tool DbgView to monitor these log-entries ( if you want to try it out you can download DbgView here. ) Because I am…
C#: Calling a generic from a generic with surprises
I am currently working on C# wit generics. The base concept seems to be the same as in C++ ( which I really like honestly spoken ). And I tried to use specialization. There was a class which needs to deal with special data types. And for some special cases you need a type-specific semantic,…
Getting starting with a Legacy-Code-Project
Day zero Imagine the following situation: you are starting a new job, you are looking forward to your bright future. Of course you are planning to use the newest technologies and frameworks. And then you are allowed to take a first look into the source you have to work with. No tests, no spec, which…
More Quality-Assurance on GitHub via SAAS
When you are working on Github with your project there are a lot really handy services which you can use. This kind of software-usage is called “Software-As-A-Service”. Why? You can use it via a nice Web-API without having all the maintain-work. For instance when you want to use a Continuous-Integration-Service for your project you can…
Watch your logs in your unittests!
The idea Unittests and integration-tests are a great tool not to break your code. They are building a safety-net to help you when you have to add a new feature or fixing a bug in an existing codebase. But of course there will be situations when a bug will occur which was not covered by…
Please use only one statement per assert
Do you know the assert-macro? It is an easy tool for debugging: You can use it to check if a pointer is a NULL-pointer or if your application is in a proper state for processing. When this is not the case, if will stop your application, when you are using a debug mode, in release…