Monday, April 30, 2007

Mix Has Begun

{

I'll catch up with the keynotes later, but I'm monitoring the blog which seems to have a lot of good stuff.

}

Monday, April 23, 2007

Dreaming in Code

{

Dreaming in Code author, Scott Rosenberg is interviewd on IT Conversations here. You can impress your friends that you "read" his book even if you've only heard a few ideas. A recurring theme is just how hard it is to write software - a good reminder for me since I have frequent bouts of self doubt that is unwarranted. It's not just hard for me, it's hard for everyone.

}

Monday, April 16, 2007

Microsoft Silverlight

{

John Lam has let part of the cat out of the bag - the "new" thing he alluded to a while back appears to be linked to Microsoft Silverlight, what seems on the face of things to be a rebrand of WPF/E, an attempt at a Flash killer.

The programming details will have to wait for Mix 07, but for now the buzz should start. It's ironic that a matter of days after Paul Graham declared Microsoft "dead like IBM" that something like this should be announced.

It will be interesting to see how this fits into web development with Adobe's Apollo. Adobe has played a masterful first hand by making Apollo open source. It will be interesting to see how Microsoft responds.

The good news is there is a CTP for download, so for those of us who won't get to Mix, there is room to dig around.

}

Sunday, April 15, 2007

How much code do you write?

{

I've previously identified perl as my "night language." In other words, I'm hacking away at it in the off hours trying to get better. Maybe, just maybe, I will find a way to get paid for writing perl code. As of now, however, I write C#/.NET code to put food on the table.

As an exercise in perl, in order to demonstrate how fast it is, I wrote a small script that would count the number of lines of code I was responsible for last year. That's an easy task; I keep all the code I am working on for a given year in the same directory. There are a few projects that span a year's end, but it's okay since there's a lot of code that is written that doesn't make it to my directory, and there is a lot of code I write that isn't C#, which is all I was counting in this instance.

After a little tweaking, I had a script I felt happy enough with to point at my CODE06 directory. I was fairly curious - the folder is about 650MB but a lot of that is binary stuff, everything from installers to compiled bits of projects. My script - or perl, I should say - is unbelievably fast; when I changed output to a file it was able to run in less than a half minute. The first run showed that there were ~160,000 lines of code in the directories *.cs files.

Interesting - not an accurate estimate of things but 438 lines of code per day (160,000 / 365) and if you consider only business days (251), that's on the order of 637.5 per day. I can hear the Herbert song playing Something Isn't Right in my head at this point.

I do use Visual Studio, and one of the points of interest for me was the difference in how much code I actually wrote and how much was generated. Again back to estimating I excluded Visual Studio generated files from my project and that cut the number down to ~30,000 lines of code.

This is very imprecise because there are some *.cs files which are generated but it still has the Something Isn't Right going in my head because a little bit of help and organization from an IDE is fine, but the cost of 84% of output being machine generated is steep.

It's an Ellen Ullman moment; the realization that there are so many layers of abstraction between you and your tool - that you're unaware of all the hiding it does for you. It's a reminder of a moment a while back when I was showing someone how dangerous letting a tool do something for you can really be.



}

Sunday, April 08, 2007

Proper 0.1

{


A while back I made a property code generator I called t3rse::proper. It was an exercise to solve a problem I'd had as well as write something useful entirely in javascript. I've added a few new features to it that will hopefully make it even more useful in future:

1. Custom Shortcuts
Proper allows shortcuts for common datatypes - for int you simly type i_ and the same is true for bool (b_), string (s_), datetime (dt_), as well as a few others. If you have a classname that you need to build properties on, you can add your own prefix and follow that with an underscore when you're defining your properties. You could, for example, use sq for SqlConnection.



2. DebuggerStepThrough
More often than not properties have a simple definition that needn't be stepped through when debugging. A while back I started adding the System.Diagnostics.DebuggerStepThrough attribute to pieces of code like this - I've added this feature to proper with a checkbox option.


Future features? Whenever I have time the following:
1. Ability to remove custom shortcuts gracefully
2. Settings and shortcuts stored in a cookie

One final thing I'm pondering is whether to try to implement The World's Simplest Code Generator as an exclusively javascript/ajax application. I thought about it as a newer version of proper but I like the idea of proper being so dead simple that it doesn't become unwieldy. Does it suck? Tell me why at proper at t3rse dot com. Want to make it better? It's all there as javscript, just send me an update and I'll see if I can include it in a newer release.

}

Tuesday, April 03, 2007

Best Of SQL Server PDF

{

For a while now I've been a subscriber to Simple Talk, an excellent magazine/website put out by the folks at red-gate Software. They are offering two incredibly dense PDFs with the best stuff from the SQL Server Central website for FREE. If you use SQL Server in any form, it's a great value for nothing.

red-gate makes excellent tools as well - we use SqlCompare to synchronize development and test databases regularly.

}