Subscribe: Michael.NET
Added By: Feedage Forager Feedage Grade B rated
Language: English
application  blog  blogs  code  east ohio  good  ironruby  microsoft scripting  microsoft  net  north east  people  ruby  scripting  time 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Michael.NET


Ramblings of a father/programmer.

Updated: 2017-08-21T09:31:35.639-05:00


Time to update your feed..


I'm closing down the Michael.NET feed, be sure to subscribe to the new one at The Prokrammer!


Closing time....


Hey gang, I've decided to move off of blogspot and go to a self hosted solution... come on over to The Prokrammer and follow me on my coding adventures!


A New Day Dawns...


Microsoft is releasing the majority of their API and promising not to sue OpenSource for interoperability.  It's brought of a "broad interoperability strategy".

All I can say is.  Wow.  If this is even half of what comes from all of this, Microsoft is no longer the one we all knew, real changes are being effected from inside.  Once I see the full details, I'll post more complete thoughts. Details on the conference call here.


The Grass May Not Be Greener Yet, But The Soil Is More Fertile



The founder of the Ruby.NET project announced yesterday that he is leaving active development of that project and moving over to fully supporting the IronRuby effort.  Based on everything I've heard about Dr. Kelly and Ruby.NET, this is fantastic news.  Hopefully this will spurn even more activity on the IronRuby project.  Some of the important quotes from his post are:

"I've come to the conclusion that the DLR is clearly here to stay - it's becoming an even more important part of the Microsoft platform."

"I now believe that IronRuby is more likely to succeed as a production quality implementation of Ruby on the .NET platform."

That's quite an endorsement.  I have a feeling the next year or so will be the year of the DLR, we'll begin seeing it's API solidify with more and more languages being implemented on it.

That all said, IronRuby still has one major roadblock.  That is the perception of it's corporate sponsor.  I had another dev tell me this today:

"Well, ironruby is mostly being  developed inside Microsoft, so almost everyone that talks about  ironruby dev day-to-day does so on  MS-internal mailing lists. "

John Lam say it ain't so...

The ironruby-core mailing list is fairly active, and the MS-PL is OSI approved.  Yet, Microsoft has to actively be promoting these things, otherwise the outside perception will not change and IronRuby will be the less for it I fear.

What IronRuby needs more than anything right now is a large group of outside contributors, so come on down and get coding, testing, and documenting!


(Semi) Practical IronRuby


So you followed the quick start I posted earlier, and you're thinking "So what?  What good is IronRuby and DLR to me?"  The DLR provides an extensible, powerful way to add scripting capabilities to your application.  Let's take a look at how IronRuby and C# can really interact. We'll create an "IronLogo" application, consisting of a windows form we can draw on utilizing a simple DSL implemented in Ruby.  Commands can be loaded via a file or through a console. Our bulk of our application is actually going to be in C#, the details aren't important, but let's take a quick look at the class definition. I've hidden a lot of the cruft, but the important things here are the TurtlePoint property that holds a Point object of the turtle's current location, and the MoveTurtle method.  What we're going to want to do is take the current turtle's location and move some offset.  Of course we don't have to write some complicated command parser, so we're going to use IronRuby and the DLR to handle all the heavy lifting.  Let's take a quick look at the application's Main method:       1        static void Main()     2         {     3             Application.EnableVisualStyles();     4             Application.SetCompatibleTextRenderingDefault(false);     5      6             LogoWindow logowin = new LogoWindow();     7      8             IScriptEngine ruby = IronRuby.GetEngine(IronRuby.CreateRuntime());     9     10             Dictionary globalvars = IronRuby.GetExecutionContext(ruby.Runtime).GlobalVariables;    11             globalvars[SymbolTable.StringToId("logowin")] = logowin;    12     13             IScriptScope IronLogoScope = ruby.Runtime.CreateScope();    14     15             ruby.Execute(IronLogoScope, ruby.CreateScriptSourceFromString(Properties.Resources.IronLogoRuby, SourceCodeKind.File));    16     17             logowin.PassScopeAndEngine(IronLogoScope, ruby);    18     19             logowin.ShowDialog();    20     21         }   You can see a lot of the same stuff happening here as you did in the quick start, though there are some subtle differences.  First, if you look at line 11 you can see that we're actually assigning a global variable to the reference to our windows form.  That's right, our Ruby code will be able to access our Window form object directly, all though the magic of the DLR!  Also, on line 13, I create a scope using the Runtime property of the engine, this is important as this will create a scope that has references to the right engine, context, and so forth.  We learned from the quick start about the IScriptEngine.Execute command, but what are we running on line 15?  Why, it's an embedded text file that contains our ruby code that implements the DSL!  Would you believe it's only 15 lines?  See for y[...]

