Back from Australia, tired like hell and pics are up!
I’m back! Back from the land down under. It was so GREAT, but now I’m tired like hell - really really tired. The travel was very long: over 33 hours in total! This night I would have been able to get up at 3 in the morning but right now (as I type) I could sleep sitting. Jet-lag! It’s not that terrible as when I went over there but’s very present.
Today since I wasn’t able to do much I uploaded some of the pictures that I took in Australia. You can find them in the picture section of my website. These are all that I’m going to upload (in total I uploaded like over 300 pics). I hope you enjoy them
Where’s my bed?! *searching a way into the bed*
Published on Sep 29th, 2007 —
Tags: Australia
Comments (0)
digg it!
kick it
Some pictures from down under…
Finally I found some time to upload some of the pictures that we took in Sydney, Melbourne and on the Great Ocean Road. They aren’t available on my website yet but rather can be found at webshots. The galleries are named “Sydney”, “Great Ocean Road” and “A trip to Melbourne”.
When I’m back home I’ll add the pictures to my website. Reminder: program something that pulls down the RSS feed from webshots and makes them automatically available on my website
Edit: I look a lot better in real life than on these pictures. I don’t know why I have such a fat neck in them. Probably the sweater…
Published on Sep 18th, 2007 —
Tags: Australia, Great Ocean Road, Melbourne, Sydney
Comments (0)
digg it!
kick it
Starting to Australia today!
Today I’m leaving good old Italy for two and a half weeks. I’m flying to Sydney to visit my girlfriend. We are staying for two days in Sydney, then 3 days in Melbourne, then 3 days in Sydney again, then 7 days in Cairns (to visit the Great Barrier Reef and the forrest), then 1 day in Brisbane and then home again.
I don’t like long distance flights very much, but I’ll fly since my girlfriend is down there and I want to visit her.
Wish me luck! ![]()
Published on Sep 9th, 2007 —
Tags: Australia, Cairns, Great Barrier Reef, Melbourne, Sydney
Comments (5)
digg it!
kick it
Starting with game development
Ever wanted to start with game development? What technology could you use? There are several around. In the last months we have heard very much about XNA and XNA 2.0. But there are also other libraries around that are very interesting: two of them are DirectX or OpenGL.
For university a friend of mine and I had to write a small game named FishSalad. It’s a simple game and we had to write it in OpenGL. DirectX was theoretically allowed but everybody looked weird at you, if you considered using it (university life). I don’t regret having done the class and having written the game in OpenGL. The API has an easy to use model (it’s ideal to start with) and makes it easy to switch to DirectX afterwards: the calls are very similar. It’s always the same hardware in the end…
There are some very good OpenGL tutorial sites around. I like the collection of tutorials at NeHe’s site. It has all the important lessons from how to start with OpenGL (and C/C++) until how to write shaders, cool looking fogs and particle systems. Another interesting read is the OpenGL documentation: the so called Red Book.
DirectX on the other hand is also interesting if you want to program a game for Windows. There’s plenty of information on MSDN and there are a lot tutorial websites around. If you have time (and the required hardware) you should have a look at DirectX 10. The geometry shaders look very powerful and interesting.
If you want to start with XNA you should have a look at the link section at the XNA Development website. XNA Development itself has also some interesting and easy to understand tutorials. What makes XNA very interesting is the way how everybody can write small games in a few hours. Very cool!
As for techniques I really wonder when people start to implement relief mapping. It looks awesome and would be the next step after bump mapping. Anybody willing and having some free time?
Published on Sep 9th, 2007 —
Tags: DirectX, Games, OpenGL, Programming, University
Comments (0)
digg it!
kick it
Find As You Type for Internet Explorer 1.3
Sven Groot from Channel 9 and ookii has just released a new version of his famous Find As You Type.
What’s Find As You Type?
If you have dealt with Firefox you will have also seen how the page search feature is implemented there. It is an incremental search where you can type and as you type it is finding the text on the page. That’s exactly what Find As You Type does but this time for Internet Explorer. If you have installed the application you can search in Internet Explorer as you did in Firefox.
Sven is always also releasing the source code for Find As You Type. It is a great resource that shows how to create own extensions for Internet Explorer or just develop code in C/C++.
What’s new?
The new version offers several improvements and features that are very to have. The list of changes is found on the official website. For the first time Find As You Type is also available in two other languages than English: Dutch and German. I have helped Sven to translate FAYT into German.
Find As You Type is a great plug-in for Internet Explorer. I’m using it since 1.0 and I can’t tell you how much I like it!
Extension methods: Copy all files in a directory (recursive)
Extension methods are just so much fun. Somebody over at Channel 9 asked about a solution to copy all files from one directory to another. I first provided a solution that did it in C# 2.0. But why not create one that is nicer, done in C# 3.0 and uses extension methods? And that’s what I got:
{
// Copies all files from one directory to another.
public static void CopyTo(this DirectoryInfo source, string destDirectory, bool recursive)
{
if (source == null)
throw
if (destDirectory == null)
throw
// Compile the target.
DirectoryInfo target =
// If the source doesn’t exist, we have to throw an exception.
if (!source.Exists)
throw
// If the target doesn’t exist, we create it.
if (!target.Exists)
target.Create();
// Get all files and copy them over.
foreach (FileInfo file in source.GetFiles())
{
file.CopyTo(Path.Combine(target.FullName, file.Name), true);
}
// Return if no recursive call is required.
if (!recursive)
return;
// Do the same for all sub directories.
foreach (DirectoryInfo directory in source.GetDirectories())
{
CopyTo(directory, Path.Combine(target.FullName, directory.Name), recursive);
}
}
}
The usage is the following:
source.CopyTo(“C:\\users\\chris\\desktop_backup”, true);
Extension methods: I love you! ![]()
Walking a multi-dimensional array in the snail-shell way
During an interview I was asked to walk a multi-dimensional array like in the “snail-shell” way (look at the image on the right side). Today I had some time and thought I could try to implement it.
What I did is partioning it in a call that does the first four arrows in the picture. The next recursive call does the next four and so on… I have also added some escape conditions to make sure stuff is not listed twice.
That’s what I got so far:
{
static void Main(string[] args)
{
// The multi-dimensional array that is walked.
int[][] table = {
};
// Print that table.
Print(table);
}
private static void Print(int[][] table)
{
// Print out the sub table. Starting the
// recursion.
PrintSubTable(table, 0);
}
private static void PrintSubTable(int[][] table, int iteration)
{
// Check if we are over the half. Leave then.
if (iteration >= table.Length / 2.0f)
return;
// Read the first line of the iteration.
int[] subtable = table[iteration];
for (int i = iteration; i < subtable.Length - iteration; i++)
{
// Print all elements out.
Console.WriteLine(subtable[i]);
}
// Read on the right side down.
for (int i = iteration +1; i < table.Length - iteration -1; i++)
{
// Print the elements.
Console.WriteLine(table[i][subtable.Length - iteration -1]);
}
// Check if we have to leave as we would read the last read line backwards.
if (table[iteration] == table[table.Length -iteration -1])
return;
// Read the last line of the iteration backwards.
subtable = table[table.Length - iteration -1];
for (int i = subtable.Length - 1 - iteration; i >= iteration; i–)
{
Console.WriteLine(subtable[i]);
}
// Read the left side up.
for (int i = table.Length - iteration - 2; i >= iteration +1; i–)
{
Console.WriteLine(table[i][iteration]);
}
// Proceed with the sub table.
PrintSubTable(table, ++iteration);
}
}
Published on Sep 6th, 2007 —
Tags: algorithm, Programming, Puzzle solving
Comments (8)
digg it!
kick it
DNS issue (part 2)
This thing/bug/whatever is really driving me nuts… But since I’m a little bit aware of programming I thought why not to fix it somehow on my own. ipconfig /flushdns seems to work somehow and that made me think why not to automate it.
I wrote a short application that calls ipconfig /flushdns all 5 seconds. And that’s how it looks like:
{
static void Main(string[] args)
{
while (true)
{
// Sleep for a while.
Thread.Sleep(5000);
// Create a process that calls "ipconfig /flushdns".
Process p =
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.FileName = “ipconfig”;
p.StartInfo.Arguments = “/flushdns”;
p.StartInfo.CreateNoWindow = true;
p.Start();
// Read the result.
string output = p.StandardOutput.ReadToEnd().Trim();
// If the result contains "Successfully" the flush was, well, a success
if (output.Contains(“Successfully”))
Console.WriteLine(“[{0}] DNS cache flushed.”, DateTime.Now);
else
Console.WriteLine(“[{0}] ERROR: {1}”, DateTime.Now, output);
}
}
}
You need to run it with elevated privileges in Vista. However it seems to fix the problem until we get a working patch for this.





