Feb 172021
 

So, I started looking into Unity development. Thereby combining my development skills (which I have plenty, in total 30+ years of experience) and creating graphics.

I created a simplified (understatement) version of Angry Birds by following this tutorial. As an extra, I created a simple start screen. See me playing the game and actually sucking at it. But hey, I didn’t do any level optimization yet, so it is not as easy as it seems.

The monsters only die (for now) when I hit them, or when a crate falls straight on top of them, or at a maximum angle of 45 degrees.

The game was created in a couple of hours. Almost everything is new, except of course the C# language.

Aug 202016
 

Gaming is a way to relief stress and not think about daily life. Lately, even gaming can’t keep me interested. But my mind is busy all day long with all kinds of stuff, so yesterday I gave mindmapping a try. A mindmap for what is needed to create a gameserver. A server that keeps track of the users, their progress, serves the game itself to the clients, etc. One thing a gameserver needs is a way to store all that data, so a proper database is needed. So I looked at several candidates and in the process I came across Redis. Maybe not the easiest backend database when you need graphing for social features, but absolutely the perfect toy to keep my mind occupied for some time.
Redis has enough client APIs, like most databases. Let’s see if we can use the C#/.Net API from within Unity. Touch/collect this item and increase a value in the Redis database: the XP of the user playing the game.

I will probably create nothing for real, but it’s nice to be not bored for some time.

Jan 082016
 

I was looking for icons to use in MenuItems in a WPF menu and found that there are a lot of questions on how to do that. It’s not very difficult, so maybe the documentation is not too clear about it.

Create a folder in your project, for example “res” or “resources” or “images”. Put some graphics files in there by right-clicking on the folder, choosing Add and then choosing Add existing items.

To use these images in your XAML, follow this example:

 <MenuItem Header="E_xit" Click="btnCancel_Click">
   <MenuItem.Icon>
    <Image Source="Resources/Exit.png" Width="20" />
  </MenuItem.Icon>
</MenuItem>

In my project, the images are in the Resources folder. And that’s all there is to it.

Dec 102015
 

As .NET developers we all know the problem: an external library/framework comes in an x86 and in an x64 flavor, so referencing one excludes building for the other and vice versa. Here’s an excellent blog post how to solve that. What surprises me, is that this post is from 2010, and Visual Studio still does not support referencing both platforms in one go.

Nov 122014
 

In case you missed it, Microsoft created a free version of Visual Studio 2013, named the community edition. You can create free or paid apps (and more), with restrictions when you use this version within a company. No such restrictions for the individual!

Download Visual Studio 2013 Community Edition

Thank you, Microsoft.

BTW I like this checkmark:

Visual Experience options

Visual Experience options

May 162014
 

I created the dynamic webservice. So far so good. Solved some hard to find problems (at least, Microsoft doesn’t tell you that these problems will arise). Now for the big finale. WCF in all its wisdom caches WSDL requests. Let us repeat that all together now: WCF caches WSDL requests. And there is no way to tell WCF to not do that, or for that matter to empty the cache. The only way to do that, is to recycle the application pool the service is running in, or (of course) to recycle IIS. It’s that bad.

I tried several methods: messageinterceptors, creating extra instances of the service, etc etc but there’s no way to work around the cache. Once requested, the WSDL is written in stone.

We serve web services that have a customerbased configuration. A customer gives us a data file, which will be the source for their endpoint. In our application is defined which columns are served to the respective methods. But all clients have the same set of methods (web operations). So the wsdl generator looks at the user that is logged in (custom servicebehavior), fetches the relevant column names from the database, and modifies the wsdl accordingly. Every customer is served its own data with its own choice of columns. Works perfectly. Until you change the set of columns and don’t restart the service. No problem on my development laptop or on the test machine, but a big problem if we want this in live in production.

At a dead end with this now. Looking for an alternative. But so far, none of what I find actually works.

Apr 042014
 

First things first: my trial period is over, so since this month I’m a “real” employee of Olbico 😉

I’ve created dynamic web services. Turned out to be a bit more difficult then I expected, since the requirements were quite strict: secure communication, but no client-installs, and the response had to be dynamic, specific for the user that logged in.

First problem was that the default serializing of dynamic objects in WCF doesn’t quite work like you would expect (you can’t deserialize the XML to a proper object anymore), so a custom serializer for the dynamic objects (to be used in the response).

To further complicate things, the WSDL needed to be user-specific. A users logs in and request his/her WSDL. This turned out to be not too difficult, except for the “logs in” part. We didn’t want to work with client certificates, but we had decided to create some security by communicating over HTTPS. To do that with WCF, I needed to create a custom user-authenticator that supports a username/password digest in the request-headers. Google is your friend!

So customers now have (well: will have, it’s not in production yet) their own WSDL, and they can create strong-typed clients on their side, and all data is transferred over in an encrypted way. YEAH!

From our point of view, we only have to maintain one web service/endpoint. All configuration is done in the database. So a new customer gets a login, we define what can be requested (that’s a subscription/payment thing), and the web service now does the rest. No reconfiguration needed. Double YEAH!!

Mar 072014
 

The new job is very nice. I’ve been put in charge of a part of their (I should say “our” now) software, and the task is to renew it. It’s a web services based piece of software, and the services need rewriting. They must be dynamic, and so does the contract (WSDL). That was more of a challenge than I anticipated, but today I got it both to work. Serializing dynamic objects in a proper way (not string arrays of keys combined with string arrays of values), and when the WSDL is requested the same dynamic magic takes place to give each user a customized contract.

All done in C# (WCF) running in IIS.

This week I installed the trial version of ReSharper in Visual Studio. That’s a big enhancement, and speed increaser. Some things are possible in vanilla Visual Studio as well, but not as well thought out and automatic. So maybe I’ll ask for it to be bought. Another 3+ weeks to try it out more.

Friday is hamburger day at work. One of my colleagues took on the task to bake burgers on our toaster/grill. Every Friday. So that’s a treat every week, since he’s very good at it. It was a quiet Friday, but productive. Must be because of the burgers 😉