IronRuby Quick Start


IronRuby is Microsoft's, with collaboration by the public, implementation of Ruby on their Dynamic Language Runtime. There's another version of Ruby for .NET called, ironically, Ruby.NET that runs directly on the CLR. This post won't be about that though, if you want to see a comparison, look here for a fairly good write up. Downloading IronRuby from the SVN server and compiling in VS2005 was actually pretty painless. But after that I couldn't find any, working, examples of getting an Ruby script running in the DLR. A big part of this is due to IronRuby still being officially "pre-Alpha" with the Scripting Host API in flux. Regardless, I hope this will be enough to get some people trying to use the latest SVN (rev. 75) up and running. Building The Source Download the latest revision from RubyForge using SVN, if you need a client I HIGHLY recommend TortiseSVN. Once you're done downloading the source, you should be able to open the IronRuby.sln file in Visual Studio. We only need to make one change, and that's to the Microsoft Scripting Project. Bring up the project properties and go to the Build tab: We have to remove the Conditional compilation symbol of "SIGNED", otherwise the Scripting host will be looking for Microsoft signed copies of the IronRuby library, which we don't have. After that go ahead and build the solution (cross your fingers if it makes you feel better). When all is done you should end up with a bin\Debug folder in your SVN root that looks something like this: You can go ahead and start rbx from right there and begin playing with Ruby if you'd like. But if that's all we wanted to do we would have just downloaded Ruby, right? This is IronRuby, let's do it the .NET Way! Hosting IronRuby in C#Create a new Console Application solution in Visual Studio, say RubyExample. Add References to the Microsoft.Scripting.dll, IronRuby.dll, and IronRuby.Libraries.dll files. Let's begin with the most basic, a simple Hello World: using System;using Ruby;using Ruby.Runtime;using Microsoft.Scripting;using Microsoft.Scripting.Hosting;namespace RubyExample{ static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { IScriptEnvironment scriptenvironment = ScriptEnvironment.GetEnvironment(); IScriptEngine rubyengine = scriptenvironment.GetEngine("ruby"); scriptenvironment.ExecuteSourceUnit(rubyengine.CreateScriptSourceFromString("puts'Hello World! \nPress Any Key To Continue..'") ); Console.ReadKey(); } }}Let's take a quick look at what we're doing here. We're setting up a ScriptEnvironment, this is where our Dynamic languages are going to live and play. Then out of that environment we're asking for someone who understands Ruby. After that we're just saying, hey ScriptEnvironment, run what the Ruby guy says.So that's pretty nifty, we could also tell the RubyEngine to CreateScriptSourceFromFile and move whatever code we want out of a string constant. Which is probably a good idea for anything beyond a line a two. But what if we actually want to talk back and forth? Let's move on to the next example.Accessing Global VariablesThe easiest way to pass data between IronRuby and C# is via Global Variables. See below for an example. using System;using System.Collections.Generic;using Ruby;using Ruby.Runtime;using Microsoft.Scripting;using Microsoft.Scripting.Hosting;namespace RubyExample{ static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { IScriptEngine rubyengine = IronRuby.GetEngine(IronRuby.CreateRuntime()); Dictionary globalvars = IronRuby.GetExecutionContext(rubyengine.Runtime).GlobalVariables; globalvars[SymbolTable.Strin[...]

Developer Events In North East Ohio


North East Ohio seems to suffer from a dearth of good Developer centric events.  And the events we do get seem to be poorly advertised.  And the developers who would be interested in planning and implementing events can often have a hard time finding like minded souls.  To help alleviate both problems, I am implementing the North East Ohio Developer Events blog and Google group.  The blog is intended as a place where North East Ohio based developers can hear about upcoming events that may interest them, while the Google group is a place where those passionate North East Ohio developers can collaborate and plan events.  I'm hoping that we can really get some activity going in this region, I truly think it's under appreciated, and I know others feel as I do.  The blog kicks off with details on the next Cleveland ArcReady event.  I hear word of an upcoming Coding Dojo, with other talk of a Code Camp and rumors of a possible DevCares event both in the near future.  As I get details they will be announced on the NEODevEvent blog.

