diff --git a/_posts/2005/02/a-tragedy/index.md b/_posts/2005/02/a-tragedy/index.md new file mode 100644 index 0000000..9274c43 --- /dev/null +++ b/_posts/2005/02/a-tragedy/index.md @@ -0,0 +1,14 @@ +--- +title: "A tragedy" +date: "2005-02-09" +--- + +I just learned that a very good friend of mine, Ronny Brekke, was found dead in Oslo under a bridge. + +This is one of the more painful experiences I've ever had to go through. Ronny was more than just a friend, a person that completed me and my own personality and I'm confident he felt the same. + +Ronny was a very skilled programmer with a great deal of real life experience in the area. His approach to his skill and life always amazed me. After loosing his sister, which he was very close to, he struggled but had the insight to see that he struggled and did actions to come out of it. Mid 2004 he lost his father to cancer and had a down period that me managed to take control over in much the same manner he had done before. + +Ronny was always a positive person and wanted to try out new things all the time. He did a lot of writing. Either it was blogs, poems, stories, they always had a certain quality with them that you seldomly find. + +You will be greatly missed!  My heart goes out to his family, his friends and other loved ones. This is surely a great tragedy and a great loss to the world. I allready miss you! diff --git a/_posts/2007/03/vsto-2005-second-edition-blog-entries/index.md b/_posts/2007/03/vsto-2005-second-edition-blog-entries/index.md new file mode 100644 index 0000000..3ac158f --- /dev/null +++ b/_posts/2007/03/vsto-2005-second-edition-blog-entries/index.md @@ -0,0 +1,6 @@ +--- +title: "VSTO 2005 Second Edition Blog Entries" +date: "2007-03-20" +--- + +I've been working a couple of months now with VSTO 2005 Second Edition with a primary focus on addins for Outlook. I will be putting out some blog entries every so often on the subject. I might even have a library in the brewing for helping developers getting up and running with creating cool features for office applications diff --git a/_posts/2007/03/wholy-cr-its-been-a-while/index.md b/_posts/2007/03/wholy-cr-its-been-a-while/index.md new file mode 100644 index 0000000..c3c00f0 --- /dev/null +++ b/_posts/2007/03/wholy-cr-its-been-a-while/index.md @@ -0,0 +1,11 @@ +--- +title: "Wholy Cr.... It's been a while" +date: "2007-03-20" +categories: + - "general" + - "personal" +--- + +Where did time go?? + +It's been close to 2 years since my last post..   What happened?    I'll tell you what happened..   5th of March 2005 I became a dad to a beautiful little girl called Mia. We're now expecting another baby in May, so I have to hurry up with blogging till then, seeing that I tend to be totally thrown off for a couple of years when having a baby.. :) diff --git a/_posts/2007/04/game-camp-norway-gets-sponsored-by-telligent/index.md b/_posts/2007/04/game-camp-norway-gets-sponsored-by-telligent/index.md new file mode 100644 index 0000000..775852a --- /dev/null +++ b/_posts/2007/04/game-camp-norway-gets-sponsored-by-telligent/index.md @@ -0,0 +1,10 @@ +--- +title: "Game Camp Norway gets sponsored by Telligent" +date: "2007-04-24" +--- + +We're in the midst of startup for Game Camp Norway and are looking around for sponsors to help us get everything up and running. + +Our first official, and probably the most vital at this point is Telligent, the company behind the brilliant Community Server (the same server this blog is running on). We've received a full professional license to host Game Camp on. + +Thanks again for your support! diff --git a/_posts/2007/04/game-camp-norway-starting-up/index.md b/_posts/2007/04/game-camp-norway-starting-up/index.md new file mode 100644 index 0000000..4804a23 --- /dev/null +++ b/_posts/2007/04/game-camp-norway-starting-up/index.md @@ -0,0 +1,15 @@ +--- +title: "Game Camp Norway starting up" +date: "2007-04-12" +categories: + - "csharp" + - "xna" +--- + +After visiting the Microsoft Canadas' DevelopMental site (got a tip from Rune Grothaug at Microsoft Norway), I figured out I'd better start a Game Camp seeing that I'm all into game development and have waited for an opportunity to get the word out about creating games using C# and the .net framework. + +Game Camp Norway can be found at : [http://www.gamecamp.no](http://www.gamecamp.no/) - The site will be entirely in Norwegian, so I guess only a few of you will find it interesting to read. \[:)\] + +The site has much to be desired as for a new design/template and a logo and so forth, and there is pretty much no content there as of today. But we have started, have the domain, have the server, the mailserver, the web community server..  Getting there.. + +Keep your eyes on the site if you find it interesting (and now how to read and understand Norwegian). diff --git a/_posts/2007/04/how-to-build-an-impossible-team-foundation-server-environment/index.md b/_posts/2007/04/how-to-build-an-impossible-team-foundation-server-environment/index.md new file mode 100644 index 0000000..4a0bbc4 --- /dev/null +++ b/_posts/2007/04/how-to-build-an-impossible-team-foundation-server-environment/index.md @@ -0,0 +1,38 @@ +--- +title: "How to build an impossible Team Foundation Server environment." +date: "2007-04-20" +--- + +It all started off innocently enough. The idea of having my own TFS environment instead of scaling down to CVS or similar. I've always had a server or two standing around doing basically nothing except hosting some mail server and lately I've scaled down from kick-ass configurations to laptops. The advantage of using laptops is that mobile CPUs are pretty fast considering, they have a lot of cache, they have little or no noise, they take up little space so you can put them just about anywere. Anyhow.. I had my setup with a DELL Latitude D505 running a Win2003 server acting as a primary domain controller and an Exchange 2003 server on top of it. Cool enough. Then I started fiddling about with the idea of starting up the gamecamp thing (read my previous post) and thought I get a community up and running including a team system for developers to join in on. TFS sprung to mind and seeing that I just love working with TFS at work, I decided that it was the preferred system. Now the fun begins.... + +TFS does not at all support installing itself on top of a domain controller. MIcrosoft removed the ability, or should I say put the breaks on for doing it on the BETA3 release of TFS. After struggling a couple of days with some pretty hairy ideas of forcing it on the domain controller, no matter what the installation said I gave that up and figured I needed another laptop for my project. I happened to have a DELL Inspiron 4100 which consisted of a PIII Mobile CPU running 1GHz with 256MB of memory. Needless to say by todays standards, this is not exactly the most speediest computer in town. Anyhow, that was the laptop I had and I started with a determined mind. After a couple of hours of installation I finally had a computer running Win2003, SQL 2005 Standard Edition, SharePoint Services 2.0 Service Pack 2 and the TFS on top of everything installed in a single server deployment. Remember, still only 256 MB of memory..  Ran pretty smooth as well, even though Microsoft minimum recommendations are 2GB of memory. Even though this worked, I decided I better try to delegate some of the tasks to my other laptop running the DC which already had the SQL 2005 installation (hosting this blog, for instance). That should be a piece of cake, I thought. A couple of months ago we did a server move for the TFS at work and ran the tfsadminutil console application and moved around stuff, and that was pretty straight forward..  + +Heres how to do it all : + +Assumptions for this setup: the recommended accounts (tfssetup, tfsservice, tfsreports) are domain accounts existing on the domain controller and are available. I also made them part of the Domain Admin group, but this is probably not necessary and considered a security risk (some people probably think I should be shot for doing this. :) ) + +\* Detach your SQL databases (if you want to move the SharePoint databases, detach those as well, same goes for the Reporting Services databases) + +\* Copy the databases to the other server and attach them, and yes, it can be a domain controller.. :) + +\* Go to your TFS server and open up a CMD and go to c:Program FilesMicrosoft Visual Studio 2005 Team Foundation ServerTools + +\* Run the tfsadminutil with the renamedt argument (see the documentation of the util) + +\* If  you moved the reporting database you have to now go to the Reporting Services Configuration utility on your TFS computer and reconfigure it to work with the databases attached to the other SQL server. There is also a possibility of just hosting the Reports on the other server as well, then you have to modify 2 rows in the tbl\_service\_interface table in the TFSIntegration database on the SQL server. The two rows are named ReportsService and BaseReportsUrl. Modify these URLs to point to the Report server you wish to use. + +\* Now.. SharePoint needs to be configured, if you moved these databases. Open up the SharePoint Admin site and go the "Set configuration database server" and enter the new database information, remember that you can't change the authentication mode, it has to be the same as before the move. + +\* After changing the location of the configuration database, you need to remove the old content database and add the moved one. Go to "Configure Virtual Server Settings" on the Admin and choose the site that was configured for SharePoint (usually Default Web Site). Select "Manage content databases". Remove the existing (default : STS\_Content\_TFS) and add the newly moved one. + +If you worked out all the kinks during every step and verified every step you might be the lucky owner of a dual TFS setup with one half installed on a domain controller. + +My setup is now close to what I'd call optimal for my purposes. :)  I could probably do with a bit more memory for the TFS server, but it's all very responsive. + +It can be done. + +Alternatively, you can just go ahead and either intercept WMI when the setup selects into the SystemInformation object and asks the domain status for the computer and just give it a value the setup can live with or temporary replace the WMI object during setup with an object it will accept and go ahead and install. That ofcourse is a bit risky (I managed to wipe out mine on one of my Vista machines). + +Ofcourse, there is a third option, go and install TFS on a recommended setup. But then there's just no fun.. + +Have a nice weekend! diff --git a/_posts/2007/05/3d-in-silverlight-1-1-alpha/index.md b/_posts/2007/05/3d-in-silverlight-1-1-alpha/index.md new file mode 100644 index 0000000..c7f85e1 --- /dev/null +++ b/_posts/2007/05/3d-in-silverlight-1-1-alpha/index.md @@ -0,0 +1,34 @@ +--- +title: "3D in Silverlight 1.1 Alpha" +date: "2007-05-18" +categories: + - "net" + - "csharp" + - "gamedevelopment" + - "xna" +tags: + - "silverlight" +--- + +Being a game developer at heart, my first instincts whenever a technology comes out that have visuals to it is to figure out a way to create some cool 3D stuff.. + +Silverlight proved to be a challenge doing this seeing that Microsoft dropped all of the subset of XAML that has to do with 3D. But fear not, it has the polygon visual...    That means we can do a lot of fun. + +I've published an early version of my 3D engine at the following URL : +[TestPage.html](http://localhost:8080/silverlight/3D/TestPage.html) + +In order to run it, you need the Silverlight 1.1 Alpha runtime, it can be +downloaded at the following location : +[http://msdn.microsoft.com/vstudio/eula.aspx?id=e2c1a44f-0b5c-face-28c8-08a26f2e0b3c](http://msdn.microsoft.com/vstudio/eula.aspx?id=e2c1a44f-0b5c-face-28c8-08a26f2e0b3c) + +It should look something like this : + +![Silverlight 3D - First Shot](/photos/sample/images/86/425x394.aspx "Silverlight 3D - First Shot")  + +I will be publishing the source for the solution when I have it looking a bit better. + +On to making texturemapping a reality ... :) + + + **UPDATE, 13th of June 2007 : +**SourceCode is out. Read more about it at : [http://www.dolittle.com/blogs/einar/archive/2007/06/13/balder-3d-engine-for-silverlight-source-code-is-out.aspx](/blogs/einar/archive/2007/06/13/balder-3d-engine-for-silverlight-source-code-is-out.aspx) diff --git a/_posts/2007/05/a-bug-in-silverlight-1-1-alpha-polygon-visual/index.md b/_posts/2007/05/a-bug-in-silverlight-1-1-alpha-polygon-visual/index.md new file mode 100644 index 0000000..58145dc --- /dev/null +++ b/_posts/2007/05/a-bug-in-silverlight-1-1-alpha-polygon-visual/index.md @@ -0,0 +1,14 @@ +--- +title: "A bug in Silverlight 1.1 Alpha Polygon Visual?" +date: "2007-05-30" +categories: + - "net" + - "csharp" +tags: + - "silverlight" +--- + +I'm working on my 3D engine still and all of a sudden all my polygons didn't show up on the screen. +After some hours of debugging I figured out what the problem was. At one point yesterday I removed some casts I had for setting the points for the polygons. The Point class in Silverlight has X and Y as double but the rendering engine does not seem to manage this at all. I have to cast it to int before I use them and remove all decimals. + +This clearly can't be "by design". diff --git a/_posts/2007/05/cross-appdomain-singleton/index.md b/_posts/2007/05/cross-appdomain-singleton/index.md new file mode 100644 index 0000000..494ff87 --- /dev/null +++ b/_posts/2007/05/cross-appdomain-singleton/index.md @@ -0,0 +1,301 @@ +--- +title: "Cross AppDomain Singleton" +date: "2007-05-18" +categories: + - "net" + - "csharp" +--- + +**PS: There is an addition to this post that you can find [here](http://ingebrigtsen.blog/2007/05/30/crossappdomainsingleton-update/)** + +One thing that I find a bit inconvient from time to time is the lack of shared memory between appdomains. Today I figured I had to find a way of doing this, so I created a CrossAppDomainSingleton class that has it's implementation and data shared between AppDomains. + +The solution we want is that the singleton class is created in a given AppDomain and in all other AppDomains we get a transparent proxy to that singleton. + +In order to do this we need to have the ability to enumerate through existing AppDomains in order to create an instance in the correct AppDomain (at least I found this to be cool way of doing it). I came across a thread on microsoft.public.dotnet.framework.clr that gave me a good solution ([http://groups.google.com/group/microsoft.public.dotnet.framework.clr/browse\_frm/thread/dba9c445ad8d5c3/9df14bf0af393c28?lnk=st&q=enumerate+appdomain+group%3Amicrosoft.public.dot%20net.\*&rnum=5#9df14bf0af393c28](http://groups.google.com/group/microsoft.public.dotnet.framework.clr/browse_frm/thread/dba9c445ad8d5c3/9df14bf0af393c28?lnk=st&q=enumerate+appdomain+group%3Amicrosoft.public.dot%20net.*&rnum=5#9df14bf0af393c28)) + +You need to add a reference to the mscoree.tlb which is situated in the .net directory (c:windowsmicrosoft.netframeworkv2.0.50727). When you add a reference to it you'll get an Interop.mscoree.dll added to your output directory. You will have to have this alongside your deployment if you're going to use this in a solution. + +With my modifications, we get a method that finds a AppDomain based upon the friendly name. If it doesn't find it, it returns null.. + +private static AppDomain GetAppDomain(string friendlyName) + +{ + +IntPtr enumHandle = IntPtr.Zero; + +mscoree.CorRuntimeHostClass host = + +new mscoree.CorRuntimeHostClass(); + +try + +{ + +host.EnumDomains(out enumHandle); + +object domain = null; + +while (true) + +{ + +host.NextDomain(enumHandle, out domain); + +if (domain == null) + +break; + +AppDomain appDomain = (AppDomain)domain; + +if( appDomain.FriendlyName.Equals(friendlyName) ) + +return appDomain; + +} + +} + +finally + +{ + +host.CloseEnum(enumHandle); + +Marshal.ReleaseComObject(host); + +host = null; + +} + +returnnull; + +} + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
  private static AppDomain GetAppDomain(string friendlyName)
+  {
+   IntPtr enumHandle = IntPtr.Zero;
+   mscoree.CorRuntimeHostClass host = new mscoree.CorRuntimeHostClass();
+   try
+   {
+    host.EnumDomains(out enumHandle);
object domain = null; while (true) { host.NextDomain(enumHandle, out domain); if (domain == null) { break; } AppDomain appDomain = (AppDomain)domain; if( appDomain.FriendlyName.Equals(friendlyName) ) { return appDomain; } } } finally { host.CloseEnum(enumHandle); Marshal.ReleaseComObject(host); host = null; } return null; }
+ +The full implementation of the class is then : + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
 public class CrossAppDomainSingleton<T> : MarshalByRefObject where T:new()
+ {
+  private static readonly string AppDomainName = "Singleton AppDomain";
+  private static T _instance;
private static AppDomain GetAppDomain(string friendlyName) { IntPtr enumHandle = IntPtr.Zero; mscoree.CorRuntimeHostClass host = new mscoree.CorRuntimeHostClass(); try { host.EnumDomains(out enumHandle);
object domain = null; while (true) { host.NextDomain(enumHandle, out domain); if (domain == null) { break; } AppDomain appDomain = (AppDomain)domain; if( appDomain.FriendlyName.Equals(friendlyName) ) { return appDomain; } } } finally { host.CloseEnum(enumHandle); Marshal.ReleaseComObject(host); host = null; } return null; }
public static T Instance { get { if (null == _instance) { AppDomain appDomain = GetAppDomain(AppDomainName); if (null == appDomain) { appDomain = AppDomain.CreateDomain(AppDomainName); } Type type = typeof(T); T instance = (T)appDomain.GetData(type.FullName); if (null == instance) { instance = (T)appDomain.CreateInstanceAndUnwrap(type.Assembly.FullN ame, type.FullName); appDomain.SetData(type.FullName, instance); } _instance = instance; }
return _instance; } } }
+ +This class is not thread safe, so that bit needs to be added.. + +To use the class you do the following : + +
1
+2
+3
+4
+5
+6
+7
+8
 public class MySingleton : CrossAppDomainSingleton<MySingleton>
+ {
public void HelloWorld() { Console.WriteLine("Hello world from '" + AppDomain.CurrentDomain.FriendlyName + " (" + AppDomain.CurrentDomain.Id + ")'"); } }
+ +Look at the entire C# sample file from [here](http://localhost:8080/wp-content/2014/10/crossappdomainsingleton1.zip) + +private static AppDomain GetAppDomain(string friendlyName) private static AppDomain GetAppDomain(string friendlyName) + +{ + +IntPtr enumHandle = IntPtr.Zero; + +mscoree.CorRuntimeHostClass host = + +new mscoree.CorRuntimeHostClass(); + +try + +{ + +host.EnumDomains(out enumHandle); + +object domain = null; + +while (true) + +{ + +host.NextDomain(enumHandle, out domain); + +if (domain == null) + +break; + +AppDomain appDomain = (AppDomain)domain; + +if( appDomain.FriendlyName.Equals(friendlyName) ) + +return appDomain; + +} + +} + +finally + +{ + +host.CloseEnum(enumHandle); + +Marshal.ReleaseComObject(host); + +host = null; + +} + +return null; + +} + +{ + +IntPtr enumHandle = IntPtr.Zero; + +mscoree.CorRuntimeHostClass host = + +new mscoree.CorRuntimeHostClass(); + +try + +{ + +host.EnumDomains(out enumHandle); + +object domain = null; + +while (true) + +{ + +host.NextDomain(enumHandle, out domain); + +if (domain == null) + +break; + +AppDomain appDomain = (AppDomain)domain; + +if( appDomain.FriendlyName.Equals(friendlyName) ) + +return appDomain; + +} + +} + +finally + +{ + +host.CloseEnum(enumHandle); + +Marshal.ReleaseComObject(host); + +host = null; + +} + +return null; + +} diff --git a/_posts/2007/05/crossappdomainsingleton-update/index.md b/_posts/2007/05/crossappdomainsingleton-update/index.md new file mode 100644 index 0000000..5508b92 --- /dev/null +++ b/_posts/2007/05/crossappdomainsingleton-update/index.md @@ -0,0 +1,43 @@ +--- +title: "CrossAppDomainSingleton - Update" +date: "2007-05-30" +categories: + - "net" + - "csharp" +--- + +I forgot a couple of very essential things in my [last post about a singleton that lives across appdomains](http://ingebrigtsen.blog/2007/05/18/cross-appdomain-singleton/). + +When accessing a remote object using remoting, like I did with the singleton implementation, the remoting system obtains a lease for the object. The lease period is implemented in the MarshalByRefObject class through a method called InitializeLifeTimeService(). A singleton like the one we wanted to achieve needs to live forever, therefor you need to override the InitializeLifeTimeService() method and always return null. Returning null means that it should live forever (more details can be at [http://msdn.microsoft.com/msdnmag/issues/03/12/LeaseManager/default.aspx](http://msdn.microsoft.com/msdnmag/issues/03/12/LeaseManager/default.aspx)) + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
    /// <summary>
+    /// Override of lifetime service initialization.
+    /// 
+    /// The reason for overriding is to have this singleton live forever
+    /// </summary>
+    /// <returns>object for the lease period - in our case always null</returns>
+    public override object InitializeLifetimeService()
+    {
+      // We want this singleton to live forever
+      // In order to have the lease across appdomains live forever,
+      // we return null.
+      return null;
+    }
+ +In addition I've made it all threadsafe. So look at the attachment for this post instead.. + +On a second note; if you for instance expose an event in your singleton and any subscribers to that event exists in another AppDomain, you might want to keep in mind that you should probably inherit from MarshalByRefObject and override the IntializeLifeTimeService() method and return null there as well. Otherwize you might end up having a broken lease in the delegate added to the singleton. + +The updated C# file for this can be found [here](http://localhost:8080/wp-content/2014/10/crossappdomainsingleton_improved1.zip). diff --git a/_posts/2007/05/finally-the-long-awaited-extension-to-my-family-arrived-today/index.md b/_posts/2007/05/finally-the-long-awaited-extension-to-my-family-arrived-today/index.md new file mode 100644 index 0000000..7aebdc6 --- /dev/null +++ b/_posts/2007/05/finally-the-long-awaited-extension-to-my-family-arrived-today/index.md @@ -0,0 +1,12 @@ +--- +title: "Finally the long awaited extension to my family arrived today" +date: "2007-05-22" +categories: + - "personal" +--- + +During the pregnancy we've been presented with a lot of different dates, ranging from late april till late may. Finally today we got the extension to the family we've been waiting for. His name is Herman and weighed in at a remarkable 4395 grams and had a length of 51 cm. Based upon the last dates presented by the doctor, he arrived exactly one week too late. His mother struggled for some 8 hours to bring him into this world and did a remarkable job (even though I was thrown one or two interesting sentences.:) ) + +Life is beatiful! + +Based upon previous experience with getting kids, it will now take me two years or so before I write my next blog..   NOT...  :)    I'm too excited about Silverlight these days to not end up writing a post now and then.. diff --git a/_posts/2007/05/server-down-today-and-maybe-tomorrow/index.md b/_posts/2007/05/server-down-today-and-maybe-tomorrow/index.md new file mode 100644 index 0000000..536de74 --- /dev/null +++ b/_posts/2007/05/server-down-today-and-maybe-tomorrow/index.md @@ -0,0 +1,8 @@ +--- +title: "Server down today and maybe tomorrow" +date: "2007-05-29" +--- + +Due to some electrical work in my house, I had to kill my servers today and might have to do it for some hours tomorrow as well.. :(     For some strange reason my UPS does not have 8 hours of power in it. + +It's all back up now at least.. diff --git a/_posts/2007/05/silverlight-very-very-very-slow/index.md b/_posts/2007/05/silverlight-very-very-very-slow/index.md new file mode 100644 index 0000000..f6a8473 --- /dev/null +++ b/_posts/2007/05/silverlight-very-very-very-slow/index.md @@ -0,0 +1,16 @@ +--- +title: "Silverlight - very very very slow" +date: "2007-05-30" +categories: + - "net" + - "csharp" +tags: + - "silverlight" +--- + +I've read several places, both blogs and forums that people are so impressed by the speed of Silverlight.. +I must regretably say that I'm not one of them. I hope this is just the case with the Alpha version of Silverlight 1.1 and that the performance will increase when it reaches release. + +I applied texturemapping to my 3D engine yesterday and the FPS (Frames Per Second) went from about 30 FPS to 2-3 FPS. I can easily switch back and forth and see the difference clearly. The test object I have have about 400 faces visible at every given time, and the area they are filling is not big. As I mentioned, I hope this is just the case with the early Alpha release, or even better, I hope it is a problem in my code. + +I will be investigating this further and post my findings. diff --git a/_posts/2007/06/balder-3d-engine-for-silverlight-source-code-is-out/index.md b/_posts/2007/06/balder-3d-engine-for-silverlight-source-code-is-out/index.md new file mode 100644 index 0000000..b114b08 --- /dev/null +++ b/_posts/2007/06/balder-3d-engine-for-silverlight-source-code-is-out/index.md @@ -0,0 +1,21 @@ +--- +title: "Balder 3D Engine for Silverlight - Source Code is out" +date: "2007-06-13" +categories: + - "net" + - "csharp" + - "gamedevelopment" +tags: + - "silverlight" +--- + +I've finally published the source code on CodePlex for the 3D engine posted earlier. +It has been built with Visual Studio "Orcas" Beta 1. + +The state of the source code is not 100% yet, but people can download it for now and have a look at how you could do a simple 3D engine. In addition a lot of featuers have not been made yet. During the next couple of weeks there will be additions to it. + +For the time being I've invited a few friends to join in on the development, after some development time we will invite others to join as well. The project can be found at : + +[http://www.codeplex.com/Balder](http://www.codeplex.com/Balder) + +Feel free to come with any suggestions. diff --git a/_posts/2007/06/new-job-jiiiihaa/index.md b/_posts/2007/06/new-job-jiiiihaa/index.md new file mode 100644 index 0000000..9d25c69 --- /dev/null +++ b/_posts/2007/06/new-job-jiiiihaa/index.md @@ -0,0 +1,13 @@ +--- +title: "New Job -Jiiiihaa..." +date: "2007-06-12" +categories: + - "net" + - "personal" +tags: + - "silverlight" +--- + +I started working at a company called Fjord Media yesterday. I left behind 5.5 years of enterprise application development for a simpler life. :)   I will be doing .net, ofcourse (is there anything else?), focusing on Windows and Web (finally I can do silverlight professionally. :) ). In addition I will be doing some .net Micro framework..  Damn, that is some cool stuff.  I mean, you got devices the size of a regular wristband-watch running .net. I've already created an application hosting a simple Web server on the Digi Connect ME device ([http://www.digi.com/products/embeddedsolutions/digiconnectme.jsp](http://www.digi.com/products/embeddedsolutions/digiconnectme.jsp)). The hardware is just about the size of a regular ethernet socket you find on any motherboard and it has a .net device onboard.. NICE NICE! + +So...  I guess my postings will take a new turn.. Maybe..  Who knows..  Time will tell. diff --git a/_posts/2007/06/overcoming-silverlight-speed-issues-in-silverlight-1-1-alpha-managed-code/index.md b/_posts/2007/06/overcoming-silverlight-speed-issues-in-silverlight-1-1-alpha-managed-code/index.md new file mode 100644 index 0000000..5be4a41 --- /dev/null +++ b/_posts/2007/06/overcoming-silverlight-speed-issues-in-silverlight-1-1-alpha-managed-code/index.md @@ -0,0 +1,24 @@ +--- +title: "Overcoming Silverlight speed issues in Silverlight 1.1 Alpha (Managed code)" +date: "2007-06-24" +categories: + - "net" + - "csharp" +tags: + - "silverlight" +--- + +I've been close to ranting lately about my issues with speed for Silverlight 1.1.. Shame on me, a little bit.. :)    + +I have now refactored my 3D a bit and I'm now experiencing increased speed. The main problem is that if you want to runtime generate the visuals for every frame there is too much marshalling going on between the managed runtime and the core presentation engine of Silverlight. After a couple of days of real frustration I got struck by lightning (Silver ofcourse). I ran in to my livingroom from playing with one of my kids and grabbed my laptop and ran outside again to "play"...   The answer is : Generate the XAML and marshal only once! This can be achieved in several ways, I chose to create myself a user control that I dynamically create and add to my Canvas every frame (only one), within this user control I generate the XAML needed and pass it along to the InitializeFromXaml() method found in the base class Control. + +This resulted in the engine using around 10 milliseconds per frame on my test object. It used between 30 and 40 milliseconds before. (My machine : Dell Latitude D820 Laptop, running Intel Core Duo 2.33 Mhz) + +It is kind of obvious that this is the result. Since the managed environment is decoupled in the manner it is, it will make sense to marshal as little as possible. + +I've implemented this into the Balder engine, if you want to have a look at how it is done, download the source at Codeplex ([http://www.codeplex.com/Balder](http://www.codeplex.com/Balder)). PolyControl.cs and Face.cs is in this writing moment the magicians. This will change soon when I clean up it's act. + +Check out the latest version, optimized : +[http://www.dolittle.com/Silverlight/3D\_Optimized/TestPage.html](http://localhost:8080/silverlight/3D_Optimized/TestPage.html) + +(There is not a lot of added features, just optimizations and behind-the-scenes stuff...) diff --git a/_posts/2007/06/silverlight-speed-issues/index.md b/_posts/2007/06/silverlight-speed-issues/index.md new file mode 100644 index 0000000..833ebaf --- /dev/null +++ b/_posts/2007/06/silverlight-speed-issues/index.md @@ -0,0 +1,13 @@ +--- +title: "Silverlight speed issues" +date: "2007-06-23" +categories: + - "net" + - "csharp" +tags: + - "silverlight" +--- + +I posted earlier about Silverlight rendering being very slow. I've been digging deep inside the Silverlight runtime to figure out what and why there should be issues. Drawing issues is only half the problem, maybe even not a problem at all. Whenever you change a property that is a DepedencyProperty there is a lot of code involved. For the 3D engine I'm working on this is very critical, we change a lot of dependency-properties all the time. The main problem is that in order for a visual to get updated with any changes you need to actually set the property even though it should be sufficient just modifying a property on the type of the top level property (did that sentence make any sence.:) ) . + +A good example of what I'm talking about is the Color property for a polygon. I just need to update the R,G,B properties on the polygon, but in order for the polygon to get the changes I need to set the Color property and that involves a lot of code behind the scenes in Silverlight in order to do that. Looking at architectural overview at Microsoft, it sort of says it all : [http://msdn2.microsoft.com/en-us/library/bb404713.aspx](http://msdn2.microsoft.com/en-us/library/bb404713.aspx). There is marshalling involved between the presentation Core and the .net Runtime that is very costy. It makes sense that it is like this, the presentation core has to be running natively seeing that it is cross platform. diff --git a/_posts/2007/06/why-silverlight-is-better-than-flash/index.md b/_posts/2007/06/why-silverlight-is-better-than-flash/index.md new file mode 100644 index 0000000..4e5a040 --- /dev/null +++ b/_posts/2007/06/why-silverlight-is-better-than-flash/index.md @@ -0,0 +1,8 @@ +--- +title: "Why Silverlight is better than Flash..." +date: "2007-06-29" +--- + +Read Jesse Ezells blog about the difference between Silverlight and Flash and why you should consider using Silverlight : + +[http://weblogs.asp.net/jezell/archive/2007/05/03/silverlight-vs-flash-the-developer-story.aspx](http://weblogs.asp.net/jezell/archive/2007/05/03/silverlight-vs-flash-the-developer-story.aspx) diff --git a/_posts/2007/07/community-server-module-for-embedding-silverlight-1-1-to-posts/images/CommunityServermoduleforembeddi.1toposts_780E_image_1.png b/_posts/2007/07/community-server-module-for-embedding-silverlight-1-1-to-posts/images/CommunityServermoduleforembeddi.1toposts_780E_image_1.png new file mode 100644 index 0000000..f987d5b Binary files /dev/null and b/_posts/2007/07/community-server-module-for-embedding-silverlight-1-1-to-posts/images/CommunityServermoduleforembeddi.1toposts_780E_image_1.png differ diff --git a/_posts/2007/07/community-server-module-for-embedding-silverlight-1-1-to-posts/index.md b/_posts/2007/07/community-server-module-for-embedding-silverlight-1-1-to-posts/index.md new file mode 100644 index 0000000..571321b --- /dev/null +++ b/_posts/2007/07/community-server-module-for-embedding-silverlight-1-1-to-posts/index.md @@ -0,0 +1,134 @@ +--- +title: "Community Server module for embedding Silverlight 1.1 to posts" +date: "2007-07-26" +categories: + - "net" + - "csharp" +tags: + - "silverlight" +--- + +I figured I just jump into it; creating a Community Server 2007 module for rendering Silverlight content. + +It all started up yesterday as a simple thing, but I figured that I didn't feel comfortable with the way the plugin system worked in Community Server, so I created a small abstraction from it to make it feel more right for me. :)   It's all based upon attributes instead of hooking up events. The reason I started doing the abstraction was that I have a couple of modules I need in the pipeline and wanted to simplify stuff I will be needing for all modules, such as filtering for ApplicationType. + +The module code turns out as follows (I've attached the entire project with source and binaries) + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+
  [Module("SilverlightModule")]
+  public class SilverlightModule : BaseModule
+  {
+    private static readonly string SilverlightScript = "Silverlight";
+    private static readonly string SilverlightApplicationScript = 
+                        "SilverlightApplication";
+
+    [Method(MethodType.PreRender)] +    [MethodType(MethodType.PreRender)] +    [ApplicationType(ApplicationType.Weblog)] +    [ApplicationType(ApplicationType.ContentManagement)] +    public string Render(string protocol,string xamlUri) +    { +      string completeUri = protocol + ":" + xamlUri; +
+      Page page = MethodContext.Current.Page; +
+      if (!page.ClientScript. +          IsClientScriptBlockRegistered(SilverlightScript)) +      { +        page.ClientScript. +          RegisterClientScriptBlock(  typeof(SilverlightModule), +                        SilverlightScript, +                        Resources.Silverlight, true); +      } +
+      if (!page.ClientScript. +          IsClientScriptBlockRegistered(SilverlightApplicationScript)) +      { +        page.ClientScript. +          RegisterClientScriptBlock(  typeof(SilverlightModule), +                        SilverlightApplicationScript, +                        Resources.SilverlightApplication, +                        true); +      } +
+      Guid applicationGuid = Guid.NewGuid(); +
+      string hostName = "SilverlightControlHost_"+applicationGuid.ToString(); +
+      completeUri = completeUri.Trim(); +
+      return +      "<div id="" + hostName + "" style="background-color:Black" >" + +      "<script type="text/javascript" style="background-color:Black">" + +      "createSilverlight(""+completeUri+"",""+applicationGuid.ToString()+"");" + +      "</script>" + +      "</div>"; +    } +  }
+ +![CommunityServermoduleforembeddi.1toposts_780E_image_1](images/CommunityServermoduleforembeddi.1toposts_780E_image_1.png) + +**Installation instructions :** + +Copy the binary (DoLittle.CS.Modules.dll) into the bin directory of your Community Server installation. Add the following line to your communityserver.config file : + + + +Then you have the SilverlightModule up and running. + +To use it you simple write \[SilverlightModule: protocol:uri\] in your editor. + +protocol : http, https uri : The uri for the XAML to use + +Sample : \[SilverlightModule: [http://www.dolittle.com/Silverlight/3D/Page.xaml](http://localhost:8080/silverlight/3D/Page.xaml)\] + +Remember to use the unlink button for the Uri. Community Server editor and most other editors will automatically translate the Uri and add a href around it. diff --git a/_posts/2007/07/mediaplayer-content-plugin-for-windows-live-writer/index.md b/_posts/2007/07/mediaplayer-content-plugin-for-windows-live-writer/index.md new file mode 100644 index 0000000..53eb1ec --- /dev/null +++ b/_posts/2007/07/mediaplayer-content-plugin-for-windows-live-writer/index.md @@ -0,0 +1,17 @@ +--- +title: "MediaPlayer Content plugin for Windows Live Writer" +date: "2007-07-16" +categories: + - "net" + - "csharp" +--- + +I've just sort of finished a simple plugin for adding a MediaPlayer object to blogs from the Windows Live Writer. +In order to use the plugin you must enable the object tag, so they won't get scrubbed during rendering. + +For Community Server this is achieved by going into the communityserver.config file (residing in the Web directory of your Community Server installation) and going to the section; here you can add the object tag as a trusted tag type. **Remember that you're doing that on your own risk!!!!** + +Anyways..  Download the file to play around with it.  I've also attached the source for it. + +**Important : +**To install it you have to copy it to the Plugins directory of Windows Live Writer, typically c:Program FilesWindows Live WriterPlugins. diff --git a/_posts/2007/07/mini-itx-motherboard-i-want-to-have-now/index.md b/_posts/2007/07/mini-itx-motherboard-i-want-to-have-now/index.md new file mode 100644 index 0000000..d4f27a6 --- /dev/null +++ b/_posts/2007/07/mini-itx-motherboard-i-want-to-have-now/index.md @@ -0,0 +1,14 @@ +--- +title: "Mini-ITX motherboard I want to have - now.." +date: "2007-07-05" +--- + +I've been drewling the last weeks over a brilliant motherboard from Axiomtek. It's form factor is Mini-ITX and is built around the Socket 479 for the CPU. It supports running a Intel Core 2 Duo processor for Socket M (479) with a FSB of 667 MHz. + +For HTPC  machines it is brilliant not to mention for home servers that you just want to stove away somewhere and don't want to worry about space..  + +Anywayz.. Have a look at this beauty : + +[http://www.axiomtek.com.tw/Products/ViewProduct.asp?view=463](http://www.axiomtek.com.tw/Products/ViewProduct.asp?view=463) + +Make your local retailer import it! :)    I've encouraged everyone I talk to, to send my favourite retailer an email to make them import it.. diff --git a/_posts/2007/07/spinning-cube-in-silverlight-alpha-1-1-using-c/images/SpinningcubeinSilverlightAlpha1.1usingC_10CC9_image.png b/_posts/2007/07/spinning-cube-in-silverlight-alpha-1-1-using-c/images/SpinningcubeinSilverlightAlpha1.1usingC_10CC9_image.png new file mode 100644 index 0000000..be6d71b Binary files /dev/null and b/_posts/2007/07/spinning-cube-in-silverlight-alpha-1-1-using-c/images/SpinningcubeinSilverlightAlpha1.1usingC_10CC9_image.png differ diff --git a/_posts/2007/07/spinning-cube-in-silverlight-alpha-1-1-using-c/index.md b/_posts/2007/07/spinning-cube-in-silverlight-alpha-1-1-using-c/index.md new file mode 100644 index 0000000..5d95c56 --- /dev/null +++ b/_posts/2007/07/spinning-cube-in-silverlight-alpha-1-1-using-c/index.md @@ -0,0 +1,324 @@ +--- +title: "Spinning cube in Silverlight Alpha 1.1 using C#" +date: "2007-07-19" +--- + +Silverlight represents a subset of WPF and it's features, one of the features that aren't part of the subset is 3D. When the Silverlight 1.1 Alpha with the support for managed code came out earlier this year, I couldn't wait to get my hands dirty and try to get some 3D content on it even though it didn't support it. I got very happy when I saw they left the Polygon visual in there, that means you have some optimized way of drawing triangles. Anywho, the purpose of this tutorial is to show how little code you can get away with if you just want to have a simple spinning cube. + +The sample is very basic and does not involve any heavy geometry math. If you want a sample using Matrix math and more advanced geomtry stuff, take a look at the Balder project : [http://www.codeplex.com/Balder](http://www.codeplex.com/Balder) + +**The main loop** + +The first thing we need before we do anything else is a main loop. This can be achieved by using the animation system in Silverlight. By creating a storyboard and hook up the Completed event we can achieve a steady callback. In our Page.xaml we create our own Canvas for the spinning cube and add a storyboard inside it : + +
1
+2
+3
+4
+5
+
  <Canvas x:Name="spinningCubeCanvas">
+    <Canvas.Resources>
+      <Storyboard x:Name="spinningCubeStorybard" 
+Completed="spinningCubeCanvas_Render"/>
+    </Canvas.Resources>
+  </Canvas>
+ +That's in fact all the XAML we will be needing to achieve a spinning cube. Now for the code-behind. In the Page\_Loaded event we add the following code to start our mainloop. + +``` +this.spinningCubeStorybard.Begin(); +``` + +``` +Then we need to implement the Completed event for the Storyboard : +``` + +
1
+2
+3
+4
+
public void spinningCubeCanvas_Render(object sender, EventArgs e)
+{
+   this.spinningCubeStorybard.Begin();
+}
+ +  + +**Our Cube** + +To define our cube we need points in 3D space, these are called Vertices (one vertex, several vertices). We therefor create a simple class to represent a vertex. The class represents the original vertex before we have done any calculations on it and also contains the finished calculated vertex ready to be used on our 2D screen. + +
1
+2
+3
+4
+5
+6
+
    private class Vertex
+    {
+      public  double X, Y, Z;
+      public double RotatedX, RotatedY, RotatedZ;
+      public int TranslatedX, TranslatedY;
+    }
+ +``` +As you can see, the vertex contains an X,Y and Z representing the coordinate in 3D space. In addition it contains the rotated version and the translated +(2D) version. Now that we have the definition of a vertex, we need the definition of a triangle that hooks itself on 3 vertices, we call these Faces. A face +contains 3 integers representing an index into the array of vertices for the object we are rotating. +``` + +
1
+2
+3
+4
+
    private class Face
+    {
+      public int VertexA, VertexB, VertexC;
+    }
+ +Now we need to create the array of vertices for the object : + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+
    private Vertex[] _vertices = new Vertex[] {
+                     new Vertex() { X=-150, Y=-150, Z=-150},
+                     new Vertex() { X=150, Y=-150, Z=-150},
+                     new Vertex() { X=-150, Y=150, Z=-150},
+                     new Vertex() { X=150, Y=150, Z=-150},
+                     new Vertex() { X=-150, Y=-150, Z=150},
+                     new Vertex() { X=150, Y=-150, Z=150},
+                     new Vertex() { X=-150, Y=150, Z=150},
+                     new Vertex() { X=150, Y=150, Z=150},
+                   };
+ +And we need an array of faces that hooks up to these vertices : + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+
    private Face[] _faces = new Face[] {
+                    new Face() { VertexA=2, VertexB=1, VertexC=0},
+                    new Face() { VertexA=1, VertexB=2, VertexC=3},
+                    new Face() { VertexA=4, VertexB=5, VertexC=6},
+                    new Face() { VertexA=7, VertexB=6, VertexC=5},
+                    new Face() { VertexA=0, VertexB=4, VertexC=6},
+                    new Face() { VertexA=0, VertexB=6, VertexC=2},
+                    new Face() { VertexA=7, VertexB=5, VertexC=1},
+                    new Face() { VertexA=3, VertexB=7, VertexC=1},
+                    new Face() { VertexA=5, VertexB=4, VertexC=0},
+                    new Face() { VertexA=1, VertexB=5, VertexC=0},
+                    new Face() { VertexA=2, VertexB=6, VertexC=7},
+                    new Face() { VertexA=2, VertexB=7, VertexC=3},
+                };
+ +``` +The "Magic" +``` + +``` +Now we are good to go to implement all the rendering to make this into a spinning cube. First we need to rotate all the vertices around the +X,Y and Z axis. We do this very simple, no matrix math involved, very very basic geometry stuff involving sin and cos. +``` + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+
      // Calculate all the vertices
+      foreach (Vertex vertex in this._vertices)
+      {
+        // Rotate the vertex around the Z axis
+        tempY1 = (vertex.X * Math.Sin(this._zRotation)) + 
+                 (vertex.Y * Math.Cos(this._zRotation));
+        tempX1 = (vertex.X * Math.Cos(this._zRotation)) - 
+                 (vertex.Y * Math.Sin(this._zRotation));
+
+        // Rotate the vertex around the Y axis +        vertex.RotatedX = (vertex.Z * Math.Sin(this._yRotation)) + + (tempX1 * Math.Cos(this._yRotation)); +        tempZ1 = (vertex.Z * Math.Cos(this._yRotation)) - + (tempX1 * Math.Sin(this._yRotation)); +
+        // Rotate the vertex around the X axis +        vertex.RotatedZ = (tempY1 * Math.Sin(this._xRotation)) + + (tempZ1 * Math.Cos(this._xRotation)); +        vertex.RotatedY = (tempY1 * Math.Cos(this._xRotation)) - + (tempZ1 * Math.Sin(this._xRotation)); +
+        // Translate the vertex into a 2D coordinate +        vertex.TranslatedX =
((int) ((vertex.RotatedX * focalLength) / + (vertex.RotatedZ + zoom)))+xoffset; +        vertex.TranslatedY = ((int) ((vertex.RotatedY * focalLength) / + (vertex.RotatedZ + zoom)))+yoffset; +      }
+ +``` +This gives us all the vertices rotated and translated. Great, we can finally get our cube up and running. The next part gets the vertices based upon the +index of the vertices in each face and creates a Polygon visual that we add to the rendering pipeline of Silverlight, in our case we add it to the Canvas +we have created for our spinning cube. Before we add anything to it we clear it. The loop also does a hidden surface removal, we do not need to render +polygons that aren't really visible. We want to know which polygons are facing away, this involves doing a mixed product of the 3 vertices. +``` + +``` +The result of the mixed product can also be used for our purpose to give the polygon a color, you'll see some strange color magic in the loop. :) +``` + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+
// Create polygons for Silverlight to work with from the newly 
+// calculated vertices
+this.spinningCubeCanvas.Children.Clear();
+foreach (Face face in this._faces)
+{
+  Vertex vertexA = this._vertices[face.VertexA];
+  Vertex vertexB = this._vertices[face.VertexB];
+  Vertex vertexC = this._vertices[face.VertexC];
+
+  // Do a mixedproduct of all vertices for hidden surface removal +  double mixedProduct = (vertexB.TranslatedX - vertexA.TranslatedX) * +             (vertexC.TranslatedY - vertexA.TranslatedY) - +             (vertexC.TranslatedX - vertexA.TranslatedX) * +             (vertexB.TranslatedY - vertexA.TranslatedY); +  bool visible = mixedProduct < 0; +  if (!visible) +  { +    continue; +  } +
+ +  // Use the mixed product for "shading". +  // The larger the face, the brighter it is. +  double shade = -mixedProduct; // *512; +  shade /= 1024; +
+  int color = (int)shade; +  color += 128; +  if (color >= 250) +  { +    color = 250; +  } +  if (color < 30) +  { +    color = 30; +  } +
+  byte red = (byte)(color >> 3); +  byte green = (byte)(color >> 1); +  byte blue = (byte)(color); +
+ +  // Create the polygon and initialize the point and the color +  Polygon polygon = new Polygon(); +  polygon.Points = new Point[] { + new Point(vertexA.TranslatedX,vertexA.TranslatedY), + new Point(vertexB.TranslatedX,vertexB.TranslatedY), + new Point(vertexC.TranslatedX,vertexC.TranslatedY) + }; +  polygon.Fill = new SolidColorBrush(Color.FromRgb(red, green, blue)); +
+  this.spinningCubeCanvas.Children.Add(polygon); +}
+ +  + +``` +That's pretty much it... Now you just need to rotate it. :)  +``` + +``` + +``` + +``` +Download the sourcecode attached to this post for a working version. +``` + +``` +Update 12th of August 2007 : +I've updated the attachment to work with Siliverlight 1.1 Alpha Refresh +``` diff --git a/_posts/2007/08/balder-silverlight-3d-engine-sample-update/index.md b/_posts/2007/08/balder-silverlight-3d-engine-sample-update/index.md new file mode 100644 index 0000000..a5c9767 --- /dev/null +++ b/_posts/2007/08/balder-silverlight-3d-engine-sample-update/index.md @@ -0,0 +1,11 @@ +--- +title: "Balder Silverlight 3D Engine sample update" +date: "2007-08-12" +--- + +**UPDATE, 12th of February 2010, Balder 0.8.8.6 is out, take a look at the sample browser [here](http://localhost:8080/silverlight/Balder/20100208/TestPage.html).**   + +I've added a sample of the Balder 3D engine that works with the Silverlight 1.1 Alpha Refresh. + +Go to the following URL to have a look : +[http://www.dolittle.com/Silverlight/BalderSample/testpage.html](http://localhost:8080/silverlight/BalderSample/testpage.html) diff --git a/_posts/2007/08/movie-piracy-mmm-the-taste-in-my-mouth/index.md b/_posts/2007/08/movie-piracy-mmm-the-taste-in-my-mouth/index.md new file mode 100644 index 0000000..cf607f9 --- /dev/null +++ b/_posts/2007/08/movie-piracy-mmm-the-taste-in-my-mouth/index.md @@ -0,0 +1,15 @@ +--- +title: "Movie piracy - Mmm.. The taste in my mouth..." +date: "2007-08-31" +--- + +Last week I went out to rent a movie as I often do. +Went home got my coke and put the movie in my DVD player. + +As usual, in most Norwegian movies at least, it starts with a commercial. I'm not talking about previews, but commercials for potatochips and such. To my surprise though; they've turned off the ability to skip to the next chapter or get to the DVD menu, my SONY DVD player kept on saying "Operation prohibited by disc" which is the message it displays when the DVD has been programmed not to support a functionality. + +I almost choked in anger..  Is it possible?  Here I go using my hard earned cash on renting a movie and then it turns out I've actually paid for commercials. A stunt like that makes piracy all of a sudden quite OK. I don't download movies, TV series or what not. If the industry wants people to stop copying their products, this is not the way to go about doing so. I'm pretty sure there are more people out there that get's angry about the principal of having to pay for commercials. + +It would be quite OK having the commercials there and not being able to skip them if they were handing out DVDs. But when money has been changing owner it is not OK by a long shot. + +Another thing they keep putting on the DVDs you buy and rent are the anti-piracy infomercials. Ehh.. I bought the thing.. I don't need to get reminded to not download the movie I just bought or rented.. HELLO.. diff --git a/_posts/2007/08/spinning-cube-tutorial-update-silverlight/index.md b/_posts/2007/08/spinning-cube-tutorial-update-silverlight/index.md new file mode 100644 index 0000000..6dcaa9a --- /dev/null +++ b/_posts/2007/08/spinning-cube-tutorial-update-silverlight/index.md @@ -0,0 +1,13 @@ +--- +title: "Spinning Cube tutorial update (Silverlight)" +date: "2007-08-12" +categories: + - "net" + - "csharp" +tags: + - "silverlight" +--- + +I've upgraded the tutorial project to support Silverlight 1.1 Alpha Refresh for the spinning cube tutorial I wrote a couple of weeks ago ([http://www.dolittle.com/blogs/einar/archive/2007/07/19/spinning-cube-in-silverlight-alpha-1-1-using-c.aspx](/blogs/einar/archive/2007/07/19/spinning-cube-in-silverlight-alpha-1-1-using-c.aspx)). + +Download the attached Zip file for the new version. diff --git a/_posts/2007/08/structure-and-work-processes-do-they-bite/index.md b/_posts/2007/08/structure-and-work-processes-do-they-bite/index.md new file mode 100644 index 0000000..525e22b --- /dev/null +++ b/_posts/2007/08/structure-and-work-processes-do-they-bite/index.md @@ -0,0 +1,12 @@ +--- +title: "Structure and work processes - do they bite?" +date: "2007-08-31" +--- + +Today I reached a mutual agreement with my employer that it would be probably better if I didn't work there no more, so I handed in my resignation. No dramatics at all. + +The company is a startup company and has been around for about 2 years now. The reason for me quitting the job was the fact that I wanted to add structure and process to the way they work and they didn't. I then felt that without the structure and a development process I would not be in a satisfactory working environment. Anywho..  + +I've been involved with a couple of startup companies in my time in the industry and find my self asking; why does it always hurt so much to to things in a more structured manner. The companies I've been involved with always claim the same thing; in our market we have to move from a day to day basis, otherwise we might as well just stop doing what we do. Why is it so scary to define a way of working that will ease the stress level and probably give the customer better quality? + +Although the relationship with my last employeer ended on very good terms, I can't help to be a bit frustrated about the fact that one would not consider looking into the possibility to work in a better way with less stress. But hey.. Who am I to judge. Afterall, I came in there on the highest horse I could find and told them to do it like this and this and not like that...   Well. diff --git a/_posts/2007/08/test-page/index.md b/_posts/2007/08/test-page/index.md new file mode 100644 index 0000000..cbe8f82 --- /dev/null +++ b/_posts/2007/08/test-page/index.md @@ -0,0 +1,14 @@ +--- +title: "Test Page" +date: "2007-08-31" +--- + +asdasdasd + +as + +das + +da + +sd diff --git a/_posts/2007/09/expression-european-designer-tour/index.md b/_posts/2007/09/expression-european-designer-tour/index.md new file mode 100644 index 0000000..68d36a5 --- /dev/null +++ b/_posts/2007/09/expression-european-designer-tour/index.md @@ -0,0 +1,33 @@ +--- +title: "Expression European Designer Tour" +date: "2007-09-13" +categories: + - "net" + - "csharp" +tags: + - "silverlight" +--- + +Microsoft is finally out there on a tour with the purpose of learning us the do's and don'ts for Expression featuring +Florent Pajani, Martin Tirion and Philippe Deltenre. + +The Expression European Designer Tour will be coming to a place near you very soon. +The Norwegian version will be held in Oslo on the 12th of October : +[https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032352603&culture=nb-NO](https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032352603&culture=nb-NO) + +**Agenda:** +** +09.30-10.00 Welcome - Registration + +10.00- 10.30 Introduksjon - Florent Pajani +**Find out how Software and Services from Microsoft is pushing the envelope of what's possible on the Web today. The tools and technologies Microsoft has built for Web developers and designers to help them work better together in creating immersive experiences on the Web +** +10.30-10.45 Pause + +10.45-12.00 Designing Rich Client Experiences - Martin Tirion +**Expression Studio allows designers to create compelling UIs for the Windows Desktop and for the web. The Studio offers a complete set of tools, including Design, Blend, Web and Media, which enable designers to work closely together with developers. Developers can use Visual Studio which offers a top class development environment. Because of the tight integration of the platform and the tools it is a very compelling environment to have various disciplines work together building the next generation applications with a rich user experience. This presentation provides an overview of the tools and the integration. +** +12.00-12.30 Lunch + +12.30-13.15 Overhyped and Undervalued - Philippe Deltenre +**Too much hype? Or not enough? Do we over- or underestimate the changes that will occur in the coming years? Is Microsoft missing the social media revolution or is Microsoft leading it?” diff --git a/_posts/2007/09/the-joy-of-being-a-developer/index.md b/_posts/2007/09/the-joy-of-being-a-developer/index.md new file mode 100644 index 0000000..ba86ff3 --- /dev/null +++ b/_posts/2007/09/the-joy-of-being-a-developer/index.md @@ -0,0 +1,18 @@ +--- +title: "The joy of being a developer" +date: "2007-09-18" +categories: + - "net" + - "personal" +--- + +I've come to a point in my life were I think I've figured out what I'm going to be when I grow up; **a developer.** +Recently I've been jumping between jobs and found myself wanting to downgrade from being a Chieft of something something to being more of a hardcore developer. + +I walked away from a position at a place called Notus a couple of months ago as the Manager of Application Development. I quit this job in june and started working for a startup company called Fjord Media. Being a startup company things weren't that organized that I've grown fond of, and found myself getting very stressed from the lack of structure and processes. I decided to quit and did so and walked out the building the same day without having a job to go to. During that day I started what I normally do when I'm looking for work; send out emails to friends and past colleagues to see if there would be any leads out there. Sure enough, the market is great these days so a couple of leads came my way the same day. I spent the next couple of days walking in and out of interviews and talking to people on the phone and writing emails. During this time I also found the time to start spinning thoughts around in my head about what kind of job would make be a happier person. + +6 days after I quit my job at Fjord Media I had a meeting with my former employer, they contacted me the same day I quit and wanted to hear if I was interested in coming back. Not to the same position I held but a developer or team lead for one of the teams. After having the meeting with them I had this good vibe inside me; I was going to write code on a regular basis again. I got an offer later that day that was a very good offer;  I got to be a team lead/lead developer for the platform and architecture team. I was walking around the city when they called me with the offer, so I told them I had to call them back some 15-20 minutes later. It was then it really hit me with a good warm feeling inside of me; I am a developer, I will always be a developer, this is the profession I chose for myself ages ago. I couldn't wait to get home and pick up the phone and accept the offer. It couldn't get any better than this; I got to write code at a place where I knew (and love!) all the people, I knew the code (heck, I've worked there for 5.5 years..) and I got to do pretty cool stuff; work with the latest of .net related technologies (.net 3.0 and later 3.5, BT2006, SQL2005, VS2008, Silverlight..) . + +The conclusion is **I am a developer and I'm proud of it!** + +Now, on to writing some cool code..    I've got a couple of Silverlight thingies up my sleeve. :) diff --git a/_posts/2007/10/game-camp-kick-off/index.md b/_posts/2007/10/game-camp-kick-off/index.md new file mode 100644 index 0000000..d54ad2c --- /dev/null +++ b/_posts/2007/10/game-camp-kick-off/index.md @@ -0,0 +1,15 @@ +--- +title: "Game Camp - Kick Off" +date: "2007-10-31" +categories: + - "csharp" + - "gamedevelopment" +--- + +We're closing in on the official kick off for Game Camp. 23rd of November is the date. The kick off will be in Oslo at NITH's facilities, we're getting speakers from Microsoft, Cap Gemini and myself to come and talk about different aspects of XNA and development of games using a managed environment such as .net. In addition we're working on getting Norway's biggest game developer, FunCom, to come and show off their latest title 'Age of Conan'. Fingers are being crossed for this to happen. + +Anyhow, if you want to attend, and I know you want to, you have to go and register yourself for the event over at our Game Camp site : + +[http://www.gamecamp.no/Events](http://www.gamecamp.no/Events) + +Be there or be ..  Hmm..  Game Over.. :) diff --git a/_posts/2007/10/silverlight-client-server/index.md b/_posts/2007/10/silverlight-client-server/index.md new file mode 100644 index 0000000..2efa095 --- /dev/null +++ b/_posts/2007/10/silverlight-client-server/index.md @@ -0,0 +1,29 @@ +--- +title: "Silverlight - client / server" +date: "2007-10-31" +categories: + - "net" + - "csharp" +tags: + - "silverlight" +--- + +I've been brewing on an idea lately that I'm going to start prototyping as soon as I have a spare hour or two.. :)   + +What if we had a server side representation of the the user interface from a Silverlight application. Let's say you have a DataGrid control in your silverlight application and you want to databind this to the server without having to go through a WebService, wouldn't it be need if you could do : + + + +In your server code you would just do : + +protected void myDataGrid\_DataRowChanged(object sender, DataRowChangedEventArgs e) +{ +} + +What I would then like to have in my Visual Studio solution/project explorer is 3 files : + +Page.xaml +Page.xaml.client.cs +Page.xaml.server.cs + +Why would this be handy you say..   Well..  I would get rid of a lot of boiler plate code that I would have to do every time I wanted a scenario where I connect data for instance from the server to the client. diff --git a/_posts/2007/10/silverlight-packaging/index.md b/_posts/2007/10/silverlight-packaging/index.md new file mode 100644 index 0000000..24a5c0e --- /dev/null +++ b/_posts/2007/10/silverlight-packaging/index.md @@ -0,0 +1,12 @@ +--- +title: "Silverlight packaging" +date: "2007-10-31" +tags: + - "silverlight" +--- + +One of the things I'm really missing from Silverlight as it is today is the ability to package an entire application with all it's artifacts (xaml, binary/DLLs, javascripts, PNG files - etc.. etc..) in a single archive and reference this in an ASP.net application. + +I've been working with a solution that enables this feature through packaging applications as ZIP archives. The solution is very simple; create an HTTP handler that responds to this in a specific directory and unzips the archives on the fly and preferably cache them somewhere on the disk for speedy lookups later. + +Follow my blog and I'll get back to you on the subject when I have finished the code! diff --git a/_posts/2007/10/xna-tour/index.md b/_posts/2007/10/xna-tour/index.md new file mode 100644 index 0000000..5717e52 --- /dev/null +++ b/_posts/2007/10/xna-tour/index.md @@ -0,0 +1,18 @@ +--- +title: "XNA Tour" +date: "2007-10-26" +categories: + - "net" + - "csharp" + - "xna" +--- + +It seems I'm going on what turns out to look more and more like a tour with Microsoft's XNA as the focus. I will be speaking at NNUG (Norwegian Net User Group) in Bergen Wednesday the 31st of October 2007.  [http://www.nnug.no/Avdelinger/Bergen/Moter/Brukergruppemote-oktober2/](http://www.nnug.no/Avdelinger/Bergen/Moter/Brukergruppemote-oktober2/ "http://www.nnug.no/Avdelinger/Bergen/Moter/Brukergruppemote-oktober2/") + +In addition to this we're launching Game Camp Norway ([http://www.gamecamp.no](http://www.gamecamp.no)) on the 23rd of November 2007 at NITH in Oslo. We're still working on putting up the registration site and everything, but it's all going to be great fun. + +On top of these events NNUG Oslo asked me to a session in springtime of 2008, details of this has yet to be laid out..   + +I'm so excited. Finally I get to talk about game making utilizing the .net framework. + +If you happen to be in the neighborhood for any the above mentioned events, drop by and have a look. diff --git a/_posts/2007/11/silverlight-1-1-tools-alpha-for-vs2008/index.md b/_posts/2007/11/silverlight-1-1-tools-alpha-for-vs2008/index.md new file mode 100644 index 0000000..1f45416 --- /dev/null +++ b/_posts/2007/11/silverlight-1-1-tools-alpha-for-vs2008/index.md @@ -0,0 +1,11 @@ +--- +title: "Silverlight 1.1 Tools Alpha for VS2008" +date: "2007-11-27" +tags: + - "silverlight" +--- + +It's been a loooooong week.. I don't think I've ever experienced a longer week than last week. The reason; I installed RTM of VS2008 and didn't bother to check if the silverlight tools would work or that Microsoft had an update..  + +"Finally" the update for the RTM/Release of VS2008 is out and ready to be downloaded : +[http://www.microsoft.com/downloads/details.aspx?FamilyId=25144C27-6514-4AD4-8BCB-E2E051416E03&displaylang=en](http://www.microsoft.com/downloads/details.aspx?FamilyId=25144C27-6514-4AD4-8BCB-E2E051416E03&displaylang=en "http://www.microsoft.com/downloads/details.aspx?FamilyId=25144C27-6514-4AD4-8BCB-E2E051416E03&displaylang=en") diff --git a/_posts/2007/12/missing-linq/index.md b/_posts/2007/12/missing-linq/index.md new file mode 100644 index 0000000..3519b2e --- /dev/null +++ b/_posts/2007/12/missing-linq/index.md @@ -0,0 +1,12 @@ +--- +title: "Missing LINQ" +date: "2007-12-02" +--- + +A colleague of mine; Christian Schiffer has put up a new site with the focus on LINQ called missinglinq.no. The purpose of the site is to blog about LINQ and show examples of how to do things with LINQ. + +Have a look : [http://www.missinglinq.no](http://www.missinglinq.no) + +In addition to Christian doing some blogging, he will aggregate blogs such as mine and filter out only LINQ related articles based upon the tags. + +Note : Articles will be in both Norwegian and English. diff --git a/_posts/2007/12/new-design/index.md b/_posts/2007/12/new-design/index.md new file mode 100644 index 0000000..6232b56 --- /dev/null +++ b/_posts/2007/12/new-design/index.md @@ -0,0 +1,10 @@ +--- +title: "New design" +date: "2007-12-16" +--- + +I figured the design for my blog was obsolete at best the other day and figured I should "steal" a new one and apply it. + +Thanks to the brilliant [http://www.freewebtemplates.com/](http://www.freewebtemplates.com/ "http://www.freewebtemplates.com/") site I found a "web 2.0" styled template that was nice on the eyes (at least mine). :)  + +Now I'll have to increase my posting activity to be just to the design! diff --git a/_posts/2008/01/a-realtime-light-weight-statemachine/index.md b/_posts/2008/01/a-realtime-light-weight-statemachine/index.md new file mode 100644 index 0000000..74818e8 --- /dev/null +++ b/_posts/2008/01/a-realtime-light-weight-statemachine/index.md @@ -0,0 +1,83 @@ +--- +title: "A realtime light-weight StateMachine" +date: "2008-01-23" +categories: + - "csharp" + - "gamedevelopment" +--- + +I've been working the last week with a game for me to contribute with in the [European Silverlight Challenge](http://www.silverlightchallenge.eu/) and figured I had to make a simple StateMachine "runtime" to undertake the the tasks I needed for the game. + +The StateMachine concept I came up with is a very leightweight thingy that uses some reflection magic to accomplish a simple way of working with a StateMachine. All you need is an enum with all your states and then a class that implements the abstract generic StateMachine class. The generic type you specify is the actual enum that contains the states. Through reflection the StateMachine then looks for public instance methods in your class that is named in a special manner containing the name of the state. The collected information will then be used in the execution of the StateMachine. + +You can download the entire implementation of the StateMachine + +[here](http://www.dolittle.com/blogs/einar/WindowsLiveWriter/ArealtimelightweightStateMachine_C5A9/StateMachine_1.zip) + +A sample StateMachine implementation using the system : + +public enum SimpleStateMachineStates +{ +    Idle=1, +    DoSomething, +    Die +} + +public classSimpleStateMachine : StateMachine +{ +    public voidOnIdleEnter() +    { +        Console.WriteLine("Entering idle mode - press spacebar to continue"); +    } + +    public voidOnIdleRun() +    { +        ConsoleKeyInfo keys = Console.ReadKey(); +        if(keys.Key == ConsoleKey.Spacebar) +        { +            this.ChangeState(SimpleStateMachineStates.DoSomething); +        } +    } + +    public voidOnIdleLeave() +    { +        Console.WriteLine("Leaving idle mode"); +    } + + +    public voidOnDoSomethingEnter() +    { +        Console.WriteLine("DoSomething - Enter phase"); +        Console.WriteLine("---"); +        Console.WriteLine("Press enter to kill the process"); +    } + +    public voidOnDoSomethingRun() +    { +        ConsoleKeyInfo keys = Console.ReadKey(); +        if(keys.Key == ConsoleKey.Enter) +        { +            this.ChangeState(SimpleStateMachineStates.Die); +        } +    } + +    public voidOnDoSomethingLeave() +    { +        Console.WriteLine("DoSomething - Leave"); +    } + + +    public voidOnDieEnter() +    { +        Console.WriteLine("Killing"); +        System.Diagnostics.Process.GetCurrentProcess().Kill(); +    } + + +    public overrideSimpleStateMachineStates DefaultState +    { +        get{ returnSimpleStateMachineStates.Idle; } +    } +} + +[](http://11011.net/software/vspaste) diff --git a/_posts/2008/01/lacking-64-bit-support/images/lacking64bitsupport_c5d2_image_thumb_11.png b/_posts/2008/01/lacking-64-bit-support/images/lacking64bitsupport_c5d2_image_thumb_11.png new file mode 100644 index 0000000..0961d6d Binary files /dev/null and b/_posts/2008/01/lacking-64-bit-support/images/lacking64bitsupport_c5d2_image_thumb_11.png differ diff --git a/_posts/2008/01/lacking-64-bit-support/index.md b/_posts/2008/01/lacking-64-bit-support/index.md new file mode 100644 index 0000000..3ef8c1d --- /dev/null +++ b/_posts/2008/01/lacking-64-bit-support/index.md @@ -0,0 +1,18 @@ +--- +title: "Lacking 64 bit support?" +date: "2008-01-24" +categories: + - "net" + - "biztalk" + - "csharp" +--- + +There is still a lot of libraries and technologies out there that does not work running in a 64 bit process. Take the Jet engine and utilizing it from OleDb; if you have a application that runs in a 64 bit native context, you will be given an error message that says that there is no OleDb provider for the provider specified in the connectionstring. + +Another example is the use of the ExploreOM assembly in BizTalk 2006 used for controlling the BizTalk server programmatically. Used from a 64 bit native context the application will throw an exception. + +How can one get around this problem?  Well. It's actually very simple, if you're willing to give away having a native 64 bit application or be invariant to the CPU. By choosing x86 as the CPU when compiling your .net application, you'll be able to still use 32 bit only facilities. The process will then run in a 32 bit context and therefor run smoothly without any issues. Remember that it is only the executable (entry point) that needs to be compiled with this option. + +You find the option under Project Properties -> Build -> Platform target. + +[![image](images/lacking64bitsupport_c5d2_image_thumb_11.png)](http://localhost:8080/wp-content/2012/07/Lacking64bitsupport_C5D2_image_4.png) diff --git a/_posts/2008/01/missing-enum-getvalues-when-doing-silverlight-for-instance/index.md b/_posts/2008/01/missing-enum-getvalues-when-doing-silverlight-for-instance/index.md new file mode 100644 index 0000000..5014821 --- /dev/null +++ b/_posts/2008/01/missing-enum-getvalues-when-doing-silverlight-for-instance/index.md @@ -0,0 +1,68 @@ +--- +title: "Missing Enum.GetValues() when doing Silverlight for instance ?" +date: "2008-01-13" +categories: + - "net" + - "csharp" +--- + +In some implementations of the .net framework, convience methods such as the static method GetValues() on the Enum class has been stripped away. This turned out to be true in the Silverlight subset of the framework. A method I've grown attached to over the years..    + +There is a way of getting the values from an Enum through reflection; by using the GetFields() method on the type of the enum you wish to get the values from. + +The GetFields() method returns an array of FieldInfo. An enum will have an array of all it's values represented as fields. In addition it will return elements that are not values on the enum. Within FieldInfo you'll find a set of Is\*() methods, one of them are very interesting in this case; IsLiteral. All values are marked as true. The solution is then pure and simple (C# 3.0 syntax, requires LINQ) : + +``` +public static class EnumHelper +{ + public static T[] GetValues() + { + Type enumType = typeof(T); + + if (!enumType.IsEnum) + { + throw new ArgumentException("Type '" + enumType.Name + "' is not an enum"); + } + + List values = new List(); + + var fields = from field in enumType.GetFields() + where field.IsLiteral + select field; + + foreach (FieldInfo field in fields) + { + object value = field.GetValue(enumType); + values.Add((T)value); + } + + return values.ToArray(); + } + + public static object[] GetValues(Type enumType) + { + if (!enumType.IsEnum) + { + throw new ArgumentException("Type '" + enumType.Name + "' is not an enum"); + } + + List values = new List(); + + var fields = from field in enumType.GetFields() + where field.IsLiteral + select field; + + foreach (FieldInfo field in fields) + { + object value = field.GetValue(enumType); + values.Add(value); + } + + return values.ToArray(); + } + +} + +``` + +[](http://11011.net/software/vspaste) diff --git a/_posts/2008/01/there-is-a-house/index.md b/_posts/2008/01/there-is-a-house/index.md new file mode 100644 index 0000000..d50e4ec --- /dev/null +++ b/_posts/2008/01/there-is-a-house/index.md @@ -0,0 +1,16 @@ +--- +title: "There is a house..." +date: "2008-01-05" +categories: + - "personal" +--- + +... in Sandefjord, Norway that's looking for a new owner. :) + +After living in the same house for 6 years, we're now selling it and moving to the other side of town. Besides working heavily on my computer over the last years, the house has also gone from a early 1980s combined with early 1950s standard to 200x standard. I've done most of the work myself. Finally we finished it and then we're moving, sounds familiar ??  + +Anywho..  If you know anyone who wants a nice house here in Norway, our house might be the thing they're looking for.  :) + +Have a look : + +[http://webhotell.tinde.no/dnbnor/index.asp?pId=274824&offset=0](http://webhotell.tinde.no/dnbnor/index.asp?pId=274824&offset=0 "http://webhotell.tinde.no/dnbnor/index.asp?pId=274824&offset=0") diff --git a/_posts/2008/01/vs2008-qfe-debugging-on-a-wcf-application/index.md b/_posts/2008/01/vs2008-qfe-debugging-on-a-wcf-application/index.md new file mode 100644 index 0000000..0631eff --- /dev/null +++ b/_posts/2008/01/vs2008-qfe-debugging-on-a-wcf-application/index.md @@ -0,0 +1,11 @@ +--- +title: "VS2008 QFE Debugging on a WCF application" +date: "2008-01-17" +categories: + - "net" + - "csharp" +--- + +I got all excited today and downloaded and instaled [VS2008 QFE](https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=10&ct=1200575156&rver=4.0.1534.0&wp=MBI_SSL&wreply=https:%2F%2Fconnect.microsoft.com%2FVisualStudio%2FDownloads%2FDownloadDetails.aspx%3FDownloadID%3D10443%26wa%3Dwsignin1.0&lc=1033&id=64416) (.net source code) and enabled debugging according to [Shawn Burke's blog](http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx) and fired up a WCF server application I'm working on. The server is using the ServerHost class for hosting it. Much to my surprise I kept getting an ConfigurationErrorsException with the message : "This element is not currently associated with any context". The application hadn't changed for a couple of days and I have no configuration file as I define everything programmatically. The only thing I had done was to install QFE and enable Debugging. + +Turns out that the "Enable just my code" option that I turned off to enable QFE debugging caused this. I haven't really bothered to figure out why yet, just thought I'd blog the incident straight away. diff --git a/_posts/2008/01/xbox-live-gamercard-net-class-c/images/XboxLiveGamerCard.netclassC_12020_image_2.png b/_posts/2008/01/xbox-live-gamercard-net-class-c/images/XboxLiveGamerCard.netclassC_12020_image_2.png new file mode 100644 index 0000000..ff76a4d Binary files /dev/null and b/_posts/2008/01/xbox-live-gamercard-net-class-c/images/XboxLiveGamerCard.netclassC_12020_image_2.png differ diff --git a/_posts/2008/01/xbox-live-gamercard-net-class-c/index.md b/_posts/2008/01/xbox-live-gamercard-net-class-c/index.md new file mode 100644 index 0000000..ab91e7c --- /dev/null +++ b/_posts/2008/01/xbox-live-gamercard-net-class-c/index.md @@ -0,0 +1,27 @@ +--- +title: "Xbox Live GamerCard .net class (C#)" +date: "2008-01-06" +categories: + - "csharp" +--- + +A friend of mine; Dan Strandberg put together a nice Vista Sidebar gadget for showing your Xbox Live GamerCard (Look [here](http://gamecamp.no/blogs/news/archive/2008/01/05/windows-vista-gamercard-gadget.aspx)). + +I couldn't resist creating a C# class that can be used from any .net application to extract all the data. Based upon Dans (nice regexes.. :) ) work I've put together a simple class that one can use for this purpose (download [here](http://localhost:8080/wp-content/2008/01/XboxLiveGamerCard.netclassC_12020_GamerCard.zip)). I've also put together a simple WinForms application that uses it (download [here](http://localhost:8080/wp-content/2008/01/XboxLiveGamerCard.netclassC_12020_GamerCardForm.zip)). + +[![XboxLiveGamerCard.netclassC_12020_image_2](images/XboxLiveGamerCard.netclassC_12020_image_2.png)](http://localhost:8080/wp-content/2008/01/XboxLiveGamerCard.netclassC_12020_image_2.png) + +The usage is very simple : + +``` +GamerCard.Loaded += new GamerCardLoadedEventHandler(GamerCard_Loaded); +GamerCard card = GamerCard.Create("Adept DoLittle"); +``` + +``` +void GamerCard_Loaded(GamerCard gamerCard) +{ + + +} +``` diff --git a/_posts/2008/02/a-bug-in-vista-that-didnt-get-fixed-by-the-service-pack/images/abuginvistathatdidntgetfixedbytheservice_99e6_image_thumb1.png b/_posts/2008/02/a-bug-in-vista-that-didnt-get-fixed-by-the-service-pack/images/abuginvistathatdidntgetfixedbytheservice_99e6_image_thumb1.png new file mode 100644 index 0000000..957a907 Binary files /dev/null and b/_posts/2008/02/a-bug-in-vista-that-didnt-get-fixed-by-the-service-pack/images/abuginvistathatdidntgetfixedbytheservice_99e6_image_thumb1.png differ diff --git a/_posts/2008/02/a-bug-in-vista-that-didnt-get-fixed-by-the-service-pack/index.md b/_posts/2008/02/a-bug-in-vista-that-didnt-get-fixed-by-the-service-pack/index.md new file mode 100644 index 0000000..ad40c9c --- /dev/null +++ b/_posts/2008/02/a-bug-in-vista-that-didnt-get-fixed-by-the-service-pack/index.md @@ -0,0 +1,13 @@ +--- +title: "A bug in Vista that didn't get fixed by the Service Pack" +date: "2008-02-16" +--- + +This is probably not a show stopper for most of you, more of an interesting bug.. + +[![image](images/abuginvistathatdidntgetfixedbytheservice_99e6_image_thumb1.png)](http://localhost:8080/wp-content/2012/07/AbuginVistathatdidntgetfixedbytheService_99E6_image_2.png) + +You are by default declined to not join the customer experience program.. :)  The OK button is disabled. +By clicking the "Joint the Windows...." radiobutton and then click the "I don't want..." radiobutton, you're able to click the OK button. + +An effective way to get people to join the Customer Experience Improvement Program, I'm sure.. diff --git a/_posts/2008/02/game-camp-new-design-layout-and-structure/index.md b/_posts/2008/02/game-camp-new-design-layout-and-structure/index.md new file mode 100644 index 0000000..d7b0aae --- /dev/null +++ b/_posts/2008/02/game-camp-new-design-layout-and-structure/index.md @@ -0,0 +1,12 @@ +--- +title: "Game Camp - new design, layout and structure" +date: "2008-02-11" +--- + +Welcome to the version 1.0 of our new design over at [Game Camp](http://www.gamecamp.no/ "Game Camp") +Our frontpage now looks a bit different and you're probably wondering where the tutorials, photos and download sections are. +They are all now located under the resources section. + +Besides this everything should be were you found it before. + +We hope the new design is more soothing and will motivate you to use the site more. :) diff --git a/_posts/2008/02/game-camp-on-tour/index.md b/_posts/2008/02/game-camp-on-tour/index.md new file mode 100644 index 0000000..fd09098 --- /dev/null +++ b/_posts/2008/02/game-camp-on-tour/index.md @@ -0,0 +1,13 @@ +--- +title: "Game Camp on tour" +date: "2008-02-20" +categories: + - "gamedevelopment" + - "xna" +--- + +This year Game Camp will be on tour and host several events. +I was asked earlier to hold an XNA talk at NNUG (Norwegian .Net User Group) in Oslo and will have this on the 26th of february. + +If you want to come and listen to a fast introduction to XNA and you happen to be in the neighbourhood, stop +by the [event page and register](http://www.nnug.no/Avdelinger/Oslo/Moter/Brukergruppemote-februar-2008/). diff --git a/_posts/2008/02/implementing-a-clr-profiler-to-act-as-an-aop-interceptor-part-1/index.md b/_posts/2008/02/implementing-a-clr-profiler-to-act-as-an-aop-interceptor-part-1/index.md new file mode 100644 index 0000000..e9eb5d5 --- /dev/null +++ b/_posts/2008/02/implementing-a-clr-profiler-to-act-as-an-aop-interceptor-part-1/index.md @@ -0,0 +1,20 @@ +--- +title: "Implementing a CLR Profiler to act as an AOP interceptor - Part 1" +date: "2008-02-10" +categories: + - "net" + - "aop" + - "csharp" +--- + +I started looking into the profiling API this friday, thanks to a colleague of mine at work; [Fredrik Kalseth](http://www.iridescence.no/). + +He started working on an AOP framework and came into my office and we discussed the possibility to use the profiler API to achieve a better result for an AOP framework. There's been a lot of studies on the subject and a couple of solutions as well, [AOP.net](http://wwwse.fhs-hagenberg.ac.at/se/berufspraktika/2002/se99047/contents/english/aop_net.html) is one of them. + +The principle is very simple; intercept any calls being made to methods in a managed type and modify the execution path by calling before, after, around advices. + +By hooking up the JITCompilationStarted callback that the ICorProfilerInfo2 interface provides we can do this really slick and very optimal as well. The ICorProfilerInfo2 provides us with two methods ; GetILFunctionBody and SetILFunctionBody. These can be used to get the current body of the method and then modify it and saving it back before it is JIT compiled. The advantage of doing this is that you only need to do it once per type during the lifecycle of your process, giving it a very low impact for doing this. This method does not work with assemblies that has been installed with NGEN, so adding AOP to existing framework bits might prove difficult. :) + +One of the quirks with using the CLR profiling API is that you need to set a couple of environment variables in order for it to work, you need to enable profiling and then set the GUID for the COM object representing the profiler. This is something that will look very odd if you have an application you're sending out to customers. I started fiddling with the idea of how I could get about this issue and came up with a solution I found interesting; our entrypoint will not be a managed executable, but an unmanaged entrypoint that hosts the CLR and configures the environment programmatically before starting the CLR. + +My prototype at the moment is very very rough, so I won't be publishing any code for this post, but sometime in the near future I will be sharing some of my findings and sourcecode. Seeing that the title of this post is postfixed with Part 1 - I've given myself the necessary pressure to create a Part 2. diff --git a/_posts/2008/02/nnug-oslo-usergroup-meeting-material/index.md b/_posts/2008/02/nnug-oslo-usergroup-meeting-material/index.md new file mode 100644 index 0000000..184a06f --- /dev/null +++ b/_posts/2008/02/nnug-oslo-usergroup-meeting-material/index.md @@ -0,0 +1,12 @@ +--- +title: "NNUG Oslo usergroup meeting material" +date: "2008-02-27" +categories: + - "xna" +--- + +I held a talk yesterday (28th of february 2008) a talk about XNA. The talk is pretty much what I held at Game Camp last year which was a revised version of what I had at NNUG Bergen in October last year. + +Anywho, if you're interested in the material you can download it from this posts attachment. + +The solution is a city in which you move around in with your Xbox gamepad or keyboard (arrow keys to move, A for flying up, Z for flying down, U for looking up and D for looking down). diff --git a/_posts/2008/02/nnug-vestfold-user-group-meeting-28th-of-february-2008/index.md b/_posts/2008/02/nnug-vestfold-user-group-meeting-28th-of-february-2008/index.md new file mode 100644 index 0000000..caf7263 --- /dev/null +++ b/_posts/2008/02/nnug-vestfold-user-group-meeting-28th-of-february-2008/index.md @@ -0,0 +1,11 @@ +--- +title: "NNUG Vestfold - User group meeting - 28th of February 2008" +date: "2008-02-22" +--- + +We're back on track [NNUG Vestfold](http://www.nnug.no/Avdelinger/Vestfold/) is hosting another user group meeting. + +This time we will have a deeper look at test driven development and the use of mocking. +[Thomas Eyde](http://thomaseyde.blogspot.com/) will come and talk about TDD and [Fredrik Kalseth](http://www.iridescence.no) will do a follow up with the use of [TypeMock](http://www.typemock.com/), and then he will conclude with a deeper look at [Jetbrains Resharper](http://www.jetbrains.com/resharper/) + +[Signup here](http://www.nnug.no/Avdelinger/Vestfold/Moter/Brukergruppemote-torsdag-28-februar-2008/). diff --git a/_posts/2008/02/norwegian-developers-conference-2008/index.md b/_posts/2008/02/norwegian-developers-conference-2008/index.md new file mode 100644 index 0000000..c707570 --- /dev/null +++ b/_posts/2008/02/norwegian-developers-conference-2008/index.md @@ -0,0 +1,13 @@ +--- +title: "Norwegian Developers Conference 2008" +date: "2008-02-12" +categories: + - "net" +--- + +Finally we're getting a developers conference in Norway; NDC. + +It will be held in 17th and 18th of June at Radisson SAS Scandinavia Hotel, Oslo. +The official site was officially launched yesterday as well : + +[http://www.ndc2008.no](http://www.ndc2008.no) diff --git a/_posts/2008/02/programatically-creating-a-wcf-contract-and-exposing-it-part1/images/creatinganabstractionfromwcf_1015e_ink282504208623.png b/_posts/2008/02/programatically-creating-a-wcf-contract-and-exposing-it-part1/images/creatinganabstractionfromwcf_1015e_ink282504208623.png new file mode 100644 index 0000000..d2b6435 Binary files /dev/null and b/_posts/2008/02/programatically-creating-a-wcf-contract-and-exposing-it-part1/images/creatinganabstractionfromwcf_1015e_ink282504208623.png differ diff --git a/_posts/2008/02/programatically-creating-a-wcf-contract-and-exposing-it-part1/index.md b/_posts/2008/02/programatically-creating-a-wcf-contract-and-exposing-it-part1/index.md new file mode 100644 index 0000000..1cbd36e --- /dev/null +++ b/_posts/2008/02/programatically-creating-a-wcf-contract-and-exposing-it-part1/index.md @@ -0,0 +1,280 @@ +--- +title: "Programatically creating a WCF contract and exposing it - Part1" +date: "2008-02-01" +categories: + - "net" + - "csharp" +--- + +I've been working lately a bit with WCF and find it very exciting and a true step up from .net remoting and .net WebServices. The scenario we're having is that we have one server application and at the moment two front-ends; Windows Forms and a ASP.net Web application. For our Windows Forms based application we need to be able to host our services in-process as well as on a server. In addition we do not want to be directly coupled to WCF for our contracts, so the declarative way of doing things with attributes (ServiceContractAttribute, OperationContractAttribute and so forth) is not acceptable, or at least not the optimal solution for our services to be exposed. Another issue I ran into was the lack of surrogate support for well known types such as XmlNode and XmlDocument and others. + +With this in mind I've been working on a prototype were we share an assembly with all our contracts and then have our own ServiceModel component that will also be shared between the projects. This will then serve as our entrypoint for our services. When we have this principal with a shared assembly with all our interfaces, it is fair to say that the contracts and it's operations are implicitly exposed and available, in other words; attribute decorations should really not be necessary. + +The picture looks something like this (finally I got to use my tablet for blogging. :) )  : + +![](images/creatinganabstractionfromwcf_1015e_ink282504208623.png "Ink Generated with Ink Blog Plugin - http://www.edholloway.com") + +In order to get this to work one need to have the ability to create service contracts programatically and be able to serialize and deserialize datacontracts without having to decorate them with different contract attributes or create surrogates. Fortunately, WCF has been made to be as flexible as possible and give 100% control to the developer, so it is pretty straight forward to do this. + +First we start by setting up our host : + +``` +ServiceHost host = new ServiceHost(serviceType, this.BaseAddress); +WSHttpBinding binding = new WSHttpBinding(SecurityMode.None); + +``` + +We need to add the ServiceMetaDataBehavior and take advantage of a method on it called ExportContract(). This method will export the contract for the service to the endpoint. + +``` +ServiceMetadataBehavior smb = new ServiceMetadataBehavior(); +smb.HttpGetEnabled = true; +smb.MetadataExporter.ExportContract(contractDescription); +host.Description.Behaviors.Add(smb); + +``` + +And then we add our endpoint : + +``` +ServiceEndpoint endPoint = new ServiceEndpoint( + contractDescription, + binding, + new EndpointAddress(this.BaseAddress)); + +host.Description.Endpoints.Add(endPoint); + +``` + +Then we open our host and make it start listening for requests - note : this implementation pretty much turns off security, probably something one should look into. :) + +``` +host.Authorization.PrincipalPermissionMode = PrincipalPermissionMode.None; +host.Open(); +``` + +As you've probably noticed, we need code to generate the contract description needed for the above implementation. A quick and dirty implementation should look like this : + +> ``` +> public class ServiceHoster +> { +> public static readonly ServiceHoster Instance = new ServiceHoster(); +> public static readonly string DefaultNamespace = "http://www.dolittle.com/"; +> +> private readonly List _hosts; +> +> private ServiceHoster() +> { +> this._hosts = new List(); +> this.Namespace = DefaultNamespace; +> } +> +> public void ShutDown() +> { +> foreach (ServiceHost host in this._hosts) +> { +> host.Close(); +> } +> } +> +> public string Namespace { get; set; } +> public Uri BaseAddress { get; set; } +> +> private ContractDescription CreateContractDescription(Type contractType, Type serviceType) +> { +> ContractDescription contractDescription = new ContractDescription(contractType.Name); +> contractDescription.ProtectionLevel = ProtectionLevel.None; +> contractDescription.ContractType = contractType; +> contractDescription.ConfigurationName = contractType.FullName; +> contractDescription.SessionMode = SessionMode.NotAllowed; +> +> MethodInfo[] methods = contractType.GetMethods(); +> +> foreach (MethodInfo method in methods) +> { +> OperationDescription operationDescription = +> new OperationDescription(method.Name, contractDescription); +> +> string messagePath = this.Namespace + contractType.Name + "/"; +> string requestName = method.Name; +> string responseName = method.Name + "Response"; +> +> string requestPath = messagePath + requestName; +> string responsePath = messagePath + responseName + "Response"; +> string resultName = requestName + "Result"; +> +> MessageDescription inputMessage = new MessageDescription(requestPath, MessageDirection.Input); +> inputMessage.Body.WrapperName = requestName; +> inputMessage.Body.WrapperNamespace = this.Namespace; +> +> ParameterInfo[] parameters = method.GetParameters(); +> foreach (ParameterInfo parameter in parameters) +> { +> MessagePartDescription messagePartDescription = +> new MessagePartDescription(parameter.Name, this.Namespace); +> messagePartDescription.Type = parameter.ParameterType; +> inputMessage.Body.Parts.Add(messagePartDescription); +> } +> operationDescription.Messages.Add(inputMessage); +> +> if (null != method.ReturnType) +> { +> MessageDescription outputMessage = +> new MessageDescription(responsePath, MessageDirection.Output); +> outputMessage.Body.ReturnValue = new MessagePartDescription(resultName, this.Namespace); +> outputMessage.Body.ReturnValue.Type = method.ReturnType; +> outputMessage.Body.WrapperName = responseName; +> outputMessage.Body.WrapperNamespace = this.Namespace; +> operationDescription.Messages.Add(outputMessage); +> } +> +> contractDescription.Operations.Add(operationDescription); +> +> operationDescription.Behaviors.Add(new ServiceOperationBehavior(method)); +> +> +> OperationBehaviorAttribute operationBehaviourAttribute = new OperationBehaviorAttribute(); +> operationDescription.Behaviors.Add(operationBehaviourAttribute); +> +> DataContractSerializerOperationBehavior d = +> new DataContractSerializerOperationBehavior(operationDescription); +> operationDescription.Behaviors.Add(d); +> } +> +> return contractDescription; +> } +> +> public void AddService(Type serviceType) +> { +> Type contractType = typeof(T); +> +> ServiceHost host = new ServiceHost(serviceType, this.BaseAddress); +> WSHttpBinding binding = new WSHttpBinding(SecurityMode.None); +> +> ContractDescription contractDescription = this.CreateContractDescription(contractType, serviceType); +> +> ServiceEndpoint endPoint = new ServiceEndpoint( +> contractDescription, +> binding, +> new EndpointAddress(this.BaseAddress)); +> +> host.Description.Endpoints.Add(endPoint); +> +> ServiceMetadataBehavior smb = new ServiceMetadataBehavior(); +> smb.HttpGetEnabled = true; +> smb.MetadataExporter.ExportContract(contractDescription); +> host.Description.Behaviors.Add(smb); +> +> +> +> host.Authorization.PrincipalPermissionMode = PrincipalPermissionMode.None; +> host.Open(); +> } +> } +> +> ``` + +As you can see it is pretty straight forward defining the contracts and its messages. The magic is located at the end of the method when all the behaviors are added. Behaviors are the real magic of WCF, they pretty much make WCF tick. :)  We add a ServiceOperationBehavior that we'll see the code for below, in addition we add some behaviors that ship with WCF; OperationBehaviorAttribute and DataContractSerializerOperationBehavior. The latter of the two will most likely be removed in Part 2 of this article when I will post that. The reason is that we will have to create our own DataContract serializer in order to be able to serialize any data types as mentioned earlier. + +The purpose of the ServiceOperationBehavior is to intercept the handling of the request and response for the services we're exposing. In this article we use the default XML serializer as you can see in the ApplyDispatchBehavior() method. Again for this example we are doing things very very simple and we don't pay attention to things like security. + +``` +public class ServiceOperationBehavior : IOperationBehavior +{ + private MethodInfo _methodInfo; + + private IOperationBehavior _innerBehavior; + + + internal ServiceOperationBehavior(MethodInfo methodInfo) + { + this._methodInfo = methodInfo; + } + + #region IOperationBehavior Members + + public void AddBindingParameters( + OperationDescription operationDescription, BindingParameterCollection bindingParameters) + { + } + + public void ApplyClientBehavior(OperationDescription operationDescription, + ClientOperation clientOperation) + { + } + + public void ApplyDispatchBehavior(OperationDescription operationDescription, + DispatchOperation dispatchOperation) + { + if (null == this._innerBehavior) + { + this._innerBehavior = + new XmlSerializerOperationBehavior(operationDescription) as IOperationBehavior; + } + + this._innerBehavior.ApplyDispatchBehavior(operationDescription, dispatchOperation); + + dispatchOperation.DeserializeRequest = true; + dispatchOperation.SerializeReply = true; + + dispatchOperation.Invoker = new ServiceInvoker(this._methodInfo); + } + + public void Validate(OperationDescription operationDescription) + { + } + + #endregion +} + +``` + +In the ApplyDispatchBehavior method we setup an invoker to handle the invocation of the methods. The invoker looks like this : + +``` +public class ServiceInvoker : IOperationInvoker +{ + private readonly MethodInfo _methodInfo; + + public ServiceInvoker(MethodInfo methodInfo) + { + this._methodInfo = methodInfo; + } + + #region IOperationInvoker Members + + public object[] AllocateInputs() + { + return new object[0]; + } + + public object Invoke(object instance, object[] inputs, out object[] outputs) + { + outputs = new object[0]; + object returnValue = this._methodInfo.Invoke(instance, inputs); + return returnValue; + + } + + public IAsyncResult InvokeBegin(object instance, object[] inputs, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public object InvokeEnd(object instance, out object[] outputs, IAsyncResult result) + { + throw new NotImplementedException(); + } + + public bool IsSynchronous + { + get { return true; } + } + + #endregion +} +``` + +You can download the sample VS2008 project [here](http://localhost:8080/wp-content/2014/10/creatinganabstractionfromwcf_1015e_simpleservicehoster_21.zip) + +Compile and run and open a browser and go to [http://localhost:8000](http://localhost:8000). diff --git a/_posts/2008/02/resharper-4-0-nightly-builds/index.md b/_posts/2008/02/resharper-4-0-nightly-builds/index.md new file mode 100644 index 0000000..ab16cab --- /dev/null +++ b/_posts/2008/02/resharper-4-0-nightly-builds/index.md @@ -0,0 +1,10 @@ +--- +title: "Resharper 4.0 - Nightly builds" +date: "2008-02-17" +--- + +JetBrains has provided access to the nightly builds of Resharper. + +I know I dare to install them, do you.. :) + +[http://www.jetbrains.net/confluence/display/ReSharper/ReSharper+4.0+Nightly+Builds](http://www.jetbrains.net/confluence/display/ReSharper/ReSharper+4.0+Nightly+Builds "http://www.jetbrains.net/confluence/display/ReSharper/ReSharper+4.0+Nightly+Builds") diff --git a/_posts/2008/02/silverlight-2-0-slotmachine-game/images/silverlight2-0slotmachinegame_72bb_image_thumb_1.png b/_posts/2008/02/silverlight-2-0-slotmachine-game/images/silverlight2-0slotmachinegame_72bb_image_thumb_1.png new file mode 100644 index 0000000..c2bd35f Binary files /dev/null and b/_posts/2008/02/silverlight-2-0-slotmachine-game/images/silverlight2-0slotmachinegame_72bb_image_thumb_1.png differ diff --git a/_posts/2008/02/silverlight-2-0-slotmachine-game/index.md b/_posts/2008/02/silverlight-2-0-slotmachine-game/index.md new file mode 100644 index 0000000..c332c88 --- /dev/null +++ b/_posts/2008/02/silverlight-2-0-slotmachine-game/index.md @@ -0,0 +1,14 @@ +--- +title: "Silverlight 2.0 Slotmachine Game" +date: "2008-02-22" +categories: + - "gamedevelopment" +tags: + - "silverlight" +--- + +I entered the [European Silverlight Challenge](http://www.silverlightchallenge.eu/) with a Silverlight Slotmachine game and ended up halfway on the results list. I'm pretty happy with that result, giving that I only spent 3 full days on the solution. The graphics for the game was made by a friend of mine; Sigurd Kristiansen ([Simian](http://www.simian.no/)), for a project I worked on in 2001 at a company I co-founded with a couple of other guys; Hermes Interactive. + +[![image](images/silverlight2-0slotmachinegame_72bb_image_thumb_1.png)](http://localhost:8080/wp-content/2012/07/Silverlight2.0SlotmachineGame_72BB_image_4.png)  + +You can play the game and download the source code [here](http://www.dolittle.com/Silverlight/SlotMachine/SlotMachine.html). diff --git a/_posts/2008/02/tfs-source-control-move-of-builds-ultimate-automagic/index.md b/_posts/2008/02/tfs-source-control-move-of-builds-ultimate-automagic/index.md new file mode 100644 index 0000000..375f209 --- /dev/null +++ b/_posts/2008/02/tfs-source-control-move-of-builds-ultimate-automagic/index.md @@ -0,0 +1,8 @@ +--- +title: "TFS - Source Control Move of builds - Ultimate Automagic" +date: "2008-02-22" +--- + +I've been working quite a bit the last two weeks with setting up a continuous integration build regime at work along side a big refactoring job that includes a lot of files and directories moving about. + +In TFS2005 the default path for builds was $TeamBuildTypes. This is more customizable in TFS2008 and I wanted to take advantage of that. I figured that our build types should be within the branch, so that when we're branching out we can branch out even the build types. Using the Source Control Explorers move action, I started moving about our builds. The next thing I needed to do was to update the build definition by going to the Team Explorer in Visual Studio and rightclicking the build I wanted to edit and choose to edit the build definition. Selected the project file page. Much to my surprise, the path for the project file has already been updated. Turns out that the build part of TFS figured out I moved the files and decided to update this automagically. Quite a nice feature, if you ask me. Saved me a bit of work, seeing that we have a few builds. diff --git a/_posts/2008/02/visual-studio-gallery/index.md b/_posts/2008/02/visual-studio-gallery/index.md new file mode 100644 index 0000000..4e2f5c1 --- /dev/null +++ b/_posts/2008/02/visual-studio-gallery/index.md @@ -0,0 +1,12 @@ +--- +title: "Visual Studio Gallery" +date: "2008-02-28" +--- + +The ecosystem team for Visual Studio just announced a brand new site for finding extensions built for Visual Studio. + +[http://visualstudiogallery.com](http://visualstudiogallery.com "http://visualstudiogallery.com") + +The goal for the team is to give the developers an easy way to find extensions for Visual Studio + +Read more from Soma's post about it [here](http://blogs.msdn.com/somasegar/archive/2008/02/27/visual-studio-gallery.aspx). diff --git a/_posts/2008/02/windows-vista-service-pack-1-available-for-download/index.md b/_posts/2008/02/windows-vista-service-pack-1-available-for-download/index.md new file mode 100644 index 0000000..14e0a39 --- /dev/null +++ b/_posts/2008/02/windows-vista-service-pack-1-available-for-download/index.md @@ -0,0 +1,8 @@ +--- +title: "Windows Vista Service Pack 1 - Available for download" +date: "2008-02-15" +--- + +If you have access to an MSDN subscription, you can now download the Windows Vista Service Pack 1. + +You'll find it under the "Top subscribers downloads" at the [MSDN subscriptions page](http://msdn2.microsoft.com/en-us/subscriptions/default.aspx). diff --git a/_posts/2008/02/windows-vista-service-pack-1-windows-server-2008-rtm/index.md b/_posts/2008/02/windows-vista-service-pack-1-windows-server-2008-rtm/index.md new file mode 100644 index 0000000..a580178 --- /dev/null +++ b/_posts/2008/02/windows-vista-service-pack-1-windows-server-2008-rtm/index.md @@ -0,0 +1,20 @@ +--- +title: "Windows Vista Service Pack 1 + Windows Server 2008 - RTM" +date: "2008-02-04" +--- + +Finally Microsoft has finished the long awaited Service Pack 1 for Vista.  Congratulations! +You can read more about it over at the [Windows Vista Team Blog](http://windowsvistablog.com/blogs/windowsvista/archive/2008/02/04/announcing-the-rtm-of-windows-vista-sp1.aspx). + +It won't be available for public download as of yet : + +> - In mid-March, we will release Windows Vista SP1 to Windows Update (in English, French, Spanish, German and Japanese) and to the download center on microsoft.com.  Customers who visit Windows Update can choose to install Service Pack 1.  If Windows Update determines that the system has one of the drivers we know to be problematic, then Windows Update will not offer SP1.  Since we know that some customers may want to update to SP1 anyhow, the download center will allow anyone who wants to install SP1 to do so. +> +> - In mid-April, we will begin delivering Windows Vista SP1 to Windows Vista customers who have chosen to have updates downloaded automatically.  That said, any system that Windows Update determines has a driver known to not update successfully will not get SP1 automatically.  As updates for these drivers become available, they will be installed automatically by Windows Update, which will unblock these systems from getting Service Pack 1.  The result is that more and more systems will automatically get SP1, but only when we are confident they will have a good experience. +> +> - The remaining languages will RTM in April. +> + +In addition the RTM version of Windows Server 2008 is also available, read more [here](http://blogs.msdn.com/iainmcdonald/archive/2008/02/04/whoo-windows-server-2008-is-released.aspx). + +Congrats on that one as well. :) diff --git a/_posts/2008/02/xna-3-0-in-2008-now-with-zune-support/index.md b/_posts/2008/02/xna-3-0-in-2008-now-with-zune-support/index.md new file mode 100644 index 0000000..600efd9 --- /dev/null +++ b/_posts/2008/02/xna-3-0-in-2008-now-with-zune-support/index.md @@ -0,0 +1,14 @@ +--- +title: "XNA 3.0 in 2008 - now with Zune support" +date: "2008-02-22" +categories: + - "net" + - "csharp" + - "gamedevelopment" + - "xna" +--- + +Microsoft has announced that they will offer a preview release of XNA 3.0 in spring of 2008 timeframe with a final release scheduled for the 2008 holiday season. +XNA 3.0 will contain give the developers the ability to create content for Zune. + +Read more over at the [XNA teams blog](http://blogs.msdn.com/xna/archive/2008/02/20/announcing-xna-game-studio-3-0-and-zune.aspx). diff --git a/_posts/2008/02/you-might-want-to-quit-the-net-3-5-installer-to-install-net-3-5/images/Youmightwanttoquitthe.net3_.5installert.5_D290_error.png b/_posts/2008/02/you-might-want-to-quit-the-net-3-5-installer-to-install-net-3-5/images/Youmightwanttoquitthe.net3_.5installert.5_D290_error.png new file mode 100644 index 0000000..66a9ad0 Binary files /dev/null and b/_posts/2008/02/you-might-want-to-quit-the-net-3-5-installer-to-install-net-3-5/images/Youmightwanttoquitthe.net3_.5installert.5_D290_error.png differ diff --git a/_posts/2008/02/you-might-want-to-quit-the-net-3-5-installer-to-install-net-3-5/index.md b/_posts/2008/02/you-might-want-to-quit-the-net-3-5-installer-to-install-net-3-5/index.md new file mode 100644 index 0000000..576b668 --- /dev/null +++ b/_posts/2008/02/you-might-want-to-quit-the-net-3-5-installer-to-install-net-3-5/index.md @@ -0,0 +1,14 @@ +--- +title: "You might want to quit the .net 3.5 installer to install .net 3.5" +date: "2008-02-22" +categories: + - "net" +--- + +A friend of mine; Hans Petter Harveg, just emailed me an interesting error message they got when installing the .net 3.5 framework. + +![Youmightwanttoquitthe.net3.5installert.5_D290_error](images/Youmightwanttoquitthe.net3_.5installert.5_D290_error.png) + +  + +It must be the good old chicken and the egg story, I'm sure.. :) diff --git a/_posts/2008/03/comeback-in-the-blogosphere/index.md b/_posts/2008/03/comeback-in-the-blogosphere/index.md new file mode 100644 index 0000000..1f26bfd --- /dev/null +++ b/_posts/2008/03/comeback-in-the-blogosphere/index.md @@ -0,0 +1,10 @@ +--- +title: "Comeback in the blogosphere.." +date: "2008-03-28" +--- + +I've been quite busy with moving from our old house to the new one and have just recently (the last couple of days), gotten all my computer equipment gathered in one place and all the furniture needed to be able to sit down and hack away at the keyboard. + +This means that I can finally return to the blogosphere and get something out there. :)   + +Today I've added the [DotNetKicks](http://www.dotnetkicks.com/) kick it link to the blog and all its posts. Feel free to start kicking any of the posts, if you find it interesting ofcourse. :) diff --git a/_posts/2008/03/game-camp-at-the-gathering-2008/index.md b/_posts/2008/03/game-camp-at-the-gathering-2008/index.md new file mode 100644 index 0000000..0645723 --- /dev/null +++ b/_posts/2008/03/game-camp-at-the-gathering-2008/index.md @@ -0,0 +1,12 @@ +--- +title: "Game Camp at The Gathering 2008" +date: "2008-03-07" +categories: + - "gamedevelopment" + - "xna" +--- + +Another event just appeared out of the blue. +We got approached by Microsoft yesterday and was asked if we had the resources and capacity to hold a workshop of some sort at [The Gathering 2008](http://www.gathering.org/tg08/). + +**Good news:** Game Camp is showing up and will hold a full day at [the Gathering 2008](http://www.gathering.org/tg08/) with the focus on learning XNA. We'll get back to you within a day or two with more specifics. Keep watching the [Game Camp news feed](http://www.gamecamp.no) for updates. :) diff --git a/_posts/2008/03/game-camp-events-2008/index.md b/_posts/2008/03/game-camp-events-2008/index.md new file mode 100644 index 0000000..62663c7 --- /dev/null +++ b/_posts/2008/03/game-camp-events-2008/index.md @@ -0,0 +1,21 @@ +--- +title: "Game Camp - Events 2008" +date: "2008-03-02" +--- + +We've finally agreed upon the dates for the two Game Camp events we'll be having in 2008. + +25th of April and 26th of September. + +We have only nailed the structures for the events and are still working on the agendas for both events. +The structure for the first event will be resemble what one is used to for user groups such as NNUG (Norwegian .Net User Group) - an evening with 2-3 speakers lasting some 3-4 hours. + +For the second event in september, we have bigger plans. We will do what we did last year in November and escalate the content. So far we've planned the following : + +- Full day and evening event with a social happening at the end +- "Superstar" speakers for our main track +- Breakout sessions with specialized content reaching from skill-level 100 to 300 +- Hands-on-labs were you are able to sit down and try out XNA for yourself +- Hopefully we'll be having partner booths as well + +We will be posting news about the events on the [Game Camp site](http://www.gamecamp.no). diff --git a/_posts/2008/03/game-camp-the-gathering-2008-material/index.md b/_posts/2008/03/game-camp-the-gathering-2008-material/index.md new file mode 100644 index 0000000..3ffb146 --- /dev/null +++ b/_posts/2008/03/game-camp-the-gathering-2008-material/index.md @@ -0,0 +1,14 @@ +--- +title: "Game Camp - The Gathering 2008 material" +date: "2008-03-31" +categories: + - "csharp" + - "gamedevelopment" + - "xna" +--- + +We held an Xna workshop at the Gathering 2008 in the Easter and most of the material is now available for download from [here](http://gamecamp.no/files/folders/gathering2008/default.aspx). + +The workshop went very well. We held a 10 hour introduction to Xna with interactive tutoring the first day, the second and third day Petri Wilhelmsen (also known as [digitalerror0r](http://gamecamp.no/members/digitalerr0r.aspx)) had a standby function for those who needed further help. In addition to having a workshop we held an Xna competition. First price was a Xbox360 Halo 3 edition with Halo3, second price a Windows Vista Ultimate and third price was a wireless network adapter for Xbox360, all the prices was courtesy of [MSDN Norway](http://msdn2.microsoft.com/nb-no/default.aspx) (thanks again [Rune Zakariassen](http://blogs.msdn.com/runez/)). + +We videotaped the different sessions we had, but the sound quality was really bad, we're working with different tools to see if we can enhance it and publish it on Game Camp. diff --git a/_posts/2008/03/nithro-in-imagine-cup/index.md b/_posts/2008/03/nithro-in-imagine-cup/index.md new file mode 100644 index 0000000..9b8f515 --- /dev/null +++ b/_posts/2008/03/nithro-in-imagine-cup/index.md @@ -0,0 +1,14 @@ +--- +title: "Nithro in Imagine Cup" +date: "2008-03-06" +categories: + - "gamedevelopment" +--- + +A group of people calling themselves Nithro has joined in the Imagine Cup competition in the category of game development. The group will blog regular on Game Camp in their own blog that can be found [here](http://gamecamp.no/blogs/Nithro/).  They will primarily write in Norwegian. + +You will always find a link in the navigation area of the Game Camp site linking to their blog. + +What can you do to help out the group to win this years Imagine Cup? One simple answer; contribute to the community. Whenever a question is raised in the forum or on their blog and you know the answer or think you do; answer the post. + +We wish you guys good luck in the competition and for you members out there, please don't hesitate to help them out. diff --git a/_posts/2008/03/nnug-vestfold-march-2008/index.md b/_posts/2008/03/nnug-vestfold-march-2008/index.md new file mode 100644 index 0000000..0e81fa2 --- /dev/null +++ b/_posts/2008/03/nnug-vestfold-march-2008/index.md @@ -0,0 +1,10 @@ +--- +title: "NNUG Vestfold - March 2008" +date: "2008-03-11" +--- + +We're holding our 9th user group meeting on the 27th of March 2008. The entire evening will focus on MVC (Model View Controller) in ASP.net and on the Windows Mobile Platform. + +Christian Schiffer will hold the ASP.net talk and Raymond Holmboe will hold the Windows Mobile talk. + +Are you in the neighborhood and feel like getting the details on MVC, register [here](http://www.nnug.no/Avdelinger/Vestfold/Moter/Brukergruppemote-torsdag-27-mars-2008/). diff --git a/_posts/2008/03/nokia-silverlight-true/index.md b/_posts/2008/03/nokia-silverlight-true/index.md new file mode 100644 index 0000000..8a77d3f --- /dev/null +++ b/_posts/2008/03/nokia-silverlight-true/index.md @@ -0,0 +1,15 @@ +--- +title: "Nokia + Silverlight = true" +date: "2008-03-04" +categories: + - "net" +tags: + - "silverlight" +--- + +In a press release today it is announced that Microsoft teams up with Nokia to bring Silverlight to devices. +During the keynote at Mix'08, Microsoft will demonstrate Silverlight running on a Nokia S60 device. + +This must be one of the coolest news thus far in the lifespan of Silverlight. The ability to actually do cross platform development with this kind of technology really gets me going at least. :) + +Read more from [Nokias' press release](http://www.nokia.com/A4136001?newsid=1197788). diff --git a/_posts/2008/03/non-smoker-life-laundry-project-1-step-1-completed/index.md b/_posts/2008/03/non-smoker-life-laundry-project-1-step-1-completed/index.md new file mode 100644 index 0000000..5fc3256 --- /dev/null +++ b/_posts/2008/03/non-smoker-life-laundry-project-1-step-1-completed/index.md @@ -0,0 +1,10 @@ +--- +title: "Non-smoker : Life Laundry Project 1, step 1 completed." +date: "2008-03-02" +categories: + - "personal" +--- + +About a year ago I decided to quit smoking with the motivational factor being my 2 year old daughter. I figured my health was in such a bad shape that I wasn't able to keep up with her. As a gift to her 2 year birthday I quit smoking with the help of a drug called Champix ([Chantix](http://www.chantix.com/content/Chantix_Branded_Homepage.jsp?setShowOn=../content/Chantix_Branded_Homepage.jsp&setShowHighlightOn=../content/Chantix_Branded_Homepage.jsp) in the U.S.). I was lucky enough to not get any sideeffects, other than actually being able to quit smoking. The coming week I'll celebrating 1 year of being a non-smoker, as well as the third birthday of my daughter. + +Now it's on to maintaining my position in the world as a non-smoker. I'm very motivated to do it, so let's keep our fingers crossed. My next project is to loose enough weight to get down to my 1997 level. This means I have to loose some 20 kilos (appr. 40 U.S. pounds or so) from my starting point which was early january. So far I've managed 3 kilos, which is actually not that bad considering I haven't started doing anything physical yet. Only thing I've done is get rid of bread and introduced WASA Whole Grain Crispbread. This works out great for my diabetes too. diff --git a/_posts/2008/03/server-move-unstable-blog/index.md b/_posts/2008/03/server-move-unstable-blog/index.md new file mode 100644 index 0000000..c05567c --- /dev/null +++ b/_posts/2008/03/server-move-unstable-blog/index.md @@ -0,0 +1,10 @@ +--- +title: "Server move - unstable blog" +date: "2008-03-08" +--- + +Due to the fact that I'm moving to a new house, the server it is hosted on must move as well. Couldn't seem to get the new owners to maintain the server in the old house. :)  + +Anyhow.. It is a two stage move - first down to my office, then to my new home. + +Hang in there.. diff --git a/_posts/2008/03/silverlight-2-beta-1-available/index.md b/_posts/2008/03/silverlight-2-beta-1-available/index.md new file mode 100644 index 0000000..420d6a9 --- /dev/null +++ b/_posts/2008/03/silverlight-2-beta-1-available/index.md @@ -0,0 +1,20 @@ +--- +title: "Silverlight 2 beta 1 available" +date: "2008-03-05" +tags: + - "silverlight" +--- + +Finally, the beta release we've all been waiting for (at least me and a couple of other guys out there.. :) ) . + +The runtime can be found [here](http://www.microsoft.com/silverlight/resources/installationFiles.aspx?v=2.0) + +Microsoft Silverlight tools beta 1 for Visual Studio 2008 can be found [here](http://www.microsoft.com/downloads/details.aspx?FamilyId=E0BAE58E-9C0B-4090-A1DB-F134D9F095FD&displaylang=en). + +and finally the Silverlight 2 SDK Beta 1 can be found [here](http://www.microsoft.com/downloads/details.aspx?FamilyId=4E03409A-77F3-413F-B108-1243C243C4FE&displaylang=en). + +:) + +And now, I need to download from the same URLs myself and get started. I will most likely return to this blog with some thoughts, at least I think so.. + +Happy hunting everyone.. diff --git a/_posts/2008/03/silverlight-2-rendering-in-a-storyboard-event/index.md b/_posts/2008/03/silverlight-2-rendering-in-a-storyboard-event/index.md new file mode 100644 index 0000000..0527c2f --- /dev/null +++ b/_posts/2008/03/silverlight-2-rendering-in-a-storyboard-event/index.md @@ -0,0 +1,15 @@ +--- +title: "Silverlight 2 - rendering in a Storyboard event" +date: "2008-03-30" +categories: + - "csharp" + - "gamedevelopment" +tags: + - "silverlight" +--- + +During my "port" from Silverlight 1.1 to 2 of the [Balder](http://www.codeplex.com/Balder) game engine I started working on last year, I've ran into a couple of gotchas. When I was optimizing the engine I discovered that Silverlight 1.1 had a speed issue when working with any Visual from managed code and adding it to the rendering pipeline of Silverlight. There was a very large interop overhead involved and I changed the rendering strategy to use a singleton Control that all primitives was added to and this would convert them all to Xaml and call the InitializeFromXaml() on itself. This proved to give a serious boost in performance. + +This same approach for Silverlight 2 proved to be a killer for the engine all together. It turns out that doing this from the Storybard completed event that the engine was built around to serve as the "rendering thread", is really bad. It's all OK as long as you don't spend more time in the completed event than you've set the duration property to for the storyboard you're using. Default the storyboard is set to 0, but for Balder we set this to 20 milliseconds, which is just the game programmer in me coming to life; 20ms = 50 Hz = the refresh rate of the PAL standard (50 field changes a second, that is). + +So, what to do with this..  Well. To be honest, I haven't figured it out yet. I'm still looking into it. Any thoughts on the matter can be emailed me at einar\_at\_dolittle.com. One of the things I will be looking into is to revert to rendering by creating the visuals programatically and adding them from managed code, I guess this won't solve the entire problem since the Storyboard implementation seems to be the one with a problem here, or at least the usage of it. After all it was not designed for the purpose of doing what I'm trying to do. :) diff --git a/_posts/2008/03/windows-now-with-ketchup-flavour/index.md b/_posts/2008/03/windows-now-with-ketchup-flavour/index.md new file mode 100644 index 0000000..ffa51ce --- /dev/null +++ b/_posts/2008/03/windows-now-with-ketchup-flavour/index.md @@ -0,0 +1,10 @@ +--- +title: "Windows - now with ketchup flavour" +date: "2008-03-28" +--- + +Could this be the next version of Windows everyone is talking about. + +![](http://www.media.allerinternett.no/php/obj.phpi?d=x2&o=2577519&w=567&h=0&ee=) + +Just came across this picture and had to post it. Have a great weekend everyone. diff --git a/_posts/2008/04/6-weeks-paternity-leave/index.md b/_posts/2008/04/6-weeks-paternity-leave/index.md new file mode 100644 index 0000000..c9bf085 --- /dev/null +++ b/_posts/2008/04/6-weeks-paternity-leave/index.md @@ -0,0 +1,12 @@ +--- +title: "6 weeks paternity leave" +date: "2008-04-11" +--- + +Norway has a great paternity leave option for us fathers. The mothers still get most of the total parental leave that is made available, but 6 weeks time off to spend with your kid is great. + +I for one am looking forward to this time, not only because it is time off, but I get to spend some quality time with my son that I otherwise don't have the luxury of doing. + +Starting from this monday (14th of April 2008), I'll be chilling out at home with my son; Herman. + +I guess I'll be doing this blog though.. :) (and probably some code every so often..) diff --git a/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb.png b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb.png new file mode 100644 index 0000000..53b4e94 Binary files /dev/null and b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb.png differ diff --git a/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_1.png b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_1.png new file mode 100644 index 0000000..b74bd45 Binary files /dev/null and b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_1.png differ diff --git a/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_111.png b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_111.png new file mode 100644 index 0000000..2ac140f Binary files /dev/null and b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_111.png differ diff --git a/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_12.png b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_12.png new file mode 100644 index 0000000..178bf1b Binary files /dev/null and b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_12.png differ diff --git a/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_21.png b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_21.png new file mode 100644 index 0000000..14faaa8 Binary files /dev/null and b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_21.png differ diff --git a/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_41.png b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_41.png new file mode 100644 index 0000000..722ea2a Binary files /dev/null and b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_41.png differ diff --git a/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_51.png b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_51.png new file mode 100644 index 0000000..3c38df8 Binary files /dev/null and b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_51.png differ diff --git a/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_61.png b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_61.png new file mode 100644 index 0000000..14f4cd9 Binary files /dev/null and b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_61.png differ diff --git a/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_71.png b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_71.png new file mode 100644 index 0000000..bd1682a Binary files /dev/null and b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_71.png differ diff --git a/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_8.png b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_8.png new file mode 100644 index 0000000..e99eb36 Binary files /dev/null and b/_posts/2008/04/compressing-audio-in-xna-for-windows/images/compressingaudioinxnaforwindows_fb55_image_thumb_8.png differ diff --git a/_posts/2008/04/compressing-audio-in-xna-for-windows/index.md b/_posts/2008/04/compressing-audio-in-xna-for-windows/index.md new file mode 100644 index 0000000..a96c35d --- /dev/null +++ b/_posts/2008/04/compressing-audio-in-xna-for-windows/index.md @@ -0,0 +1,58 @@ +--- +title: "Compressing audio in Xna for Windows" +date: "2008-04-02" +--- + +Xna does not support MP3 or WMA, neither on Xbox or Windows. For Xbox you have a format called XMA that is pretty much like WMA on Windows, but for Xna for Windows you have to resort to uncompressed (PCM) or close to uncompressed (ADPCM). This tutorial shows you how you can use ADPCM and get at least some compression for your sounds and save a bit of space. The average compression rate is 27% for the default settings. + +We will be using XACT (Microsoft Cross-Platform Audio Creation Tool) that comes with both Xna 1.0 and 2.0. + +Create a new project by going to File->New Project (Ctrl +N) and create yourself an empty project. + +[![image](images/compressingaudioinxnaforwindows_fb55_image_thumb_1.png)](http://localhost:8080/wp-content/2012/07/CompressingaudioinXnaforWindows_FB55_image_4.png) + +You then get a screen looking something like this: + +[![image](images/compressingaudioinxnaforwindows_fb55_image_thumb_21.png)](http://localhost:8080/wp-content/2012/07/CompressingaudioinXnaforWindows_FB55_image_6.png) + +First we will create a compression preset by right-clicking the compression presets and select new compression preset: + +[![image](images/compressingaudioinxnaforwindows_fb55_image_thumb_41.png)](http://localhost:8080/wp-content/2012/07/CompressingaudioinXnaforWindows_FB55_image_10.png) + +Give it a name, so you'll recognize it later on in the process. + +Now we need to select ADPCM and samples per block: + +[![image](images/compressingaudioinxnaforwindows_fb55_image_thumb_51.png)](http://localhost:8080/wp-content/2012/07/CompressingaudioinXnaforWindows_FB55_image_12.png) + +We'll leave the samples per block to 128, which is default. The quality of the sound is quite good with this setting. + +Now we need to create a wave bank by right-clicking the wave banks in the project and choose new wave bank: + +[![image](images/compressingaudioinxnaforwindows_fb55_image_thumb_61.png)](http://localhost:8080/wp-content/2012/07/CompressingaudioinXnaforWindows_FB55_image_14.png) + +Leave the default settings for now. + +You're then given a window where all your wave files will exist for that particular wave bank. Here we can insert our wave files. +Just right-click inside the window and choose to insert wave files: + +[![image](images/compressingaudioinxnaforwindows_fb55_image_thumb_71.png)](http://localhost:8080/wp-content/2012/07/CompressingaudioinXnaforWindows_FB55_image_16.png) + +Select your wave file: + +[![image](images/compressingaudioinxnaforwindows_fb55_image_thumb_8.png)](http://localhost:8080/wp-content/2012/07/CompressingaudioinXnaforWindows_FB55_image_18.png) + +We can now select the compression preset we want to use for the imported wave by selecting the wave file and then selecting the correct preset in the properties in the lower left of the application: + +[![image](images/compressingaudioinxnaforwindows_fb55_image_thumb.png)](http://localhost:8080/wp-content/2012/07/CompressingaudioinXnaforWindows_FB55_image_20.png) + +Now we need to create sound bank by right-clicking the sound banks and choose new sound bank: + +[![image](images/compressingaudioinxnaforwindows_fb55_image_thumb_111.png)](http://localhost:8080/wp-content/2012/07/CompressingaudioinXnaforWindows_FB55_image_24.png) + +Open your wave bank and select the wave file you want to be cue in the sound and drag it from the wave bank onto the cue part of the window. +The result should be something like this: + +[![image](images/compressingaudioinxnaforwindows_fb55_image_thumb_12.png)](http://localhost:8080/wp-content/2012/07/CompressingaudioinXnaforWindows_FB55_image_26.png) + +You now have a project you can build and use from your solution programmatically. diff --git a/_posts/2008/04/disable-xaml-designer-in-visual-studio-2008/images/disablexamldesignerinvisualstudio2008_118f4_image_thumb.png b/_posts/2008/04/disable-xaml-designer-in-visual-studio-2008/images/disablexamldesignerinvisualstudio2008_118f4_image_thumb.png new file mode 100644 index 0000000..d99b0e5 Binary files /dev/null and b/_posts/2008/04/disable-xaml-designer-in-visual-studio-2008/images/disablexamldesignerinvisualstudio2008_118f4_image_thumb.png differ diff --git a/_posts/2008/04/disable-xaml-designer-in-visual-studio-2008/index.md b/_posts/2008/04/disable-xaml-designer-in-visual-studio-2008/index.md new file mode 100644 index 0000000..9d517cc --- /dev/null +++ b/_posts/2008/04/disable-xaml-designer-in-visual-studio-2008/index.md @@ -0,0 +1,15 @@ +--- +title: "\"Disable\" XAML designer in Visual Studio 2008" +date: "2008-04-24" +categories: + - "net" +tags: + - "silverlight" +--- + +One of the things I've been finding annoying is the time the designer takes to load for an XAML file when opening it. +Pressing escape stops it from doing all it's preparation for the designer and then maximizing it to XAML view helps, but that has to be done for every single file. + +It is possible to set this behavior as default for the XAML designer. In Tools->Text Editor->XAML->Miscellaneous you'll find an option called "Always open documents in full XAML view": + +[![image](images/disablexamldesignerinvisualstudio2008_118f4_image_thumb.png)](http://localhost:8080/wp-content/2012/07/DisableXAMLdesignerinVisualStudio2008_118F4_image_2.png) diff --git a/_posts/2008/04/game-camp-event-in-less-than-3-weeks/index.md b/_posts/2008/04/game-camp-event-in-less-than-3-weeks/index.md new file mode 100644 index 0000000..59f89e1 --- /dev/null +++ b/_posts/2008/04/game-camp-event-in-less-than-3-weeks/index.md @@ -0,0 +1,15 @@ +--- +title: "Game Camp Event in less than 3 weeks" +date: "2008-04-07" +--- + +The 25th of April we're continuing the success by holding yet another Game Camp event. +NITH has been kind enough to let us use their facilities, once again. + +This time around we're having two excellent sessions: + +[Digiment](http://www.digiment.no) will come and talk about how to start your own business within games development and how to survive in the business. + +After this, Petri Wilhelmsen will talk about how to do XNA Shaders Programming - the gold that gives modern games the realistic look. + +To attend you need to register [here](http://gamecamp.no/Events/default.aspx). diff --git a/_posts/2008/04/mysterious-world-of-apple/images/mysteriousworldofapple_86ab_image_thumb.png b/_posts/2008/04/mysterious-world-of-apple/images/mysteriousworldofapple_86ab_image_thumb.png new file mode 100644 index 0000000..289375d Binary files /dev/null and b/_posts/2008/04/mysterious-world-of-apple/images/mysteriousworldofapple_86ab_image_thumb.png differ diff --git a/_posts/2008/04/mysterious-world-of-apple/images/mysteriousworldofapple_86ab_image_thumb_1.png b/_posts/2008/04/mysterious-world-of-apple/images/mysteriousworldofapple_86ab_image_thumb_1.png new file mode 100644 index 0000000..f982f65 Binary files /dev/null and b/_posts/2008/04/mysterious-world-of-apple/images/mysteriousworldofapple_86ab_image_thumb_1.png differ diff --git a/_posts/2008/04/mysterious-world-of-apple/images/mysteriousworldofapple_86ab_image_thumb_21.png b/_posts/2008/04/mysterious-world-of-apple/images/mysteriousworldofapple_86ab_image_thumb_21.png new file mode 100644 index 0000000..2c01649 Binary files /dev/null and b/_posts/2008/04/mysterious-world-of-apple/images/mysteriousworldofapple_86ab_image_thumb_21.png differ diff --git a/_posts/2008/04/mysterious-world-of-apple/index.md b/_posts/2008/04/mysterious-world-of-apple/index.md new file mode 100644 index 0000000..5703bf8 --- /dev/null +++ b/_posts/2008/04/mysterious-world-of-apple/index.md @@ -0,0 +1,20 @@ +--- +title: "Mysterious world of Apple" +date: "2008-04-27" +--- + +I've been considering buying a Mac for a couple of years now. Takes a while for me to decide. But lately I've had an image of an iMac on my eyelids whenever I close my eyes (makes it very hard to sleep), which has led me to subscribe to several Apple related feeds and really start to get to know the "other side". Anyhow, several sites has been expecting an iMac update before the summer hits and this week [reports](http://www.appleinsider.com/articles/08/04/25/new_imacs_in_retail_system_3g_iphone_redesign_rumor_3gs_d_day.html) started surfacing about an imminent release next week already. + +The reports mostly looks for signs and base their rumors on these signs. One sign is that shops are running out of iMacs. I decided to look for these signs myself and visited a couple of Norwegian webshops that sell iMacs. Mysteriously they were all pretty much out of iMacs and had the delivery date set to the 29th of April 2008, which was the date that the rumors says a new version is coming out. + +During my hunt for the perfect Mac for me, I joined a couple of forums and had a little idea in my head; what if I bought the cheapest 24" iMac and upgraded the CPU. The loyalty is incredible with Mac users, most of the response I got was on the lines of ".. you don't want to do that, it'll void your warranty.." , "... Apple has soldered the CPU to the motherboard ..." , "... it's to advanced opening an iMac ...".  As a PC user who's been opening up everything I've ever bought and putting together PCs from scratch, I found these statements strange. + +Getting hold of the detailed specs about the computers from Apple has been a real hassle as well. After a lot of research, I managed to figure out what socket and chipset the iMacs was based upon. The same day I figured it all out, the rumors about a new iMac started surfacing. Back to scratch, waiting for the new ones to start thinking about buying one again. :) + +Screenshots from WebShops and their ETAs: + +[![image](images/mysteriousworldofapple_86ab_image_thumb.png)](http://localhost:8080/wp-content/2012/07/MysteriousworldofApple_86AB_image_2.png) + +[![image](images/mysteriousworldofapple_86ab_image_thumb_1.png)](http://localhost:8080/wp-content/2012/07/MysteriousworldofApple_86AB_image_4.png) + +[![image](images/mysteriousworldofapple_86ab_image_thumb_21.png)](http://localhost:8080/wp-content/2012/07/MysteriousworldofApple_86AB_image_6.png) diff --git a/_posts/2008/04/paternity-leave-day-2-bring-on-the-surgeon/index.md b/_posts/2008/04/paternity-leave-day-2-bring-on-the-surgeon/index.md new file mode 100644 index 0000000..9dbae17 --- /dev/null +++ b/_posts/2008/04/paternity-leave-day-2-bring-on-the-surgeon/index.md @@ -0,0 +1,12 @@ +--- +title: "Paternity leave, day 2 : Bring on the surgeon..." +date: "2008-04-15" +--- + +With the risk of turning my blog into a paternity leave diary, I'll just update you with the latest from the front. :) + +Today I started my day with a sore bottom and partly back, understandably from all the cutting from my doctor yesterday. Anywho, I went along and found a position in front of my Xbox that didn't hurt too much and played Halo again.. :) Always great fun. After a while I started working with the Ageia PhysX SDK - great fun. Then my doctor called me and told me to drop by her office ASAP, she had managed to arrange for me to go to the hospital to a surgeon. With mildly shaky legs, I did as she told me and went to get a letter she had written for the hospital. Went from there directly to the hospital and waited for a couple of hours and the surgeon started examining me, which needless to say was VERY VERY PAINFUL (thanks doc). Turned out the surgeon didn't want to perform a surgery, the wound was clean from bacteria and she (I'm lucky, I just get female doctors)  just wanted to observe me over a couple of days.. + +No more knives/scalpels, at least for a while. Phew.. + +And now..  Back to PhysX and Xna. diff --git a/_posts/2008/04/paternity-leave-day1-get-your-knives-ready/index.md b/_posts/2008/04/paternity-leave-day1-get-your-knives-ready/index.md new file mode 100644 index 0000000..6a4702d --- /dev/null +++ b/_posts/2008/04/paternity-leave-day1-get-your-knives-ready/index.md @@ -0,0 +1,12 @@ +--- +title: "Paternity leave, day1 : Get your knives ready..." +date: "2008-04-14" +--- + +Day 1 of my maternity leave didn't start as I had hoped. The last week I've been taking some penicillin for a [pilonidal](http://www.pilonidal.org/whatitis.htm) (Abscess, cyst) that keeps on getting inflamed every so often. Normally it's been about an inch big, but last week it grew to the size of a small lemon. My doctor prescribed some Diclocil that hopefully would cure it. Two days later I was in the emergency room with insane pain. I wasn't able to sit or stand. The doctor there was kind enough to sedate the area of the infection and cut it open to get the worst of the infection out, but told me that I should go and get surgery. + +Today, my first official day of the paternity leave, I went to my doctors office, thinking that I was to get a referral to a specialist. Waited for some 40-45 minutes, went in and showed her the condition it was in now. 30 seconds later she decided it was best to really cut it open - this time without any anesthetic. Damn, that hurts!! I've never ever been in such pain. It was a 2-3 inch cut, quite deep. She then started to push around it to get all the infection out of there. The procedure took some 30 minutes and got most of it out, but I need to go to the hospital and do some surgery to get it all out. + +The bright side is that the safest activity I can do without having pain is to turn on my Xbox360 and play Halo3 - one of the many games I have laying around I haven't had the chance to play yet. + +Now, day 2 awaits.. :) diff --git a/_posts/2008/04/pre-ndc-interview-with-scott-hanselman/index.md b/_posts/2008/04/pre-ndc-interview-with-scott-hanselman/index.md new file mode 100644 index 0000000..110e0a0 --- /dev/null +++ b/_posts/2008/04/pre-ndc-interview-with-scott-hanselman/index.md @@ -0,0 +1,8 @@ +--- +title: "Pre NDC interview with Scott Hanselman" +date: "2008-04-25" +--- + +On the 17th and 18th of June, [Norwegian Developers Conference](http://www.ndc2008.no/foredragsholdere/) will be held. [Rune Grothaug](http://blogs.msdn.com/grothaug/) had an interview with Scott Hanselman with questions from [Norwegian Net User Group](http://www.nnug.no) about LAMP, Silverlight and More. + +You'll find the video [here](http://youtube.com/watch?v=JIjCUS67Mk4). diff --git a/_posts/2008/04/xna-workshop-at-metu-in-ankara-turkey/index.md b/_posts/2008/04/xna-workshop-at-metu-in-ankara-turkey/index.md new file mode 100644 index 0000000..8e2feb7 --- /dev/null +++ b/_posts/2008/04/xna-workshop-at-metu-in-ankara-turkey/index.md @@ -0,0 +1,12 @@ +--- +title: "XNA Workshop at METU in Ankara, Turkey" +date: "2008-04-23" +categories: + - "net" + - "csharp" + - "xna" +--- + +I was asked earlier by Microsoft if I could hold a workshop in Turkey. + +On the 20th of May I'll be heading down to Ankara and hold a 3-4 day workshop for a competition Microsoft is holding at the [Middle East Technical University](http://www.metu.edu.tr). I'm working on the agenda as we speak and thus far it's starting to look very interesting. My goal is to have a more or less complete walkthrough of XNA. Ambitious you might say. That's my plan at the moment at least. :) diff --git a/_posts/2008/04/you-have-been-assimilated-a-real-good-thing/index.md b/_posts/2008/04/you-have-been-assimilated-a-real-good-thing/index.md new file mode 100644 index 0000000..fe39b42 --- /dev/null +++ b/_posts/2008/04/you-have-been-assimilated-a-real-good-thing/index.md @@ -0,0 +1,22 @@ +--- +title: "You have been assimilated - a real good thing!" +date: "2008-04-07" +--- + +**Warning: all opinions are my own personal opinions and does no necessarily reflect the opinions of my employer.** + +On Thursday last week, the employees at the company I work ([Notus](http://www.notus.no)) was informed that [Visma](http://www.visma.no) [Unique](http://visma.no/index.asp?topExpand=&subExpand=&menuid=1000932&strUrl=//applications/system/publish/view/showobject.asp?infoobjectid=1000706&context=3) has bought the company. + +I for one am thrilled by this. A couple of years ago, there was talk about a potential buyer of the company. And there has also been talk about a fusion earlier with another company. + +I warned you earlier of personal opinions, so here goes; This is the first real opportunity for our developers to apply a development process. We've been struggling since I started in the company in January 2002 with applying processes. We started off in 2003/2004 with eXtreme Programming and had some success but ended up with loosing the process, again. A year later or so I started looking at MSF Agile, which was in beta stage. We started applying the process later on in 2005. Now, we're turning our head to the calendar and it says 2008, and still we're struggling with the same things as in 2002; we are not predictable, we are not able to deliver software with the quality we want and in the timeframe we want. All this is, in my opinion, due to the ability to apply a process. I've often asked myself the question why we aren't able to apply the process and I think there is no single answer to it. One of the answers I think, is the lack of respect from marketing and support for how a developer is working. The result is that everyone working with support confronts the developers directly with all bugs reported from customers and the bug should (at least if you ask the support guys) be prioritized that very instant. If you have a couple of support guys running around doing this, your day as a developer is pretty much ruined. On top of this you got sales running around selling stuff that has not yet been discussed with any of the developers. And they keep doing it and expecting it to be finished soon, typically in a couple of weeks - at most!  + +But, I think this is just half the truth. When you want to apply a process, I think everyone has to sort of pitch in on making it happen. This means that you have to get the department that is applying a process to really be committed to applying it. In order to do this, knowledge is the key. By focusing on enlightening the people that will be working with process through training and constantly talking about every step in the process, I think people will be more open to the change and will help in applying the process. It's pretty much about collective awareness, or global ownership as it's called in most modern agile processes these days. + +Well.. Back to what I started off with. I believe being a branch/department in Visma will help us achieve the goal of having a software development process that really works. With a company as big as Visma is, they've gone through the hoops a couple of times and knows the value of having a good process. The really nice thing about their process is that they open for diversity within the organizations they acquire, they only need a couple of roles represented at the site. Lucky for us, we're trying to work under the regime of MSF Agile that covers the roles they need. + +Over the years I've often found myself discussing the lack of process at our company and very often been confronted with the argumentation that we're too small to apply any real process. I still hear this, even now when we're 7 developers. My response to this is; you need a process the very instance software development enters the discussion of a startup company; 1 developer - apply a process and stick with it if feels good. Embrace change - change it if it doesn't fit the organization anymore, be process-aware. + +By "we" in this post, I'm referring to the developers. We're all alone in this dark forgotten place.. :)     + +Btw: If you want to read the press-release of the acquisition of our company, you'll find it [here](http://www.visma.no/index.asp?topExpand=&subExpand=&strUrl=//applications/system/publish/view/showobject.asp?infoobjectid=1002797&channelid=1000152) and [here](http://www.notus.no/Articles/76.aspx) ([English version here](http://www.visma.com/index.asp?topExpand=&subExpand=&strUrl=//applications/system/publish/view/showobject.asp?infoobjectid=1002798&channelid=1000254)). diff --git a/_posts/2008/05/agile-is-fragile/index.md b/_posts/2008/05/agile-is-fragile/index.md new file mode 100644 index 0000000..be2d436 --- /dev/null +++ b/_posts/2008/05/agile-is-fragile/index.md @@ -0,0 +1,30 @@ +--- +title: "Agile is fragile" +date: "2008-05-06" +tags: + - "agile" +--- + +Since I started working professionally back in 1994 with software development I got very interested in processes and methodologies. Over the years I've worked with quite a few types; Waterfall, Cowboy, eXtreme Programming and lately we've been working with applying MSF Agile. Back in 1996 I started doing test-driven development, on games as the matter of fact. We had unit tests for basically everything, some of them needed to be interactive seeing that we couldn't exactly mock visual stuff that needed the human eye to approve, but nevertheless we were TDD based. + +I've been working with agile software development for the last 4-5 years, or should I say, trying to work with agile software development. All processes has a certain set of rules that needs to be followed and I remember when I had training in XP they said that you need to obey the 12 pillars of XP. The developers at work, myself included, couldn't really figure out why that was so important and decided to apply the pillars we found interesting. Mistake number 1. + +We applied XP for about a year and a half and found it to be lacking certain elements to it. We felt the process was missing key quality assurance elements and was very exclusive to developers. Mistake number 2 we made was that we hadn't really applied eXtreme Programming, so who were we to judge. Anyhow, we tagged along and discovered MSF Agile and found it very interesting straight away. It had the roles we felt were missing and process elements that would fill in the missing gaps of what we felt were missing for quality assurance. We jumped aboard the train and never looked back (until today). + +Mistake number 3; I found myself believing to my core that we had applied MSF Agile, at the time of introduction I was manager of application development and was working a bit more with processes and planning. I sincerely believed we had applied MSF Agile with all it's artifacts. Last spring I decided to leave the company for a job that looked very interesting (My personal mistake number X), only to find out that the company I started at was not interested in applying any form of methodology unless it was named adhoc. I decided to leave them after only 2 months and was quickly approached by the company I quit 2 months earlier and got an offer that was acceptable. I went back, this time being only a senior software developer and team manager for a smaller team (4 people, including myself). I decided at that point that I'd had it with all the management stuff, I wanted to primarily write code, but it wouldn't hurt to have some control over a specific part of the application we are working on. Anywho..  After a couple of months I started to see something very strange. We weren't working according to any process, or at least any process I knew. I got really pissed off and started ranting openly about why aren't we working according to MSF Agile (My personal mistake number X+1). The truth was that when I was too busy planning our next big project and going around believing that everyone was working according to the process, people didn't know the first thing about the process. No one had read the process guidance on our sharepoint site even. I kept ranting and was honestly really fed up that there hadn't been anyone who took charge and applied the process we had agreed upon. + +And now back to the title of this post. Why do I think agile is fragile, in fact I think most processes are fragile in the sense that if you don't apply the process correctly, the process will collapse under it's own weight. Agile is fragile is just a cool title, I honestly think the statement applies to all processes. So, why are they so fragile. Take for instance "embrace change" that agile methodologies has in it's core. The concept of having code that can be changed, refactored, feature change at any given point in time demands that you apply TDD. Without unit tests you would really need to be a cowboy in order to dare to start a major refactoring job. The unit tests serves as a safety net that assures you that the code you are rewriting will still result in a working piece of software. Another example is pair programming. In order to achieve full global ownership to the code, pair programming must be applied. The beauty of pair programming is that you spread the knowledge about the code throughout your team like a wildfire. If you drop this and let developers specialize, global ownership is lost. Pair programming is probably the pillar that is hardest to apply in a team. Many developers will argue not to be part of it at all. Pair programming is not an aspect of MSF Agile. That's probably why global ownership is not a part of MSF Agile. Yet another example is the fact that the customer should be available all the time. By customer one means an actual customer or a representative for the customer that is located within the team or is available within the organization. Without having the close relationship to the customer, you will not be able to see if the project is on the right track between iterations. An agile project needs to correct itself all the time, this is done through the use of iterations. The length of the iteration can be 1, 2, 3 or 4 weeks. It is not recommended in most cases to have them go for more than 4 weeks. If you don't have the customer available at these junctions, you will not be aware of any mistakes you might have done. That means you're back to waterfall were you have a test period at the very end of the project. A very important aspect of all agile methodologies is that all roles work actively for every iteration. That means that you're planning, writing unit tests, writing code, acceptance testing and so on for every iteration. Loose one of the activities and it all collapses. I could go on and on about other fragile relationships in agile methodologies, my point is that you must be really careful about applying a whole process no matter what process you decide to apply. + +The beauty of having time of work (I'm on my paternity-leave or sick-leave, not sure which one yet) and really not think about work, totally disconnected from work (I'm not even reading emails..), is that you get a lot of time to think about stuff like this. I've come up with a couple of rules that I believe is important when trying to apply a software development process : + +1\. Whenever you want to apply a process, one would think that having management with you should be sufficient. Wrong. You need the entire team. Every single member of the team must embrace the new process. They don't have to like it at first, but they have to agree to be willing to try it out and work according to it. + +2\. You need to be really strict when applying the process. You can't afford to not apply the whole process. Most processes will collapse if you do so. + +3\. Stretch to fit - not shrink to fit. You can adjust the process so it fits to your needs by adding to it, never removing! + +4\. You need at least 2 persons in the organization that are not only masters of the process, but also really enthusiastic about it. They will act as motivators for the others. + +5\. Train everyone! If everyone is trained in the process, and if possible, certified in it, you'll automatically have a process-cop in every single member of the team. Together the team will apply the process and correct any mistakes that is bound to happen. + +I'll probably come up with a couple more rules as the days fly by sitting here doing nothing. Feel free to drop me a comment if you have input to the madness above.. :) diff --git a/_posts/2008/05/circle-of-life/images/circleoflife_df6a_image_thumb1.png b/_posts/2008/05/circle-of-life/images/circleoflife_df6a_image_thumb1.png new file mode 100644 index 0000000..4490072 Binary files /dev/null and b/_posts/2008/05/circle-of-life/images/circleoflife_df6a_image_thumb1.png differ diff --git a/_posts/2008/05/circle-of-life/index.md b/_posts/2008/05/circle-of-life/index.md new file mode 100644 index 0000000..f5ff683 --- /dev/null +++ b/_posts/2008/05/circle-of-life/index.md @@ -0,0 +1,17 @@ +--- +title: "Circle of life" +date: "2008-05-14" +categories: + - "net" + - "csharp" +--- + +As a response to [Fredrik Kalseths](http://www.iridescence.no/) blog about [circle of interest](http://www.iridescence.no/Posts/Circle-of-Interest.aspx) and a subtle hint in his post that it would be interesting to see my circles (sounds a bit kinky, doesn't it), here goes : + +[![image](images/circleoflife_df6a_image_thumb1.png)](http://localhost:8080/wp-content/2012/07/Circleoflife_DF6A_image_2.png) + +It seems that I have a lot that I define as my core, but I think it reflects what I really care about. I could probably add a couple of more technologies in it, but I think it is more than sufficient. :) + +Anywho, the background for all this is [Paul Stovells](http://www.paulstovell.com/blog/) post about [the circle of interest](http://www.paulstovell.com/blog/whats-your-circle-of-interest) (I know I called it circle of life, but then again computing pretty much consumes my life). + +It was quite interesting doing this, you have to really stop and think things over. I challenge anyone reading this to do the same. diff --git a/_posts/2008/05/flash-10-comes-with-hardware-accelerated-3d/index.md b/_posts/2008/05/flash-10-comes-with-hardware-accelerated-3d/index.md new file mode 100644 index 0000000..af341da --- /dev/null +++ b/_posts/2008/05/flash-10-comes-with-hardware-accelerated-3d/index.md @@ -0,0 +1,10 @@ +--- +title: "Flash 10 comes with hardware accelerated 3D" +date: "2008-05-15" +--- + +The new beta version of Flash 10 comes with hardware acceleration for 3D. This could prove to be the real advantage point Flash needs over technologies such as Silverlight. + +As a C# developer and eager games developer, I'd love to see this in Silverlight. I've always wondered why one have been relying on software rendering in RIA technologies such as Flash and Silverlight when the graphics adapter is perfectly capable of doing this a lot better than the CPU. Let the CPU do what its good at and the graphics adapter likewise. For cross-platform compatibility one could use OpenGL as a platform for this. I guess doing that would be quite the camel to swallow for Microsoft, an abstraction of some sort would enable them to take advantage of DirectX on the Windows platform and OpenGL on Mac and Linux or any other platform. The only issue would be devices such as a Windows Mobile or a Nokia mobile telephone that wouldn't be as powerful in 3D rendering. But I think that problem should be left to the content developer to choose how advanced graphics they want in their content. + +Anyhow, the Flash 10 beta can downladed [here](http://www.adobe.com/go/astro) and some samples can be found [here](http://labs.adobe.com/technologies/flashplayer10/demos/). diff --git a/_posts/2008/05/javafx-javaone-2008/index.md b/_posts/2008/05/javafx-javaone-2008/index.md new file mode 100644 index 0000000..92d5f83 --- /dev/null +++ b/_posts/2008/05/javafx-javaone-2008/index.md @@ -0,0 +1,12 @@ +--- +title: "JavaFX @ JavaOne 2008" +date: "2008-05-07" +categories: + - "java" +tags: + - "silverlight" +--- + +JavaFX was announced this week at JavaOne. I first heard about it about a year ago and have been waiting ever since for what they are working on. It certainly looks like a direct competitor with Flash and Silverlight, but they're also aiming for more than just browser experience. They have 2 things going for it that is really great; 3D support out-of-the-box and tools support the Mac. + +I guess I gotta sign up and have a go at this. After all, it's only fair after doing a lot of Silverlight stuff and attempting to do stuff with Flash earlier. diff --git a/_posts/2008/05/microsoft-source-analysis-for-c/index.md b/_posts/2008/05/microsoft-source-analysis-for-c/index.md new file mode 100644 index 0000000..aab143b --- /dev/null +++ b/_posts/2008/05/microsoft-source-analysis-for-c/index.md @@ -0,0 +1,11 @@ +--- +title: "Microsoft Source Analysis for C#" +date: "2008-05-24" +categories: + - "net" + - "csharp" +--- + +Microsoft announces Source Analysis for C#. It is very similar to Static Code Analysis (FxCop), but instead of doing on the binaries it performs the analysis on the actual C# code. + +Read more about it [here](http://blogs.msdn.com/sourceanalysis/archive/2008/05/23/announcing-the-release-of-microsoft-source-analysis.aspx). diff --git a/_posts/2008/05/msbuild-task-for-generating-testrunconfig-file/images/msbuildtaskforgeneratingtestrunconfigfil_d90a_image_thumb.png b/_posts/2008/05/msbuild-task-for-generating-testrunconfig-file/images/msbuildtaskforgeneratingtestrunconfigfil_d90a_image_thumb.png new file mode 100644 index 0000000..1520320 Binary files /dev/null and b/_posts/2008/05/msbuild-task-for-generating-testrunconfig-file/images/msbuildtaskforgeneratingtestrunconfigfil_d90a_image_thumb.png differ diff --git a/_posts/2008/05/msbuild-task-for-generating-testrunconfig-file/index.md b/_posts/2008/05/msbuild-task-for-generating-testrunconfig-file/index.md new file mode 100644 index 0000000..e889004 --- /dev/null +++ b/_posts/2008/05/msbuild-task-for-generating-testrunconfig-file/index.md @@ -0,0 +1,21 @@ +--- +title: "MSBuild Task for generating testrunconfig file" +date: "2008-05-21" +--- + +**\*\*\*\* \*\*\*\*** + +**You have to add the namespace specification in front of every element. +Create a XNamespace by doing :** + +**XNamespace microsoftNamespace = [http://microsoft.com/schemas/VisualStudio/TeamTest/2006](http://microsoft.com/schemas/VisualStudio/TeamTest/2006);** + +**Then for all the XElements do new XElement(microsoftNamespace + "");** + +**\*\*\*\* \*\*\*\*** + +I've been working a bit with automating our build process and creating a lot of CI builds. Today I started getting our builds to run all the tests, create code coverage and then run static code analysis for it all. Getting the code coverage demands that the assemblies run during unit testing are all instrumented. Normally on the client side you just have a .testrunconfig file attached configured with all the assemblies. This same file could be used from the MSBuild running on the TFS as well as [Buck Hodges](http://blogs.msdn.com/buckh) [blogged about a while back](http://blogs.msdn.com/buckh/archive/2007/07/05/how-to-enable-code-coverage-without-a-test-list.aspx), but it would demand human interaction whenever assemblies were added or removed. I figured I had to come up with a remedy to this and created my own MSBuild task to handle it all. + +[![image](images/msbuildtaskforgeneratingtestrunconfigfil_d90a_image_thumb.png)](http://localhost:8080/wp-content/2012/07/MSBuildTaskforgeneratingtestrunconfigfil_D90A_image_2.png) + +The above code outputs the correct XML needed as input for the unit test run. So in your MSBuild file you need to use the same file for output through this task as the RunConfigFile property used bu the TFS TeamBuild. diff --git a/_posts/2008/05/ndc-badges-arrived/images/ndcbadgesarrived_86b7_image_242_thumb.jpg b/_posts/2008/05/ndc-badges-arrived/images/ndcbadgesarrived_86b7_image_242_thumb.jpg new file mode 100644 index 0000000..8c23ee8 Binary files /dev/null and b/_posts/2008/05/ndc-badges-arrived/images/ndcbadgesarrived_86b7_image_242_thumb.jpg differ diff --git a/_posts/2008/05/ndc-badges-arrived/index.md b/_posts/2008/05/ndc-badges-arrived/index.md new file mode 100644 index 0000000..d4a4787 --- /dev/null +++ b/_posts/2008/05/ndc-badges-arrived/index.md @@ -0,0 +1,12 @@ +--- +title: "NDC Badges arrived" +date: "2008-05-29" +categories: + - "net" +--- + +I got all psyched up today - the entrance badges for [NDC 2008](http://www.ndc2008.no) arrived the office today. One step closer to the coolest developer conference in Norway to this date (I'm probably stepping on a few toes with that statement..) + +Heres a nice picture of it taken with my crappy mobiletelephone camera : + +[![IMAGE_242](images/ndcbadgesarrived_86b7_image_242_thumb.jpg)](http://localhost:8080/wp-content/2012/07/NDCBadgesarrived_86B7_IMAGE_242_2.jpg) diff --git a/_posts/2008/05/net-generic-type-caching/images/54af7125539d-netgenerictypecaching_8a26_image_thumb_1.png b/_posts/2008/05/net-generic-type-caching/images/54af7125539d-netgenerictypecaching_8a26_image_thumb_1.png new file mode 100644 index 0000000..ed1fb43 Binary files /dev/null and b/_posts/2008/05/net-generic-type-caching/images/54af7125539d-netgenerictypecaching_8a26_image_thumb_1.png differ diff --git a/_posts/2008/05/net-generic-type-caching/images/54af7125539d-netgenerictypecaching_8a26_image_thumb_3.png b/_posts/2008/05/net-generic-type-caching/images/54af7125539d-netgenerictypecaching_8a26_image_thumb_3.png new file mode 100644 index 0000000..d015e3b Binary files /dev/null and b/_posts/2008/05/net-generic-type-caching/images/54af7125539d-netgenerictypecaching_8a26_image_thumb_3.png differ diff --git a/_posts/2008/05/net-generic-type-caching/images/54af7125539d-netgenerictypecaching_8a26_image_thumb_4.png b/_posts/2008/05/net-generic-type-caching/images/54af7125539d-netgenerictypecaching_8a26_image_thumb_4.png new file mode 100644 index 0000000..7ccd4de Binary files /dev/null and b/_posts/2008/05/net-generic-type-caching/images/54af7125539d-netgenerictypecaching_8a26_image_thumb_4.png differ diff --git a/_posts/2008/05/net-generic-type-caching/index.md b/_posts/2008/05/net-generic-type-caching/index.md new file mode 100644 index 0000000..ef64322 --- /dev/null +++ b/_posts/2008/05/net-generic-type-caching/index.md @@ -0,0 +1,25 @@ +--- +title: ".net (generic) type caching" +date: "2008-05-21" +categories: + - "net" + - "csharp" + - "clr" + - "optimizing" +--- + +The runtime for .net has a type caching mechanism that is really great. Every so often I write code where you need specific data based upon a type. Normally one tend to revert to a Dictionary with Type as the key and the datatype as the valuetype for the generic parameters. + +Typically: + +[![image](images/54af7125539d-netgenerictypecaching_8a26_image_thumb_1.png)](http://localhost:8080/wp-content/2012/07/54af7125539d-netgenerictypecaching_8A26_image_4.png) + +This will then rely on he dictionary and its implementation. Sure, it is not a bad solution, but there is a more effective and last but not least; cooler way of going about achieving the same effect: + +[![image](images/54af7125539d-netgenerictypecaching_8a26_image_thumb_3.png)](http://localhost:8080/wp-content/2012/07/54af7125539d-netgenerictypecaching_8A26_image_8.png) + +The beauty of this is that the static constructor will run once per type and one can do type specific stuff in the constructor + +The two implementations above lack a lot, so lets go for a more complete sample: + +[![image](images/54af7125539d-netgenerictypecaching_8a26_image_thumb_4.png)](http://localhost:8080/wp-content/2012/07/54af7125539d-netgenerictypecaching_8A26_image_10.png) diff --git a/_posts/2008/05/resharper-4-0-beta-for-vs2008-is-out/index.md b/_posts/2008/05/resharper-4-0-beta-for-vs2008-is-out/index.md new file mode 100644 index 0000000..a78f06f --- /dev/null +++ b/_posts/2008/05/resharper-4-0-beta-for-vs2008-is-out/index.md @@ -0,0 +1,16 @@ +--- +title: "ReSharper 4.0 Beta for VS2008 is out" +date: "2008-05-22" +--- + +We're finally closingin on the release of the version 4.0 of the every so brilliant ReSharper. + +You can find [here](http://www.jetbrains.com/resharper/beta.html?nlrs).  + +Among other things the beta offers quite a bit of C# 3.0 features: + +\- New code analysis, context actions and quick-fixes; + +\- New refactorings (such as Convert to Extension Method, Convert to Automatic Property, Convert Anonymous Type to Named); + +\- Updated IntelliSense. diff --git a/_posts/2008/05/tfs-build-task-for-generating-the-build-version/images/tfsbuildtaskforgeneratingthebuildversion_bbd4_image_thumb.png b/_posts/2008/05/tfs-build-task-for-generating-the-build-version/images/tfsbuildtaskforgeneratingthebuildversion_bbd4_image_thumb.png new file mode 100644 index 0000000..4f0936b Binary files /dev/null and b/_posts/2008/05/tfs-build-task-for-generating-the-build-version/images/tfsbuildtaskforgeneratingthebuildversion_bbd4_image_thumb.png differ diff --git a/_posts/2008/05/tfs-build-task-for-generating-the-build-version/images/tfsbuildtaskforgeneratingthebuildversion_bbd4_image_thumb_11.png b/_posts/2008/05/tfs-build-task-for-generating-the-build-version/images/tfsbuildtaskforgeneratingthebuildversion_bbd4_image_thumb_11.png new file mode 100644 index 0000000..2e31afd Binary files /dev/null and b/_posts/2008/05/tfs-build-task-for-generating-the-build-version/images/tfsbuildtaskforgeneratingthebuildversion_bbd4_image_thumb_11.png differ diff --git a/_posts/2008/05/tfs-build-task-for-generating-the-build-version/index.md b/_posts/2008/05/tfs-build-task-for-generating-the-build-version/index.md new file mode 100644 index 0000000..3794072 --- /dev/null +++ b/_posts/2008/05/tfs-build-task-for-generating-the-build-version/index.md @@ -0,0 +1,25 @@ +--- +title: "TFS Build Task for generating the build version" +date: "2008-05-22" +categories: + - "net" +--- + +[Martin Woodward](http://www.woodwardweb.com) posted earlier about how to go about [aligning build numbers with assembly versions in TFS2008](http://www.woodwardweb.com/vsts/000417.html). + +We used to do the same thing as he describes for our builds, but I found it really annoying having to have a file in the file system that the build task relied on and needed to be updated whenever one needed to delete the last build (oh yes, it happens - probably shouldn't - but it does.. :) ) + +The build task I came up with was a task that queried the buildserver for the builds and got the last build and retrieved the buildnumber and increased according to our build numbering strategy (We increase the revision (last number) by one for every build and the build number (the one ahead) by one for every hotfix). The task automatically handles all this by looking at the buildquality indicator that is used by testers (or at least should be used by them) to indicate the quality of the build. Our current scenario says that if it is marked with "Ready for deployment" it should increase the "hotfix" number. + +I've attached the entire solution + +[here](http://localhost:8080/wp-content/2012/07/TFSBuildTaskforgeneratingthebuildversion_BBD4_BuildVersion_1.rar) + +, below you'll se a snapshot of the Execute() method, it relies on a couple of other methods +and properties found in the class. + +[![image](images/tfsbuildtaskforgeneratingthebuildversion_bbd4_image_thumb.png)](http://localhost:8080/wp-content/2012/07/TFSBuildTaskforgeneratingthebuildversion_BBD4_image_2.png) + +To use the task, simply override the BuildNumberOverrideTarget as follows: + +[![image](images/tfsbuildtaskforgeneratingthebuildversion_bbd4_image_thumb_11.png)](http://localhost:8080/wp-content/2012/07/TFSBuildTaskforgeneratingthebuildversion_BBD4_image_4.png) diff --git a/_posts/2008/05/xna-3-0-comes-with-better-media-support-mp3-wav-wma/index.md b/_posts/2008/05/xna-3-0-comes-with-better-media-support-mp3-wav-wma/index.md new file mode 100644 index 0000000..59cec53 --- /dev/null +++ b/_posts/2008/05/xna-3-0-comes-with-better-media-support-mp3-wav-wma/index.md @@ -0,0 +1,12 @@ +--- +title: "XNA 3.0 comes with better media support (MP3, WAV, WMA)" +date: "2008-05-08" +categories: + - "net" + - "gamedevelopment" + - "xna" +--- + +Another cool thing with XNA 3.0 is the ability to use MP3 and WMA files directly. This gives better compression for your music than the average of 27% before. These files can also be added directly to your content folder and used from the ContentManager as you would with any other content. + +[Kyle Schouviller](http://www.kyleschouviller.com) has made an example of how to use this, check it out [here](http://www.kyleschouviller.com/uncategorized/xna-30-mp3wmawav-support/). diff --git a/_posts/2008/05/xna-3-0-ctp-is-here/index.md b/_posts/2008/05/xna-3-0-ctp-is-here/index.md new file mode 100644 index 0000000..3ab8247 --- /dev/null +++ b/_posts/2008/05/xna-3-0-ctp-is-here/index.md @@ -0,0 +1,15 @@ +--- +title: "XNA 3.0 CTP is here" +date: "2008-05-07" +categories: + - "net" + - "csharp" + - "gamedevelopment" + - "xna" +--- + +Finally the CTP we've all been waiting for is here. You can now pick it up [here](http://www.microsoft.com/downloads/details.aspx?FamilyId=DF4AF56A-58A7-474C-BFD0-7CF8ED3036A3&displaylang=en) and start developing for Windows, Xbox 360 and Zune (if you're lucky enough to own one). Another great news with this is that it supports Visual Studio 2008. It's time to see if I can finally uninstall Visual Studio 2005. + +Xbox 360 development and deployment is not supported by this CTP, unfortunately. + +Anyhow.. More details can be found [here](http://blogs.msdn.com/xna/archive/2008/05/07/announcing-xna-game-studio-3-0-community-technical-preview-ctp.aspx). diff --git a/_posts/2008/05/xna-3-0-to-the-rescue-for-soundeffects/index.md b/_posts/2008/05/xna-3-0-to-the-rescue-for-soundeffects/index.md new file mode 100644 index 0000000..fb26c24 --- /dev/null +++ b/_posts/2008/05/xna-3-0-to-the-rescue-for-soundeffects/index.md @@ -0,0 +1,10 @@ +--- +title: "XNA 3.0 to the rescue for soundeffects" +date: "2008-05-07" +--- + +One of the things that has been really annoying in XNA 1.0 and 2.0 is the fact that you had to use XACT for everything that had to do with sound. A real painstaking process that really felt like we were back doing super nintendo development in DOS (Ok, probably a bit exaggerated). Anyhow, they've finally gone about making this process as brilliant as it should be. + +Now you can simply drag'n'drop a wav file into the content folder and you can load it as content directly via the ContentManager. + +You still have to use XACT if you want to more advanced audio stuff, but for the simple sound effects and such, this is brilliant. Read more about it [here](http://letskilldave.com/archive/2008/05/07/the-best-kept-secret-about-the-xna-game-studio-3-0-ctp.aspx). diff --git a/_posts/2008/05/xna-creators-club-new-design-community-games-beta/images/xnacreatorsclubnewdesigncommunitygamesbe_6f84_image_thumb.png b/_posts/2008/05/xna-creators-club-new-design-community-games-beta/images/xnacreatorsclubnewdesigncommunitygamesbe_6f84_image_thumb.png new file mode 100644 index 0000000..330a8e7 Binary files /dev/null and b/_posts/2008/05/xna-creators-club-new-design-community-games-beta/images/xnacreatorsclubnewdesigncommunitygamesbe_6f84_image_thumb.png differ diff --git a/_posts/2008/05/xna-creators-club-new-design-community-games-beta/index.md b/_posts/2008/05/xna-creators-club-new-design-community-games-beta/index.md new file mode 100644 index 0000000..7d1680a --- /dev/null +++ b/_posts/2008/05/xna-creators-club-new-design-community-games-beta/index.md @@ -0,0 +1,16 @@ +--- +title: "XNA Creators Club - new design & Community Games beta" +date: "2008-05-21" +categories: + - "net" + - "gamedevelopment" + - "xna" +--- + +Yesterday, Microsoft launched a completely redesigned [creators club site](http://creators.xna.com) alongside with a beta of the community games. + +Just entering the site after logging in, you can see how easy it is to submit a community game: + +[![image](images/xnacreatorsclubnewdesigncommunitygamesbe_6f84_image_thumb.png)](http://localhost:8080/wp-content/2012/07/XNACreatorsClubnewdesignCommunityGamesbe_6F84_image_2.png) + +The site is intuitive to use and in my opinion has a great design. Keep up the good work guys! diff --git a/_posts/2008/05/xna-workshop-at-metu-in-turkey-dates-changed/index.md b/_posts/2008/05/xna-workshop-at-metu-in-turkey-dates-changed/index.md new file mode 100644 index 0000000..9fef944 --- /dev/null +++ b/_posts/2008/05/xna-workshop-at-metu-in-turkey-dates-changed/index.md @@ -0,0 +1,10 @@ +--- +title: "XNA Workshop at METU in Turkey - dates changed" +date: "2008-05-22" +categories: + - "xna" +--- + +The dates have changed for my workshop at METU in Turkey. The 23rd of June and for four whole days we'll have training in Xna, with focus on Xna 3.0. + +We will try cover all of Xna in these four days, ranging from 2D and 3D graphics to sound and networking through Xbox Live as well. diff --git a/_posts/2008/06/interesting-xna-case-sobee-in-turkey/images/interestingxnacasesobeeinturkey_13863_dsc04083_thumb1.jpg b/_posts/2008/06/interesting-xna-case-sobee-in-turkey/images/interestingxnacasesobeeinturkey_13863_dsc04083_thumb1.jpg new file mode 100644 index 0000000..5ef5746 Binary files /dev/null and b/_posts/2008/06/interesting-xna-case-sobee-in-turkey/images/interestingxnacasesobeeinturkey_13863_dsc04083_thumb1.jpg differ diff --git a/_posts/2008/06/interesting-xna-case-sobee-in-turkey/index.md b/_posts/2008/06/interesting-xna-case-sobee-in-turkey/index.md new file mode 100644 index 0000000..c04a394 --- /dev/null +++ b/_posts/2008/06/interesting-xna-case-sobee-in-turkey/index.md @@ -0,0 +1,14 @@ +--- +title: "Interesting Xna case : Sobee in Turkey" +date: "2008-06-26" +categories: + - "csharp" + - "xna" +--- + +During my stay in Turkey I got invited to a games development company called Sobee. They have created a few titles that I found very very good. They’re now working on a massive multiplayer football championship game written entirely in C# utilizing managed DirectX. They have really proven that one can create trippel-A games using C# and the .net framework. We had a long and good talk about how Xna could help them leverage the Windows platform better and get even closer to porting their game to the Xbox 360 platform. The API difference between managed DirectX and Xna is not that big, most of the types are called the same or similar, some methods are different, and of course you’ve got the entire content pipeline in Xna that you haven’t got in MDX. But even with the content pipeline, the fileformats are all the same, so it should still be a fairly simple task to convert a MDX game and get it up and running on the Xna platform. Hopefully they’ll go for the Xna platform, as I think both their game would benefit from Xna and it would be a great case to show that Xna is really for professional games development as well as for hobbyists and casual gaming. + +Below, you’ll see a picture at Sobee with me (from the left), Ozgur Soner and Mevlut Dinc discussing the possibilities. +The funny part is that Mevlut Dinc I was told afterwards was one the guys behind a game on the commodore 64 called Last Ninja II ([http://www.mobygames.com/developer/sheet/view/developerId,68130/](http://www.mobygames.com/developer/sheet/view/developerId,68130/ "http://www.mobygames.com/developer/sheet/view/developerId,68130/")). So in many ways I had a meeting with one of the guys I had as my personal hero when I grew up and learned programming. Great fun! :)  + +[![DSC04083](images/interestingxnacasesobeeinturkey_13863_dsc04083_thumb1.jpg "DSC04083")](http://localhost:8080/wp-content/2012/07/InterestingXnacaseSobeeinTurkey_13863_DSC04083_2.jpg) diff --git a/_posts/2008/06/iphone-now-with-3g-and-gps/index.md b/_posts/2008/06/iphone-now-with-3g-and-gps/index.md new file mode 100644 index 0000000..5938ca2 --- /dev/null +++ b/_posts/2008/06/iphone-now-with-3g-and-gps/index.md @@ -0,0 +1,12 @@ +--- +title: "iPhone – now with 3G and GPS" +date: "2008-06-09" +categories: + - "apple" +--- + +A new version of the iPhone was announced today at the Apple Worldwide Developers Conference 2008. It will have both 3G and a GPS, and it’s still slim and great looking as the previous version (I know I want one. :) ): + +![](images/m1213036767.jpg)[![](images/m1213036420.jpg)](http://cf.media.macrumorslive.com/p/f1213036420.jpg) + +[![](images/m1213036418.jpg)](http://s3.media.macrumorslive.com/p/f1213036418.jpg)[![](images/m1213036382.jpg)](http://s3.media.macrumorslive.com/p/f1213036382.jpg) diff --git a/_posts/2008/06/ndc-2008-one-day-away-i-cant-wait/images/ndc2008onedayawayicantwait_12396_image_thumb1.png b/_posts/2008/06/ndc-2008-one-day-away-i-cant-wait/images/ndc2008onedayawayicantwait_12396_image_thumb1.png new file mode 100644 index 0000000..0af6b03 Binary files /dev/null and b/_posts/2008/06/ndc-2008-one-day-away-i-cant-wait/images/ndc2008onedayawayicantwait_12396_image_thumb1.png differ diff --git a/_posts/2008/06/ndc-2008-one-day-away-i-cant-wait/index.md b/_posts/2008/06/ndc-2008-one-day-away-i-cant-wait/index.md new file mode 100644 index 0000000..1395fe7 --- /dev/null +++ b/_posts/2008/06/ndc-2008-one-day-away-i-cant-wait/index.md @@ -0,0 +1,12 @@ +--- +title: "NDC 2008 – One day away – I can’t wait." +date: "2008-06-16" +--- + +It’s 12 hours and some 20 minutes till Scott Hanselmann will enter the stage at NDC 2008. I’m all excited.. :) + +Finally we get a proper event for developers in Norway, a chance for us developers to socialize more than we normally do. Great stuff. The lineup is incredible, great work from the guys behind the event (I know at least one guy; [Rune Grothaug](http://blogs.msdn.com/grothaug), has been working a lot to realize this). + +Hope to see everyone there tomorrow. Have a safe flight everyone that is flying in. + +[![image](images/ndc2008onedayawayicantwait_12396_image_thumb1.png "image")](http://localhost:8080/wp-content/2012/07/NDC2008OnedayawayIcantwait_12396_image_2.png) diff --git a/_posts/2008/06/turkey-xna-workshop-almost-coming-to-an-end/index.md b/_posts/2008/06/turkey-xna-workshop-almost-coming-to-an-end/index.md new file mode 100644 index 0000000..f5514cc --- /dev/null +++ b/_posts/2008/06/turkey-xna-workshop-almost-coming-to-an-end/index.md @@ -0,0 +1,17 @@ +--- +title: "Turkey Xna Workshop almost coming to an end... :(" +date: "2008-06-26" +categories: + - "csharp" + - "xna" +--- + +I've been in Istanbul and Ankara in Turkey for this week, and unfortunately it is coming to an end. + +Together with Microsoft Turkey, we've been holding a full Xna workshop and I must say it's been really great. All the students attending have shown their interest in the subject. They got an assignment; to create a game in 3 days. A heavy task to undertake, you might say. Thus far, the results have been astonishing. They really picked up Xna fast and had stuff up and running really fast. I'm looking forward to seeing the result tomorrow. + +Ofcourse, all material will be released in several places. Also, Microsoft has recorded all presentations on video and will also be available soon. + +All hands-on-labs will be published over at [Game Camp](http://www.gamecamp.no/) sometime next week. + +I'll keep you all posted with the details as fast as I can. diff --git a/_posts/2008/07/116-days-to-pdc08-and-still-counting/index.md b/_posts/2008/07/116-days-to-pdc08-and-still-counting/index.md new file mode 100644 index 0000000..13ba60e --- /dev/null +++ b/_posts/2008/07/116-days-to-pdc08-and-still-counting/index.md @@ -0,0 +1,10 @@ +--- +title: "116 days to PDC’08 and still counting…" +date: "2008-07-02" +--- + +Still got funds left that can be spent for a developer related conference? You should really consider going to Microsoft's PDC this year. I’ve been to PDC’03 and PDC’05 and they were awesome, I would expect nothing less from the conference this year. + +Anyways, go to [http://microsoftpdc.com/](http://microsoftpdc.com/ "http://microsoftpdc.com/") and get your ticket today. (Apparently I was the first Norwegian guy to get a ticket.. Ordered it the same day they got available..  :) ) + +Hope to see you there! diff --git a/_posts/2008/07/2d-animation-content-pipeline/images/2danimationcontentpipeline_3ca_image_thumb1.png b/_posts/2008/07/2d-animation-content-pipeline/images/2danimationcontentpipeline_3ca_image_thumb1.png new file mode 100644 index 0000000..2319edd Binary files /dev/null and b/_posts/2008/07/2d-animation-content-pipeline/images/2danimationcontentpipeline_3ca_image_thumb1.png differ diff --git a/_posts/2008/07/2d-animation-content-pipeline/images/2danimationcontentpipeline_3ca_image_thumb_2.png b/_posts/2008/07/2d-animation-content-pipeline/images/2danimationcontentpipeline_3ca_image_thumb_2.png new file mode 100644 index 0000000..58e0269 Binary files /dev/null and b/_posts/2008/07/2d-animation-content-pipeline/images/2danimationcontentpipeline_3ca_image_thumb_2.png differ diff --git a/_posts/2008/07/2d-animation-content-pipeline/index.md b/_posts/2008/07/2d-animation-content-pipeline/index.md new file mode 100644 index 0000000..1fb8f39 --- /dev/null +++ b/_posts/2008/07/2d-animation-content-pipeline/index.md @@ -0,0 +1,21 @@ +--- +title: "2D Animation Content Pipeline" +date: "2008-07-06" +categories: + - "csharp" + - "xna" +--- + +During my stay in Turkey for the Xna workshop I created a simple content importer that makes it easier to work with 2D animations. Very often you see people use spritesheets as the solution for animating 2D, which is of course not a bad way, it is a very optimal way to do things. I’ve always liked the simplicity of working with single frames, at least while I’m working on a solution, that way I can easily change stuff around. The content importer I created works with a simple Xml file (in fact just a serialized version of an object called SpriteAnimation), in this Xml file you can specify a base assetname as a format string, and you specify how many frames there are in the animation. The assetname must include the asset path as well. + +The SpriteAnimation class is the one to use, it is also found in the content pipeline project, not exactly best practice. But it works for the demonstration purpose it was intended. :) + +Using it is very simple: + +[![image](images/2danimationcontentpipeline_3ca_image_thumb1.png "image")](http://localhost:8080/wp-content/2012/07/2DAnimationContentPipeline_3CA_image_2.png) + +In your draw method call the animations draw method with the spritebatch to draw into. + +[![image](images/2danimationcontentpipeline_3ca_image_thumb_2.png "image")](http://localhost:8080/wp-content/2012/07/2DAnimationContentPipeline_3CA_image_6.png) + +You can dowload the project from [here](http://localhost:8080/wp-content/2012/07/Simple2DAnimationContentPipeline_ContentPipeline.zip). diff --git a/_posts/2008/07/burning-the-feed/index.md b/_posts/2008/07/burning-the-feed/index.md new file mode 100644 index 0000000..537c13c --- /dev/null +++ b/_posts/2008/07/burning-the-feed/index.md @@ -0,0 +1,8 @@ +--- +title: "Burning the feed" +date: "2008-07-24" +--- + +I’ve moved my RSS feed over to Feedburner. For those of you who are subscribing, I’ve done my best to add redirection to the HTTP response from Community Server so that you don’t need to update the URL (keeping my fingers crossed). + +The new URL for my feed is : [http://feeds.feedburner.com/einari](http://feeds.feedburner.com/einari "http://feeds.feedburner.com/einari") diff --git a/_posts/2008/07/chief-consultant-in-objectware/index.md b/_posts/2008/07/chief-consultant-in-objectware/index.md new file mode 100644 index 0000000..aaa87af --- /dev/null +++ b/_posts/2008/07/chief-consultant-in-objectware/index.md @@ -0,0 +1,11 @@ +--- +title: "Chief Consultant in Objectware" +date: "2008-07-01" +categories: + - "net" + - "csharp" +--- + +After some 6 and a half years working at the same job (Notus, acquired by [Visma](http://www.visma.no/index.asp) this year), I’ve just signed a contract with [Objectware](http://www.objectware.no/no/) a part of the [Itera Consulting Group](http://www.iteraconsulting.com/about+us). I will start there on the 1st of September this year. + +Some of you might have noticed a comment on one of my latest posts; congratulating me on my new job, way before it was ready to be announced to the world. :) Well, the cat is out of the bag. diff --git a/_posts/2008/07/environment-aware-development/index.md b/_posts/2008/07/environment-aware-development/index.md new file mode 100644 index 0000000..425390b --- /dev/null +++ b/_posts/2008/07/environment-aware-development/index.md @@ -0,0 +1,22 @@ +--- +title: "Environment aware development" +date: "2008-07-11" +--- + +I must warn you, this post might contain ramblings of a mad man.. :) + +I’m not going to debate wether or not we have a problem with regards to the environment, but one thing is for sure, we can all become better consumers and consume less. We, and then I mean everyone not only developers, tend to consume more than we need. For instance, when going into a meeting, everyone grabs a pen and some paper in case they want to make notes. Most of us don’t write any thing sensible, we doodle crazy drawings, play tic-tac-toe with ourselves or other participants of the meeting. On occasion we make a note of something and in many cases we don’t look at the note anymore. Of-course this is generalizing and hopefully not everyone does this, but I think a lot do. A better way would be to let one person take notes of the entire meeting, on a laptop even, and distribute this afterwards - digitally. I also see a lot of people printing emails and walking into someone's office with the printout to discuss the content. There is something called the forward button. :) + +One thing that would probably give even better results, would be to put your computer in sleep mode when you leave work for the day and have a scheduled task that wakes it up right before you get to work again (Vista only – read Sarah Perez’ recipe [here](http://on10.net/blogs/sarahintampa/Make-Your-PC-Wake-From-Sleep-Automatically/)). This is a pretty good option if you don’t want to shutdown completely. Going into sleep, all your applications are sleeping as well. When it’s waking up, everything is just the way you left it. + +Now, what can we as developers do to be more environment aware? I know this is at best provocative for some; Write optimal code. Imagine if all the code all developers wrote was written to execute optimally on the processor and didn’t use more memory than it actually needed, then 640KB would actually be enough, just kidding. In fact, I think there could actually be an environmental upside if one were to start considering optimal code as a feature. We wouldn’t need all that RAM in our computers, for one. We wouldn’t need to scale into clusters or increase cluster sizes as often, which would lead to less hardware.  Most computer hardware is manufactured in Asia, they use a lot of coal to generate power there that the factories use, coal produce CO2 and is not cleaned as with modern coal plants. After manufacturing they need to package it. Products like RAM are often put inside plastic containers and these are then placed in larger cardboard boxes. After its been packaged, it needs to be shipped. This is usually done by boat, which has a CO2 footprint attached to it. + +There are of-course economical consequences if people don’t need all that RAM anymore and RAM prices would go up. Other consequences such as they wouldn’t need all the factory workers, seeing that demand would go down. And most likely a bunch of other consequences. But still, it’s an interesting thought I think. + +What do I mean by writing optimal code? Should everyone start writing native assembly language? That would be cool. Time to market would end up at a ten-fold of what we’re able to do today. This is probably not the solution. I think the solution lies within a couple of things. Writing optimal code does not necessarily mean that you’re going to spend a lot of time doing just that, but being aware of a couple of things might help you out and understand the platform the code is running on. With the knowledge of how the execution environment works and how the platform works, the developer has the power to improve their code from the first line one writes. In addition to this, one could use profilers to find bottlenecks in the code. Companies are too focused on getting stuff out the door as fast as possible that for instance the speed of a solution is often compromised. I think it is very important that when planning a project, one includes speed as a feature. Almost every user story/Scenario/Product backlog item should have a QOS (Quality of Service – MSF Agile terminology) attached to it stating the performance requirements. The same goes for memory consumption. Too often we see that developers use caching to overcome speed issues, resulting in heavy memory usage. I think that in many cases the speed issue could have been solved at a lower level if the developers had the time and resources (money) to do it. So in many ways, management and marketing must be willing to give the developers more time or cut back on the feature list and be willing to let the developers have speed as required feature. After all, the customers will be happier with a more responsive solution. + +I realize that I’m not exactly going to change the world by posting this. I’ll probably just piss someone off instead, or be completely written off as an fool or something. But it’s a risk I’m willing to take. :)  + +On a side-note, very much related though; I’m looking forward to the [Performance by design using the .net framework](http://microsoftpdc.com/Agenda/Preconference.aspx#performance-by-design-using-the-net-framework) that is one of the sessions for the pre-conference at [PDC](http://microsoftpdc.com) this year. + +Have a nice weekend everyone. If I’m not put in a [straightjacket](http://en.wikipedia.org/wiki/Straightjacket) during the course of the weekend, I’ll probably post something next week. :) diff --git a/_posts/2008/07/nnug-bergen-in-august/index.md b/_posts/2008/07/nnug-bergen-in-august/index.md new file mode 100644 index 0000000..f04e25b --- /dev/null +++ b/_posts/2008/07/nnug-bergen-in-august/index.md @@ -0,0 +1,12 @@ +--- +title: "NNUG Bergen in August" +date: "2008-07-08" +--- + +August is traditionally the startup month after the summer for [NNUG](http://www.nnug.no) activities and [NNUG Bergen](http://www.nnug.no/Avdelinger/Bergen/) has really put together a killer evening as a startup for the fall. + +On the 29th of August, they’re having the most impressive lineup in NNUGs history (as far as I know). [Dan North](http://dannorth.net/) from [ThoughtWorks](http://www.thoughtworks.com/) and [Christian Weyer](http://blogs.thinktecture.com/cweyer/) from [Thinktecture](http://www.thinktecture.com/) are coming. + +Keep up the good work guys!! + +Read more about it over at [Jon Tørresdals’ blog](http://blog.torresdal.net/2008/07/01/AugustTheBestNNUGEventEver.aspx). diff --git a/_posts/2008/07/registering-xap-mime-type-in-iis-6-0/images/registeringxapmimetypeiniis6-0_13043_image_thumb.png b/_posts/2008/07/registering-xap-mime-type-in-iis-6-0/images/registeringxapmimetypeiniis6-0_13043_image_thumb.png new file mode 100644 index 0000000..3561f94 Binary files /dev/null and b/_posts/2008/07/registering-xap-mime-type-in-iis-6-0/images/registeringxapmimetypeiniis6-0_13043_image_thumb.png differ diff --git a/_posts/2008/07/registering-xap-mime-type-in-iis-6-0/images/registeringxapmimetypeiniis6-0_13043_image_thumb_1.png b/_posts/2008/07/registering-xap-mime-type-in-iis-6-0/images/registeringxapmimetypeiniis6-0_13043_image_thumb_1.png new file mode 100644 index 0000000..3b6f1d4 Binary files /dev/null and b/_posts/2008/07/registering-xap-mime-type-in-iis-6-0/images/registeringxapmimetypeiniis6-0_13043_image_thumb_1.png differ diff --git a/_posts/2008/07/registering-xap-mime-type-in-iis-6-0/images/registeringxapmimetypeiniis6-0_13043_image_thumb_2.png b/_posts/2008/07/registering-xap-mime-type-in-iis-6-0/images/registeringxapmimetypeiniis6-0_13043_image_thumb_2.png new file mode 100644 index 0000000..117167b Binary files /dev/null and b/_posts/2008/07/registering-xap-mime-type-in-iis-6-0/images/registeringxapmimetypeiniis6-0_13043_image_thumb_2.png differ diff --git a/_posts/2008/07/registering-xap-mime-type-in-iis-6-0/index.md b/_posts/2008/07/registering-xap-mime-type-in-iis-6-0/index.md new file mode 100644 index 0000000..25926cf --- /dev/null +++ b/_posts/2008/07/registering-xap-mime-type-in-iis-6-0/index.md @@ -0,0 +1,24 @@ +--- +title: "Registering XAP MIME type in IIS 6.0" +date: "2008-07-07" +tags: + - "silverlight" +--- + +I’m still running Windows 2003 and IIS 6.0 on my server and needed to register XAP as a global MIME type for my server, seeing that I will be publishing a bit of Silverlight bits now and then. I’ve only come across IIS 7.0 guides for this, so I thought I’d share how to do this in IIS 6.0. + +Open up IIS Manager (**mmc %systemroot%system32inetsrviis.msc**). Right click the computer name an select properties. + +[![image](images/registeringxapmimetypeiniis6-0_13043_image_thumb.png "image")](http://localhost:8080/wp-content/2012/07/RegisteringXAPMIMEtypeinIIS6-0_13043_image_2.png) + +Click the MIME types: + +[![image](images/registeringxapmimetypeiniis6-0_13043_image_thumb_1.png "image")](http://localhost:8080/wp-content/2012/07/RegisteringXAPMIMEtypeinIIS6-0_13043_image_4.png) + +Click new and type in the following: + +[![image](images/registeringxapmimetypeiniis6-0_13043_image_thumb_2.png "image")](http://localhost:8080/wp-content/2012/07/RegisteringXAPMIMEtypeinIIS6-0_13043_image_6.png) + +Then you will probably need to reset IIS (run->iisreset or right click computer->All Tasks->Restart IIS). + +Now you can deploy your Silverlight 2 XAP application to IIS 6.0. diff --git a/_posts/2008/07/silverlight-2-texturemapping/images/silverlight2texturemapping_10f11_image_thumb11.png b/_posts/2008/07/silverlight-2-texturemapping/images/silverlight2texturemapping_10f11_image_thumb11.png new file mode 100644 index 0000000..fd4b3cc Binary files /dev/null and b/_posts/2008/07/silverlight-2-texturemapping/images/silverlight2texturemapping_10f11_image_thumb11.png differ diff --git a/_posts/2008/07/silverlight-2-texturemapping/index.md b/_posts/2008/07/silverlight-2-texturemapping/index.md new file mode 100644 index 0000000..018d27b --- /dev/null +++ b/_posts/2008/07/silverlight-2-texturemapping/index.md @@ -0,0 +1,15 @@ +--- +title: "Silverlight 2 - texturemapping" +date: "2008-07-18" +categories: + - "net" + - "csharp" +tags: + - "silverlight" +--- + +I’ve been quite busy the last week working on the [Balder](http://www.codeplex.com/Balder) engine. I’ve focused my energy on improving the rendering pipeline, both for functionality and speed and have managed to overhaul it quite a bit. In addition, texturemapping is becoming a fact. Thanks to [Whizzkid](http://whizzkid74.blogspot.com/2008/04/texturemapping-in-silverlight-20b.html) for pointing out problems that was in the Matrix class in version 1.1 that was now fixed and to this [article](http://www.codeproject.com/KB/silverlight/silverlight_triangle.aspx) by [Florian Kruesch](http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=3950651) + +You can have a look at a very crude sample [here](http://www.dolittle.com/Silverlight/Balder_TextureMapping_Version1/TestPage.html) with a lot of bugs in it due to heavy refactoring. I’ve decreased the framerate of the sample by purpose, I’ll be working to improve the samples as well as improving the engine and its features the next couple of weeks. All sourcecode will as always be checked in and available at the [Balder Codeplex project](http://www.codeplex.com/Balder). + +[![image](images/silverlight2texturemapping_10f11_image_thumb11.png "image")](http://localhost:8080/wp-content/2012/07/Silverlight2texturemapping_10F11_image_2.png) diff --git a/_posts/2008/07/silverlight-3d-engine-balder-finally-up-and-running-on-sl-2-beta-2/index.md b/_posts/2008/07/silverlight-3d-engine-balder-finally-up-and-running-on-sl-2-beta-2/index.md new file mode 100644 index 0000000..263c7b3 --- /dev/null +++ b/_posts/2008/07/silverlight-3d-engine-balder-finally-up-and-running-on-sl-2-beta-2/index.md @@ -0,0 +1,19 @@ +--- +title: "Silverlight 3D Engine : Balder – Finally up and running on SL 2 Beta 2" +date: "2008-07-07" +categories: + - "net" + - "3d" + - "balder" + - "csharp" +tags: + - "silverlight" +--- + +****UPDATE 8th of July 2010 : 0.8.8.7 is out - read more [here](/post/2010/07/08/Balder-0887-out.aspx).**** + +**UPDATE, 12th of February 2010, Balder 0.8.8.6 is out, take a look at the sample browser [here](http://localhost:8080/silverlight/Balder/20100208/TestPage.html) - read more about the new features [here](/post/2010/02/08/Balder-0886-is-out.aspx).** + +I’ve been swamped with work the last 6 months and haven’t had time to do any Silverlight stuff, but now I’m bouncing back and have started to get all my projects up and running again on SL 2 Beta 2. + +First off is the 3D engine I started on last year; [Balder](http://www.codeplex.com/Balder). I’ve got a couple of issues I need to solve, but it is basically working again, have a look [here](http://www.dolittle.com/Silverlight/Balder_Silverlight2_Beta2/TestPage.html). You might find quite jerky at the moment, I need to alter the entire rendering pipeline as it was originally optimized for Silverlight 1.1 back in the days :). Quite a lot of water has gone under the bridge since then. diff --git a/_posts/2008/07/slotmachine-for-silverlight-2-beta-2/images/slotmachineforsilverlight2beta2_b30f_image_thumb.png b/_posts/2008/07/slotmachine-for-silverlight-2-beta-2/images/slotmachineforsilverlight2beta2_b30f_image_thumb.png new file mode 100644 index 0000000..824a901 Binary files /dev/null and b/_posts/2008/07/slotmachine-for-silverlight-2-beta-2/images/slotmachineforsilverlight2beta2_b30f_image_thumb.png differ diff --git a/_posts/2008/07/slotmachine-for-silverlight-2-beta-2/index.md b/_posts/2008/07/slotmachine-for-silverlight-2-beta-2/index.md new file mode 100644 index 0000000..58f10a4 --- /dev/null +++ b/_posts/2008/07/slotmachine-for-silverlight-2-beta-2/index.md @@ -0,0 +1,12 @@ +--- +title: "SlotMachine for Silverlight 2 beta 2" +date: "2008-07-08" +categories: + - "csharp" +tags: + - "silverlight" +--- + +Finally managed to fix the 2D parts of the Balder engine and also the SlotMachine game I entered the European Silverlight Challenge with earlier. There are so many breaking changes between the versions of Silverlight that I see now that I need to rewrite quite a bit of my projects. You can find the game [here](http://www.dolittle.com/Silverlight/SlotMachine_Silverlight2_Beta2/SlotMachine.html). + +[![image](images/slotmachineforsilverlight2beta2_b30f_image_thumb.png "image")](http://localhost:8080/wp-content/2012/07/SlotMachineforSilverlight2beta2_B30F_image_2.png) diff --git a/_posts/2008/07/what-programmer-personality-are-you/images/whatprogrammerpersonalityareyou_f2f1_image_thumb.png b/_posts/2008/07/what-programmer-personality-are-you/images/whatprogrammerpersonalityareyou_f2f1_image_thumb.png new file mode 100644 index 0000000..93b6887 Binary files /dev/null and b/_posts/2008/07/what-programmer-personality-are-you/images/whatprogrammerpersonalityareyou_f2f1_image_thumb.png differ diff --git a/_posts/2008/07/what-programmer-personality-are-you/index.md b/_posts/2008/07/what-programmer-personality-are-you/index.md new file mode 100644 index 0000000..4a7b79a --- /dev/null +++ b/_posts/2008/07/what-programmer-personality-are-you/index.md @@ -0,0 +1,12 @@ +--- +title: "What programmer personality are you?" +date: "2008-07-08" +--- + +I'm always eager to know who actually reads my blog, whenever someone leaves me a comment I go straight to find out if the person has a blog. Stefaan Rillaert left me a comment and he had a [blog](http://stefaan.wordpress.com/) and his latest posting made me curious. It was a link to a test that apparently will reveal what kind of programmer you are. + +I became the following. + +[![image](images/whatprogrammerpersonalityareyou_f2f1_image_thumb.png "image")](http://localhost:8080/wp-content/2012/07/Whatprogrammerpersonalityareyou_F2F1_image_2.png) + +You'll find the test [here](http://www.doolwind.com/index.php?page=11). And of-course we put our complete faith in these tests. :)  Actually, I think my result came out pretty good. It is at least how I see myself. diff --git a/_posts/2008/07/where-is-my-silverlight-2-help-in-visual-studio-help/images/whereismysilverlight2helpinvisualstudioh_126b9_image_thumb1.png b/_posts/2008/07/where-is-my-silverlight-2-help-in-visual-studio-help/images/whereismysilverlight2helpinvisualstudioh_126b9_image_thumb1.png new file mode 100644 index 0000000..cde7288 Binary files /dev/null and b/_posts/2008/07/where-is-my-silverlight-2-help-in-visual-studio-help/images/whereismysilverlight2helpinvisualstudioh_126b9_image_thumb1.png differ diff --git a/_posts/2008/07/where-is-my-silverlight-2-help-in-visual-studio-help/images/whereismysilverlight2helpinvisualstudioh_126b9_image_thumb_11.png b/_posts/2008/07/where-is-my-silverlight-2-help-in-visual-studio-help/images/whereismysilverlight2helpinvisualstudioh_126b9_image_thumb_11.png new file mode 100644 index 0000000..54b0daa Binary files /dev/null and b/_posts/2008/07/where-is-my-silverlight-2-help-in-visual-studio-help/images/whereismysilverlight2helpinvisualstudioh_126b9_image_thumb_11.png differ diff --git a/_posts/2008/07/where-is-my-silverlight-2-help-in-visual-studio-help/index.md b/_posts/2008/07/where-is-my-silverlight-2-help-in-visual-studio-help/index.md new file mode 100644 index 0000000..11631f2 --- /dev/null +++ b/_posts/2008/07/where-is-my-silverlight-2-help-in-visual-studio-help/index.md @@ -0,0 +1,18 @@ +--- +title: "Where is my Silverlight 2 help in Visual Studio help ?" +date: "2008-07-07" +tags: + - "silverlight" +--- + +If you’re like me, you skip all readme files when installing something new and start hacking away instead. In most cases this works out fine, but every so often I would probably be better off just reading the readme or any other documents that came with the software I installed. Anyhow, this was also the case when I installed the latest Silverlight 2 Beta 2 SDK. There was a lot of broken changes between beta 1 and beta 2 and I wanted to update all my Silverlight projects and republish them on my blog, but ran into a couple of cases I’d like to read more about in the documentation, only to find out that the documentation was not where I expected it to be; in my MS-help, like all the other help collections I’ve got installed. Well, to make a long story short, here’s the recipe: + +Open MS-help from VS2008 choosing Index. Type in Collection Manager : + +[![image](images/whereismysilverlight2helpinvisualstudioh_126b9_image_thumb1.png "image")](http://localhost:8080/wp-content/2012/07/WhereismySilverlight2helpinVisualStudioh_126B9_image_2.png) + +Then select Help. You’ll get a nice page you can start selecting what collections to enable or not: + +[![image](images/whereismysilverlight2helpinvisualstudioh_126b9_image_thumb_11.png "image")](http://localhost:8080/wp-content/2012/07/WhereismySilverlight2helpinVisualStudioh_126B9_image_4.png) + +Select your collections, such as the Silverlight 2 SDK Documentation. diff --git a/_posts/2008/07/why-dolittle/index.md b/_posts/2008/07/why-dolittle/index.md new file mode 100644 index 0000000..d0d4ab2 --- /dev/null +++ b/_posts/2008/07/why-dolittle/index.md @@ -0,0 +1,12 @@ +--- +title: "Why DoLittle?" +date: "2008-07-01" +categories: + - "personal" +--- + +As you might have noticed, my blog lives on the domain “dolittle.com”. A domain that is hosted by myself on an old laptop sitting in my basement. :)  Anywho, the last couple of weeks I’ve been asked a few times about what's up with the name DoLittle and does it have a meaning of some sort. I didn't have a straight answer for anyone who asked, to be honest; I couldn't really remember. Until it all came back to me a couple of days ago. + +The year was 1997, I started to look for some freelance work for moonlighting besides my daytime job. In order to freelance work I needed to register myself as a single-person company with the government. I needed a cool name, or at least a cool URL. My objective was not to do a lot of business; one could say I wanted to do little. But that was not the real reason behind the name. At that point I was really focused on creating reusable code (I'm still focused on that. :) ), I was always building code with the idea of trying to create libraries and frameworks that would enable me to do as little as possible code for the next projects. Finding the common denominators became my life work. In addition to this I was also convinced (still am), that computer software should really be focusing on helping the user achieve desired result in as little time and with as little effort for the user as possible. I even remember coming with a slogan for the company "DoLittle ..  so that you don't have to do much.. " or something to that effect. + +That is the story behind the name.. :) diff --git a/_posts/2008/07/xna-workshop-ankara-turkey-material-drop-1/index.md b/_posts/2008/07/xna-workshop-ankara-turkey-material-drop-1/index.md new file mode 100644 index 0000000..f8215e2 --- /dev/null +++ b/_posts/2008/07/xna-workshop-ankara-turkey-material-drop-1/index.md @@ -0,0 +1,33 @@ +--- +title: "Xna Workshop, Ankara, Turkey – Material drop #1" +date: "2008-07-01" +categories: + - "csharp" + - "xna" +--- + +The Xna workshop held in Ankara, Turkey is now over, I’ll post all the material during this week. This will be the first material drop of a few. + +This drop contains the sample I worked on for the workshop, it is crude but it shows how easy things can be done in Xna. + +You can download the material from [here](http://localhost:8080/wp-content/2012/07/XnaWorkshopMaterialDrop1_Turkey2008.zip). + +The sample is entry-level Xna (level 100). +All implementations are "crude" and should be used as a reference rather than +production code. + +The sample shows the following using Xna: + +\* How to render 3D models +\* How to get a mesh skinned with animation +\* How to create a camera and move it in a 3D world +\* How to use game components +\* How to use game services +\* How to use gamepads and keyboard for input + +The 3D world is a famous site in Turkey called Cappadocia and the +3D model was downloaded from METU, the university we held the workshop. It can be found [here](http://cgv.ceng.metu.edu.tr/virtual/index.php?option=com_docman&task=doc_details&gid=3&Itemid=56). + +The skinned mesh character along with the animation and components for using +it was downloaded from the creators club website and is licensed under the +[Microsoft Permissive License](http://creators.xna.com/downloads/?id=15). Skinned mesh sample can be found [here](http://creators.xna.com/en-us/sample/skinnedmodel). diff --git a/_posts/2008/07/xna-workshop-ankara-turkey-material-drop-2/index.md b/_posts/2008/07/xna-workshop-ankara-turkey-material-drop-2/index.md new file mode 100644 index 0000000..4682000 --- /dev/null +++ b/_posts/2008/07/xna-workshop-ankara-turkey-material-drop-2/index.md @@ -0,0 +1,11 @@ +--- +title: "Xna Workshop, Ankara, Turkey – Material drop #2" +date: "2008-07-01" +categories: + - "csharp" + - "xna" +--- + +During the workshop I held a few presentations were I walked through different concepts. The presentations was ranging from how to get started with a game project, independent from technology – to graphics concepts and finally specifically using Xna to do the job. + +You’ll find all the presentations [here](http://localhost:8080/wp-content/2012/07/XnaWorkshopMaterialDrop2_Turkey2008PowerPoints.zip). diff --git a/_posts/2008/07/xna-workshop-ankara-turkey-some-pictures/images/xnaworkshopturkeypictures_p10304051.jpg b/_posts/2008/07/xna-workshop-ankara-turkey-some-pictures/images/xnaworkshopturkeypictures_p10304051.jpg new file mode 100644 index 0000000..8d2087d Binary files /dev/null and b/_posts/2008/07/xna-workshop-ankara-turkey-some-pictures/images/xnaworkshopturkeypictures_p10304051.jpg differ diff --git a/_posts/2008/07/xna-workshop-ankara-turkey-some-pictures/images/xnaworkshopturkeypictures_p1030410.jpg b/_posts/2008/07/xna-workshop-ankara-turkey-some-pictures/images/xnaworkshopturkeypictures_p1030410.jpg new file mode 100644 index 0000000..c50debc Binary files /dev/null and b/_posts/2008/07/xna-workshop-ankara-turkey-some-pictures/images/xnaworkshopturkeypictures_p1030410.jpg differ diff --git a/_posts/2008/07/xna-workshop-ankara-turkey-some-pictures/images/xnaworkshopturkeypictures_p1030442.jpg b/_posts/2008/07/xna-workshop-ankara-turkey-some-pictures/images/xnaworkshopturkeypictures_p1030442.jpg new file mode 100644 index 0000000..248f037 Binary files /dev/null and b/_posts/2008/07/xna-workshop-ankara-turkey-some-pictures/images/xnaworkshopturkeypictures_p1030442.jpg differ diff --git a/_posts/2008/07/xna-workshop-ankara-turkey-some-pictures/images/xnaworkshopturkeypictures_pict0075.jpg b/_posts/2008/07/xna-workshop-ankara-turkey-some-pictures/images/xnaworkshopturkeypictures_pict0075.jpg new file mode 100644 index 0000000..b4095d7 Binary files /dev/null and b/_posts/2008/07/xna-workshop-ankara-turkey-some-pictures/images/xnaworkshopturkeypictures_pict0075.jpg differ diff --git a/_posts/2008/07/xna-workshop-ankara-turkey-some-pictures/index.md b/_posts/2008/07/xna-workshop-ankara-turkey-some-pictures/index.md new file mode 100644 index 0000000..46fe854 --- /dev/null +++ b/_posts/2008/07/xna-workshop-ankara-turkey-some-pictures/index.md @@ -0,0 +1,25 @@ +--- +title: "Xna Workshop, Ankara, Turkey – some pictures" +date: "2008-07-01" +categories: + - "csharp" + - "xna" +--- + +Here are some of the pictures from the workshop we held in Turkey. Click the images to see larger versions. + +We started on Tuesday with a 2 hour presentation (30 minutes) and live coding (90 minutes). + +[![](images/xnaworkshopturkeypictures_pict0075.jpg)](http://localhost:8080/wp-content/2012/07/XnaWorkshopTurkeyPictures_PICT0075.JPG) + +Below you see all the people involved for the workshop; students, METU staff, Microsoft staff and myself. The students got diplomas for attending, signed by me. I even had to hand them out and called out their names in the best Turkish-dialect my vocal-cords could come up with. :) + +[![](images/xnaworkshopturkeypictures_p1030442.jpg)](http://localhost:8080/wp-content/2012/07/XnaWorkshopTurkeyPictures_P1030442.JPG) + +We divided all the students into groups that would work together to create a game each. Below you see the winning team. All the students voted for which game they liked the best and we had a tie between two teams. The students wanted me to vote as well between the two and the result was the team below (sorry for the other team – your golf game with PhysX was great!! It was a tough call!). + +[![](images/xnaworkshopturkeypictures_p1030410.jpg)](http://localhost:8080/wp-content/2012/07/XnaWorkshopTurkeyPictures_P1030410.JPG) + +Below you’ll see me assisting one of the developers on one of the teams; I’m trying to figure out a problem with a struct for a bullet system. The bullets didn’t want to move, for some strange reason…   We figured it out eventually, but couldn’t exactly tell what was wrong or not… + +[![](images/xnaworkshopturkeypictures_p10304051.jpg)](http://localhost:8080/wp-content/2012/07/XnaWorkshopTurkeyPictures_P1030405.JPG) diff --git a/_posts/2008/08/game-camp-an-officially-recognised-organization/index.md b/_posts/2008/08/game-camp-an-officially-recognised-organization/index.md new file mode 100644 index 0000000..e78418d --- /dev/null +++ b/_posts/2008/08/game-camp-an-officially-recognised-organization/index.md @@ -0,0 +1,11 @@ +--- +title: "Game Camp - an officially recognised organization" +date: "2008-08-15" +categories: + - "community" + - "gamedevelopment" +--- + +In Norway, when you have a non-profit organization and you deal with money, such as sponsor funding or similar, you need to be registered with the authorities. The sponsor won´t be able to transfer any money to you unless you have an organization code provided by the authorities. We´ve been working to get Game Camp registered as this for a while now and finally today we got the message that out application has been [accepted](http://tinyurl.com/5bonqt). + +Which is kind of perfect, seeing that we´re in the midst of finalizing everything for our [event on the 26th of september](http://www.gamecamp.no/events/default.aspx). diff --git a/_posts/2008/08/game-camp-september-event-registration-now-open/index.md b/_posts/2008/08/game-camp-september-event-registration-now-open/index.md new file mode 100644 index 0000000..afd5edc --- /dev/null +++ b/_posts/2008/08/game-camp-september-event-registration-now-open/index.md @@ -0,0 +1,16 @@ +--- +title: "Game Camp September Event - Registration now open" +date: "2008-08-11" +categories: + - "csharp" + - "gamedevelopment" + - "xna" +--- + +26th of September we´re holding our third Game Camp event. This time around we´re going across 2 simultaneous tracks. We´ve got a lot of exciting stuff for you, and as always; IT´S FREE. + +[Scott Bilas](http://scottbilas.com) is coming to do the keynote and a session as well. Scott has worked on a lot of tripple A games for numerous companies (Sierra Online, Oberon Media, Gas Powered Games). He has had a few talks at the Games Developers Conference and is a strong believer in creating games in a managed environment such as the .net CLR and utilizing Xna. In addition FunCom is coming to talk about their experience in developing Age of Conan. The agenda is so great, you´ve gotta go and read to not miss out. Most game companies in Norway are attending with speakers. This will be our best event yet! + +Registration is now open, don´t hesitate to register and show up at this great event. + +Read the agenda and register [here](http://www.gamecamp.no/events/default.aspx). And remember to spread the word. diff --git a/_posts/2008/08/getting-the-current-process-filename-on-windows-mobile/images/Parallels-DesktopScreenSnapz003.jpg b/_posts/2008/08/getting-the-current-process-filename-on-windows-mobile/images/Parallels-DesktopScreenSnapz003.jpg new file mode 100644 index 0000000..aeba18c Binary files /dev/null and b/_posts/2008/08/getting-the-current-process-filename-on-windows-mobile/images/Parallels-DesktopScreenSnapz003.jpg differ diff --git a/_posts/2008/08/getting-the-current-process-filename-on-windows-mobile/index.md b/_posts/2008/08/getting-the-current-process-filename-on-windows-mobile/index.md new file mode 100644 index 0000000..3025d43 --- /dev/null +++ b/_posts/2008/08/getting-the-current-process-filename-on-windows-mobile/index.md @@ -0,0 +1,19 @@ +--- +title: "Getting the current process filename on Windows Mobile" +date: "2008-08-17" +categories: + - "net" + - "csharp" + - "mobile" +--- + +I´ve been working freelance on a Windows Mobile project for a client and for the project we wanted to have the application update itself over the internet and wanted the same experience one gets with ClickOnce on Windows and a simple API for any Mobile based application for handling updates and such. + +In order for this to work I needed to have a seperate executable/entrypoint that was our update service running in the background handling all the gritty bits, this would then spawn the application. Because of a rather bad user experience having to start a different process than the one actually needed, I decided to have our update service installed with some registry entries to point out where it was installed and add an initialization method for our update service for the application to call. Anywho, long story short - I needed a way to figure out what process was running on the device and the filename of it to distinguish in which context the initialization was called. + +Normally one would go about doing this by calling Assembly.GetEntryAssembly() - but the compact framewok does not have this method. Other ways are to go and call Assembly.GetCallingAssembly().GetModules()\[0\] and get the fully qualified name from there, but this didn´t work out in all conditions either. The solution is to p/invoke the GetModuleFileName() method from coredll - turns out it exists, even if the documentation does not list Windows Mobile in the supported platform section.. :) + + +![Parallels-DesktopScreenSnapz003.png](images/Parallels-DesktopScreenSnapz003.jpg) + +[Mobile](http://technorati.com/tag/Mobile) diff --git a/_posts/2008/08/moonlight-with-alpha-support-for-silverlight-2-0/index.md b/_posts/2008/08/moonlight-with-alpha-support-for-silverlight-2-0/index.md new file mode 100644 index 0000000..36ee682 --- /dev/null +++ b/_posts/2008/08/moonlight-with-alpha-support-for-silverlight-2-0/index.md @@ -0,0 +1,12 @@ +--- +title: "Moonlight with alpha support for Silverlight 2.0" +date: "2008-08-19" +tags: + - "silverlight" +--- + +This is actually not a "breaking-news-story", but nevertheless something that I thus far haven´t seen posted anywhere on the Silverlight feeds I´m subscribing to. + +The Moonlight project initiated by Novell is actually at an alpha support stage for Silverlight 2.0. With this support we can truly go cross-platform with Silverlight in the future. + +Read more [here](http://www.mono-project.com/Moonlight#Alpha_support_for_Silverlight_2.0). diff --git a/_posts/2008/08/net-3-5-sp1-and-visual-studio-2008-sp1-is-out/index.md b/_posts/2008/08/net-3-5-sp1-and-visual-studio-2008-sp1-is-out/index.md new file mode 100644 index 0000000..a9bd332 --- /dev/null +++ b/_posts/2008/08/net-3-5-sp1-and-visual-studio-2008-sp1-is-out/index.md @@ -0,0 +1,12 @@ +--- +title: ".net 3.5 SP1 and Visual Studio 2008 SP1 is out" +date: "2008-08-12" +categories: + - "net" +--- + +Finally, the service packs we´ve all been waiting for. + +.net 3.5 SP1 can be found [here](http://www.microsoft.com/downloads/details.aspx?FamilyID=ab99342f-5d1a-413d-8319-81da479ab0d7&displaylang=en) and Visual Studio 2008 SP1 can be found [here](http://www.microsoft.com/downloads/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&displaylang=en). + +Good work guys. Can´t wait to install these. diff --git a/_posts/2008/08/net-development-on-the-mac/index.md b/_posts/2008/08/net-development-on-the-mac/index.md new file mode 100644 index 0000000..ef63cd7 --- /dev/null +++ b/_posts/2008/08/net-development-on-the-mac/index.md @@ -0,0 +1,30 @@ +--- +title: ".net development on the Mac" +date: "2008-08-17" +--- + +Out of curiosity I wanted to see how one develops software for the Mac OSX, therefor I started looking at Mac development the last week and registered as an Apple developer and downloaded XCode, browsed through a bunch of tutorials and started hacking away. Fired up XCode and created a Obj-C Cocoa application, opened Interface Builder and got used to it. Hooked up actions and outlets and found the experience quite enjoyable. Interface Builder does not automagically generate the "code-behind" that I´m used to from my time as a WinForms developer, you actually have to tell it to do so explicitly (at least was far as I´ve figured out. Hopefully I´m wrong - anyone?). So far so good. I have my user interface defined and have a .H and .M file to start coding. Being an old C/C++ developer, I get comfortable with the a lot of the library (Stdio, stdlib, std\*). + + + +A couple of hours into it all I just loose interest. I am a C# and .net developer at heart and start missing my comfort-zone. Then it pops into my head; I remember something vaguely called CocoaSharp, and I know I got the option of Mono. Google it is. + + + +Mono had an update on the 1st of August, version 2.0: http://www.mono-project.com/news/archive/2008/Aug-01.html + + + +It supports C# 3.0 and LINQ.. Ahh.. I´m saved. + + + +Then it´s off to download [CocoaSharp](http://www.cocoa-sharp.com/) and get the plugin for XCode and get all my C# goodness, .net library and LINQiness back. + +Any other tips would be really appreciated - please leave me a comment. + +**\---** + +**Update, 28th of august:** + +Video tutorial for how to get started can be found [here](http://groups.google.com/group/cocoa-sharp-dev/web/video-tutorial---lettercounter). You'll find the XCode plugin [here](http://www.mono-project.com/CSharpPlugin). diff --git a/_posts/2008/08/new-blog-design-and-move-at-the-same-time/index.md b/_posts/2008/08/new-blog-design-and-move-at-the-same-time/index.md new file mode 100644 index 0000000..65dd55c --- /dev/null +++ b/_posts/2008/08/new-blog-design-and-move-at-the-same-time/index.md @@ -0,0 +1,22 @@ +--- +title: "New blog design - and move at the same time" +date: "2008-08-13" +categories: + - "general" +--- + +Im relaunching myself with a brand new design at a brand new location. + +This blog will continue over at the following URL: + +For those of you who´ve been subscribing through the Feedburner [URL](http://feeds.feedburner.com/einari) will not notice any outtage, everything has been updated and redirected properly. + +If you´re still subscribing to the old RSS link, please update to the Feedburner one above. + +Hope you´ll enjoy the new design and keep on reading my ramblings. :) + +Please leave me a comment if you have any. Also if you feel like your missing something, or you find the design to be ugly or non functional. Any feedback is greatly appreciated. + +**And now for some credits.** + +I´ve done the design partially myself. Believe me when I say I´m no graphics artist or designer, so I have to get inspiration and "borrow" ideas from here and there. The top header is ofcourse my own, but the content part is a modified version of the [Gluttony Wordpress Theme](http://www.wpdesigner.com/2007/11/25/gluttony-wordpress-theme/) that was adopted to BlogEngine by [GravityCube](http://www.gravitycube.net/blog/). In addition to this, I´ve gotten the contact actions icons and BlogEngine.net code for using them from [David Burke](http://www.dbvt.com/), thanks again for helping me out. diff --git a/_posts/2008/08/nnug-silverlight-talk-tuesday-26th-of-august/index.md b/_posts/2008/08/nnug-silverlight-talk-tuesday-26th-of-august/index.md new file mode 100644 index 0000000..2de096f --- /dev/null +++ b/_posts/2008/08/nnug-silverlight-talk-tuesday-26th-of-august/index.md @@ -0,0 +1,10 @@ +--- +title: "NNUG Silverlight Talk - Tuesday, 26th of August" +date: "2008-08-20" +tags: + - "silverlight" +--- + +I´m holding a Silverlight talk on the 26th of August. The talk will go beyond the regular demos and talks you see there and I´ll try to show the real potential of Silverlight and why it should be a technology to really count on in the future. + +If you happen to be in Oslo and want to learn more about Silverlight, don´t hesitate to register for [here](http://www.nnug.no/Avdelinger/Oslo/Moter/Brukergruppemote-august-2008/). diff --git a/_posts/2008/08/partial-switching/index.md b/_posts/2008/08/partial-switching/index.md new file mode 100644 index 0000000..95d5f79 --- /dev/null +++ b/_posts/2008/08/partial-switching/index.md @@ -0,0 +1,21 @@ +--- +title: "Partial Switching" +date: "2008-08-10" +tags: + - "silverlight" +--- + +The new position I´m starting at Objectware the 1st of September is focused around Silverlight and WPF. Seeing that Silverlight truely is cross platform, I asked for a MacBook Pro as the preferred computer and got one. The reason for this is both professionally, seeing that I will be working a lot with Silverlight, but also on the personal side. I wanted to explore a part of the universe I´ve never been and I wanted to do it properly. The plan is to use only Windows for Visual Studio and have everything else as software in Mac OSX. + +As a true Windows man, I was quite curious as to how this journey would end up. The weeks prior to getting the computer I read articles and started to get familiar with the user interface by skinning my Windows to look and "feel" like Mac OSX. Still, after doing all this preparation I can truely say that I was not prepared at all. Keep in mind that besides Windows, the only operating systems I´ve ever had has been C64, Atari TOS, Amiga OS, OS/2 and DOS. + +Thus far, the experience has been quite positive. Apple has truely created a complete experience. The only thing I´ve been having trouble with is to find free software for the things I need; newsreading, blogging, screencasting, torrents. It seems that it is more common for people to pay for software for the Mac. It´s not that the software is expensive, usually the price is some $20-$30. I guess I´m just spoiled for not being used to it. I´ve so far landed on the following software for the 4 activities mentioned: + +\* Newsreading = NewsGators [NetNewsWire](http://www.newsgator.com/Individuals/NetNewsWire/Default.aspx "NetNewsWire") +\* Blogging = Brain Juices [Blogo](http://drinkbrainjuice.com/blogo "Blogo") (In fact, this article was written with it) +\* Screencasting = Ambrosia Softwares [Snapz Pro](http://www.ambrosiasw.com/utilities/snapzprox/ "Snapz Pro") +\* Torrents = [xTorrent](http://www.xtorrent.com/ "xTorrent") + +For virtualization, I´m using Parallels. I liked their Coherence mode better than VMWare Fusions. The Windows installation runs in Boot Camp and is used directly by parallels. Runs smoothly. Just gotta figure out the occassional bluescreen I´m having. + +One of my goals the next 6 months is to get started with some development targetting the Mac using XCode and Objective C. Also I´ve been wanting to look into iPhone development. The SDK is downloaded at least, so let´s see what the future holds. diff --git a/_posts/2008/08/screencasts/index.md b/_posts/2008/08/screencasts/index.md new file mode 100644 index 0000000..d46f0cf --- /dev/null +++ b/_posts/2008/08/screencasts/index.md @@ -0,0 +1,11 @@ +--- +title: "Screencasts" +date: "2008-08-27" +--- + +I want to start producing some screencasts with focus on my two favorite technologies these days; Silverlight 2 and Xna, but find myself at a loss for what I should create. I am also open to suggestions to other things to create screencasts for. + +Please leave me a comment if you have suggestions to topics you want to learn more about. +There is very little Norwegian content out there, so I have an idea about focusing the content on Norwegian, I'm not sure if the audience would want this. Please leave a comment about preferred language as well, that way its easier to figure out what people want. + +Ofcourse - if you don't want me to create screencasts, that would also be a comment to leave. diff --git a/_posts/2008/08/silverlight-2-tools-for-vs2008-sp1/index.md b/_posts/2008/08/silverlight-2-tools-for-vs2008-sp1/index.md new file mode 100644 index 0000000..60f1032 --- /dev/null +++ b/_posts/2008/08/silverlight-2-tools-for-vs2008-sp1/index.md @@ -0,0 +1,8 @@ +--- +title: "Silverlight 2 tools for VS2008 SP1" +date: "2008-08-13" +tags: + - "silverlight" +--- + +In conjunction with the release of SP1 for VS2008, the Silverlight team has released an update for the Visual Studio 2008 tools for Silverlight 2. It can be obtained from [here](http://www.microsoft.com/downloads/details.aspx?FamilyId=50A9EC01-267B-4521-B7D7-C0DBA8866434&displaylang=en). diff --git a/_posts/2008/08/tonsills-be-gone/index.md b/_posts/2008/08/tonsills-be-gone/index.md new file mode 100644 index 0000000..bd02a2e --- /dev/null +++ b/_posts/2008/08/tonsills-be-gone/index.md @@ -0,0 +1,12 @@ +--- +title: "Tonsills be gone" +date: "2008-08-09" +--- + +On wednesday this week I went in for a routine operation to remove my tonsills. Normally these things take about 20 minutes and they need to observe you for a couple of hours to make sure you´re OK. Turns out, I wasn´t OK after the two hours. I had a really bad reaction to the morphin they gave me. I got really sick and they decided to keep me overnight. + +That was a really good decision, because that night has got to be one of the most interesting nights in my life. I had a morphin retraction that was really bad, combined with problems getting all the oxygene into my lounges. I was given medicine for one problem and another popped up, at least that was how it fealt. Anywho. Some 36 hours after the operation, I was finally sent home. + +Now I´m just sitting here, enjoying the pain (and the drugs ofcourse). + +Btw: Got myself a MacBook pro - so I´m trying to figure that one out during these hazy days. diff --git a/_posts/2008/08/vs2008-xaml-designer-crash-in-parallels/index.md b/_posts/2008/08/vs2008-xaml-designer-crash-in-parallels/index.md new file mode 100644 index 0000000..2492d1a --- /dev/null +++ b/_posts/2008/08/vs2008-xaml-designer-crash-in-parallels/index.md @@ -0,0 +1,11 @@ +--- +title: "VS2008 Xaml designer crash in Parallels" +date: "2008-08-27" +--- + +I've been struggling the last couple of weeks with the Xaml designer crashing in Parallels. +Had to revert to VMWare, which I find a bit less user friendly than Parallels and slower. + +Turns out, the problem was that I had enabled the experimental hardware accelerated DX9 thingy in Parallels. Turning this off gave me my life back. :) Off to send an email to the Silverlight team to look away from the debug dump they got from me. + +So if you're in Parallels - don't enable the option with the big fat warning sign on it. :) diff --git a/_posts/2008/08/we-congratulate-the-first-norwegian-mvp-in-2008/index.md b/_posts/2008/08/we-congratulate-the-first-norwegian-mvp-in-2008/index.md new file mode 100644 index 0000000..9c0018b --- /dev/null +++ b/_posts/2008/08/we-congratulate-the-first-norwegian-mvp-in-2008/index.md @@ -0,0 +1,8 @@ +--- +title: "We congratulate the first Norwegian MVP in 2008" +date: "2008-08-27" +--- + +Congratulations to Mr. Einar Otto Stangvik on his achievment on getting the MVP title from Microsoft. + +You can read more about Einar over [here](https://mvp.support.microsoft.com/profile=F8A2FA25-AAEA-42AF-9D2D-FE167536369C#name). If you want to learn more about the MVP program, you'll find details [here](https://mvp.support.microsoft.com/). diff --git a/_posts/2008/09/a-newbies-mac-owners-perspective/index.md b/_posts/2008/09/a-newbies-mac-owners-perspective/index.md new file mode 100644 index 0000000..acb6557 --- /dev/null +++ b/_posts/2008/09/a-newbies-mac-owners-perspective/index.md @@ -0,0 +1,16 @@ +--- +title: "A newbies Mac-owners perspective" +date: "2008-09-13" +--- + +A little more than a month ago I got my first Mac ever; a MacBook Pro 2.4GHz w/4 gigs of memory. The background for this was that I was going to have focus on Silverlight development in my new job at Objectware, but also out of curiousity on a personal level. It is a bit funny that I would go to the length of getting a Mac. No more than a year ago (this is kinda embarassing), I was really ridiculing a guy at work for talking about Mac all the time. I was truly a Windows man at heart and soul. I ran into this guy today and felt I had to apologize to him for the incidents and running into him is probably why this post came about. + +My first months experience with the Mac has been quite good. Being a devoted Windows user I was expecting to miss Windows features quite fast. I am today using Parallels to boot by Boot Camp installation of Vista (yes I know, I could get better performance with Windows XP or even better the Tiny XP distribution - but I use it for quite a few things). I had a goal of trying to minimize the number of applications on the Windows installation to 1; Visual Studio. This turned out to be utopia; now I have the following installed: Visual Studio 2008, Reflector, Expression Blend 2.5, SQL Server 2005 Management Studio Express, InfoPath 2007, RSS Bandit. Still not bad, considering I used to have some 40-50 applications installed at least on my Windows installations before. Now on the other hand, everything resides on the Mac OSX part of the computer. + +So, have I had any typically moments of real pain? Thus far I must say no. Sure, there has been a couple of times I've been wondering why a certain feature is missing, or why I can't seem to find it. But after some googling I've either found out how a feature worked or filled the gap with 3rd party software. The biggest change for me, would be the fact that free Mac software is not something that you'll be able to find for all scenarios. It started of for me when I wanted a good Torrent client (for downloading only legal stuff, of course). Sure, there was BitTorrent, but in reality it kinda sucked. The best one I found was XTorrent, and it had a $29 pricetag (do you see the irony??). Being a software developer I am a strong believer that software cost money, so I just have to adjust to not finding everything for free. + +The second biggest thing I've experienced since I got my Mac is the usual comments from everyone who does not own or have really tried a Mac. Especially when a problem occurs; ".. ahh, it's because you've got a Mac you get this problem.." People are really sceptic, like I was just a year ago - so I know were they're coming from. + +As many have noticed, Apple has had a real boost in sales the last couple of years and I am really getting why, but still; Being a Windows developer and hold a lot of Microsoft software dear to me, I hope Microsoft learns from what Apple has done right and creates an experience that is better than they deliver today. Sure, Vista is nice and all, but there is a quite a bit to desire still. Hopefully we'll see good stuff at PDC that will show us what way Microsoft is heading. + +Ahhh.. Well..  Back to writing some code in my VS2008 on the Parallels Vista Desktop located on Space2 in my Spaces configuration. :) diff --git a/_posts/2008/09/clinton-rocksmith-joins-the-balder-team/index.md b/_posts/2008/09/clinton-rocksmith-joins-the-balder-team/index.md new file mode 100644 index 0000000..9291cb6 --- /dev/null +++ b/_posts/2008/09/clinton-rocksmith-joins-the-balder-team/index.md @@ -0,0 +1,8 @@ +--- +title: "Clinton Rocksmith joins the Balder team" +date: "2008-09-22" +--- + +I'd like to officially welcome Clinton Rocksmith to the Balder team. He will start creating samples and tutorials for Balder and join in on the general programming as well. Clinton has been working with Silverlight for a while now and worked on a Silverlight project for the-hub.tv in New Zealand that you can find [here](http://the-hub.tv/silverlight/). + +So, pay attention to the Balder project over at [CodePlex](http://www.codeplex.com/Balder), we've got quite a bit of content planned. diff --git a/_posts/2008/09/declarative-3d-xaml-in-silverlight/images/moz-screenshot-31.jpg b/_posts/2008/09/declarative-3d-xaml-in-silverlight/images/moz-screenshot-31.jpg new file mode 100644 index 0000000..e5948a1 Binary files /dev/null and b/_posts/2008/09/declarative-3d-xaml-in-silverlight/images/moz-screenshot-31.jpg differ diff --git a/_posts/2008/09/declarative-3d-xaml-in-silverlight/images/moz-screenshot-41.jpg b/_posts/2008/09/declarative-3d-xaml-in-silverlight/images/moz-screenshot-41.jpg new file mode 100644 index 0000000..5c8c477 Binary files /dev/null and b/_posts/2008/09/declarative-3d-xaml-in-silverlight/images/moz-screenshot-41.jpg differ diff --git a/_posts/2008/09/declarative-3d-xaml-in-silverlight/index.md b/_posts/2008/09/declarative-3d-xaml-in-silverlight/index.md new file mode 100644 index 0000000..0881018 --- /dev/null +++ b/_posts/2008/09/declarative-3d-xaml-in-silverlight/index.md @@ -0,0 +1,14 @@ +--- +title: "Declarative 3D (Xaml) in Silverlight" +date: "2008-09-03" +--- + +I've been working today with enabling declarative 3D through Xaml for the [Balder](http://www.codeplex.com/Balder) engine. +You can now add the following to your Page: + +![](images/moz-screenshot-31.jpg) + +The above Xaml will result in the following: +![](images/moz-screenshot-41.jpg) + +You can download the [source](http://www.codeplex.com/Balder/SourceControl/ListDownloadableCommits.aspx) and have a look at how it's implemented at this stage. diff --git a/_posts/2008/09/dont-forget-the-game-camp-event-26th-of-september/index.md b/_posts/2008/09/dont-forget-the-game-camp-event-26th-of-september/index.md new file mode 100644 index 0000000..be8ba15 --- /dev/null +++ b/_posts/2008/09/dont-forget-the-game-camp-event-26th-of-september/index.md @@ -0,0 +1,13 @@ +--- +title: "Don't forget the Game Camp Event - 26th of September" +date: "2008-09-12" +--- + +We're getting closer and closer to the most important date for us guys at Game Camp; 26th of September we're having another event. This time we have really some great content for you. And as always; IT'S FREE. + + +[Scott Bilas](http://scottbilas.com/) is coming to do the keynote and a session as well. Scott has worked on a lot of tripple A games for numerous companies (Sierra Online, Oberon Media, Gas Powered Games). He has had a few talks at the Games Developers Conference and is a strong believer in creating games in a managed environment such as the .net CLR and utilizing Xna. In addition FunCom is coming to talk about their experience in developing Age of Conan. The agenda is so great, you´ve gotta go and read to not miss out. Most game companies in Norway are attending with speakers. This will be our best event yet! + +Don´t hesitate to register and show up at this great event. + +Read the agenda and register [here](http://www.gamecamp.no/events/default.aspx). And remember to spread the word. diff --git a/_posts/2008/09/first-day-at-objectware/index.md b/_posts/2008/09/first-day-at-objectware/index.md new file mode 100644 index 0000000..2299e7d --- /dev/null +++ b/_posts/2008/09/first-day-at-objectware/index.md @@ -0,0 +1,12 @@ +--- +title: "First day at Objectware" +date: "2008-09-01" +--- + +I am sitting on the bus right now on my way to my first day at Objectware. My official title is Technology Evangelist. The job will consist of consultant work, community work, blogging and other related activities. This should in theory mean that I get more time to post here and do talks at places like [NNUG](http://www.nnug.no). + +This is my first job were I am doing consultant work, I've always been working for ISVs. Hopefully I'll adapt fast. I must admit that this is a bit scary. :) + +Waiting to get started at a new job can make the days very long, imagine doing it when you're sitting at home the last 10 weeks. I am very very excited, can't wait to dive into some Silverlight work. + +Wish me luck... diff --git a/_posts/2008/09/game-camp-another-great-event-has-been-completed/index.md b/_posts/2008/09/game-camp-another-great-event-has-been-completed/index.md new file mode 100644 index 0000000..5553307 --- /dev/null +++ b/_posts/2008/09/game-camp-another-great-event-has-been-completed/index.md @@ -0,0 +1,14 @@ +--- +title: "Game Camp : Another great event has been completed" +date: "2008-09-28" +--- + +We've just finished another event with success. + +With the help from our sponsors; MSDN Norway, Digiment, NITH, Treyarch and JetBrains, we were able to pull off another great event. This time around we had 2 separate tracks with speakers for everyone to choose from and great content all the way. + +In addition; we got, as always, really valuable help from the Microsoft Student Community at NITH. We would like to thank everyone involved doing this event, we really appreciate it. A special thanks goes to Anders Bondehagen for pulling his network at NITH and other places to make this event happen. To show our appreciation, Anders was awarded an Xbox 360, courtesy of Digiment. + +Also, we'd like to thank our speakers for their great help in making the event something to remember; Scott Bilas / Loose Cannon Studios, Eirik Moseng / Digiment, Joachim Barrum / Artplant, Torbjørn Sitre / Funcom, Trond Johansen / Artplant and Jan Kasper Martinsen / NITH. + +Until next time. diff --git a/_posts/2008/09/silverlight-2-rc0-available/index.md b/_posts/2008/09/silverlight-2-rc0-available/index.md new file mode 100644 index 0000000..e60a388 --- /dev/null +++ b/_posts/2008/09/silverlight-2-rc0-available/index.md @@ -0,0 +1,7 @@ +--- +title: "Silverlight 2 - RC0 Available" +date: "2008-09-29" +--- + +Due to heavy relaxation this weekend - I never got around to post information about the new RC0 of Silverlight. +You'll find all the details [here](http://silverlight.net/GetStarted/sl2rc0.aspx). diff --git a/_posts/2008/09/silverlight-at-nnug-bergen-24th-of-september/index.md b/_posts/2008/09/silverlight-at-nnug-bergen-24th-of-september/index.md new file mode 100644 index 0000000..41d34b1 --- /dev/null +++ b/_posts/2008/09/silverlight-at-nnug-bergen-24th-of-september/index.md @@ -0,0 +1,10 @@ +--- +title: "Silverlight at NNUG Bergen 24th of September" +date: "2008-09-17" +--- + +I am giving another Silverlight talk, this time at NNUG Bergen next week. + +If you happen to be around those GPS coordinates, don't hesitate to stop by. + +Read more and sign up for it [here](http://www.nnug.no/Avdelinger/Bergen/Moter/NNUG-Bergen---September-2008/). diff --git a/_posts/2008/09/silverlight-talk-at-nnug-vestfold-9th-of-october-2008/index.md b/_posts/2008/09/silverlight-talk-at-nnug-vestfold-9th-of-october-2008/index.md new file mode 100644 index 0000000..0b76b9d --- /dev/null +++ b/_posts/2008/09/silverlight-talk-at-nnug-vestfold-9th-of-october-2008/index.md @@ -0,0 +1,10 @@ +--- +title: "Silverlight talk at NNUG Vestfold, 9th of October 2008" +date: "2008-09-12" +--- + +It's been a slow year for us at NNUG Vestfold, we haven't had the chance to have all the meetings we planned. Anyways, we're bouncing back and have a meeting on the 9th of October. The topic for the evening is Silverlight 2 with 2 different sessions. First we're starting off with the basics of Silverlight and Xaml and the second session will be more about how Silverlight fits in more advanced scenarios. If you're curious about WPF, this could be an excellent starting point as well, seeing that Silverlight 2 is a subset of WPF and most of what will be demonstrated is applicable for WPF as well. + +The speaker this time is none other than yours truely. :)  + +If you happen to be in our beautiful town; Sandefjord, at the time - don't hesitate to stop by and see what Silverlight can do for you. You can register [here](http://www.nnug.no/Avdelinger/Vestfold/Moter/Brukergruppemote-torsdag-9-oktober-2008/). diff --git a/_posts/2008/09/silverlight-unit-test-runner-how-does-it-work/index.md b/_posts/2008/09/silverlight-unit-test-runner-how-does-it-work/index.md new file mode 100644 index 0000000..0b3a7a4 --- /dev/null +++ b/_posts/2008/09/silverlight-unit-test-runner-how-does-it-work/index.md @@ -0,0 +1,14 @@ +--- +title: "Silverlight Unit Test runner - how does it work?" +date: "2008-09-23" +--- + +Before I tidy up everything and publish the source code for the [Silverlight Unit Test runner](/post/2008/09/21/Silverlight-UnitTest-runner-for-Jetbrains-ReSharper.aspx), I thought I'd let you all in on the secret behind it and how it actually works. + +The runner is a plugin built for the ReSharper plugin for Visual Studio (a plugin within a plugin - cool). Whenever you open the unit test explorer or do a change and recompile your code, the ReSharper mechanism is to call all plugins and let them gather information about the compiled assemblies and decide if it is a test assembly and then gather the test classes/fixtures and methods for ReSharper. Once this information is gathered, one needs to provide rendering facilities for ReSharper to render the tests in the unit test explorer or other windows it find appropriate. + +Then, when you choose to run your tests (either a selection, or all), the plugin starts its trip into some really strange hoops. First we start by copying a specialized test execution engine written in Silverlight and a testpage for it to the destination folder of the test project, typically bindebug under the test projects directory. Then the plugin instantiates Cassini and sets its root path to point to the same location as mentioned before. A windows form is then created with a browser plugin within it and the URL given is the TestPage for the test execution engine previously copied with an additional request string following it with information about what tests to run. The test execution engine hooks up a LogProvider for the test framework by Jeff Willcox and then dynamically loads the XAP for the real test project written by the user and creates a visual for this to be used as the visual root for the application. Now, the tests will run and give feedback to the LogProvider which gathers all the results into an XML. After completing running all the tests, the XML with all the results in it is added to a programatically created DIV object into the DOM of the enclosing testpage. + +Back in the plugin we are "listening" to the page and look into the DOM to see if the DIV appears, once this appear we have our result. We parse this result and convert it into ReSharper results and send it back to an internal manager for the plugin. Once ReSharper asks for the result on a callback for all the methods, we ask the manager what the result is and then hand this over. + +My original idea was to host a WCF service inside the plugin and let the test execution engine in Silverlight contact the WCF service with results async. This could possibly give a better user experience and give test results as the tests were run. But I guess for now, the way it is implemented works out fine. diff --git a/_posts/2008/09/silverlight-unittest-runner-for-jetbrains-resharper/images/moz-screenshot.jpg b/_posts/2008/09/silverlight-unittest-runner-for-jetbrains-resharper/images/moz-screenshot.jpg new file mode 100644 index 0000000..91c6abf Binary files /dev/null and b/_posts/2008/09/silverlight-unittest-runner-for-jetbrains-resharper/images/moz-screenshot.jpg differ diff --git a/_posts/2008/09/silverlight-unittest-runner-for-jetbrains-resharper/index.md b/_posts/2008/09/silverlight-unittest-runner-for-jetbrains-resharper/index.md new file mode 100644 index 0000000..44da472 --- /dev/null +++ b/_posts/2008/09/silverlight-unittest-runner-for-jetbrains-resharper/index.md @@ -0,0 +1,38 @@ +--- +title: "Silverlight UnitTest runner for Jetbrains ReSharper" +date: "2008-09-21" +--- + +One of the things that I really missed the second [Jeff Wilcox](http://www.jeff.wilcox.name) released the UnitTest framework for Silverlight, was the ability to run it from within Visual Studio. +The last couple of weeks, I've been working on and off a Silverlight UnitTest runner for ReSharper 4 at work (Objectware). And today, this morning, it paid off. A version 0.1 is ready for your pleasure (read disclaimer below) to download [here](/Downloads/SilverlightTestRunner.zip). I will after some tidying, release the source as an open source project. + +**How to install:** +1\. Make sure Visual Studio is not running. + +2\. Create a directory called SilverlightUnitTest in the ReSharper plugins directory,  typically located at C:Program FilesJetBrainsReSharperv4.0BinPluginsSilverlightUnitTest. + +3\. Unzip the content of the ZIP file into the directory. + +4\. Add the assemblies (DLL files) to the Global Assembly Cache by opening the cache in Explorer (c:WindowsAssembly) and drag and drop the files into there. + +5\. Open Visual Studio and go to the ReSharper menu and select Plugins and make sure the Unit Test runner is enabled. + +6\. Write and run tests.  + + +**The future +**There is a couple of things missing or is wrong in the current version, here is a short list of things I can think of. Please don't hesitate to leave me a comment with features or bugs (dispite the disclaimer below, I will try to handle them. :) ) + +1\. Parts of a window that runs the tests pops up + +2\. It runs all the tests - need to implement a test provider for the test framework to only run the selected tests + +3\. Report back the stack trace and more information about tests that fail + +4\. Cleanup code. :) + +**Disclaimer:** +myself nor Objectware will support this software in any way (hence the release to open source in the future), use it at your own risk! + + +![](images/moz-screenshot.jpg) diff --git a/_posts/2008/09/silverlight-version-x-h-264-and-aac-true/index.md b/_posts/2008/09/silverlight-version-x-h-264-and-aac-true/index.md new file mode 100644 index 0000000..483ce0e --- /dev/null +++ b/_posts/2008/09/silverlight-version-x-h-264-and-aac-true/index.md @@ -0,0 +1,8 @@ +--- +title: "Silverlight (version X) + H.264 and AAC = true" +date: "2008-09-09" +--- + +Microsoft has decided to put support for the H.264 codec and AAC into Silverlight in the future. This is great stuff. In theory this should mean we could get content from places like YouTube and play it directly in Silverlight. And, of course, we who have decided to buy a Mac and use it for video editing and want to publish our newly iMovie edited home videos, we can do it through Silverlight without having to convert to WMV. + +Read more about it at Tim Heuers post about it: [H.264 and AAC support coming to Silverlight](http://timheuer.com/blog/archive/2008/09/09/silverlight-to-support-h264-and-aac.aspx) diff --git a/_posts/2008/09/steve-ballmer-is-coming-to-msdn-live-in-oslo-30th-of-september/index.md b/_posts/2008/09/steve-ballmer-is-coming-to-msdn-live-in-oslo-30th-of-september/index.md new file mode 100644 index 0000000..31bb6bd --- /dev/null +++ b/_posts/2008/09/steve-ballmer-is-coming-to-msdn-live-in-oslo-30th-of-september/index.md @@ -0,0 +1,10 @@ +--- +title: "Steve Ballmer is coming to MSDN Live in Oslo 30th of September" +date: "2008-09-19" +--- + +Finally, Norwegian developers get the chance to hear Steve Ballmer live on stage. On the 30th of September, Steve Ballmer will be on stage holding the keynote at the MSDN Live event in Oslo. + +Who knows, maybe we get to hear his "developers developers developers..." speech.. :) + +Unfortunately for you guys who haven't signed up yet, there are no tickets left. diff --git a/_posts/2008/09/the-future-with-microsoft-and-windows/index.md b/_posts/2008/09/the-future-with-microsoft-and-windows/index.md new file mode 100644 index 0000000..7eb7a6b --- /dev/null +++ b/_posts/2008/09/the-future-with-microsoft-and-windows/index.md @@ -0,0 +1,20 @@ +--- +title: "The future with Microsoft and Windows" +date: "2008-09-23" +--- + +I figured I'd give it a go and give my perspective and opinion on what I think Microsoft should do to keep their stand as the marketleader for operating systems (and other software). The last couple of years, the market has shiftet a bit. Apple has been eating slowly into the marketshare, not a true threadt yet - but... This is a good thing, competition is a good thing in all aspects of the software industry. The reason for the shift, I think is complex. Vista got a really bad start with really bad publicity. Some of the bad attention Vista got was deserved, but for the most part I felt it was not fair. I for one was an early adopter and ran it on poor hardware, but didn't have the same issues as "everyone else" - if you were to believe the media. Sure I had some issues, but as a general it felt good. + +That said, there are a couple of issues still, one of the biggest I think Windows has today is its legacy support. Windows is pretty much supporting stuff back to the beginning of the Microsoft adventure of the first DOS. I can understand that legacy support has been really important for Microsoft in order to get to that market position they have today, but things are changing and people are becoming less and less loyal to the operating system and are looking beyond the OS and wants to be able to do certain tasks with the least amount of hassle. Sure, Microsoft delivers all this today with both Windows XP and Vista. People get to connect to the internet, read their mail, socialize through services such as messenger. But still, some of the trouble with the platform today that is causing speed issues and possibly instability, I think can be related to their dedicated legacy support. + +**The Apple way +**Apple and its users has a very different relationship alltogether. Legacy support is pretty much not something Apple need to care about. If one would translate the support into Microsoft terms, the support would be something like this; "we're supporting Windows Vista and Windows Vista SP1". Mac OS 10.5 and 10.4 is pretty much what you need to consider when creating software on the Mac platform. They should consider themselves lucky. In addition, Apple has 100% control over the hardwareplatform. Of course, the computers have USB ports and Firewire ports, the hardware you're plugging in needs drivers and there is a chance Apple didn't provide them as part of the OS. This is were the Windows users are truly spoiled; the OS comes with drivers for 10 year old hardware.   + +**Clean slate +**So, how could Microsoft go about starting with a clean slate; no windows - something completely new. I think by far the most important product Microsoft has released this year is their Hypervisor. With this as the underlying platform one could easily scrap Windows all together, build a new operating that resides on top of the Hypervisor and provide legacy support for legacy applications by hosting them in a seamless matter through the Hypervisor. Microsoft would need to make a stand and say; let's come together and define the new platform for PCs with a minimum requirement. Scrap support for legacy hardware, design everything from the bottom up. The integration of Windows would have to be completely seamless, much like coherence is for Parallels on the Mac. You wouldn't notice that you were running a Windows application or a "Medori" application. Best of both worlds. + +In addition to the technical "mumbo-jumbo", Microsoft should start considering getting the coolnes factor that Apple has managed to get into their products. And a completely consistent look and feel, not only for the operating system and its facilities but also in applications running on it as well. + +Being a Microsoft technology entusiast and evangelist, I have a strong believe in their commitment to providing the best tools to the market. Not only for me as a developer, but also to other aspects of mine and others life. + +That was my 20 cents for today.. :) diff --git a/_posts/2008/09/updating-ui-from-a-thread-timer-og-backgroundworker-in-silverlight/images/moz-screenshot-51.jpg b/_posts/2008/09/updating-ui-from-a-thread-timer-og-backgroundworker-in-silverlight/images/moz-screenshot-51.jpg new file mode 100644 index 0000000..47c381a Binary files /dev/null and b/_posts/2008/09/updating-ui-from-a-thread-timer-og-backgroundworker-in-silverlight/images/moz-screenshot-51.jpg differ diff --git a/_posts/2008/09/updating-ui-from-a-thread-timer-og-backgroundworker-in-silverlight/index.md b/_posts/2008/09/updating-ui-from-a-thread-timer-og-backgroundworker-in-silverlight/index.md new file mode 100644 index 0000000..6fd30ce --- /dev/null +++ b/_posts/2008/09/updating-ui-from-a-thread-timer-og-backgroundworker-in-silverlight/index.md @@ -0,0 +1,12 @@ +--- +title: "Updating UI from a thread, timer og backgroundworker in Silverlight" +date: "2008-09-04" +--- + +If you're a Windows forms developer you're probably used to using the Invoke() or BeginInvoke() to execute code in the context of the UI thread (Application loop). Same goes for WPF with the Dispatcher object. + +For Silverlight, this was also introduced in 2.0. The Dispatcher object is present in all UIElement objects and can be used to execute code in the context of the UI thread to avoid having cross thread exceptions. I've been needing this ever since I started working on the Balder 3D engine in order to get real performance from it. Now I can really get things flying. + +Here's a sample (Don't mind the squiglies from R#): + +![](images/moz-screenshot-51.jpg) diff --git a/_posts/2008/09/xna-3-0-beta-available/index.md b/_posts/2008/09/xna-3-0-beta-available/index.md new file mode 100644 index 0000000..320ccae --- /dev/null +++ b/_posts/2008/09/xna-3-0-beta-available/index.md @@ -0,0 +1,33 @@ +--- +title: "Xna 3.0 Beta available" +date: "2008-09-19" +--- + +Xna is on track and you can get your hands on the bits [here](http://creators.xna.com/en-us/3.0beta_mainpage). + +Haven't had the time myself to look into the details, but I suspect I will seeing we're hosting [Game Camp next week](http://www.gamecamp.no/events). + +Here is a short list of the improvements: + +**Zune** +Compatibility with the upcoming Zune 3.0 Firmware release. Please note that the XNA Game Studio 3.0 CTP will no longer work once you have upgraded your Zune device to the 3.0 firmware. +Improved deployment stability. +Support for Zune deployment on Windows Vista x64 Systems! +You can now use the Remote Performance Monitor for Zune games. + +**Xbox 360 +**Xbox 360 project templates (You will not be able to develop on the Xbox 360 until our final release. We felt this was important to include so that you could get projects converted over and look at the system, even if you are not able to run the games, yet). +Support for the Big Button Pad. + +**Framework & Visual Studio Features** +Enumerate and play back media on your Windows computer or Xbox 360. +Simple sound effect support on Windows computers and Xbox 360. +Support for Rich Presence (lets friends know what’s going on in your game). +Support for Invites (ask your friends to join you in a multiplayer game) and Join Session In Progress (after you see what your friends are doing, you can join their current session with just a couple of button presses, even if that’s a different game to the one you are currently playing) +Compress your content and save space with the new content compression features! +ClickOnce packaging support for distributing your XNA Framework games on Windows. +Upgrade your project from XNA Game Studio 2.0 using the Project Upgrade Wizard! +Take screen captures of your game running on Zune through the XNA Game Studio Device Center. +Support for .NET language features like Linq +Create multiple content projects and leverage cross project synchronization in Visual Studio. +FBX importer improvements: read materials containing multiple textures, and export custom shader materials directly out of Max or Maya. diff --git a/_posts/2008/10/all-game-camp-2008-content-available-on-youtube/index.md b/_posts/2008/10/all-game-camp-2008-content-available-on-youtube/index.md new file mode 100644 index 0000000..5959dd4 --- /dev/null +++ b/_posts/2008/10/all-game-camp-2008-content-available-on-youtube/index.md @@ -0,0 +1,27 @@ +--- +title: "All Game Camp 2008 Content available on YouTube" +date: "2008-10-11" +--- + +Finally we got the time to get all the content from the DV tapes onto a harddrive and have prepared it and uploaded it all to YouTube. + +Below you'll find links to all the content, most of it in Norwegian. The panel debate, the keynote and the second session by Scott Bilas are in English. + + +[All videos](http://www.youtube.com/results?search_query=%22Game+Camp+Septembe+2008%22&search_type=&aq=f) + +[Keynote by Scott Bilas](http://www.youtube.com/results?search_query=%22Game+Camp+Septembe+2008+-+Keynote%22&search_type=&aq=f) + +[Storytelling in games by Torbjørn Sitre from Funcom](http://www.youtube.com/results?search_query=%22Game+Camp+Septembe+2008+-+Funcom%22&search_type=&aq=f) + +[Gamedesign by Trond Vidar Johansen from Artplant](http://www.youtube.com/results?search_query=%22Game+Camp+September+2008+-+Artplant%22&search_type=&aq=f) + +[Rapid prototyping by Eirik Moseng from Digiment Games](http://www.youtube.com/results?search_query=%22Game+Camp+September+2008+-+Digiment%22&search_type=&aq=f) + +[Optimizing the development pipeline by Scott Bilas from Loose Cannon Studios](http://www.youtube.com/results?search_query=%22Game+Camp+September+2008+-+Scott+Bilas%22&search_type=&aq=f) + +[Xna Workshop by Einar Ingebrigtsen from Objectware & Game Camp](http://www.youtube.com/results?search_query=%22Game+Camp+September+2008+-+Xna+Workshop%22&search_type=&aq=f) + +[Silverlight gaming by Einar Ingebrigtsen from Objectware & Game Camp](http://www.youtube.com/results?search_query=%22Game+Camp+September+2008+-+Silverlight%22&search_type=&aq=f) + +[The panel debate](http://www.youtube.com/results?search_query=%22Game+Camp+September+2008+-+Panel%22&search_type=&aq=f) featuring Rune Zakariassen / Microsoft, Jan Kasper Martinsen /NITH, Scott Bilas / Loose Cannon Studio, Eirik Moseng / Digiment Games and myself in front. diff --git a/_posts/2008/10/balder-3d-engine-ready-for-silverlight-rc0/index.md b/_posts/2008/10/balder-3d-engine-ready-for-silverlight-rc0/index.md new file mode 100644 index 0000000..cf65d27 --- /dev/null +++ b/_posts/2008/10/balder-3d-engine-ready-for-silverlight-rc0/index.md @@ -0,0 +1,9 @@ +--- +title: "Balder 3D engine ready for Silverlight RC0" +date: "2008-10-08" +--- + +It was relatively painless getting the Balder 3D engine up and running on the RC0 of Silverlight. +The project on Codeplex is now up and running with the latest modifications. + +In addition we've been working on a refactoring with texturemapping especially in mind. We also want it all to be nice and declaratively done in Xaml. You'll find a refresh sample [here](http://localhost:8080/silverlight/BalderCubeWithTextures/TestPage.html). diff --git a/_posts/2008/10/balder3d-com-is-up-and-running/index.md b/_posts/2008/10/balder3d-com-is-up-and-running/index.md new file mode 100644 index 0000000..1fca04a --- /dev/null +++ b/_posts/2008/10/balder3d-com-is-up-and-running/index.md @@ -0,0 +1,8 @@ +--- +title: "Balder3D.com is up and running" +date: "2008-10-03" +--- + +Thanks to Clinton Rocksmith on the Balder team, we're now up and running with a dedicated site for hosting all the details about the project; [http://www.balder3d.com](http://www.balder3d.com).  The site will be the place to look for tutorials, forum, downloads and more related to the project. + +Hope you'll find it interesting. Please feel free to come with suggestions to the site, tutorials you'd like to see or anything else. diff --git a/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz001.png b/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz001.png new file mode 100644 index 0000000..34a4114 Binary files /dev/null and b/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz001.png differ diff --git a/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz002.png b/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz002.png new file mode 100644 index 0000000..f4258d4 Binary files /dev/null and b/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz002.png differ diff --git a/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz003.png b/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz003.png new file mode 100644 index 0000000..b9febe7 Binary files /dev/null and b/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz003.png differ diff --git a/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz004.png b/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz004.png new file mode 100644 index 0000000..099c915 Binary files /dev/null and b/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz004.png differ diff --git a/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz005.png b/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz005.png new file mode 100644 index 0000000..4184874 Binary files /dev/null and b/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz005.png differ diff --git a/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz008.png b/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz008.png new file mode 100644 index 0000000..39147cf Binary files /dev/null and b/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz008.png differ diff --git a/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz009.png b/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz009.png new file mode 100644 index 0000000..de26d9c Binary files /dev/null and b/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/images/Parallels-DesktopScreenSnapz009.png differ diff --git a/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/index.md b/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/index.md new file mode 100644 index 0000000..c0d24e4 --- /dev/null +++ b/_posts/2008/10/creating-a-theme-manager-for-silverlight-2/index.md @@ -0,0 +1,47 @@ +--- +title: "Creating a theme manager for Silverlight 2" +date: "2008-10-13" +--- + + **\*\*\* Update (2008-10-18): Added the solution as an attachment to this post + new title +** + +One of the things I really feel like is missing in Silverlight 2, is a theme manager with the ability to apply the same style or template to all controls of a specific targettype, or to all controls in your page / usercontrol based upon a resource file on your application. If you're creating UI it seems so wasteful to have to include Style="{StaticResrouce blahh}", not to mention the fact that we aren't able to dynamically change the Style easy during the lifetime of the application. + +I started today with creating the bits needed to do this, but quickly ran into a bit of a problem. All UIElements can have a resource dictionary attached to it with all the resources available for the context of that UIElement. So far so good. You can also use the XamlReader class to parse files with nothing but a ResourceDictionary in it. Then all we need to do, is to walk all the UIElements from the root visual you wish to apply for and set the Style property for these to the Style found in the ResourceDictionary according to the target-type specified. Problem is, the ResourceDictionary class does not implement the methods to just walk it, like for instance GetEnumerator(). + +But by doing a couple of minor magical things (not really magic, but it sounds cool), we can get all the keys for all the styles and use the keys to index the dictionary. We then use this to create our own dictionary based upon Type being the key. It is then just a matter of recursively going through all UIElements from the root visual and setting the Style property. + +Heres the main method for getting the ResourceDictionary and parsing it: + +![](images/Parallels-DesktopScreenSnapz001.png) + +Then we need the "recursiveness": + +![](images/Parallels-DesktopScreenSnapz002.png) + +All you need then is to have a resource file with for instance the following markup as the start-tag: +![](images/Parallels-DesktopScreenSnapz003.png) + +And put all your styles in here and close it all off with a /ResourceDictionary + +In your Page.xaml.cs file you just call the ApplyTheme with the RootVisual property on your page and the name of the file to use as a theme. The theme/resource file must be a content file: +![](images/Parallels-DesktopScreenSnapz004.png) + + +In your Page.xaml for instance, you can then go about creating your UI without thinking about the styles. +![](images/Parallels-DesktopScreenSnapz005.png) + +The result will be something like this (Using [Dave Crawfords Glossy theme](http://timheuer.com/blog/archive/2008/10/06/silverlight-control-template-gallery-styles.aspx)): +![](images/Parallels-DesktopScreenSnapz009.png) + +Without the "theme" applied, it looks like this: +![](images/Parallels-DesktopScreenSnapz008.png) + + +This technique can also be applied if you want to apply templates to your controls. + + +You can download the working solution from below: + +[SilverlightTheming.zip (36.69 kb)](http://localhost:8080/wp-content/2008/10/SilverlightTheming.zip) diff --git a/_posts/2008/10/game-camp-2008-keynote-up-on-youtube/index.md b/_posts/2008/10/game-camp-2008-keynote-up-on-youtube/index.md new file mode 100644 index 0000000..d1b37ad --- /dev/null +++ b/_posts/2008/10/game-camp-2008-keynote-up-on-youtube/index.md @@ -0,0 +1,8 @@ +--- +title: "Game Camp 2008 Keynote up on YouTube" +date: "2008-10-06" +--- + +We're slowly getting all the video material from the Game Camp we held in September up on YouTube. The keynote from Scott Bilas is up now and can be found [here](http://www.youtube.com/results?search_query=%22Game+Camp+September+2008%22&search_type=&aq=f). + +Over the next couple of days we will be publishing the rest of the material, alongside with the powerpoints and samples created on stage. diff --git a/_posts/2008/10/getting-ready-and-excited-for-pdc-tomorrow/index.md b/_posts/2008/10/getting-ready-and-excited-for-pdc-tomorrow/index.md new file mode 100644 index 0000000..ef2c25e --- /dev/null +++ b/_posts/2008/10/getting-ready-and-excited-for-pdc-tomorrow/index.md @@ -0,0 +1,10 @@ +--- +title: "Getting ready and excited for PDC tomorrow" +date: "2008-10-26" +--- + +Finally, the day is almost here; PreConference PDC. Landed approximately at 3PM local Los Angeles time and picked up my rental and headed down to Huntington Beach, were I am staying at a friends house. + +Tomorrow there will be all kinda cool material at the PreConference, but my eye is on (not very surprising) the Silverlight part held by Jeff Prosise (read more [here](http://www.microsoftpdc.com/Agenda/Preconference.aspx#creating-rich-internet-applications-with-silverlight)). Looking forward to this and 4 more days of endless coolnes. Hope to meet up with a lot of people. + +And now, on to consuming a couple of beers and enjoying life as a whole. :) diff --git a/_posts/2008/10/microsoft-visual-studio-2010-net-4-0-sneak-peak/index.md b/_posts/2008/10/microsoft-visual-studio-2010-net-4-0-sneak-peak/index.md new file mode 100644 index 0000000..aaaa70f --- /dev/null +++ b/_posts/2008/10/microsoft-visual-studio-2010-net-4-0-sneak-peak/index.md @@ -0,0 +1,8 @@ +--- +title: "Microsoft Visual Studio 2010 + .net 4.0 Sneak Peak" +date: "2008-10-07" +--- + +Microsoft is constantly developing and improving their developer flagship; Visual Studio along with .net. You can get already get a glimps of what is happening to the next major release of Visual Studio [here](http://msdn.microsoft.com/en-us/vstudio/products/cc948977.aspx). If you happen to be one of the lucky ones going to [PDC;](http://microsoftpdc.com) you will get a lot more information there. + +Hope to see you at PDC! diff --git a/_posts/2008/10/mvp-on-xna-directx/images/logo_mvp.png b/_posts/2008/10/mvp-on-xna-directx/images/logo_mvp.png new file mode 100644 index 0000000..adb0d69 Binary files /dev/null and b/_posts/2008/10/mvp-on-xna-directx/images/logo_mvp.png differ diff --git a/_posts/2008/10/mvp-on-xna-directx/index.md b/_posts/2008/10/mvp-on-xna-directx/index.md new file mode 100644 index 0000000..0e050da --- /dev/null +++ b/_posts/2008/10/mvp-on-xna-directx/index.md @@ -0,0 +1,10 @@ +--- +title: "MVP on Xna / DirectX" +date: "2008-10-01" +--- + +I got a call at 6 PM today, was minding my own business cleaning up after dinner; Rune Grothaug on the DPE team at Microsoft Norway called. He started off being very serious. I was thinking that someone had died or something. Then he started the sentence that made me go through the roof: ".. as far as he could see, I was awarded the MVP title today..". You can imagine my excitement. I've been awarded the MVP title for Xna & DirectX. + +First I need to thank everyone who has been involved in the process; Rune Grothaug (DPE Norway), Johan Lindfors (DPE Sweden), Rune Zakariassen (DPE Norway), Gerard Verbrugge (my MVP lead) and the rest of the guys on the DPE Team in Norway for giving me chance to become visible from time to time. I also want to thank my beautiful and patient wife for letting me sit in front of the computer, organize Game Camp and NNUG events and pretty much run around the country talk about what I love to do. I am truely sorry if I left anyone out. Feels like I just stood at the Oscars, but then again getting the MVP award is like getting a developer Oscar. :)  + +![](images/logo_mvp.png) diff --git a/_posts/2008/10/pdc-2008-afterthoughts/index.md b/_posts/2008/10/pdc-2008-afterthoughts/index.md new file mode 100644 index 0000000..950eb7d --- /dev/null +++ b/_posts/2008/10/pdc-2008-afterthoughts/index.md @@ -0,0 +1,23 @@ +--- +title: "PDC 2008 - afterthoughts" +date: "2008-10-31" +--- + +So, here we are - PDC 2008 has just finished (yesterday, that is). Here is my take on what PDC 2008 was all about. + +Surely, Azure - Windows in the cloud was the main attraction, and certainly interesting and a bit exciting. We will take a closer look at the technology and what this will mean for our customers when we get back home - but there is definitely something there. The ability to take an existing service or web application and scale into the cloud does sound intriguing. With the possibility to also have other services to rely on in the cloud, such as the SQL services or SharePoint services, Microsoft has a good offering and should be very competitive with their platform. + +The second thing that got a lot of attention was the "Oslo" project. "Oslo" has been something I've been somewhat following a bit since the first time I heard about it, but have had trouble sort of grasping what it was all about. Every time someone talked about it, it sounded different than from the previous talk someone had. It seems that they've held the cards close to their chest on this one. What we got presented at PDC sounds very interesting; a language for creating DSLs. Sure, Microsoft has tried this before with Microsoft DSL - but this initiative seems more mature than their previous attempts. + +One of the things that I was really keen to learn more about, was .net 4.0 and C# 4.0. With the introduction of the static type called dynamic, they are opening up a new ballgame to the world of static programming languages. I'm one of the guys who've always been very fond of static programming languages, but has started to see the true benefits of dynamic languages. With the introduction of dynamic in C#, there is a whole bunch of things one can do that you couldn't before - not only work with dynamic languages, but more common scenarios as well. For one, you could "consume" services at runtime, without the need for generating proxies that change over time and could potentially cause source control headaches. Also Anders Hejlsberg talked about the introduction of named parameters and default values, something that Visual Basic has had for years. Coming from a C++ world, I missed the possibility to have default values in C# for method parameters. The combination of default values and named parameters, the language will get really powerful. I'm embracing this completely. + +Another subject that got a lot of attention at PDC, was not surprisingly; Silverlight 2. Microsoft released during PDC the Silverlight Control Toolkit with the full source code and test harness. There were quite a few really good talks on Silverlight 2 and I found this content to be very satisfying. + +Last but not least; Windows 7. This subject needs no introduction nor explanation. :) + + +My take on PDC was that there was a lot of good sessions, and I attended some bad ones (without going into details here; my survey responses will reflect this). One thing I felt was a bit of a target miss, was some of the keynotes. They felt like marketing rather than targeting developers. I walked out on most of them, actually. My whole reason for being at PDC was to get good developer content, so this was a bit of a miss for me, I think. + +All in all Microsoft delivered quite a bit of goods, some relevant for myself and my work and some not - but you can't please everyone. They showed off what their focus is the next years.   + +Its been a really busy week, my initial plan was to blog and twit about PDC all week - but got caught up with reality of focusing in on sessions and social activity during the nights. Seeing that Microsoft has all the material up on their [site](http://www.microsoftpdc.com), you should just jump over there and start consuming all the video feeds. diff --git a/_posts/2008/10/performance-profiling-in-silverlight/images/moz-screenshot1.jpg b/_posts/2008/10/performance-profiling-in-silverlight/images/moz-screenshot1.jpg new file mode 100644 index 0000000..91c6abf Binary files /dev/null and b/_posts/2008/10/performance-profiling-in-silverlight/images/moz-screenshot1.jpg differ diff --git a/_posts/2008/10/performance-profiling-in-silverlight/index.md b/_posts/2008/10/performance-profiling-in-silverlight/index.md new file mode 100644 index 0000000..fe7cfae --- /dev/null +++ b/_posts/2008/10/performance-profiling-in-silverlight/index.md @@ -0,0 +1,12 @@ +--- +title: "Performance Profiling in Silverlight" +date: "2008-10-09" +--- + +One of the things that is missing out of the box when developing Silverlight applications, is the ability to analyse performance. The performance monitoring tools in VS2008 does not support Silverlight. [Seema Ramchandani](http://blogs.msdn.com/user/Profile.aspx?UserID=35574) at Microsoft has created a [guide](http://blogs.msdn.com/seema/archive/2008/10/08/xperf-a-cpu-sampler-for-silverlight.aspx) to two tools to aid with this; xperf and xperfView. These tools were previously only available internally to Microsoft, but is now available for everyone. + +The xperf tool is a command line tool that be used to run the Silverlight application for collecting performance information. With xperfView you can take the output and get performance details from the xperf tool like this: + +![](images/moz-screenshot1.jpg) + +Thanks to [Stefaan Rillaert](http://stefaan.wordpress.com/) for sending me this link. diff --git a/_posts/2008/10/silverlight-2-release-announced-today/images/moz-screenshot-1.jpg b/_posts/2008/10/silverlight-2-release-announced-today/images/moz-screenshot-1.jpg new file mode 100644 index 0000000..72e7152 Binary files /dev/null and b/_posts/2008/10/silverlight-2-release-announced-today/images/moz-screenshot-1.jpg differ diff --git a/_posts/2008/10/silverlight-2-release-announced-today/index.md b/_posts/2008/10/silverlight-2-release-announced-today/index.md new file mode 100644 index 0000000..ecf338b --- /dev/null +++ b/_posts/2008/10/silverlight-2-release-announced-today/index.md @@ -0,0 +1,6 @@ +--- +title: "Silverlight 2 release announced today" +date: "2008-10-13" +--- + +



Just got off a conference call with Scott Guthrie at Microsoft where he announced the release of Silverlight 2 today. It will be available tomorrow; 14th of October 2008 alonside a version of Expression Studio tomorrow that will have support for Silverlight 2 as well.

Unfortunately I wasn't able to type all the information they announced, as I was on my bike and for obvious reasons wasn't able to take notes. :)

The download links aren't available yet, so pay attention to the official Silverlight.net site.


diff --git a/_posts/2008/10/silverlight-2-released-and-available-new-controls-tools/index.md b/_posts/2008/10/silverlight-2-released-and-available-new-controls-tools/index.md new file mode 100644 index 0000000..98ac0f8 --- /dev/null +++ b/_posts/2008/10/silverlight-2-released-and-available-new-controls-tools/index.md @@ -0,0 +1,26 @@ +--- +title: "Silverlight 2 released and available: New controls, tools" +date: "2008-10-14" +tags: + - "silverlight" +--- + +Microsoft follows up on their announcement yesterday and releases Silverlight 2 today. + +You'll find everything on the official Silverlight site, but I'll post all the links for your convience here: + +[Silverlight tools for Visual Studio 2008](http://go.microsoft.com/fwlink/?LinkId=129043) +[Silverlight 2 Developer Runtime (Windows)](http://go.microsoft.com/fwlink/?LinkId=119972) +[Silverlight 2 Developer Runtime (Mac)](http://go.microsoft.com/fwlink/?LinkId=119973) +[Silverlight 2 SDK - Offline documentation (CHM)](http://go.microsoft.com/fwlink/?LinkID=127106) +[Blend 2 SP1](http://www.microsoft.com/expression/try-it/Default.aspx?filter=blend) + +If you are using the Visual Web Developer Express 2008 edition, the Silverlight tools works fine with these as well. That is really neat, you can do Silverlight development without having to fork out any money! + +Did you know that you can do Silverlight development in Eclipse?  Microsoft is funding a project to provide this. They've partnered up with [Soyatec](http://www.soyatec.com/) to provide the [Eclipse Tools for Microsoft Silverlight](http://www.eclipse4sl.org/). + +\--- + +There are some breaking changes between the beta versions and the release, have a look at the following document for these changes [here](http://download.microsoft.com/download/6/f/e/6fe1f43d-9d0c-4346-ad08-602df9bcb3cf/BreakingChangesBetweenBeta2andRelease.doc). + +Tim Heuer also have a great post with all the changes and how to get started with development and a quick overview of the breaking changes in Silverlight and in Blend2 SP1, [here](http://timheuer.com/blog/archive/2008/10/14/silverlight-2-released-officially.aspx). diff --git a/_posts/2008/10/silverlight-unit-test-runners-on-codeplex/index.md b/_posts/2008/10/silverlight-unit-test-runners-on-codeplex/index.md new file mode 100644 index 0000000..46571c6 --- /dev/null +++ b/_posts/2008/10/silverlight-unit-test-runners-on-codeplex/index.md @@ -0,0 +1,18 @@ +--- +title: "Silverlight Unit Test Runners on CodePlex" +date: "2008-10-21" +tags: + - "silverlight" +--- + +The Silverlight unit test runners project started off as an internal project at work (Objectware) more or less a a proof of concept to prove that it was possible to run Silverlight unit tests based upon Jeff Wilcox' test framework. We decided early on to release the binaries of it as soon as we had it up and running. + +Now we've decided to release the source code as well and we're encouraging people to join in on the development. + +If you'd like to join in on the project, drop me a comment here, send a message on the leftside or a message on CodePlex. Remember to include your CodePlex username and I'll add you to the project. + +Anywho, the project can be found [here](http://www.codeplex.com/SilverlightRunners). + +** +The plan +**If there is such a thing as plan, I am not aware of it. :)  There are a couple of ideas, most of them are found in the project description on CodePlex. The basic idea is to be able to work with Silverlight unit tests like one is used to work with unit tests on any other project. We want to be able to use familiar tools and be able to run unit tests during continous integration. diff --git a/_posts/2008/10/steve-ballmer-nnug-a-bunch-of-happy-guys/images/SteveB_NNUG.jpg b/_posts/2008/10/steve-ballmer-nnug-a-bunch-of-happy-guys/images/SteveB_NNUG.jpg new file mode 100644 index 0000000..e2b94cf Binary files /dev/null and b/_posts/2008/10/steve-ballmer-nnug-a-bunch-of-happy-guys/images/SteveB_NNUG.jpg differ diff --git a/_posts/2008/10/steve-ballmer-nnug-a-bunch-of-happy-guys/index.md b/_posts/2008/10/steve-ballmer-nnug-a-bunch-of-happy-guys/index.md new file mode 100644 index 0000000..df9251b --- /dev/null +++ b/_posts/2008/10/steve-ballmer-nnug-a-bunch-of-happy-guys/index.md @@ -0,0 +1,8 @@ +--- +title: "Steve Ballmer + NNUG = a bunch of happy guys" +date: "2008-10-14" +--- + +Two weeks ago, the day before I got awarded the MVP title - another big thing happened. The guys at NNUG (Norwegian .Net User Group), including myself had the chance to meet with Steve Ballmer and got our picture taken with him. How cool was that. I'll tell ya..  Reallllly cool..  Thanks to Rune Grothaug with the Norwegian DPE team at Microsoft for making this happen. + +![](images/SteveB_NNUG.jpg) diff --git a/_posts/2008/11/compiler-extensions-is-just-another-framework/index.md b/_posts/2008/11/compiler-extensions-is-just-another-framework/index.md new file mode 100644 index 0000000..f2db50a --- /dev/null +++ b/_posts/2008/11/compiler-extensions-is-just-another-framework/index.md @@ -0,0 +1,104 @@ +--- +title: "Compiler extensions is just another framework" +date: "2008-11-03" +--- + +Over the years I've had several issues where I've longed for ways to better express my code that I felt that the language should have exposed grammar for me to make it more readable. Just like LINQ introduces an internal DSL, I've had quite a few cases were I also wanted to introduce my own internal DSL. Very often one ends up with working around it and do creative frameworks or libraries that helps doing the same thing without really solving the expressiveness. + +I come to realize more and more that the programming language one chose is less important than the frameworks one use. As long as one can express the code the way one wants and perhaps even in a suitable manner for the domain you're working in, the choice of language is really not important. + +**Attributes** +Attributes in C# are great for expressiveness, they are great at providing additional meta information for classes, fields and properties. Often I find myself using attributes for expressing business rules and having evaluation code for classes that recognise the attributes and then validates according by calling the different validation attributes applied. In my opinion, this is a bit unnatural. A lot of the attributes found in the .net framework acts as more than just meta information at compiletime. The compiler recognizes a whole bunch of the framework attributes and alters the behavior of the execution accordingly. +Ofcourse, everything that could be solved at compiletime could certainly also be solved at runtime, but it affects runtime speed and scalability. + +**Modifying IL code** +[PostSharp](http://www.postsharp.org/) is a project that solves this; one can alter the IL code generated after compilation and then commit it to the assembly. Attributes is a part of the language and with PostSharp we could solve this problem and we don't need to extend the compiler. + +**Plumbing** +Another good place were you'd might look at having compiler extensions are the places were you are basically just plumbing to make things work with how a framework wants it to work. A good candidate would be for instance the INotifyPropertyChanging and INotifyPropertyChanged interfaces were you basically are just doing the same code over and over again for all your properties. With a compiler extension you could plumb all this automatically. + +Typically you would do the following: + + +\[code:c#\] +public class MyNotifyingObject : INotifyPropertyChanging +{ +    public event PropertyChangedEventHandler PropertyChanging; + +    protected virtual void OnPropertyChanging(string propertyName) +    { +       if( null != this.PropertyChanging ) +       { +          this.PropertyChanging(this,new PropertyChangedEventArgs(propertyName)); +       } +    } + +    public string Name +    { +       get +       { +          return this.\_name; +       } + +       set +       { +          if ((this.\_name != value)) +          { +             this.OnPropertyChanging("Name"); +             this.\_name = value; +             this.OnPropertyChanged("Name"); +          } +       } +    } +} +\[/code\] + +A more expressive way could be: + +\[code:c#\] +public class MyNotifyingObject +{ +    public notify string Name { get; set; } +} +\[/code\] + + + +If you ever worked with WPF or Silverlight, you know the tedious parts where you want to have DependencyProperties on your controls. The syntax is like this: + +\[code:c#\] +public static readonly DepedencyProperty MyStringProperty = +                  DependencyProperty.Register("MyString", typeof(string), typeof(ParentType), null); + +public string MyString +{ +     get +     { +           return this.GetValue(MyStringProperty); +     } +     set +     { +           this.SetValue(MyStringProperty,value); +     } +} +\[/code\] + +Wouldn't it be a lot more expressive if we could just do: + +\[code:c#\] +public dependent string MyString { get; set; } +\[/code\] + +The way a compiler extension would handle this, is to fill in all the code found above to make it all work like if you were to write it all. We would get a more expressive code and actually get rid of potential problems with the literal declaring the name of the property as we do today. +** +C# 4.0** +During PDC there's been a bit talk about C# 4.0 and further down the pipeline, Anders Hejlsberg talked about the new static type called dynamic, that will help us out getting more dynamic. I for one has been quite the skeptic over the years about dynamic languages, but I must admit that in many cases it is really convienient. My conclusion is that this is a really great step forward for the language. + + +**Boo** +The programming language Boo is a static language that can be dynamically altered by introducing new keywords into the language through compiler extensions. In addition to the compiler they've created a small framework that enables the developer to take part of the compilation and modify the AST. This feels very great and gives us developers the power we need to really express our code and give our programming model a domain specific feel. A colleague of mine; Tore Vestues blogs about Boo and all its glory. Have a look [here](http://tore.vestues.no/2008/09/28/what-makes-boo-great/). + +Boo is great, but has a couple of obstacles before it will be embraced as a mainstream programming language by a lot of developers; syntax is one - even though I claim that the language shouldn't really matter, it sort of does. If you are familiar with the C syntax of C++,Java,C#, JavaScript, then the chances are that you'd feel that swithching to a new language is too big and you fall back. So, what about C# - if this is so great, why aren't we seeing this in C#? It is for sure, technically possible. At PDC there was a great panel on the future of programming languages where this among a ton of subjects was discussed. My impression was that Anders Hejlsberg was quite clear on this subject; they didn't want to open it all up because of the danger of devolving the language. I think this is really sad, I really hope they turn around on this. After all, as the title of this post claims; it is basically just another framework. By extending the language, and doing it like Boo has done it, wouldn't pose a threat to the language. The extensions one would build would in many cases be solving a domain specific problem and just act as just another framework one used to solve that problem. + +**Compiler Extensions - how +**A compiler extension, would need access to the AST tree created during compile time and based upon the code and any extensions found extend the existing tree. Boo solves this in a very graceful manner, the extensions are just part of your code as you compile or you can put them in a component. It is really not that intrusive as it might sound. We're not talking about creating a whole new version of the language, rather than introducing domain specific problem-solvers or aiding in creating more expressiveness. In addition to compiler extensions, one need to hook into the IDE to get rid of all the errors one would get thrown in your face while writing code. diff --git a/_posts/2008/11/last-stop-for-my-silverlight-roadtrip-this-year-ikt-grenland/index.md b/_posts/2008/11/last-stop-for-my-silverlight-roadtrip-this-year-ikt-grenland/index.md new file mode 100644 index 0000000..fa22390 --- /dev/null +++ b/_posts/2008/11/last-stop-for-my-silverlight-roadtrip-this-year-ikt-grenland/index.md @@ -0,0 +1,8 @@ +--- +title: "Last stop for my Silverlight roadtrip this year; IKT Grenland" +date: "2008-11-16" +--- + +On the 27th of November, IKT Grenland in Porsgrunn Norway is hosting their developer forum. They've invited me to hold a talk about Silverlight 2 and why one should use this technology. + +If you're Porsgrunn and want to catch "the wind" of Silverlight, don't hesitate to register for the event [here](http://www.iktgrenland.no/Utviklerforum/Kalender/27.-november-2008-19-45-00-Soekemotor-Silverlight-2.0). diff --git a/_posts/2008/11/nnug-vestfold-user-group-meeting-19th-of-november/index.md b/_posts/2008/11/nnug-vestfold-user-group-meeting-19th-of-november/index.md new file mode 100644 index 0000000..5947e79 --- /dev/null +++ b/_posts/2008/11/nnug-vestfold-user-group-meeting-19th-of-november/index.md @@ -0,0 +1,12 @@ +--- +title: "NNUG Vestfold User Group Meeting, 19th of November" +date: "2008-11-16" +--- + +We're having a really exciting evening on wednesday the 19th of November at NNUG Vestfold. + +[Gøran Kvarv](http://gorankvarv.blogspot.com) and [Tore Vestues](http://tore.vestues.no/), both from Objectware, are coming to talk about WPF and Boo. + +This is the first time we're holding the user group meeting out of the Notus / Visma location we've been till this point. We'll be having the meeting at [this](http://www.gurusoft.no/kontakt-oss/category28.html) location. + +To read more about the meeting and how to sign up for it, please have a look [here](http://www.nnug.no/Avdelinger/Vestfold/Moter/Brukergruppemote-onsdag-19-november-2008/). diff --git a/_posts/2008/11/serialization-in-silverlight/index.md b/_posts/2008/11/serialization-in-silverlight/index.md new file mode 100644 index 0000000..876f99e --- /dev/null +++ b/_posts/2008/11/serialization-in-silverlight/index.md @@ -0,0 +1,81 @@ +--- +title: "Serialization in Silverlight" +date: "2008-11-29" +--- + +I am working on a project were we have a challenge seeing that I work most of the week from my home office. The problem is that due to security at the location, there is no way to access the database we're working with through VPN or similar. I can't take the database from the site either. So, we need to have some sort of fake version of the data so that I can get my job done. + +My initial idea was to just have a local SQL database, seeing that our Silverlight application is connecting through a servicelayer and we could pretty much just change the connectionstring. But that is jus too easy. :)  I started looking at how I could have data stored within the Isolated Storage and serialize data back and forth from this. It will be handy for other parts of the project, so it wouldn't be a complete waste. + +Anyhow, the XmlSerializer one is familiar with from the desktop framework is not present in the Silverlight scaled down version of the framework. But, since the WCF support in Silverlight supports SOAP, it must be able to serialize and deserialize stuff back and forth across the wire. There is a class called DataContractSerializer that does the job. Only thing is, everywhere I looked and samples I came across, they claimed you had to decorate whatever object you wanted to work with, with \[DataContract\] for the class and \[DataMember\] for the members. This actually proves to not be the case, which is just brilliant for my case. + +The result is that I made a couple of helper methods to do it all. + +\[code:c#\] +        public string Serialize(T data) +        { +            using (var memoryStream = new MemoryStream()) +            { +                var serializer = new DataContractSerializer(typeof (T)); +                serializer.WriteObject(memoryStream, data); + +                memoryStream.Seek(0, SeekOrigin.Begin); + +                var reader = new StreamReader(memoryStream); +                string content = reader.ReadToEnd(); +                return content; +            } +        } + +        public T Deserialize(string xml) +        { +            using( var stream = new MemoryStream(Encoding.Unicode.GetBytes(xml)) ) +            { +                var serializer = new DataContractSerializer(typeof (T)); +                T theObject = (T)serializer.ReadObject(stream); +                return theObject; +            } +        } +\[/code\]  + +A sample with a couple of classes: + +\[code:c#\] +    public class WorkPosition +    { +        public double PositionSize { get; set; } +    } + +    public class Employee +    { +        public Employee() +        { +            this.WorkPositions = new WorkPosition\[\] +                                     { +                                        new WorkPosition {PositionSize=50d}, +                                        new WorkPosition {PositionSize=25d}, +                                        new WorkPosition {PositionSize=25d}, +                                     }; +        } + +        public string FirstName { get; set; } +        public string LastName { get; set; } + +        public WorkPosition\[\] WorkPositions { get; set; } +    } + +    public partial class Page : UserControl +    { +        public Page() +        { +            InitializeComponent(); + +            var employee = new Employee {FirstName = "John", LastName = "Doe" }; + +            string xml = this.Serialize(employee); + +            var deserializedEmployee = this.Deserialize(xml); +        } +    } + +\[/code\] diff --git a/_posts/2008/11/silverlight-evening-at-nnug-kristiansand-26th-of-november/index.md b/_posts/2008/11/silverlight-evening-at-nnug-kristiansand-26th-of-november/index.md new file mode 100644 index 0000000..4ae7a14 --- /dev/null +++ b/_posts/2008/11/silverlight-evening-at-nnug-kristiansand-26th-of-november/index.md @@ -0,0 +1,10 @@ +--- +title: "Silverlight evening at NNUG Kristiansand, 26th of November" +date: "2008-11-16" +--- + +I will be holding an all Silverlight evening at NNUG Kristiansands next user group meeting. + +The meeting will be in two sections; basics of Silverlight and using expression blend together with Visual Studio to create your solutions. The second part will dwell into more advanced features and how it all fits in your enterprise development. + +If you happen to be in the neighbourhood and feel like getting some Silverlight goodness, don't hesitate to sign up [here](http://www.nnug.no/Avdelinger/Kristiansand/Moter2/NNUG-Kristiansand---November-2008/). diff --git a/_posts/2008/11/silverlight-extension-methods/index.md b/_posts/2008/11/silverlight-extension-methods/index.md new file mode 100644 index 0000000..262d158 --- /dev/null +++ b/_posts/2008/11/silverlight-extension-methods/index.md @@ -0,0 +1,104 @@ +--- +title: "Silverlight Extension Methods" +date: "2008-11-24" +--- + +Every so often I find myself needing some helpers to make my development experience better when dealing with different Silverlight related objects, and every now and then I gather these into extensions methods - as I find that convienient. + +Lately I've been doing quite a bit of control development, both custom controls and user controls, during this development I deal a lot with storyboards and visual states. Here's the source for a couple of extension methods I find handy. + +**Finding a storyboard for a specific visual state +**When dealing with visual states, I tend to want to modify content of the storyboard programatically or I want on occasion to hook up to the completed event to be notified when the transition to the new state is finished. To do this, we need to get the storyboard. The below code is something I use for UserControls and is relying on the existense of a Control called "LayoutRoot". This could be rewritten  to extend Control and you could work the layoutroot instead of the UserControl. + +\[code:c#\] +        public static Storyboard GetStoryboardForState(this UserControl control, string stateName) +        { +            Storyboard stateStoryboard = null; + +            var root = control.FindName("LayoutRoot") as FrameworkElement; +            +            var groups = VisualStateManager.GetVisualStateGroups(root); +            foreach (VisualStateGroup group in groups) +            { +                foreach (VisualState state in group.States) +                { +                    if (state.Name == stateName) +                    { +                        stateStoryboard = state.Storyboard; +                    } +                } +            } +            return stateStoryboard; +        } +\[/code\] + +**Hooking up to the storyboard completed event for a transition for a state change +**As mentioned above, I like to hook up to the storyboard completed event to know when a storyboard of a transition between two states is finished. This can be done by using the above code and the following: + +\[code:c#\] +        public static void AddStateCompletedEventHandler(this UserControl control, string stateName, EventHandler stateChanged) +        { +            Storyboard stateStoryboard = control.GetStoryboardForState(stateName); +            if (null != stateStoryboard && null != stateChanged) +            { +                stateStoryboard.Completed += (s, e) => stateChanged(s, new EventArgs()); +            } +        } +\[/code\] + +**Setting a value for a specific named keyframe within a storyboard +**Storyboards within a visual state is not programatically accessible, even though you through in the x:Name="" attribute. Therefor I created a helper for setting a specific value - this one only supports doubles, seeing that was the only datatype I was using for the controls I was developing. Extending this should be fairly simple. + +\[code:c#\] +        public static void SetValueForKeyFrame(this Storyboard storyboard, string keyFrameName, double value) +        { +            foreach (var timeline in storyboard.Children) +            { +                if (timeline is DoubleAnimationUsingKeyFrames) +                { +                    var animation = timeline as DoubleAnimationUsingKeyFrames; +                    foreach (var keyframe in animation.KeyFrames) +                    { +                        string name = keyframe.GetValue(FrameworkElement.NameProperty) as string; +                        if (null != name && name == keyFrameName) +                        { +                            keyframe.Value = value; +                            return; +                        } +                    } +                } +            }            +        } +\[/code\] + +**Convienience methods for changing states for a UserControl +**Instead of working directly with the VisualStateManager, I like to do "this.GoToState(...)" on my UserControls. Again, the below code is for user controls, but could just as easily be for a custom control. Combining all of the above and the code below will give you this convience. +\[code:c#\] +        public static void GoToState(this UserControl control, string stateName, EventHandler stateChanged) +        { +            GoToState(control, stateName, true, stateChanged); +        } + +        public static void GoToState(this UserControl control, string stateName, bool useTransitions, EventHandler stateChanged) +        { +            Storyboard stateStoryboard = control.GetStoryboardForState(stateName); +            if (null != stateStoryboard && null != stateChanged) +            { +                stateStoryboard.Completed += (s, e) => stateChanged(s, new EventArgs()); +            } +            VisualStateManager.GoToState(control, stateName, useTransitions); +        } + +        public static void GoToStates(this Control control, params string\[\] stateNames) +        { +            GoToStates(control, true, stateNames); +        } + +        public static void GoToStates(this Control control, bool useTransitions, params string\[\] stateNames) +        { +            foreach (string name in stateNames) +            { +                VisualStateManager.GoToState(control, name, useTransitions); +            } +        } +\[/code\] diff --git a/_posts/2008/11/xna-3-0-is-out/index.md b/_posts/2008/11/xna-3-0-is-out/index.md new file mode 100644 index 0000000..ae04612 --- /dev/null +++ b/_posts/2008/11/xna-3-0-is-out/index.md @@ -0,0 +1,16 @@ +--- +title: "Xna 3.0 is out" +date: "2008-11-11" +--- + +Finally the news of Xna 3.0 struck me as well. Its been some days since the release of Xna 3.0, but with a hectic schedule I am not always fitting in time to read my RSS feeds. Anywho, he Xna team delivers, again. Finally, the release of version 3.0 of Xna is out. A lot of new features is included in this release. To mention a few: + +\* Visual Studio Integration : Support for C# 3.0, LINQ +\* Try before you buy: You can allow your customers to try your game before they buy it +\* Invitations: You can programatically allow players to invite friends to join their game +\* In addition Windows and Xbox 360, there is now Zune support (when will Europe get this?) +\* OneClick deployment of Windows Games + +If you want to get started with Xna 3.0, start at [this location](http://creators.xna.com/). + +For more details on the release of Xna 3.0 go [here](http://creators.xna.com/en-us/xnags_islive). diff --git a/_posts/2008/12/inotifypropertychanged-revisited/index.md b/_posts/2008/12/inotifypropertychanged-revisited/index.md new file mode 100644 index 0000000..35cad28 --- /dev/null +++ b/_posts/2008/12/inotifypropertychanged-revisited/index.md @@ -0,0 +1,173 @@ +--- +title: "INotifyPropertyChanged revisited" +date: "2008-12-11" +categories: + - "net" + - "csharp" + - "clr" + - "wpf" +tags: + - "silverlight" +--- + +**UPDATE, 12th of July 2009: Full source with sample can be downloaded from the following [post](/post/2009/07/11/Extensions-and-Helpers-for-Silverlight-and-WPF.aspx)**.  + +A recurring annoyance with me and quite a few other developers, is the way notification of changes from for instance your domain model to the UI should be handled in environments such as WPF or Silverlight. + +The environments are heavily relying on the objects implementing INotifyPropertyChanged and hooks up to the event PropertyChanged to be notified about any changes in any properties. + +This works out fine, with the exception of we as developers have to plumb in this code in all our objects. +Normally you would write something like : + +\[code:c#\] +public class Employee : INotifyPropertyChanged +{ +    public event PropertyChangedEventHandler PropertyChanged; + +    private string \_firstName; +    public string FirstName +    { +       get { return this.\_firstName; } +       set +       { +          this.\_firstName = value; +          this.OnPropertyChanged("FirstName"); +       } +    } + +    private void OnPropertyChanged(string propertyName) +    { +        if( null != this.PropertyChanged ) +        { +           this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); +        } +    } +} +\[/code\] + +One can easily see that the above code can become quite boring to write over and over again. A solution could be to put the frequently used bits in a base class for all your objects. But this steals inheritance. + +Another thing that bothers me with the whole INotifyPropertyChanged concept is the fact that I will be having my code filled up with literals that will not give any compiler errors if they contain typos, nor will they be subject to any renaming of properties as part of refactoring. + +In my search for a better way of doing this I came across quite a few ways of trying to simplify it. The best one I came across involved using Lambda expressions to express the property that was changed and thus fixing the latter problem with renaming/refactoring. But as far as Google took me, I couldn't find anything that didn't involved switching to an extensible language like Boo or similar to really tackle the problem more elegantly. But my quest couldn't end there. + +I started playing again with the problem a bit today and came up with a solution that I think is quite elegant. It involves Lambda expressions, extension methods and reflection. My three favourite things in C# and CLR these days. :) + +_**Update: 16th of December 2008, thanks to [Miguel Madero](http://www.miguelmadero.com/)**_ _**for pointing out the problem with value types.**_ + +\[code:c#\] +    public static class NotificationExtensions +    { +        public static void Notify(this PropertyChangedEventHandler eventHandler, Expression> expression) +        { +            if( null == eventHandler ) +            { +                return; +            } +            var lambda = expression as LambdaExpression; +            MemberExpression memberExpression; +            if (lambda.Body is UnaryExpression) +            { +                var unaryExpression = lambda.Body as UnaryExpression; +                memberExpression = unaryExpression.Operand as MemberExpression; +            } +            else +            { +                memberExpression = lambda.Body as MemberExpression; +            } +            var constantExpression = memberExpression.Expression as ConstantExpression; +            var propertyInfo = memberExpression.Member as PropertyInfo; +             +            foreach (var del in eventHandler.GetInvocationList()) +            { +                del.DynamicInvoke(new object\[\] {constantExpression.Value, new PropertyChangedEventArgs(propertyInfo.Name)}); +            } +        } +   } +\[/code\] + +When having the extension method above within reach, you will get the Notify() extension method for the PropertyChanged event in your class. The usage is then very simple. Lets revisit our Employee class again. +  +\[code:c#\] + +public class Employee : INotifyPropertyChanged + +{ + +    public event PropertyChangedEventHandler PropertyChanged; + + + +    private string \_firstName; + +    public string FirstName + +    { + +       get { return this.\_firstName; } + +       set + +       { + +          this.\_firstName = value; + +          this.PropertyChanged.Notify(()=>this.FirstName); + +       } + +    } + +} + +\[/code\] + + +This is a highly reusable and pretty compact technique, and if you're not like me and aren't all that agressive with putting "this." all over the place, it will be even more compact. :) + +_**Update**_, _**16th of December 2008:**_ + +Since my original post, I also added a SubscribeToChange() extension method. The reason for this is pretty much that I literally don't like literals and wanted to have the ability to subscribe to changes for a specific property. + +\[code:c#\] +        public static void SubscribeToChange(this T objectThatNotifies, Expression> expression, PropertyChangedEventHandler handler) +            where T : INotifyPropertyChanged +        { +            objectThatNotifies.PropertyChanged += +                (s, e) => +                    { +                        var lambda = expression as LambdaExpression; +                        MemberExpression memberExpression; +                        if (lambda.Body is UnaryExpression) +                        { +                            var unaryExpression = lambda.Body as UnaryExpression; +                            memberExpression = unaryExpression.Operand as MemberExpression; +                        } +                        else +                        { +                            memberExpression = lambda.Body as MemberExpression; +                        } +                        var propertyInfo = memberExpression.Member as PropertyInfo; + +                        if(e.PropertyName.Equals(propertyInfo.Name)) +                        { +                            handler(objectThatNotifies); +                        } +                    }; +        } +\[/code\] + +The above code extends classes that implements INotifyPropertyChanged and gives you a syntax like  follows for subscribing to events: + +\[code:c#\] +myObject.SubscripeToChange(()=>myObject.SomeProperty,SomeProperty\_Changed); +\[/code\] + + And then your handler would look like this: + +\[code:c#\] +private void SomeProperty\_Changed(MyObject myObject) +{ +    /\* ... implement something here \*/ +} +\[/code\] diff --git a/_posts/2008/12/natural-born-developers/index.md b/_posts/2008/12/natural-born-developers/index.md new file mode 100644 index 0000000..adc4b4a --- /dev/null +++ b/_posts/2008/12/natural-born-developers/index.md @@ -0,0 +1,16 @@ +--- +title: "Natural Born Developers" +date: "2008-12-21" +--- + +Modern software development, at least for quite a few, is all about being agile. Being agile often means that you must be able to change your code at any given time for a number of reasons; fixing bugs, achieving a better API, achieving better readability and a whole bunch of other good reasons. In order to achieve this, we try to make our code as refactorable (is this a valid word? :)) as possible. Meaning that the code is easy to change. + +In addition to this, more and more developers are trying to accomplish their work through the utilization of existing patterns, or taking known patterns and modify them, or maybe even create their own patterns. + +At this point, you're probably wondering; where am I going with this? Well. Its becoming more and more obvious to me; Women are the natural born developers. They have, for instance, refactoring built into their genetics. From a very early age they will try to take some that is already there and try to improve it. Often they start with themselves, trying on different clothes to make themselves look better. At a certain point they add makeup to the mix. Refactoring themselves to a better self, for improving their interface. They continue this refactoring and when a boyfriend is introduced into their life, they start refactoring him as well. Starting again with the subtle smaller things; the clothes, moving on to haircut and adding or removing facial hairs. In addition to this, they bring the refactoring into their homes and offices in the form of redecorating or refurnishing. + +When it comes to patterns, they are all into patterns. Its called fashion. They look around their surroundings and study other women from catalogues, comercials, bilboards and what not, and figure out what patterns are hip at the given time and stribe to blend into the pattern jungle. + +Why is it then that computer programming is still a male dominated occupation? And are we, in the lack of women as work-mates, stribing to become women? I mean, have we been so lonely all these years that we are mimicking the womens refactoring abilities and their taste for patterns/fashion? + +I will leave these questions open, as I really don't know the answers myself. :) diff --git a/_posts/2008/12/silverlight-unit-test-runner-for-resharper-new-version/index.md b/_posts/2008/12/silverlight-unit-test-runner-for-resharper-new-version/index.md new file mode 100644 index 0000000..448ac37 --- /dev/null +++ b/_posts/2008/12/silverlight-unit-test-runner-for-resharper-new-version/index.md @@ -0,0 +1,23 @@ +--- +title: "Silverlight Unit Test Runner for ReSharper - new version" +date: "2008-12-11" +--- + +Its been a busy couple of months, which has put a serious break on my ability to contribute to anything but my work. But I had some hours left over and figured I'd do an update for the Silverlight Unit Test Runner for the framework made by [Jeff Wilcox](http://www.jeff.wilcox.name/). It has now been updated to the latest version of the framework that is included in the December 2008 release of Silverlight Toolkit (download the source and you'll find the binaries). + +The runner is pretty crude still, and has the same shortcomings as before. This is something I will address as soon as I cross the deadline barrier of the current project I'm on. + +Anyhow, the binaries can be found [here](/Downloads/ReSharper_Silverlight_UnitTest_Runner.zip). + +Installation notes: + + +- Close any open Visual Studio 2008 instances + +- Create a directory called SilverlightUnitTestRunner in the C:Program FilesJetBrainsReSharperv4.xBinPlugins directory. If you don't have a plugins directory, create it. +- Uncompress the ZIP file and put them in the created directory. +- Put the Cassini.dll file in your Global Assembly Cache (open explorer, browse to c:WindowsAssembly and drag the file into here).  + +Voila. You should be good to go. Your unit tests should pop up in the Unit Test Explorer and you can start running them. Mind you, that they will take a little longer to run than other tests running in the unit test explorer. This is something I will try to figure out how to optimize. + +Also, if you're interested in the source code for the project, it is available [here](http://www.codeplex.com/SilverlightRunners). diff --git a/_posts/2009/01/agile-talk-with-jon-aril-torresdal/images/cd_music2.png b/_posts/2009/01/agile-talk-with-jon-aril-torresdal/images/cd_music2.png new file mode 100644 index 0000000..8c0f66d Binary files /dev/null and b/_posts/2009/01/agile-talk-with-jon-aril-torresdal/images/cd_music2.png differ diff --git a/_posts/2009/01/agile-talk-with-jon-aril-torresdal/images/flag_norway1.png b/_posts/2009/01/agile-talk-with-jon-aril-torresdal/images/flag_norway1.png new file mode 100644 index 0000000..cd32360 Binary files /dev/null and b/_posts/2009/01/agile-talk-with-jon-aril-torresdal/images/flag_norway1.png differ diff --git a/_posts/2009/01/agile-talk-with-jon-aril-torresdal/images/podcast2.png b/_posts/2009/01/agile-talk-with-jon-aril-torresdal/images/podcast2.png new file mode 100644 index 0000000..67e3abc Binary files /dev/null and b/_posts/2009/01/agile-talk-with-jon-aril-torresdal/images/podcast2.png differ diff --git a/_posts/2009/01/agile-talk-with-jon-aril-torresdal/index.md b/_posts/2009/01/agile-talk-with-jon-aril-torresdal/index.md new file mode 100644 index 0000000..6d16dc3 --- /dev/null +++ b/_posts/2009/01/agile-talk-with-jon-aril-torresdal/index.md @@ -0,0 +1,19 @@ +--- +title: "[Agile talk with Jon Aril Tørresdal]" +date: "2009-01-15" +categories: + - "podcast" +--- + +I sit down with [Jon Arild Tørresdal](http://blog.torresdal.net/aboutme.aspx) and talks about agile software development from his point of view in my first podcast show. + +### + +

Norwegian

Download full MP3
Subscribe on iTunes
+ + + +**Notes +**The intro and the outro music created by [Kim M. Jensen](http://www.audioplant.no/). + +Please do not hesitate to leave any comments on this post. If you have ideas for people you'd like to get interviewed, please leave a comment or contact me through the contact page. diff --git a/_posts/2009/01/another-norwegian-mvp/index.md b/_posts/2009/01/another-norwegian-mvp/index.md new file mode 100644 index 0000000..c142e51 --- /dev/null +++ b/_posts/2009/01/another-norwegian-mvp/index.md @@ -0,0 +1,8 @@ +--- +title: "Another Norwegian MVP" +date: "2009-01-01" +--- + +Today, a fellow [NNUG](http://www.nnug.no) community worker; [Lars Wilhelmsen](http://larswilhelmsen.com/) got awarded [MVP](https://mvp.support.microsoft.com/communities/mvp.aspx) for the Connected Systems Developer product group. + +This is great for the Norwegian community.  Congratulations! diff --git a/_posts/2009/01/dependencyproperties-why-art-thou-so-much-hassle/index.md b/_posts/2009/01/dependencyproperties-why-art-thou-so-much-hassle/index.md new file mode 100644 index 0000000..682175c --- /dev/null +++ b/_posts/2009/01/dependencyproperties-why-art-thou-so-much-hassle/index.md @@ -0,0 +1,219 @@ +--- +title: "DependencyProperties - why art thou (so much hassle)?" +date: "2009-01-09" +categories: + - "net" + - "csharp" + - "wpf" +tags: + - "silverlight" +--- + +**UPDATE, 12th of July 2009: Full source with sample can be downloaded from the following [post](/post/2009/07/11/Extensions-and-Helpers-for-Silverlight-and-WPF.aspx)**. + +I've grown quite fond of WPF and Silverlight, and find the architecture behind both great. I love the notions of DependencyProperties and how these are implemented. The only thing I find a bit annoying, is how one declares them. I am not going to go into details how DependencyProperties or binding works, there is quite a few tutorials out there that covers that. + +Lets say you have a ViewModel object, and on it you have a State property you wish to expose and make visible and bindable in Xaml: + +\[code:c#\] +public class ViewModel +{ +     public ViewState State { get; set; } +} +\[/code\] + + +**DependencyProperty out of the box** +In order for this to become a DependencyProperty and something we can bind against in Xaml, we have to do the following: + +\[code:c#\] +public class ViewModel +{ +     public static readonly DependencyProperty StateProperty = +           DependencyProperty.Register("State",typeof(ViewState),typeof(ViewModel),null); +     public ViewState State +     { +         get { return (ViewState)this.GetValue(StateProperty); } +         set { this.SetValue(StateProperty,value); } +     } +} +\[/code\] + +If you wanted to get notified if the property changed from databinding or similar, you would have to specify propertymetadata with a handler as the last argument for the Register method. +Its not too bad, but it is error-prone - there is a literal there specifying the name of the property. This has to match the actual name of the property. Hardly refactorable. + +This alone made me want to do something about it. In addition, I wanted my properties to act as any other property I have on objects.  For instance, if a state change occured, I just wanted my set method on the State property to be called. This introduces a bit of a problem. Calling the SetValue() method causes a whole range of events to occur, if you have a binding expression attached to the dependency property, it causes the PropertyChanged event from the attached object to be decoupled. Needless to say, not a good solution. + +What I've created for my project are 3 classes that can be used seperately or together. + +**DependencyPropertyHelper + +**\[code:c#\] +public static class DependencyPropertyHelper +{ +    public static DependencyProperty Register(Expression> expression) +    { +        return Register(expression, null); +    } + +    public static DependencyProperty Register(Expression> expression, TResult defaultValue) +    { +        var lambda = expression as LambdaExpression; +        MemberExpression memberExpression; +        if (lambda.Body is UnaryExpression) +        { +            var unaryExpression = lambda.Body as UnaryExpression; +            memberExpression = unaryExpression.Operand as MemberExpression; +        } +        else +        { +            memberExpression = lambda.Body as MemberExpression; +        } +        var propertyInfo = memberExpression.Member as PropertyInfo; + +        string dependencyPropertyName = propertyInfo.Name; + +        DependencyProperty prop = DependencyProperty.Register( +            dependencyPropertyName, +            propertyInfo.PropertyType, +            typeof(T), +            new PropertyMetadata(defaultValue,(o, e) => +                                                  { +                                                    Action a = ()=>propertyInfo.SetValue(o, e.NewValue, null); +                                                    if( o.Dispatcher.CheckAccess() ) +                                                    { +                                                        a(); +                                                    } else +                                                    { +                                                        o.Dispatcher.BeginInvoke(a); +                                                    } +                                                  })); +        return prop; +    } +} +\[/code\] + +The helper have the assumption that any change callback should just set the property value directly. +With this helper, we can at least make our dependency properties refactorable: + +\[code:c#\] +public class ViewModel +{ +     public static readonly DependencyProperty StateProperty = +           DependencyPropertyHelper.Register(o=>o.State); +     public ViewState State +     { +         get { return (ViewState)this.GetValue(StateProperty); } +         set { this.SetValue(StateProperty,value); } +     } +} +\[/code\] + +But still, we have the problem with the SetValue() in the property. So we need a second helping hand to make it all tick. Introducing the DependencyPropertyExtensions class: +** +DependencyPropertyExtensions + +**\[code:c#\] +public static class DependencyPropertyExtensions +{ +    public static void SetValue(this DependencyObject obj, DependencyProperty property, T value) +    { +        object oldValue = obj.GetValue(property); +        if (null != oldValue && null != value) +        { +            if (oldValue.Equals(value)) +            { +                return; +            } +        } +        obj.SetValue(property,value); +    } + +    public static T GetValue(this DependencyObject obj, DependencyProperty property) +    { +        return (T)obj.GetValue(property); +    } +} +\[/code\] + +With this in place, we can do the following: + +\[code:c#\] +public class ViewModel +{ +     public static readonly DependencyProperty StateProperty = +           DependencyPropertyHelper.Register(o=>o.State); +     public ViewState State +     { +         get { return this.GetValue(StateProperty); } +         set { this.SetValue(StateProperty,value); } +     } +} +\[/code\] + +Our code will now work as planned, and we can start putting any logic we want in the set method. + +**TypeSafeDependencyProperty** +Still, it could get better than this. +The DependencyProperty class can live anywhere, so we can actually wrap it all up in a new class that utilizes the other two classes: + +\[code:c#\] +public class TypeSafeDependencyProperty +{ +    private readonly DependencyProperty \_dependencyProperty; + + +    private TypeSafeDependencyProperty(DependencyProperty dependencyProperty) +    { +        this.\_dependencyProperty = dependencyProperty; +    } + + +    public T GetValue(DependencyObject obj) +    { +        return obj.GetValue(this.\_dependencyProperty); +    } + +    public void SetValue(DependencyObject obj, T value) +    { +        obj.SetValue(this.\_dependencyProperty,value); + +    } + +    public static TypeSafeDependencyProperty Register(Expression> expression) +    { +        var property = DependencyPropertyHelper.Register(expression); + +        var typeSafeProperty = new TypeSafeDependencyProperty(property); + +        return typeSafeProperty; +    } + +    public static TypeSafeDependencyProperty Register(Expression> expression, T defaultValue) +    { +        var property = DependencyPropertyHelper.Register(expression,defaultValue); + +        var typeSafeProperty = new TypeSafeDependencyProperty(property); + +        return typeSafeProperty; +    } +} +\[/code\] + +Our property can then be implemented as follows: +\[code:c#\] +public class ViewModel +{ +     public static readonly TypeSafeDependencyProperty StateProperty = +           TypeSafeDependencyProperty.Register(o=>o.State); +     public ViewState State +     { +         get { return StateProperty.GetValue(this); } +         set { StateProperty.SetValue(this,value); } +     } +} +\[/code\] + + +**Conclusion +**Code quality is a subject that I think is really important. In many of the APIs introduced by Microsoft, there is room for throwing code quality out the window. DependencyProperties and PropertyChanged on INotifyPropertyChanged interface are two things that open up for trouble - in my opinion. By using literals for code elements is a thing that I find to be really bad. If you were to rename the property and forget to rename the literal, you can end up debugging for hours. In Silverlight, the mismatch between the two does not cause any obvious exceptions. But, as shown above, they are relatively easy to wrap and make safe(r). diff --git a/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverLightUnitTestRunnerSelectPath2.png b/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverLightUnitTestRunnerSelectPath2.png new file mode 100644 index 0000000..140dc7a Binary files /dev/null and b/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverLightUnitTestRunnerSelectPath2.png differ diff --git a/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightRunnerFlow.png b/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightRunnerFlow.png new file mode 100644 index 0000000..4c31459 Binary files /dev/null and b/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightRunnerFlow.png differ diff --git a/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightUnitTestRunnerFolder.png b/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightUnitTestRunnerFolder.png new file mode 100644 index 0000000..fd188ab Binary files /dev/null and b/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightUnitTestRunnerFolder.png differ diff --git a/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightUnitTestRunnerPluginFolder.png b/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightUnitTestRunnerPluginFolder.png new file mode 100644 index 0000000..b23b551 Binary files /dev/null and b/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightUnitTestRunnerPluginFolder.png differ diff --git a/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightUnitTestRunnerSelectPath.png b/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightUnitTestRunnerSelectPath.png new file mode 100644 index 0000000..0fb6be2 Binary files /dev/null and b/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightUnitTestRunnerSelectPath.png differ diff --git a/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightUnitTestRunner_Registry.png b/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightUnitTestRunner_Registry.png new file mode 100644 index 0000000..89936e2 Binary files /dev/null and b/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightUnitTestRunner_Registry.png differ diff --git a/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightUnitTestRunner_Running.png b/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightUnitTestRunner_Running.png new file mode 100644 index 0000000..6c097ab Binary files /dev/null and b/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/images/SilverlightUnitTestRunner_Running.png differ diff --git a/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/index.md b/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/index.md new file mode 100644 index 0000000..72902e3 --- /dev/null +++ b/_posts/2009/01/silverlight-unit-test-runner-for-resharper-january-2009-update/index.md @@ -0,0 +1,44 @@ +--- +title: "Silverlight Unit Test Runner for Resharper - January 2009 Update" +date: "2009-01-12" +categories: + - "net" + - "csharp" +tags: + - "silverlight" +--- + +**UPDATE, 6th of May 2009: Project has been rewritten and put into another project, read more [here](/post/2009/05/01/Silverlight-Unit-Test-runners-new-project-3e-Odin.aspx).** + +I got some sparetime between all the family dinners during the christmas holidays and pretty much did a total rewrite of the Silverlight Unit Test Runner for Resharper. + +The reason I had to go pretty drastic measures, was that the first version was closer to a proof of concept than production quality, and it also had a few flaws in it with regards to reporting results and also taking in input to the Silverlight part of the runner. + +Anyways, the new and improved version can be downloaded [here](/Downloads/SilverlightUnitTest_January2009.zip). + +To install it, you need to have a Plugin folder in the Resharper bin directory, and within this a folder for the plugin, e.g. SlverlightUnitTest : +![](images/SilverlightUnitTestRunnerFolder.png) + +Once you have this in place, you need to unzip the file above. You'll now have a folder looking something like this: +![](images/SilverlightUnitTestRunnerPluginFolder.png) +The three DLLs you see in the folder need to go into the Global Assembly Cache. Simply open explorer and browse to c:WindowsAssembly and drag these files into this folder (do not move them, just normal drag'n'drop). + +As you can see, there is also a WebSite folder inside the plugins directory. This is the website that everything is running in. The path for this will come handy when the plugin is first initialized. If it is the first time running the plugin after this upgrade, you'll get a dialog asking for the path for the WebSite for the Silverlight Unit Test Runner. The path of the WebSite above is the one it needs. +![](images/SilverlightUnitTestRunnerSelectPath.png) + +Simply click browse and select the path: +![](images/SilverLightUnitTestRunnerSelectPath2.png) + +If by any chance you select a wrong path, or want to change the path, you can simply go to the registry and fix it by either removing the value or changing it yourself: +![](images/SilverlightUnitTestRunner_Registry.png) + +You should now be able to run your Silverlight Tests like any other test you've been running through the Resharper Unit Test Explorer. +![](images/SilverlightUnitTestRunner_Running.png) + +**Whats new +**The entire architecture of the plugin has changed. The previous version relied on an Xml being outputed from the Silverlight application running into the enclosing HTML DOM. This is now changed to be using WCF services. +It will now run only the tests you have selected to run. These are sent as parameters into the plugin and forwarded to the Unit Test framework by Jeff Wilcox as tags. + +**How does it work +**Instead of half-way trying to explain how it all works, a picture speaks more than a thousand words they say: +![](images/SilverlightRunnerFlow.png) diff --git a/_posts/2009/01/talking-games-with-scott-bilas/images/cd_music.png b/_posts/2009/01/talking-games-with-scott-bilas/images/cd_music.png new file mode 100644 index 0000000..8c0f66d Binary files /dev/null and b/_posts/2009/01/talking-games-with-scott-bilas/images/cd_music.png differ diff --git a/_posts/2009/01/talking-games-with-scott-bilas/images/flag_usa.png b/_posts/2009/01/talking-games-with-scott-bilas/images/flag_usa.png new file mode 100644 index 0000000..37178fc Binary files /dev/null and b/_posts/2009/01/talking-games-with-scott-bilas/images/flag_usa.png differ diff --git a/_posts/2009/01/talking-games-with-scott-bilas/images/podcast.png b/_posts/2009/01/talking-games-with-scott-bilas/images/podcast.png new file mode 100644 index 0000000..67e3abc Binary files /dev/null and b/_posts/2009/01/talking-games-with-scott-bilas/images/podcast.png differ diff --git a/_posts/2009/01/talking-games-with-scott-bilas/index.md b/_posts/2009/01/talking-games-with-scott-bilas/index.md new file mode 100644 index 0000000..95015a5 --- /dev/null +++ b/_posts/2009/01/talking-games-with-scott-bilas/index.md @@ -0,0 +1,21 @@ +--- +title: "[Talking games with Scott Bilas]" +date: "2009-01-30" +categories: + - "podcast" +--- + +This show Einar is sitting down with [Scott Bilas](http://scottbilas.com/) from [Loose Cannon Studios](http://www.loosecannonstudios.com/) and talks about game development in general. Scott has been in the gaming industry for a while and has worked on different titles. He is one of the developers behind the games shipped with Microsoft Windows Vista. + + + +### + +

English

Download full MP3
Subscribe on iTunes
+ + + +**Notes +**The intro and the outro music created by [Kim M. Jensen](http://www.audioplant.no/). + +Please do not hesitate to leave any comments on this post. If you have ideas for people you'd like to get interviewed, please leave a comment or contact me through the contact page. diff --git a/_posts/2009/01/why-compiler-extensions-shouldnt-be-scary/images/Parallels-DesktopScreenSnapz001.png b/_posts/2009/01/why-compiler-extensions-shouldnt-be-scary/images/Parallels-DesktopScreenSnapz001.png new file mode 100644 index 0000000..34a4114 Binary files /dev/null and b/_posts/2009/01/why-compiler-extensions-shouldnt-be-scary/images/Parallels-DesktopScreenSnapz001.png differ diff --git a/_posts/2009/01/why-compiler-extensions-shouldnt-be-scary/images/Parallels-DesktopScreenSnapz002.png b/_posts/2009/01/why-compiler-extensions-shouldnt-be-scary/images/Parallels-DesktopScreenSnapz002.png new file mode 100644 index 0000000..f4258d4 Binary files /dev/null and b/_posts/2009/01/why-compiler-extensions-shouldnt-be-scary/images/Parallels-DesktopScreenSnapz002.png differ diff --git a/_posts/2009/01/why-compiler-extensions-shouldnt-be-scary/images/Parallels-DesktopScreenSnapz004.png b/_posts/2009/01/why-compiler-extensions-shouldnt-be-scary/images/Parallels-DesktopScreenSnapz004.png new file mode 100644 index 0000000..099c915 Binary files /dev/null and b/_posts/2009/01/why-compiler-extensions-shouldnt-be-scary/images/Parallels-DesktopScreenSnapz004.png differ diff --git a/_posts/2009/01/why-compiler-extensions-shouldnt-be-scary/images/Reflector1.png b/_posts/2009/01/why-compiler-extensions-shouldnt-be-scary/images/Reflector1.png new file mode 100644 index 0000000..dfc154f Binary files /dev/null and b/_posts/2009/01/why-compiler-extensions-shouldnt-be-scary/images/Reflector1.png differ diff --git a/_posts/2009/01/why-compiler-extensions-shouldnt-be-scary/index.md b/_posts/2009/01/why-compiler-extensions-shouldnt-be-scary/index.md new file mode 100644 index 0000000..2a24da0 --- /dev/null +++ b/_posts/2009/01/why-compiler-extensions-shouldnt-be-scary/index.md @@ -0,0 +1,75 @@ +--- +title: "Why compiler extensions shouldn't be scary" +date: "2009-01-05" +categories: + - "net" + - "csharp" +--- + +I've been blogging [previously](/post/2008/11/03/Compiler-extensions-is-just-another-framework.aspx) about how compiler extensions could solve a bunch of issues and how compiler extensions would just represent just another framework. + +The reactions to the concept are mixed. Mostly it raises a lot of feelings to the surface. We as developers are really truely attached to our favourite programming language, and we also tend to be really loyal as well. That said and lets get to the point; when we're looking at the evolution of C# for instance, the path Microsoft has taken surely looks a lot like they are writing compiler extensions to solve the issues they want solved. + +Anonymous delegates for instance, they are nothing but compiler magic. +Take the following sample: +\[code:c#\] +ThreadStart threadStart = new ThreadStart( +      delegate() +            { +                  Console.WriteLine("Hello from thread #2"); +            })); +Thread thread = new Thread(threadStart); +thread.Start() +\[/code\] + +If we open the compiled binary in a program like Reflector and take look at what the compiler has actually done: + +![](images/Parallels-DesktopScreenSnapz001.png) + +The compiler generates a method called
b\_0() that has the content of the anonymous delegate: +![](images/Parallels-DesktopScreenSnapz002.png) +If we set the optimization option i reflector to .net 1.0, we can see the content of the Main() method and what it is actually doing: + +\[code:c#\] +private static void Main(string\[\] args) +{ +    ThreadStart threadStart = (CS$<>9\_\_CachedAnonymousMethodDelegate1 != null) ? CS$<>9\_\_CachedAnonymousMethodDelegate1 : (CS$<>9\_\_CachedAnonymousMethodDelegate1 = new ThreadStart(Program.
b\_\_0)); +    new Thread(threadStart).Start(); +} +  +\[/code\] + + +This is just one of many "compiler extensions" Microsoft has up their sleeve themselves. With C# 3.0, Microsoft introduced quite a bit of new language constructs. var, extension methods, Lambda, LINQ, anonymous methods - to name a few. All these features are built upon the .net 2.0 CLR and does not introduce anything new to the runtime, which means that they are all just compile-time magic. + +Taking the above sample and making it more C# 3.0: +\[code:c#\] +var thread = new Thread( +      () => Console.WriteLine("Hello from thread #2")); +thread.Start(); +\[/code\] + +We take use of the var keyword and lambdas and the code looks a lot better. But opening this in Reflector, targetting CLR 2.0, you'll see what really goes on: + +![](images/Parallels-DesktopScreenSnapz004.png) + +The var keyword is replaced with the actual type, as expected and the lambda expression is expanded to a delegate as expected. + +LINQ takes the rewrite to the extreme, consider the following C# 3.0 code: + +\[code:c#\] +var employees = new List(); + +var query = from e in employees +                  where e.FirstName.StartsWith("A") +                  select e; + +query.ToArray(); +\[/code\] + +The expanded version looks like this: +![](images/Reflector1.png) +It expands the LINQ into using the fluent interfaces defined for LINQ. + + +So, where am I going with this. You probably already knew all this. Well, my point is; if Microsoft themselves are pretty much doing compiler extensions today, I do not see why we shouldn't. It is not as scary as one would first think. Compiler extensions could solve a bunch of domain specific problems one is facing and if one did the extensibility correctly, all extensions written would act as just another framework. diff --git a/_posts/2009/01/xna-workshop-at-metu-turkey/index.md b/_posts/2009/01/xna-workshop-at-metu-turkey/index.md new file mode 100644 index 0000000..205fcdb --- /dev/null +++ b/_posts/2009/01/xna-workshop-at-metu-turkey/index.md @@ -0,0 +1,10 @@ +--- +title: "Xna workshop at METU - Turkey" +date: "2009-01-23" +--- + +On the 9th of February till the 13th of February, I will be holding a workshop at [Middle East Technical University](http://www.metu.edu.tr/) for Microsoft Turkey. The workshop will focus on game programming with the use of Xna 3.0. + +The workshop will be similar to the [workshop I held last year](/post/2008/04/23/XNA-Workshop-at-METU-in-Ankara-Turkey.aspx), but with more focus on Xbox 360 development and more indepth. + +After the workshop I will be posting the content and hopefully we'll get it all on video and post that as well. Can't wait to get down there and hold the workshop, it was really great doing it last year. diff --git a/_posts/2009/02/down-to-earth-with-raymond-holmboe/images/cd_music1.png b/_posts/2009/02/down-to-earth-with-raymond-holmboe/images/cd_music1.png new file mode 100644 index 0000000..8c0f66d Binary files /dev/null and b/_posts/2009/02/down-to-earth-with-raymond-holmboe/images/cd_music1.png differ diff --git a/_posts/2009/02/down-to-earth-with-raymond-holmboe/images/flag_norway1.png b/_posts/2009/02/down-to-earth-with-raymond-holmboe/images/flag_norway1.png new file mode 100644 index 0000000..cd32360 Binary files /dev/null and b/_posts/2009/02/down-to-earth-with-raymond-holmboe/images/flag_norway1.png differ diff --git a/_posts/2009/02/down-to-earth-with-raymond-holmboe/images/podcast1.png b/_posts/2009/02/down-to-earth-with-raymond-holmboe/images/podcast1.png new file mode 100644 index 0000000..67e3abc Binary files /dev/null and b/_posts/2009/02/down-to-earth-with-raymond-holmboe/images/podcast1.png differ diff --git a/_posts/2009/02/down-to-earth-with-raymond-holmboe/index.md b/_posts/2009/02/down-to-earth-with-raymond-holmboe/index.md new file mode 100644 index 0000000..9e25142 --- /dev/null +++ b/_posts/2009/02/down-to-earth-with-raymond-holmboe/index.md @@ -0,0 +1,17 @@ +--- +title: "[Down to earth with Raymond Holmboe]" +date: "2009-02-24" +categories: + - "podcast" +--- + +This show Einar is having a relaxed time in his living room with Raymond Holmboe. We talk about how things are for an independent consultant. Raymond has a variety of interests ranging from game development to enterprise development. + +### + +
Norwegian
Download full MP3
Subscribe on iTunes
+ +**Notes** The intro and the outro music created by [Kim M. Jensen](http://www.audioplant.no/). Please do not hesitate to leave any comments on this post. If you have ideas for people you'd like to get interviewed, please leave a comment or contact me through the contact page. + + +![](http://img.zemanta.com/pixy.gif?x-id=66fce5df-f51b-4893-823a-96bf6beaaeed) diff --git a/_posts/2009/02/my-podcast-available-on-itunes/index.md b/_posts/2009/02/my-podcast-available-on-itunes/index.md new file mode 100644 index 0000000..3e417f7 --- /dev/null +++ b/_posts/2009/02/my-podcast-available-on-itunes/index.md @@ -0,0 +1,11 @@ +--- +title: "My podcast available on iTunes" +date: "2009-02-06" +--- + +Infrastructure for doing my podcasting was something I didn't think of before I started casting. + +Anyhow, my Podcast is now available through iTunes at the following [here](http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=304523653). +  + +Within a day or two it should get indexed and be searchable within the iTunes store as well. diff --git a/_posts/2009/02/progreaming/index.md b/_posts/2009/02/progreaming/index.md new file mode 100644 index 0000000..da2dd08 --- /dev/null +++ b/_posts/2009/02/progreaming/index.md @@ -0,0 +1,8 @@ +--- +title: "Progreaming" +date: "2009-02-22" +--- + +I guess everyone do a little daydreaming now and then, about anything they care about. For instance, sitting in a boring meeting and your mind starts to wander and you're thinking about your family, your friends, something fun you will do after work and what not. For us developers I think these daydreams have a tendency to lean towards programming tasks. Whenever I have a moment were I am not doing something useful, my mind wanders away and starts writing some really cool code for something. The code being written could be a project I am working on and I'm actually solving tasks that need to be solved, other cases the code being written is all glamorous and in some cases not theoretically possible to write. + + A little more than a week ago I was in Turkey and on several times found myself at a coffee place with some Turkish guys, on occasion they talked all Turkish, which is natural and my mind started to wander and programming something cool. The last day of my stay, I ended up in such a situation and sat there programming again until my mind started to wander even further and think about the concept of doing this disconnected programming. I needed a name for it, the idea of "Progreaming" was born, so from this point on I will refer to the concept as Progreaming. diff --git a/_posts/2009/02/wasd-turkey-2009-content/index.md b/_posts/2009/02/wasd-turkey-2009-content/index.md new file mode 100644 index 0000000..793bd67 --- /dev/null +++ b/_posts/2009/02/wasd-turkey-2009-content/index.md @@ -0,0 +1,30 @@ +--- +title: "WASD - Turkey 2009 content" +date: "2009-02-22" +categories: + - "net" + - "csharp" + - "xna" +--- + +From the 8th of February till the 13th of February I held a workshop in Turkey called "Workshop on Animation Simulation and Design" (WASD). The workshop was focused on game development using Microsoft Xna as the preferred platform. + +The first two days was dedicated to labs to get to know Xna from the bottom and up and aimed at developers with knowledge of C# and using Visual Studio 2008. + +I've made all the labs available as DOCX files to download from the links below: + +[Drawing Sprites](/Downloads/Turkey2009Content/Lab1_DrawingSprites.docx.zip) +[Moving Sprites](/Downloads/Turkey2009Content/Lab1b_MovingSprites.docx.zip) +[Rotating Sprites](/Downloads/Turkey2009Content/Lab1c_RotatingSprites.docx.zip) +[Game Component](/Downloads/Turkey2009Content/Lab2_GameComponents.docx.zip) +[Game Services](/Downloads/Turkey2009Content/Lab3_GameServices.docx.zip) +[Drawing a Cube](/Downloads/Turkey2009Content/Lab4_DrawingCube.docx.zip) +[Rotating a Cube](/Downloads/Turkey2009Content/Lab4b_RotatingCube.docx.zip) +[Enabling simple lighting](/Downloads/Turkey2009Content/Lab4c_EnablingSimpleLighting.docx.zip) +[Creating a camera service](/Downloads/Turkey2009Content/Lab4d_CreatingACameraService.docx.zip) +[Using keyboard as Input](/Downloads/Turkey2009Content/Lab4e_UsingKeyboardAsInput.docx.zip) +[Playing music](/Downloads/Turkey2009Content/Lab5_PlayingMusic.docx.zip) +[Playing sound effects](/Downloads/Turkey2009Content/Lab6_PlayingSoundEffects.docx.zip) +[Printing text](/Downloads/Turkey2009Content/Lab7_PrintingText.docx.zip) + +I'll be reorganizing these tutorials a bit and publish them directly to my blog in a few days as well. diff --git a/_posts/2009/03/interviewing-scott-hanselman-the-podcast-expert-above-experts/images/cd_music.png b/_posts/2009/03/interviewing-scott-hanselman-the-podcast-expert-above-experts/images/cd_music.png new file mode 100644 index 0000000..8c0f66d Binary files /dev/null and b/_posts/2009/03/interviewing-scott-hanselman-the-podcast-expert-above-experts/images/cd_music.png differ diff --git a/_posts/2009/03/interviewing-scott-hanselman-the-podcast-expert-above-experts/images/flag_usa.png b/_posts/2009/03/interviewing-scott-hanselman-the-podcast-expert-above-experts/images/flag_usa.png new file mode 100644 index 0000000..37178fc Binary files /dev/null and b/_posts/2009/03/interviewing-scott-hanselman-the-podcast-expert-above-experts/images/flag_usa.png differ diff --git a/_posts/2009/03/interviewing-scott-hanselman-the-podcast-expert-above-experts/images/movie.png b/_posts/2009/03/interviewing-scott-hanselman-the-podcast-expert-above-experts/images/movie.png new file mode 100644 index 0000000..7032e47 Binary files /dev/null and b/_posts/2009/03/interviewing-scott-hanselman-the-podcast-expert-above-experts/images/movie.png differ diff --git a/_posts/2009/03/interviewing-scott-hanselman-the-podcast-expert-above-experts/images/podcast.png b/_posts/2009/03/interviewing-scott-hanselman-the-podcast-expert-above-experts/images/podcast.png new file mode 100644 index 0000000..67e3abc Binary files /dev/null and b/_posts/2009/03/interviewing-scott-hanselman-the-podcast-expert-above-experts/images/podcast.png differ diff --git a/_posts/2009/03/interviewing-scott-hanselman-the-podcast-expert-above-experts/index.md b/_posts/2009/03/interviewing-scott-hanselman-the-podcast-expert-above-experts/index.md new file mode 100644 index 0000000..87aba68 --- /dev/null +++ b/_posts/2009/03/interviewing-scott-hanselman-the-podcast-expert-above-experts/index.md @@ -0,0 +1,35 @@ +--- +title: "[Interviewing Scott Hanselman – the podcast expert above experts]" +date: "2009-03-27" +categories: + - "net" + - "podcast" +--- + +Developers worldwide know Scott Hanselman and his podcasts. As one of the true community heroes of the web he has posted more than 150 podcasts covering a vast array of topics. Displaying developer skills he combines relevant stuff with humor when interviewing his subjects, making his podcasts enjoyable, useful and fun to listen to. I’ve been lucky enough to catch the busy Scott for an interview. Tune in and see how it went. + +It was originally recorded as a WebCast, so you'll find both the video and audio only here. + +### + +
English
Download full MP3
Subscribe on iTunes
Watch on YouTube #1#2#3 . Or download full MP4 here
+ + + +**Video #1** +\[youtube http://www.youtube.com/watch?v=\_gPrrAVzqSs&hl=en&fs=1\] +**Video #2 +\[youtube http://www.youtube.com/watch?v=hg\_bIcx2NAI&hl=en&fs=1\] +****Video #3 +\[youtube http://www.youtube.com/watch?v=VkQeSaEs0v0&hl=en&fs=1\] + +****Notes + +**The intro and the outro music created by [Kim M. Jensen](http://www.audioplant.no/). + + + +Please do not hesitate to leave any comments on this post. If you have ideas for people you'd like to get interviewed, please leave a comment or contact me through the contact page. + + +**![](http://img.zemanta.com/pixy.gif?x-id=808931cf-0bf4-8c5c-8499-c38d98b887fb)** diff --git a/_posts/2009/03/opencompiler-project/index.md b/_posts/2009/03/opencompiler-project/index.md new file mode 100644 index 0000000..95360ef --- /dev/null +++ b/_posts/2009/03/opencompiler-project/index.md @@ -0,0 +1,22 @@ +--- +title: "OpenCompiler project" +date: "2009-03-28" +--- + +Ever since I saw the capabilities of the Boo programming language and their eco-system, I've been constantly asking myself; Why don't we have these posibilities with C#. The ability to extend the language with macros or even further to give your code more expressiveness and solve domain specific limitations to the language itself, feels to me so natural and the correct path to go down. + +The concept is really not a new one, but with Boo they've made it more seemless and it feels more natural. C/C++ and other languages has had macros from day one, but they've been limited to just expand into their own context and not be able to modify anything. With Boo you get the oportunity to actually modify the entire AST tree during compilation. This is the feature I am really missing, if you wonder about why I want it, you can read [this post](/post/2008/11/03/Compiler-extensions-is-just-another-framework.aspx) or [this](/post/2009/01/05/Why-compiler-extensions-shouldnt-be-scary.aspx). + +With this as a backdrop, one sunday afternoon I found myself in front of the computer (no surprise there) and was pondering about this. I had looked at the Mono compiler for a while, to see if it was at all possible to sneak in the posibilities into that one. Then my crazy head started to think; what if I wrote my own, at least I could try - nothing to lose. So, I started looking around the net to get inspiration and to find good articles about how to write your own compiler - and I came across an article by Joel Pobar on [MSDN](http://msdn.microsoft.com/en-us/magazine/cc136756.aspx) that really inspired me and made me think it would be possible. + +After a couple of weeks of working on it, on and off, I figured out it was about to take shape and maybe, just maybe, it had a chance of surviving in the jungle of projects I tend to start up (but not finish). So, today I went to Codeplex and established a project with the catchy name of OpenCompiler (probably a million projects named this already. :) ) and uploaded the source thus far. You'll find the project [here](http://www.codeplex.com/opencompiler). + +**The road ahead** +So far, what the compiler is able to do is to recognize most of the C# grammar in the scanning phase of the lifecycle. This is converted to something that the parser can understand and make more sense of. The parser then builds the AST tree consisting of all the things that can be generated for the IL code. The last week I've been working on making the AST tree complete with regards to which elements needed. + +So far, this is at a level were I am still hoping it is possible to do this. My main doubts are not with regards to wether or not it is technical possible, but will it be a project that is doable in the sense that I can spend enough time on it to actually make a version 1.0. Time will tell. I've decided to focus my sparetime energy these days on this project, because I think it is important - and it will ultimately make the code I write from day to day look better and more expressive. + +I'll be posting more details about the project as I work on it, to document what I'm thinking and how I want to things, hopefully I'll get some input from the ones reading the posts to guide me in the right direction. This is the first time ever I try to write a compiler of this magnitude. + + +![](http://img.zemanta.com/pixy.gif?x-id=2f4be536-94bb-817b-ad67-6ababd54a24d) diff --git a/_posts/2009/03/turning-the-table-around/images/cd_music1.png b/_posts/2009/03/turning-the-table-around/images/cd_music1.png new file mode 100644 index 0000000..8c0f66d Binary files /dev/null and b/_posts/2009/03/turning-the-table-around/images/cd_music1.png differ diff --git a/_posts/2009/03/turning-the-table-around/images/flag_norway.png b/_posts/2009/03/turning-the-table-around/images/flag_norway.png new file mode 100644 index 0000000..cd32360 Binary files /dev/null and b/_posts/2009/03/turning-the-table-around/images/flag_norway.png differ diff --git a/_posts/2009/03/turning-the-table-around/images/podcast1.png b/_posts/2009/03/turning-the-table-around/images/podcast1.png new file mode 100644 index 0000000..67e3abc Binary files /dev/null and b/_posts/2009/03/turning-the-table-around/images/podcast1.png differ diff --git a/_posts/2009/03/turning-the-table-around/index.md b/_posts/2009/03/turning-the-table-around/index.md new file mode 100644 index 0000000..0ce4127 --- /dev/null +++ b/_posts/2009/03/turning-the-table-around/index.md @@ -0,0 +1,17 @@ +--- +title: "[Turning the table around]" +date: "2009-03-04" +categories: + - "podcast" +--- + +This show has an interesting turn of event, my previous guest; Raymond Holmboe, asked to turn the table and lead the show by interviewing me. We talk in general about software development and processes. + +### + +
Norwegian
Download full MP3
Subscribe on iTunes
+ +**Notes** The intro and the outro music created by [Kim M. Jensen](http://www.audioplant.no/). Please do not hesitate to leave any comments on this post. If you have ideas for people you'd like to get interviewed, please leave a comment or contact me through the contact page. + + +![](http://img.zemanta.com/pixy.gif?x-id=3a7bb766-0309-49f8-bf77-ff48dc6b94f4) diff --git a/_posts/2009/04/automating-and-robotizing-with-sondre-bjellas/images/cd_music.png b/_posts/2009/04/automating-and-robotizing-with-sondre-bjellas/images/cd_music.png new file mode 100644 index 0000000..8c0f66d Binary files /dev/null and b/_posts/2009/04/automating-and-robotizing-with-sondre-bjellas/images/cd_music.png differ diff --git a/_posts/2009/04/automating-and-robotizing-with-sondre-bjellas/images/flag_usa.png b/_posts/2009/04/automating-and-robotizing-with-sondre-bjellas/images/flag_usa.png new file mode 100644 index 0000000..37178fc Binary files /dev/null and b/_posts/2009/04/automating-and-robotizing-with-sondre-bjellas/images/flag_usa.png differ diff --git a/_posts/2009/04/automating-and-robotizing-with-sondre-bjellas/images/podcast.png b/_posts/2009/04/automating-and-robotizing-with-sondre-bjellas/images/podcast.png new file mode 100644 index 0000000..67e3abc Binary files /dev/null and b/_posts/2009/04/automating-and-robotizing-with-sondre-bjellas/images/podcast.png differ diff --git a/_posts/2009/04/automating-and-robotizing-with-sondre-bjellas/index.md b/_posts/2009/04/automating-and-robotizing-with-sondre-bjellas/index.md new file mode 100644 index 0000000..049feef --- /dev/null +++ b/_posts/2009/04/automating-and-robotizing-with-sondre-bjellas/index.md @@ -0,0 +1,27 @@ +--- +title: "[Automating and robotizing with Sondre Bjellås]" +date: "2009-04-24" +categories: + - "podcast" +--- + +Sondre Bjellås is a Microsoft Regional Director and is very keen on robots and automation.This talk we're amongst other things talking about robots and automation and how to get started. +**Due to a bad internet connection there are a couple of dropouts in the first couple of minutes.** + +During the talk, Sondre talks about a couple of web sites he has, the links can be found here: +[Morphy](http://morphi.me) +[Sondres Blog](http://sondreb.com) + +[Getting started with robotics](http://sondreb.com/blog/post/Getting-Started-with-Microsoft-RDS-and-Lego-NXT.aspx) +[A guide to programming sensors](http://sondreb.com/blog/post/Hot-in-here.aspx) + +[Getting started with continous integration](http://devshaped.com/2009/04/getting-started-with-continuous-integration/) + +### + +
English
Download full MP3
Subscribe on iTunes
+ +**Notes** The intro and the outro music created by [Kim M. Jensen](http://www.audioplant.no/). Please do not hesitate to leave any comments on this post. If you have ideas for people you'd like to get interviewed, please leave a comment or contact me through the contact page. + + +![](http://img.zemanta.com/pixy.gif?x-id=5ffd50c1-7a74-8dbd-a51a-69be87c248bb) diff --git a/_posts/2009/04/interviewing-mads-torgersen-language-program-manager-for-c-at-microsoft/images/cd_music1.png b/_posts/2009/04/interviewing-mads-torgersen-language-program-manager-for-c-at-microsoft/images/cd_music1.png new file mode 100644 index 0000000..8c0f66d Binary files /dev/null and b/_posts/2009/04/interviewing-mads-torgersen-language-program-manager-for-c-at-microsoft/images/cd_music1.png differ diff --git a/_posts/2009/04/interviewing-mads-torgersen-language-program-manager-for-c-at-microsoft/images/flag_usa1.png b/_posts/2009/04/interviewing-mads-torgersen-language-program-manager-for-c-at-microsoft/images/flag_usa1.png new file mode 100644 index 0000000..37178fc Binary files /dev/null and b/_posts/2009/04/interviewing-mads-torgersen-language-program-manager-for-c-at-microsoft/images/flag_usa1.png differ diff --git a/_posts/2009/04/interviewing-mads-torgersen-language-program-manager-for-c-at-microsoft/images/movie.png b/_posts/2009/04/interviewing-mads-torgersen-language-program-manager-for-c-at-microsoft/images/movie.png new file mode 100644 index 0000000..7032e47 Binary files /dev/null and b/_posts/2009/04/interviewing-mads-torgersen-language-program-manager-for-c-at-microsoft/images/movie.png differ diff --git a/_posts/2009/04/interviewing-mads-torgersen-language-program-manager-for-c-at-microsoft/images/podcast1.png b/_posts/2009/04/interviewing-mads-torgersen-language-program-manager-for-c-at-microsoft/images/podcast1.png new file mode 100644 index 0000000..67e3abc Binary files /dev/null and b/_posts/2009/04/interviewing-mads-torgersen-language-program-manager-for-c-at-microsoft/images/podcast1.png differ diff --git a/_posts/2009/04/interviewing-mads-torgersen-language-program-manager-for-c-at-microsoft/index.md b/_posts/2009/04/interviewing-mads-torgersen-language-program-manager-for-c-at-microsoft/index.md new file mode 100644 index 0000000..170e164 --- /dev/null +++ b/_posts/2009/04/interviewing-mads-torgersen-language-program-manager-for-c-at-microsoft/index.md @@ -0,0 +1,49 @@ +--- +title: "[Interviewing Mads Torgersen – Language Program Manager for C# at Microsoft]" +date: "2009-04-08" +categories: + - "podcast" +--- + +C# has been around for almost ten years. In this interview, we're talking about the road that led to C# 1.0 and further down to C# 4.0. Mads talks about some of the things we will see in C# 4.0 and also some of the ideas for future versions. + +It was originally recorded as a WebCast, so you'll find both the video and audio only here. + +### + +
English
Download full MP3
Subscribe on iTunes
Watch on YouTube #1#2#3 . #4 . #5 . #6 . Or download full MP4 here
+ +**Video #1** + +\[youtube http://www.youtube.com/watch?v=P5xJoU-X1s8&hl=en&fs=1\] + +**Video #2** + +\[youtube http://www.youtube.com/watch?v=ZW5KzAhH7CM=en&fs=1\] + +**Video #3** + +\[youtube http://www.youtube.com/watch?v=lIKhVAGwl8M&hl=en&fs=1\] + +**Video #4** + +\[youtube http://www.youtube.com/watch?v=L8X5oNC9qvU&hl=en&fs=1\] + +**Video #5** + +\[youtube http://www.youtube.com/watch?v=dDsRpZ\_6mmY&hl=en&fs=1\] + +**Video #6** + +\[youtube http://www.youtube.com/watch?v=A2\_1vUrvJzE&hl=en&fs=1\] + +**Notes + +**The intro and the outro music created by [Kim M. Jensen](http://www.audioplant.no/). + +Please do not hesitate to leave any comments on this post. If you have ideas for people you'd like to get interviewed, please leave a comment or contact me through the contact page. + + + + +![](http://img.zemanta.com/pixy.gif?x-id=bfa0a244-eeab-8b9c-af70-7a122c7bfa6f) diff --git a/_posts/2009/04/nnug-vestfold-usergroup-meeting-29th-of-april-2009/index.md b/_posts/2009/04/nnug-vestfold-usergroup-meeting-29th-of-april-2009/index.md new file mode 100644 index 0000000..30f3493 --- /dev/null +++ b/_posts/2009/04/nnug-vestfold-usergroup-meeting-29th-of-april-2009/index.md @@ -0,0 +1,13 @@ +--- +title: "NNUG Vestfold - usergroup meeting, 29th of April 2009" +date: "2009-04-20" +--- + +Finally we got the time to organize another .net usergroup meeting here in Vestfold, Norway. + +This time around we've been lucky to get Tollef Slaathaug from [Baze Technology](http://www.bazetechnology.com/) to come and talk about their experience with creating a realtime dataengine for handling vast amount of data in .net. + +If you happen to be in Sandefjord this day and want to learn more, don't hesitate to sign up [here](http://www.nnug.no/Avdelinger/Vestfold/Moter/Brukergruppemote-onsdag-29-april-2009/). + + +![](http://img.zemanta.com/pixy.gif?x-id=9b635158-1aba-8a03-9af0-d996a6c40ad6) diff --git a/_posts/2009/04/revitalizing-balder/images/Parallels-DesktopScreenSnapz001.png b/_posts/2009/04/revitalizing-balder/images/Parallels-DesktopScreenSnapz001.png new file mode 100644 index 0000000..34a4114 Binary files /dev/null and b/_posts/2009/04/revitalizing-balder/images/Parallels-DesktopScreenSnapz001.png differ diff --git a/_posts/2009/04/revitalizing-balder/images/screenshot.png b/_posts/2009/04/revitalizing-balder/images/screenshot.png new file mode 100644 index 0000000..f0b854a Binary files /dev/null and b/_posts/2009/04/revitalizing-balder/images/screenshot.png differ diff --git a/_posts/2009/04/revitalizing-balder/index.md b/_posts/2009/04/revitalizing-balder/index.md new file mode 100644 index 0000000..ebf2693 --- /dev/null +++ b/_posts/2009/04/revitalizing-balder/index.md @@ -0,0 +1,35 @@ +--- +title: "Revitalizing Balder" +date: "2009-04-23" +categories: + - "net" + - "csharp" + - "gamedevelopment" +tags: + - "silverlight" +--- + +**UPDATE: 5th of May 2009, software rendering, read more [here](/post/2009/05/05/Software-rendering-in-Balder.aspx).** + +Its been a while since I've had the time to actually post new posts on my blog, there is a reason for that. I've been busy as a bee. I have 4 OpenSource projects I'm working on, besides having a fulltime job and having a family with 2 small children. So, blogging hasn't been on the top of my priority list. + +Anyways, during the easter holiday I got a lot of time on my hands to start working on the Balder project again. + +I ended up totally refactoring the entire engine, and during the process also started implementing some unit tests. +The result of the refactoring, or should I say rewrite (since the API has changed dramatically) - is that I've had a speed boost that is very dramatic. I haven't gotten around to do a complete comparison of the previous code and the new, but just firing up a 3D model, you'll be able to see it with your naked eyes. + +During the rewrite, I made the engine open for any target - meaning that it is now possible to target other targets than Silverlight if you'd like, introducing an abstraction for all device specifics. We are talking about creating an XNA version and a OpenGL version for running on Mono. Also, [Petri Wilhelmsen](http://digierr.spaces.live.com/), has joined the team and will start hacking away on the code very soon. + +For now, I've had to remove a couple of the features that was in the first version, such as Texture mapping, this will resurface very very soon again. Our focus now is to create the material system. + +Also, tutorials and samples are something we're looking into creating more of. With the new API it is really simple to get started, so look out for that as well. + +The entire project can be found at [CodePlex](http://www.codeplex.com/Balder). + +A demo can be found [here](http://localhost:8080/silverlight/Balder/20090423/TestPage.html). + +![](images/screenshot.png). + +![](images/Parallels-DesktopScreenSnapz001.png)![](images/Parallels-DesktopScreenSnapz001.png) + +![](http://img.zemanta.com/pixy.gif?x-id=86bd58a6-bd15-8cd5-883d-972e79c1538c) diff --git a/_posts/2009/05/another-chapter/index.md b/_posts/2009/05/another-chapter/index.md new file mode 100644 index 0000000..6b846cd --- /dev/null +++ b/_posts/2009/05/another-chapter/index.md @@ -0,0 +1,14 @@ +--- +title: "Another chapter" +date: "2009-05-29" +categories: + - "personal" +--- + +Today was the last day for me over at Objectware. It was a day I have dreaded somehow for a while. I really loved it at Objectware. Due to the fact that it is about 2 hours by bus or train away from where I live, it got to be too much of a strain on my family. I got an opportunity some months back to join a company called [Bouvet](http://www.bouvet.no) and join them on establishing in my town; Sandefjord. So the choice was kind of obvious and at the same time gave me a bit of sadness. On average I've been holding jobs for some 3-4 years before changing, and everytime its been because I wanted to, for personal growth. But family has to come first, even though it was short run (some 8 months). Still, it feels kind of odd, leaving a place I got fond of with great colleagues and very fun projects. + +I must take this time to thank Objectware for giving me the opportunity - I've had great personal growth and has had really fun challenges and projects. And the colleagues impresses me with their great knowledge and commitment to the job. Kudos! + +15th of June, I'll be starting at [Bouvet](http://www.bouvet.no) - looking forward for new challenges. + +Until then, I'll be sunbathing in Spain, enjoying some time off with my kids and wife. diff --git a/_posts/2009/05/balder-gets-its-long-awaited-texture-support/images/screenshot.png b/_posts/2009/05/balder-gets-its-long-awaited-texture-support/images/screenshot.png new file mode 100644 index 0000000..541fe0e Binary files /dev/null and b/_posts/2009/05/balder-gets-its-long-awaited-texture-support/images/screenshot.png differ diff --git a/_posts/2009/05/balder-gets-its-long-awaited-texture-support/index.md b/_posts/2009/05/balder-gets-its-long-awaited-texture-support/index.md new file mode 100644 index 0000000..fa875a2 --- /dev/null +++ b/_posts/2009/05/balder-gets-its-long-awaited-texture-support/index.md @@ -0,0 +1,84 @@ +--- +title: "Balder gets its long awaited texture support" +date: "2009-05-19" +categories: + - "net" + - "3d" + - "csharp" + - "gamedevelopment" +tags: + - "silverlight" +--- + +**UPDATE, July 5th 2009: read about Silverlight 3 optimizations [here](/post/2009/06/22/Balder-Silverlight-3-2b2b.aspx) and the alpha release [here](/post/2009/06/27/Balder-reaches-alpha-release.aspx).**  + +Ever since I started the Balder project back in 2007, the main goal has always been to get proper texturemapping support in the engine. At one point I had it all up and running by utilizing the Silverlight Matrix transformations for the brush used to make it scale and skew according to the given texture coordinates. + +The problem was speed. I never really figured out what the speed issue was, but I guess the architecture of Silverlight was never built with 3D graphics in mind.  + +With the new [software rendering technique](/post/2009/05/05/Software-rendering-in-Balder.aspx) in place, it is a lot easier to get different drawing techniques up and running. One drawback we ran into when doing everything with "software", we can't utilize the imaging support, such as the PNG decoder that Silverlight has built in, there is no way to get hold of the pixel data. So, the first thing we needed is to have a C# decoder og image data and we started off with PNG. Looking for an existing PNG decoder entirely written in managed code (C# preferably) turned out to be quite an interesting task. After some time googling, I finally came across a project called [PR2](http://sourceforge.net/projects/pr2/) that has something called SharpPNG. After bending the code a bit, I got it running in a more generic way and put it in the Balder repository (with all credits intact - ofcourse). + +After getting the image loading in place, it was off to write the texturemapping support. With the generic implementation we have for doing triangle drawings at the moment, the task ended up being quite simple. +A snippet from the SimpleSpanRenderer as an illustration: + +\[code:c#\] +        public void Texture(IBuffers buffer, Span span, Image image, ImageContext texture) +        { +            var spreadCount = span.XEnd - span.XStart; +            TextureInterpolator.SetPoint(0, span.ZStart, span.ZEnd); +            TextureInterpolator.SetPoint(1, span.UStart, span.UEnd); +            TextureInterpolator.SetPoint(2, span.VStart, span.VEnd); +            var yOffset = span.Y \* buffer.Display.Stride; +            var rOffset = buffer.Display.RedPosition; +            var gOffset = buffer.Display.GreenPosition; +            var bOffset = buffer.Display.BluePosition; +            var aOffset = buffer.Display.AlphaPosition; +            var bufferOffset = yOffset + (span.XStart \* 4); +            var depthBufferOffset = (buffer.Width \* span.Y) + span.XStart; +            TextureInterpolator.Interpolate(spreadCount); +            +            for (var index = 0; index < spreadCount; index++) +            { +                var z = TextureInterpolator.Points\[0\].InterpolatedValues\[index\]; +                var bufferZ = (UInt32)(z \* (float)UInt32.MaxValue); + + +                var u = TextureInterpolator.Points\[1\].InterpolatedValues\[index\]; +                var v = TextureInterpolator.Points\[2\].InterpolatedValues\[index\]; + +                var intu = (int)(u\*image.Width)&(image.Width-1); +                var intv = (int)(v\*image.Height)&(image.Height-1); + +                var texel = ((intv\*image.Width) + intu)\*4; + + +                if (bufferZ < buffer.Depth\[depthBufferOffset\] && +                    z >= 0f && +                    z < 1f +                    ) +                { +                    buffer.Display\[bufferOffset + rOffset\] = texture.Bytes\[texel + 1\]; +                    buffer.Display\[bufferOffset + gOffset\] = texture.Bytes\[texel + 2\]; +                    buffer.Display\[bufferOffset + bOffset\] = texture.Bytes\[texel\]; +                    buffer.Display\[bufferOffset + aOffset\] = texture.Bytes\[texel + 3\]; + +                    buffer.Depth\[depthBufferOffset\] = bufferZ; +                } + +                bufferOffset += 4; +                depthBufferOffset++; +            } +        } +\[/code\] + +Finally we had to add support for materials in the ASE file loader, I ended up spending too much time trying to figure out a good way to do it with regular expression, ending up with also adding a project by [Joshua Flanagan](http://flimflan.com/blog/default.aspx) called [Readable Regular Expressions](http://flimflan.com/blog/ReadableRegularExpressions.aspx) in combination with [LINQ to RegEx](http://weblogs.asp.net/rosherove/archive/2008/05/06/introducing-linq-to-regex.aspx) by [Roy Osherove.](http://weblogs.asp.net/rosherove/) Both projects are now part of the Balder repository as well. The reason for adding them to the repository is for maintenance purposes, seeing that we're targeting Balder for multiple platforms. The better way would probably be to contribute to the projects so they had the modifications or support we need to have for Balder.  + +With all this in place, it was texturemania going on: + +  ![](images/screenshot.png) + +There is also experimental code in the Balder repository for doing spherical environment mapping. This will be part of the material system, so one does not have to think about it in the code. + +  ![](images/screenshot.png) + +You can see both demos in realtime [here](http://localhost:8080/silverlight/Balder/20090519/TestPage.html) and [here](http://localhost:8080/silverlight/Balder/20090519_EnvMap/TestPage.html). diff --git a/_posts/2009/05/silverlight-unit-test-runners-new-project-odin/index.md b/_posts/2009/05/silverlight-unit-test-runners-new-project-odin/index.md new file mode 100644 index 0000000..d2ad9cf --- /dev/null +++ b/_posts/2009/05/silverlight-unit-test-runners-new-project-odin/index.md @@ -0,0 +1,20 @@ +--- +title: "Silverlight Unit Test runners, new project -> Odin" +date: "2009-05-01" +categories: + - "net" + - "csharp" +tags: + - "silverlight" +--- + +I've been busy the last couple of nights doing a complete rewrite of my original SilverlightRunners project. +The reason for this was that the structure of the original project didn't agree with me, hard to write unit tests, bad structure - had the feeling of being rushed. Also, having the implementational details it had, stability was really bad. Another point was that I wanted to rebrand the project. + +The new project has been called Odin (yes, I know - what is going on with all this Norse Mythology fetish I seem to have..) and is located on [Codeplex.](http://odin.codeplex.com/) + +For the time being there is a 0.4 release, with an MSI file for easier installation. The current version only has limited support for running the unit tests through commandline.  I am working hard these days to complete the 0.5 release to have a feature full execution engine for running tests and full commandline support. Then I'll be moving on to recreating the resharper support, targetting R# 4.5. + + + +![](http://img.zemanta.com/pixy.gif?x-id=66c16d81-2f68-851a-a522-292c3d7202a5) diff --git a/_posts/2009/05/software-rendering-in-balder/images/screenshot.png b/_posts/2009/05/software-rendering-in-balder/images/screenshot.png new file mode 100644 index 0000000..28791a5 Binary files /dev/null and b/_posts/2009/05/software-rendering-in-balder/images/screenshot.png differ diff --git a/_posts/2009/05/software-rendering-in-balder/images/shadedteapot.png b/_posts/2009/05/software-rendering-in-balder/images/shadedteapot.png new file mode 100644 index 0000000..16bf9c8 Binary files /dev/null and b/_posts/2009/05/software-rendering-in-balder/images/shadedteapot.png differ diff --git a/_posts/2009/05/software-rendering-in-balder/images/shadedtriangle.png b/_posts/2009/05/software-rendering-in-balder/images/shadedtriangle.png new file mode 100644 index 0000000..a95e4c3 Binary files /dev/null and b/_posts/2009/05/software-rendering-in-balder/images/shadedtriangle.png differ diff --git a/_posts/2009/05/software-rendering-in-balder/index.md b/_posts/2009/05/software-rendering-in-balder/index.md new file mode 100644 index 0000000..16a1521 --- /dev/null +++ b/_posts/2009/05/software-rendering-in-balder/index.md @@ -0,0 +1,37 @@ +--- +title: "\"Software\" rendering in Balder" +date: "2009-05-05" +categories: + - "net" + - "3d" + - "csharp" + - "gamedevelopment" +tags: + - "silverlight" +--- + +**UPDATE: 19th of may 2009 - Texture support is now added, read more [here](/post/2009/05/19/Balder-gets-its-long-awaited-texture-support.aspx).** + +We've been hard at work the last couple of weeks to bring Balder to a point where it can be useful, not only a proof of concept for prooving that 3D can be done in Silverlight. + +Our main challenge is to get a proper framerate in Silverlight. The reason for this is due to the architecture of Silverlight, there is a big cost in marshalling data between the CLR and the rendering/Xaml engine, so one has to try to limit this. Our initial plan was to generate all the polygon data needed in a 3D scene during initialization and then just turn the visibility on and off and modify the coordinates and color/brush information dynamically. Since a polygon is a dependency object and the properties we needed to modify was dependency properties, this sounded like a good plan, and it was. My [previous post](/post/2009/04/23/Revitalizing-Balder.aspx) showed a version using this technique, and we could get a decent framerate, but it was only flat shaded - no shading nor texturemapping. + +Our next goal was then to include what is known as gouraud shading, here we ran in to a bunch of issues. First of all, how could one simulate the effect of gouraud shading in Silverlight 2, when there is no brush that has this implemented. The brushes available in Silverlight are SolidBrush, LinearGradientBrush and RadialGradientBrush. After some experiments, I ended up getting a solution working using the RadialGradientBrush. The technique I used was to have 3 polygons representing every triangle, all with different radial brushes. The brushes hotspot/origin was then set to be on the 3 points representing the triangle and then have some magical calculation for generating the correct color values and alpha values for the gradients. The result was kinda nice, allthough not entirely correct rendering. + +![](images/shadedtriangle.png) + +I then started to implement it for the engine itself, but never finished it, the result before finishing it was this: + +![](images/shadedteapot.png) + +The reason for not finishing it was plain and simply speed. The FPS dropped from a solid 30 FPS to 5. We decided then that in order for this project to survive, we needed to do something dramatic. I started then to look at how we could draw using "software" - pixeldrawing in C#. In Silverlight 3, this would be a walk in the park, seeing that there is an ImageSource called WritableBitmap, in Silverlight 2, which is still our main goal, it is not all that straight forward to do. I remembered that I had seen samples of water effects, mandelbrot and such for Silverlight 2, and the technique being used is to generate a RAW PNG file on the fly every frame and streaming this into the BitmapImage source. [Joe Stegman](http://blogs.msdn.com/jstegman/) has an excellent implementation for this [here](http://blogs.msdn.com/jstegman/archive/2008/04/21/dynamic-image-generation-in-silverlight.aspx). But, being in a optimization mode, I found there was a couple of things in his solution that generated quite a bit of overhead. + +First of all, there is an EditableImage class holding the buffer one can draw to, this is then encoded into a new buffer. Another thing I found to be an overhead, was the usage of two different memorystreams during the encoding. Long story short, during the weekend I decided to create what I called a RawPngStream. It is a somewhat highly optimized stream that holds a buffer one can write to. The listing of the source is to big for this post, and to much details to go into - but you'll find it over at [CodePlex](http://www.codeplex.com/Balder) in the [Balder.Silverlight project](http://balder.codeplex.com/SourceControl/changeset/view/33679#412801). + +What we have done now is to introduce a general software rendering component, that is not targetting specifically Silverlight - in fact, we created it for Windows Forms first - seeing that it was easier to get things up and running there first. The last thing we've done is to implement the Silverlight specifics, with the framebuffer handling and all. The result, with a few inaccuracies in the polygon routine for now, is as follows. + +A demo can be found [here](http://localhost:8080/silverlight/Balder/20090505/TestPage.html). + +![](images/screenshot.png) + +![](http://img.zemanta.com/pixy.gif?x-id=34bf492e-e025-833b-a722-f1fe7c80199b) diff --git a/_posts/2009/06/balder-reaches-alpha-release/index.md b/_posts/2009/06/balder-reaches-alpha-release/index.md new file mode 100644 index 0000000..9f7e9c7 --- /dev/null +++ b/_posts/2009/06/balder-reaches-alpha-release/index.md @@ -0,0 +1,15 @@ +--- +title: "Balder reaches alpha release" +date: "2009-06-27" +categories: + - "net" + - "3d" + - "csharp" + - "gamedevelopment" +tags: + - "silverlight" +--- + +We're closing in a version 1.0 release of Balder, for the moment we're at Alpha and we decided to put out a release on the Balder codeplex site for everyone to start working with. + +The release can be found [here](http://balder.codeplex.com/Release/ProjectReleases.aspx#ReleaseFiles). In addition we've started on a getting started guide as well to get you up and running pretty quick, it is located [here](http://balder.codeplex.com/Wiki/View.aspx?title=GettingStarted&referringTitle=Home). diff --git a/_posts/2009/06/balder-silverlight-2-poll/index.md b/_posts/2009/06/balder-silverlight-2-poll/index.md new file mode 100644 index 0000000..46a64db --- /dev/null +++ b/_posts/2009/06/balder-silverlight-2-poll/index.md @@ -0,0 +1,14 @@ +--- +title: "Balder - Silverlight 2 poll" +date: "2009-06-20" +categories: + - "net" + - "3d" + - "gamedevelopment" +tags: + - "silverlight" +--- + +We've just added Silverlight 3 support for Balder and at the moment we have support for both Silverlight 2 and 3. As developers we'd love to just have support for one version, but we've opened up a poll for people to cast there vote if support for Silverlight 2 is critical. + +Please go [here](http://balder.codeplex.com/WorkItem/View.aspx?WorkItemId=13513) and cast your vote and also please leave a note as to why this is critical for you. diff --git a/_posts/2009/06/balder-silverlight-3/images/screenshot.png b/_posts/2009/06/balder-silverlight-3/images/screenshot.png new file mode 100644 index 0000000..a1a4af4 Binary files /dev/null and b/_posts/2009/06/balder-silverlight-3/images/screenshot.png differ diff --git a/_posts/2009/06/balder-silverlight-3/index.md b/_posts/2009/06/balder-silverlight-3/index.md new file mode 100644 index 0000000..af2e1cd --- /dev/null +++ b/_posts/2009/06/balder-silverlight-3/index.md @@ -0,0 +1,30 @@ +--- +title: "Balder - Silverlight 3 ++" +date: "2009-06-22" +categories: + - "net" + - "3d" + - "gamedevelopment" +tags: + - "silverlight" +--- + +**UPDATE, 12th of February 2010, Balder 0.8.8.6 is out, take a look at the sample browser [here](http://localhost:8080/silverlight/Balder/20100208/TestPage.html) - read more about the new features [here](/post/2010/02/08/Balder-0886-is-out.aspx).** + +We've been hard at work on Balder lately, with getting Silverlight 3 support up and running, optimizations and bugfixes. + +Uptil this last week, we were focused on getting the most juice out of Silverlight2 before thinking about Silverlight 3, meaning a lot of work on the PNG streaming feature to get it just right and exploit multithreading to achieve parallelism in the pipeline. The result was a framerate boost that gave the test scene we're running a pretty steady 35 FPS. With the introduction of Silverlight 3 and its WriteableBitmap, things are looking up quite a bit for getting quite acceptable framerates. Only problem we've got now, is that the scale has tipped a bit. With SL2 we had to focus on the last part of the rendering pipeline, namely getting the pixels to the plugin from the managed buffers. With SL3 and the speed we're seeing with the usage og WriteableBitmap, we need to go back and optimize other parts of the rendering pipeline to get the framerates we want.  + +The current rendering technique has a lot to be desired as for optimizations, it was "thrown" together more as a proof of concept, we're now hard at work with a new technique that will enable us to really not draw more than we need to and be able to run more complex scenes. + +Silverlight 3 samples: + +Only shading: + +![](images/screenshot.png) + +Environment mapped: + +![](images/screenshot.png) + +You'll find the samples [here](http://localhost:8080/silverlight/Balder/20090622/TestPage.html) and [here](http://localhost:8080/silverlight/Balder/20090622_EnvMap/TestPage.html) diff --git a/_posts/2009/07/balder-silverlight-3-optimization-round-1/images/baldertriplebufferingflow.png b/_posts/2009/07/balder-silverlight-3-optimization-round-1/images/baldertriplebufferingflow.png new file mode 100644 index 0000000..6c9fd9b Binary files /dev/null and b/_posts/2009/07/balder-silverlight-3-optimization-round-1/images/baldertriplebufferingflow.png differ diff --git a/_posts/2009/07/balder-silverlight-3-optimization-round-1/images/screenshot.png b/_posts/2009/07/balder-silverlight-3-optimization-round-1/images/screenshot.png new file mode 100644 index 0000000..52d156e Binary files /dev/null and b/_posts/2009/07/balder-silverlight-3-optimization-round-1/images/screenshot.png differ diff --git a/_posts/2009/07/balder-silverlight-3-optimization-round-1/index.md b/_posts/2009/07/balder-silverlight-3-optimization-round-1/index.md new file mode 100644 index 0000000..1b83567 --- /dev/null +++ b/_posts/2009/07/balder-silverlight-3-optimization-round-1/index.md @@ -0,0 +1,28 @@ +--- +title: "Balder Silverlight 3 optimization - round 1" +date: "2009-07-27" +categories: + - "net" + - "3d" + - "balder" + - "gamedevelopment" +tags: + - "silverlight" +--- + +Working with Balder really gets me nostalgic. Nowadays, working with graphics programming one would choose OpenGL, DirectX or Xna to get real performant. Back in the days (mid 1990s), we didn't have the luxury of high-speed CPUs and dedicated 3D accelerated graphics adapters. Everything had to be done by the CPU. Balder has turned out to be just that kind of project, everything is done by the CLR and then the CPU. + +Balder is now closing in on the beta stage, which means that we're getting close to the featureset we want to have for version 1 of the engine. While completing the features for the engine, we're also dabbling a little bit with optimizations. The true optimizations will happen in the final stages between beta and release, but its natural while working with features to increase performance on some parts of the engine. We've only scratched the surface of what is possible to optimize, the potential is great. + +The first optimization we did was a couple of weeks ago, when getting Balder ready for Silverlight 3. Silverlight 3 introduces something called WriteableBitmap which gives access to a pixel buffer that can be manipulated pixel by pixel. After seeing the results from René Schultes [speed tests,](http://kodierer.blogspot.com/2009/07/silverlight-3-writeablebitmap.html) its obvious that WriteableBitmap is the right choice for the job, allthough I put quite a bit of work into the Png streamer. + +Over the course of this weekend, I managed to get quite a bit of work done - focusing on optimizations. One of the focus areas we've been having is to get things running in parallel. Silverlight has great threading capabilities and are able to utilize multiple CPU cores very efficiently. In the release version of Silverlight 3, Microsoft has allowed for cross thread access to the pixels in a WriteableBitmap. This is good news for us. The previous version, the 0.8 alpha version, had one thread doing all the job. This was not exploiting the posibilities, and left the CPU pretty much doing nothing half the time. The new solution has 3 buffers and 4 threads, one thread for syncronizing all the work being done and one for each of the buffers. The buffers has special purpose; one for clearing, one for rendering and one for showing - showing being the copying of pixeldata to a WriteableBitmap.  + +The flow is as follows:  + +![](images/baldertriplebufferingflow.png) +In addition to this, the rendering is no longer working on bytes for every color component, but writes an entire 32 bit int to the buffer for every pixel. These optimizations has truely paid off, on my computer with the regular teapot test (about 1000 polys), gives a framerate between 50 and 60. This is promising, considering we've hardly started optimizing at all. + +A demo can be found [here](http://localhost:8080/wp-content/2009/07/TestPage.html). It should look something like this: + +![](images/screenshot.png) diff --git a/_posts/2009/07/balder-silverlight-3-rtw-support/images/screenshot.png b/_posts/2009/07/balder-silverlight-3-rtw-support/images/screenshot.png new file mode 100644 index 0000000..8c96ae1 Binary files /dev/null and b/_posts/2009/07/balder-silverlight-3-rtw-support/images/screenshot.png differ diff --git a/_posts/2009/07/balder-silverlight-3-rtw-support/index.md b/_posts/2009/07/balder-silverlight-3-rtw-support/index.md new file mode 100644 index 0000000..67be785 --- /dev/null +++ b/_posts/2009/07/balder-silverlight-3-rtw-support/index.md @@ -0,0 +1,19 @@ +--- +title: "Balder - Silverlight 3 - RTW Support" +date: "2009-07-14" +categories: + - "net" + - "3d" + - "gamedevelopment" +tags: + - "silverlight" +--- + +Balder has been updated to support Silverlight 3 the release version. + +The previous samples posted [here](/post/2009/06/22/Balder-Silverlight-3-2b2b.aspx) now works with the release version. +You can find the samples directly [here](http://localhost:8080/silverlight/Balder/20090622/TestPage.html) and [here](http://localhost:8080/silverlight/Balder/20090622_EnvMap/TestPage.html). And I've also created a version that just shows off that the texturemapping is very real, it can be found [here](http://localhost:8080/silverlight/Balder/20090622_TextureMap/TestPage.html). :) + +We're working on new demos to truely show off Balder - its feature richness and capabilities are way beyond a rotating teapot. But focus on getting everything right in the engine has taken away energy to create a proper demo. Fear not, it will come. Stay tuned. + +![](images/screenshot.png) diff --git a/_posts/2009/07/extensions-and-helpers-for-silverlight-and-wpf/index.md b/_posts/2009/07/extensions-and-helpers-for-silverlight-and-wpf/index.md new file mode 100644 index 0000000..8d8bb7e --- /dev/null +++ b/_posts/2009/07/extensions-and-helpers-for-silverlight-and-wpf/index.md @@ -0,0 +1,23 @@ +--- +title: "Extensions and Helpers for Silverlight and WPF" +date: "2009-07-11" +categories: + - "net" + - "csharp" + - "wpf" +tags: + - "silverlight" +--- + +Earlier I posted about some extensions I did for Silverlight handling INotifyPropertyChanged and helpers for DependencyProperties. Recently I've had a couple of request to release a downloadable source with samples of their use. Since the original posts (found [here](/post/2009/01/09/DependencyProperties-why-art-though-%28so-much-hassle%29.aspx) and [here](/post/2008/12/11/INotifyPropertyChanged-revisited.aspx)), I've refined them a little bit and worked out some quirks that was left in the originals. + +So, why should one use these kind of extensions and what do they solve? + +INotifyPropertyChanged and creating DependencyProperties rely on the usage of literals. When for instance notifying the PropertyChanged event with a change on a particular property, the argument one passes in is the literal holding the name of the property. This is bad for at least a couple of reasons: + +- Refactoring goes out the window - renaming the property means renaming the literals by hand +- Obfuscation - if one were to obfuscate the code, literals will still stay the same but your propertynames will change - your code is broken + +I've wrapped it all in a nice download with both a Silverlight and a WPF version of the code (actually pretty much the same code, you'll find #if(SILVERLIGHT) #else #endif statements where specifics are needed). Also in the download, you'll find a Silverlight sample with a usercontrol implementing a dependencyproperty and a data object using the INotifyPropertyChanged extensions. In addition to this, there are a few other nifty helper classes and extensions for other aspects of both Silverlight and WPF development. Hope you'll find it handy. + +The download can be found [here](/Downloads/DoLittle.Common.zip). diff --git a/_posts/2009/07/focus-focus-focus/index.md b/_posts/2009/07/focus-focus-focus/index.md new file mode 100644 index 0000000..c973c72 --- /dev/null +++ b/_posts/2009/07/focus-focus-focus/index.md @@ -0,0 +1,17 @@ +--- +title: "Focus focus focus" +date: "2009-07-11" +categories: + - "personal" +--- + +The last year I've been close to having a split personality when it comes to the projects I've been working on. On my last count, I have 4 active CodePlex projects that I've created myself, and 4 more that I'm a member of: + +[Balder](http://balder.codeplex.com) +[Bifrost](http://bifrost.codeplex.com) +[Odin](http://odin.codeplex.com) +[OpenCompiler](http://opencompiler.codeplex.com) + +I decided a couple of months ago that I will pick one project and focus on it only for now, instead of spreading my attention thin with working one hour here and there on different projects. The choice was kind of obvious on my part, Balder got my attention for now. My reasons for choosing that particular project as my main focus, are many. First of all, it is the most mature of the 4 mentioned above, secondly, it is truly something I love doing - graphics programming has always been close to my heart. We're now running the last leg on Balder to get to a version 1.0 release. When this release is out I will continue on one of the other projects. I haven't decided on which one yet, but my money is on OpenCompiler - creating compiler extensibility for C#. + +So, for anyone holding their breath for any features or bug fixes put into anything else than Balder for the next couple of months, start breathing again. :) diff --git a/_posts/2009/07/getting-realtime-data-from-tollef-slaathaug/images/cd_music.png b/_posts/2009/07/getting-realtime-data-from-tollef-slaathaug/images/cd_music.png new file mode 100644 index 0000000..8c0f66d Binary files /dev/null and b/_posts/2009/07/getting-realtime-data-from-tollef-slaathaug/images/cd_music.png differ diff --git a/_posts/2009/07/getting-realtime-data-from-tollef-slaathaug/images/flag_usa.png b/_posts/2009/07/getting-realtime-data-from-tollef-slaathaug/images/flag_usa.png new file mode 100644 index 0000000..37178fc Binary files /dev/null and b/_posts/2009/07/getting-realtime-data-from-tollef-slaathaug/images/flag_usa.png differ diff --git a/_posts/2009/07/getting-realtime-data-from-tollef-slaathaug/images/podcast.png b/_posts/2009/07/getting-realtime-data-from-tollef-slaathaug/images/podcast.png new file mode 100644 index 0000000..67e3abc Binary files /dev/null and b/_posts/2009/07/getting-realtime-data-from-tollef-slaathaug/images/podcast.png differ diff --git a/_posts/2009/07/getting-realtime-data-from-tollef-slaathaug/index.md b/_posts/2009/07/getting-realtime-data-from-tollef-slaathaug/index.md new file mode 100644 index 0000000..8b56446 --- /dev/null +++ b/_posts/2009/07/getting-realtime-data-from-tollef-slaathaug/index.md @@ -0,0 +1,29 @@ +--- +title: "[Getting realtime data from Tollef Slaathaug]" +date: "2009-07-03" +categories: + - "net" + - "podcast" +--- + +Tollef Slaathaug is a senior developer at Baze Technology, a software company based in Porsgrunn, Norway. Tollef has great experience with working with optimizations in .net code. This show we're talking about their project and how they have done things to get the desired performance. + +
English
Download full MP3
Subscribe on iTunes
+ +**Some irrelevant information** + +The recording of this show was done a little more than a month ago. Normally I use Oovoo to do the shows with persons sitting remote, it has excellent audio and video quality. This day, my freebie account had expired - instead of opening up a new account, which I should have done (twenty twenty heinsight and all), I decided to use Skype and found a 3rd party software that could intercept Skype calls and save the streams to disk. All nice, so far. + +Comes editing day; we had two takes, due to loss of connection and the application had therefore produced two AVI files. All good, at least I thought so. Turns out that it had created AVI files with multiple video and audio streams in them, two streams for video and two for audio, representing both cameras and microphones. Seemed reasonable enough. Only problem is that most editing software didn't figure this out. On top of this, it had used Microsoft MPEG4 for video and audio was supposedly in WMA format, but most applications didn't recognize it. + +Anyhow, weeks went by, I went on a holiday, came back and was ready to start editing again. I figured I'd use GraphEdit that was part of the DirectShow and later in the DirectX SDK. Turns out it wasn't there anymore. Googled away and found someone who had created a nice version themselves of it and created a graph and got all the streams out into separate files. I felt really proud of myself. + +It was finally time to get it all into GarageBand and edit and get it all out. Trouble was not over. The application I used that hooked into Skype and streamed it all to disk had done something quite interesting. All the four streams I was sitting with had all different framerates, and some pretty obscure framerates as well (30.118 and such). So getting this in there was not something it would cope with. + +Long story short, invoking some 10 audio and video tools, I managed to extract the audio in a sensible manner and editing could finally start. + +Lesson learned: be wary of nifty tools found, check references. :) + +**Notes** The intro and the outro music created by [Kim M. Jensen](http://www.audioplant.no/). Please do not hesitate to leave any comments on this post. If you have ideas for people you'd like to get interviewed, please leave a comment or contact me through the contact page. + +![](http://img.zemanta.com/pixy.gif?x-id=5ffd50c1-7a74-8dbd-a51a-69be87c248bb) diff --git a/_posts/2009/07/norwegian-silverlight-mvps/index.md b/_posts/2009/07/norwegian-silverlight-mvps/index.md new file mode 100644 index 0000000..4c2442e --- /dev/null +++ b/_posts/2009/07/norwegian-silverlight-mvps/index.md @@ -0,0 +1,12 @@ +--- +title: "Norwegian Silverlight MVPs" +date: "2009-07-03" +tags: + - "silverlight" +--- + +2nd of July 2009, [Jonas Follesø](http://jonas.follesoe.no) got awarded the Silverlight MVP, congratulations to him. That is the second Silverlight MVP in Norway, we must be doing something right in this small country. :) + +The second Silverlight MVP in Norway is actually me.  I've forgotten to announce it myself, but I was transferred to from being a Xna/DirectX MVP to become a Silverlight MVP a couple of months ago. + +Again, congratulations to Jonas, well deserved! diff --git a/_posts/2009/07/optimizing-parallels-virtual-machines-for-net-development/images/parallels1.png b/_posts/2009/07/optimizing-parallels-virtual-machines-for-net-development/images/parallels1.png new file mode 100644 index 0000000..7eaedeb Binary files /dev/null and b/_posts/2009/07/optimizing-parallels-virtual-machines-for-net-development/images/parallels1.png differ diff --git a/_posts/2009/07/optimizing-parallels-virtual-machines-for-net-development/index.md b/_posts/2009/07/optimizing-parallels-virtual-machines-for-net-development/index.md new file mode 100644 index 0000000..46982e7 --- /dev/null +++ b/_posts/2009/07/optimizing-parallels-virtual-machines-for-net-development/index.md @@ -0,0 +1,56 @@ +--- +title: "Optimizing Parallels virtual machines for .net development" +date: "2009-07-25" +categories: + - "apple" + - "general" +--- + +I've been a Mac owner for about a year now - it takes some time getting used to coming from a hard-core Windows mindset. My goal, entering this new stage, was to suck in all the experience possible from the platform and use Windows as little as possible, but being a .net developer, Mono and MonoDevelop does not quite cut it - so Visual Studio is needed to do proper .net development. With my first Mac I had a Boot Camp partition with Windows installed and used Parallels to access the same installation as well. This opened up a can of trouble when going back and forth between Boot Camp and Parallels because of drivers and such, not to mention Parallels services installed. After a while I figured it was probably better to have a dedicated virtual machine existing in a virtual image.  + +Several months later, I'm finally content with the speed of my installation. Here are my findings so far. + +**Stripped down Windows** +If you're like me, not using Windows for much - in my case I have basically 3 things installed; Visual Studio, SQL Server and SQL Server Management studio, you are probably better off having a stripped down Windows. This can be achieved in many ways. One way is to take a standard Windows installation and start disabling services and removing Windows features. Another way is to get something called TinyXP. TinyXP is a distribution, not from Microsoft, that has most features removed. There is a boot meny were you can chose what you want installed, and the bare minimum does not include internet explorer, mediaplayer or outlook express. Most "nice to have" services are disabled as well. You can also chose to install it without any driverpacks, to keep the size down. For a virtual machine were the hardware is constant, this is probably the best option. TinyXP as mentioned, does not come from Microsoft, so using it is most likely a violation of the license. Instead of using TinyXP, one can use a tool called [nLite](http://www.nliteos.com/) or [vLite](http://www.vlite.net/) if you prefer Vista. The tool allows you to take your existing XP or Vista install CD/DVD and select what features you want to include. When you're done, the tool will create a new installation CD/DVD for you. + +I prefer running Windows XP, as it has the basic featureset I need and Visual Studio and all versions of .net runs on it.  + +**SCSI vs IDE** +As with all VM software, Parallels also comes with an option of running the harddrive on an emulated IDE or SCSI bus, the default being IDE as this is more compatible and Windows has default drivers for handling this. My experience so far, is that running on SCSI gives a lot better performance, especially using Visual Studio. It doesn't matter what kind of physical disk you're having, you can still use SCSI even if your physical drive is IDE. For Windows XP you can't simply switch to SCSI by default. Windows XP detects the SCSI adapter to be a BusLogic one, and this one will crash during boot. So, the trick would be for instance to set your CDROM to be SCSI and leave your primary harddrive as IDE and then boot into Windows and go to the device manager and install the SCSI driver which is most likely marked with a question mark stating an error with it. The drivers are located on a floppy image located in /Library/Parallels/Tools/drivers.fdd - mount this in Parallels and install the drivers from the mounted floppy inside Windows XP. + +**Parallels options - Optimization** +In Parallels 4, there was great improvement to handling OSX caching. By default, OSX will enforce caching for any files used, meaning that your virtual harddrives could potentially eat up a lot of your memory when in use. On the optimization page, you should leave the "optimizate performance for" option on Virtual Machine, and I prefer to use the Adaptive Hypervisor. What this means, is that it will change focus between OSX and your Virtual Machine for utilizing the CPU and other resources. Also worth mentioning is to set the Better Perfomance option and untick the "Enable battery in virtual machine", that ensures full speed-ahead - allthough draining your battery. + +![](images/parallels1.png) + +**Shared Resources** +In Parallels there are several producitivity such as shared folders, shared user profile, shared applications, smart mount and such. My experience is that enabling Shared Profile and Shared Applications lags things a bit, so keeping these off will boost performance a bit. + +**CPU** +Parallels has the option of virtualization your diffferent cores, you can select how many cores you want to use for your virtual machine. I go with the number of cores I have (which is 2 on my Macbook Pro), there is quite a performance boost by doing so. + +**3D Acceleration + viewmode** +One of the neat features of Parallels introduced in Parallels 3 was the ability to support 3D acceleration. This is really nice if you're using any 3D software or playing games, but for doing software development this does not make any sense. In fact, it seems to slow down regular graphics a bit and if you're using software such as Blend or Visual Studio 2010 that relies on WPF (Windows Presentation Foundation), it seems to be even slower. My tip is to leave this off and just allocate enough memory to cope with your screen resolution, typically 16MB should be enough. + +Another thing that Parallels comes with is the ability to run in what is called a coherence viewmode. This makes your Windows applications appear as if they are a part of the OSX desktop and they float around like any other OSX window. This is great if you're in a multi monitor environment and want to keep some of your Windows windows on seperate monitors. But, there is a downside, performance wize. I prefer running in fullscreen, even if I run on a multi-monitor setup. + +**Sound, USB** +Since my Virtual Machines are primarily there to host Visual Studio, I have chosen to disable both sound and USB. Parallels supports virtualization of USB, meaning that the entire USB hub is available within the Virtual Machine and anything connected to any USB port can potentially be connected directly in the Virtual Machine. If you don't really need these, this is another performance boost. + +**Swap files** +This tip is more of a best practice regardless if you're running in a virtual machine or not; have a seperate partition or drive for your swap file(s). In Parallels I've chosen to have a seperate harddisk. This boosts performance quite a bit. + +**Fixed size disks** +By default Parallels creates growing disks, this is quite a bit slower than a fixed size disk. Since I have several virtual machines, I create my images with a fixed size and set them to the bare minimum, typically 8 or 10 GB and all my data is on a seperate virtual harddrive that all virtual machines share.  + +**Windows Services** +Even if I run on a stripped down Windows, some services are still left on after installation. Manually turning these off will increase performance of the Windows installation and use less memory, some of the services you might find running and might not need are: + +\* Image acquisition - typically used for scanners and such +\* Printing - I don't print from Windows, in fact I never print at all - environmental awareness +\* Firewall - I don't need it, I have a firewall on the OSX side already and run in Shared Network mode, besides I never surf the web on my Windows installations + +**Why don't you just buy a Windows machine?** +This is a question I get a lot. Well, there is no simple answer. At this point in time, I want to explore different things and don't get locked down. I must admit that the look and feel of Apple hardware is quite appealing as well. :)  Even though all of the above research has taken some time to figure out, it has been well worth spending the time. I now have the flexibility I want and can explore multiple operating systems, sure I could just install a "hackintosh" on a Virtual PC or something in Windows on a normal PC. I wanted the real deal and for now I'm content with the situation. + +There is probably a lot more performance tips out there - I am still digging in my quest to optimize everything to perfection, if you have further tips please leave me a comment. diff --git a/_posts/2009/07/problem-installing-programs-after-installing-visual-studio-2010-beta1/images/smiley-tongue-out.gif b/_posts/2009/07/problem-installing-programs-after-installing-visual-studio-2010-beta1/images/smiley-tongue-out.gif new file mode 100644 index 0000000..2075dc1 Binary files /dev/null and b/_posts/2009/07/problem-installing-programs-after-installing-visual-studio-2010-beta1/images/smiley-tongue-out.gif differ diff --git a/_posts/2009/07/problem-installing-programs-after-installing-visual-studio-2010-beta1/index.md b/_posts/2009/07/problem-installing-programs-after-installing-visual-studio-2010-beta1/index.md new file mode 100644 index 0000000..994ef52 --- /dev/null +++ b/_posts/2009/07/problem-installing-programs-after-installing-visual-studio-2010-beta1/index.md @@ -0,0 +1,16 @@ +--- +title: "Problem installing programs after installing Visual Studio 2010 beta1?" +date: "2009-07-15" +categories: + - "net" + - "general" + - "wpf" +--- + +I'm working on a WPF 4 project, targetting .net 4 and need to use Visual Studio 2010 beta1 for this. For now I've been handcoding all my Xaml (I know, the designer in VS2010 is quite good - but I kinda love doing Xaml), but I wanted to do some more advanced graphics and I am somewhat used to working with Blend for doing that. So I decided to download the Blend 3 Trial and get going. Only thing was that the installer kept saying "Another installation is in progress. You must complete that installation before continuing this one". I downloaded the [Windows Installer Cleanup Utility](http://support.microsoft.com/default.aspx?kbid=290301) , but it didn't solve anything. In fact, I couldn't install it even, since it was a Windows Installer, had to install it on another computer and copy the files. ![Tongue out](images/smiley-tongue-out.gif "Tongue out") + +The event viewer was referring to the 'VSTA\_IDE\_12590\_x86\_enu' component and a missing directory. This is a package installed by Visual Studio, called Microsoft Visual Studio for Applications 2.0.  + +Turns out, the solution is really simple. Just create the directory and try installing again, in my case I had to reboot and then do the installation of Blend.  + +And, by the way, if you want to open your project in Blend 3, you need to change the target framework to something that Blend recognize, 3.5 or less. Read more over at [Charles Sterling's blog](http://blogs.msdn.com/charles_sterling/archive/2009/05/21/running-blend-3-0-with-visual-studio-2010-beta1.aspx).For me, I must maintain a seperate .net 3.5 project for my frontend for working with Blend as I am targetting .net 4. diff --git a/_posts/2009/07/silverlight-3-writeablebitmap-changes-in-release/index.md b/_posts/2009/07/silverlight-3-writeablebitmap-changes-in-release/index.md new file mode 100644 index 0000000..cbeba6e --- /dev/null +++ b/_posts/2009/07/silverlight-3-writeablebitmap-changes-in-release/index.md @@ -0,0 +1,18 @@ +--- +title: "Silverlight 3 - WriteableBitmap changes in release" +date: "2009-07-14" +categories: + - "net" +tags: + - "silverlight" +--- + +I guess most of you already know that Silverlight 3 is out. Exciting times. Version is truely a remarkable release in the history so far of Silverlight. With it there are some changes in the API for you who have been working the the beta releases of Silverlight 3. The most noticable for me was the WriteableBitmap class. The WriteableBitmap can be used if you want to draw things yourself onto a surface that can be rendered by Silverlight. + +The first change lies with the constructor, previously it had an argument that told what type of pixelformat it should be in, this is now gone. + +Secondly you no longer have to lock and unlock in order to write to it, you simple index the new property called Pixels and after you're done you call invalidate. This makes a lot more sense. + +Third thing I notice is the SetSource() method, which I never seen before. I haven't had the chance to check it out yet, but I guess you don't have to be a rocket-scientist to know that it has the ability to take a stream source and stream the pixels into the bitmap.  + +All these changes are something that [Balder](http://balder.codeplex.com) will have great benefit from, initial testing seems that performance has gone up quite a bit and I believe there might be something to gain from streaming the pixels instead of the way we are doing things internally in Balder today. Updates has been made to Balder to work with the release version of Silverlight 3 - new release will be posted on Codeplex shortly. diff --git a/_posts/2009/08/3d-game-programming-book-with-focus-on-using-balder/index.md b/_posts/2009/08/3d-game-programming-book-with-focus-on-using-balder/index.md new file mode 100644 index 0000000..201c9e2 --- /dev/null +++ b/_posts/2009/08/3d-game-programming-book-with-focus-on-using-balder/index.md @@ -0,0 +1,15 @@ +--- +title: "3D Game programming book with focus on using Balder" +date: "2009-08-25" +categories: + - "net" + - "3d" + - "balder" + - "gamedevelopment" +tags: + - "silverlight" +--- + +Over the last 6-7 months we've been hard at work getting the Balder project up to speed, one of the motivational factors for working on the project has been a book project by [Gastón C. Hillar](http://www.packtpub.com/author_view_profile/id/280 "Gastón C. Hillar"). He started a journey on writing a 3D games development book for Silverlight and researched a few engines out there and landed on Balder to be the one for the book. His book is now being announced by [Packt Publishing](http://www.packtpub.com/) and will be coming out in both a paper version and an ebook version. We owe a lot of thanks to Gastón for trying out Balder at the different stages and coming with feedback during the development that has proven truely valuable. You can read more about the announcement [here](http://www.packtpub.com/3d-game-development-with-microsoft-silverlight-3-beginners-guide/book). + +If you want to learn more about game development on the Silverlight platform, be sure to pick up a copy when it hits the market! diff --git a/_posts/2009/08/balder-0-8-5-release-out/index.md b/_posts/2009/08/balder-0-8-5-release-out/index.md new file mode 100644 index 0000000..2578d6a --- /dev/null +++ b/_posts/2009/08/balder-0-8-5-release-out/index.md @@ -0,0 +1,25 @@ +--- +title: "Balder 0.8.5 release out" +date: "2009-08-01" +categories: + - "net" + - "3d" + - "balder" + - "gamedevelopment" +tags: + - "silverlight" +--- + +**Update 2nd of August 2009: If you downloaded the release before 10PM Central European Time (GMT+1) on the 2nd of August 2009, please download the new binaries again. Statistics code was left in the release that caused a serious drop in performance.** + +We've finally got an update for Balder that contains the optimizations and new features we've been working on lately. Its still withing the Alpha stage, so we're still adding some features. + +You can find it [here](http://balder.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=30944#ReleaseFiles). + +So, whats new? + +- Support for PNG and JPEG with all features supported by Silverlight 3 +- Support for Demoniak 3D XML format - 3DSMAX plugin can be found [here](http://www.ozone3d.net/wak/) +- Optimizations, multithreading - read more [here](/post/2009/07/27/Balder-Silverlight-3-optimization-round-1.aspx) +- General bugfixing and other optimizations +- Size reduction - no need for SharpZipLib anymore (this might come back for other reasons) diff --git a/_posts/2009/08/balder-in-the-news-sort-of/index.md b/_posts/2009/08/balder-in-the-news-sort-of/index.md new file mode 100644 index 0000000..a6405e7 --- /dev/null +++ b/_posts/2009/08/balder-in-the-news-sort-of/index.md @@ -0,0 +1,18 @@ +--- +title: "Balder in the news.. sort of.." +date: "2009-08-19" +categories: + - "net" + - "3d" + - "balder" + - "csharp" + - "gamedevelopment" +--- + +We're starting to get a little bit of publicity with regards to the Balder project, which of course can hardly ever be a bad thing. :) + +Gastón Hillar has just published an article on the [Dr.Dobbs](/admin/Pages/www.ddj.com) blog about Balder and the optimizations we've been working on the past couple of months. I think it is pretty much thanks to Gastón that Balder was revitalized earlier this year, and he has been very active with testing all the new bits we've been putting in and given us pin-pointers to were to start looking for optimizations and so on. A huge thanks to him for the article and the go-go-spirit in using Balder and giving us the kick in the behind we needed to get the engine to a more decent level. + +You can find the article [here](http://www.ddj.com/go-parallel/blog/archives/2009/08/balder_a_silver.html). + +Gastón has written a few books earlier that can be found over at [Packt Publishing](http://www.packtpub.com/). diff --git a/_posts/2009/08/how-to-clean-a-wireless-apple-keyboard/images/applekeyboard.jpg b/_posts/2009/08/how-to-clean-a-wireless-apple-keyboard/images/applekeyboard.jpg new file mode 100644 index 0000000..64b0104 Binary files /dev/null and b/_posts/2009/08/how-to-clean-a-wireless-apple-keyboard/images/applekeyboard.jpg differ diff --git a/_posts/2009/08/how-to-clean-a-wireless-apple-keyboard/index.md b/_posts/2009/08/how-to-clean-a-wireless-apple-keyboard/index.md new file mode 100644 index 0000000..d2e772e --- /dev/null +++ b/_posts/2009/08/how-to-clean-a-wireless-apple-keyboard/index.md @@ -0,0 +1,24 @@ +--- +title: "How to clean a wireless Apple keyboard" +date: "2009-08-24" +categories: + - "apple" +--- + +I was cleaning my MacBook Pro the other day and used a screen cleaning liquid and a cloth and figured I'd do the keyboad with the same treatment. Turned out however that I used a little bit too much fluid, some of the keys stopped working. I got somewhat sad and stressed out over it, I really love this keyboard. So I pulled out my electronics spray and figured it was a good cleaning tool for cleaning just about anything inside the keyboard, and the best part would be that it would vaporize completely. After my full treatment and having it dry for a couple of hours, the keyboard was completely dead. I was getting even more stressed. The keyboard was safely placed in a very dry room, with the hope that a couple of days would clear everything up and give me back my keyboard. No such luck. + +My next plan; rip out all the keys and see if I could figure out how to totally take the keyboard apart - there simply aren't any screws on the back. After some 10-15 keys I couldn't really see a happy ending, so I decided to put them all back.  + +At this point I was close to ordering a new one, and decided I had nothing to lose and put the keyboard in the dishwasher, no soap, 50 degrees centigrate. Ran for an hour and a half. Put it up for dry. + +Day 1 after the dishwasher, no life. +Day 2, lights worked. +Day 3, bluetooth came alive. +Day 4, some keys started working +Day 5, fully functional keyboard (I'm typing this post on it.. ) - me, very very happy. Saved me some 600 Norwegian Kroners ($95 or so).  + +For those who aren't familiar with the beauty I went through all this work for: + +![](images/applekeyboard.jpg) + +It was a crazy and interesting ride - and well worth it. :) diff --git a/_posts/2009/08/msdn-live-fall-2009/index.md b/_posts/2009/08/msdn-live-fall-2009/index.md new file mode 100644 index 0000000..08936c5 --- /dev/null +++ b/_posts/2009/08/msdn-live-fall-2009/index.md @@ -0,0 +1,28 @@ +--- +title: "MSDN Live - fall 2009" +date: "2009-08-26" +categories: + - "net" + - "wpf" +tags: + - "silverlight" +--- + +Microsoft Norway has a tradition for hosting 2 MSDN Live events every year, one in the spring timeframe and one in the fall. This year they're having it in Stavanger, Bergen, Trondheim and Oslo. + +The tour is kicked off in Stavanger on the 16th of September and is then moved on to Bergen on the 22nd and then Trondheim on the 24th, then concluding in Oslo on the 29th. This time around I will be part of the tour, which I'm really looking forward to. + +**Content** +Later this year Microsoft will be releasing a whole bunch of new technologies and products, and MSDN Live this time around will focus on these new technologies and how you can take advantage of them and what they will mean for you as a developer. The sessions will be on .net 4 + C#4, ASP.net 4, WPF 4 and Silverlight 3 (released earlier this year). + +**Speakers +**[Børge Hansen](http://borge3000.no/), also part of the last tour and did a great job then, he will not disappoint anyone this time around either. He will kick off everything with an introduction to Visual Studio 2010, .net 4 and C# 4. + +[Fredrik Kalseth](http://www.iridescence.no/), an ex-colleague of mine will focus on ASP.net 4. He is truely the one to show you new stuff in ASP.net 4, great developer and speaker! + +Myself; I will be doing a talk about WPF 4 and Silverlight 3. + +This tour will not have any Microsoft speakers, all independent content, custom created for the tour. + +**What are you waiting for? +**There really aren't any excuses for not joining this great tour. Great content. Sign up [here](http://microsoft.no/live) now. :) diff --git a/_posts/2009/09/balder-whats-up/index.md b/_posts/2009/09/balder-whats-up/index.md new file mode 100644 index 0000000..bb98281 --- /dev/null +++ b/_posts/2009/09/balder-whats-up/index.md @@ -0,0 +1,15 @@ +--- +title: "Balder - Whats up?" +date: "2009-09-12" +categories: + - "net" + - "3d" + - "balder" + - "gamedevelopment" +tags: + - "silverlight" +--- + +Some of you might have noticed that little to nothing has been done with Balder the last 30 days. Just want to check in and give you a heads up as to why. The reason is very simple, we've been really busy. We're two developers at the moment and both of us has had a handful at work, combined with running around doing different talks as well.  + +September will pretty much be the same, so we're scheduled to resume Balder work at the end of September 2009. Our goal is to have a version 1 out within the end of the year. diff --git a/_posts/2009/09/game-camp-user-group-meeting/index.md b/_posts/2009/09/game-camp-user-group-meeting/index.md new file mode 100644 index 0000000..a9533bb --- /dev/null +++ b/_posts/2009/09/game-camp-user-group-meeting/index.md @@ -0,0 +1,26 @@ +--- +title: "Game Camp User Group Meeting" +date: "2009-09-01" +categories: + - "net" + - "3d" + - "gamedevelopment" + - "xna" +tags: + - "silverlight" +--- + +On Thursday 3rd of September, we're having another Game Camp User Group meeting. As always, great content and nothing you should miss out on. + +We're hosting it, as always, in Oslo at NITH. + +The agenda consist of the following: +**18:00 - 19:00 +**  “Creating a game from A-Z” by Petri Wilhelmsen and Thomas Beswick +**19:15 - 20:15 +**  3D Game engine design by Einar Ingebrigtsen +**20:30 - 21:30 +**  How to get funding for creating games by Tumbleweed Interactive + +For detailed agenda and how to get there, please visit [Game Camp](http://gamecamp.no/blogs/news/archive/2009/08/27/game-camp-3-september-agenda.aspx). +Hope to see you there! diff --git a/_posts/2009/09/grownups-think-too-complicated/images/img_0119.jpg b/_posts/2009/09/grownups-think-too-complicated/images/img_0119.jpg new file mode 100644 index 0000000..9cc7522 Binary files /dev/null and b/_posts/2009/09/grownups-think-too-complicated/images/img_0119.jpg differ diff --git a/_posts/2009/09/grownups-think-too-complicated/index.md b/_posts/2009/09/grownups-think-too-complicated/index.md new file mode 100644 index 0000000..4425a7d --- /dev/null +++ b/_posts/2009/09/grownups-think-too-complicated/index.md @@ -0,0 +1,14 @@ +--- +title: "Grownups think too complicated" +date: "2009-09-05" +--- + +My 4 year old daughter loves to do creative things like drawing, clay-modelling and what not. Often she comes to me with something she has made for me to have, which I love and make me all warm.  + +Most of the time I can actually see what she has made, usually drawings of people and all she need to tell me is who she has drawn. The other day she came with a drawing to me that was a bit too abstract for me (and I am a developer who loves abstract code). + + ![](images/img_0119.jpg) + +My response was, like any parent, it was nice. And I paused for second and just needed to ask what it was a drawing of, searching for the hidden meaning. My daughter responded: Dad, they are just circles and lines and a big black box.   + +My conclusion is, I need to start thinking simpler about things. :) diff --git a/_posts/2009/10/balder-gets-declarative/index.md b/_posts/2009/10/balder-gets-declarative/index.md new file mode 100644 index 0000000..e369a18 --- /dev/null +++ b/_posts/2009/10/balder-gets-declarative/index.md @@ -0,0 +1,66 @@ +--- +title: "Balder gets declarative" +date: "2009-10-28" +categories: + - "net" + - "3d" + - "balder" + - "csharp" + - "gamedevelopment" + - "wpf" +tags: + - "silverlight" +--- + +We're getting closer to the BETA mark for Balder, and we're starting to get most of the features we want in for version 1 ready. The latest feature is the ability to declaratively through Xaml get Balder up and running. Current release is versioned 0.8.7 and can be found over at the [Balder](http://balder.codeplex.com) page at Codeplex. + +By adding the following namespace declaration in your Xaml file: + +\[code:c#\]xmlns:Core="clr-namespace:Balder.Core;assembly=Balder.Core.Silverlight"\[/code\]  + +You now get a set of extra controls that can be used. + +First off is the RenderingContainer: + +\[code:c#\] +  +\[/code\]  + +You need to specify the Width and Height, as that is used to setup the display properly. The BackgroundColor property can be any color, including transparent - which is great if you want to mix with existing Silverlight controls on your page.  + +The next control we've added is the Mesh control, it enables you to add any Mesh from a file/resource to the RenderingContainer. You do this by accessing the Nodes property on the Container and putting up a RenderedNodeCollection and put your Mesh(es) within that. + +\[code:c#\] + +       +             +         + +\[/code\]  + +For now, there is a limited amount of DependencyProperties exposed, so manipulation via Storyboards aren't possible today, but will be very soon. The only way to access this is by hooking up the Updated event on the RenderingContainer and implement codebehind logic for it, something like this: + +\[code:c#\] +private float \_angle = 0f; + +private void Updated(RenderingContainer renderingContainer) +{ +    \_audi.Node.World = Matrix.CreateRotationY(\_angle); +    \_angle += 0.5f; +    \_renderingContainer.Camera.Position = new Vector(0,-5,-20); +} +\[/code\]  + +Last but not least, to get it all working, you need to initialize Balder. In your App.xaml.cs file, during the Application\_Startup event, you need to add one line of code. It is very important for now that you add that line before your page (RootVisual) is created and set. + +\[code:c#\] +  private void Application\_Startup(object sender, StartupEventArgs e) +  { +   TargetDevice.Initialize(); +   RootVisual = new Page(); +  } +\[/code\] + +I you want to use it the "conventional" way - non Xaml based, you need to add a similar line of code, but that line of code needs to be added after the page has been created. This is something that makes absolutely no sense and is something we're trying to fix and make it a lot more sense. Our goal is to get rid of that line of code all together. + +A little note, we're not trying to mimick the WPF 3D namespaces at all, we're going our own direction. We don't feel the urge to replicate those, as the purpose of Balder is very different. diff --git a/_posts/2009/10/balder-switching-to-github-for-sourcecontrol/index.md b/_posts/2009/10/balder-switching-to-github-for-sourcecontrol/index.md new file mode 100644 index 0000000..1250401 --- /dev/null +++ b/_posts/2009/10/balder-switching-to-github-for-sourcecontrol/index.md @@ -0,0 +1,17 @@ +--- +title: "Balder switching to GITHub for SourceControl" +date: "2009-10-23" +categories: + - "3d" + - "balder" +tags: + - "silverlight" +--- + +The last week or so, we've been hard at work on Balder to reorganize the source repository and move it to GITHub. The reason we want to do this are many, but one of the most important reasons is to enable anyone to be able to contribute to the project and give the core developers greater control for picking changes/patches done to the source and push it into the master/trunk branch. + +For now we will be pushing all changes back to the [Balder](http://balder.codeplex.com) project on CodePlex as well, so anyone that just downloads the source will still find it over there. + +During this transition we had really big trouble getting the synchronization between the repositories, even when we want the CodePlex one to be "slave" and no changes will be committed directly to CodePlex. We got errors that was not possible to get any response from Google on (must admit, never tried to Bing them), so we ended up having to totally purge all the source at CodePlex and push it back manually. + +We've created a tutorial for getting started [here](http://balder.codeplex.com/wikipage?title=ContributeTutorial&referringTitle=SourceCode) and if you need details on GIT and how we do branching with it, you can read [here](http://balder.codeplex.com/wikipage?title=RepositoryGuide&referringTitle=ContributeTutorial). diff --git a/_posts/2009/10/bing-virtual-earth-wpf-mapcontrol-localization-issues/index.md b/_posts/2009/10/bing-virtual-earth-wpf-mapcontrol-localization-issues/index.md new file mode 100644 index 0000000..788b801 --- /dev/null +++ b/_posts/2009/10/bing-virtual-earth-wpf-mapcontrol-localization-issues/index.md @@ -0,0 +1,23 @@ +--- +title: "Bing / Virtual Earth WPF MapControl - Localization issues" +date: "2009-10-24" +categories: + - "net" + - "csharp" +--- + +I just got an email from a guy that watched my WPF talk on the MSDN Live tour in Trondheim, he had downloaded one of my samples from that talk and gave it a go. But he constantly got this "Script Error" thing. The demo was using the WPF MapControl for Virtual Earth maps. It worked OK in all browsers he had tried. Kinda odd I thought.  + +The error message was "String was not recognized as a valid boolean". I googled the error message without any concrete results. + +Then it struck me; "could it be... Naahh.. It couldn't,  lets try switching regional format settings.." - I always set mine to English - U.S., without really having any good reason for doing so, seeing that I live in Norway. Anywho, I switched it to Norwegian, and there the same error was.  + +The simple solution, codewize, is to set the CurrentCulture to be Invariant: + +\[code:c#\] + +System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;  + +\[/code\]  + +I haven't had time to investigate why this happens, but it sure is kinda odd, since running the map in a browser works and the WPF Control is in fact just a WebBrowser control, using the same browser. diff --git a/_posts/2009/10/github-i-salute-you/index.md b/_posts/2009/10/github-i-salute-you/index.md new file mode 100644 index 0000000..45c5ba1 --- /dev/null +++ b/_posts/2009/10/github-i-salute-you/index.md @@ -0,0 +1,11 @@ +--- +title: "GitHub I salute you" +date: "2009-10-31" +categories: + - "balder" + - "general" +--- + +I've been using CodePlex with both the TFS integration and SVN for quite a while and recently started using GitHub, especially for the [Balder](http://balder.codeplex.com) project, and must say that I'm very impressed with what they have over at GitHub. Not only is Git something I'm really falling in love with and the way GitHub handles this, but simple things as the Issue tracking is so nice. GitHub is ultrafast, anything one does, its instant. Adding and modifiying issues is like working locally, kudos for this.  + +One of the things I discovered the other day was the ability to host your pages there as well. Plain HTML hosting, something I've been missing at CodePlex, the best part, the HTML being hosted is versioned by Git - of course. diff --git a/_posts/2009/10/speaking-at-nnug-trondheim-29th-of-october-2009/index.md b/_posts/2009/10/speaking-at-nnug-trondheim-29th-of-october-2009/index.md new file mode 100644 index 0000000..f956d73 --- /dev/null +++ b/_posts/2009/10/speaking-at-nnug-trondheim-29th-of-october-2009/index.md @@ -0,0 +1,14 @@ +--- +title: "Speaking at NNUG Trondheim, 29th of October 2009" +date: "2009-10-21" +categories: + - "net" + - "3d" + - "gamedevelopment" +--- + +I will be speaking at NNUG Trondheim next week about how one can go about creating games using managed code with focus on Xna and Silverlight. The user group meeting is a cooperation with Javabin.  + +If you happen to be in Trondheim on the 29th of October, stop by for a great evening with Anders Nordås talk about patterns and myself for the gaming section. + +You can sign up and read more over at [NNUG](http://www.nnug.no/Avdelinger/Trondheim/Moter/NNUG-Trondheim---29-oktober-2009/). diff --git a/_posts/2009/11/balder-0-8-8-0-release-is-out/index.md b/_posts/2009/11/balder-0-8-8-0-release-is-out/index.md new file mode 100644 index 0000000..50cb187 --- /dev/null +++ b/_posts/2009/11/balder-0-8-8-0-release-is-out/index.md @@ -0,0 +1,20 @@ +--- +title: "Balder 0.8.8.0 Release is out" +date: "2009-11-30" +categories: + - "net" + - "3d" + - "gamedevelopment" +tags: + - "silverlight" +--- + +**UPDATE 8th of July 2010 : 0.8.8.7 is out - read more [here](/post/2010/07/08/Balder-0887-out.aspx).** + +Its been a busy month getting all "loose" ends in the Balder project tied up. Hopefully we haven't left anyone still in here. + +For this release we've been focusing on bug fixing, cleaning up the APIs and getting better "native" Silverlight support through Xaml. The release and details about it can be found[here](http://balder.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=36596). + +Xaml support has been very important for this release, and not only exposing objects and initialization in Xaml, but also being able to manipulate it. The end result is now that you can do a lot of the magic in Xaml without having to touch base with C# at all. For the next release there will be even more focus on this, getting better support for Blend design-time, storyboarding and general editing experience in Blend. But also the support for MVVM style development, so one can get better separation in the code. + +We are in the midst of creating tutorials for this new release, as there are major changes and new features that needs some explaining. diff --git a/_posts/2009/11/c-4-dynamic-and-dynamicobject-in-silverlight-4/index.md b/_posts/2009/11/c-4-dynamic-and-dynamicobject-in-silverlight-4/index.md new file mode 100644 index 0000000..1c32512 --- /dev/null +++ b/_posts/2009/11/c-4-dynamic-and-dynamicobject-in-silverlight-4/index.md @@ -0,0 +1,18 @@ +--- +title: "C# 4 dynamic and DynamicObject in Silverlight 4" +date: "2009-11-18" +categories: + - "net" +tags: + - "silverlight" +--- + +One of the coolest new things with Silverlight 4 is the ability to use C# 4 and in particular the dynamic keyword and infrastructure that comes along with it. The dynamic keyword allows for dynamic typing in .net, which is great for a number of reasons, but alongside it there is something called DynamicObject that makes this a whole lot more interesting for development in environments such as Silverlight. + +The DynamicObject is a class one can derive from and override a number of methods, such as TryCreateInstance(), TryInvokeMember() and much more. This can be used for quite a few things, one would be for dynamically invoking services on the server or any other server avoiding the proxy creation all together. The usage from the code invoking the service would only need to call methods as if they were well known thanks to the dynamic keyword. + +Working with javascript objects from C# is a second usage, one could create similar functionality for creating javascript objects and invoking methods on them. This is something that I've been working on for a while for Balder - with the next versions of FireFox and WebKit/Safari, they are introducing WebGL. Balder was built for future expansions of platforms, and this is therefor something that comes fairly easy to do thanks to the usage of dynamic and DynamicObject. + +One quirk you'll run into, is when using DynamicObject in Silverlight 4 beta, is that you're not having a reference to the assembly were this is located by default, nor is it in the runtime by default. It is in fact located in the SDK. To use the DynamicObject, one needs to add a reference to an assembly called "Microsoft.CSharp.dll", it is located in the Silverlight SDK, typically located here : "C:Program FilesMicrosoft SDKsSilverlightv4.0LibrariesClient". + +I'll get back with a future post on how to use dynamic for working with javascript objects - as soon as the next release of Balder is out the door. diff --git a/_posts/2009/11/silverlight-4-beta-announced/index.md b/_posts/2009/11/silverlight-4-beta-announced/index.md new file mode 100644 index 0000000..a13b287 --- /dev/null +++ b/_posts/2009/11/silverlight-4-beta-announced/index.md @@ -0,0 +1,119 @@ +--- +title: "Silverlight 4 beta announced" +date: "2009-11-18" +categories: + - "net" +tags: + - "silverlight" +--- + +Today Scott Guthrie announced the beta release of Silverlight 4, the release rate for Silverlight is amazing. Its only been 4 months since we got the release of Silverlight 3 and now everyone is getting their hands on with the beta of version 4, amazing stuff - kudos to the Silverlight development team. I've been working with SL4 for a while now through early access from Microsoft, and I must say that I'm really impressed with what they have accomplished and the quality of the builds has been truly remarkable. I guess a lot of you will probably pick up the downloads and think "why don't they just release it now" or "can I get a golive license for this - like - NOW".  + +Download SL4 now and get started over at the "[Getting started with Silverlight 4](http://silverlight.net/getstarted/silverlight-4-beta/)" area of Silverlight.net. + +Congratulations to the Silverlight team for their achievement, its a great product and one I'm proud to be representing as an MVP.  + +Even though it has only been 4 months since the previous release, the team has been able to get some really great stuff into this version already. Here are the highlights: + +**Out of browser applications** + +Silverlight 3 introduced the concept of out of browser, which enabled developers to have their applications installed as an offline application available without having to browse to the page the application was hosted from. In Silverlight 4 there is quite a new features related to this: + +**Elevated privileges** + +In Silverlight 4 you'll have the ability to get elevated privileges, this means you get to stuff one is more used to from a regular desktop application: + +- Cross domain network access +- Full file path from Open/SaveFileDialog +- No user-initiation requirements for fullscreen, Open/SaveFileDialogs +- COM Interop + +In addition you now have the ability host HTML in your Silverlight application. + +**Media** + +Silverlight started out as the "flash" killer on most lips, and with this release as previous they are doing great stuff with media support - closing the gap between what Flash and Silverlight, feature wise. + +- WMS multicast support +- MP4 playback protected by PlayReady DRM +- Offline DRM +- Output protection +- WebCam/Microphone support (raw stream only) + +**Printing support** + +Finally - this feature is something that at least I've been missing since day one, the ability to programatically generate print documents from the client without having to rely on doing it on the server and pushing back to the browser. + +**Text** + +One of the coolest features with Silverlight is text - the ability to embed true-type fonts and assure the look across browsers and platforms. With Silverlight 3, they close to perfected the rendering of fonts, with this release we're therefor seeing some new and cool features: + +- RichTextBox +- Arabic and Hebrew support (right to left) +- IME Improvements for TextBox +- UIElement.TextInput event + +**Controls / Layout** + +The gap between WPF and Silverlight is really getting tighter in this version: + +- Theming via implicit styles +- ViewBox +- MouseWheel support on ScrollViewer, TextBox, ComboBox, Calendar, DatePicker +- RTL Layout via UIElement.FlowDirection property +- VisualStateGroup.CurrentStateGroup property +- Command Property on ButtonBase & Hyperlink (finally) +- SelectedValue and SelectedValuePath properties on Selector + +**Networking** + +- Memory usage fix during progressive downloads +- Automatically adding referrer header +- Authentication support on ClientHttpWebRequest + +**Tools support** + +Dispatcher support on the tools design surface + +**DataBinding improvements** + +- DataBinding support for DependencyObjects +- IDataErrorInfo support +- StringFormat, TargetNullValue & FallBackValue properties on Binding +- ObservableCollection constructor that takes INumerable or IList +- IEditableCollectionView +- Grouping support on CollectionViewSource + +**SDK** + +- Astoria 2.0 Support +- MEF + +**Other** + +- Expose runtime version to 3rd party DLLs +- NGEN support for Core runtime binaries + +Also, important to know; Silverlight 4 supports C# 4, so when doing Silverlight development from Visual Studio 2010, you'll be able to use all the cool new language features in C# 4, dynamic being one of my favorites.  + +**Breaking changes from SL3** + +**TabControl keyboard navigation fixed** + +In SL3 navigation was broken, pressing the up key used to activate the next TabItem and down the previous, counterintuitive when TabStripPlacement was Left or Right. In SL4 pressing the up key activates the previous and down activates the next. In order for existing applications to take advantage of this fix you'll have to recompile the application. + +**Toggling fullscreen mode will now result in rerunning hit-testing** + +Controls that were under the mouse before toggling fullscreen will get their MouseOver state refreshed from rerunning the hit-testing. + +**Windows class** + +The property called WindowStartupLocation is not returning a string anymore but a WindowStartupLocation object. + +**Class MS.Internal.Interop.IneropWrapper has been removed** + +**Changing DisplayMemberPath and ItemTemplate properties of ItemControl now re-creates all containers** + +Setting ItemTemplate and DisplayMemberPath had no effect after ListBox measuring was finished in Silverlight 3. This will now invalidate all realized containers and re-create them even after the containers were measured. + +Tim Heuer has a great guide on his blog for the new features that can be found [here](http://timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete-guide-new-features.aspx). diff --git a/_posts/2009/11/upcoming-balder-release/index.md b/_posts/2009/11/upcoming-balder-release/index.md new file mode 100644 index 0000000..b8c7e1c --- /dev/null +++ b/_posts/2009/11/upcoming-balder-release/index.md @@ -0,0 +1,39 @@ +--- +title: "Upcoming Balder release" +date: "2009-11-17" +categories: + - "net" + - "balder" +tags: + - "silverlight" +--- + +My blog has been dead silent lately. The reason for this is that I'm quite busy getting a new release of Balder out the door.  + +For the upcoming release, which will be named 0.8.8 - still in Alpha mode, I've focused a lot on code quality and getting some debt paid back from the "early" days when I started the project. But fear not, there is also a bunch of new features coming. + +To mention a few things: + +\- Mouse interaction with objects, an event model + +\- Simpler initialization - in fact, there is none + +\- A better declarative Xaml model that replicates the object model found in Core - they are separated, due to cross-platform support that will come. + +\- The ability to have more than one displays - great for Silverlight when you want to have multiple 3D models on the same page, but not interacting with each other + +\- Command support - so one can actually do MVVM style  + +\- Debug information - bounding spheres  + + In addition there is tons of bug fixes, such as: + +\- Coordinate system was out of wack. Positive Y was pointing downards, now pointing up + +\- Initialization bugs that occured from time to time + +\- Speedups - rendering pipeline has optimized a tad, and the initialization phase as well. + +There are a few breaking changes there as well in the API - its gotten a bit cleaner and more concise. + +A detailed description of all this will come in the release notes.   Keep your ears to the ground, cool stuff will come soon. diff --git a/_posts/2009/12/2009-coming-to-an-end-welcome-2010/index.md b/_posts/2009/12/2009-coming-to-an-end-welcome-2010/index.md new file mode 100644 index 0000000..6edb632 --- /dev/null +++ b/_posts/2009/12/2009-coming-to-an-end-welcome-2010/index.md @@ -0,0 +1,30 @@ +--- +title: "2009 coming to an end - Welcome 2010" +date: "2009-12-29" +categories: + - "net" + - "3d" + - "balder" +tags: + - "silverlight" +--- + +2010 is just a couple of days away, I thought I'd do a recap of 2009 and what has happened in my little world. :)  + +Back in August 2008 Balder was at a proof of concept stage and I had close to abandoned the project, I had so many things I wanted to do which resulted in not doing anything. Along came a couple of emails from [Clinton Rocksmith](http://www.clintonrocksmith.com/) who found the project interesting and wanted to know how he could contribute. I was really surprised, I never imagined anyone actually looking at the project. Timing was a bit off, I had just signed a contract with a new company and never got around to prioritize Balder, other projects always came in the way. Again, a couple of months later the project was at a stand still and I was getting again to a point of almost abandoning it completely. In the beginning of 2009 though, I got contacted by [Gastón Hillar](http://search.barnesandnoble.com/booksearch/results.asp?ATH=Gaston+C.+Hillar) who also found the project interesting and wanted to include a couple of samples in his upcoming [book](http://search.barnesandnoble.com/3d-Game-Development-With-Microsoft-Silverlight-3/Gaston-C-Hillar/e/9781847198921/?itm=2). This spun me completely of my axis. I worked closely with Gastón in providing him the best possible solution and bring Balder to a new level. For me this was a true turning point for Balder and I quickly decided to put all other projects on a complete halt and focus my energy on Balder. The result was that we managed to get Balder to an API level that felt a lot better, performance was increased with several hundred percent and the codebase quality was increased dramatically with retrofitting unit tests for critical parts.  + +The project was all of a sudden going somewhere, it was time to look for other developers to join in. A good friend of mine; [Petri Wilhelmsen](http://digierr.spaces.live.com/) joined the project and has contributed a bit and will commit more time next year to the project. Another friend of mine; Raymond Holmboe has been contributing some on and off since I started the project back in the days and will be committing more time next year as well to the project.  + +The ultimate result from all of this is that there has been quite a few commercial interests in the project, everything from companies wanting to buy the project as a whole to companies wanting to utilize it professionally. This is something I can disclose more information on later next year. One thing is certain though, Balder will stay open source and free to use. + +Also this year, I was suggested as a Silverlight MVP and was eventually moved from Xna to Silverlight. Thanks to [Justin Angel](http://blogs.silverlight.net/blogs/justinangel/) for recognizing me and suggesting the move, its a true honor.  + +Although I had a very nice job at [Objectware](http://www.objectware.no), the distance of 125 KM to work one way was to big. Even though I didn't commute everyday, it got to be a strain on my family when I had to go early in the morning and wasn't back till late and most nights after the kids had gone to bed. So I started sniffing the market to see if there was opportunities closer to home. I ended up at a company called [Bouvet](http://www.bouvet.no), and don't regret my decision. Bouvet has in my opinion the right focus for consultants, and it just feels right. Happy to be onboard. + +Professionally I've had the opportunity to work full time on a Enterprise Silverlight project, I've worked on two Microsoft Surface projects, some WPF projects and finally ended up spending the last 3-4 months of the year working on an ASP.net MVC project with some Silverlight content.   + +Its also been a very busy year when it comes to speaking engagements, I've been part of Microsoft Norways MSDN Live tour, been speaking at [NNUG](http://www.nnug.no) a couple of times, [Game Camp](http://www.gamecamp.no), did a Silverlight course.  + +2009 has truly been an exciting year, busy, but very exciting. With the release of Silverlight 3 this summer and the beta version of Silverlight 4, I'm at a point were I really can't wait to get out of bed in the morning and just find the keyboard and start hacking away. It has never been more fun to be a developer, a lot is happening these days, not only in the Microsoft arena, but in general. I can't wait to see what 2010 brings. + +Happy new year everyone, looking forward to participate next year. Thanks to everyone who has made 2009 so much fun and exciting, especially I'd like to thank my wife and kids, who has really been patient with me and supported me along the way. diff --git a/_posts/2009/12/balder-0-8-8-5-pulled-why/index.md b/_posts/2009/12/balder-0-8-8-5-pulled-why/index.md new file mode 100644 index 0000000..b15f29f --- /dev/null +++ b/_posts/2009/12/balder-0-8-8-5-pulled-why/index.md @@ -0,0 +1,17 @@ +--- +title: "Balder 0.8.8.5 pulled - why ?" +date: "2009-12-17" +categories: + - "net" + - "3d" + - "csharp" + - "gamedevelopment" +tags: + - "silverlight" +--- + +A couple of days ago I published a new version of Balder; 0.8.8.5. It had a bunch of improvements in it, especially when it comes to the Silverlight Control support. I had to pull the release mere hours after its release. The reason for pulling it was that I did a lot of optimizations in the rendering, or at least I thought I did. Turns out that when running on a very fast Dual core or Quad core computer, it was faster - but on slower machines, it turned out to be quite slow.  + +Instead of reverting the entire optimization, I've decided to actually get the performance up quite a bit. I've been working on a new rendering pipeline that would increase the performance dramatically, so no time like the present. + +The biggest change however with the release was the Xaml support. In the [Development branch over at GitHub](http://github.com/einari/Balder/tree/Development) you will find source code with the rendering pipeline being the same as in version 0.8.8.0, but with all the new Xaml support. So if you can't wait for the optimizations and want to get your Xaml right from the start - you should go pull the latest on the Development branch and compile the binaries yourself. In fact, it should be fairly simple to do it, just download it and run the build.cmd file from a command prompt and it will output a Drop directory with all the binaries in it. diff --git a/_posts/2009/12/balder-0-8-8-5-release-is-out/index.md b/_posts/2009/12/balder-0-8-8-5-release-is-out/index.md new file mode 100644 index 0000000..d269c23 --- /dev/null +++ b/_posts/2009/12/balder-0-8-8-5-release-is-out/index.md @@ -0,0 +1,35 @@ +--- +title: "Balder 0.8.8.5 Release is out" +date: "2009-12-15" +categories: + - "net" + - "3d" + - "balder" + - "gamedevelopment" +tags: + - "silverlight" +--- + +**UPDATE 8th of July 2010 : 0.8.8.7 is out - read more [here](/post/2010/07/08/Balder-0887-out.aspx).** + +**UPDATE, 16th of December 2009 : Release was pulled due to issues with rendering. New release will be pushed soon.** + +Its that time again, yet another release of Balder. You're probably thinking - whats going on? Pushing releases close to every week. + +Well, this release had to be pushed out fast, the reason being that a couple of days after the previous release I realized that the Xaml support introduced felt good while using it, but clearly had its limitations and also maintainability issues when working with the library. + +In the previous release I introduced the Xaml support as Controls in the Balder.Silverlight assembly, which seemed like a fair place to have it, seeing that Xaml/Controls are a very specific platform option that Silverlight supports and should not be present in Core. Problem with that was that we now had two object hierarchies to maintain, one just reflecting most of the properties already found in Core and doing some crazy magic to maintain these hierarchies. Needless to say, this approach is very error prone and hard to maintain. + +**Dependency Properties** + +**The main reasons for not pushing the Control support into Core was the fact that I didn't want DependencyProperties leaking into it all over the place and not wanting types to derive from DependencyObject or any other Silverlight specific type. So what I came up with is to make the types in question partial and implement the Silverlight specifics in a .Silverlight.cs file - which then could be skipped for other platforms. Then for DependencyProperties, I wrapped everything up in a generic Property type that has a Specific Silverlight implementation that again can change for other platforms.** + +The result is a more maintainable codebase, and a better experience when using it. + +**Speedups** + +Another reason for pushing for another release was the fact that I did some heavy optimizations. Earlier when doing optimizations, I worked mostly with Silverlight 2 and Silverlight 3 Beta. For SL2 I created a RawPngBufferStream, since no WriteableBitmap was available there, and for SL3 beta, the WriteableBitmap was quite different than what the final RTW version had going for it. Long story short, I ended up with a multithreading scenario that gave quite a performance boost. + +After looking at this for quite some time, I found that it would be better to have multiple WriteableBitmaps and do triplebuffering with these and use different threads for different purposes (Clearing, Rendering, Showing). Turns out that this was quite efficient, only problem was that synchronization turned out to be a bit of a problem. So I did a test with doing all the operations synchronously in the CompositionTargets event, and it gave a serious performance boost. That combined with some optimized ways of clearing surely seemed to do wonders. + +The new release is available from[here](http://balder.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=37298). diff --git a/_posts/2009/12/balder-0-8-9-0-features-feedback-wanted/index.md b/_posts/2009/12/balder-0-8-9-0-features-feedback-wanted/index.md new file mode 100644 index 0000000..4b5db1c --- /dev/null +++ b/_posts/2009/12/balder-0-8-9-0-features-feedback-wanted/index.md @@ -0,0 +1,15 @@ +--- +title: "Balder 0.8.9.0 - features, feedback wanted" +date: "2009-12-02" +categories: + - "net" + - "3d" + - "balder" + - "csharp" +tags: + - "silverlight" +--- + +We're not about to slow down the development of Balder anytime soon, next release is something we're already hard at work with.  + +If you want to be influence the priority or have features you'd love to see in it thats not already on the list, please don't hesitate to go to our Issue list over at GitHub and vote, comment or add new issues. You'll find the issue list [here](http://github.com/einari/Balder/issues). diff --git a/_posts/2009/12/balder-logo-tutorials/index.md b/_posts/2009/12/balder-logo-tutorials/index.md new file mode 100644 index 0000000..df3e976 --- /dev/null +++ b/_posts/2009/12/balder-logo-tutorials/index.md @@ -0,0 +1,16 @@ +--- +title: "Balder Logo + Tutorials" +date: "2009-12-02" +categories: + - "net" + - "balder" + - "gamedevelopment" +tags: + - "silverlight" +--- + +On monday (30th of November 2009) we had a new release of Balder, version 0.8.8.0. Since then I've been busy getting tutorials up on the site for not only the new stuff but also covering usage in general. All the tutorials are available [here](http://balder.codeplex.com/wikipage?title=Tutorials&referringTitle=Home).   + +Also, for the release I decided it was time to get a logo for the project, so opened my favourite 3D modelling software and photo/image editor and had a go, and ended up with the following.  + +![](http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=Balder&DownloadId=94993) diff --git a/_posts/2009/12/innovasys-donates-to-the-balder-project/images/innovasyslogo_150.gif b/_posts/2009/12/innovasys-donates-to-the-balder-project/images/innovasyslogo_150.gif new file mode 100644 index 0000000..ed87da5 --- /dev/null +++ b/_posts/2009/12/innovasys-donates-to-the-balder-project/images/innovasyslogo_150.gif @@ -0,0 +1,29 @@ + + + + + + + InnovasysLandingPage + + + + + + + + + + +
Loading...
+ +
+ An unhandled error has occurred. + Reload + 🗙 +
+ + + + + diff --git a/_posts/2009/12/innovasys-donates-to-the-balder-project/index.md b/_posts/2009/12/innovasys-donates-to-the-balder-project/index.md new file mode 100644 index 0000000..4e68d95 --- /dev/null +++ b/_posts/2009/12/innovasys-donates-to-the-balder-project/index.md @@ -0,0 +1,21 @@ +--- +title: "Innovasys donates to the Balder project" +date: "2009-12-22" +categories: + - "net" + - "balder" +tags: + - "silverlight" +--- + +One really important thing when creating a framework like [Balder](http://balder.codeplex.com), is to create proper documentation. The purpose of the documentation is for people to get good explanations for the API and samples on how to use it.  + +I've been researching quite a bit for finding a good solution for doing this and didn't want to do all documentation by using XML comments only, but wanted more rich content and must admit that I never found any free solutions that I found satisfying. In the past I've used [Innovasys](http://www.innovasys.com)' solution called [DocumentX](http://www.innovasys.com/products/dx2008/overview.aspx) and was very happy with it. It might not be the natural choice for an OpenSource project to chose a commercial product, but the quality in which I want the documentation to be in I really wanted to use a product like DocumentX. + +DocumentX provides a combination of documentation generated from XML comments in the code and rich text edited content, all mixed in nicely in the development environment; Visual Studio. This makes it easy to use and maintainable.   + +Long story short, we've been so lucky to get Innovasys to sponsor  donate a license to actually do this. So a big thanks goes to them for providing the necessary license for this. + +  [![](images/innovasyslogo_150.gif)](http://www.innovasys.com) + +We will be working on updating the documentation and get it in future releases and part of the regular development. diff --git a/_posts/2009/12/silverlight-courses-2010/index.md b/_posts/2009/12/silverlight-courses-2010/index.md new file mode 100644 index 0000000..e17a07f --- /dev/null +++ b/_posts/2009/12/silverlight-courses-2010/index.md @@ -0,0 +1,37 @@ +--- +title: "Silverlight Courses 2010" +date: "2009-12-06" +categories: + - "net" + - "csharp" +tags: + - "silverlight" +--- + +2010 is going to be a busy year for me, along side consultancy for several customers, I've been scheduled to do a few courses. Silverlight is the topic for all but one of the courses. + +You'll find all the courses in this overview of all of Bouvets courses [here](http://www.bouvet.no/BouvetWEB/Kurs.aspx). + +Even though, listed as Silverlight 3 specific, they will be focusing on Silverlight in general and will include some of Silverlight 4 as well. We're looking into putting up a Silverlight 4 specific course as well.  + +So, if you want to get your hands dirty and start learning Silverlight, these courses are the place to be.  + +**Update 9th of December 2009, direct links to the courses:** + +[Silverlight Basics](http://www.bouvet.no/BouvetWEB/Kurs.aspx?catid=162e6100-e21d-4048-b9ee-1195a36fffff&newsid=e8e3d607-18b2-484d-8965-2ed69645c513) + + + +[Silverlight Advanced](http://www.bouvet.no/BouvetWEB/Kurs.aspx?catid=162e6100-e21d-4048-b9ee-1195a36fffff&newsid=b52cb40f-44de-49b1-8ef0-2eeb3d630dcd) + + + +[Silverlight WCF RIA Services](http://www.bouvet.no/BouvetWEB/Kurs.aspx?catid=162e6100-e21d-4048-b9ee-1195a36fffff&newsid=d23e1bfb-780d-48e4-9d10-203ef009dcc2) + + + +[Silverlight Media and Gaming](http://www.bouvet.no/BouvetWEB/Kurs.aspx?catid=162e6100-e21d-4048-b9ee-1195a36fffff&newsid=dcf31afe-d645-46df-bbea-ae02dbaea6ba) + + + +[C# 4 + .net 4 workshop](http://www.bouvet.no/BouvetWEB/Kurs.aspx?catid=162e6100-e21d-4048-b9ee-1195a36fffff&newsid=37b14fc7-3dfa-45e2-844a-1c0bcde95214) diff --git a/_posts/2009/12/speaking-at-software-2010-with-petri-wilhelmsen/index.md b/_posts/2009/12/speaking-at-software-2010-with-petri-wilhelmsen/index.md new file mode 100644 index 0000000..e10367a --- /dev/null +++ b/_posts/2009/12/speaking-at-software-2010-with-petri-wilhelmsen/index.md @@ -0,0 +1,18 @@ +--- +title: "Speaking at Software 2010 with Petri Wilhelmsen" +date: "2009-12-13" +categories: + - "net" + - "3d" + - "csharp" + - "gamedevelopment" + - "xna" +tags: + - "silverlight" +--- + +On the 9th of February, Software 2010 is kicked off. [Petri Wilhelmsen](http://digierr.spaces.live.com/) and myself will be holding an hour on game development with managed code using Microsoft Xna and Silverlight (featuring Balder). We will be focusing on 3D development and cross-platform using .net. + +Really looking forward to doing a co-op with Petri. + +For more details and signup, go [here](http://www.dataforeningen.no/bli-med-paa-leken-skjaeringspunktet-mellom-software-og-spillutvikling.4664081-148818.html). diff --git a/_posts/2010/01/dispatcher-safe-inotifypropertychanged/index.md b/_posts/2010/01/dispatcher-safe-inotifypropertychanged/index.md new file mode 100644 index 0000000..6c98347 --- /dev/null +++ b/_posts/2010/01/dispatcher-safe-inotifypropertychanged/index.md @@ -0,0 +1,79 @@ +--- +title: "Dispatcher Safe INotifyPropertyChanged" +date: "2010-01-16" +categories: + - "net" + - "csharp" +tags: + - "silverlight" +--- + +**Update, 19th of November 2011:** + +**Eduardo Elias Mardini Bitar did an article for the [CodeProject with some updates and improvements](http://www.codeproject.com/KB/cs/INotifyPropertyChanged.aspx).** + +One of the things I really love in Silverlight is the promotion of non-locking UIs through heavy use of asynchronous operations for things like webservice calls. The main problem though with this is that it is running on a different thread than the UI thread and you can't modify anything on the UI without running on the same thread. This even goes for databinding, so if you have properties on an object databound in the UI and you set the value on any of these properties, you still need to be on the UI thread in order for this to work. This is also true for WPF applications. + +The way you could do this is to get an instance of the Dispatcher and use the BeginInvoke() method on it. In Silverlight there is only one Dispatcher and it can be retrieved from the Deployment object in System.Windows; Deployment.Current.Dispatcher. In WPF there can be several Dispatchers, so it gets a bit more complicated, you'd have to do Dispatcher.FromThread() and use the current thread during the add method of your PropertyChanged and store it alongside with the instance of the delegate to know which Dispatcher to invoke a change on. + + When I first wrote my automagically implemented INotifyPropertyChanged [post](/post/2010/01/10/INotifyPropertyChanged-Automagically-implemented.aspx), it didn't have this support. I knew I needed it to support it, but I didn't want to have a dependency directly to the Dispatcher found in the Deployment object, as my unit tests would have a hard time coping with that dependency. I needed to abstract it away so I could have a cleaner way of doing this and be able to test it without too much hassle. By introducing an interface representing the Dispatcher, I was halfway there, but had no way of injecting this into the proxy types being created. The problem is that you can't define a constant on the type that holds a reference to a ref object, it only supports value types. I really struggled a full day with this, I was trying to not have any dependencies from the proxies in order to get the Dispatcher, and I didn't want to tie it up to just be compatible with IoC containers and specifically NInject that I'm using for the most part. The result is that I had to implement a DispatcherManager and have a private field on the proxy type holding a reference to an IDispatcher and let the manager control which implementation it got. This worked out nicely, even though it now have a dependency to the DispatcherManager directly.  + +This has all been implemented into the Balder project, as I need it for my SampleBrowser I'm working on, the code is located inside the Notification namespace and can be found [here](http://github.com/einari/Balder/tree/Development/Source/Balder.Silverlight/Notification/).  + +**What does it do?** +Lets say you have your object like below, the virtuals are in there for the weaver to be able to implement these properties in its proxy (as eplained in my previous [post](/post/2010/01/10/INotifyPropertyChanged-Automagically-implemented.aspx)).  + +\[code:c#\] +public class Employee +{ +    public virtual string FirstName { get; set; } +    public virtual string LastName { get; set; }  +} +\[/code\] + +The weaver will then go and inject its magic, the end result is pretty much like this: +\[code:c#\] +public class EmployeeProxy : Employee, INotifyPropertyChanged +{ +    private IDispatcher \_dispatcher = DispatcherManager.Current; + +    public event PropertyChangedEventHandler PropertyChanged; + +    public override string FirstName +    { +        get { return base.FirstName; } +        set +        { +            base.FirstName = value; +            OnPropertyChanged("FirstName"); +        } +    } + + +    public override string LastName +    { +        get { return base.LastName; } +        set +        { +            base.LastName = value; +            OnPropertyChanged("LastName"); +        } +    } + +    private void OnPropertyChanged(string propertyName) +    { +        if( null != PropertyChanged ) +        { +            if( \_dispatcher.CheckAccess() ) +            { +                PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); +            } +            else +            { +                \_dispatcher.BeginInvoke(PropertyChanged,this, new PropertyChangedEventArgs(propertyName)); +            } +        } +    } + +} +\[/code\] diff --git a/_posts/2010/01/inotifypropertychanged-automagically-implemented/index.md b/_posts/2010/01/inotifypropertychanged-automagically-implemented/index.md new file mode 100644 index 0000000..51b3128 --- /dev/null +++ b/_posts/2010/01/inotifypropertychanged-automagically-implemented/index.md @@ -0,0 +1,40 @@ +--- +title: "INotifyPropertyChanged - Automagically implemented" +date: "2010-01-10" +categories: + - "net" + - "balder" +tags: + - "silverlight" +--- + +**Update, 19th of November 2011:** + +**Eduardo Elias Mardini Bitar did an article for the [CodeProject with some updates and improvements](http://www.codeproject.com/KB/cs/INotifyPropertyChanged.aspx).** + +Recently I've been working on a small Silverlight project at a client and at the same time I've been working on implementing a SampleBrowser for Balder on my spare time, both these applications are using the MVVM paradigm and all that comes with it. One of the things that has really been bugging me is the INotifyPropertyChanged interface, a key interface for making the View observe changes on objects. Not only do you have to implement the same thing over and over again (the notification bit), but also the PropertyChanged event takes an argument that holds the property being changed as a literal. Although, the literal bit can be solved quite easily with some Lambda Expression magic, like I've [blogged about in the past](/post/2008/12/11/INotifyPropertyChanged-revisited.aspx). But your still left with writing the same boring notification code over and over again. + +I got really inspired by [Jonas Follesoes](http://jonas.follesoe.no) [post](http://jonas.follesoe.no/AutomaticINotifyPropertyChangedUsingDynamicProxy.aspx) about how he solved the ever lasting challenge of INotifyPropertyChanged using Castles DynamicProxy to generate a proxy and automatically handle most of it. I read it and automatically started thinking about how I could remove the last bits and make the objects needed notification totally ignorant of the fact they should notify any changes. The Castle approach described by Jonas is very clean and I love working with Aspects like that, but it is pretty much impossible to get it to 100% automatically generate everything. The reason for this is that in the Silverlight runtime, you are not allowed for security reasons to invoke delegates on another type other than your own through reflection. Another issue I had that I could never figure out, was how to tie it in with an IoC container. I couldn't find a way in Castles solution to actually get the proxy type and not the instance, this of course is quite possibly possible, but I couldn't find it at all. + +I started earlier today with the idea I could generate the proxy from scratch myself. The idea is to create a new proxy type that derives from the type you want to automatically notify its changes by overriding your properties. The properties you want to automatically notify must be virtual and implement a setter. The weaved version will override these properties and actually forward both the get and the set method of the properties to your type, so you can still do more complex stuff in your property methods. The result is a specialized object weaver for handling INotifyPropertyChanged. The code is too much to include in this post, but you'll find the implementation [here](http://github.com/einari/Balder/blob/Development/Source/Balder.Silverlight/Notification/NotifyingObjectWeaver.cs) and the unit tests [here](http://github.com/einari/Balder/blob/Development/Source/Balder.Silverlight.Tests/Notification/NotifyingObjectWeaverTests.cs), also it support a couple of attributes - much like Jonas' solution for ignoring and adding other properties it should notify as well. Take a look at the entire [namespace](http://github.com/einari/Balder/tree/Development/Source/Balder.Silverlight/Notification/) for all files needed. Also worth mentioning is that if you define your constructor to have arguments, it will implement a constructor on the proxy that is exactly the same and forward any arguments when instantiated. That way in a typical ViewModel scenario were you have dependencies to typically services, these will be injected when creating an instance of the proxy through an IoC Container. + +Using it is very simple, create a class: + +\[code:c#\] +public class ViewModel +{     +    public virtual string SomeString { get; set; }   +}  +\[/code\]  + +Getting the proxy type: + +\[code:c#\] +var proxyType = NotifyingObjectWeaver.GetProxyType(); +\[/code\] + +Once you have the type you can bind it in your IoC container or simply use the Activator type and create an instance of it.  + +**UPDATED 12th of January 2010: Discovered a small bug when I moved it into production, had forgotten to mark the type created with public. Silverlight can't instantiate private types via dynamically from other types. Its all been updated in the repository.**  + +**EDIT 18th of January 2010: Made it dispatcher friendly - read my [post](/post/2010/01/16/Dispatcher-Safe-INotifyPropertyChanged.aspx) about it.** diff --git a/_posts/2010/01/sapient-using-balder-for-client-project/index.md b/_posts/2010/01/sapient-using-balder-for-client-project/index.md new file mode 100644 index 0000000..494804c --- /dev/null +++ b/_posts/2010/01/sapient-using-balder-for-client-project/index.md @@ -0,0 +1,14 @@ +--- +title: "Sapient using Balder for client project" +date: "2010-01-12" +categories: + - "net" + - "3d" + - "balder" +tags: + - "silverlight" +--- + +Balder is rapidly moving from being a proof of concept for rotating a box in 3D as it was in early 2007 to becoming a quality library that can be used for gaming and line of business applications. Thanks to all that has shown interest in the project by using it, writing books about it, creating your own demos and posting it, and last but not least companies like Sapient - that took a leap of faith and went with Balder for visualization on a Silverlight project they are doing for a client they have. + +A little more than a month ago, I came to an agreement with Sapient on helping them out using Balder on a non-disclosed client project. The Balder project itself is not affected by it, licensing or ownership wise. But it is affected in a rather positive way, it gives me the extra motivation to keep adding features and at a much faster rate than before. Although it might seem "quiet" on the outside, seeing thats there been more than 4 weeks since a release - its very hectic from where I'm sitting. I'm at high speed and turning out code as fast as I can. I will try to get a release out now and then, and hopefully we'll see one out in a short time span. More on the upcoming release in another post. Stay tuned. diff --git a/_posts/2010/01/upcoming-balder-release-0-8-8-6/index.md b/_posts/2010/01/upcoming-balder-release-0-8-8-6/index.md new file mode 100644 index 0000000..d4b43c4 --- /dev/null +++ b/_posts/2010/01/upcoming-balder-release-0-8-8-6/index.md @@ -0,0 +1,38 @@ +--- +title: "Upcoming Balder release - 0.8.8.6" +date: "2010-01-27" +categories: + - "net" + - "3d" + - "csharp" + - "gamedevelopment" + - "optimizing" +tags: + - "silverlight" +--- + +Its been crazy weeks since I decided to pull 0.8.8.5, but it was for the better. The result is that the rendering speed and quality has gone up quite dramatically. The next version of Balder will be 0.8.8.6 and will contain at least the following:  + +\- Optimized framebuffer management + +\- Optimized drawing/rendering + +\- Optimized lighting + +\- Proper polygon clipping against the viewport  + +\- Completely refactored way of handling objects, no duplication in the type hierarchy for Balder, like in 0.8.8.0. + +\- New controls : NodesControl, NodesStack - similar as Canvas and StackPanel works with 2D elements in Silverlight + +\- New geometry types; Box, Cylinder, Plane + +\- Transparency for objects / materials + +\- Introducing the concept of View, you can now create custom cameras + +\- DebugLevel is no longer flag-based, but a self contained object with properties for all Debug options + +\- Rendering is now synchronously - gives better framerate in most scenarios, but hogs up rendering event. Ongoing process. + +Its been crazy since december with a lot of work being put into Balder and more to come. I don't have a date yet for when I'll have the release, but I'll try to push it as soon as I'm content with the result. diff --git a/_posts/2010/02/4-hours-optimizing-later/images/Comparison.png b/_posts/2010/02/4-hours-optimizing-later/images/Comparison.png new file mode 100644 index 0000000..9e856a1 Binary files /dev/null and b/_posts/2010/02/4-hours-optimizing-later/images/Comparison.png differ diff --git a/_posts/2010/02/4-hours-optimizing-later/index.md b/_posts/2010/02/4-hours-optimizing-later/index.md new file mode 100644 index 0000000..92f8714 --- /dev/null +++ b/_posts/2010/02/4-hours-optimizing-later/index.md @@ -0,0 +1,14 @@ +--- +title: "4 hours optimizing later..." +date: "2010-02-25" +categories: + - "net" + - "balder" + - "optimizing" +tags: + - "silverlight" +--- + +After just 4 hours of dedicated optimizations with the aid of the [EQATEC profiler](http://www.eqatec.com/tools/profiler/download) for Silverlight - I managed to speed up the rendering pipeline of Balder quite dramatically. The profiler has a great comparison feature - simple and straight to the point. It shows that the rendering pipeline for [Balder](http://balder.codeplex.com) got optimized at an average og 2.28 times. (RenderingManagerRender) : + +![Comparison](images/Comparison.png) diff --git a/_posts/2010/02/balder-0-8-8-6-is-out/index.md b/_posts/2010/02/balder-0-8-8-6-is-out/index.md new file mode 100644 index 0000000..ffeb735 --- /dev/null +++ b/_posts/2010/02/balder-0-8-8-6-is-out/index.md @@ -0,0 +1,50 @@ +--- +title: "Balder 0.8.8.6 is out" +date: "2010-02-08" +categories: + - "net" + - "3d" + - "csharp" +tags: + - "silverlight" +--- + +**UPDATE 8th of July 2010 : 0.8.8.7 is out - read more [here](/post/2010/07/08/Balder-0887-out.aspx).** + +Finally after a couple of months of hard work and polishing the code, API and performance, version 0.8.8.6 of[Balder](http://balder.codeplex.com)is out. A SampleBrowser can be found [**here**](http://localhost:8080/silverlight/Balder/20100208/TestPage.html) for viewing most of the features of[Balder](http://balder.codeplex.com). +The features that has changed or is new are as follows: + +\* Introduced Silverlight in Core, but still maintaining platform independence +\- Using core objects directly in Xaml can now be done + +\* Removed all controls in Balder.Core.Silverlight.Controls - not needed anymore + +\* Introduced View namespace with IView interface and Camera implementing it + +\* Viewport has View property insted of Camera + +\* Moved rendering from a multithread environment to run synchronously on the CompositionTarget. It gives better performance, due to synchronization issues between all threads. Will be revisited in the future. + +\* New drawing routines, optimized + +\* Heightmap primitive + +\* Box primitive + +\* Rotation, Scale on nodes + +\* Cylinder primitive + +\* DebugLevel is known as DebugInfo + +\* Material system in place + +\* Support for ReflectionMapping on materials + +\* Double sided materials + +\* Sprite rendering with alpha channel + +\* NodesControl - datadriven nodes control with templating - In Balder.Silverlight.Controls + +\* NodesStack - datadriven stacking of nodes with templating - in Balder.Silverlight.Controls diff --git a/_posts/2010/02/eqatec-donates-profiler-license-to-the-balder-project/images/eqatec_logo.png b/_posts/2010/02/eqatec-donates-profiler-license-to-the-balder-project/images/eqatec_logo.png new file mode 100644 index 0000000..664fc68 Binary files /dev/null and b/_posts/2010/02/eqatec-donates-profiler-license-to-the-balder-project/images/eqatec_logo.png differ diff --git a/_posts/2010/02/eqatec-donates-profiler-license-to-the-balder-project/index.md b/_posts/2010/02/eqatec-donates-profiler-license-to-the-balder-project/index.md new file mode 100644 index 0000000..e4aecc9 --- /dev/null +++ b/_posts/2010/02/eqatec-donates-profiler-license-to-the-balder-project/index.md @@ -0,0 +1,15 @@ +--- +title: "EQATEC donates profiler license to the Balder project" +date: "2010-02-24" +categories: + - "net" + - "balder" +tags: + - "silverlight" +--- + +One of the things that has been missing in the Silverlight development story is a proper profiler that is simple to use and does not require you to hack the registry or do complex command line hacks to get it working. The Danish company called [EQATEC](http://www.eqatec.com) has been making profilers for a while for the compact framework, but now they have implemented a Silverlight version that I must say I'm really impressed with. EQATEC has donated a professional license to the [Balder](http://balder.codeplex.com) project and I have already started using it, and my findings are very interesting. I've found more bottlenecks the last 24 hours than I have during the entire course of the project without a profiler. So I'm expecting [Balder](http://balder.codeplex.com) to get even more speedier in the near future. + +If you want to have a look at how the profiler works, Channel 9 has a great video on it [here](http://channel9.msdn.com/posts/martinesmann/First-code-profiler-for-Silverlight/). + +[![](images/eqatec_logo.png)](http://www.eqatec.com/) diff --git a/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/1.png b/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/1.png new file mode 100644 index 0000000..eb9b2e1 Binary files /dev/null and b/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/1.png differ diff --git a/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/2.png b/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/2.png new file mode 100644 index 0000000..7d122fc Binary files /dev/null and b/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/2.png differ diff --git a/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/3.png b/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/3.png new file mode 100644 index 0000000..b9f724c Binary files /dev/null and b/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/3.png differ diff --git a/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/4.png b/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/4.png new file mode 100644 index 0000000..61e9db3 Binary files /dev/null and b/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/4.png differ diff --git a/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/5.png b/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/5.png new file mode 100644 index 0000000..338c796 Binary files /dev/null and b/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/5.png differ diff --git a/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/6.png b/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/6.png new file mode 100644 index 0000000..ba091d4 Binary files /dev/null and b/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/images/6.png differ diff --git a/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/index.md b/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/index.md new file mode 100644 index 0000000..9007dd6 --- /dev/null +++ b/_posts/2010/02/first-go-with-the-eqatec-silverlight-profiler/index.md @@ -0,0 +1,43 @@ +--- +title: "First go with the EQATEC Silverlight Profiler" +date: "2010-02-24" +categories: + - "net" + - "csharp" +tags: + - "silverlight" +--- + +Its been a little more than 24 hours since I started playing with the [EQATEC](http://www.eqatec.com) profiler and have identified bottlenecks in [Balder](http://balder.codeplex.com) that is close to impossible to discover without a profiler. One of things I really liked about the EQATEC profiler was its really easy to use user interface, its super-intuitive and I got up and running in seconds and could drill down straight to the bottlenecks just as fast. What impresses me with the profiler is the speed of it, I've worked with quite a few profilers in the past for the desktop - and they have always surprised me in a negative way with the amount of memory they use and not to mention the enourmous datafiles they generate. EQATECs just feels right, kudos to Richard Flamsholt and his team in Denmark for this product. You can download a free/personal license from [here](http://www.eqatec.com/tools/profiler/download). + +I thought I just give a quick guide into how its used. + +The profiler is not integrated in Visual Studio and does not need to instrument your assemblies during compiletime, it works on the binary output of your compiled output. After starting the profiler, you need to point the profiler to your output directory in which the binaries for your application resides, typically the bindebug directory in your Visual Studio project folder. Click the browse button as shown below: + +![](images/1.png) + +The first time you run it and if you have 3rd party assemblies that are signed you'll be asked to include or exclude these - the default recommendation is to exclude these. There is a resigning option included as well, but I didn't need this so I just skipped them. After it completes gathering your assemblies and recognizes the Silverlight app by finding the testpage and everything, you can go ahead and click the Build button in the lower right corner. It will instrument your binaries and add hooks for all your methods. + +![](images/2.png) + +Then you just simply click the "Run App" button and your application will start and performance samples will be collected. You now need to play around in your application for the profiler to get enough data to play with. + +After stopping your application, you'll be presented with the sample output with details of when it was profiled, its size and total time it ran. + +![](images/3.png) + +Double click the session you want to view (if you have more than one) and you can start to drill into method calls with the summary sitting on top and a more visualized version of the method with drilldown capabilities at the bottom. + + ![](images/4.png) + + Simple drill down and you'll see the amount of time spent in every method you drill down into: + +![](images/5.png) + +And further:  + + ![](images/6.png) + +This is by far, in my oppinion, the best tool that has been released since Silverlight was released. It completes the developer experience and finally we can really show the full potential of Silverlight and the power the CLR actually gives us. + +Thanks again to [EQATEC](http://www.eqatec.com) for the donation to Balder - we will certainly make use of the license and optimize as close as we can to clock-cycles. :) diff --git a/_posts/2010/04/still-alive-and-kicking/index.md b/_posts/2010/04/still-alive-and-kicking/index.md new file mode 100644 index 0000000..970a59f --- /dev/null +++ b/_posts/2010/04/still-alive-and-kicking/index.md @@ -0,0 +1,15 @@ +--- +title: "Still alive and kicking" +date: "2010-04-14" +categories: + - "balder" + - "general" +--- + +Its been the most hectic couple of months I've ever had since February.  + +I've had a few Silverlight courses, been out in the field at all kinda customers, traveling across Norway, doing talks at user groups and at the same time doing some moonlighting for a U.S. based company - and during this time, working hard on Balder and getting more and more features in it, optimizing it and fixing bugs. It has come at a price though, me not being able to post any blogposts and pretty much be passive on Twitter, Facebook and Messenger. My family will be surprised to see me soon, I guess. :)  + +[Balder](http://balder.codeplex.com) is coming a long nicely and I'll be posting a bit about the new features and changes when I get some more time. Soon there will be a new official release, and I'm working on getting together a continuous integration server that will also do nightly builds and push them automatically to [Codeplex](http://www.codeplex.com). Just have to decide which platform I want to run it on - Mac or Windows.  + +So until then, have patience with my blog - I'll return and put out quite a few articles I have running around in my brain. diff --git a/_posts/2010/05/balder-upcoming-release/index.md b/_posts/2010/05/balder-upcoming-release/index.md new file mode 100644 index 0000000..da73e65 --- /dev/null +++ b/_posts/2010/05/balder-upcoming-release/index.md @@ -0,0 +1,58 @@ +--- +title: "Balder - Upcoming release" +date: "2010-05-12" +categories: + - "3d" + - "balder" + - "csharp" +tags: + - "silverlight" +--- + +Its been some 4 months since the last official binary drop of Balder and its just about time to get a new version out. The reason for the "hold up" is that I've been quite busy with working 2 jobs; my daytime job and Balder related freelance work at night. Combining that with having a family of 2 kids and a wife, there simply hasn't been any time left get binaries out there.  + +But, as part of the work that I've been doing freelance, Balder has gotten a lot of improvements. Among these are the following :  + +\- Further optimizations in the rendering pipeline + +\- Rewritten NodesControl, speed up and more capable + +\- General cleanups + +\- More Xml comments for documentation purposes + +\- Retrofitted some unittests + +\- Mouse events working properly + +\- Tooltip for Nodes + +\- Arbitrary Heightmap - corners of heightmap can be placed anywhere + +\- New AseLoader with more support than before (Smoothings groups, more objects, more material details, colors++) + +\- Rewritten AssetLoader system + +\- Fixed bugs with primitives + +\- More samples in SampleBrowser + +\- Visual Studio 2010 solution + project files + +\- Optimized lighting + +\- Added ViewLight - lighting relative to view, basically directional lighting + +\- Passive Rendering, making the rendering halt unless properties are changed on any object in the scene + +\- Content caching for faster startups + +\- A lot of code cleanups for decoupling the platform even more + +\- Material detection for mouse events  + +And a whole bunch of other improvements. + +The only thing left before a release can be done is to tie together some lose ends and fix a couple of bugs - then its ready for deployment. I'll be sure to post about all the new features and how they can be used in a post when the release is ready. + +The next iteration will focus more on increasing code quality, more cleanups, get more documentation up and running, continuous integration server up and running and things that will improve further development on the project. diff --git a/_posts/2010/06/contact-me-on-my-blog-working-again/index.md b/_posts/2010/06/contact-me-on-my-blog-working-again/index.md new file mode 100644 index 0000000..704f937 --- /dev/null +++ b/_posts/2010/06/contact-me-on-my-blog-working-again/index.md @@ -0,0 +1,8 @@ +--- +title: "Contact me on my blog - working again" +date: "2010-06-18" +categories: + - "general" +--- + +For probably more than a year now, submitting an email to me on my blog hasn't worked. I've looked at the settings a bunch of times but without figuring out the problem. No error messages to be found anywhere. Well, turns out, there was a small typo in the email adress and it has been sending to an inbox that doesn't exist.So, if anyone has been trying to contact me through the contact page, I'm sorry I haven't gotten back to you. diff --git a/_posts/2010/07/balder-0-8-8-7-out/index.md b/_posts/2010/07/balder-0-8-8-7-out/index.md new file mode 100644 index 0000000..c5a4c27 --- /dev/null +++ b/_posts/2010/07/balder-0-8-8-7-out/index.md @@ -0,0 +1,103 @@ +--- +title: "Balder 0.8.8.7 out" +date: "2010-07-08" +categories: + - "net" + - "3d" + - "balder" +tags: + - "silverlight" +--- + + +I promised a release last month, but I had to do surgery and got a bit sidetracked with feeling sorry for myself being in pain. Anyhow, all is good and finally got the release out the door. + +Its been almost 6 months since the last release. So this better be good. :) + +The following are as complete a list I could compile of whats new and improved, btw. you'll find the new release [here](http://balder.codeplex.com/releases/view/48503 "Balder 0.8.8.7"). A new version of the SampleBrowser can be found [here](http://dl.dropbox.com/u/5342359/Balder/SampleBrowser/TestPage.html "Balder SampleBrowser"). + + +**Performance improvements** + +- Scanline renderers has improved quite a bit + +- Lighting calculations + +- NodesControl + +- Startup improvements + +- Content caching - loading the same content twice will only clone existing in cache +- Color class - conversion plus operations are rewritten, introduced ColorAsFloats + +- Dependency properties now represented as Property with caching in it + +**Bugfixes** + +- World matrix + general matrix fixups + +- NodesControl fixed, one can now nest these, plus a massive performance improvement during databinding using the ItemsSource. + +- Mouse events actually working - 0.8.8.6 had quite a few bugs with this, they are pixel perfect + +- PivotPoint fixed - working recursively + +- Completely rewritten rendering pipeline for stability, expandability and performance + +- Memory leaks in mouse event handling + +- Fixed Asset handling system - had a few bugs in it. Still has to revisit this. + +- Parsing of ASE files now use invariant culture all over the place. Had a couple of places it didn't. + +**New features** + +- Manipulation events on objects, implemented using mouse events. + +- They contain more detailed information about the object being manipulated, such as material information. Also, the events are not like the mouse events, they actually contain delta information about the manipulation occuring. + +- Tooltips, there is a property on all objects called Tooltip, you can create tooltips as you please, as you'd do with the TooltipService in Silverlight for other objects. The TooltipService will not work, hence the specialized property for it. + +- DirectionalLight - basic directional lighting + +- ViewLight - lighting that is "attached" to the camera/view + +- ArbitraryHeightMap - heightmap that can have its corners placed arbitrarily + +- SmoothingGroups implemented + +- New ASE parser - supporting multiple objects, world matrix. Also a lot faster. + +- Ring - geometry type + +- Started implementation of a ChamferBox - very basic at this point + +- Passive Rendering, will draw in wireframe during interaction and flip to full rendering when interaction has stopped. When no interaction, it will not render, Balder goes idle. + +- Pausing - for pausing everything. + +- Grabbing a frame from the Display can now be done + +- Container for renderable nodes - has its own world coordinate system that can be manipulated, lights can't be placed in this container. + +- BubbledEvent system for events that needs to bubble up in the hierarchy + +- Messenger system for decoupling and stability + +- IGeometryDetailLevel - basically only used for Passive rendering at this point + +- Geometry artifacts such as Face, Vertex and so forth are now classes and has been generalized. Its now up to the implementing platform to create specialized versions of them. + +- Removed MEF and introduced a specialized TypeDiscoverer instead. + +**Development environment** + +- Changed to Visual Studio 2010 + +- Build server up and running with a more complete Balder.build file for continuous integration + +**Breaking changes** + +- IGeometryContext does no longer hold the geometry data directly, introduced something called IGeometryDetailLevel. One can get the full detail level, which is the default (and only for now), by calling the method GetDetailLevel() on the IGeometryContext. In addition, any Geometry has a property called FullDetailLevel for convenience. + +- Mouse events has been specialized - they are named the same as one is used to from Silverlight, but the MouseEventArgs has been "duplicated" in Balder.Core.Input. The reason for this is that the Silverlight class for this is sealed and does not have a public constructor, and the mouse event handling needs to handled in a special manner in Balder. Also, the events are now bubbled as well through the geometry hierarchy. diff --git a/_posts/2010/07/balder-0-8-8-8-is-out/index.md b/_posts/2010/07/balder-0-8-8-8-is-out/index.md new file mode 100644 index 0000000..d8de824 --- /dev/null +++ b/_posts/2010/07/balder-0-8-8-8-is-out/index.md @@ -0,0 +1,24 @@ +--- +title: "Balder 0.8.8.8 is out" +date: "2010-07-26" +--- + +Its only been 2 weeks since the last release, but a new release of Balder is ready. +It can be found [here](http://balder.codeplex.com/releases/view/49650). + +Here are the highlights : + +- Major breaking changes in namespace : Balder.Core.\* is now Balder.\*, Balder.Silverlight.Animation is now Balder.Animation. +- Brought everything down from 2 DLLs to 1 DLL - Balder.dll, it contains everything +- Swapped to the latest version of NInject - internally a lot of changes had to be done +- Introducing Windows Phone 7 support in WP7 Silverlight Application with Hardware Accelarated graphics +- Skybox support - property on Game and Viewport +- Started working on iOS (iPhone/iPad) version +- Started working on Xna version +- Started working on Desktop version +- One step closer to desig-time support, not quite there yet - hang in there +- Shading support for textured models (both flat and gourd) +- Lighting has been fixed a lot for OmniLight - takes into account the light color and the material information, still some work ahead on this subject though. +- Some bug fixes in ASE loader + tests +- Cleaned up some samples in SampleBrowser +- Introduced IMap interface for Maps instead of tying everything to Image for DiffuseMap and ReflectionMap on Material. One can now implement any map types - but dimensions must be power of 2. diff --git a/_posts/2010/07/balder-getting-started-screencast/index.md b/_posts/2010/07/balder-getting-started-screencast/index.md new file mode 100644 index 0000000..4cc6d1a --- /dev/null +++ b/_posts/2010/07/balder-getting-started-screencast/index.md @@ -0,0 +1,8 @@ +--- +title: "Balder - Getting Started screencast" +date: "2010-07-27" +--- + +Finished the first screencast last night and published it on Vimeo. If you're interested in getting a flying start, it should be a good video to watch. + +You'll find the video [here](http://vimeo.com/13659554 "Getting Started with Balder"). diff --git a/_posts/2010/07/balder-license-changes/index.md b/_posts/2010/07/balder-license-changes/index.md new file mode 100644 index 0000000..640e656 --- /dev/null +++ b/_posts/2010/07/balder-license-changes/index.md @@ -0,0 +1,72 @@ +--- +title: "Balder License - changes" +date: "2010-07-29" +--- + +A lot of effort has been put into the [Balder](http://balder.codeplex.com) project, and with the recent work on moving Balder onto multiple platforms and not only Silverlight. I've decided its time to change the license a bit. + +For anyone using Balder today with Silverlight on the Web/Desktop, there are no changes - with the exception of one thing. If you're developing a commercial library or package that can be conceived as a competitor to Balder - then you need a commercial license. Other than that, no changes. + +The intention of the license change is to start getting commercial opportunities from all the work being put in and to finance the further development of the project. From being something I did a few hours a week, its slowly becoming a project that could easily take my entire attention and then some. And developers need food on the table as well. :) + +Anyways, the license I'm proposing is as follows. The price-model for the additional platforms that are being added, has not yet been decided. If you have any input on the license itself, please leave a comment, drop me an email or start a discussion on the [Codeplex site for Balder](http://balder.codeplex.com). + +> Balder License v1.0. +> +> This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. +> +> \[Copyrights\] +> +> Balder is developed by Einar Ingebrigtsen, DoLittle Studios +> +> Balder uses NInject; http://ninject.org/ - its license, Apache License v2.0 : http://github.com/ninject/ninject/blob/master/LICENSE.txt +> +> Copyright © 2007 - 2010, Einar Ingebrigtsen, DoLittle Studios. +> +> **1\. Definitions** +> +> The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. +> +> A "contribution" is the original software, or any additions or changes to the software. +> +> A "contributor" is any person that distributes its contribution under this license. +> +> "Licensed patents" are a contributor's patent claims that read directly on its contribution. +> +> Commercial software is defined as software that directly or indirectly generates revenue for the person(s) or company using Balder. +> +> **2\. Grant of Rights** +> +> (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. +> +> (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. +> +> **3\. Conditions and Limitations** +> +> (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. +> +> (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. +> +> (C) Commercial software in the form of software libraries that directly or indirectly could be conceived as competitor of Balder, must refer to the commercial section of this license. +> +> (D) Only the Silverlight version targeting Silverlight for the Web and Desktop are granted a royalty-free license and can be used freely in any commercial, open source, closed source, academic version. +> +> (E) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. +> +> (F) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. +> +> (G) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. +> +> **4\. Commercial, closed source, open source and academic** +> +> (A) The Silverlight version of Balder, targeting the Silverlight platform used on the Web and the desktop is the only version that is free to use. Other versions, such as Windows Phone 7, iPhone/iPad (iOS), XNA for Windows, XNA for Windows, XNA in general, Android and WPF needs a commercial license. +> +> Commercial libraries that is based partly or fully on Balder and is sold commercially, must obtain a commercial license. +> +> Commercial license(s) can be obtained from DoLittle Studios; license@dolittle.com. +> +> (B) Academic and Open Source +> +> Academic and other Open Source projects may use Balder free of charge as long as the license is included during distribution, if any - as stated in Section 3 - F. +> +> (C) Any closed source projects were the source code is not enclosed during distribution may use Balder freely on any of its supported platforms as long as it complies with paragraph A. diff --git a/_posts/2010/07/balder-on-windows-phone-7/images/BalderOnWP7-161x300.png b/_posts/2010/07/balder-on-windows-phone-7/images/BalderOnWP7-161x300.png new file mode 100644 index 0000000..e4dc561 Binary files /dev/null and b/_posts/2010/07/balder-on-windows-phone-7/images/BalderOnWP7-161x300.png differ diff --git a/_posts/2010/07/balder-on-windows-phone-7/index.md b/_posts/2010/07/balder-on-windows-phone-7/index.md new file mode 100644 index 0000000..08cd8d4 --- /dev/null +++ b/_posts/2010/07/balder-on-windows-phone-7/index.md @@ -0,0 +1,17 @@ +--- +title: "Balder on Windows Phone 7" +date: "2010-07-15" +categories: + - "3d" + - "balder" +tags: + - "silverlight" +--- + +[![BalderOnWP7](images/BalderOnWP7-161x300.png)](http://localhost:8080/wp-content/2010/07/BalderOnWP7.png) After a couple of days of work - actually more like a couple of hours over a couple of days (sneaking away during vacation to feed my computer abstinence), I've managed to port [Balder](http://balder.codeplex.com) to Windows Phone 7, a couple of quirks needed to be fixed - like this [one](/post/2010/07/15/Dynamically-discovering-assemblies-and-types-on-Windows-Phone-7.aspx). + +For now it uses the same software rendering engine as the Silverlight one. Needless to say, its not exactly the most optimal solution, but at least it proves that most of the code runs across both Silverlight and Windows Phone 7 without doing much to it. + +The next goal is now to implement a fully hardware accelerated version of Balder for Windows Phone 7, using Xna. + +Wish me luck. :) diff --git a/_posts/2010/07/balder-post-0-8-8-7-release-what-now/images/Balder_ShadedTexture1.png b/_posts/2010/07/balder-post-0-8-8-7-release-what-now/images/Balder_ShadedTexture1.png new file mode 100644 index 0000000..407b60a Binary files /dev/null and b/_posts/2010/07/balder-post-0-8-8-7-release-what-now/images/Balder_ShadedTexture1.png differ diff --git a/_posts/2010/07/balder-post-0-8-8-7-release-what-now/images/IMG_0008-300x225.jpg b/_posts/2010/07/balder-post-0-8-8-7-release-what-now/images/IMG_0008-300x225.jpg new file mode 100644 index 0000000..3c240f9 Binary files /dev/null and b/_posts/2010/07/balder-post-0-8-8-7-release-what-now/images/IMG_0008-300x225.jpg differ diff --git a/_posts/2010/07/balder-post-0-8-8-7-release-what-now/index.md b/_posts/2010/07/balder-post-0-8-8-7-release-what-now/index.md new file mode 100644 index 0000000..33a738a --- /dev/null +++ b/_posts/2010/07/balder-post-0-8-8-7-release-what-now/index.md @@ -0,0 +1,38 @@ +--- +title: "Balder post 0.8.8.7 release - What now??" +date: "2010-07-08" +categories: + - "3d" + - "balder" +--- + +After quite a hectic 2010, a lot of work at my daytime job at Bouvet, taking on freelance work with projects utilizing Balder and maintaining Balder itself - I finally managed to get a new binary release out the door. Feels like a ton has been lifted off my shoulders. + +You might be asking yourself, when is the next release - christmas time? What will it contain? Lets start with the first one, when. I can't exactly promise an exact time for that. But what I've been working on lately is a build server that will aid me in getting binaries out the door faster. + +![IMG_0008](images/IMG_0008-300x225.jpg) I've put together a dual core Atom based machine (to the left), that will be my continuous integration and nightly build server. Its running [Hudson](http://hudson-ci.org/ "Hudson Continuous Integration Server"), a Java based continuous integration server software together with a [NAnt](http://nant.sourceforge.net/ "NAnt") build script. The purpose of it is to build continuously to get stuff out the door, but also assure that I'm not breaking anything while I'm developing new stuff. This means that I will commit myself to be a lot better at writing unit tests. Balder has a somewhat 20% test-coverage to date, and the last month I've broken a few of those tests, mostly due to architectural decisions that has rendered the tests unusable. So one of the things I will be working quite a lot on, is getting the existing tests up and running again, and also getting the coverage up to a decent level (80% +). Some parts of the engine is plain simple not testable, nor should it be testable. Such as drawing pixels on the screen, just doesn't make sense to try even to test it. Making that code testable would make performance drop a lot, plus its pretty much impossible to do it. + +The build will be dropping new binaries to my DropBox account, and I'm working on a simple Build Viewer in Silverlight that one will be able to use to pick up new stuff from there. + +There is a few other reasons I want to have this system in place. If one takes a look at the [Balder site](http://balder.codeplex.com) up on Codeplex, you'll notice a promise of not only Silverlight as the supported platform. Balder has since day one been written in a manner that would allow for more platforms, I just haven't gotten around to actually implement anyone else. I had a Windows Forms version once, but dropped it. Now, on the other hand, I've been preparing to scale out to the following platforms : + +- Windows Phone 7 Series +- iPhone +- iPad +- Xna - targetting Windows + XBox (Windows Phone 7, partially) + +Also, there are quite a few elements in the Core library that needs tender, love and care. As for the Silverlight specifics, I really want to see the following in there soon : + +- Shaded textures (Flat + Gouraud) +- Multitexturing +- Bumpmapping +- Managed "pixel/vertex-shaders" +- Blend - Design time support + +I haven't decided were to start off yet, but I will be monitoring the ["Issue Tracker"](http://balder.codeplex.com/workitem/list/basic) up on Codeplex and working actively with that to be my guide, so please cast your votes. + +I've started the work on the shaded texturemapping, and it looks kinda cool (see the color difference at the bottom) : + +![Balder_ShadedTexture1](images/Balder_ShadedTexture1.png) Also worth mentioning, I'll be focusing my energy also on getting documentation up to a decent level - I've included a lot of Xml documentation tags in the code, but have also started work on layout out samples in the help file. In order for people to start learning Balder, I'm also planning a few tutorials and some video tutorials as well. + +One could say that I will not get bored with the above tasklist, I have enough to do - better start working. :) diff --git a/_posts/2010/07/dynamically-discovering-assemblies-and-types-on-windows-phone-7/index.md b/_posts/2010/07/dynamically-discovering-assemblies-and-types-on-windows-phone-7/index.md new file mode 100644 index 0000000..08a21fa --- /dev/null +++ b/_posts/2010/07/dynamically-discovering-assemblies-and-types-on-windows-phone-7/index.md @@ -0,0 +1,32 @@ +--- +title: "Dynamically discovering assemblies and types on Windows Phone 7" +date: "2010-07-15" +categories: + - "net" +tags: + - "silverlight" +--- + +The last few days I've been busy porting [Balder](http://balder.codeplex.com) to other platforms, amongst those; Windows Phone 7 Series. There are some nuances between the different platforms Balder will support, one of these for Windows Phone 7 was that the Load() method does not exist on an AssemblyPart from the deployment object. + +Balder has a discover architecture were it discovers different types from the loaded assemblies, in the Silverlight version I could simply go and get all the AssemblyParts and get it as a resource stream and load them to get the actual Assembly instance. Since the Load() method didn't exist I had to to look elsewhere. +Fortunately, the Assembly class in the Windows Phone 7 version of .net has an overload for the Load() method that takes a string. According to the MSDN documentation it needs to take a fully qualified assemblyname, that turned out to be difficult to acquire. But, it turns out that its sufficient to pass it the short name - this can be derived from the DLL name found in the AssemblyParts property called Source. + +From the [TypeDiscoverer](http://balder.codeplex.com/SourceControl/changeset/view/6c6cb5db5ec4#Source%2fBalder.Core%2fExecution%2fTypeDiscoverer.cs) code in Balder : + +\[code:c#\] +private void CollectTypes() +{ +if( null != Deployment.Current ) +{ +var parts = Deployment.Current.Parts; +foreach (var part in parts) +{ +var assemblyName = part.Source.Replace(".dll", string.Empty); +var assembly = Assembly.Load(assemblyName); +var types = assembly.GetTypes(); +\_types.AddRange(types); +} +} +} +\[/code\] diff --git a/_posts/2010/08/balder-0-8-8-9-coming/index.md b/_posts/2010/08/balder-0-8-8-9-coming/index.md new file mode 100644 index 0000000..94e7f50 --- /dev/null +++ b/_posts/2010/08/balder-0-8-8-9-coming/index.md @@ -0,0 +1,36 @@ +--- +title: "Balder 0.8.8.9 coming" +date: "2010-08-10" +categories: + - "3d" + - "balder" +tags: + - "silverlight" +--- + +Things are moving fast these days with [Balder](http://balder.codeplex.com) and I am closing in on the next release already. Keeping up with my target pace. + +At this point these are the things already done or is in progress for the next release: + +- New Skybox, utilizing built in Silverlight perspective projection, which can be hardware accelerated + +- Perspective correct texture mapping - previous version had only affine texture mapping + +- Bilinear filtering for texture mapping + +- Performance boost for the entire rendering pipeline + +- Better, faster and more accurate lighting + +- Subpixel rendering + +- Vertex-shader like functionality for SIlverlight + +- Multiple "Games" in one page + +- Multiple textures during rendering + +- Semitransparent / alpha-channel support for texture mapping +- Introducing a control for no-game centric applications; Content3D + +- A lot of bugfixing diff --git a/_posts/2010/08/balder-0-8-8-9-very-close-2/images/Balder_0_8_8_9_Preview.png b/_posts/2010/08/balder-0-8-8-9-very-close-2/images/Balder_0_8_8_9_Preview.png new file mode 100644 index 0000000..0202b24 Binary files /dev/null and b/_posts/2010/08/balder-0-8-8-9-very-close-2/images/Balder_0_8_8_9_Preview.png differ diff --git a/_posts/2010/08/balder-0-8-8-9-very-close-2/index.md b/_posts/2010/08/balder-0-8-8-9-very-close-2/index.md new file mode 100644 index 0000000..819e2f9 --- /dev/null +++ b/_posts/2010/08/balder-0-8-8-9-very-close-2/index.md @@ -0,0 +1,17 @@ +--- +title: "Balder - 0.8.8.9 very close" +date: "2010-08-18" +categories: + - "net" + - "3d" + - "balder" + - "csharp" +tags: + - "silverlight" +--- + +Its been a hectic week - but finally most of the pieces are falling into place for the next release. There is only a couple of minor features I want to add before calling it a release. Meanwhile, I've updated the [samplebrowser](/Balder/SampleBrowser/TestPage.html) and released it as a sneak peak. I've replaced the Material Picker sample with a Material Editor were you can actually edit all the properties of the materials and also the lights added to the scene. + +Here's a screenshot of how it can look like when configured with all features enabled: + +[![Balder_0_8_8_9_Preview](images/Balder_0_8_8_9_Preview.png)](http://localhost:8080/wp-content/2010/08/Balder_0_8_8_9_Preview.png) If you're having trouble with the SampleBrowser on Safari or Chrome on the Mac, this is something I'm investigating. I've tested it with all browsers on Windows and Mac, but these two had some issues when textures were involved on my machine. Will look into it more carefully before releasing the next version. The odd thing though, it worked with the samplebrowser compiled as debug. diff --git a/_posts/2010/08/balder-gets-donation-from-ndepend/images/poweredbyndepend.png b/_posts/2010/08/balder-gets-donation-from-ndepend/images/poweredbyndepend.png new file mode 100644 index 0000000..6bc3d94 Binary files /dev/null and b/_posts/2010/08/balder-gets-donation-from-ndepend/images/poweredbyndepend.png differ diff --git a/_posts/2010/08/balder-gets-donation-from-ndepend/index.md b/_posts/2010/08/balder-gets-donation-from-ndepend/index.md new file mode 100644 index 0000000..5dcd4a7 --- /dev/null +++ b/_posts/2010/08/balder-gets-donation-from-ndepend/index.md @@ -0,0 +1,15 @@ +--- +title: "Balder gets donation from NDepend" +date: "2010-08-18" +categories: + - "3d" + - "balder" +tags: + - "silverlight" +--- + +Today the Balder project was lucky enough to get a donation from [NDepend](http://www.ndepend.com). Yet another tool that will be used to improve the code quality of Balder. + +Thanks a lot to the people at NDepend for the donation. + +[![PoweredByNDepend](images/poweredbyndepend.png)](http://www.ndepend.com "NDepend") diff --git a/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/images/Balder_Tutoria._Box_Faces_Lit.png b/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/images/Balder_Tutoria._Box_Faces_Lit.png new file mode 100644 index 0000000..936112a Binary files /dev/null and b/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/images/Balder_Tutoria._Box_Faces_Lit.png differ diff --git a/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/images/Balder_Tutorial_Box_Faces.png b/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/images/Balder_Tutorial_Box_Faces.png new file mode 100644 index 0000000..2338372 Binary files /dev/null and b/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/images/Balder_Tutorial_Box_Faces.png differ diff --git a/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/images/Balder_Tutorial_Box_FinalXaml.png b/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/images/Balder_Tutorial_Box_FinalXaml.png new file mode 100644 index 0000000..de1f716 Binary files /dev/null and b/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/images/Balder_Tutorial_Box_FinalXaml.png differ diff --git a/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/images/Balder_Tutorial_Box_Lines.png b/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/images/Balder_Tutorial_Box_Lines.png new file mode 100644 index 0000000..da35c3a Binary files /dev/null and b/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/images/Balder_Tutorial_Box_Lines.png differ diff --git a/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/images/Balder_Tutorial_Box_Xaml.png b/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/images/Balder_Tutorial_Box_Xaml.png new file mode 100644 index 0000000..8636b1f Binary files /dev/null and b/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/images/Balder_Tutorial_Box_Xaml.png differ diff --git a/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/index.md b/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/index.md new file mode 100644 index 0000000..8ca4533 --- /dev/null +++ b/_posts/2010/08/balder-tutorial-creating-a-mesh-programatically/index.md @@ -0,0 +1,60 @@ +--- +title: "Balder Tutorial : Creating a Mesh programatically" +date: "2010-08-01" +--- + +Balder has been throughout the development had the focus of extensibility, everything should be extensible. In Balder one has a set of object types, both 2D and 3D. For loading 3D models one has something called Mesh. This will automatically pick the right AssetLoader for the filetype based upon the file extension and parse the file and generate a 3D Mesh for Balder to render. Some of the other objects, which are considered primitives such as Box, Cylinder and Ring - are generated on the fly. + +This tutorial will show how one can create an object that generates the Mesh data on the fly. + +The process is quite simple. A Geometry holds something called a GeometryContext which is represented by the interface IGeometryContext, within the GeometryContext one has the ability to create something called a GeometryDetailLevel. The GeometryDetailLevel is the object being rendered depending on the detail level Balder wants to render it in. For the most part, Balder renders using the Full detail level. For Geometry there is a convenience property for the full detail level called FullDetailLevel in which one can use to generate its geometry. + +To get started, the first thing we need to do is to create our object and inherit from Geometry. + +\[code language="csharp"\] using Balder.Objects.Geometries; + +public class MyBox : Geometry { } \[/code\] + +Now that we have our class and its inheriting Geometry, for Silverlight this means we can add it to our Silverlight page. Add a namespace for Balder Execution and View in your page Xaml file (xmlns:Execution="clr-namespace:Balder.Execution;assembly=Balder" and xmlns:View="clr-namespace:Balder.View;assembly=Balder"). Then you need to add an Xml namespace to the namespace of your MyBox class (something like this : xmlns:Custom="clr-namespace:Balder.Silverlight.SampleBrowser.Samples.Geometries.Custom"). + +Now you can add the Xml for Balder and MyBox inside the container you want it to be in the Xaml : + +[![Balder_Tutorial_Box_Xaml](images/Balder_Tutorial_Box_Xaml.png)](http://localhost:8080/wp-content/2010/08/Balder_Tutorial_Box_Xaml.png) +It will not show anything yet, as we don't have any geometry data in the object yet. + +The Geometry has a method on can override for preparing the object, its called Prepare(). + +\[code language="csharp"\] public override void Prepare(Viewport viewport) { } \[/code\] + +In the prepare method we can now start generating the 3D mesh data. We'll start by adding the vertices; 3D points that our geometry data (lines or faces) will be connected to. We create method called GenerateVertices() that we'll call from the Prepare() method. Each point in 3D is represented by something called a Vertex. A box consists of 8 vertices. + +\[code language="csharp"\] private void GenerateVertices() { var dimensionAsVector = new Vector(5f,5f,5f); var halfDimension = dimensionAsVector / 2f; var frontUpperLeft = new Vertex(-halfDimension.X, halfDimension.Y, -halfDimension.Z); var frontUpperRight = new Vertex(halfDimension.X, halfDimension.Y, -halfDimension.Z); var frontLowerLeft = new Vertex(-halfDimension.X, -halfDimension.Y, -halfDimension.Z); var frontLowerRight = new Vertex(halfDimension.X, -halfDimension.Y, -halfDimension.Z); var backUpperLeft = new Vertex(-halfDimension.X, halfDimension.Y, halfDimension.Z); var backUpperRight = new Vertex(halfDimension.X, halfDimension.Y, halfDimension.Z); var backLowerLeft = new Vertex(-halfDimension.X, -halfDimension.Y, halfDimension.Z); var backLowerRight = new Vertex(halfDimension.X, -halfDimension.Y, halfDimension.Z); FullDetailLevel.AllocateVertices(8); FullDetailLevel.SetVertex(0, frontUpperLeft); FullDetailLevel.SetVertex(1, frontUpperRight); FullDetailLevel.SetVertex(2, frontLowerLeft); FullDetailLevel.SetVertex(3, frontLowerRight); FullDetailLevel.SetVertex(4, backUpperLeft); FullDetailLevel.SetVertex(5, backUpperRight); FullDetailLevel.SetVertex(6, backLowerLeft); FullDetailLevel.SetVertex(7, backLowerRight); } \[/code\] + +Notice the first line in the method, it just defines the size of the box in 3D space. The next thing we'll do is to add some lines to it. We'll add a method called GenerateLines() that we'll call from the Prepare() method. + +\[code language="csharp"\] private void GenerateLines() { FullDetailLevel.AllocateLines(12); FullDetailLevel.SetLine(0, new Line(0, 1)); FullDetailLevel.SetLine(1, new Line(2, 3)); FullDetailLevel.SetLine(2, new Line(0, 2)); FullDetailLevel.SetLine(3, new Line(1, 3)); FullDetailLevel.SetLine(4, new Line(4, 5)); FullDetailLevel.SetLine(5, new Line(6, 7)); FullDetailLevel.SetLine(6, new Line(4, 6)); FullDetailLevel.SetLine(7, new Line(5, 7)); FullDetailLevel.SetLine(8, new Line(0, 4)); FullDetailLevel.SetLine(9, new Line(1, 5)); FullDetailLevel.SetLine(10, new Line(2, 6)); FullDetailLevel.SetLine(11, new Line(3, 7)); } \[/code\] + +The way this work is that every line is referring to the vertex index generated by the GenerateVertices(). Take the first line, it has the parameters 0 and 1, that means it is telling Balder to use vertex 0 and 1 to generate the line. When Balder has rotated all vertices according to the objects world and the view and then projected everything onto the 2D screen, it will use the result of the vertices to draw the line. + +Running everything now should give you a result like the below. + +[![Balder_Tutorial_Box_Lines](images/Balder_Tutorial_Box_Lines.png)](http://localhost:8080/wp-content/2010/08/Balder_Tutorial_Box_Lines.png)If you want to use solids, making the object completely solid - we have to use Faces instead of Lines. A face is a triangle, and similar to a Line it references the vertices that represents the triangle. Only difference is that the order in which one connects the vertices are important. The reason for this is that Balder uses something known as backface culling, which means that triangles pointing away from the viewer is not drawn. Its important that one generates the faces with a counter clockwise connections between the vertices, as clockwise triangles will not show. + +Let's create a GenerateFaces() method and swap it for the GenerateLines() method. + +\[code language="csharp"\] private void GenerateFaces() { FullDetailLevel.AllocateFaces(12); FullDetailLevel.SetFace(0, new Face(2,1,0)); FullDetailLevel.SetFace(1, new Face(1,2,3)); FullDetailLevel.SetFace(2, new Face(4,5,6)); FullDetailLevel.SetFace(3, new Face(7,6,5)); FullDetailLevel.SetFace(4, new Face(0,4,2)); FullDetailLevel.SetFace(5, new Face(6,2,4)); FullDetailLevel.SetFace(6, new Face(3,5,1)); FullDetailLevel.SetFace(7, new Face(5,3,7)); FullDetailLevel.SetFace(8, new Face(0,1,4)); FullDetailLevel.SetFace(9, new Face(5,4,1)); FullDetailLevel.SetFace(10, new Face(6,3,2)); FullDetailLevel.SetFace(11, new Face(3,6,7)); } \[/code\] + +Running this should yield the following result: + +[![Balder_Tutorial_Box_Faces](images/Balder_Tutorial_Box_Faces.png)](http://localhost:8080/wp-content/2010/08/Balder_Tutorial_Box_Faces.png)As you'll notice the box is all black. There are two reasons for this; we haven't added a light to the scene yet and most importantly, in order for Balder to be able to calculate lights it needs to have something called a normal ve ctor on the vertices and faces. Luckily, there is something called a GeometryHelper that can be used to generate these. You simple add the following two lines of code in the prepare method after you've generated the vertices and faces : + +\[code language="csharp"\] GeometryHelper.CalculateFaceNormals(FullDetailLevel); GeometryHelper.CalculateVertexNormals(FullDetailLevel); \[/code\] + +Then in the Xaml of the page, we'll need to import the Lighting namespace from Balder (xmlns:Lighting="clr-namespace:Balder.Lighting;assembly=Balder") and then we can add a light to the scene: + +[![Balder_Tutorial_Box_FinalXaml](images/Balder_Tutorial_Box_FinalXaml.png)](http://localhost:8080/wp-content/2010/08/Balder_Tutorial_Box_FinalXaml.png) +The box has a property called Color, which it inherits - so setting it to Blue (Color="Blue") will give the box a specific color, instead of a random one, which is the default behavior. + +You should be seeing something like this: + +**[![Balder_Tutoria._Box_Faces_Lit](images/Balder_Tutoria._Box_Faces_Lit.png)](http://localhost:8080/wp-content/2010/08/Balder_Tutoria._Box_Faces_Lit.png)Summary** Its fairly easy to generate meshes in Balder, but there are more possibilities that this tutorial does not cover, which will be covered by other tutorials. One thing to mention, if you need to regenerate the mesh data you can call the InvalidatePrepare() method, and your prepare method will be called again. Also worth mentioning, if you want to have a texture on the object, you need to generate TextureCoordinates, which is also done through the GeometryDetailLevel. Each face has something called DiffuseA,B,C which in a similar way as with vertices connects the different corners of the triangle to a specific texture coordinate. A texture coordinate is a relative coordinate ranging from 0 to 1 within a texture. diff --git a/_posts/2010/08/balder-vertex-colors/images/Balder_With_VertexColors.png b/_posts/2010/08/balder-vertex-colors/images/Balder_With_VertexColors.png new file mode 100644 index 0000000..dd48c77 Binary files /dev/null and b/_posts/2010/08/balder-vertex-colors/images/Balder_With_VertexColors.png differ diff --git a/_posts/2010/08/balder-vertex-colors/images/Balder_Without_VertexColors.png b/_posts/2010/08/balder-vertex-colors/images/Balder_Without_VertexColors.png new file mode 100644 index 0000000..8f48af9 Binary files /dev/null and b/_posts/2010/08/balder-vertex-colors/images/Balder_Without_VertexColors.png differ diff --git a/_posts/2010/08/balder-vertex-colors/index.md b/_posts/2010/08/balder-vertex-colors/index.md new file mode 100644 index 0000000..85a9f3a --- /dev/null +++ b/_posts/2010/08/balder-vertex-colors/index.md @@ -0,0 +1,23 @@ +--- +title: "Balder - vertex colors" +date: "2010-08-14" +categories: + - "net" + - "3d" + - "balder" + - "csharp" +tags: + - "silverlight" +--- + +I've been working lately on a demo that is for gaming a lot more realistic than the spinning teapot or box that one sees in the sample browser for Balder. A friend of mine [Peter Rosenlund](https://sites.google.com/site/oletata/peterrosenlund2), an excellent graphics artist, gave me a 3D model of a city that I can use for that (thanks a lot!!). + +In the 3D model, he had applied static lighting manually in 3DSMAX by painting the Vertex colors - a feature I had not implemented in Balder. After a few hours yesterday and this morning, I got it all up and running and I must say it looks kinda nice. + +Balder, rendering city without vertex colors applied: + +[![Balder_Without_VertexColors](images/Balder_Without_VertexColors.png)](http://localhost:8080/wp-content/2010/08/Balder_Without_VertexColors.png) + +Balder, rendering same city with the vertex colors applied: + +[![Balder_With_VertexColors](images/Balder_With_VertexColors.png)](http://localhost:8080/wp-content/2010/08/Balder_With_VertexColors.png) diff --git a/_posts/2010/08/clarifying-balders-feature-set/index.md b/_posts/2010/08/clarifying-balders-feature-set/index.md new file mode 100644 index 0000000..277cb56 --- /dev/null +++ b/_posts/2010/08/clarifying-balders-feature-set/index.md @@ -0,0 +1,128 @@ +--- +title: "Clarifying Balders feature set" +date: "2010-08-15" +categories: + - "net" + - "3d" + - "balder" + - "csharp" +tags: + - "silverlight" +--- + +Hopefully I'm not forgetting anything (probably am) - but below is a clarification of what features Balder has. + +## +Coordinate system + +Balder uses a left-handed coordinate system - currently there is no way to change this, but there are plans for opening up for any coordinate system. + +## Nodes + +- Interaction - one can enable interaction on any nodes and they can be interactively manipulated during runtime +- Position coordinates +- Rotation coordinates, in angles for each axis +- Scale coordinates +- Hierarchical rendering of nodes + +## Scene + +- A Scene contains objects, any Balder object implementing the interface INode; Lights, geometries, sprites + +## Viewport + +- Defines a clipping area on the screen, coordinate relative to its container + +## View + +- Camera + - Position + - Target + - Field Of View + +## Sprites + +- Flat image based objects that exist in 3D space - they are rendered along with other 3D content and positioned and scaled correct according to their 3D space position. + +## Geometries + +- Box - simple box with dimensions +- Cylinder - top and bottom dimensions can be specified independently +- Ring - inner and outer circle dimensions can be specified independently +- ChamferBox - simple box with a chamfer segment +- HeightMap - a plane that consist of a set of vertices (points) that can be manipulated by its height +- ArbitraryHeightMap - a derivative of HeightMap, but its plane is arbitrary +- Mesh - a complex mesh which can be loaded from a file + +## Other objects + +- Container - not renderable itself, but can contain any Node in it - hierarchically + +## Assets + +All data loaded from disk or elsewhere is known as Assets. There are Asset loaders for file types, you can even create your own Asset loaders quite easily. For Silverlight, there exist today a limitation which only allows loading of assets found in the XAP file - meaning that any asset added to the project must be a Resource in the XAP file. This is being worked on and will in a future release be more flexible. + +- ASE file - supports 90% of the Autodesk Ascii Scene Export format for 3D objects +- Experimental support for Demoniak3D format +- JPEG, PNG for Images + +Assets are cached in a content manager, which means that if you load the same asset twice, it will clone the first one. + +## Lighting + +- OmniLight - non directional light, emits light in all directions +- DirectionalLight - emits light in a specific direction, without any starting point or ending point +- ViewLight - view dependent light that will always emit from the view and into the Scene + +## Rendering + +- Z buffered rendering +- Flat shaded - single color faces +- Gouraud shaded - color can be specific on each corner of a triangle +- TextureMapping - perspective corrected, gouraud shaded. +- Lines +- Passive rendering mode - renders only when there are changes +- Bilinear filtering +- Face-culling - do not render faces/triangles facing away, can be controlled via Materials +- Frustum-culling - objects not inside view will not be rendered - increases performance a lot + +## Materials + +- Diffuse color +- Diffuse map +- Ambient color +- Specular color +- Reflection map +- Opacity for the different maps can be specified + +## Imaging + +- Supports PNG and JPEG +- For textures, you must use images with dimensions being power of 2 (2,4,8,16,32,64,128,256,512,1024 and so on) + +## Input + +- For Silverlight; mouse events are supported (MouseEnter, MouseLeave, MouseMove, MouseLeftButtonDown, MouseLeftButtonUp) +- Manipulation events for all Nodes to make it easier to interact with objects + +## Debug visualization + +- Bounding information +- Show vertices + +## Statistics + +- Rendering timing +- Amount of faces being rendered +- Amount of objects being rendered + +## Execution + +- Actor system with statemachine for actors in the scene +- Game - base class for any game + +## Silverlight / Windows Phone 7 specifics + +- Full XAML support - you can declaratively do everything that Balder can do in XAML +- Specific CoordinateAnimation that can be used in storyboards for animating properties on Nodes +- NodesControl / NodesStack - databindable controls that be bound to any source with NodeTemplate to specify its representation on screen. Similar to ItemsControl found in Silverlight. diff --git a/_posts/2010/08/mvvm-in-windows-forms/images/commandextenderprovider_command-thumb.png b/_posts/2010/08/mvvm-in-windows-forms/images/commandextenderprovider_command-thumb.png new file mode 100644 index 0000000..986d04a Binary files /dev/null and b/_posts/2010/08/mvvm-in-windows-forms/images/commandextenderprovider_command-thumb.png differ diff --git a/_posts/2010/08/mvvm-in-windows-forms/images/commandextenderprovider_selectviewmodel-thumb.png b/_posts/2010/08/mvvm-in-windows-forms/images/commandextenderprovider_selectviewmodel-thumb.png new file mode 100644 index 0000000..0e6e9a3 Binary files /dev/null and b/_posts/2010/08/mvvm-in-windows-forms/images/commandextenderprovider_selectviewmodel-thumb.png differ diff --git a/_posts/2010/08/mvvm-in-windows-forms/images/viewmodelbindingsource_properties-thumb.png b/_posts/2010/08/mvvm-in-windows-forms/images/viewmodelbindingsource_properties-thumb.png new file mode 100644 index 0000000..1fd8001 Binary files /dev/null and b/_posts/2010/08/mvvm-in-windows-forms/images/viewmodelbindingsource_properties-thumb.png differ diff --git a/_posts/2010/08/mvvm-in-windows-forms/images/windowsforms_mvvm_databinding-thumb.png b/_posts/2010/08/mvvm-in-windows-forms/images/windowsforms_mvvm_databinding-thumb.png new file mode 100644 index 0000000..10d0b13 Binary files /dev/null and b/_posts/2010/08/mvvm-in-windows-forms/images/windowsforms_mvvm_databinding-thumb.png differ diff --git a/_posts/2010/08/mvvm-in-windows-forms/images/windowsforms_mvvm_toolbox-thumb.png b/_posts/2010/08/mvvm-in-windows-forms/images/windowsforms_mvvm_toolbox-thumb.png new file mode 100644 index 0000000..3249a35 Binary files /dev/null and b/_posts/2010/08/mvvm-in-windows-forms/images/windowsforms_mvvm_toolbox-thumb.png differ diff --git a/_posts/2010/08/mvvm-in-windows-forms/index.md b/_posts/2010/08/mvvm-in-windows-forms/index.md new file mode 100644 index 0000000..681801c --- /dev/null +++ b/_posts/2010/08/mvvm-in-windows-forms/index.md @@ -0,0 +1,43 @@ +--- +title: "MVVM in Windows Forms" +date: "2010-08-31" +categories: + - "net" + - "csharp" +--- + +Not everyone has the luxury of jumping on new technologies, it can be historical reasons, don't have time to learn, deployment reasons - or flat out you simply don't like anything new :) . + +Anyways, I was doing a codereview on a project last week, which was written in Windows Forms. The developers had some pain, Windows Forms being one of them - and a constant feeling that they were barking up the wrong tree when using Windows Forms. Its been a couple of years since my last Windows Forms project, and I must admit I remember the feeling of constantly banging my head against the wall without getting the code quality I wanted when doing UI. + +One of the things I saw that the project could benefit from, was unit testing - to help them fight problems with regression, and get a constant quality indicator on the project. Having done a lot of WPF and Silverlight over the years and leaving Windows Forms behind, it just felt bad not having a proper UI pattern and I'm loving MVVM and the way it works - the simplicity of it. So I decided to do a spike, how could one implement MVVM in Windows Forms and get all the niceness of testability and full separation. + +Keep in mind, I haven't done a full implementation of a framework or anything, just the basics to get started. The one thing I wanted was to be able for the view (Form or UserControl) to be able to observe changes from a ViewModel. Windows Forms does in fact recognize the interfaces we are so familiar with from WPF and Silverlight (INotifyPropertyChanged and INotifyCollectionChanged), so it was just a matter of figuring out how to get the ViewModel easily accessible in the designer in Windows Forms. I came up with something called ViewModelBindingSource. A very simple component that can be dragged onto the designer surface: + +\[code language="csharp"\] public class ViewModelBindingSource : BindingSource { public ViewModelBindingSource(IContainer container) : base(container) { } + +private object \_viewModel; private Type \_viewModelType; + +\[Category("MVVM"), DefaultValue((string)null), AttributeProvider(typeof(IListSource))\] public Type ViewModel { get { return \_viewModelType; } set { SuspendBinding(); \_viewModelType = value; \_viewModel = Activator.CreateInstance(\_viewModelType); Add(\_viewModel); MoveFirst(); ResumeBinding(); } } + +public override object this\[int index\] { get { return \_viewModel; } set { base\[index\] = value; } } } \[/code\] + +The next thing I wanted to accomplish, was the ability to hook up Commands for Buttons and such, supporting the ICommand interface found in WPF. I came up with a CommandExtenderProvider: + +\[code language="csharp"\] \[ProvideProperty("Command", typeof(Button))\] public class CommandExtenderProvider : Component, IExtenderProvider { private readonly Dictionary \_buttonsWithCommands; private readonly List \_uninitializedButtons; public CommandExtenderProvider() { \_buttonsWithCommands = new Dictionary(); \_uninitializedButtons = new List(); } public bool CanExtend(object extendee) { return extendee is Button; } private BindingSource \_viewModelSource; \[Category("MVVM")\] public BindingSource ViewModelSource { get { return \_viewModelSource; } set { \_viewModelSource = value; InitializeUninitializedButtons(); } } private void InitializeUninitializedButtons() { foreach( var button in \_uninitializedButtons ) { var commandName = \_buttonsWithCommands\[button\]; SetCommand(button, commandName); } \_uninitializedButtons.Clear(); } \[Editor(typeof(CommandEditor), typeof(UITypeEditor))\] public string GetCommand(Button button) { if (!\_buttonsWithCommands.ContainsKey(button)) { return null; } var command = \_buttonsWithCommands\[button\]; return command; } public void SetCommand(Button button, string commandName) { \_buttonsWithCommands\[button\] = commandName; if (null == ViewModelSource || null == ViewModelSource.Current) { \_uninitializedButtons.Add(button); return; } var property = ViewModelSource.Current.GetType().GetProperty(commandName); if (null != property) { var command = property.GetValue(ViewModelSource.Current, null) as ICommand; if (null != command) { button.Enabled = command.CanExecute(null); command.CanExecuteChanged += (s, e) => button.Enabled = command.CanExecute(null); button.Click += (s, e) => { if (command.CanExecute(null)) { command.Execute(null); } }; } } } } \[/code\] + +In the designer, you'll get two new components you can then drag onto your Windows Forms design surface: + +![](images/windowsforms_mvvm_toolbox-thumb.png)Simply start by dragging in the ViewModelBindingSource and look in the Properties of it. Under the MVVM category, you'll find the property ViewModel - a dropdown were you can select the ViewModel. + +![](images/viewmodelbindingsource_properties-thumb.png)If you then drag onto the design surface a TextBox that you want to have databound to a property in the ViewModel and look in the Properties window for the TextBox. There you'll find your ViewModelBindingSource, expanding it will show all the properties available in the ViewModel: + +![](images/windowsforms_mvvm_databinding-thumb.png)For commands, we need the CommandExtenderProvider. That too can be dragged onto the surface. It has a property for selecting the ViewModelBindingSource: + +![](images/commandextenderprovider_selectviewmodel-thumb.png)Now you can add a button to the surface and go to properties, you'll find a property called Command. There you can select the command you want to be executed during Click. + +![](images/commandextenderprovider_command-thumb.png)There is still a bunch of things to be desired in order for this to fully support all aspects of MVVM. But it proves its possible to think in this way, even though your technology is not necessarily state of the art. + +Hope anyone finds this interesting. + +The source code can be found [here](http://dl.dropbox.com/u/5342359/Ingebrigtsen/WindowsForms_MVVM.zip). diff --git a/_posts/2010/08/silverlight-4-bug-in-release-mode-in-safari-chrome-on-osx/images/IsPowerOfTwoMethod.png b/_posts/2010/08/silverlight-4-bug-in-release-mode-in-safari-chrome-on-osx/images/IsPowerOfTwoMethod.png new file mode 100644 index 0000000..480246b Binary files /dev/null and b/_posts/2010/08/silverlight-4-bug-in-release-mode-in-safari-chrome-on-osx/images/IsPowerOfTwoMethod.png differ diff --git a/_posts/2010/08/silverlight-4-bug-in-release-mode-in-safari-chrome-on-osx/index.md b/_posts/2010/08/silverlight-4-bug-in-release-mode-in-safari-chrome-on-osx/index.md new file mode 100644 index 0000000..14279c5 --- /dev/null +++ b/_posts/2010/08/silverlight-4-bug-in-release-mode-in-safari-chrome-on-osx/index.md @@ -0,0 +1,16 @@ +--- +title: "Silverlight 4 \"bug\" in release mode in Safari / Chrome on OSX" +date: "2010-08-19" +categories: + - "net" +tags: + - "silverlight" +--- + +Yesterday I released a new version of the [Sample Browser for Balder](/Balder/SampleBrowser/TestPage.html) - but some of the samples just didn't work on Safari or Chrome on OSX, but worked in FireFox and Opera and all browsers on Windows (including Safari and Chrome). + +Turns out there is an accuracy issue with using the System.Math.Log() method. It produces different results on OSX in Safari and Chrome when the code is compiled in release mode. When compiled in debug, it produces the correct result. + +The method in Balder in question: + +[![IsPowerOfTwoMethod](images/IsPowerOfTwoMethod.png)](http://localhost:8080/wp-content/2010/08/IsPowerOfTwoMethod.png) By casting the Log() result to float you get past the problem. diff --git a/_posts/2010/09/book-review-microsoft-silverlight-4-and-sharepoint-2010-integration-2/images/MicrosoftSilverlight4AndSharepoint2010-223x300.png b/_posts/2010/09/book-review-microsoft-silverlight-4-and-sharepoint-2010-integration-2/images/MicrosoftSilverlight4AndSharepoint2010-223x300.png new file mode 100644 index 0000000..4124e8c Binary files /dev/null and b/_posts/2010/09/book-review-microsoft-silverlight-4-and-sharepoint-2010-integration-2/images/MicrosoftSilverlight4AndSharepoint2010-223x300.png differ diff --git a/_posts/2010/09/book-review-microsoft-silverlight-4-and-sharepoint-2010-integration-2/images/dice1-thumb.jpg b/_posts/2010/09/book-review-microsoft-silverlight-4-and-sharepoint-2010-integration-2/images/dice1-thumb.jpg new file mode 100644 index 0000000..84a8063 Binary files /dev/null and b/_posts/2010/09/book-review-microsoft-silverlight-4-and-sharepoint-2010-integration-2/images/dice1-thumb.jpg differ diff --git a/_posts/2010/09/book-review-microsoft-silverlight-4-and-sharepoint-2010-integration-2/index.md b/_posts/2010/09/book-review-microsoft-silverlight-4-and-sharepoint-2010-integration-2/index.md new file mode 100644 index 0000000..9fc2b2c --- /dev/null +++ b/_posts/2010/09/book-review-microsoft-silverlight-4-and-sharepoint-2010-integration-2/index.md @@ -0,0 +1,20 @@ +--- +title: "Book review : Microsoft Silverlight 4 and SharePoint 2010 Integration" +date: "2010-09-18" +--- + +[![MicrosoftSilverlight4AndSharepoint2010](images/MicrosoftSilverlight4AndSharepoint2010-223x300.png)](http://localhost:8080/wp-content/2010/09/MicrosoftSilverlight4AndSharepoint2010.png)I've been reading a book on a subject that is halfway interesting to me; at least the Silverlight part of it. :) Its written by [Gastón C. Hillar](http://authors.packtpub.com/content/interview-gaston-c-hillar), you'll find it [here](https://www.packtpub.com/microsoft-silverlight-4-and-sharepoint-2010-integration/book?mid=150910vu4z2x&utm_source=silverlightshow.net&%3butm_medium=affiliate&%3butm_content=other&%3butm_campaign=mdb_004719). The book is not a beginners guide to Silverlight or SharePoint, you are required to have some background with both technologies to be able to get full joy from the book. + +Even though, SharePoint is not something I normally do or find that exciting, I must admit that after reading it, Gastón has triggered me a little bit. I like the way he writes, and how he introduces things at the right pace. + +What I found great about the book is that if you're a SharePoint developer, you'll get a lot great value from this book - you'll learn a lot about the new concepts in SharePoint 2010, and also get a pretty good introduction to Silverlight development. Holding Silverlight closer to heart, I must admit I paid more attention to this. + +From a Silverlight developer point of view, with little experience in SharePoint, I felt I could have had more details about SharePoint. But then again, the goal of the book is not to make you learn either of the technologies, but to actually learn how to use them together. + +The book goes into detail about how to use the new object model for SharePoint, and how you can programmatically take advantage of all the features of SharePoint through this model. It explains in detail from the beginning how to get started to more advanced subjects. It goes into details about scalability, asynchronous UI capabilities in Silverlight and how to take the best advantage of the model. + +The only two things I really find a bit negative in the book is that some concepts felt that could have a bit more explaining, plus I personally could have used a bit more indepth on some of the SharePoint things. But all in all, I think it was worthwhile reading it and would recommend it for anyone who wants to learn more about using Silverlight inside Sharepoint. + +Rolling the dice for this one, gives the following: + +![](images/dice1-thumb.jpg) diff --git a/_posts/2010/09/jumping-the-gun-on-0-8-8-9-of-balder/index.md b/_posts/2010/09/jumping-the-gun-on-0-8-8-9-of-balder/index.md new file mode 100644 index 0000000..63da577 --- /dev/null +++ b/_posts/2010/09/jumping-the-gun-on-0-8-8-9-of-balder/index.md @@ -0,0 +1,10 @@ +--- +title: "Jumping the gun on 0.8.8.9 of Balder" +date: "2010-09-17" +--- + +Its over a month ago I announced 0.8.8.9 of [Balder](http://balder.codeplex.com) coming along. That after having 2 week iterations on releases. Its the case of "just want to get that feature done", "just want to fix that bug", combined with a lot of other work, non-Balder related, thats causing a delay. + +Meanwhile, the source is in constant move and a lot has happened since 0.8.8.8. + +Hopefully, next week will see the release of the new version. diff --git a/_posts/2010/09/loading-files-from-other-places-than-the-xap-package-with-balder/index.md b/_posts/2010/09/loading-files-from-other-places-than-the-xap-package-with-balder/index.md new file mode 100644 index 0000000..f82e30d --- /dev/null +++ b/_posts/2010/09/loading-files-from-other-places-than-the-xap-package-with-balder/index.md @@ -0,0 +1,33 @@ +--- +title: "Loading files from other places than the XAP package with Balder" +date: "2010-09-18" +--- + +One of the more common feature request of Balder has been to be able to load files from anywhere. Although it is a commonly requested feature, there are a whole set of other features that is constantly getting more priority than this. Until tonight. + +I had 30 minutes to spare and was able to get it done, at least so anyone can start extending on this themselves. + + +Balder is using something its calling a FileLoader, defined through the interface IFileLoader. Till tonight, there could only be one FileLoader, and it was defined by the Platform. What I've implemented tonight is the ability to define your own FileLoaders. + +All you need to do is to implement the interface IFileLoader anywhere in any assembly of your application, just make the implementation public. Balder will discover anything that implements IFileLoader and add it as a potential loader. + +In the interface you'll find one very important property you need to implement; SupportedSchemes. It returns an array of strings that represents the URI schemes that the loader supports. Nevermind the Exists() method for now, it is not being used yet - but will in the near future, so mind it again at a later stage. :) + +The schemes you return should only be the name of the scheme, without the "://" part of the URI. When you then want to assets into Balder, either in your Xaml or programatically, you just create the assetname as follows : "://". For instance, if you were to create a WCF loader : + +\[code:c#\] +public class WcfFileLoader : Balder.Content.IFileLoader +{ +public Stream GetStream(string fileName) +{ +// Do magical WCF calls and return a stream +} +public bool Exists(string fileName) +{ +// Do some more magical WCF calls and return wether or not the file exists +} +public string\[\] SupportedSchemes { get { return \[\] { "wcf" }; } } +\[/code\] + +The filename would then be something like : "wcf://my3DModel.ase". diff --git a/_posts/2010/09/windows-azure-introduction-course/images/812ac685-e1d0-4b5a-bafc-c1203c41fddc1-thumb.jpg b/_posts/2010/09/windows-azure-introduction-course/images/812ac685-e1d0-4b5a-bafc-c1203c41fddc1-thumb.jpg new file mode 100644 index 0000000..2fb0886 Binary files /dev/null and b/_posts/2010/09/windows-azure-introduction-course/images/812ac685-e1d0-4b5a-bafc-c1203c41fddc1-thumb.jpg differ diff --git a/_posts/2010/09/windows-azure-introduction-course/index.md b/_posts/2010/09/windows-azure-introduction-course/index.md new file mode 100644 index 0000000..12dd151 --- /dev/null +++ b/_posts/2010/09/windows-azure-introduction-course/index.md @@ -0,0 +1,17 @@ +--- +title: "Windows Azure - Introduction course" +date: "2010-09-14" +categories: + - "azure" + - "cloud" +--- + +This fall I've been asked by Microsoft to hold a free introduction course in Windows Azure. Its a subject I find very interesting and really looking forward to be talking about. + +The date is 5th of October and will be held at Microsoft Norway in Oslo. + +I'll also have deep dive courses later this fall and winter, but I'll have to get back with details on when that will happen. + +Anyways, save the date and register online already today [here](https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032461924&EventCategory=1&culture=nb-NO&CountryCode=NO). + +![](images/812ac685-e1d0-4b5a-bafc-c1203c41fddc1-thumb.jpg) diff --git a/_posts/2010/10/balder-licensing/index.md b/_posts/2010/10/balder-licensing/index.md new file mode 100644 index 0000000..1168fe4 --- /dev/null +++ b/_posts/2010/10/balder-licensing/index.md @@ -0,0 +1,19 @@ +--- +title: "Balder - licensing" +date: "2010-10-30" +--- + +I've been back and forth so many times with trying to come up with a good licensing model for Balder and have decided to keep the Ms-PL license, with one exception. Anyone creating commercial libraries that is based partly or fully on Balder and is monetized, must obtain a commercial license. + +Licenses can be requested at : license@dolittle.com. + +At the moment, the [Balder codeplex site](http://balder.codeplex.com) is not reflecting the change. Its on its way and will be reflected in a couple of days. + + +So, why am I sticking with it and not trying to make any money from the library directly, you might ask. Well, I figured I'd go a different route. Keep the library open and free, but create commercial tools that extends Balder instead. I have a few ideas about this, especially around Blend and creating a unique experience there. More than the design-time support I've already planned to go into Balder directly. + +Also, I'll be setting up the possibility to donate to the project. I'll get back with more details about that, and why a donation would be good. + +I'm also looking at the possibility to provide consultancy services and commercial licenses with dedicated support option as well. + +**UPDATE: Codeplex site is now updated and reflecting the new Licensing model. Also the licensing file in the repository is updated.** diff --git a/_posts/2010/10/finally-its-here-balder-0-8-8-9/index.md b/_posts/2010/10/finally-its-here-balder-0-8-8-9/index.md new file mode 100644 index 0000000..ca00cee --- /dev/null +++ b/_posts/2010/10/finally-its-here-balder-0-8-8-9/index.md @@ -0,0 +1,41 @@ +--- +title: "Finally, its here... Balder 0.8.8.9" +date: "2010-10-07" +--- + +Ever since I started blogging and talking about this release back in August, I have simply not had the time to get it out the door. Always a little something I wanted to fix, or my daytime job getting in the way. Anyways, finally managed to get it out the door today. Pick it up at the [Balder site](http://balder.codeplex.com). + +The following list are the changes : + +- Perspective corrected texture mapping +- perspective corrected Z buffering +- Dual texture support with mixing +- Enhanced material support +- Shaded textures, flat + gouraud +- Rewritten lighting code for rendering +- New skybox, utilizing perspective projection in Silverlight +- Bilinear filtering +- Performance enhancements +- Subpixel rendering +- Multiple games in one page +- Clearer exceptions +- InstancingNodes - faster bindable solution +- Extensible FileLoader support - one can load from anywhere +- ChamferBox primitive type +- Vertex coloring support - reads vertex colors from ASE files +- Multi/Sub material rewritten - faces no longer has Material, but a Id reference instead +- Wireframe support for Materials +- Statistics added +- Shine + ShineStrength for materials added +- Color manipulation optimized, using integers +- Smoothing group fix for primitives Cylinder and Ring +- Optimized heightmap +- CLUT system removed - too slow +- Frustum clipping of objects +- Matrix optimized - going for the solution most use, public fields instead of array as before +- Started implementation of MipMap levels for textures +- Rewritten texture system - introducing the concept of map +- More details on ManipulationEvents +- Optimizations for Windows Phone 7 +- Added more unit tests +- Optimized mouse intersection with objects diff --git a/_posts/2010/10/one-of-the-winners-of-the-windows-phone-7-competition/index.md b/_posts/2010/10/one-of-the-winners-of-the-windows-phone-7-competition/index.md new file mode 100644 index 0000000..be79526 --- /dev/null +++ b/_posts/2010/10/one-of-the-winners-of-the-windows-phone-7-competition/index.md @@ -0,0 +1,10 @@ +--- +title: "One of the winners of the Windows Phone 7 competition" +date: "2010-10-01" +--- + +Earlier this year, Microsoft announced a [competition](http://appkonkurranse.spaces.live.com/) for creating a Windows Phone 7 app. Yesterday it was announced that I was one of 3 lucky winners of the competition, the two other winners being [Sigurd Snorteland](http://sigurdsnorteland.wordpress.com/) and [Ronny Gydar](http://gydarindustries.com/). The grand prize; a Windows Phone 7 device. + +The results were announced at the [Windows Phone Developer Community meetup](http://www.meetup.com/Windows-Phone-Developer-Community/) yesterday. + +Thanks a lot to the jury for picking my app as one of the winners, and to the sponsor of the hardware for providing the phones - that will be in my mailbox soon, I've been told. Can't wait to get my hands on it. diff --git a/_posts/2010/11/azure-introday-stavanger-norway/index.md b/_posts/2010/11/azure-introday-stavanger-norway/index.md new file mode 100644 index 0000000..62dad77 --- /dev/null +++ b/_posts/2010/11/azure-introday-stavanger-norway/index.md @@ -0,0 +1,12 @@ +--- +title: "Azure Introday - Stavanger, Norway" +date: "2010-11-17" +categories: + - "azure" +--- + +Want to get a glimpse of what Microsoft Azure is all about and happen to be around Stavanger, Norway at the 15th of December this year. + +I'm holding a introday in Stavanger, Norway focusing on Azure and getting you up to speed with all you need to know to build your own Web application hosted in Azure using the facilities that Azure provides. + +For more info and registering, please go [here](https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032471083&EventCategory=1&culture=nb-NO&CountryCode=NO). diff --git a/_posts/2010/11/pc-manufacturers-get-a-grip/images/1-thumb1.jpg b/_posts/2010/11/pc-manufacturers-get-a-grip/images/1-thumb1.jpg new file mode 100644 index 0000000..192b079 Binary files /dev/null and b/_posts/2010/11/pc-manufacturers-get-a-grip/images/1-thumb1.jpg differ diff --git a/_posts/2010/11/pc-manufacturers-get-a-grip/images/image-thumb.png b/_posts/2010/11/pc-manufacturers-get-a-grip/images/image-thumb.png new file mode 100644 index 0000000..2c8422f Binary files /dev/null and b/_posts/2010/11/pc-manufacturers-get-a-grip/images/image-thumb.png differ diff --git a/_posts/2010/11/pc-manufacturers-get-a-grip/index.md b/_posts/2010/11/pc-manufacturers-get-a-grip/index.md new file mode 100644 index 0000000..b68a1e2 --- /dev/null +++ b/_posts/2010/11/pc-manufacturers-get-a-grip/index.md @@ -0,0 +1,36 @@ +--- +title: "PC manufacturers - get a grip..." +date: "2010-11-20" +categories: + - "general" +--- + +First of all, this is not a religious post. Its not a PC vs Mac post, I'm just fed up with the quality of hardware the PC manufacturers are putting out there. + +2.5 years ago I switched from being a "PC guy" to my first Mac, and I was really impressed with the quality of the hardware and how it felt. It just felt solid. At that point I was very frustrated with the quality of PC hardware and constant trouble with both desktops and laptops I had bought for home use, but also at work. And I figured it was time to try something else. I was very happy with my switch. + +About 2 months ago I decided to go out and buy a PC. Basically I needed it for Windows Phone 7 development, as the emulator for WP7 doesn't work with my virtualization software on the Mac, and also being out in the field doing quite a bit of work for Microsoft, I grew tired of having to have my MacBook Pro taking so much attention. + +I researched quite a bit, I wanted a PC that looked nice, had the right spec in terms of performance and memory and also I was looking for one with similar keyboard as on the MacBook Pro - separated keys, as I find that type keyboard to be very efficient to write on. After a long look, I settled in on the HP Envy 17". + +![](images/1-thumb1.jpg) +Looks nice, felt nice all the way from the packaging. Specs was awesome at the price they are selling it for. Got it and was really psyched (I LOVE HARDWARE). Turned it on; it was realllllly slow and the fan was going completely mad. Figured it might be a software issue, reinstalled windows looked for firmware updates, but didn't work out at all. Sent it back and got a new one within days. The new one was silent and very snappy, I was happy. + +Since the PC will not serve as my main computer, I didn't get to use it much and it took a few days before I discovered an issue with it. Turns out that the keyboard was not mounted properly, so it was sticking out on one side and looked really bad (at least after one discovers it). Since one of my criteria was esthetics when buying a new computer, this drove me insane. Discovering this, I really started to look at the rest of the computer and really compare it to my MacBook Pro and I found more annoying things with it, not flaws, just things that annoyed me. Firstly, why is it that the screen on my MBP is about 1cm (half an inch) thick and on the Envy it was about double of that. Why did it weigh more than my MBP. Why wasn't it a unibody design. Plastic feeling.. Arghhh.. I was really annoyed with it. Sent it back, and got my money back this time. Didn't want to try out a third HP. + +Went back to my research and looked for a day or so, looked at Dell - they had a few nice ones, but not in stock and frankly I wanted the hardware NOW. Settled in on what I really wanted to buy before I bought the Envy; a Sony Vaio. It looked nice, fit the pricerange, had almost the specs I wanted. + + +![](images/image-thumb.png) +What could go wrong. Well a lot, it turns out. The hardware seems quite OK, the build is not too shabby, very plastic, but I could learn to live it. But still, too thick monitor. +Turning it on, booting into Windows, doing all the necessary initial settings for Windows and a Vaio wizard. First thing I started noticing, the screen - its really not bright as I expect. The Envy was really bright and crystal clear, this was dimmed. Figured it must be a setting. Nope. Then I started getting really annoyed with all the stickers I have to remove from the computer. It looks like a christmas tree. Flashy intel sticker, nvidia, windows, big fat Sony Vaio F-Series sticker, bluetooth and what not. Then I started noticing the fan constantly working - even when completely idle. Don't know why, can't figure out why. Sometimes it turns off, but for the most part you can hear it. I'm not used to that. + +Getting over the fact that the hardware does not feel solid, and clearly lacks the production quality that I've grown used to from Apple, there is one more thing that really bugs me with PC manufacturers. Why are you putting all that crappy software on the machines. They come preinstalled with something like 50 apps, and they are mostly crappy. I can see why Microsoft wants to get them to realize they're ruining the Windows experience, because they really are! And most users don't necessarily know how to get it off their computer. + + +One of the arguments I hear from people about Apple computers, are that they are so expensive. This is something I don't quite get. Going on my quest to find a PC I was aiming around the price range the MBP 15" is at. Sure, both the Envy and the Vaio have a few more features (a ton of connectors on both sides). But when the quality is so bad and their products aren't coming across as solid work - I really don't get it. For the most part I will not be needing all those added features (eSATA for one). I'm more than happy to add $100-$200 on the price if that means I get a computer that just works. You'd probably argue that Apple has their problems as well, sure they have. They've had bumps in the road for their hardware as well, but compared to PCs for my sake at least, I've not had anything but bumps in the road buying PC hardware. I've bought 5 Apple computers in 2.5 years and not had any problem with any of them. In the same timeframe I've bought 4 PCs, and had issues with all of them. So in my book thats pretty bad! + + +My comment to the PC manufacturers; GET A GRIP. Start delivering quality hardware, stop creating bad user experiences by putting a shitload of software on them. Focus on the end-user!! + +I will be sticking with the Vaio, not because I want to - but I really don't see a good alternative, at least not for the type of design I want for my computer (I don't want a Lenovo, because I think they look like crap). diff --git a/_posts/2010/11/the-fall-and-rise-of-microsofts-ux-platform-pun-intended/index.md b/_posts/2010/11/the-fall-and-rise-of-microsofts-ux-platform-pun-intended/index.md new file mode 100644 index 0000000..a2681cf --- /dev/null +++ b/_posts/2010/11/the-fall-and-rise-of-microsofts-ux-platform-pun-intended/index.md @@ -0,0 +1,24 @@ +--- +title: "The fall and rise of Microsoft's UX platform (pun intended)" +date: "2010-11-01" +--- + +The last couple of days in the aftermath of PDC 2010 has been quite stressful. Mary Jo Foleys [posted](http://www.zdnet.com/blog/microsoft/microsoft-our-strategy-with-silverlight-has-shifted/7834) an interview with Bob Muglia about Microsoft shifting in their strategy for Silverlight. With the [post](http://www.riagenic.com/archives/363) [series](http://www.riagenic.com/archives/398) by [Scott Barnes](http://www.riagenic.com) as a backdrop, it sure looked pale for Silverlight - on the outside. + +It wasn't so much the article itself from Mary that screamed death - but all the interpretations of the content. Sure, it was easy to read into it that this could mean that Microsoft was in fact dropping Silverlight all together - except for on the Windows Phone 7 platform. + +Today, Bob Muglia has published the following [statement](http://team.silverlight.net/announcement/pdc-and-silverlight/), that should clear up any misunderstanding. + +> Make no mistake; we'll continue to invest in Silverlight and enable developers to build great apps and experiences with it in the future. + +Also, Steve Ballmer has a [PDC Thoughts](http://www.microsoft.com/presspass/press/2010/nov10/11-01Statement.mspx) statement about this. + +Tim Heuer, Silverlight program manager has invested a lot in the success of Silverlight, his post about this can be found [here](http://timheuer.com/blog/archive/2010/11/01/silverlight-is-dead-long-live-silverlight.aspx). + +Back in September, the Silverlight team blogged about the [future of Silverlight](http://team.silverlight.net/announcement/the-future-of-silverlight/). And you might find the interview with [Scott Guthrie on Silverlight TV](http://johnpapa.net/silverlight/silverlight-tv-50-scott-guthrie-discusses-the-state-of-silverlight/) interesting as well, just a couple of days prior to PDC. + +During PDC2010, Microsoft announced a completely redesigned portal for Windows Azure, based on Silverlight (Azure announcements [here](http://www.msigeek.com/6387/windows-azure-roadmap-and-announcements-microsoft-pdc-2010)). This comes in addition to a set of other tools for Azure already built on top of Silverlight. One little tidbit to mention also, is that PDC2010 had all its online content delivered through Silverlight as well. + +So - fear not, Silverlight is far from dead! + +**UPDATE: Scott Guthrie also posted a [post](http://weblogs.asp.net/scottgu/archive/2010/11/04/silverlight-questions.aspx), answering questions about Silverlight.** diff --git a/_posts/2010/11/workshop-at-oredev/index.md b/_posts/2010/11/workshop-at-oredev/index.md new file mode 100644 index 0000000..57d4bbc --- /dev/null +++ b/_posts/2010/11/workshop-at-oredev/index.md @@ -0,0 +1,8 @@ +--- +title: "Workshop at Øredev" +date: "2010-11-06" +--- + +On a very short notice - I agreed yesterday (Friday) to do a workshop at Øredev 2010, on Monday. The workshop is called ["Getting Started with Silverlight Development"](http://oredev.org/2010/sessions/getting-started-with-silverlight-development). [Jeff Wilcox](http://www.jeff.wilcox.name/) from Microsoft will be doing a parallel track, focusing on Windows Phone 7, my workshop will be focusing on Silverlight on the web and desktop. + +Really looking forward to be part of this. diff --git a/_posts/2010/12/new-year-already/images/Balder_Screenshot_December1.png b/_posts/2010/12/new-year-already/images/Balder_Screenshot_December1.png new file mode 100644 index 0000000..9f8e066 Binary files /dev/null and b/_posts/2010/12/new-year-already/images/Balder_Screenshot_December1.png differ diff --git a/_posts/2010/12/new-year-already/index.md b/_posts/2010/12/new-year-already/index.md new file mode 100644 index 0000000..bbf9981 --- /dev/null +++ b/_posts/2010/12/new-year-already/index.md @@ -0,0 +1,32 @@ +--- +title: "New year, already?" +date: "2010-12-31" +--- + +This is one of those classical summaries done by most bloggers around the world; what did I do in 2010 and whats going on in 2011. + +2010 is probably the year, in my life at least, that went by the fastest. So much happened, and for the most part only positive things. + +**Balder** I started off 2010 with the greatest kickstart of the [Balder project](http://balder.codeplex.com) - after some idle time on the project, I was approached by a US based company called [Sapient](http://www.sapient.com/). They were working with a client that wanted 3D on the Web. The project is still undisclosed, so I can't talk about it. They signed me on for doing adjustments to Balder and getting the library up to speed with what they needed and also get it more performant. This was truly a gift to me and the project itself. Since January I've been working a lot with the library and am very proud of what has been accomplished. Mid 2010, I was approached by Clint Rutkas - the guy in charge of the Coding4Fun articles. We agreed on writing an article utilizing Balder, and later we agreed on making the same sample work on the Windows Phone 7, which resulted in a partial port of Balder to Windows Phone 7. The article was about creating a Rubiks Cube in 3D, but was later removed due to licensing infringement. + +[![Balder_Screenshot_December1](images/Balder_Screenshot_December1.png)](http://localhost:8080/wp-content/2010/12/Balder_Screenshot_December1.png) + +With the [Firestarter](http://www.silverlight.net/news/events/firestarter/) event in December, Microsoft announced Silverlight 5 and its [feature list](http://weblogs.asp.net/scottgu/archive/2010/12/02/announcing-silverlight-5.aspx), which is quite awesome - to say the least, and especially interesting for Balder, as they're providing an immediate mode API for doing hardware accelerated 3D. 2011 will be a very exciting year for Silverlight and Balder, really looking forward to getting my hands dirty with this. + +**Silverlight** The biggest thing in my Silverlight part of life was the renewal of my MVP status, thanks a lot for the acknowledgement - very proud to be part of such a fine group of developers that the Silverlight MVP group consist of. + +**Courses** I started in 2010 doing quite a bit of courses in Silverlight for different clients, which is something I've grown to love more and more, in fact, I signed on with a Norwegian company specializing in courses called Programutvikling and will be doing more courses in 2011, not only Silverlight, but also WCF and Azure, and maybe other things as well. + +**Talks** 2010 also gave me quite a few opportunities to talk about some of my favorite subjects, at user groups, for companies and conferences. I've done quite a few for Norwegian user groups this year with Silverlight and game development as the primary subjects. I also had a chance to talk at [Øredev](http://oredev.org/2010/speakers) in Sweden, stepping in for [Tim Heuer](http://timheuer.com/blog/) because of illness, and did a full day of Silverlight together with [Jeff Wilcox](http://www.jeff.wilcox.name/). That was truly awesome, but kinda stressful - got a 2 day notice for that one, and had to break apart content I had and create new content and prepare. The second half of 2010 I started doing some talks on Microsofts cloud platform; Azure. I've been working closely with Microsoft Norway and we've put up two full days were in Oslo and Stavanger in Norway were I've been talking about the platform. More to come of this in 2011. + +**NDC 2011** The last couple of years, [Norwegian Developers Conference](http://ndc2011.no/) has been held in Oslo - getting a lot of attention from Norwegian developers and have also grown to get participants from all over the world. The reason for this I think lies with the speakers and subjects, its not a bunch of sales pitches, but rather a venue for talking about code quality and best practices. I was approached late 2010 if I wanted to be part of the planning of 2011 and be on the committee, an honor to be asked and I agreed to join in. Also, I'll be speaking at NDC 2011. So that will really be exciting in 2011. + +**Bifrost** Back in 2008 I started an open source project called [Bifrost](http://bifrost.codeplex.com), the primary objective was to abstract away some of the tedious bits I encounter in most projects I work on. The last couple of months, this project has been completely revived and is now on a full-steam ahead path. Today it is moving towards solving things like CQRS in a nice to use fashion and making it simpler to create highly scalable and structured solutions. You'll find the project over at [Codeplex](http://bifrost.codeplex.com). + +**Expanding the horizon** I set out this year with a goal of learning new things, as I do every year or should I say every day. Learning new things is one of the key elements that I love being a developer. This year I learned a lot, but I think the biggest thing personally would be that I picked up Ruby and immediately fell in love. Ruby is something I really want to explore more in 2011. + +  + +2011 is already looking like a truly awesome year, a lot going on, and a lot that I can't talk about yet - but rest assure, I'll talk about it as soon as I can. + +**HAPPY NEW YEAR EVERYONE!!** diff --git a/_posts/2011/01/balder-a-developers-confession/index.md b/_posts/2011/01/balder-a-developers-confession/index.md new file mode 100644 index 0000000..80600fa --- /dev/null +++ b/_posts/2011/01/balder-a-developers-confession/index.md @@ -0,0 +1,12 @@ +--- +title: "Balder - a developers confession" +date: "2011-01-10" +--- + +For those of you using Balder, you might have seen that 2010 had quite a boost in development for the library, with features being added almost daily, and then all of a sudden it came to a halt. + +The last couple of months has been very very busy, its not an excuse - just the hard facts. And the last month or so I really haven't had the energy to do much on Balder. + +This however is about to change. I will be focusing a lot more of my energy and time back onto Balder. There are still a few things that need to be done, not to mention some architectural preparations for SL5, when it comes with hardware 3D rendering. + +So, please stay tuned. There is more to come. :) diff --git a/_posts/2011/01/balder-looking-for-developers-and-other-contributors/index.md b/_posts/2011/01/balder-looking-for-developers-and-other-contributors/index.md new file mode 100644 index 0000000..ce639c4 --- /dev/null +++ b/_posts/2011/01/balder-looking-for-developers-and-other-contributors/index.md @@ -0,0 +1,33 @@ +--- +title: "Balder - looking for developers and other contributors" +date: "2011-01-11" +--- + +[Balder](http://balder.codeplex.com) is a very ambitious project - or at least with all the ideas I have in my head for the project, it is very ambitious. In order to fulfill its ambitiousness (is that a word?), we're looking at getting contributions to the projects. + +There are multiple ways one can contribute, you could fork the project at Codeplex and commit to your own repository and request pulls from your fork. You could work on your own local repository, do changes and create bundles with changesets that you can post on the forum or email us and we'd look at the changes. + +The last option is the new job opening for the project. We will not let everyone in on this option, in fact we'd prefer to have you go through the forking process - and we'll be very happy to help you go down that path and get you started contributing like that. The reason we'd prefer that is to have a bit more control over what goes into the repository and what doesn't. If you constantly deliver quality work, we can upgrade the trust level and let straight into the main repository. + +So, what are we looking for getting help on. + +Well, just about everything. There is a lot of work needed to be done, and the roadmap for the [first half of 2011](/post/2011/01/10/Balder-Roadmap-first-half-2011.aspx) shows a little bit of it. + +In addition to the roadmap, there are a few other things we need focusing on as well : + +**Blend support +**Full designtime support in Blend and Visual Studio 2010. The designtime support should utilize WPF and hardware accelerated graphics, to not slow down the designers of Blend and VS2010. + +**Desktop (WPF + Xna)** +In order to fulfill the ideas behind the Blend support, full WPF support would be preferred. Full cross platform support between Silverlight and WPF is something of a dream for the project. Extending this to XNA is also part of that same cross-platform story. + +**OpenGL** +Full support for OpenGL running on Mono + +**iOS** +Utilizing the same OpenGL support just running on MonoDroid. + + +To mention but a few things. + +There are also less hardcore things we need help on, such as creating tutorials, WebCasts, documentation, build scripts, more samples in the sample browser, code cleanup, unit tests, porting tests to Specs using MSpec. In addition, answering forum posts is also something that we need help on. The forum is very much alive and giving help and also providing feedback to development as well as registering problems with the issue tracker from forum posts are something that is very welcome. diff --git a/_posts/2011/01/balder-roadmap-first-half-2011/index.md b/_posts/2011/01/balder-roadmap-first-half-2011/index.md new file mode 100644 index 0000000..a53ca8f --- /dev/null +++ b/_posts/2011/01/balder-roadmap-first-half-2011/index.md @@ -0,0 +1,39 @@ +--- +title: "Balder - Roadmap first half 2011" +date: "2011-01-10" +--- + +Some of you might be wondering what is on the Agenda for Balder in 2011. One of the core focus areas is to get the library to a level were it is easier to get people onboard and have more resources contribute to the project. In order to do that, some things has to be streamlined a little bit better, this is typically documentation, but also get things like a proper build server up and running and get continuous integration working. + +**Documentation** +\- Architectural documentation of the entire library +\- Getting started guides +\- Simple tutorials +\- Xml comments in all of the code + +**Bugs** +\- Clipping, near-plane clipping issues +\- BoundingSpheres +\- Improved ASE loading, fix silly bugs +\- Camera bug fixes + +**Features +**\- Transparent rendering +\- Multithreaded rendering +\- DesignTime support - at least objects should be visible +\- Full Xna support - (Windows, Xbox, WP7) +\- WP7 Hybrid Mode - Xaml based, but no Silverlight elements on top +\- WP7 Pure Mode - 100% programatic, no Xaml. +\- Animation +\- 3DS file loader +\- Async loading support + +**Samples** +\- Coverflow + +**General +**\- Optimizations + +This might look like much - but trust me, most of them are quite big issues to handle. This is at least the goal, no guarantees that this will be the end result when we approach summertime 2011 - but heres to hoping! + +Also, I know there are a few feature requests for Balder, and a also a set of bug-fixes needed. Some of these might be done when doing something else. The list above is basically based upon prioritizing registered cases at the Balder site, discussions on the forum and email I've received directly. So please don't get mad if you don't see a feature or bug you'd like done in this timeframe. diff --git a/_posts/2011/01/religious-technology/index.md b/_posts/2011/01/religious-technology/index.md new file mode 100644 index 0000000..cc95d9e --- /dev/null +++ b/_posts/2011/01/religious-technology/index.md @@ -0,0 +1,40 @@ +--- +title: "Religious technology" +date: "2011-01-22" +--- + +I guess its in the human nature to latch on to things and like it to death. When doing this, we as humans tend to take things we like and don't like anything else within the same category - I guess with the exception of food. This is something I think can be multiplied as a truth by 10 for technologists. We tend to find a piece of technology and really go out of our way to show others how good it is and how much competing technologies in the same category suck. I do this myself way too often, and I scare myself when doing it. + +**Operating Systems** +Take operating systems, this category is probably the one with the biggest amount of fanboys in it. Windows guys will automatically dismiss OSX and Linux and vice-versa. In my opinion only a select few can agree that they all have their strengths and weaknesses. Some 3 years ago, I was the Windows version of this. I couldn't really see why anyone would even bother considering anything but Windows - till Vista made my computers miserable and I decided to try out Mac and OSX. Now, 3 years later - I scare myself in some ways with how much I have "switched" and deploy only Apple based hardware and software in my home. I say to myself; Apples stuff just works. To some extent this might be true - but trust me, there are issues with their stuff as there are with just about anything out there. I'm not necessarily so audible about my Apple likings, I'm not trying to convince people to switch - but I find myself losing perspective. When I embarked on the OSX journey 3 years ago, it was also in an attempt to broaden my horizon and leave my comfort zone, in fact I had a plan about not having a comfort zone at all. Now it seems that I'm well on my way establishing a new comfort zone - so time to break out of the new habits and yet again broaden my horizon; meet Linux. + +The first time I tried Linux was back in the beginning of Red Hat days (if my memory serves me correct, around 1994 / 1995). Back then it was a bit of a pain getting all hardware working with it, so my project of becoming a Linux user was soon abandoned. Nowadays, its a far better story just taking any computer and putting any Linux distro on it. So, yesterday I decided to take my Windows Laptop and stick Ubuntu on it. It took me some 3 minutes to download it and another 7-8 minutes installing it and just about everything worked. In fact the only thing that didn't work out of the box was the trackpad. Not too stressed about that, since the trackpad on my laptop is not something I use anyways. But I know I can get it working if I just put some effort behind getting it to work. + +Booted up and went to the software center and installed what I needed - basically to start with, I just needed something familiar to latch onto and got MonoDevelop to just see some C# code running. Quite happy with the experience so far. + + +**Programming Languages** +Another aspect I see when talking to people when doing presentations or classes is the idea of the programming language they have chosen to be the only programming language that could solve their tasks. The most common thing I hear is the why C# is so much better than VB.net, and almost just as common coming from people who have yet to write a single line of VB.net code. Bringing in languages such as Ruby, Python or even Javascript - a lot of guys are just grinning and coming with remarks such as; you wouldn't do serious enterprise development in either of those languages. The latter one I'm guilty of myself. Javascript has long been something that I really couldn't get anyone doing. So, the cure for myself is to start writing Javascript and get to know it better than I do. There has to be a reason why so many are using it, and it can't be just that its the only client side language working in a browser that is the reason. It must have qualities beyond this, and I've realized working with Javascript the last year or so that it is in fact quite a cool language to work with. Different from what my comfort zone has been defined to be, but getting to know it, its quite cool. The same goes for Ruby, a language that I fell in love with after reading samples for 5 minutes. And yes, both of these can be used in professional software development and actually solve real business needs. I think for the category of programming languages, as with operating systems, its not that one suck more than other, they're just different. They are different in how you write code in them, and therefor there are different ways of achieving the same goals, and also very often there are different workflows to writing code. Saying that one is better than the other is something at least I will stop doing. I will instead try to focus more on picking the right tool for the right job. + + +**Source Control** +Here's a subject I have so far in my career always considered to be something I really don't care about. Just show me the tools and give me the URL for the repository and I'll start committing code. But this turns out to be something that people also gets a religious view on. My view on it has always been that its a tool for collaborating with others and also at the same time hold history of what the team is doing. Recently, in the .net world, the concept of distributed source controls has really taken off - with a good reason. They do in fact solve things that more traditional source control software doesn't, or as I'd rather say - they are doing things differently and opening up for different ways of working. I've been using Git and Mercurial the last couple of years and for the way I work with code, they have yet to solve anything for me personally. But I carry on using them in order to see if they will eventually solve something for me - again, there must be a reason why so many are embracing them. One thing I do see though, is for open source projects and distributed teams - these kind of source control systems really do solve things, and I have in fact taken advantage of a few of the features they have for these particular scenarios. The thing I'm having trouble with seeing though, is how they would be superior in a on-premise situation were the entire team is located on the same location and working together. To me there seems to be a bit too much ceremony and unsolved issues such as continuous integration with multiple branches and such. This could of-course boil down to how one works with them, but it seems to me that there is quite a big gap in the tooling experience for these. Something the more established source control systems have more right. I'm still following this track and will look for the revelation. It might come to me, or it might not. I'm open. + +** +The list goes on...** +I could probably carry on this list forever : + +Flash vs. Silverlight vs. HTML 5 +SQL vs. NoSQL (Document or Object - based DBs) +OpenGL vs. DirectX +Java vs. .net + +...and so on. But really, is it really all these things that matter when we're trying to do our job? Me thinks not. For a software developer, I think it is far more important to identify the needs of the people we're creating software for and solving them in a timely fashion with code that is maintainable. My core values as a software developer is to be sure I deliver quality software - by quality software I do mean something the users agree on is good. Good in the sense that it is user friendly, but also good in the sense that it is considered stable. To accomplish this, I chose to be sure I write my code in a certain manner with certain mechanisms to try and make the code stable. I also demand that I get to work more closely with the users that will be using the software or a representative of those users to be sure I am delivering something they can in fact use and consider user friendly. + +One thing I've learned throughout the years; t here are so many people out there who are smarter than me. Sure, I am guilty of sitting there thinking I'm the smartest in a few discussions, but thats just part of being human (isn't it..?? :) ). + + +**Pragmatism** +A turning point for my own religious technology beliefs was when I read the "[Pragmatic Programmer](http://www.pragprog.com/the-pragmatic-programmer)" a few years ago. Its doing a very good job of lifting up your head just enough to get interested in expanding your comfort zone. My goal as a developer is to be pragmatic as to what technology I chose for a specific task, what tools I use, what operating system I do them on - and instead focus on the bigger picture. This is what I define as pragmatism. To me, its not important what tools you use, but how you use those tools. If you're able to build a house without using a hammer but a stone as your tool instead, so be it - as long as the result is a good quality house. + +My ultimate goal; have no comfort zone, become a technology atheist - learn learn learn, try and fail and learn some more. We as software developers are in a unique position to do this, its a young industry we can chose to take part in shaping it or not. I chose to at least try to take part. diff --git a/_posts/2011/01/welcoming-a-new-developer-to-the-balder-team/index.md b/_posts/2011/01/welcoming-a-new-developer-to-the-balder-team/index.md new file mode 100644 index 0000000..ea95ae9 --- /dev/null +++ b/_posts/2011/01/welcoming-a-new-developer-to-the-balder-team/index.md @@ -0,0 +1,15 @@ +--- +title: "Welcoming a new developer to the Balder team" +date: "2011-01-01" +--- + +Happy new year to everyone! +I'm starting off 2011 with brilliant news. + +For the most part, in fact 99.9% of Balder, I have been the sole developer. I've had some help with some of the math from friends and contributors, and some contributions has come along the way in the form of emailed source files or patches - and I'm truly thankful for all of this! + +In the middle of December 2010 I started a dialog with Rui Silvestre who has been using Balder for their company [YDreams](http://www.ydreams.com/), and he agreed to join the team and contribute more directly to the project. + +So a big warm welcome to Rui. + +In other news, documentation is something that has been neglected for quite a while. The focus on creating new features at the highest pace has been the focus. This is about to change, intellisense enabled documentation through XML comments in the code as well as more detailed documentation is underway. Hopefully this documentation will both be helpful for adopters of Balder, but also helpful for those who want to contribute to the library. diff --git a/_posts/2011/02/balder-nominated-for-niney-awards/index.md b/_posts/2011/02/balder-nominated-for-niney-awards/index.md new file mode 100644 index 0000000..b5e0911 --- /dev/null +++ b/_posts/2011/02/balder-nominated-for-niney-awards/index.md @@ -0,0 +1,10 @@ +--- +title: "Balder nominated for Niney Awards" +date: "2011-02-04" +--- + +Much to my surprise I learned a couple of days ago that [Balder](http://balder.codeplex.com) has been nominated for something called the 2010 Niney Awards in the "Favorite Codeplex Project" category, a true honor I must add and thanks for the nomination. + +The voting for the entries are community based, so don't be afraid to cast your vote. Working with Balder as much as I've been doing the last 3-4 years now, I won't be sad if you cast your vote in that general direction.. :) + +You can swing over to [here](http://www.zoomerang.com/Survey/WEB22BQU9KHP5G/) to cast your votes for the categories in the Niney Awards. diff --git a/_posts/2011/02/balder-with-limited-support-for-wpf/images/BalderWpf2.png b/_posts/2011/02/balder-with-limited-support-for-wpf/images/BalderWpf2.png new file mode 100644 index 0000000..a9ed540 Binary files /dev/null and b/_posts/2011/02/balder-with-limited-support-for-wpf/images/BalderWpf2.png differ diff --git a/_posts/2011/02/balder-with-limited-support-for-wpf/index.md b/_posts/2011/02/balder-with-limited-support-for-wpf/index.md new file mode 100644 index 0000000..5f87f43 --- /dev/null +++ b/_posts/2011/02/balder-with-limited-support-for-wpf/index.md @@ -0,0 +1,13 @@ +--- +title: "Balder with (limited) support for WPF" +date: "2011-02-19" +--- + +Balder is getting closer to a cross platform engine and now there is a crude implementation of WPF as well. It uses XNA for the actual rendering and you can use XAML within WPF on the desktop. Also worth mentioning is that you can use XNA directly on Windows without WPF as well inside Windows Forms. + +[![BalderWpf2](images/BalderWpf2.png)](http://localhost:8080/wp-content/2011/02/BalderWpf2.png) +For now there is no binary release, but pulling the [source](http://balder.codeplex.com/SourceControl/list/changesets) and compiling the Balder\_Wpf.sln solution in the solutions folder you'll get the binaries needed. + +Summarizing the platforms supported fully or partially at this time: + +- Silverlight (Full support) Windows Phone 7 (Close to full support) Windows Forms (Partial support) WPF (Partial support) iOS (iPhone/iPad) (Compiles - no graphics yet) Mono/OpenGL (Compiles - no graphics yet) diff --git a/_posts/2011/02/vsoft-donates-finalbuilder-licenses-for-balder-and-bifrost/images/FinalBuilder-Full-logo.png b/_posts/2011/02/vsoft-donates-finalbuilder-licenses-for-balder-and-bifrost/images/FinalBuilder-Full-logo.png new file mode 100644 index 0000000..a0dc311 Binary files /dev/null and b/_posts/2011/02/vsoft-donates-finalbuilder-licenses-for-balder-and-bifrost/images/FinalBuilder-Full-logo.png differ diff --git a/_posts/2011/02/vsoft-donates-finalbuilder-licenses-for-balder-and-bifrost/index.md b/_posts/2011/02/vsoft-donates-finalbuilder-licenses-for-balder-and-bifrost/index.md new file mode 100644 index 0000000..d2cca32 --- /dev/null +++ b/_posts/2011/02/vsoft-donates-finalbuilder-licenses-for-balder-and-bifrost/index.md @@ -0,0 +1,12 @@ +--- +title: "VSoft donates Finalbuilder licenses for Balder and Bifrost" +date: "2011-02-04" +--- + +One of the challenges that has been for [Balder](http://balder.codeplex.com) and the [Bifrost](http://bifrost.codeplex.com) project has been to get a proper build environment up and running. This is something that now is in the works thanks to [VSoft Technologies](http://www.vsofttech.com/) and their [Finalbuilder](http://www.finalbuilder.com). A software I've used with great success over the years. + +The plan now is to set up a build server running in [Microsofts Azure](http://www.microsoft.com/azure) and produce nightly builds, but also work as a continuous integration server for the teams working on the projects. + +A big thank to VSoft for donating the licenses! + +[![FinalBuilder-Full-logo](images/FinalBuilder-Full-logo.png)](http://localhost:8080/wp-content/2011/02/FinalBuilder-Full-logo.png) diff --git a/_posts/2011/03/dolittle-it-is/index.md b/_posts/2011/03/dolittle-it-is/index.md new file mode 100644 index 0000000..07a2892 --- /dev/null +++ b/_posts/2011/03/dolittle-it-is/index.md @@ -0,0 +1,8 @@ +--- +title: "DoLittle it is" +date: "2011-03-15" +--- + +Back in 1997 I started doing some moonlighting on the side - small projects and I needed a company in order to do be able to do the work according to Norwegian law. I started a company called DoLittle Studios, registered dolittle.com as my domain and was set to go. The reasoning behind the name was basically to not do much. :) + +Turns out now that the name couldn't be more wrong. As of 1st of March I'm my own boss - working as an independent consultant and as a trainer for [Programutvikling](http://www.programutvikling.no/). diff --git a/_posts/2011/04/courses-fall-2011/index.md b/_posts/2011/04/courses-fall-2011/index.md new file mode 100644 index 0000000..4b9e1ee --- /dev/null +++ b/_posts/2011/04/courses-fall-2011/index.md @@ -0,0 +1,24 @@ +--- +title: "Courses, fall 2011" +date: "2011-04-18" +--- + +I'll be doing a couple of courses this fall for [Programutvikling](http://www.programutvikling.no), focusing in on LOB development in general with the subject of data access and Azure. + +The first course will provide a backdrop for those wanting to take the [MS 70-516 exam](http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-516), focusing in on data access in your LOB apps. Read more about it [here](http://www.programutvikling.no/kurskalenderoversikt.aspx?mid_1=1352&mid=1535&id=1072497). + +It has been scheduled for the following dates : + +- 24th of August + +- 5th of October + +- 23rd of November + +The second course is a crash course in Windows Azure and will provide you with the capability of developing with Azure and take the right choices to make your application scale and become reliable in the cloud, you'll find the details [here](http://www.programutvikling.no/kurskalenderoversikt.aspx?mid_1=1352&mid=1535&id=1072501). + +It has been scheduled for the following dates : + +- 19th of October + +- 9th of November diff --git a/_posts/2011/04/ruby-student-at-your-service/index.md b/_posts/2011/04/ruby-student-at-your-service/index.md new file mode 100644 index 0000000..a468a86 --- /dev/null +++ b/_posts/2011/04/ruby-student-at-your-service/index.md @@ -0,0 +1,18 @@ +--- +title: "Ruby student at your service" +date: "2011-04-04" +--- + +Ruby is getting a lot of attention these days - and I've scratched the surface of it myself and can understand why. These days I just want to get some more experience with it myself, but as with anything one has not done yet its kinda hard to get started. Sure, Googling things will get you going with the language itself but the flow of working with it takes a lot longer. + + +Another point is - if one comes from a different environment, one tends to look at new stuff with old glasses. + + +Therefor, I'm reaching out - is there a Ruby shop on the east-coast of Norway that would like to have me passively sitting besides/behind a developer for a day in order for me to pick up the flow and routine of developing on Ruby. If you do your Ruby development on a Mac as well, that would be a major plus. + + +I can't promise much back, I'm afraid - unless your shop needs input or help on Microsoft .net based technologies. + + +If this is doable at your shop, please contact me either via email : einar \[at\] dolittle \[dot\] com, twitter DM : einari or by phone : +47 909 66 858. diff --git a/_posts/2011/04/silverlight-5-and-balder-2/images/PastedGraphic-2.png b/_posts/2011/04/silverlight-5-and-balder-2/images/PastedGraphic-2.png new file mode 100644 index 0000000..05a53a5 Binary files /dev/null and b/_posts/2011/04/silverlight-5-and-balder-2/images/PastedGraphic-2.png differ diff --git a/_posts/2011/04/silverlight-5-and-balder-2/index.md b/_posts/2011/04/silverlight-5-and-balder-2/index.md new file mode 100644 index 0000000..990f449 --- /dev/null +++ b/_posts/2011/04/silverlight-5-and-balder-2/index.md @@ -0,0 +1,51 @@ +--- +title: "Silverlight 5 and Balder" +date: "2011-04-13" +--- + +As most of you probably already know, [Balder](http://balder.codeplex.com) has thus far for Silverlight been a software rendered 3D engine. Basically what that means is that the CPU has been doing all the rendering, and not only that but also within the .net runtime. To say the least, quite costly - at least if one wants a bit of accuracy as well. + +Now that the cat is out of the box and Silverlight 5 beta is available I can finally announce the new hardware accelerated support for Balder. The full feature list can be found [here](http://timheuer.com/blog/archive/2011/04/13/whats-new-in-silverlight-5-a-guide.aspx) for Silverlight 5, the beta can be downloaded [here](http://www.silverlight.net/getstarted/silverlight-5-beta/). + +**Silverlight 5 Hardware accelerated 3D** + +With Silverlight 5, Microsoft is introducing hardware accelerated 3D graphics. What they have basically done is take the Xna route and implement a scaled down version of Xna for Silverlight. They have implemented the basics needed to do 3D rendering, so all the asset management that Xna normally provides you with on the desktop and the Xbox is not included - here is were Balder comes into play with its support for assets. + +Balder is closing in on feature and rendering parity with the Silverlight 3/4 version of Balder. + +Also worth mentioning is my good friend [René Schulte](http://kodierer.blogspot.com) has a blog post up with more specific Silverlight 5 3D details [here](http://kodierer.blogspot.com/2011/04/xna-for-web-silverlight-5.html) showing the [SLARToolkit](http://slartoolkit.codeplex.com) with hardware accelerated 3D. + +**Whats there** + +The main priority for Balder has been to get the rendering visually equal with hardware rendering that the software rendering did, basically what that means is the lighting model that has been so far in Balder has been replicated in hardware. + +Basically most of the features as you know it in Balder is supported, everything from asset management, geometries, scene management, view management, frustum clipping and all, and a hardware accelerated rendering pipeline. + +The picture below shows the hardware accelerated version of Balder on the left side, and to the left is the software rendering version + +**[![PastedGraphic-2](images/PastedGraphic-2.png)](http://localhost:8080/wp-content/2011/04/PastedGraphic-2.png)** + +**Whats missing** + +Below you'll find a list of things that are missing : + +- Sprites +- Directional lighting +- Multi texturing - reflection + diffuse maps and mixing +- Texture opacity + +Over the next couple of weeks the parity gap will be closed, but also new features such as bump mapping, more asset loaders for other modelling formats and general bug fixing. Another thing is parity with Xna for the desktop and Xbox plus Windows Phone 7. + +**Shaders** + +Since Silverlight 5 uses Xna and graphics adapters work with the concept of shaders (vertex shaders and pixel shaders), this is also what Balder uses to do all rendering. This also means that Balder has opened up for you to actually write your own shaders but take advantage of Balders scene management, asset management and all the goodness that Balder provides, and everything done through Xaml. The shader can be specified by setting the CustomShader property on the Material object. Balder has a Shader object that you can create an instance of and point it to a PixelShader and a VertexShader. + +**Demos** [Andy Beaulieu](http://www.andybeaulieu.com/) has been working with Balder and created a couple of demos that show what one can do with Balder now that the CPU is freed up to do other things. He has created a demo using physics and Balder - a video can be viewed [here](http://www.youtube.com/watch?v=VGzwJ9NnHKk&feature=player_embedded), the source for it can be found [here](http://3dphysics.codeplex.com/). Andy has a blogpost up and running [here](http://www.andybeaulieu.com/Home/tabid/67/EntryID/216/Default.aspx) with more details. + +Balder has a SampleBrowser, and it is also available Silverlight 5 and can be viewed [here](/Balder/SampleBrowser/SL5/TestPage.html). + +**Where do I get it?** The Balder release can be found [here](http://balder.codeplex.com/releases/view/64386). After downloading the Silverlight 5 SDK and developer runtime, you basically download the Balder release and create a new Silverlight project and add references to all the DLLs in the Balder release. The next thing you need to do is add a parameter to the plugin setup in your HTML file that holds the Silverlight plugin. You need to enable GPU acceleration : + +The source code for Balder for all this will be pushed later today. + +**Whats next?** Balder is an ongoing project and will continuously be developed and improved. I mentioned a few things above that will be focused on, another thing is animation. Full hierarchical animation and skeleton support and also skinning of it. Another aspect is design time support, today Balder is Xaml only - meaning that you have to type everything out. Although the API in Balder is very simple and the declarative nature of Balder is easy to use, design time support has been requested quite a few times. Another aspect is physics. The idea is to make physics a natural part of Balder by simply declaratively define properties for your objects so they can automatically take part of a physics scene without having to think much of it. diff --git a/_posts/2011/04/speaking-at-ndc-2011/index.md b/_posts/2011/04/speaking-at-ndc-2011/index.md new file mode 100644 index 0000000..bb1418e --- /dev/null +++ b/_posts/2011/04/speaking-at-ndc-2011/index.md @@ -0,0 +1,10 @@ +--- +title: "Speaking at NDC 2011" +date: "2011-04-17" +--- + +I've been preparing on and off a talk for [NDC 2011](http://www.ndc2011.no) the last couple of months, at first I was not sure what it would become, but as the agenda came together and it had to get published the subject finally materialized 100%. + +The talk will be about CQRS, but not a demo-ware thing - a real life project that uses it. At one of my clients, [Komplett.no](http://www.komplett.no), the largest web-shop in Norway - we have applied CQRS. The talk will be about the experience with how it was applied, how the team learned and what pitfalls we went into. + +On [day 3 of NDC 2011](http://ndc2011.no/agenda.aspx?cat=1071&id=-1&day=3728), you'll find me on the 7. track. diff --git a/_posts/2011/04/speaking-at-the-gathering-2011/index.md b/_posts/2011/04/speaking-at-the-gathering-2011/index.md new file mode 100644 index 0000000..d4dcfbe --- /dev/null +++ b/_posts/2011/04/speaking-at-the-gathering-2011/index.md @@ -0,0 +1,6 @@ +--- +title: "Speaking at the Gathering 2011" +date: "2011-04-17" +--- + +Easter for some is taking time off to spend with your family, others spend their time at [The Gathering](http://www.gathering.org/tg11/en/), a get together of people with a common interest; computers. This year I've been lucky enough to be asked to speak there. The focus will be Windows Azure and also sneak in some Silverlight and Windows Phone 7 stuff. I'll be there for 2 full days doing multiple talks around these subjects - so if you're at The Gathering and want to learn more about how you can do things in the cloud with your favorite programming environment or want to learn more about doing cool stuff on the Web or the WP7, be sure to look out for the talks on this [page](http://www.gathering.org/tg11/en/creative/seminars/programming/) when they are made available. diff --git a/_posts/2011/10/balder-where-is-it-and-where-is-it-going/images/deferredsoftwarerendering.png b/_posts/2011/10/balder-where-is-it-and-where-is-it-going/images/deferredsoftwarerendering.png new file mode 100644 index 0000000..7d99b0b Binary files /dev/null and b/_posts/2011/10/balder-where-is-it-and-where-is-it-going/images/deferredsoftwarerendering.png differ diff --git a/_posts/2011/10/balder-where-is-it-and-where-is-it-going/index.md b/_posts/2011/10/balder-where-is-it-and-where-is-it-going/index.md new file mode 100644 index 0000000..448e9b6 --- /dev/null +++ b/_posts/2011/10/balder-where-is-it-and-where-is-it-going/index.md @@ -0,0 +1,40 @@ +--- +title: "Balder - where is it, and where is it going?" +date: "2011-10-23" +categories: + - "net" + - "3d" + - "balder" + - "csharp" +tags: + - "silverlight" +--- + +In 2007 I started something called [Balder](http://balder.codeplex.com), a 3D engine for the Web using Silverlight. Back then with Silverlight 1.1 Alpha and later 2.0, there really weren't that many options to make it especially feature rich, nor fast. My first goal when I started this whole thing was basically to achieve 3D rendering on the Web across multiple platforms (Windows + Mac, later Moonlight on Linux) and have a declarative programming model for 3D. This is still the motivation for Balder; to be cross-platform on the Web and be declarative in its nature. I've never had the idea of being a 3D engine to compete with the big engines out there that are both free and commercial, this has been partly a research project for me to learn Silverlight properly from the ground up and also maintain a foot within the graphics programming industry which I still hold dear. Even though my day to day job is something completely different these days, I've always had side projects that kept me somewhat close to what was happening in the games industry that I left behind some 10 years ago. + +Back in 2007 with SL1.1 and 2.0, you basically had to either built on top of the built in primitives, which were super slow or you had to do magic like create yourself a realtime PNG encoder and draw pixels manually with code and then hand over the generated PNG to an Image control inside Silverlight. + +With Silverlight 3 came along the WriteableBitmap that enabled to skip the PNG step and Balder started to pick up performance and features were a lot easier to create. This story continued through for Silverlight 4 and Balder has received many a make over of both its rendering pipeline, but also internal architecture while I've learnt more and more in-depth of how to do things in the best way inside Silverlight. With the announcement of Silverlight 5 came a long a low level interface for drawing 3D utilizing the GPU sitting inside your graphics adapter. Finally Balder could shine with great performance and still maintain its declarative, Silverlighty way of doing things. + +For SL5, that was the gold-plated story - the reality is quite different. Balder needed yet another architectural make-over in order to achieve hardware rendering with Silverlight. The main problem being that rendering now had to be done on a specific rendering event that sits on a completely different thread than the regular UI thread inside Silverlight. This poses quite a few problems when Balder is built to be declarative and have all the binding capabilities that Silverlight offers. + +Most of the architectural change has been done - but far from being finished. There are still some holes that needs to be filled internally in Balder that has to do with code-smell basically. At one point in time, development of Balder went forward too fast - and code-quality was during this period suppressed in favor of number of features per day that could be implemented. I know, I'm not proud, but it was the reality for the period that things needed to get done and they needed to be done fast. Another aspect of Balder development has been the lack of being able to properly test things with unit tests all the way. Quite a few times I've tried to do the effort to retrofit tests without succeeding all the way. Silverlight is basically too hard to test if you want to be lightweight with your tests. Sure, there are things out there that mock out the runtime and you can make most of your code so that you don't have dependencies to the Silverlight runtime and just run the tests on the desktop framework. I've done all the techniques out there but never been happy with the flow. This is an ongoing things. + +**Are we there yet?** +Phew.. So, were are we at?  Balder has a default branch which is still on the SL4 level where I left off over a year ago and there is a parallel branch for the SL5 parts and all the refactorings and changes that had to be done to bring Balder to SL5. There are some bugs and quirks in it and development is not going as fast as I would have hoped. There are a few reasons for that, one is the lack of tests and not a good story for retro fitting them. I've started doing it with MSpec and writing in a specification way instead, made it a lot easier but there is still a lot of work to be done there. The second reason things are going slow is that Microsoft has yet to come up with a good cross platform story for the 3D bits, in fact, thus far there is none - it only works on Windows for now. I've been probing them to get an answer, but haven't gotten one yet. To be honest, it has for a while halted my motivation for moving forward at the same pace, until last week when I had a breakthrough in rendering that increases performance quite a bit and also the quality for software rendering, which will then prove as the fallback solution for Mac. + +![Deferred software rendering](images/deferredsoftwarerendering.png) + +In addition the latest versions of the most used browsers on Mac supports WebGL, which is something that can be used directly from Silverlight as well. After getting the software rendering fallback done, I'll start looking at the WebGL approach as a second fallback scenario for those browsers that supports it. + +Another aspect of the SL5 codebase is that Microsoft changed security from the beta released at Mix to the version released at Build which lead to in-browser shaders not being allowed to do loops. Balder supported 5 light sources with the pixel shaders I wrote for the Beta version, but can only do one with the latest version of SL5. In order to fully support an arbitrary number of lights I'll have to move over to deferred rendering and that has quite a few implications on how Balder works as well. But a job I've started and will make it the default rendering method across the board for now. + +But all that being said, there are some critical issues that needs to be solved - they are issues that really makes it hard for me as a developer to get the velocity I want, so I will be going back and forth researching and bringing back the code quality I want to feel comfortable. + +**So, what about the tag-line of Balder and devices?** +A couple of years ago I saw the opportunity to bring Balder onto more devices and started optimizing the code-base and extension points to be able to bring to things like the Windows Phone 7, iOS, Android and others. This is something I'd still love to do, but will not focus on it for quite a while. There is still too much work on the Silverlight side to justify focusing on devices just yet. There is a version of Balder for WP 7, but not for the latest Mango and to be honest, WP7 is in fact the hardest of these devices to get any proper rendering on since one is not allowed to write shaders for that device. + +**Conclusion** +As you might understand, Balder is still active - not just at the same pace as before, hoping to pick this up a little bit moving forward. There are some code-rot that needs fixing, increase of code quality and things like that holding back development a bit, but also technical challenges with the platform. Since I'm relentless with the cross-platform part and am not willing to budge on it, I will focus my energy on getting that working and hopefully working good. If this was a commercial product, I would probably not go to the lengths I am to get the cross-platform parts working, but one has to remember that my original motivation for going down the road of creating Balder in the first place was based upon cross-platform - take that out and personally I will lose the biggest motivation I've had with the project. + +I've established a [Trello](http://www.trello.com) [board were people can see what I'm focusing on these days for Balder](https://trello.com/board/balder/4e95e70e82e4916636df1606). diff --git a/_posts/2011/10/wazzzzup/index.md b/_posts/2011/10/wazzzzup/index.md new file mode 100644 index 0000000..0608f56 --- /dev/null +++ b/_posts/2011/10/wazzzzup/index.md @@ -0,0 +1,17 @@ +--- +title: "Wazzzzup ??" +date: "2011-10-22" +categories: + - "general" +--- + +Its been quiet on this page since April, in fact - since 2007 this is the longest period of time that has gone by without any posts on the blog. The reason behind my quiet period has been that I've basically been working way too much. I've had quite a few things on my plate and really haven't had the time to blog at all, hardly had time to tweet even. + +This is about to change. I've started clearing up my schedule quite a bit in order to focus more on the things I love; blogging, open-source and being social on the usual suspected social medias. Time to go back to the roots and rediscover the fun. + +**That being said…** +For those of you who have been following my work on [Balder](http://balder.codeplex.com) have seen the occasional commit, but not at the pace you might be used to from me. I'm very committed to bringing back to life Balder - there are a few things I need to be doing to the library before I'm comfortable, but I'll be posting about that later in a separate post. + +Another project that is dear to heart is something called [Bifrost](http://bifrost.codeplex.com), something that has been getting a lot of love the last year and will get even more love moving forward from now. Also a project I will be blogging more about and sharing some of the experience from building with you. + +Concluding this post with; I'm back and I will be focusing more on the blogosphere and the open-source community moving forward. diff --git a/_posts/2012/01/geekrider-the-goal-technical-perspective/images/NewImage.png b/_posts/2012/01/geekrider-the-goal-technical-perspective/images/NewImage.png new file mode 100644 index 0000000..a1ff7cb Binary files /dev/null and b/_posts/2012/01/geekrider-the-goal-technical-perspective/images/NewImage.png differ diff --git a/_posts/2012/01/geekrider-the-goal-technical-perspective/index.md b/_posts/2012/01/geekrider-the-goal-technical-perspective/index.md new file mode 100644 index 0000000..13f9f00 --- /dev/null +++ b/_posts/2012/01/geekrider-the-goal-technical-perspective/index.md @@ -0,0 +1,31 @@ +--- +title: "GeekRider - the goal, technical perspective" +date: "2012-01-21" +categories: + - "net" + - "3d" + - "balder" + - "csharp" + - "cloud" + - "community" + - "javascript" + - "personal" +tags: + - "silverlight" +--- + +As I briefly [mentioned](/post/2012/01/14/State-of-the-union3b-2012.aspx) earlier I am endeavoring on a project which is going to demand a lot from me physically, but also from a technical perspective. I have a lot of things on my plate, during daytime I'm 100% engaged with work at clients, nighttime is the time I have to squeeze in a lot of activities into. For one, I have two kids that needs my attention - and I have a golden rule of engaging with them from the time I get back from work till they're in bed. This leaves some 2-4 hours left per day to do all the things I do. I therefor have to be smart with my time and make the most of it. Adding things into the schedule is hard and if I add something, it in general must have a synergy with something already in my schedule. In my schedule I have a couple of open-source projects that I focus a lot of my energy on; [Balder](http://balder.codeplex.com), [Bifrost](http://github.com/dolittlestudios/bifrost) and [Forseti](http://github.com/dolittlestudios/forseti), so pretty much anything I put in must relate to these in some fashion. Geekrider arose concretely from this need of synergy. I need to focus more on physical exercise and brought in Geekrider with the synergy of pushing forward development on the open-source projects I'm involved in forward. [Balder](http://balder.codeplex.com) will hopefully serve the purpose of 3D visualization and bringing forward the a few features that I want to have in that project. As a general web platform, I could have gone for anything already out there, but I wanted to push forward features in [Bifrost](http://github.com/dolittlestudios/bifrost), I therefor decided to build the site from scratch on top of it and also push into the cloud by hosting it on [AppHarbor](http://www.appharbor.com). Since the site will become very JavaScript intensive, and I pretty much get allergic reactions when I don't write tests or BDD style specifications for my code, the last project also will get some love; [Forseti](http://github.com/dolittlestudios/forseti). The reasoning behind the project is that most test runners out there has so many moving parts in the form of dependencies to get up and running and they're also very focused on running things in a browser. [Forseti](http://github.com/dolittlestudios/forseti) is aiming towards something very different, a headless runner for JavaScript tests based on [Env.js](http://www.envjs.com/) not using by default any browsers to execute the tests/specs. + +One of the goals for [Bifrost](http://github.com/dolittlestudios/bifrost) is to make it easier for developers to create rich web based applications, promoting good software development practices. Today, the RIA space is rapidly changing and for the most part moving away from plugin technologies such as Flash or Silverlight and focusing more on the open standards found in HTML, CSS and JavaScript/EcmaScript. + +From a fronted development perspective, [Bifrost](http://github.com/dolittlestudios/bifrost) is taking on this latter part. Traditionally one would compose the resulting web page that is handed over to the client on the server. Multiple solutions exist out there for doing so, and specifically in the .net space, ASP.net and its derivatives are the most popular ones. Rendering, as this is often referred to, adds an extra load onto the server - not only is the server responsible for dealing with the request from the user, wether it is getting data or performing an action, but it also has to transform the result into something the client can show. On top of all this, it has to deal with security. This pattern is a very proven pattern, but in my opinion not the pattern we want to be doing moving forward, and therefor [Bifrost](http://github.com/dolittlestudios/bifrost) will focus on a different pattern. Sure, Bifrost will not only be compatible, but also support out of the box the traditional route - but for now in an opinionated fashion by only supporting ASP.net MVC. The technique that [Bifrost](http://github.com/dolittlestudios/bifrost) will be focusing in on is the [Single Page Applications](http://en.wikipedia.org/wiki/Single-page_application), were you basically hand over the "rendering" to the client and let the client compose the page by swapping in and out elements at runtime. This is in fact nothing new, ever since AJAX became the big thing, we've pretty much been doing this - but only for parts at a time and even letting parts of our page be swapped out for new versions being rendered by the server dynamically. + +[Bifrost](http://github.com/dolittlestudios/bifrost) will have a composition technique that is based on, as most things in the framework, conventions. The focus will be on Features and one can point to a feature simply by adding a **
** tag and give it the attribute **data-feature="\[name of feature\]"**. Based on the configurable convention, [Bifrost](http://github.com/dolittlestudios/bifrost) will find the necessary files representing the feature. Looking at the page from Geekrider as it is at the time of writing this post, we'll have the following. + +![NewImage](images/NewImage.png "NewImage.png") + +So, back on track. Now that we have this, what is the next logical step?  Up till now, [Bifrost](http://github.com/dolittlestudios/bifrost) has been very server side rendering focused, sporting an extension for ASP.net MVC and taking advantage of that stack. That is about to change, or should I say, the fact that it has been the only way to use [Bifrost](http://github.com/dolittlestudios/bifrost) is about to change. A set of REST endpoints will be exposed from [Bifrost](http://github.com/dolittlestudios/bifrost), enabling any client to interact with the framework. From a Web developer perspective, this is not good enough, we're therefor working on bringing in a JavaScript library that will just nicely integrate with all this. + +In addition to the goals summarized thus far, I've also got another goal for me personally; I want to become more productive with tools other than what I'm used to. I recently bought a MacBook Air, an impressive piece of hardware - but it doesn't sport the same specs as my MacBook Pro or my iMac, I've therefor decided not to put any virtualization software on it to run Windows. This means I have to start using other tools than Microsofts Visual Studio for my development. For .net development, I'm for now using MonoDevelop and for general HTML, JavaScript and CSS development, I'm using TextMate. My long term goal is to be using TextMate for everything. + +Summarizing, Geekrider will be the proof of concept for features added to [Balder](http://balder.codeplex.com) and [Bifrost](http://github.com/dolittlestudios/bifrost) - driving forward with new thoughts and ideas. I will try to blog about the progress as much as my schedule can permit. This means I should keep myself from [playing](http://hu.partypoker.com/) around or doing unnecessary stuff. diff --git a/_posts/2012/01/state-of-the-union-2012/index.md b/_posts/2012/01/state-of-the-union-2012/index.md new file mode 100644 index 0000000..1310176 --- /dev/null +++ b/_posts/2012/01/state-of-the-union-2012/index.md @@ -0,0 +1,14 @@ +--- +title: "State of the union; 2012" +date: "2012-01-14" +categories: + - "personal" +--- + +So, here we are then - actually its been almost two weeks now; 2012. As most bloggers tend to do, I'm going to do the same; do a state of the union thing to tell the world "wasssssup". Consider it a delayed Christmas letter from a relative. :) + +2011 was probably one of the most stressful years I've had ever, it is the first year I am totally on my own as a freelancer and not having an employer, but have clients instead. That is needless to say quite different, not in the terms of what kind of work I do, but in more in a psychological perspective. In addition to that I had quite a few speaking engagements. Late 2010 I signed a deal with [Programutvikling](http://www.programutvikling.no) to do courses in 2011, I did a couple for them as well, but decided to drop doing courses as I was spreading myself way too thin doing way too much stuff. During 2011 I've also been heavily involved in the open source community, for the most part on the following projects; [Balder](http://balder.codeplex.com) and [Bifrost](http://bifrost.codeplex.com), with most focus on the latter. I also started another project called [Forseti](https://github.com/einari/forseti), a JavaScript test/spec headless runner written in C# and has the goal of being a self contained executable that is easy to use and get up and running. October last year I got renewed as a Microsoft MVP for the 4th time, very honored and grateful to be receiving this award. + +Come 2012, still alive and kicking, new opportunities and challenges are coming. For the last two and a half years I've been hired by [Komplett](http://www.komplett.no) to be their [solutions architect](http://en.wikipedia.org/wiki/Solutions_architect) and help build there vNext platform for e-commerce for both mobile and desktop web-browsers. The project has been an awesome experience and helped shape [Bifrost](http://bifrost.codeplex.com). But, a new opportunity arose, and from 1st of March this year, I will be involved in a software project at [Statoil](http://www.statoil.com), Norwegian oil-company. Really looking forward to be involved in that particular project. I will however continue to press forward on building features and fixing bugs in all of the open source projects I'm involved in. Will also try to involve myself more in the developer communities, such as [NNUG](http://www.nnug.no) and other communities. Allthough software is what I do, I'm also slowly realizing that I need to focus more of my energy on my own health. Personal exercise has never been a very big focus on my part, sure I've done my share of bi-cycling - but never reached a point were its natural or I end up doing it on a regular basis. Therefor, this year I'm setting out on a big hairy goal; be part of something called [Birkebeinerrittet](http://www.birkebeiner.no/English/Birkebeinerrittet/), apparently the worlds largest cross country bicycle race. In order to accomplish this I need all the motivation in the world and something driving me towards that goal. I decided in December 2011 to start a website to help me drive myself towards that goal; [GeekRider](http://www.geekrider.com). Not entirely sure what the site will end up being, but my plan is to let the site drive forward a few ideas I have with regards to how I see web development moving forward and at the same time help me maintain all of the mentioned open source projects - a synergy. + +I guess thats just about it, wish me luck.. :) diff --git a/_posts/2012/02/nnug-vestfold-talk-29th-of-february-2012/images/nnugvestfolfebruary2012agenda1.png b/_posts/2012/02/nnug-vestfold-talk-29th-of-february-2012/images/nnugvestfolfebruary2012agenda1.png new file mode 100644 index 0000000..f196598 Binary files /dev/null and b/_posts/2012/02/nnug-vestfold-talk-29th-of-february-2012/images/nnugvestfolfebruary2012agenda1.png differ diff --git a/_posts/2012/02/nnug-vestfold-talk-29th-of-february-2012/index.md b/_posts/2012/02/nnug-vestfold-talk-29th-of-february-2012/index.md new file mode 100644 index 0000000..62b8622 --- /dev/null +++ b/_posts/2012/02/nnug-vestfold-talk-29th-of-february-2012/index.md @@ -0,0 +1,16 @@ +--- +title: "NNUG Vestfold talk, 29th of February 2012" +date: "2012-02-18" +categories: + - "community" + - "javascript" +--- + +On the 29th of February, [Pavneet Singh Saund](http://pavsaund.wordpress.com) and myself will be holding a talk about modern web development for [NNUG Vestfold](http://nnug.no/Avdelinger/Vestfold/Moter/NNUG-Vestfold---22-Februar-2012/). + +For years, for a lot of developers, the Web has been a mess and JavaScript has not made that mess any better. There has been a lot of improvement over the years and a lot of efforts in bringing structure as well as promoting JavaScript into a first class citizen of your every day application development. The topic of the talk will be around this, how can you as a developer work with JavaScript and stop having the feeling that it is just something you have to do, but don't like to do. + +Here's the agenda. +![NNUG Vestfold February 2012 Agenda](images/nnugvestfolfebruary2012agenda1.png "NNUGVestfolFebruary2012Agenda.png") + +Don't hesitate to [register](http://nnug.no/Avdelinger/Vestfold/Moter/NNUG-Vestfold---22-Februar-2012/), this will be great fun! diff --git a/_posts/2012/02/removed-ratings/index.md b/_posts/2012/02/removed-ratings/index.md new file mode 100644 index 0000000..9d737af --- /dev/null +++ b/_posts/2012/02/removed-ratings/index.md @@ -0,0 +1,8 @@ +--- +title: "Removed ratings" +date: "2012-02-19" +--- + +Recently I've had a couple of strange ratings on posts here. People, in plural, rating simple posts that basically just announce a talk to a 1 out of 5 and not leaving a comment. That just messes with my head. There is no way I can improve posts when there is just a bunch of negative rating but no comments. As a consequence, I decided to remove ratings all together - hopefully forcing people to engage in a conversation instead. + +If there is something you don't like in a post, or the entirety of a post - please don't hesitate to post a comment. I'm very open to listening to feedback, but I can't just read into the lack of a star and figure out what I'm doing wrong. diff --git a/_posts/2012/02/slides-urls-from-nnug-talk-29th-of-february-2012/index.md b/_posts/2012/02/slides-urls-from-nnug-talk-29th-of-february-2012/index.md new file mode 100644 index 0000000..abce986 --- /dev/null +++ b/_posts/2012/02/slides-urls-from-nnug-talk-29th-of-february-2012/index.md @@ -0,0 +1,20 @@ +--- +title: "Slides + URLs from NNUG talk 29th of February 2012" +date: "2012-02-29" +--- + +Yesterday, [Pavneet Singh Saund](http://pavsaund.wordpress.com/) and I held a talk for [NNUG Vestfold](http://www.nnug.no) about modern Web development using the MVVM pattern and compositional UIs. + +The slides can be found [here](http://www.slideshare.net/einari/sugarcoating-your-frontend-one-viewmodel-at-a-time). + +In addition we talked about a few things, these are the resources of the talk : + +[KnockoutJS](http://www.knockoutjs.com) +[Bifrost +](http://www.github.com/dolittlestudios/bifrost)[Forseti](http://www.github.com/dolittlestudios/forseti) + +I did mention and tried to demo another site I'm working on, which was down at the time - but up now : + +[Geekrider](http://www.geekrider.com) - it shows navigation of features, using Bifrost. + +and lastly, the actual demo app we did can be found [here](http://www.github.com/einari/toodeloo). We did also show the inkFinder that was developed at [Komplett](http://www.komplett.no) that uses Knockout and MVVM, which you can find [here](http://www.komplett.no/k/inkFinder.aspx). diff --git a/_posts/2012/03/embracing-change/index.md b/_posts/2012/03/embracing-change/index.md new file mode 100644 index 0000000..3df6b82 --- /dev/null +++ b/_posts/2012/03/embracing-change/index.md @@ -0,0 +1,18 @@ +--- +title: "Embracing change" +date: "2012-03-18" +categories: + - "general" +--- + +As I wrote in this [post](http://ingebrigtsen.blog/post/2008/09/13/A-newbies-Mac-owners-perspective.aspx), back in September 2008, I used to be a Windows guy. In fact I was borderline fanboy of Windows. But decided that I wanted to try out this Mac thingy that everyone was talking about and all the alpha-geeks were using. + +Now, some 3 and a half years later, I'm still on the Mac - in fact, It turns out that what I mentioned in that post; of minimizing the need for Windows has been a true goal of mine and something that I've accomplished quite good. Some would probably call me a Apple fanboy now, with the amount of Apple devices I've acquired since my small start in 2008. I can't blame them. But I'm not preaching it! + +Ever since I started that branch of my life, I must say that the operating system has become less and less important, although I now have my preference going the general direction of away from Windows. But I think doing a switch like this has had a very positive effect on a number of other things, especially my perspective on software development. Around the areas of how I work, what I think is important when writing software and such. One could of course argue that I would broaden my mind naturally, without going to the extreme of doing my work on a different platform. But I beg to differ. The reason for that is that I think, no matter what platform you're on, that your mindset is colored by the culture on the platform, and if that platform is a commercial one driven by a company, you're also likely to be colored by the values of that particular company. + +I think by constantly seeking out new things, changing platforms every now and then, or just trying out things in general, will make you a better and more reflected person. There are so many things one is missing out on if you believe in one truth, and from my experience, there is also a lot of truths that people will tell you about the competitor - from people belonging to the community surrounding a platform, this applies to most platforms. + +To me, it has been an awesome journey switching - I've learnt so much from just doing that. It has opened my mind to things like Ruby, and crazy ass rocket science things like HTML, CSS and JavaScript (Sarcasm applied). I've grown in productivity at the expense of simplifying my tools - no longer need Visual Studio, nor Resharper to accomplish being productive in .net. I demand more of myself, more knowledge, more precision, higher velocity - as a result. + +So, if you're sitting there - stuck on a platform and haven't really tried out anything else. Go crazy, try out something else, go to a user group - if available, representing that parallel universe. Chances are you might learn something, expand your horizon and become a better you. Go and embrace change - trust me, you'll hate me the first weeks but thank me in the long run.. :) diff --git a/_posts/2012/03/forseti-javascript-testspec-runner/index.md b/_posts/2012/03/forseti-javascript-testspec-runner/index.md new file mode 100644 index 0000000..01e9367 --- /dev/null +++ b/_posts/2012/03/forseti-javascript-testspec-runner/index.md @@ -0,0 +1,14 @@ +--- +title: "Forseti - JavaScript Test/Spec runner" +date: "2012-03-18" +categories: + - "javascript" +--- + +A couple of months ago, [Pavneet Singh Saund](http://pavsaund.wordpress.com/) and me decided to go down the road of creating our own test/spec runner for JavaScript. The rationale behind creating our own was basically that we had been having trouble getting existing solutions working, and the feedback loop also being higher than one should expect. Also, we felt that running all tests / specs in a through real browsers was more of integration rather than doing it every time we need to run. + +Another aspect was that we had this idea of creating a better developer experience for these kind of runners. Integrate better with IDEs and also have a tool that does not sit in the terminal window. Even though all the cool kids are having their terminal windows real close, we still feel there is room for abstracting that away and create a very slick and simple UI sitting on top. + +The runner we came up with is called [Forseti](http://en.wikipedia.org/wiki/Forseti), it is open sourced and can be found on GitHub [here](http://www.github.com/dolittlestudios/forseti). The first release we have out at this point is a simple console app, but we will be moving forward on it as much as we can and hopefully bring all the goodness to it that we have in mind as soon as possible. + +In the meantime, we'd love your input on it, anything from getting it up and running as is now, to building it, feature requests and bugs you might find. Please let us know what you think and how you experience it! diff --git a/_posts/2012/04/webinar-for-typemock-on-bdd/images/typemocklogo.png b/_posts/2012/04/webinar-for-typemock-on-bdd/images/typemocklogo.png new file mode 100644 index 0000000..460d546 Binary files /dev/null and b/_posts/2012/04/webinar-for-typemock-on-bdd/images/typemocklogo.png differ diff --git a/_posts/2012/04/webinar-for-typemock-on-bdd/index.md b/_posts/2012/04/webinar-for-typemock-on-bdd/index.md new file mode 100644 index 0000000..8fcbe50 --- /dev/null +++ b/_posts/2012/04/webinar-for-typemock-on-bdd/index.md @@ -0,0 +1,16 @@ +--- +title: "Webinar for Typemock on BDD" +date: "2012-04-23" +categories: + - "general" +--- + +I'm doing a live webinar on BDD and how it fits in with your general application development and can help you focus on getting your business needs covered and increase your general software quality. + +The webinar is brought to you by + +[![Typemock](images/typemocklogo.png "TypeMockLogo.png")](http://www.typemock.com) + +For more details and to register for the webinar, please go [here](http://www.typemock.com/driving-application-delivery-through-behavior-driven-development-bdd). + +Update: Video and slides has now been released [here](http://www.typemock.com/driving-application-delivery-through-behavior-driven-development-bdd) diff --git a/_posts/2012/06/azure-websites-deployment-tip/images/vs2010webappfix.png b/_posts/2012/06/azure-websites-deployment-tip/images/vs2010webappfix.png new file mode 100644 index 0000000..6d97e00 Binary files /dev/null and b/_posts/2012/06/azure-websites-deployment-tip/images/vs2010webappfix.png differ diff --git a/_posts/2012/06/azure-websites-deployment-tip/images/vs2010webappimport.png b/_posts/2012/06/azure-websites-deployment-tip/images/vs2010webappimport.png new file mode 100644 index 0000000..b6a88be Binary files /dev/null and b/_posts/2012/06/azure-websites-deployment-tip/images/vs2010webappimport.png differ diff --git a/_posts/2012/06/azure-websites-deployment-tip/index.md b/_posts/2012/06/azure-websites-deployment-tip/index.md new file mode 100644 index 0000000..4fcebc7 --- /dev/null +++ b/_posts/2012/06/azure-websites-deployment-tip/index.md @@ -0,0 +1,22 @@ +--- +title: "Azure WebSites - deployment tip" +date: "2012-06-09" +categories: + - "azure" +--- + +The latest [preview](http://weblogs.asp.net/scottgu/archive/2012/06/07/meet-the-new-windows-azure.aspx) of Azure looks really good, very impressed with what they've accomplished and Microsoft seem to be doing a great job with catching up with their competitors. Personally I'm using a few cloud offerings already, including Amazon for Virtual Machine handling - since their VMs have been persistent and Azures has not been up till this release. Also I'm using AppHarbor for the ease of deploying web sites, but am now in the process of considering Azure for this as well.  + +I signed up for all the preview features and got them one by one within hours of signing up, and I must admit I got really impressed with the ease of getting things up and running. It is totally comparable to both AppHarbor and Heroku. I did however run into one tiny little problem, not sure if this is something that is common or not. Inside the CSProj file for a Web project, it holds an import statement for importing the default WebApplication targets that will help build the Web site for ASP.net. In mine the line was :  + +![NewImage](images/vs2010webappimport.png) + +It needed to point to the 32 bit build extension path + +![NewImage](images/vs2010webappfix.png) + +This might not be a problem one gets if using Visual Studio, but might be just related to the fact that I do most of my .net development in MonoDevelop.  Anyways, doing that certainly made it all build and was running smoothly in a matter of seconds after that.  + +If you haven't had the time to get started with Azures new WebSite feature, [Maarten Balliauw](http://blog.maartenballiauw.be) has a great [post](http://blog.maartenballiauw.be/post/2012/06/07/GitHub-for-Windows-Azure-Websites.aspx) for setting it up - although, the UI on the new Azure portal is just really intuitive. + +Time to explore Azure a bit more - looking good so far! diff --git a/_posts/2012/06/philosophy-of-bifrost/index.md b/_posts/2012/06/philosophy-of-bifrost/index.md new file mode 100644 index 0000000..0cc2cac --- /dev/null +++ b/_posts/2012/06/philosophy-of-bifrost/index.md @@ -0,0 +1,35 @@ +--- +title: "Philosophy of Bifrost" +date: "2012-06-05" +categories: + - "bifrost" +--- + +Back in 2008 I started as a consultant after having worked at different ISVs since I started my career back in 1994. In the beginning my employer back then sent me to short contracts to get the consultant life under my skin. Moving around from client to client like that I realized something; I am rinsing and repeating a lot of mundane tasks, things I quickly realized that I really didn't want to be repeating. This is probably a realization most consultants do, but nevertheless I felt I had to do something about it; out came the idea of Bifrost, an open-source library that I would be able to reuse at clients if the client permits.  + +**The philosophy +**At the core of Bifrost and its philosophy lies an theory that although different domains have in general different needs, the abstract concepts that sits as pillars supporting a domain are the same. Bifrost would therefor be the provider of these abstractions. The abstractions should be very lightweight and focused and just support the concepts Bifrost is promoting. + +The things that Bifrost aims at doing is to make things simpler, both on the backend as well as the frontend. There are so many things out there that we're repeating, Bifrost aims to either take away tasks or expose APIs that will make it a lot easier to accomplish things. I will not go into details about all the aspects of Bifrost in this post, as we're on a constant move and have incorporated quite a lot just the last 6 months.  + +With that being said, you're probably already thinking; geez that must a bloated framework. No! It is not. The reason for it not being bloated in my opinion, is just because of the fact that the different APIs are really focused and are not generalized to support all scenarios out there. Bifrost is opinionated, and will remain so. It is not a one size fits all necessarily. If you want to apply it, you will have to adjust to the philosophy behind it. This does not mean we're not open for suggestions, improvements and so forth. But it means we're keeping an eye on the road and we want it not blow up. + +One aspect that was really important is to follow good development practices. Creating highly flexible, maintainable code and also highly testable to achieve the best possible quality. + +**The Evolution +**Late 2010, when working for [Komplett ASA](http://www.komplett.com) we revitalized the project as a joint venture between Komplett and my own company; DoLittle Studios. Re-focusing some of the effort and changing around some of the core principles applied to it. For one we wanted it to be more focused around separation and more specifically implement and support CQRS as the preferred backend solution. We had already done an internal project using Commands to express behaviors in the system, but didn't do the entire CQRS stack at that point, but rather had the commands chained up and replayed whenever we wanted to achieve a state, leaving events out of the equation at that point. What was great about that is that we got a chance to dive into the concept, get our hands dirty without applying the entire stack; get some experience, basically.   + +**CQRS** +[Command Query Responsibility Segregation](http://en.wikipedia.org/wiki/Command-query_separation) Coined by [Greg Young](http://codebetter.com/gregyoung/) a few years back was something we saw quite a lot of benefits in applying. Although, we now see a bunch of different benefits from doing CQRS; the road leading up to CQRS and what followed, the product we ended up with forced us to learn so much. Everything became much clearer when it comes to identifying the different concerns and responsibilities in the code. The basics of CQRS states that you keep your read side optimized for that purpose only, and the execution is behavioral in nature and expresses in a verbose and explicit way what is to happen to the system, the read side will then be flattened or specialized as a consequence of whatever behavior has been applied. + +Once we had it applied we started realizing the power of the concepts that we applied. We started seeing that applications are not about data, but rather have a very rich domain that expresses the behavior and that data might not even exist at all, but it might be as crazy as statically generated HTML files for our Web views, or at least statically generated JSON files we could pull directly from a CDN into our JavaScript code. It basically provided us with the scalability, flexibility and fueled us as developer with a set of mindsets that are really powerful. + +**MVVM** +Back when I originally started the project, I always kept a very open eye on bridging the gap between the backend and the frontend. A pattern I've been loving for a few years now is [Model View ViewModel](http://en.wikipedia.org/wiki/MVVM). Modern Web applications are doing more and more on the client using JavaScript. Combine that with the growing popularity of single page web applications, MVVM seems to be a perfect fit. Bifrost has been built on top of [Knockout JS](http://knockoutjs.com), extending and formalizing a few things.  + +**Much much more..** +There is quite a few more things related to Bifrost. But I'm not going to take on the task of going through it all in this post. But on the official [site](http://bifrost.dolittle.com). The site is really a work in progress some of the elements of Bifrost are documented, but for the most part not at this moment in time. Stay tuned and we'll get more of documentation up and running. We're also focusing on an API documentation that goes into detail. + +**Our conclusion** + +Although we jump-started the framework again and wanted to focus on the CQRS parts, we quickly realized that Bifrost was not just a CQRS library, it was something else. Its place in life is to facilitate any line-of-business application development. We see great opportunities to simplify a lot of the everyday developers life and is also something we would love to hear from you about. Don't hesitate to engage in a conversation with us at our [GitHub site](http://github.com/dolittlestudios/bifrost) or our [Google Forum](https://groups.google.com/group/bifrostproject). diff --git a/_posts/2012/07/cqrs-applied-a-summary/images/commandchain1.png b/_posts/2012/07/cqrs-applied-a-summary/images/commandchain1.png new file mode 100644 index 0000000..698675f Binary files /dev/null and b/_posts/2012/07/cqrs-applied-a-summary/images/commandchain1.png differ diff --git a/_posts/2012/07/cqrs-applied-a-summary/images/mimir1.png b/_posts/2012/07/cqrs-applied-a-summary/images/mimir1.png new file mode 100644 index 0000000..861558f Binary files /dev/null and b/_posts/2012/07/cqrs-applied-a-summary/images/mimir1.png differ diff --git a/_posts/2012/07/cqrs-applied-a-summary/index.md b/_posts/2012/07/cqrs-applied-a-summary/index.md new file mode 100644 index 0000000..70ddb6e --- /dev/null +++ b/_posts/2012/07/cqrs-applied-a-summary/index.md @@ -0,0 +1,79 @@ +--- +title: "CQRS applied : a summary" +date: "2012-07-12" +categories: + - "bifrost" + - "csharp" + - "cqrs" + - "mvvm" + - "patterns" + - "practices" +tags: + - "architecture" +--- + +Every now and then in a software career you get a chance to write something from scratch and try out new things; a proper greenfield project. I've had that luck a couple of times and latest a project that proved to be the complete game-changer for me personally. Game changer in the sense that I gained a knowledge that I am pretty sure I will treasure for, if not the rest of my career, at least for quite a few years moving forward. The knowledge I am talking about can be linked back to applying [CQRS](http://en.wikipedia.org/wiki/CQRS), but it is not [CQRS](http://en.wikipedia.org/wiki/CQRS) in itself that is the knowledge, its the concepts that tag along with it and the gained knowledge of how one can write code that is maintainable in the long run. Its also about the things we discovered during the project, smart ways to work, smart code we wrote - techniques we applied in order to meet requirements, add the needed business value, and at the same time deliver on time with more than was asked for.   + +This is a more in-depth post than the [talk I did @ NDC 2011](https://vimeo.com/45594255) + +# … from the top ... + +For the last couple of years, till March this year, I had the pleasure of being hired by [Komplett Group](http://www.komplett.com), the largest e-commerce in Norway. At first I was assigned tasks to maintain the existing solution and was part of the on-premise team to do just that. As a consultant, that is very often what you find yourself doing - unless you're hired in to be a particular role, like I've been in the past; system architect. I helped establish some basic architectural principles at that time, applying a few principles, like IOC and other parts of our favorite acronym; S.O.L.I.D. I remember feeling a bit at awe of just being there, they had a solution that could pretty much take on any number of clients and still be snappy and they never went down. I've learned to respect systems like that, even though it requires a lot of work - not necessarily development work, but a lot of the time IT or DevOps help keep systems alive. Anyhow, after a few months, back in 2009 I was asked by the department manager if I wanted to lead a small team on a particular project, an administration-tool for editing order details. With my background earlier as a team lead and also as a department manager myself, I kinda missed that role a bit and jumped at it. It was to be a stand-alone tool, accessible from the other tools they had, but we were given pretty much carte-blanche when it came to how we did it, whatever technology within the .net space we wanted. We settled on applying ASP.net MVC, Silverlight for some parts, WCF for exposing service for the Silverlight parts and nHibernate at the heart as the ORM for our domain.  + +Part of the project was also to try out Scrum, having had quite a bit of experience with everything ranging from eXtreme Programming to MSF Agile and later Scrum, that excited me as well. So we applied it as well.  + +Half-way through the project we started having problems, our domain was the one thing we shared with the others and we started running into nightmare after nightmare because we worked under the one-model-to-rule-them all idea. Which is really hard to actually get to work properly, and looking back I realize that most projects I've been have suffered from this. We ran into issues were for our purpose we needed some things in \*-to-many to be eager fetched, which had consequences we could not anticipate in other systems that was using the same model. But we managed to come up with compromises that both systems could live with - still, we weren't seeing eureka, just brushing up against the problems that a lot of projects meet without seeing that the approach was wrong. A bit after this we started brushing up against something that really got us excited; Commands. Without really knowing about CQRS at this point, but more coming from working with Silverlight and WPF, the concept of modeling behavior through commands. The reason we needed these commands was that we needed to perform actions on objects over a long period of time; potentially days, and at the end commit the changes. We came up with something we called a CommandChain - a chain of commands that we appended to and persisted. Commands represented behavior and modified state for the most part on entities when executed. We came up with a tool were we could debug these chains, and we could inspect which Command was causing problems and not. + +![NewImage](images/commandchain1.png "CommandChain.png") + +All in all, we were quite pleased with the project; we had done a lot of new things, applied TDD in a behavioral style, started exploring new corners of the universe we had yet to realize the extent of. Delivered not too badly on time, not perfectly on time - but close enough. + +# The turning point + +After yet another 6 months or so, there were initial talks about the need to expose functionality from the web-shop to other systems used internally, a few design meetings and meetings with management lead to a new project. The scope of the project turned out to be not only exposing some services, but also a new web-shop frontend targeted and optimized for smartphone devices. The project was initiated from a technical perspective and not one with a specific business need in mind. From a technical perspective, the existing codebase had reached a point were it was hard to maintain and something new needed to replace it to gain back velocity and control over the software. It was to be a complete greenfield project, totally throw things overboard and just basically work with existing database but add flexibility enough that even that could be thrown out the door, if one ever wanted to do that. Early on I was vocal about them needing an architect to be able to deliver this project, I pointed in a couple of directions to internal resources they had - but people pointed back to me and I soon found myself as the system architect for the project.  + +# Requirements + +When dealing with e-commerce at this level, there are quite a few challenges. Lets look at a few numbers; in the product catalog there was at the time I got off the project about 13.000 products, there was an order shipped every 21 seconds, in 2011 that amounted up to 1.454.776 orders, ~30.000 living sessions at any given time. Sure, its not [Amazon](http://www.amazon.com), but for our neck of the woods its substantial. These numbers are of course on an average, but come busy times like Christmas, these numbers are more focused and the pressure is really on for that period in particular. + +# Decisions, decisions, decisions... + +Before we started production, back in November 2010, we needed to get a few things straight; architecture, core values for the project, process and then getting everyone on-board with the decisions. We early on decided that we were going to learn all about CQRS, as it seemed to fit nicely with the requirements - especially for performance, and we were also requiring ourself that we wanted a rich domain model that really expressed all aspects of the system.  We also decided that we wanted to drive it all out applying [BDD](http://en.wikipedia.org/wiki/Behavior_Driven_Development), and we wanted to be driving the project forward using Scrum and really be true to the process, not make our own version of Scrum. A dedicated product owner was assigned to the project that would have the responsibility for the backlog, make sure that we refined as needed, planned as needed and executed on it.  + +# Adding the business value + +As I mentioned, this project came out of a technical need, not a concrete business need. We had the product owner role in place and he needed to fill the backlog with concrete business value. This was not an easy task to do, basically because the organization as a whole probably didn't see the need for the project. In their defense, they had a perfectly fine solution today, not entirely optimal for smaller screens like a smartphone, but manageable. To the different store owners that normally provided the needs to the backlog, they were in desperate need of new features on existing solution, rather than this new thing targeting a platform they didn't see much business value in adding. In combination with the fact that the organization had been in migration mode and all developer resources partly or close to full-time in periods being tied down to work related to migration of systems that was a result of merges and acquisitions, the organization had gotten used to not getting things done anyways. All this didn't exactly create the most optimal environment for getting the real business value into the project. Something we really wanted. Early on we realized that the project could not be realized if we had user stories that were technical in nature. The first couple of months we did have quite a few technical user stories, and statistically these failed on estimation. We didn't have any business value to relate them directly back to, and ended up in many cases as over-engineering and way out of their proportions as we as developers got creative and failed at doing our job; add business value. So we came to the conclusion; no technical user stories were allowed - ever. Something that I still today think was one of the wisest decisions we had on the project. It helped us get back and focus on why we were writing code every day; add business value. Even though this project was a spawn of the developers, there was clearly business value to guide us through. The approach became; lets pretend we're writing an e-commerce solution for the first time. This turned out to be a good decision, it helped us  be naïve in our implementations - keeping in line with core principles of agile processes; the simplest thing that could possibly work. Our product owner was then left with the challenge of dragging the business value out of the business, he did a great job in doing that and at the same time getting them to realize the need for the change of platform that was in reality taking place. Something that became evident further down the line; we were in fact not building an e-commerce front-end for smartphones, but an entire new platform. More on that later. + +# YES, we did create a framework + +One of the realizations we had early on was that we needed to standardize quite a few things. If you're going to do that many new things and have a half-way chance of getting everyone with you and feel productive in the new environment, you need to get a basis working that people can work with. Back in 2008 I started a project called [Bifrost](http://bifrost.dolittle.com), you can read more [here](http://ingebrigtsen.blog/post/2012/06/05/Philosophy-of-Bifrost.aspx). We looked at it and decided it was a good starting point for what we wanted to achieve. We also wanted the framework to be open-sourced. The philosophy was to create a generic framework to be the infrastructure sitting at the core of the application we were building. It would abstract away all the nitty gritty details of any underlying infrastructure, but also serve as the framework that promoted CQRS and the practices that we wanted. It was to be a framework that guided and assisted you, and very clearly not in your way. I'm not going to go in-depth in the framework, as there are more posts related to it specifically in the making and already out there. + +# CRUDing our way through CQRS + +Well on our way, we had quite a few things we really couldn't wrap our heads around. Coming from a very CRUD centric world, the thought of decoupling things in the way that CQRS was saying was really hard. And at the same time, there were potential for duplication in the code. I remember being completely freaked out at the beginning of the project. All my neural cells were screaming "NO! STOP!" - but we had to move on and get smarter, get passed the hurdles, learn. At first we really started making a mess out of things, just because we were building it on assumptions - the assumptions that CQRS is similar to doing regular old CRUD with what we used to know as a domain model. It was far from it, and we had a true eureka at one point were we realized something important; we were working hard an entire day on how to represent some queries in a good way so that they would be optimal in the code but also execute optimally - and it hit us as a ton of brick after leaving work that day. We were doing everything wrong, and we even came up with a mantra; "if a problem seems complicated, chances are we're doing it wrong". That was the turning point that helped us write code that was simpler, more testable, more focused, faster and we picked up pace in the project like I've never experienced before.  + +From that point we had our mantra that really proved as a guiding star. Whenever we ran into things we didn't have an answer to straight away and we started finding advanced solutions to the challenges, we applied the mantra and went back to rethink things.   + +# Tooling + +Early in the project we realized we needed a tool for both visualizing the events being generated, but also be able to republish events. We came up with a tool built in Silverlight, using the pivot control from Microsoft to visualize. + +![Mimir](images/mimir1.png "mimir.png") + +# The real benefits + +Looking back at what we did and trying to find the concrete benefits, I must say we now have gained serious amount of knowledge in a few areas. The thing that CQRS specifically gave us was the ability to model our domain properly. We achieved the separation we wanted between the behavior of the application and the things the behaviors caused changes to, the data on the other side. It helped us achieve greater flexibility, easier maintenance. Since we decided to not only just apply CQRS, but also build a reusable framework sitting at the bottom, we achieved a certain pattern of working that made things really easy to get started with development, and also a recognizable structure that made it easy to know were to put things if the core principles was explained to you. + +I think by far the biggest benefit we achieved was the insight into how we should be developing software. Keeping things simple really have huge benefits. Decouple things, staying true to single-responsibility in every sense of the word **single**. + +Another huge realization I had, something I have been saying all the time throughout my career but really got re-enforced with this project; concrete technology doesn't really matter. Sure things will end up as a certain concrete technology - but stop thinking concretely when designing the system. Try to get down to the actual business needs, model it and let the concrete technology fall into place later. With this approach, you gain another useful possibility; doing top-down development. Start with the user interface, move your way down. Keep the feedback loop as tight as possible with the business. Don't do more than is needed. This approach is something I know I will be missing the most in future projects. A tight feedback-loop is were the gold is hidden. + +# Were did we screw up? + +This project must come across as a fairly peachy story. And sure, it was by far in my experience the project with the best code-base, the most structured one, the one that I personally learned the most from and also the one project in my career that we really managed to be on schedule and in fact for a couple of the releases we delivered more business value than was asked for. But it came at a price. One of the things we struggled with early on was to spread the knowledge across to the entire team and get everyone excited about the architecture, the new way of working with things and so forth. Personally I didn't realize how invested people were in their existing solution, and also in the existing way of doing things. Me as the architect, should have seen this before we got started. The problem with not realizing this ended up being a growing problem in the group. You had a divide in the group of people buying into the entire story and those who didn't or didn't quite get the entire story. My theory is that we should have given the most invested members of the group a time for mourning. Get time to bury their friend through many years; the old project. We should have realized that we were in fact building for the future and would replace the existing solution at the beginning of the project and this should have been the official line. Instead it kind of organically became the official line. We did at the beginning do training in all the new techniques, and gave people time to learn. Basically didn't give them any tasks for a few weeks and just pointed them in the general direction of things they should look at. What I think we failed on was that we didn't point out that these things were not optional, these new ideas were in fact mandatory knowledge. We should have been much clearer about this and been vocal about the expectations. Another thing I think I would have done a bit different; involve more people in the framework part of things. With the risk of stepping on toes, I think it is not wrong of me to say that I was the framework guy. For the most part, I ended up working on the framework. Don't get me wrong, I love doing that kind of work - but I think the experience, the design decisions got lost in translation and not everyone in the group understood why things were done as they were.  + +# Conclusion + +The project and opportunity that was given to the team was awesome, I really appreciate the trust that was given to me for leading the way in this project. The pace we had, the stuff we did has so far amounted up to be the coolest project I've ever worked on - and I am happy to admit it; I miss the project. Hadn't it been for a great opportunity that was given to me, I would have loved to stay on further. We had ups and downs, as with any software project, but overall I am wildly impressed with our accomplishments as a team and also by the end result. + +Ohh… By the way. The end result can be found [here](http://m.komplett.no). diff --git a/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/images/commandflow2.png b/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/images/commandflow2.png new file mode 100644 index 0000000..f6fdf24 Binary files /dev/null and b/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/images/commandflow2.png differ diff --git a/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/images/commandform11.png b/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/images/commandform11.png new file mode 100644 index 0000000..2e29046 Binary files /dev/null and b/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/images/commandform11.png differ diff --git a/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/images/regularform11.png b/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/images/regularform11.png new file mode 100644 index 0000000..a985206 Binary files /dev/null and b/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/images/regularform11.png differ diff --git a/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/images/relocateviews2.png b/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/images/relocateviews2.png new file mode 100644 index 0000000..cf52835 Binary files /dev/null and b/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/images/relocateviews2.png differ diff --git a/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/images/webconfig11.png b/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/images/webconfig11.png new file mode 100644 index 0000000..1eec903 Binary files /dev/null and b/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/images/webconfig11.png differ diff --git a/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/index.md b/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/index.md new file mode 100644 index 0000000..30d909b --- /dev/null +++ b/_posts/2012/07/cqrs-in-asp-net-mvc-with-bifrost/index.md @@ -0,0 +1,64 @@ +--- +title: "CQRS in ASP.net MVC with Bifrost" +date: "2012-07-28" +categories: + - "net" + - "bifrost" + - "csharp" + - "cqrs" + - "javascript" + - "patterns" + - "practices" +--- + +If you're in the .net space and you're doing web development, chances are you're on the ASP.net stack and you might even be using the MVC platform from Microsoft on top of it. When we started building Bifrost for the [initial project](http://ingebrigtsen.blog/2012/07/12/cqrs-applied-a-summary/) we needed it for, we were also on the ASP.net MVC stack and quickly realised we needed to build something for the frontend part of the application to be able to facilitate the underlying backend built around the [CQRS](http://en.wikipedia.org/wiki/CQRS) principles. This post will talk a little bit about the motivation, what we were trying to solve and what we came up with. + +# The Flow + +Below you see a sample of a flow in the application. This particular sample shows a product page, it has details about the product and the price of course and what not, but also a simple button saying "Add to cart" - basically you want to add the product to your shopping cart. + +# ![Flow](images/commandflow2.png "CommandFlow.png") + +Sure enough, it is possible to solve this without anything special - you have your Model that represents the product with the details, price being a complex thing that we need to figure out depending on wether or not you have configured to show VAT or not and also if you're part of a price list - but something that is relatively easy to solve. On the execution side we have a command called AddItemToCart that we can with a simple ASP.net MVC form actually get populated properly : + +![NewImage](images/regularform11.png "RegularForm.png") + +A regular MvcForm with hidden input elements for the properties on the command you need that are not visibles, and of course any input from the user are regular input fields, such as text boxes and others. Basically, by setting the correct name, the default model binder in ASP.net MVC should be able to deserialize the FORM into a command. + +# Validation + +Now here comes the real issues with the above mentioned approach; validation. Validation is tied into the model, you can use any provider you want, the built in one or things like [FluentValidation](http://fluentvalidation.codeplex.com), like we settled on. But you quickly run into trouble with client-side validation. This is basically because the view is identifying one model, but the things you really want to validate are the commands. You want to validate before commands are executed, basically because after they are handled and events are published - the truth has been written and its too late to validate anything coming back on any models. So, how can one fix this? You could come up with an elaborate ModelBinder model that basically modified model state and what not, but seems to be very complicated, at least we thought so, of course after trying it out. We came up with something we call a CommandForm - so basically, instead of doing BeginForm() as above, we have extensions for the HtmlHelper that creates a CommandForm that gives you a new model within the using scope that gives you all the MVC goodies in a limited scope, including the ability to do client-side validation. + +So now you get the following : + +![NewImage](images/commandform11.png "CommandForm.png") + +Now you get a form that contains a new HtmlHelper for the command type given in the first generic parameter, and within the form you'll also find the Command, if you need to set values on it before you add a hidden field. + +This now gives you a model context within a view that is isolated and you can post that form alone without having to think about the model defined for the view, which really should a read only model anyways. + +Worth mentioning is that there is also an AJAX version of the same BeginCommandForm() were you do Ajax.BeginCommandForm() for those who need that as well. + +# Features + +Another thing that we wanted to do, as I mentioned in [this](http://ingebrigtsen.blog/2012/07/22/cqrs-the-awakening/) post, was the isolation of Features - sort of applications within the applications, just part of the overall composition that composed the larger scope. We defined a feature to contain all the artefacts that build up a feature, the view, controller, any javascript, any CSS files, images, everything. We isolate them by having it all close to each other in a folder or namespace for the tier you're working on, so for the frontend we had a Features folder at the root of the ASP.net MVC site and within it every feature was sitting there in their own folder with their respective artefacts. Then moving down to the backend we reflected the structure in every component, for instance we had a Component called Domain, within it you'd find the same structure. This way all the developers would know exactly were to go and do work, it just makes things a lot simpler. Anyways, in order to be able to accomplish this, one needs to do a couple of things. The first thing you need to do is just collapse the structure that the MVC templates creates for your project so that you don't have the Controllers, Views and Models folders but a Features folder with the Web.config from the Views folder sitting in it at its root. + +Then we need to handle static content property in the Features folder by permitting things like javascript files sitting alongside the view files, so you need to add the following within the tag in your Web.config file : + +![NewImage](images/webconfig11.png "WebConfig.png") + +Then you need to relocate the views master location formats for the view engines in ASP.net MVC : + +![NewImage](images/relocateviews2.png "RelocateViews.png") + +(Can be found [here](https://github.com/dolittle/Bifrost/blob/master/Source/Bifrost.Web.Mvc/BifrostHttpApplication.cs)) + +It will then find all your views in the features folder. You should now have a new structure. Only drawback, if you see it as one, is that tooling like Visual Studios built in "Add View" in the context menus and such stop functioning, but I would argue that the developer productivity is gained through a proper structure and you really don't miss it that much. I guess you can get this back somehow with tools like Resharper, but personally I didn't bother. + +# Conclusion + +ASP.net MVC provides a lot of goodness when it comes to doing things with great separation in the Web space for .net developers. It also provides quite a few extension points, and you can really see that the developers at Microsoft that has been working on it has gone out of there way to make it extensible and make the code clean. Sure, its not perfect, but what is - its way better than anything we've seen. This is something that we enjoyed quite a bit in our own little CQRS Journey, we did try quite a few things, some of them worked out fine - like the CommandForm, and some didn't. But we were quite happy with the productivity gain we got by adding these helpers, and it also made things a lot more explicit. + +One conclusion that we did however reach at a point, ASP.net MVC and Bifrost and its interpretation of CQRS is a bit of a strange fit. We basically have a full pipeline, in quite a different manner than ASP.net MVC has - which is a focused frontend pipeline. So any security, validation and more is something that we started building into Bifrost and the need for ASP.net MVC became less and less important, and when we started down the journey of creating Single Page Applications with HTML and JavaScript as the only thing you need, you really don't need it. The connection between the client and server would then be with Web requests and JSON and you need something like WebApi or similar, in fact we created our own simple thing in Bifrost to accommodate that even. But all this is for another post. + +The MVC part of Bifrost can be found [here](https://github.com/dolittle/Bifrost/tree/master/Source/Bifrost.Web.Mvc), and Bifrosts official page is under construction [here](http://bifr.st) and the source [here](https://github.com/dolittle/Bifrost). diff --git a/_posts/2012/07/cqrs-the-awakening/images/cartcartitem3.png b/_posts/2012/07/cqrs-the-awakening/images/cartcartitem3.png new file mode 100644 index 0000000..be73108 Binary files /dev/null and b/_posts/2012/07/cqrs-the-awakening/images/cartcartitem3.png differ diff --git a/_posts/2012/07/cqrs-the-awakening/images/cartitemproduct3.png b/_posts/2012/07/cqrs-the-awakening/images/cartitemproduct3.png new file mode 100644 index 0000000..19bf34f Binary files /dev/null and b/_posts/2012/07/cqrs-the-awakening/images/cartitemproduct3.png differ diff --git a/_posts/2012/07/cqrs-the-awakening/images/cartsummary3.png b/_posts/2012/07/cqrs-the-awakening/images/cartsummary3.png new file mode 100644 index 0000000..dca3b84 Binary files /dev/null and b/_posts/2012/07/cqrs-the-awakening/images/cartsummary3.png differ diff --git a/_posts/2012/07/cqrs-the-awakening/index.md b/_posts/2012/07/cqrs-the-awakening/index.md new file mode 100644 index 0000000..430ce1d --- /dev/null +++ b/_posts/2012/07/cqrs-the-awakening/index.md @@ -0,0 +1,81 @@ +--- +title: "CQRS : The awakening" +date: "2012-07-22" +categories: + - "csharp" + - "cqrs" + - "patterns" + - "practices" +--- + +Ever have that feeling when all of a sudden you're completely getting something, like an [awakening](http://www.imdb.com/title/tt0099077/). You might have been doing something that you think you were doing right, but all of sudden you get this eureka moment that not only tells you that you're doing things wrong, but also raises your awareness to a whole new level. This is what we experienced on the [first project were we applied CQRS](http://ingebrigtsen.blog/2012/07/12/cqrs-applied-a-summary/). In fact we had quite a few of these moments, this post is about trying to describe what we went through. + +# The background + +Before we can start, I think it is important to give a bit of a background of what we were used to be doing. Like most people in the development community, we tried following the right people on Twitter, read blogs, read books and in general just try to keep up the pace and learn new things. Some of us had really fallen in love over the years with the concept of [TDD](http://en.wikipedia.org/wiki/Test-driven_development), [BDD](http://en.wikipedia.org/wiki/Behavior_Driven_Development), clean code, [agile](http://en.wikipedia.org/wiki/Agile_software_development), [domain driven design](http://en.wikipedia.org/wiki/Domain_driven_design), the [S.O.L.I.D](http://en.wikipedia.org/wiki/SOLID_(object-oriented_design)) principles and what not. We tried to write our software according to the principles we loved. We were pretty convinced we were doing a great job at it as well. Even though we felt at times there were something wrong with a few things, we carried on. + +The way we used to do things was to basically have a relational database sitting at the core with pretty much just tables and relations and the odd view every now and then. On top of that we would model objects that represented those tables and relationships and we would add more business logic to these objects and we would then slam a stamp on these objects and call them our domain model. This domain model would only have one representation of every type, so that we [didn't have to repeat ourself](http://en.wikipedia.org/wiki/DRY). From this we modeled repositories that enabled us to work with getting the domain objects, change them, update them and every now and then we needed to delete them; good old [CRUD](http://en.wikipedia.org/wiki/Create,_read,_update_and_delete) operations. We would even throw in some services to explicitly model functionality that was outside the responsibility of the repository, but more to capture business logic that was more involved. From my experience working in different projects and what I've seen doing consultancy, this is not way off what people tend to do. Of course there is more to it, you have your factories, your managers and what not, and you might even have different representations of your domain model for the view were you need to map back and forth between the different layers. Sure. More involved, but you get the picture. + +# Relationships + +Often you find yourself writing these relationships between things, and it is just so logical that there is a certain relation between the two entities - they belong together in a symbiosis somehow. Take for instance a shopping cart, it is just sitting there screaming for content in the form of some items, there is no other way around it. We just get a craving for amodel similar to this :  + +![NewImage](images/cartcartitem3.png "CartCartItem.png") + +Looks innocent enough and really makes sense. You might even throw in some read only properties that gives you convenience for counting the number of items, summarizing all the items and so forth. And then you realize, hang on - that CartItem is not referring to any product.  + +![NewImage](images/cartitemproduct3.png "CartItemProduct.png") + +So now we have first of all a One-To-Many relationship, then we have a One-To-One relationship. Whenever we want to just check how many items we have in our cart we have to pull in this entire thing. Wait you might be saying now, with modern [ORM](http://en.wikipedia.org/wiki/Object-relational_mapping) we can specify how it is supposed to fetch things, by demand - typically what is referred to as lazy loading. Sure, we could do that for Product, and probably also for the CartItem, but the second you would ask for something like quantity it would still need to fetch all the CartItems. This adds quite a bit of complexity to your solution. All of a sudden you have a situation were your application is governed by how the objects are configured for the ORM and how they should be fetched. Potentially you could end up with 3 round-trips to the database if the model is used in a particular part of your Cart visualization that is showing the product names. Ones for getting the Cart from the database, ones for getting the cart items it is enumerating, and once for getting the product. What happens if we throw price into the mix. The product can't have a price directly, because there might be discounts that is relevant for the customer, so yet another object just to display something that seems very simple and straightforward. + +Now you might be saying, why don't we just flatten this all out in a database view - my response to that; exactly. That is exactly what we should be doing, but not in the database. This is at the core of the benefits CQRS can give you; the ability to flatten things out - especially if you buy into the [EventSourcing](http://codebetter.com/gregyoung/2010/02/16/cqrs-task-based-uis-event-sourcing-agh/) story, storing state as a series of fine grained events. Sure, you don't need EventSourcing, but it adds for greater flexibility when you want to fully take advantage of the ability to flatten things out after something has already happened. More on this in a bit. + +So views and flattening things out. That was our first moment of clarity. We really didn't need any relationships, in fact we didn't even need a Cart object, we needed something called CartSummary - it was a very different beast. And so much simpler in its nature. + + ![NewImage](images/cartsummary3.png "CartSummary.png") + +So what happened here? + +Instead of having to go to the database and get all those details as mentioned earlier every time we wanted to get to the summary, we had this simple object. Whenever the user performed an action that said add something to the cart, or remove something from the cart, we would have 2 subscribers for these events. One subscriber would be in charge of updating the underlying CartItem, and another one would be in charge of updating the CartSummary by selecting into the CartItems and just setting the values accordingly. Instead of taking the hit every time you needed the detail, we now take the hit only when actions are performed. My claim is that most applications out there has a ratio between reads and executes that are probably around 9 to 1, so why haven't we been optimizing for this scenario before?  + +Anyways, clearly the objects became simpler and more focused - all of a sudden our objects were doing one thing, and one thing only. We were empowered with the ability to really apply the [single responsibility principle](http://en.wikipedia.org/wiki/Single_responsibility_principle) for our objects. + +I mentioned EventSourcing; a technique for storing the events sequentially as they happen so that we can replay them at any given point in time. This is a very powerful tool. Imagine the flattening we just did and lets say you want to keep introduce another object to the mix and you want the historic state to affect that object. With event sourcing it is then just a matter of replaying those events for the event subscribers dealing with the new object and all of a sudden you have your new optimized state. An example of that could in the cart context be something like a realtime report showing all the carts historically aggregated, you could have objects representing only living carts - and more. The best part, these objects are lightweight and you start seeing possibilities for storing these in a very different manner. + +# Concepts + +One of the things we started also realizing was that we were having a lot of IDs as a consequence hanging around, either as integers representing the identity or GUIDs. Neither our Commands nor our Events were reflecting properties on them very well. A standard value type sitting there didn't say what it was, it was basically just an integer or a GUID. So we started modeling these things that we ended up calling Concepts. These were cross cutting and something we kept in its own project that could be reused all through. It turned out to be the one thing that was shared between things. The types we introduced were basic reusable things, like StoreId, representing a Store, but also more complex things like a PhoneNumber instead of holding a string. EMailAddress is another example of just that and all of a sudden it was so much easier to model all aspects of the system and we got ourself a vocabulary - one of the key elements of domain driven design. You couldn't go wrong. Another benefit we got from this, purely technically, was that validation was all of a sudden falling into place as the cross-cutting-concern it is. Along side some of these concepts we put validators, we used FluentValidation for this as it let us put validation outside of the thing we were validating, giving us great flexibility in how we applied validation - a whole concept for a different post that I'm hoping to get to; discovery mechanisms based on configurable conventions and hierarchies. Anyhow, with having the concepts and validation of concepts we got DRY in what we consider a very good way.  + +# LINQ madness + +Once you learn something and you really like it, it is hard to change how you do things. This was something we ran into quite a bit, but one incident that comes to mind was specifically tied into LINQ. We had our Cart and CartItems and just wanted to model the CartSummary, but wanted to solve it through querying. Basically we wanted to be able to specify for an object like that how it could aggregate things, totally disregarding that our platform could at this point flatten things out when things changed, not having to aggregate every time. We had a full day of bending things around LINQ and we wanted add some business rules to some of our objects we used in the view to change the outcome. To do this, we wanted to specify things using the [specification pattern](http://en.wikipedia.org/wiki/Specification_pattern) and turn it into LINQ expressions that we could execute against the datasource. Sure, it might have seemed as a good idea if you didn't have CQRS in mind. But we did have CQRS and we wanted to be pure. At this point I remember having a feeling that we were just creating a really fancy ORM - and not really doing anything differently, rather just massively overkilling our existing ways of doing things. This day we discovered that it is not really about querying - the Q in CQRS is not about querying. We went back, changed our code so that we flattened things when events were risen. We could then just access everything by keys and that would be it. And this concept can go all the way for just about everything. As long as you have a key, you can go get things. This realization led to us not calling things queries - we changed it to be called view, lacking a better name. But at least it was closer to what things were, we weren't going to execute complex queries - but get things by a key. + +# GUID is the key  + +In order for CQRS to be applied, you need to start thinking very differently about how your objects gets their identification assigned. In our opinion; its all about being able to generate the Id already from the client. By doing that, things get so much easier. All of a sudden the client knows the identity of the thing it is creating, meaning that it can already at that point, even though it might not be ready due to eventual consistency, use the Id for other purposes related to it. Basically, we can start doing a few assumptions in the client and create better user experiences. We used a [GUID](http://en.wikipedia.org/wiki/GUID) throughout the system for everything that was used to identify items.  + +# Data, what data... + +One of the things that we're thought when working with more classic approaches like explained earlier, is to be very data focused. We're modeling the data and then we're creating, updating and deleting it. We're thought to work with state. When you sit down with a user and ask them to describe to you their needs in the application you're building for her. Unless she is a power user tainted by developers, she will probably state her needs as behaviors. How often have you heard the "I need a button here, so that…", and we immediately stop paying attention because we're so annoyed that the user couldn't speak in more abstract terms than concretely about the button and we only pick up the stuff that comes after "so that" which is the state bit. Creating software is not about building state, its about exposing behaviors to the user that might end up as state. This is a very core principle in CQRS; Commands. You model your commands to expose the behavior that is needed and you also capture the intent. With a command you represent the What and potentially the Why - you put it in the name of the Command : ChangeAddressBecauseOfMove - now we have the What and the Why.  + +This is something we realized more and more throughout the project - it is really all about the behaviors, once we got to that, it was so much easier picking up what the users wanted from the system. All of a sudden the button that the user wanted is not that much of a problematic way of expressing the needs, especially when you start doing things top-down and you can actually work with the user on prototypes, drawings and similar - things that they relate to. A user do not relate to a SQL table or relationship, they relate to the things they do - like clicking a button.  + +From this realization came a bunch of other eurekas throughout the project. The biggest and most important thing was that we should step away from the idea that state can only be held in one place. Lets face it, a SQL server is good at many things but not everything, just like any technology; nothing is great at everything. We started realizing that we could start persisting our state that would be most suitable for its use. For one particular feature we put the data as a JSON object model directly onto a CDN and let the client download it when the feature was loaded. With GZIP compression on the server that request turned out to be on an average of 40KB and totally taking the load away from the Web server and the SQL server for performing something that would have been a pretty complex query. Instead we generated the JSON file whenever the underlying data changed, and it was not changed very often - so browser caching would also be a big benefit for returning customers. + +We started realizing that we could pretty much go any way with this. A lot of the time, things are close to static - they hardly change. Why are we then dynamically generating things like Web pages - why aren't we just generating them when things change and put them on a CDN or on the file system of the Web server that hosts the solution and we just sent it directly back to the client. You might be saying at this point that we do have things like caching of web pages for things like this, but I would argue - why would you add that complexity to your solution, why would you also add that pressure onto your hardware in the terms of extra memory needed, for all of your servers in the farm to be able to process this. All that for something that is solved way easier, just render it when needed.  + +With all this, we stopped thinking about data - we focused on the behavior, the data - or state as I would rather prefer to call it, could then be represented in any way, in fact - it might even change over time how you represent it. + +# The bounded contexts + +One of the things that [Eric Evans](http://domaindrivendesign.org/about) mentioned in [his book on DDD](http://domaindrivendesign.org/books/evans_2003) is the concept of bounded contexts. A concept that is in a bit of conflict with the idea of DRYing up things and the whole idea of having one model to rule them all. The idea is to have context aware representations of concepts found in your domain. Take for instance a Product in an e-commerce setting. For someone in charge of acquiring products for the store to have it available in the shop, they are interested in certain aspects of it the product. The are interested to know about who the vendor is, who is importing that particular product, you are of course interested in the price you as a store can buy it for - so you can figure out what your margins can potentially be on the product. Once the product hits the warehouse, none of those properties are important - they only care about how they can store that product in the warehouse - they don't even care about the brand. Things like dimensions and weight is key information to the warehouse. Once the user sees the product on the web-shop, they are interested in the retail price, the description, other customers feedback, reviews and a whole lot more. Why model this as one product, chances are that the people in your organization might not be referring to it as a product, at least not in all departments.  + +This was a huge realization we had, the minute we discovered this truth we stopped completely with thinking in any relational manner. Sure, we did have an existing database to take care of, because the project was greenfield built on top of existing data that was shared between the old and the new. But our mindset. We started modeling things with the lingo that was for the context, and not try to apply the same model across the board - sort of a compromise model that would suit all the needs.  + +# Features + +Before Greg Yong and Udi Dahan agreed upon the [concept of business components](http://www.udidahan.com/2012/02/10/udi-greg-reach-cqrs-agreement/), we were well on our way with what we called a feature. But it serves the same purpose. The idea is to isolate features within a bounded context and that feature can not be shared between bounded contexts. It was also a very important realization we had that gave us a structure in the application and the different components it was built on to have this recognizable structure throughout. Naming was consistent, and you isolated things within the feature itself, so no namespace for interfaces that turns out to be a dumping ground for all the interfaces in the project or something like that. For all the tiers, you would find the features name - and all artifacts related to the feature in that tier would be inside that namespace / folder. That way we kept related things close, and it was more maintainable and even bringing new guys into the project made it a lot easier. For the ASP.net MVC part, the front-end tier, we even went ahead and relocated were views and controllers normally are found; we put them together - in fact we put together everything related to a feature inside the same folder - be it controllers, views, javascripts, images and so forth. It was just a matter of configuring things correctly and we could maintain a consistency throughout the project that would prove to be of great value. + +# Conclusion + +As with any software project, these are how we experienced things - these are our conclusions, our interpretations of patterns and ways of doing things. We can not go out and say that our way is the best, but it was the closest thing to best for our team. The conclusions we reached, the realizations we had made our work so much easier. It turns out however for the guys that were part of these realizations and conclusions that it gave a push in a general direction of writing better code. We feel that we are now empowered with the knowledge to not compromise on code quality and be able to deliver on time, something we did again and again on the project. All deadlines we had were met, partly because of the platform we build, but also the way we worked in general. The more of the mindset we got changed, the faster we were able to deliver and we were focusing on the right stuff; the business value. It gave us a way to speak to users, and really translate it into what they were looking for; not the data, but capture the behaviors. diff --git a/_posts/2012/07/mcts-70-507-guide-winners/images/mcts70506winners2.png b/_posts/2012/07/mcts-70-507-guide-winners/images/mcts70506winners2.png new file mode 100644 index 0000000..c6a6f63 Binary files /dev/null and b/_posts/2012/07/mcts-70-507-guide-winners/images/mcts70506winners2.png differ diff --git a/_posts/2012/07/mcts-70-507-guide-winners/index.md b/_posts/2012/07/mcts-70-507-guide-winners/index.md new file mode 100644 index 0000000..f1424ca --- /dev/null +++ b/_posts/2012/07/mcts-70-507-guide-winners/index.md @@ -0,0 +1,12 @@ +--- +title: "MCTS 70-507 guide winners" +date: "2012-07-31" +tags: + - "silverlight" +--- + +Last week I had a contest on the blog here to win the [Silverlight 4 development certification guide book](http://ingebrigtsen.blog/2012/07/22/mcts-microsoft-silverlight-4-development-70-506-with-contest), and the lucky winners are, based off the comments :  + +![NewImage](images/mcts70506winners2.png) + +Congratulations to you both! diff --git a/_posts/2012/07/mcts-microsoft-silverlight-4-development-70-506-with-contest/images/mcts_sl42.png b/_posts/2012/07/mcts-microsoft-silverlight-4-development-70-506-with-contest/images/mcts_sl42.png new file mode 100644 index 0000000..3d72f4f Binary files /dev/null and b/_posts/2012/07/mcts-microsoft-silverlight-4-development-70-506-with-contest/images/mcts_sl42.png differ diff --git a/_posts/2012/07/mcts-microsoft-silverlight-4-development-70-506-with-contest/index.md b/_posts/2012/07/mcts-microsoft-silverlight-4-development-70-506-with-contest/index.md new file mode 100644 index 0000000..09b4aaa --- /dev/null +++ b/_posts/2012/07/mcts-microsoft-silverlight-4-development-70-506-with-contest/index.md @@ -0,0 +1,28 @@ +--- +title: "MCTS: Microsoft Silverlight 4 Development (70-506) (With contest)" +date: "2012-07-22" +tags: + - "silverlight" +--- + +If you're looking to become an MCTS certified Silverlight developer, you might want to do so through the guidance of a certification guide.  +Packt Publishing has a book by Johnny Tordgeman, to do just that.  You can go get it [here](http://www.packtpub.com/mcts-microsoft-silverlight-4-development-70-506-certification-guide/book). + +[![NewImage](images/mcts_sl42.png)](http://www.packtpub.com/mcts-microsoft-silverlight-4-development-70-506-certification-guide/book) + +**About the book** +The book will take the readers through the process of laying out a user interface in Silverlight using concepts such as panels, content controllers and navigation. Readers will also learn the configuration, delivery and deployment of a Silverlight application and dynamically loading resources into the application, working and creating a powerful data driven line of business application. Also you'll learn to understand how to enhance the UI of your application through manipulating visual elements, creating animations and other important UI concepts.   + +The book is written by [Johnny Tordgeman](http://blog.johnnyt.me/2012/07/05/my-book-is-published/), a professional SharePoint, FAST and frontend developer and trainer. + +**There is a contest +**The cool part is; Packt is sponsoring a contest, right here - on this blog; two e-book copies to be given away to two lucky winners. + +**How can I win? +**All you have to do is drop a comment below highlighting why you should win this book. Don't forget to post how we can hold of you; a twitter alias, obfuscated mail address or similar. + +**Duration +**The contest will be valid for 7 days from this post - meaning that you'll have to post a comment with a good description by July 29th. + +**Selection of winners** +Winners will be selected on the basis of their comment posted. diff --git a/_posts/2012/07/moving-to-wordpress/images/casemagic3.png b/_posts/2012/07/moving-to-wordpress/images/casemagic3.png new file mode 100644 index 0000000..e0cd6cb Binary files /dev/null and b/_posts/2012/07/moving-to-wordpress/images/casemagic3.png differ diff --git a/_posts/2012/07/moving-to-wordpress/images/themovehelp3.png b/_posts/2012/07/moving-to-wordpress/images/themovehelp3.png new file mode 100644 index 0000000..ee3ea9c Binary files /dev/null and b/_posts/2012/07/moving-to-wordpress/images/themovehelp3.png differ diff --git a/_posts/2012/07/moving-to-wordpress/index.md b/_posts/2012/07/moving-to-wordpress/index.md new file mode 100644 index 0000000..4965e21 --- /dev/null +++ b/_posts/2012/07/moving-to-wordpress/index.md @@ -0,0 +1,28 @@ +--- +title: "Moving to Wordpress" +date: "2012-07-20" +categories: + - "general" +--- + +In an effort to consolidate the different sites and domains I have, I've recently gone through a bunch of moves and most recently my personal blog. Finally managed to get it off of the [BlogEngine.net](http://www.dotnetblogengine.net/) solution it was running on that I had done some customizations on and got it hosted on [Wordpress.com](http://wordpress.com) - for my needs, this is perfect. I just want a service that runs and works.  + +But it proved to be far more challenging than I had originally thought. First of all, the format that [BlogEngine.net](http://www.dotnetblogengine.net/), at least the version I was running, could export to was BlogML. A format that Wordpress.com could not import out of the box. + +But lucky enough, asking on Twitter pays off, as it normally does. [James Paulp](http://www.jamespaulp.com/) came to the rescue. + +![NewImage](images/themovehelp3.png "TheMoveHelp.png") + +The [article](http://www.craigbailey.net/migrating-from-blogengine-net-to-wordpress/) basically describes the process of exporting to BlogML, installing Wordpress locally, installing a BlogML import plugin, import it into that and then export it into a Wordpress XML format and put that into Wordpress.com.  + +A process that seemed simple enough, but you would have to do any media or attachments for yours posts manually. Meaning that you would need to upload these and sort out the URLs manually by search/replacing your way through the XML before importing. + +Again, pretty straight forward, except for one fact - a lot of my older posts were still pointing to images that was still being served from a [Community Server](http://telligent.com/support/communityserver/) installation I used to host my blog on earlier on a different domain. So now I had two sources of images, and of course it had to take me like 2-3 imports into Wordpress.com to discover this.  + +Finally, everything in place, all resources mapped as they should and uploaded to Wordpress.com. Bam..  No images displaying still. + +Turns out, Wordpress.com is case-sensitive on the filenames for media, and when you upload media they are being turned into lower-case. Fantastic when all your stuff is mixed case. In addition it turns out that it also switches any dots in filenames of your media around to be an underscore. + +So a C# snippet later, most of my content is fine - I just need to fix a couple of older posts manually. Fine, and not the end of the world - so I'll just walk through my posts and do it by hand. + +![NewImage](images/casemagic3.png "CaseMagic.png") diff --git a/_posts/2012/07/windows-8-developer-kickstart/images/win8logo31.png b/_posts/2012/07/windows-8-developer-kickstart/images/win8logo31.png new file mode 100644 index 0000000..8d02417 Binary files /dev/null and b/_posts/2012/07/windows-8-developer-kickstart/images/win8logo31.png differ diff --git a/_posts/2012/07/windows-8-developer-kickstart/index.md b/_posts/2012/07/windows-8-developer-kickstart/index.md new file mode 100644 index 0000000..477d653 --- /dev/null +++ b/_posts/2012/07/windows-8-developer-kickstart/index.md @@ -0,0 +1,14 @@ +--- +title: "Windows 8 Developer Kickstart" +date: "2012-07-12" +categories: + - "javascript" +--- + +Windows 8 is around the corner and I was asked to do a talk for a kickstart event Microsoft is doing.  + +My Talk will be on doing metro apps with HTML, CSS and JavaScript, how you can leverage your existing Web experience and knowledge and take advantage of some of the functionality specific to Windows 8. + +The event will be in Oslo @ Microsoft Norway. If you're interested, jump over to [here](https://msevents.microsoft.com/cui/m/EventDetail.aspx?EventID=1032519948&Culture=nb-NO&community=0) to register for it. + +![NewImage](images/win8logo31.png "Win8Logo.png") diff --git a/_posts/2012/08/new-blog-different-focus/index.md b/_posts/2012/08/new-blog-different-focus/index.md new file mode 100644 index 0000000..c400e42 --- /dev/null +++ b/_posts/2012/08/new-blog-different-focus/index.md @@ -0,0 +1,24 @@ +--- +title: "New blog - different focus" +date: "2012-08-11" +categories: + - "general" +--- + +A couple of weeks ago, we started a new blog that you can find [here](http://blog.dolittle.com). The focus over on that blog will be very different than I've been having on my own personal blog here. It will be more in the lines of our perspective on software development, what we think is important, values and how to do things. Not so much about specific technology, but rather techniques, processes, patterns and such. + +I will still be blogging on this blog with different focus than on the DoLittle blog. + +# So, who are we + +At the moment, we're 4 happy chaps, doing software development and we share the passion of thinking we can always get better. The guys involved are as follows : + +[Pavneet Singh Saund](http://www.linkedin.com/in/pavneet) - [@pavsaund](http://twitter.com/pavsaund) + +[Niclas Bergquist](http://www.linkedin.com/pub/niclas-bergquist/9/294/123) - [@niclasbergquist](http://twitter.com/niclasbergquist) + +[Michael Smith](http://www.linkedin.com/pub/michael-smith/1/163/2b8) - [@WolfieBhoy](http://twitter.com/WolfieBhoy) + +[Einar Ingebrigtsen](http://www.linkedin.com/in/einari) - [@einari](http://twitter.com/einari) + +Without getting into very specifics about what we will be having a conversation on, we can say this much that we think have something interesting to say and hope you'll be watching this. diff --git a/_posts/2012/08/slashing-away-the-hash-bang-in-single-page-applications-in-bifrost/images/url-flow3.png b/_posts/2012/08/slashing-away-the-hash-bang-in-single-page-applications-in-bifrost/images/url-flow3.png new file mode 100644 index 0000000..2b8e123 Binary files /dev/null and b/_posts/2012/08/slashing-away-the-hash-bang-in-single-page-applications-in-bifrost/images/url-flow3.png differ diff --git a/_posts/2012/08/slashing-away-the-hash-bang-in-single-page-applications-in-bifrost/index.md b/_posts/2012/08/slashing-away-the-hash-bang-in-single-page-applications-in-bifrost/index.md new file mode 100644 index 0000000..2405e91 --- /dev/null +++ b/_posts/2012/08/slashing-away-the-hash-bang-in-single-page-applications-in-bifrost/index.md @@ -0,0 +1,24 @@ +--- +title: "Slashing away the hash bang in single-page applications in Bifrost" +date: "2012-08-03" +categories: + - "net" + - "javascript" + - "mvvm" +--- + +One of the things that has been discussed the last couple of years for [single-page applications](http://en.wikipedia.org/wiki/Single-page_application) are how to deal with routing since rendering and composition in those kind of applications is being dealt with on the client. Many have been pointing to using the hash (#) as a technique since this is for one possible to use to change history in the browser without post-backing for browsers that does not have the new [HTML5 history API](http://html5demos.com/history/). This works fine for applications and is very easy to respond to in the client, but the URLs become unfamiliar and looks a bit weird for deep-linking. In order for search crawlers to crawl content properly, a specification exist that also states the inclusion of a ! (bang) yielding a #! (hash bang) as the separator for the specific route.  In [Bifrost](http://bifrost.dolittle.com) we have been working quite a bit the last six months in order to get a model that we believe in for single-page applications. Many models build on relying partially on the server for rendering, but composing the rendered parts in the client. With Bifrost, we wanted a different model, we wanted everything to be based on regular static HTML files sitting on the server, without having any load on the server for rendering - just serve the files as is. Instead, we wanted to compose the application from files on the server. One of the challenges we wanted to crack was to have regular URLs without any # or #!, even for HTML4 browsers - or at least in any anchors linking inside the app. In order for this to work, you need to deal with requests coming to the server with routes that has no meaning for any server code running. One of the motivations were also to not have to do anything specific for any routes on the server, meaning that you wouldn't need to configure anything for any new routes you wanted - everything should be done only once on the client. + +# The problem + +The nature of a single-page application is that it basically has a start page, and all requests should go to this page. This page represents the composition of the application, it has enough information and scripts on it to be able to render the remainder of the app based on any URLs coming in. In order to accomplish this, the server must be able to take any URLs coming in and pretty much ignore the URL - unless of course there is something configured or a file exist at the specific URL.  + +# Our solution + +Bifrost is for now built for .net and more specifically ASP.net, so we had to dig into that platform specifically to figure out a way to deal with this. What we discovered is a part of the request pipeline in ASP.net that we could hook into and do a rewrite of the path during a request. (The implementation can be found [here](https://github.com/dolittlestudios/Bifrost/blob/master/Source/Bifrost.Web/Pipeline/SinglePageApplication.cs).) + +![URL Flow](images/url-flow3.png "URL Flow.png") + +# What about the client? + +Another challenge is to deal with history without post-backing. The way we've built everything is that you as a developer or web designer does not have to think about wether or not this is a Bifrost app or just a regular HTML app, you just create your anchor tags as usual. Just create your links as before, no hash-bangs nothing special - have your full paths sit there. This also makes it work just great with search-engines and they will be able to crawl your content and get the proper deep-links and index you. But we need to hook into the browser still, so we don't do a post-back to the server for any URL changes. The way we've chosen to deal with this is to [hook into the body and deal with it through event-bubbling](https://github.com/dolittlestudios/Bifrost/blob/master/Source/Bifrost.JavaScript/navigation/navigationManager.js). Any click events occurring inside the document will then be captured and if it happens to be an anchor tag that is the source, we pull out the URL and rewrites history inside the browser. Since we're using [Baluptons History.js](https://github.com/balupton/History.js/), we get support for HTML4 browsers as well. History.js will use hash in those scenarios were it can't rewrite the path, but your URLs does not have to change - it will just use it internally and it will all be abstracted away. diff --git a/_posts/2012/10/mcts-microsoft-silverlight-4-development-short-book-review/images/mctssl411.png b/_posts/2012/10/mcts-microsoft-silverlight-4-development-short-book-review/images/mctssl411.png new file mode 100644 index 0000000..4f8c56e Binary files /dev/null and b/_posts/2012/10/mcts-microsoft-silverlight-4-development-short-book-review/images/mctssl411.png differ diff --git a/_posts/2012/10/mcts-microsoft-silverlight-4-development-short-book-review/index.md b/_posts/2012/10/mcts-microsoft-silverlight-4-development-short-book-review/index.md new file mode 100644 index 0000000..c4002a4 --- /dev/null +++ b/_posts/2012/10/mcts-microsoft-silverlight-4-development-short-book-review/index.md @@ -0,0 +1,20 @@ +--- +title: "MCTS: Microsoft Silverlight 4 Development - Short book review" +date: "2012-10-26" +categories: + - "practices" +tags: + - "silverlight" +--- + +I've had the pleasure of getting early hands on for the MCTS certification guide for Silverlight 4, and figured I'd do a short review of it. + +[![NewImage](images/mctssl411.png "MCTSSL4.png")](http://www.packtpub.com/mcts-microsoft-silverlight-4-development-70-506-certification-guide/book) + +The purpose of the book is to give you a guide of what to expect to know for becoming a certified Silverlight developer. Personally I haven't done the certification, so I won't be able to say if it is sufficient or not, but I would imagine that the certification itself has been used as a guide for what is needed. + +Silverlight 4 is a pretty large subject on its own, and quite ambitious to cover in just one book and at the same time provide guidance towards a certification. I feel that this book really accomplished this in a good manner, it is straight to the point but at the same time not leaving out any explanations. I even picked up some basic knowledge I was not aware of myself.  + +Being a guidance for certification, it does just that, so its not going to go outside of that promise. Which probably makes it feel a little light-weight on real world scenarios and it stays true to the original Microsoft messaging. It mentioned MVVM to some extent, but it could probably have dove into that subject a bit more, in my opinion. But I totally understand why it is not brought up. Being very focused on code quality, testability and such I feel that it is important to get this message straight, even though it might not be 100% relevant to a certification.  + +All in all I found the book to be as close to a page turner as these kind of books can be, I learned some basics myself and brushed up on my own knowledge of Silverlight while reading it. And I'm pretty confident it will serve as a good guide for a developer wanting to certify him/her-self as a Silverlight developer. diff --git a/_posts/2012/12/time-for-a-debt-management-plan/index.md b/_posts/2012/12/time-for-a-debt-management-plan/index.md new file mode 100644 index 0000000..cbf8274 --- /dev/null +++ b/_posts/2012/12/time-for-a-debt-management-plan/index.md @@ -0,0 +1,42 @@ +--- +title: "Time for a debt management plan?" +date: "2012-12-02" +categories: + - "code-quality" +--- + +Lately I've been getting negative feedback from talking about technical debt. I've been trying to go over it in my head why it would be considered negative, and what spawns the idea of it being a negative thing. I really can't figure out why it would ever be considered bad to have technical debt, so instead of trying to figure out why people would consider it a bad thing, I'll try to shed some light on what technical debt in reality is. + +I'm going to start off by saying; technical debt is something that all projects have, no matter how recent the project was created. In fact, I would probably argue we put in technical debt on a daily basis on all software projects. You might be screaming [WAT](http://www.urbandictionary.com/define.php?term=wat) at this point, and you're fighting the urge to completely disregard this post and move long, because you think I'm talking utter nonsense. But before you do that, I'd like to take the time to lay out what i think classified as technical debt.  + +## **// Todo** + +Ever sit in your code and you go up against something you really can't fix, its too involved at the current point in time, or the architecture in its current state would not permit it, or plain and simple; you don't have time - you're having a Sprint demo in 1 hour. You end up putting a **// Todo** comment in the code, something to revisit at a later stage. You might not even know when. This falls into the technical debt category. One could even argue that any comment put into the code makes the code technical debt, the reason being - the code is too hard to understand on its own and needs a comment to explain what it is doing. I'll leave the subject of general comments for now, as it should be subject of a different post. + +## Legacy code + +Just about every system being built out there has some legacy they have to deal with, some data model that you can't get rid of. The art of dealing with legacy code is then to try to come up with an [anti corruption layer](http://www.infoq.com/interviews/Architecture-Eric-Evans-Interviews-Greg-Young) that will keep the legacy in one place. But even having this in place, sometimes things leak through. So things you really didn't want in your new model might be leaking in, it could be anything from a simple property with the wrong name going through your new model to large concepts being misrepresented. All these can be categorised as technical debt. + +## Changing horses midstream + +Working in software is in my opinion much like being on a high speed train that really don't have a destination but have [railway switches](http://www.ehow.com/info_8453835_parts-railroad-intersection.html) that makes the software change tracks. This can be new way of doing things that the team want to embrace. It could be new knowledge the team acquires that they didn't have before that will make the software better moving forward. Everything being left behind at that point represent technical debt. They are things the team would ideally want to have fixed, but often in the interest of time, they can't go and do it right now. + +## Complexity + +Another warning sign that makes my bells go off is when something is hard to follow. Unless you're sending spaceships to the moon or other planets, I have a hard time believing that software should be hard to do, understand or follow. Done right, and everything should be very simple. Large methods, large classes, things taking on more than one responsibility, all these are things leading to complexity in the software and making it hard for anyone else but the guy that originally wrote it to understand. In fact, I would even argue that the guy that originally wrote it would have a hard time going back into own complex code. This is typically a situation were the team would like to have it another way, and hence should be categorised as technical debt.  + +## Bugs + +So, what about bugs then. This is funnily enough something that does not fall into the category. Bugs are defects in the software, functionality that does not work as promised. Sure, it could be a ripple effect thats causing the bug, or clash of bugs, based off other parts of the system being technical debt. But then you should try to identify the real problem and fix that in isolation, not categorise the bug as technical debt.  + +## Now what?  + +Don't jump into panic just yet, just because you're realising the project you're on seems to suffer from one or more of the above mentioned issues. How do we deal with it? Well, first of all - be honest. When it comes to software development and life in general, I've had great success with just being honest. Be honest with yourself, be honest with your team, be honest with whoever is picking up the bill at the end of the day; **you have technical debt.** And its fine, its actually a good thing, it means the system is evolving, you as a developer is evolving, and probably for the better. Its called progress. You only need to be aware of the technical debt, write it down somewhere - **NOT IN THE CODE** - somewhere making it visible for the entire team. Writing it down and glancing at it during planning, having it in the back of every developers mind makes it so much easier to actually deal with the debt, pay back some of it while moving forward and creating new features or fixing bugs. How you register it and make it visible is not important, whatever works for your team. Personally I prefer simple ways of dealing with this. One project I was on, we started by just putting the technical debt in the form of post-its on a wall. This slowly progressed into becoming a [Trello board](http://www.trello.com) that we had running on a 42" screen all the time. By doing this we had the technical debt available when not sitting in the office, but by putting it on the 42" screen displaying only that made it a focal point. Something the team was focused around, all the time; keeping an eye on the debt - slowly paying back. + +Another aspect I find important, not only for technical debt but in general; don't make your code personal. Its not a manifestation of yourself, it is code. The code gets committed into the repository, and it is no longer yours, but the entire teams. The idea that you will be maintaining it for ever is just silly, you might quit your job, or worse things could happen. The code is not yours in that sense, you wrote it, but detach from it! + +If for any reason technical debt is a loaded term in your organisation, you might want to consider calling it something else. Don't pretend you don't have the elements mentioned in your solution just because it is a loaded term. Call it something like "wall of shame", or anything that will work within your team and organisation. + +## Conclusion + +Stop letting technical debt scare you, stop trying to avoid admitting to the fact there is technical debt. We all have it, we all contribute to having it, the only important thing is that it is on our agenda, we need a way to pay it back. Establish your own debt management plan, either in the form of work items in your work item tracking software, post-its on a wall or something that fits you. Get it out there, in the open, its not scary - in fact, I would argue the opposite is scary; not knowing what the debt level is. diff --git a/_posts/2013/01/singling-things-out/images/houston1.png b/_posts/2013/01/singling-things-out/images/houston1.png new file mode 100644 index 0000000..448b9fc Binary files /dev/null and b/_posts/2013/01/singling-things-out/images/houston1.png differ diff --git a/_posts/2013/01/singling-things-out/images/makeitso1.png b/_posts/2013/01/singling-things-out/images/makeitso1.png new file mode 100644 index 0000000..532b854 Binary files /dev/null and b/_posts/2013/01/singling-things-out/images/makeitso1.png differ diff --git a/_posts/2013/01/singling-things-out/index.md b/_posts/2013/01/singling-things-out/index.md new file mode 100644 index 0000000..7698856 --- /dev/null +++ b/_posts/2013/01/singling-things-out/index.md @@ -0,0 +1,91 @@ +--- +title: "Singling things out..." +date: "2013-01-20" +categories: + - "code-quality" + - "cqrs" +tags: + - "agile" +--- + +I was at a client a while back and was given the task to asses their code and architecture and provide a report of whatever findings I had. The first thing that jumped out was that things did more than one thing, the second thing being things concerning itself with things it should not concern itself about. When reading my report, the client recognised what it said and wanted me to join in and show how to rectify things; in good spirit I said: + +![NewImage](images/makeitso1.png "MakeItSo.png") + +We approached one specific class and I remember breaking it down into what its responsibilities were and fleshed it all out into multiple classes with good naming telling exactly what it was supposed to do. When we were done after a couple of hours, the developer I sat with was very surprised and said something to the effect of; ".. so, single responsibility really means only one thing..". Yes, it actually does. A class / type should have the responsibility for doing only one thing, likewise a method within that class should only do one thing. Then you might be asking; does that mean classes with only one methods in them. No, it means that the class should have one subject at a time and each and every method should only do work related to that subject and every method should just have the responsibility of solving one problem. Still, you might be wondering how to identify this. + +Lets start with a simple example. + +Say you have a system were you have Employees and each and every one of these have a WorkPosition related to it enabling a person to have different positions with the same employer (Yes, it is a real business case. :) ). + +The employee could be something like this : + +\[code language="csharp"\] public class Employee { public int Id { get; set; } public string FirstName { get; set; } public string LastName { get; set; } } \[/code\] + +A fairly simple class representing an [aggregate root](http://en.wikipedia.org/wiki/Domain-driven_design). + +Then go and add this other thing in our domain; a WorkPosition, a value type that refers to the aggregate: + +\[code language="csharp"\] public class WorkPosition { public int Id { get; set; } public int EmployeeId { get; set; } public double PositionSize { get; set; } } \[/code\] + +One could argue these represent entities that you might want to get from a database and you might want to call them entities and DRY up your code, since they both have an Id: + +\[code language="csharp"\] public class Entity { public int Id { get; set; } } + +public class Employee : Entity { public string FirstName { get; set; } public string LastName { get; set; } } + +public class WorkPosition : Entity { pubic int EmployeeId { get; set; } public double PositionSize { get; set; } } \[/code\] + +Nice, now we've dried it all up and the Id **property** can be **reused**. + +The Id property is a classic pattern, but in [domain driven design](http://en.wikipedia.org/wiki/Domain-driven_design) you would probably not use an integer as Id but rather a natural key that describes the aggregate better. For an Employee this could be the persons social security number. This means that an integer won't do, but something that can tackle the needs of a social security number. For simplicity in this post, I'll stick to primitives and do a string, normally I would introduce a domain concept for this; a type representing the concept instead of using generic primitives - more on that in another post. + +We want to introduce this, but we'd love to keep the Entity base class, so we can stick common things into it, things like auditing maybe. But now we are changing the type of what identifies an Employee, and it's not the same as for a WorkPosition; C# generics to the rescue: + +\[code language="csharp"\] public class Entity { public T Id { get; set; } public DateTime ModifiedAt { get; set; } public string ModifiedBy { get; set; } } + +public class Employee : Entity { public string FirstName { get; set; } public string LastName { get; set; } } + +public class WorkPosition : Entity { public string EmployeeId { get; set; } public double PositionSize { get; set; } } \[/code\] + +Great, now we have a generic approach to it and get auditing all in one go. + +![NewImage](images/houston1.png "Houston.png") + +We've just created a nightmare waiting to happen. We've made something generic, lost a lot from the domain already just to save typing in one property; Id (yeah I know, there are some auditing there - I'll get back to that soon). We've lost completely what the intent of the Employees identification really is, which was a social security number. At least the name of the property should reflect that; Id doesn't say anything about what kind of identification it is. A better solution would be going back to the original code and just make it a little bit more explicit: + +\[code language="csharp"\] public class Employee { public string SocialSecurityNumber { get; set; } public string FirstName { get; set; } public string LastName { get; set; } } + +public class WorkPosition { public int Id { get; set; } public string SocialSecurityNumber { get; set; } public double PositionSize { get; set; } } \[/code\] + +That made it a lot more readable, we can see what is expected, and in fact we've also decoupled Employee and WorkPosition in one go - they weren't coupled directly before, but the property named EmployeeId made a logical coupling between the two - which we might not need. + +Another aspect of this would be bounded contexts; different representations of domain entities depending on the context they are in. In many cases an entity would even have different things that identifies it, depending on the context you're in. Then Id would be a really bad name of a property and also having a generic representation of it would just make the whole thing so hard to read and understand. Normally what you would have is an underlying identifier that is shared amongst them, but you wouldn't necessarily expose it in the different bounded contexts. Instead you would introduce a context map that would map from the concepts in the different bounded context to the underlying one. + +Back to auditing - don't we want to have that? Sure. But let's think about that for a second. Auditing sounds like something you'd love to have for anything in a system, or in a particular bounded context, one could argue its cross cutting. It is a concern of every entity, but I would argue it is probably not something you need to show all over the place; in fact I'll put forward the statement that auditing probably is an edge case when showing the entities on any dialog. So that means we probably don't need them on the entities themselves, but rather make sure that we just get that information updated correctly in the database; this could be something we could do directly in the database as triggers or similar, or make sure everything goes through a well-defined common data context that can append this information. Then, for the edge cases were you need the auditing information, model only that and an auditing service of some kind that can get that information for the entities you need. + +# Fess up + +Ok. So I have sinned, I've broken the [Single Responsibility Principle](http://en.wikipedia.org/wiki/Single_responsibility_principle) myself many times, and I will guarantee you that I will break it in the future as well. In fact, let me show you code I wrote that I came across in [Bifrost](http://github.com/dolittle/bifrost) a few weeks back that got the hairs on my back rising, a system called [EventStore](https://github.com/dolittle/Bifrost/blob/d70844e94ee441ed7c6e72975f3117f4b559a06f/Source/Bifrost/Events/EventStore.cs): + +\[code language="csharp"\] public class EventStore : IEventStore { public EventStore(IEventRepository eventRepository, IEventStoreChangeManager eventStoreChangeManager, IEventSubscriptionManager eventSubscriptionManager, ILocalizer localizer) { // Non vital code for this sample... } + +public void Save(UncommittedEventStream eventsToSave) { using(\_localizer.BeginScope()) { \_repository.Insert(eventsToSave); \_eventSubscriptionManager.Process(eventsToSave); \_eventStoreChangeManager.NotifyChanges(this, eventsToSave); } } } \[/code\] + +I've stripped away some parts that aren't vital for this post, but the original class some 60 lines. But looking at the little code above tells me a couple of things: + +- Its doing more than one thing without having a name reflecting it should do that +- The EventStore sounds like something that holds events, similar to a repository - but it deals with other things as well, so… +- The API is wrong; it takes something that is uncommitted and it saves it - normally you'd expect a system to take something uncommitted and commit it + +The solution to this particular problem was very simple. EventStore needed to do just what it promises to do in its name, all the other stuff is coordination and by the looks of it, it is coordinating streams of uncommitted events. So I introduced just that; UncommittedEventStreamCoordinator with a method of Commit() on it. Its job is then to coordinate the stuff we see above and the EventStore can then take on the real responsibility of dealing with storing things, and in fact I realised that the EventRepository could go at this point because I had tried to solve it all in a generic manner and realised that specialised EventStores for the different databases / storage types we support would be a lot better and not a lot of work to actually do. + +Another thing the refactoring did for us was the ability to now turn of saving of events, but still get things published. By binding the IEventStore that we have to an implementation called NullEventStore - we don't have to change any code, but it won't save. Also what we also can do is to introduce the ability the EventStore itself to by asynchronous, we can then create something like AsyncEventStore that just chains back to the original EventStore, but does so asynchronously. All in all it adds more flexibility and readability. + +# Behaviors to the rescue + +All good you might think, but how do you really figure out when to separate things out. I'll be the first to admit, it can be hard sometimes, and also one of them things one can't just be asked and necessarily be able to identify it within a heartbeat - sometimes it is a process getting to the result. But I would argue that thinking in behaviors makes it simpler, just for the simple fact that you can't do two behaviors at the same time. Thinking from a testing perspective and going for BDD style testing with a [gherkin](https://github.com/cucumber/cucumber/wiki/Given-When-Then) (given, when, then) also gives this away more clearly; the second you write a specification that has _and_ in it, you're doing two things. + +# Why care? + +Took a while getting to the why part. It is important to have the right motivation for wanting to do this. [Single Responsibility Principle](http://en.wikipedia.org/wiki/Single_responsibility_principle) and [Seperation of Concerns](http://en.wikipedia.org/wiki/Separation_of_concerns) are principles that have saved me time and time again. It has helped me decouple my code and get my applications cleaner. Responsibility separated out gives you a great opportunity to get to Lego pieces that you can stitch together and really get to a better [DRY model](http://blog.dolittle.com/2012/08/13/dry-going-the-whole-way/). It also makes testing easier, testing interaction between systems and more focused and simpler tests. Also, separating out the responsibility produces in my opinion simpler code in the systems as well, simpler means easier to read. Sure, it leaves a trail of more files / types, but applying proper naming and good structure, it should be a problem - rather a bonus. It is very different from procedural code, you can't read a system start to finish - but I would argue you probably don't want to that, it is in my opinion practically impossible to keep an entire system these days in your head. Instead one should practice focusing on smaller bits, make them specialised; great at doing one thing. Its so much better being great at one thing than do a half good job at many things. diff --git a/_posts/2013/01/touring-south-of-california/index.md b/_posts/2013/01/touring-south-of-california/index.md new file mode 100644 index 0000000..e579e33 --- /dev/null +++ b/_posts/2013/01/touring-south-of-california/index.md @@ -0,0 +1,23 @@ +--- +title: "Touring south of California" +date: "2013-01-20" +--- + +In February I will be in south of California doing a couple of talks at different venus; 4 in total. 2 of them has been announced already [here](http://www.meetup.com/vNext-OrangeCounty/events/87935912/) and [here](http://www.meetup.com/vNext-OrangeCounty/events/87938282/), when I get the links for the two remaining ones I will update this post with the details, so stay tuned. Thanks to Kim Schmidt from [vNext\_OC](http://www.meetup.com/vNext-OrangeCounty/) for making this happen and for asking me to drop by. + +Basically the talks will be on two different topics. + +Below you'll see the different topics with the synopsis of them. So, if you're nearby these venues, don't hesitate to stop by. Also worth mentioning, Charles Petzold is giving talk at one of the user groups I'll be doing a talk at, be sure to not miss it as well - more details can be found [here](http://www.meetup.com/vNext-OrangeCounty/events/74808362/). + +**Let's focus on business value** + +Creating software is very hard, a lot of practices has been developed over the years to accommodate this and make it easier. Some of these are DDD (Domain Driven Design), SOLID, BDD (Behavior Driven Development) and concrete architectural patterns such as CQRS (Command Query Responsibility Segregation) and MVVM (Model View ViewModel) came as reactions to these practices. Einar will take you on a tour through all of the above mentioned subjects and show you concretely how you can achieve true developer productivity by applying all these. By utilising an open source framework called Bifrost, Einar will show end to end how these practices and patterns can come to life and can really let you as a developer hit the ground running and at the same time capture and deliver true business value without sacrificing code quality. All this and also cloud ready! + +**It's primetime, a JavaScript story** + +It's pretty fair to say that JavaScript is not a fad; it is by far +the most widespread programming language out there and also the most available runtime we have, ranging from toasters to the web, and even to the backend development through Node.js. Its probably also fair to say that we should really embrace it and start treating it like a first class citizen of our day +to day work. In this talk, Einar will take you on a tour of how you can work +with JavaScript with similar patterns you're already used to from the rest of +your server code. Writing tests or specifications that proves your code is also +important, Einar will show how to get started with this and how you can achieve more testable JavaScript by applying patterns like MVVM (Model View ViewModel) using KnockoutJS diff --git a/_posts/2013/02/bifrost-license-change/index.md b/_posts/2013/02/bifrost-license-change/index.md new file mode 100644 index 0000000..407e635 --- /dev/null +++ b/_posts/2013/02/bifrost-license-change/index.md @@ -0,0 +1,12 @@ +--- +title: "Bifrost license change" +date: "2013-02-25" +categories: + - "bifrost" +--- + +The license for [Bifrost](http://github.com/dolittle/bifrost) used to be shared between [Dolittle](http://www.dolittle.com) and [Komplett](http://komplett.com/en/home/)  as a joint venture that began a couple of years ago. As our focus an investment is moving more and more into Bifrost, we have agreed with Komplett that Dolittle is taking ownership of the license and the project. With this we also want to simiplify the licensing, so we're moving to a standard [MIT license](http://en.wikipedia.org/wiki/MIT_License) without any special clause like we used to have - plain vanilla. + +So, what does this mean if you're using Bifrost? + +Well, nothing actually, it means that its a simpler model - there is one party that holds the copyright, no special clauses, a well known and well used license. diff --git a/_posts/2013/02/bifrost-up-on-nuget/index.md b/_posts/2013/02/bifrost-up-on-nuget/index.md new file mode 100644 index 0000000..71d414e --- /dev/null +++ b/_posts/2013/02/bifrost-up-on-nuget/index.md @@ -0,0 +1,10 @@ +--- +title: "Bifrost up on Nuget" +date: "2013-02-25" +categories: + - "bifrost" +--- + +We are super excited, we finally managed to get [Bifrost](http://bifrost.dolittle.com) up on [Nuget](http://nuget.org/packages?q=Bifrost). We will be publishing packages as soon as we have changes, new features and such. We'll get back to you on how we're going to deal with versioning and what our strategies are for continuously deploying to Nuget will be.  + +With our push to Nuget we added a [QuickStart](http://nuget.org/packages/Bifrost.QuickStart/) package that one can use to get up and running quickly, all you need to do after adding the package is to compile and run and you'll have a simple sample that shows how Bifrost is setup and how you can get started writing your features. diff --git a/_posts/2013/08/sustainable-software-development/index.md b/_posts/2013/08/sustainable-software-development/index.md new file mode 100644 index 0000000..df3c118 --- /dev/null +++ b/_posts/2013/08/sustainable-software-development/index.md @@ -0,0 +1,73 @@ +--- +title: "Sustainable Software Development" +date: "2013-08-06" +categories: + - "code-quality" +--- + +Software is hard to make, capturing the domain and getting it right with as little bugs as possible. Then comes release time and your users starts using it, things get even harder - now comes all the changes for all the things that you as a developer did wrong, all the bugs, things you didn't think of, misunderstandings. All that and the users have requirement changes or additional features they'd love to have on top. I've often heard people say things like "... if it wasn't for the users, creating software would be quite joyful ...". It says tons, it does say amongst other things that creating software is not an easy task. Also, it does say a bunch of other things as well, for instance - it says that we're not very good at talking to our users, or we've taken the concept of having your team working in black-box environment too far or too literally. + +Even if we did it all right there are tons of external events that could cause the requirement of changing what we already made. The market could change, new competitors arriving to the table or existing competitors taking a completely different approach to the same problem you just solved. Another aspect that can cause changes is that the people we develop the software for that we've included in the dialog are learning all the way through the process of what is possible and what is not, causing them to have more knowledge and wanting change. + +The purpose of this post is to shed some light on what we think are good practices on their own but put together represents a very good big picture of how you can create software that will easier to change, meeting the requirements of your users better and possibly reduce the number of bugs in your software. + +# Talk Talk Talk + +One of the biggest mistakes I think we do is to think we are able to intuitively understand our users, what they need and want and also how it should take form. Going ahead and just doing things our way does not come from an inherent arrogance from us developers, but rather something I think is closer to an what we consider an intelligent and qualified assumption of what we think we're making. At the core of this problem sits the lack of dialog with the real users. We as developers are not all to blame for this, of course. On unstructured projects without any particular process applied one finds very often that users or representatives of the users, such as support personell, sales persons or similar have a direct link to the developers. If you've been on a project like this, you'll probably also remember that there was especially one guy in the office these guys went to - he was the "Yes Man" that just jumped and fixed that "critical" bug that came on his desk. This is needless to say a very counterproductive way to work; at times you're not able to get into the zone at all because of all the interruption. Then on more mature teams they've applied something like [Scrum](http://en.wikipedia.org/wiki/Scrum_(development)), [eXtreme Programming](http://en.wikipedia.org/wiki/Extreme_programming) or similar and been taught that we run demos for the end users or their representatives at the end of an iteration of X number of weeks and then they can have their input into the process. It gaves us the breathing room we were looking for, phew... + +The only problem with this breathing room is that it is often misinterpreted and taken too literally. During an iteration, there is nothing saying you can't speak to a user. In fact, I would highly recommend we do it as often as possible, so that we're certain that what we're making is really what the users want. We don't know, in fact, unless you're making software that you're using yourself - like a dev tool or something else you are using on a regular basis, we really haven't got a clue whatsoever. Even though opening up a communication channel like this sounds scary, and it should sound scary if you've ever been on the an unorganised team. Communication is key; make it so that you as a dev contact the users or their representatives and they can't go to you directly for anything - unless agreed to because you're working on a particular feature together. So in conclusion; users don't speak to the developers about things they aren't working on with the developer - if they're working on something together, they should be the best of buddies. + +One of the practices that can one could consider applying [Domain Driven Design](http://en.wikipedia.org/wiki/Domain-driven_design) (DDD), which comes with a vocabulary in itself that is very helpful for developers. But the best part of DDD is the establishment of a ubiquitous language, a language representing the elements of your particular domain that both the users speak and the developers. Often this means representing the vocabulary the end users already have in your own code. Getting to this language will help you communicate better with the end users and you don't have to do mental translations between what the users are talking about and "what it really is" in the code. + +# The secret sauce of agile + +We've all been touted our ears full of how we have to become [agile](http://en.wikipedia.org/wiki/Agile_software_development). You would be crazy to not do it, we've been told. I think its important to clarify what agile means; its all about feedback loops. Get the software into the hands of the users as fast as possible and often as possible, so that we can learn what works and what doesn't. Find problems as early as possible when it is still fresh in the minds of the developers - leading to saving time in the long run and increased quality of the user experience and code. + +I'm all in, keeping the feedback loop as tight as possible. In fact, the part about the feedback loop and keeping it as tight as possible is something I promote all the time as well - for just about everything from execution time of your automated tests to feedback from the real users. One of the promises of being agile is to be able to have software that is changeable and adapt to input from users. But I would argue that there is part of this story that seems to drown in the overall messaging; your software needs be written in a way that it is agile. What does that mean? I think there are a few basic techniques and principles we can apply to make this a reality. + +Testing is one of these pieces to the puzzle. Writing code that verifies the production code and its promise is something some of us has been doing for quite a while, in fact I would argue - everyone does this, but not necessarily consciously. Every time one adds a little console app or something to test out a particular feature in the system that you're developing - just to keep you from having to run the entire app every time, you're then putting in code that you can more easily debug what you're working on in a more controlled way. These are in fact tests that could with a small fine-tuning become automated tests that can be run all the time to verify that you're not breaking anything while moving forward. This gives you a confidence level to be able to change your software whenever change is needed, typically due to requirement changes or similar. + +Also, your tests becomes the documentation representing the developers understanding of what is to be created. Applying techniques like specification by example and BDD, your code becomes readable and understandable for other developers to jump in and understand what you originally had intended without having to explain it verbosely to another developer. By being clear in the naming of your specifications / tests, writing them out with the Gherkin language, you add the ability to really look at test / spec signatures and have a dialog right there and then with a user. + +But with testing comes a new responsibility, the ability to have code that is testable. All of a sudden it can feel painful to actually test your code, due to complex setup and often one ends up testing a lot more than needed. The sweet spot lies in being able to mock things out, give fake representations of dependencies your system under test might have and test the interaction. Testing in isolation is the key, which leads to a couple of things that you want to consider when writing your code; [Single Responsibility Principle](http://en.wikipedia.org/wiki/Single_responsibility_principle) and [Interface Segregation Principle](http://en.wikipedia.org/wiki/Interface_segregation_principle). Both of these helps in testing, but are on their own good practices and makes your software ready for change. With SRP, your code gets focused and specialised - having a type represent one aspect and a method only do one thing, all of a sudden your code gets more readable as well. Applying ISP, you have contracts between systems that aren't concrete and these can be swapped out, giving you great opportunity for change but also makes it a lot easier to test interaction between systems as you now can give them fake representations and all you need to test is that the interaction between them are correct. All this again leading to higher focus and in return in the long run giving you as a developer greater velocity and confidence in changing your implementations. + +I strongly feel that testing is a necessity for agile thinking, it gives you the power of changeability, and often forgotten as a vital part of the big picture. + +# Rinse repeat; patterns + +When developing software for a while, one finds things that work and things that doesn't; [patterns](http://en.wikipedia.org/wiki/Software_design_pattern) and [anti-patterns](http://en.wikipedia.org/wiki/Anti_Patterns). These are often organically appearing by plain and simple experience. And some of these patterns have been promoted and been published in literature. Patterns are helpful on many levels; they give you as a developer a vocabulary - making it easier to talk to other developers. They also provide guidance when you not necessarily know how to do something - knowing a few well known patterns can then become very powerful. + +# Concerns + +Software can be divided into logical parts that are concerned with different things. In its simplest form you can easily define things like what the user sees and uses as its [separate concern](http://en.wikipedia.org/wiki/Separation_of_concerns), it is the UI, frontend or the View. Then you can also pinpoint down to what is the place that performs all the business logic, the thing that represents the vocabulary of your domain. Going back into the UI we can be even more fine-grained, you have the concern of defining the elements that are available in the UI, then you have the concern of styling these elements and making them look like you want to and thirdly the concern of making them come to life, the code that serves information into the UI and responds to the users actions. Right there in the UI we have at least 3 concerns. Translating this into the world of web this means; HTML, CSS and JavaScript. These are three different things that you should treat very differently, not in the same file with