Jun 272016
 

Yesterday I started playing Screeps and bought it even when I hadn’t finished the (free) tutorial yet. I mentioned Screeps earlier, and it’s now in an almost ready state. It’s available on Steam.

The game looks simple, but it’s not. As I mentioned before, it is only as good as the code you put into it. You can spawn creeps with certain properties, so they can harvest, or attack, or heal. But unless you run a “program” that actually uses these properties, the creep is not going to do a thing and will die without being of any use to you.
The tutorial teaches you to give a creep a role, and the behaviour of each role will be specified in a javascript file for that role.

You will make mistakes. And I don’t mean mistakes in your code, since the code will only run (of course) when it’s syntactically correct. No, I mean mistakes about how to play the game. A stupidly placed spawnpoint. Choosing a room full of swamp. Forgetting that other creeps will attack you, and you didn’t think of defending your base. Creeps will die (of old age), and you forgot to respawn them. That kind of mistakes. And with each mistake you solve, your code gets better. And meanwhile……you get better at coding!

screeps-27062016

Feb 282016
 

The WordPress plugin Broken Links Detector reported over 900 links on my blog that have some sort of problem. Meaning an URL can’t be reached or even the linked server doesn’t exist anymore. I started blogging about 12 years ago. Websites come and go, domain names change, blogs are moved to different locations. The internet changes constantly.

Feb 262016
 

My server was dead. Not even a little blink from one of the many LEDs in the system or some other sign of life when putting the power on it. So I figured that replacing parts would be like a puzzle. Is it the power supply? The motherboard? The CPU? Or a combination of any of the parts? Replacing one of them would easily cost me about 100 euro. So I did some math, and figured that hosting was not only a relatively cheap solution, it also has many advantages (that all of you IT people can list better than me).

I went with DirectNIC, since I have been using their services for over 15 years now.

And as you can see, it just works. I had to do some work to restore the WordPress database, since the last backup I had on my NAS disks was from the end of 2015. But with some diskswapping, file copying, MySql-dumping+importing and WP-CONFIG changing it now works.

I’m happy!

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 262015
 

Since the server is back online (still going strong) WordPress began to nag me again about a new version being available 😛 So I decided to upgrade. WordPress itself and 3 plugins. Worked like a charm. No hangs or freezes. Yay! Guess buying new memory for the server will be on my to-do list right after Christmas.

Dec 252015
 

The server is having problems. Installed an extra NIC, to rule out problems with the onboard NIC, but that didn’t solve the problem. Removed the memory DIMMs now, and replaced them with two out of my desktop machine, since that had 4x4G and I don’t really use it at the moment. So they both now have 8GB internal memory. The desktop memory is Corsair Vengeance, the server memory was some value ram. Hopefully the Vengeance dimms will solve the system freezes.

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 162015
 

When you are a developer, you probably know this problem: you need to send mails from your application, but you cannot just use your company’s mailserver for developing/testing purposes. So you end up using Gmail or even installing a mailserver on your development PC.

When you’re using Windows, you probably don’t need to. There is this great *free* tool that enables you to receive mail via SMTP. It does not send mail, but you can view what the mailmessage was, including a option to view the headers etc. It’s called Papercut. It hides conveniently in your system tray. Go check it out!