North East Ohio Developer Events Blog

North East Ohio Developer Events Group


CodeMash 2008 Wrap Up


A little late, I know, but I finally got some time to put my thoughts into place.  First I want to send out my congratulations to Jim Holmes, Brian Prince, Jason Gilmore, Jason Follas, Dianne Marsh, Jeff Blakenburg, Josh Holmes, and John Hopkins for putting on ANOTHER wonderful event.  I went into CodeMash '08 with very high expectations based on last years spectacular event, and the group did not disappoint.  A quick thank you to the CodeMash sponsors for helping those folks do that job!  Your loyalty to the development community will not be forgotten by this developer.(image)

It was kicked off by a very insightful panel on how to "sell" yourself and your ideals to clients and/or colleagues.  Then were the two days of sessions which were again some of the most insightful and educational I've ever had the pleasure of attending.

The keynotes were five star once again, with Scott Hanselman, Neal Ford, and Brian Geotz all doing an outstanding job.

I strongly urge everyone to go listen to Chris Woodruff's CodeMash Podcasts, as well as checkout the CodeMash site for slide decks and session audio.

Of course the other half the conference occurs after the sessions are long over and deep into the night.  I had great conversations with folks like Joe O'Brien (who is a way bigger twitter addict then me, Keith) , Jay Wren, and Steven Harman that I am still digesting over. 

Let the countdown to CodeMash 2009 begin!


Changes At CodeBetter.


Looks like Glenn Block, from Microsoft's patterns & practices group, is now blogging at CodeBetter. I'm sure it's only a coincidence that Scott Bellware (ooold link, but only one still valid) no longer is (and had all his content removed).

Update: Glenn replied in the comments that Scott was actually the one that asked him to join CodeBetter.


Why It's STILL Good To Be Married.


Since I just switched jobs and my previous employer paid me due vacation time, we had a little extra cash in our coffers.  My aforementioned wife suggested I get myself an early Christmas present. As you can no doubt tell by the GamerCard on the site, I am now the proud owner of a Xbox 360 Elite.  I was also able to pick up the HDDVD drive.  Though unlike the list earlier in the year I did not get the wireless adapter nor Gears of War.  I had already gotten a wireless bridge for the PS2, so connectivity was no issue.  I ended up getting Assassin's Creed, as well as the Serenity  HD-DVD.  Feel free to send me a friend's request on XBox LIVE.  Which, by the way, is everything I had hoped.  Between the marketplace and the arcade it's nothing short of awesome.  The XBox itself makes a wonderful media extender.  I tried Windows Media Center, but quickly dropped it in favor of TVersity.  Check it out!  Now that I'm settled in at my new job, be on the look out for some blog posts in the coming days...


T-SQL Hex String to VarBinary (Improved)


Peter DeBetta posted a while back with a function to take a hex string and convert it to varbinary  It has a couple of slight issues, the biggest of which is it can't handle an odd number of hex digits.  Below is my replacement, because it's using bigints the upper limit isn't as high, but it's good enough for most things:  CREATE FUNCTION dbo.HexStrToVarBinary(@hexstr varchar(8000))RETURNS varbinary(8000)ASBEGIN DECLARE @hex char(1), @i int, @place bigint, @a bigint SET @i = LEN(@hexstr) set @place = convert(bigint,1) SET @a = convert(bigint, 0) WHILE (@i > 0 AND (substring(@hexstr, @i, 1) like '[0-9A-Fa-f]')) BEGIN SET @hex = SUBSTRING(@hexstr, @i, 1) SET @a = @a + convert(bigint, CASE WHEN @hex LIKE '[0-9]' THEN CAST(@hex as int) ELSE CAST(ASCII(UPPER(@hex))-55 as int) end * @place) set @place = @place * convert(bigint,16) SET @i = @i - 1 END RETURN convert(varbinary(8000),@a)ENDGO [...]

Does xkcd Influence Microsoft Campus Design?


It appears that the new Microsoft Campus for the Entertainment and Devices Division is going to have a bar.  One wonders if they are not shooting for the "Ballmer Peak"...


How To REALLY Get A Company's Attention


Forget blogging, tape a letter to their door!  Looks like Nick Starr was tired of not having IMAP for Gmail and decided to go right to the source.  Thanks for Steve Rubel's tweet.


Two Microsoft Licenses Now OSI Approved.



