Deze post is geïmporteerd van de oude blog en is nog niet geconverteerd naar de nieuwe syntax.
The A* algorithm works with two lists, an open-list and a closed-list. The open-list is the list of nodes to be checked, while the closed-list already has been checked. Each node also gets scored with F, G and H-scores.

F-score: Total cost for a node (G-score + H-score).
G-score: Movement cost.
H-score: Estimated movement cost.


In my demonstration program I used pixels as nodes in a grid-based map. A rule the pathfinder had to obey was it could only move horizontally and vertically.

We start with a begin point and an endpoint, a map and we know which nodes are not passable.



The first step in A* is to add the start point to the closed list, and examine its neighbors.

We ignore it if it’s an obstacle or already on the closed list. When it’s not yet on the open-list, we add it to the open-list, and when it’s already on the list, we check of the G-score isn’t lower than the current G-score. If the score is lower, we change the parent of the node.



These steps are repeated until the goal-node is added to the open-list.

Thanks to the parent information of each node it is possible to reconstruct the shortest path from end to start.



The most important information for the algorithm is that it has to know the node with the lowest F-score, because this is most likely the one leading to the shortest path, and the one which will be added to the closed-list during the next iteration.

Because the pathfinder has to be fast, the data structure used to store these values has to be very fast as well. That’s why a binary heap is used in combination with A*.

(Other data structures can be used, but this solution proved to be the fastest on a 200 * 200 map)

 
Deze post is geïmporteerd van de oude blog en is nog niet geconverteerd naar de nieuwe syntax.
The first task I got during my internship was to manage a meeting of the Microsoft Student Council. This was also the start of my internship, the real thing from the beginning.

The Microsoft Student Council is a Microsoft program focused towards students. Its goals are to support dedicated students who are willing to work with new technologies and are passionate about learning new things. Every student is able to join the council, without any costs. The only requirement consists out of the students coming to Microsoft, instead of Microsoft asking students to join. In other words, if you are motivated, you can be part of it.

The council organizes four meetings a year, each with a different theme. These students also get the opportunity to attend Microsoft seminars and to get involved in discussions with Microsoft developers. Nowadays there are about 100 students who are part of this council.

Besides organizing training and meetings, the Microsoft Student Council also tries to get students involved in various competitions and challenges, trying to spark the students’ interest for new things. This results in a good community-feeling among the involved students, learning each other new things.

On the 11th of February 2005 the second meeting took place, having Digital Entertainment as its theme. Due to an unexpected absence of the person organizing it, I was assigned to manage this meeting during the day.

Practically this meant I had to provide the required information for everyone on the SharePoint site used by the council, provide a route description, act as a contact person for the speakers, welcome everyone on the meeting, close the meeting at the end and make sure all speakers follow their assigned speaking times.

I also was a speaker myself during this event. My talk was about Game Programming - AI in Games, in particular about the A* pathfinding algorithm and using a binary heap as data structure.

Pathfinding is very important in gaming, because it is used a lot it has to be as fast and efficient as possible. A good pathfinder can be used to calculate distances as well.

For navigation, the A* algorithm is used to find the shortest path.



Note to blog readers: Because I'm writing all of this in Word, I can't paste it into .Text without the layout getting screwed up, so I removed some table formatting and images. I do try to make readable though ;)
 
Deze post is geïmporteerd van de oude blog en is nog niet geconverteerd naar de nieuwe syntax.
As some of you might now, I'll be doing my internship at Microsoft.

One of the things I'm supposed to do, is blog about my time there.

So, because of this, there is now an MS Internship category on my blog.

Of course not everything I do will be posted, but I'm sure there will be enough :)


I'm really looking forward working there!
 
Deze post is geïmporteerd van de oude blog en is nog niet geconverteerd naar de nieuwe syntax.
Alright, currently it's a very busy time, but some people asked for more info about the previous DevDays 2005, so here is my attempt :)


First of all, I haven't taken any pictures this time, because I had to give my bag away at the start, and the camera was in there.

The first presentation after Bill Gates' keynote was by Philippe Destoop about Closing The Gap Between Development And Operations: A Developer's Perspective.

