June 2006 - Posts
http://video.google.com/videoplay?docid=-4428105074432041548I just love the little animations in this feature tour. Great marketing work.
Just found this on
digg.com:
http://www.brianketelsen.com/articles/2006/06/20/progress-isnt-just-for-breakfast-anymoreIt's a Live CD with all the stuff you need to try out Ruby On Rails! This looks like it could be a pretty slick way to try out Rails. Maybe even better would be to create a VMWare Player image to try Rails with.
http://www.defmacro.org/ramblings/fp.htmlThis article was a great overview of many of the aspects of functional programming. With what Micosoft is doing to the CLR and C# and VB it would seem that functional programming is making advances into the main stream. His article has imaginary Java samples and if you squint your eyes when he creates a class to hold a function you can see delegates.
I studied functional languages such as LISP and ML in college but quickly lost track of them after years of programming in corporate IT. To catch back up I've been spending the better part of a year studying functional programming concepts. While its been challenging at times, there have been alot of aha and oh yeah moments.
Since I have a great comfort level with C syntax I started my ride on the functional wagon with COmega. This is where I really began to "get" things like closures. I even found myself purposfully writing my own code to mimic a closure in good ol C# 1.0 for certain situations like Regex match evaluators. Once you see the "patterns" that higher order functions exhibit you can write them in plain imperative code. This will make you hunger for language constructs to do this work for you. Its like writing OO code in assembly language.
C# 2.0 Added true closures to the language with anonymous delegates. Woo hoo no more private nested classes to hold lexical context! (at least not that I write).
At PDC I got to see the preview of C# 3. This takes anonymous delegates a step further with "lambdas". There's lazy evaluation galore with LINQ. It would seem that MS has been bitten by the functional bug. Even the Atlas client APIs make good use of the functional elements of JavaScript.
I've also ventured out into IronPython and Ruby. These are great places to practice functional programming techniques.
The real challenge moving forward is finding the right balance. Theres no doubt in my mind that functional programming techniques are headed to the main stream. With the populatrity of Ruby and Rails and Microsoft adding functional capabilites into C# and VB the winds of change are blowing.
Link dump so I can keep track of what I'm researching:
COmega:
http://research.microsoft.com/Comega/LINQ:
http://msdn.microsoft.com/data/ref/linq/F#:
http://research.microsoft.com/fsharp/fsharp.aspxIronPython:
http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPythonRuby:
http://www.ruby-lang.org/en/Ruby.NET:
http://www.plas.fit.qut.edu.au/rubynet/IronRuby:
http://wilcoding.xs4all.nl/Wilco/IronRuby.aspxRubyCLR:
http://www.iunknown.com/articles/2006/06/19/rubyclr-drop-4Atlas:
http://atlas.asp.net/Default.aspx?tabid=47#Smalltalk:
http://www.refactory.com/Software/SharpSmalltalk/index.htmlbrianbec's blog:
http://weblogs.asp.net/brianbec/default.aspx http://weblogs.asp.net/brianbec/archive/2006/06/01/Lambdas_2C00_-Closures_2C00_-Currying_2C00_-and-All-That.aspx
Lance and I were musing over some of the recent product renamings and it gave me the idea to throw together a product name generator. Here's my first stab at it:
Get Product Name:
Feel free to customize your own. Here's the srcipt source:
1: <script>
2: var pfx = new Array("", "Visual ", "Compact ", "Embedded ", "Expression ");
3: var prd = new Array("", "Windows ", "Office ", "SQL ", "FoxPro ", "BizTalk ");
4: var trm = new Array("Web ", "Robotics ", "Network ", "Testing ", "Project ", "Small Business ", "Team ", "Management ", "Graphic ", "Presentation ", "Communication ", "Workflow ", "Ajax ", "XML ", "Content ", "Source Control ");
5: var typ = new Array("", "Client ", "Workstation ", "Server ", "System ", "Console ", "Shell ", "Designer ");
6: var sfx = new Array("", "Express ", "Standard ", "Professional ", "Enterprise ", "Ultimate ", "Foundation ", ".NET ", "Framework ");
7:
8: function pick(ar) { return ar[Math.round((ar.length-1)*Math.random())]; }
9: function getProductName()
10: {
11: var name = "";
12:
13: name += pick(pfx);
14: name += pick(prd);
15: name += pick(trm);
16: name += pick(typ);
17: name += pick(sfx);
18:
19: var p = document.getElementById("p");
20: p.innerHTML = name;
21: }
22: </script>
23: <A href="#" onclick="getProductName()">Get Product Name</a>: <b><span id="p"></span></b>
I recently bought a Mac Book Pro since I can now dual boot OS X and Windows XP. The only real issue that I've had is that OS X, like most Unices likes to set the hardware clock to UTC time. This causes the clock in Windows XP to be off by 5 hours (I'm in the central US timezone).
I recently discovered a registry tweak that will tell Windows to interpret the hardware clock as UTC time:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001
Just save the above reg script into a .reg file and import it to set your clock to UTC time. You can still set your timezone for the clock and have the correct time displayed. This can also be usefull if you are dual booting XP with any other Unix variations that like to set the harware clock to UTC. I usually run Linux and such in VirtualPC/VMWare so I havnt actually tried it with Linux.
Update:
It would seem that there are still some issues with this:
http://blogs.msdn.com/oldnewthing/archive/2004/09/02/224672.aspxIt seems to work most of the "time" for me but 1 or twice a day the clock changes to the timezone offset again. I just have to do a w32tm /resync /nowait to fix it. My suspicion is that the clock applet in the tray is monkeying it up.
Just ran across this on my daily news rounds:
http://www.eweek.com/article2/0,1895,1978917,00.aspI think Lance and I saw some of this stuff at PDC. I dont think they had all the tooling around it but this def sounds pretty darn cool.
I cant wait to start programming some lego robots with my son!
Doh! Erik beat me to it:
http://weblogs.asp.net/eporter/archive/2006/06/20/Building-Robot-Software-Using-Microsoft-Robotics-Studio.aspxHe's even got links to channel 9 videos.
Resources:
Tech PreviewChannel9 VideoSimilar:
RobotC
Andrew makes some obversations about
MVC in the .NET world.
I too have been delving into OO principles and patterns over the last couple of years. I'm still getting my head around the ups and downs of page vs front controller. ASP.NET uses a page controller pattern and frameworks such as
Struts,
Rails, and several PHP frameworks use the front controller pattern.
There's some really good reading on these patterns in
Fowler's Pattern of Enterprise Application Architecture. Also read everything you can on
www.martinfowler.com.
You can still implement front controllers in ASP.NET using an HttpModule or .ashx. The thing that turns people off to this is you ditch most of the IDE support for designers and most of the features that webforms give you (viewstate, postback etc). This is where you have to look around at some other frameworks that implement a front controller.
Castle MonoRail and
Spring.NET are two major ones that I have found.
MS also seems to be getting more an more on the OO/Patterns bandwagon ever since .NET was introduced (Or maybe this is just when I started the transition). For example, the provider model in ASP.NET 2.0 is really awesome. You should def be using it to decouple your web tier from your biz/data tier. Check out
this MSDN article on the provider pattern.
If you want to go swimming in an ocean of patterns take a look at
Enterprise Library 2.0. Lots and lots of good stuff in there.
Another great book on practical application of patterns and refactoring to existing code is
Feather's Working Effectively with Legacy Code.
Thanks to some great suggestions by Scott and others I have put aside any fears/laziness of delving into the msbuild script and managed to come up with an alternate way of changing web.config settings as part of the build process. While the web.config replacement stuff works for me at the moment, I like having this method around since it can be used to vary any kind of output as part of the build.
There are 2 parts of the Deployment script that are usefull for varying the output of the build. First is the ExcludeFromBuild item. I used it to exclude all the web.config variations in the project
since I will manually copy the production version of the web.config as a later step. To do this just create a <itemgroup> and throw in the excludes like this:
1: <ItemGroup>
2: <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\web.config" />
3: <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\prodweb.config" />
4: </ItemGroup>
Second, there's the BeforeBuild target. I use this target to copy the production version of the web.config to the build output. The two variables that are needed to do this are $(SourceWebPhysicalPath) and $(CopyBeforeBuildTargetPath).
1: <Target Name="BeforeBuild">
2: <Copy
3: SourceFiles="$(SourceWebPhysicalPath)\prodweb.config"
4: DestinationFiles="$(CopyBeforeBuildTargetPath)\web.config"
5: />
6: </Target>
Lesson learned: Don't let laziness or fear deter you from MSBuild. It really didn't take that long to figure out what was going on and where I could "plug-in". This is just the most basic implementation of this idea. You can also get more advanced and create different types of build and copy diff versions of files based on what build type is being performed (Debug/Release/Staging/Production/Test etc).
Web deployment projects are an elegant way of integrating the compilation of an asp.net web site into a build process. I was initially really impressed with the msbuild task that replaces sections of your web.config at build time. Unfortunately this feature is starting to dissapoint. As
this forum post points out it is fairly limited in scope as to what sections it can modify. I recently tried getting the deployment project to update the system.net/mailSettings section. I have yet to get it to modify this section. The build will just fail saying that it cant find system.net/mailSettings. This shouldnt be this hard. I hope I'm totally missing something and the rest of this post can just be ignored.
Ok, Im the moron on this one.
under is a group not a config section as I orginally thought. Once I changed the deployment project to this:
system.net/mailSettings/smtp=mailSettings.config;
It worked like a champ.
So the moral of this story is check, double check and triple check what type of node you are trying to replace in the deplyment project.
I'm still not sure why it matters what type of node you are replacing.
Update: Some good ideas
here for more advanced scenarios.
http://www.google.com/googlespreadsheets/tour1.htmlHere's some videos:
http://blog.outer-court.com/archive/2006-06-06-n86.htmlGoogle is about to heat things up again it looks like. Are we ready for the web application wars?
More Posts
Next page »