Am I blind, or is noone talking about this?  Microsoft finally getting two approved official Open Source licenses is big news.  With the approval the two licenses are being renamed:

Microsoft Permissive License (MS-PL) -> Microsoft Public License (MS-PL)

Microsoft Community License (MS-CL) -> Microsoft Reciprocal License (MS-RL)


via sburke, and now numerous other MSDN blogs now as well.


Seriously this must be being treated pretty low key, it's certainly not being trumpeted from the towers like it should.  I heard many pundits say it would never happen...


Fun with Twitter.


Dan Hounshell announced his new little side project RandomTweets.  Basically it's similar to or but for Twitter.  Right now Dan is using the API to pull random tweets and then manually sorting through them for humor or inspirational value.  He states his intention is to make the site more community driven in the future, but he's got some pretty funny stuff up there already. You should check it out!


Twitter Updates Look.


Twitter, while being a canonical Web 2.0 poster child, has never really looked the part.  After their database upgrades Sunday they've very stealthily updated their look.

The first hints that something was afoot was the mysterious disappearance of the "back" button to few your followee's previous tweets.  Well that's back with a much slicker looking interface.  It's a much classier look, less "done in the backroom" and more "done by an actual designer".  Well done! It's a subtle change to be sure, but something that is easy on the eyes makes it easier to use.

Also, be sure to stop by my twitter page and say hi!


The Microsoft .NET Framework Source Available for Developers!


Scott Guthrie just made an exciting post, starting with .NET 3.5 and VS 2008 the .NET libraries will have source available!  This is quite the boon to developers, the ability to drill down to source level while debugging should lead to more accurate code.  Of course there could be a downside, namely developers coding around implementation details rather then the exposed methods.  But regardless this is a very cool move by Microsoft.  It's being released under the Microsoft Reference License which doesn't give you a whole lot of rights (none really, other then to look at the source), but it's something.  Considering how important the framework is to Microsoft this is a bold move.  For a truly permissive license check out Mono, here's hoping there's no "patent/copyright" pollution there either...


MichaelDotNet's Leaderboard


If you haven't heard, Techmeme has a new feature, the "Leaderboard".  TechCrunch is heralding it as the defeating the last stronghold of Technorati.  Robert Scoble is lamenting the "death of blogging".  Techmeme itself says the list consists of "Techmeme's top 100 sources, including blogs, non-blogs, and everything in between", so they're not trying to be the sort of "Blog Authority" everyone else seems to be trying to make them.  I don't think Technorati nor blogging in general have anything to worry about.  Technorati is suppose to be aimed squarley at blogs, in this case I'm defining a blog as "The single and unfiltered voice of an individual".   Techmeme's Leaderboard is solely a list of the most newsworthy sites in a particular month, some of which just happen to be blogs.  The best authority for the top bloggers is, of course, the bloggers themselves.  Until Google starts to release an aggregated form of their users's Reader Stats (which may indeed herald the end of Technorati), we'll have to turn to each other and Technorati will show us that. In the interest of promoting tech blogs that deserve to be noticed, I provide you with my current personal "Tech Blog Leaderboard" based on my personal Reader trends:   MSDN Blogs:  Surprised?  You shouldn't be, Microsoft employs alot of smart people, this is the best way to find out something you didn't know before.  And it's not necessarily Microsoft specific all the time. Worse Then Failure:   Geeky humor, and great examples of what NOT to do for coders. Slashdot:  Still a good resource after all these years, not a blog, yet still not on Techmeme's Leaderboard either... CodingHorror:  Everyone in development should be subscribed to this blog. Scobleizer: Cause Robert Scoble always has neat stuff. Robert's Shared Items:  Doing all the crawling/subscribing so I don't have to. Jon Skeet's Coding Blog:  Man knows his C#. Evil Mad Scientist Laboratories: Cause deep inside we're all evil geniuses. Scott Hanselman's Computer Zen:   I mean, doesn't the fact he's not on the Leaderboard make you question it just a bit? That's just a sampling, alot of webcomics and non-tech blogs in my reader too.  What are some of your favourite/regular tech blogs? Is there anyone that I'm obviously missing that I just HAVE to subscribe to? [...]

CodeMash 2008 Registration Is Open!


Be sure to go and register now!  The sooner you do the cheaper it is.  I want to CodeMash 2007 and it was one of the most awesome experiences I had, be sure to check out my blog entries detailing last year if you want an idea of what it's all about.  It's inexpensive, it's at a waterpark, it's easy to get to, people are friendly, what more reason do you need?  Do you live to code? Why aren't you already registered!?