The main problem lies withing a lack of communication between developers and operations. Depending on the size of a company Operations has either little power or unlimited power. In either case, not talking to Operations can lead to your company suffering loss when your application crashes, or when Ops have a lot of power, prevent your app from being deployed.

The solution to this is to work together with Ops during development and to make them like your app ;)


You do this by communication a lot and by implementing monitoring and control functionality into your app, to be used by Ops later on.

The good thing is, a lot of the code needed to do this already exists, in the form of the Enterprise Library. More particularly, the Logging and Instrumentation Application Block.

Using this block you can raise events and timed events to about anything you want. Making it possible for Ops to receive these events in their monitoring programs and do something with it.

You can view some examples of code in the presentation.

Next presentation was IT Fortress: Developing On A Secured Infrastructure by Raf Cox.

He talked about security, first examine what you want to protect and why, then choose a technology to protect it with, and don't be shy of using built-in technology of the OS, it's better then re-inventing it.

In a secure environment you have to be aware as a developer that your application isn't as "free" as it might be in your development environment. It can be run as a normal user, not fully trusted, with limited network access.

You always have to think about possible security bugs, if you don't, they will be there and hackers will know them.

After this he explained the possible authentication choices in Windows, how Basic Authentication, SSL and Kerberos works.

You can use Windows for authorization as well. By using the Authorization Manager it is possible to define common roles in your organization with common used operations and define their permissions in the manager in a central place. After this applications all can use this information.

Last part of the presentation was about using least privilege. You can read all about it in the presentation.

Third presentation of the day was by Clemens Vasters about Interop & Integration: Best Practices For SOA With Today's Technologies.

During this presentation everything that has been shown is readily available, no future products were used, which is a nice thing for a presentation! :)


The presentation was based on a demonstration example to explain how service-oriented architecture works.

Basically every functionality in the example is a service, when you take a look at the big overview it looks like a very modular system where each service has one well-defined task and works together with other services.

Some properties of these services are autonomy, where each service control and hide their state, services also are never hard linked to each other and are platform independent, so no returning DataSets.

Services also contain "edge code", which is code specifically written for the borders, and do nothing but forward to the real code that handles the logic, which are basic classes.

This was a very energy-rich session, with a lot of new information, which is still being processed by my brain :)


You can view all the diagrams in the presentation.

Next presentation was Best Practices For Windows Forms Development by Marc Ghys and Bart Debeuckelaere.

The first issue was to improve performance for Smart Clients. This can be done by using a lot of caching, compress the SOAP messages, and possibly use ngen.exe to precompile your assemblies. Also when you have to do something intensive, do it when the user expects it, for example, make a web-service call when a user clicks a submit button while showing a loading msg, and not when he leaves a textbox for example.

Next was how to secure webservices, by using the integrated authentication mechanisms in Windows and by using WSE.

Other things during this presentation were creating your own controls to provide a consistent look and feel in your application, using code generation to save time and to have consistent code. Then some info was given about ClickOnce, but the demo failed and then the time was up. But you can view the presentation for more info.

At the end of the day there was a community block left. These were the Lightning Talks where I talked about Alternate Data Streams. And these are the only photos I have of the day, taken by Tom Mertens, tnx!



This concludes day 1, tomorrow I'll try to do the same for day 2, I also ran out of time now ;)
 
Deze post is geïmporteerd van de oude blog en is nog niet geconverteerd naar de nieuwe syntax.
The Developer & IT Pro Days 2005 are over, as well are my exams.

During day 2 we saw what is going to come with the next .NET version (partial files, generics, ClickOnce, ...) and what mistakes an admin can make in his IT setup and how to fix them.

The last one was really funny, but sadly enough those mistakes are often made, running SQL Server as SYSTEM, SQL Injection, simple passwords, no defense in depth, logging on as domain admin, ...

My exams are also over now, the last one of my current education, coming up next is a 3-month internship at Microsoft.

And just like Tom's doing, here is a picture of the Channel 9 guy, sitting together with the Azlan mascot on the tower of stuff I had to learn these last 3 weeks for my exams :)