Finally, Compression in SQL.


Here's a good overview of the compression in SQL 2008 and why it's a good thing.  Though I don't quite get the point on memory, don't you have to decompress the data at some point?  Surely this will end up using more memory resources, say you have a 50% compressed piece of data in memory, to store the uncompressed data would require another 100% on top of that, effectively using 150% more then if you just had the uncompressed data in memory to begin with.  Or am I missing something?  Regardless, if you've ever zipped up a SQL Backup (I have, more times then I can count) then this seems like an obvious piece of "low hanging fruit" for the SQL 2008 team.  I've always wondered why they didn't at least include built in compression for database backup and restore...


Microsoft Gets Transparent on Wikipedia


Or at least one employee does.  Peter Torr, a program manager at Microsoft, admits to editing Wikipedia articles on HD-DVD in order to "[keep] the pages interesting, up-to-date, and accurate".  He also comes clean about doing a bit of anonymous editing in the past and states he created a Wikipedia account so noone can "stumble" on his edits and accuse Microsoft of astroturfing or such.  Which of course people will.  I personally applaud Peter for being upfront with his editing, it will be up to the users of Wikipedia to decide if his comments are biased or not.  I would encourage Microsoft to make a standard corporate Wikipedia account that their employees should use if they want to edit Wikipedia.  Or establish a policy that they must create a MSFT* user or some-such.  Though most companies are becoming transparent wither they want to or not, thanks to WikiScanner.   Regardless,  another sign that Microsoft is more open then people give them credit for.


Query Analyzer, Resurrected.


Carpe Datum over at MSDN talks about people wanting Query Analyzer back over Management Studio.  I admit, the lack of Query Analyzer has been a source of ire for me as well.  I like the default Management Studio for editing databases and what not, but if I want to whip up a quick query or something I miss query analyzer.  Unfortunately the solution he provides causes Management Studio to always assume you want to run a query.  After a bit of fooling around, I came up with a batch routine that seems to mimic Query Analyzer pretty well.  I present to you isqlw.bat :)


@echo off
if '%1'=='' goto nofile
goto file
echo. > %TEMP%\Untitled.sql
start sqlwb -nosplash %TEMP%\Untitled.sql
goto end
start sqlwb -nosplash %1


This works well for me, YMMV of course, but I hope you might find it useful.


Are You Just In It For The Money?


Peter Van Ooijen made a post today that ended up being Kicked and generated some discussion.  Basically he's saying that a Software Architect should code.  I agree.  A Software Architect should be someone who is passionate about technology and development.  Some people say they were never given time to code.  I say that's bullshit.  Are you a developer for the pay, or because it's something you love

If you are not passionate about what we do, get out.  Seriously.  I don't want you in my industry, make room for those developers who ARE passionate about what they do.  Make room for those developers who spend at least some of their free time putting around with languages they don't know, technology that's just coming out.  If all you want is a paycheck there are plenty of other places you can go.

I want the kid who hacks on vBulletin in his spare time for his World of Warcraft guild.  I want the father who waits until his kids go to sleep and then spends a few hours hacking in XNA.  Where are those people? 

Why does the guy who simply got in this business because it was "hot" get promoted, while the people who Live To Code are left at the bottom rungs?    Part of it is choice I'm sure, I've done the managerial bit, it's less "fun" for sure.  But those in the trenches are frequently ignored, while those who read "Buzzword Weekly" make all the important decisions.

Fortunately, it seems Peter has a good architect who at least knows what he doesn't know, and that's a good start.


Microsofties Aren't Robots? Perish The Thought...


Glenn Bock over at Microsoft recently blogged that he was not a robot because he uses the following non-Microsoft technologies: A Mac Mini (which really doesn't count, Microsoft doesn't make computers and as far as I am aware they still write software for the Mac),  an iPod, Yahoo, Google, NUnit (MS tech related), Firefox, OpenSource, Resharper (MS tech related), Ruby on Rails, and Linux.  That's all well and good, but would he still follow the Programming Promises? I bet he at least tries, though I'd also guess he's a tad biased. :)  Regardless he's also right in he wouldn't be doing a good job if he wasn't examining and using alternatives, especially when they were better then the items he could dogfood.  It's a reminder that we all need to continually be exploring and expanding our exposure to technology from all fronts.