About/Contact

Steve Trefethen

Steve Trefethen is CTO at Wanderful Media.
Contact me

View my LinkedIn profile



Calendar

<<  May 2013  >>
MoTuWeThFrSaSu
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

View posts in large calendar

Disclaimer

The posts on this weblog are provided AS IS with no warranties, and confer no rights. The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.



TypeScript what was the problem again?

October 02 2012 11:25PM

A friend pointed me to the release of TypeScript and the video where Anders Hejsberg provided an explanation and multiple examples of Microsoft’s latest efforts to improve JavaScript development. For me personally the video is a real throwback to the days attending team meetings at Borland where Anders would demo Delphi language features. In fact, there’s an interesting parallel between TypeScript and Delphi where both require proprietary interface files to call functions in external modules with the same issues of getting these files generated/updated.

I’ve been working in the OS world for the last few years now and I’m left scratching my head wondering where this effort is going? It places huge emphasis on Intellisense and error insight features yet ignores how one might approach actually debugging all this beautifully unfamiliar generated code. Throughout the video I kept asking “Why wouldn’t they simply offer their own Dart-like alternative?”

While it “feels” fun and has the ususal Anders demo props going for it seeing a compiler infer types simply isn’t as exciting as it was the first go-round and the lack of a debug session demo left me feeling rather hollow. Had MS released an updated IE natively supporting TypeScript… but no we’re not back in IE 3 days, that ship has sailed.

Perhaps it’s an Enterprise play to help those lowly Enterprise developers conquer JavaScript in a way that’s more palatable by management? Ah, I don’t think so as it’s all interestingly packed as Open Source.

Don’t get me wrong I appreciate type safety as much as the next compiler fan and in many ways I long for those good ol’ type safe days but I’m pretty skeptical that this is the right path forward.

FacebookDel.icio.usDigg It!

Using the TFS source control provider in CCNET v1.5 with 2010

September 24 2010 4:17PM

Recently I helped a client of Falafel's get up and running with Continuous Integration using CCNET v1.5. They’re running Team Foundation Server 2010 using TFS for their source repository and fortunately CruiseControl.NET includes a source control provider for TFS. Having tried this configuration and successfully we configured the server but ran into the following error:

Source control failure (GetModifications): Unable to find TF.exe and it was not defined in Executable Parameter

TFSError

Reviewing the code for the TFS plugin we can see why this happens for 2010:

private string ReadTFFromRegistry()
{
    string registryValue = null;

    registryValue = registry.GetLocalMachineSubKeyValue(VS2008_64_REGISTRY_PATH, VS_REGISTRY_KEY);

    if (registryValue == null)
    {
        registryValue = registry.GetLocalMachineSubKeyValue(VS2005_64_REGISTRY_PATH, VS_REGISTRY_KEY);
    }

    if (registryValue == null)
    {
        registryValue = registry.GetLocalMachineSubKeyValue(VS2008_32_REGISTRY_PATH, VS_REGISTRY_KEY);
    }

    if (registryValue == null)
    {
        registryValue = registry.GetLocalMachineSubKeyValue(VS2005_32_REGISTRY_PATH, VS_REGISTRY_KEY);
    }

    if (registryValue == null)
    {
        Log.Debug("Unable to find TF.exe and it was not defined in Executable Parameter");
        throw new Exception("Unable to find TF.exe and it was not defined in Executable Parameter");
    }

    return Path.Combine(registryValue, TF_EXE);
}

As of this writing the CCNET documentation does not include the Executable parameter for this source control provider though the fix is easy enough.

FacebookDel.icio.usDigg It!

FileSystemInfo.LastWriteTime and 12/31/1600

July 08 2010 12:23AM

I’ve been working on an application tracking the age of files and if they reaches a certain threshold an error gets trigged.

FileInfo f = new FileInfo(new SystemPath(m.FolderName).Combine(m.FileName).ToString());
double totalminutes = DateTime.Now.Subtract(f.LastWriteTime).TotalMinutes;
if (totalminutes >= ErrorIntervalInMinutes)

I setup an error message to display information about the files when the error occurs and got something like this:

Error: File (d:\outbound\997_42772_06182010_1504_91.txt) File Time: 12/31/1600 4:00:00 PM Current Time: 6/18/2010 3:06:10 PM has failed to upload via FTP for 215356266.168919 minutes.

Whoa, over 400 years! That’s a lot of minutes not to mention 12/31/1600 looks a bit suspicious. A peek at the documentation for FileInfo.LastWriteTime reveals:

If the file described in the FileSystemInfo object does not exist, this property will return 12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC), adjusted to local time. 

Ah ha! The list of files being processed in this case is static and files are getting uploaded to an FTP server so clearly the file causing the error is no longer on disk thus the error. Adding an if(!f.Exists) continue; should do the trick.

Now, I didn’t investigate UTC once converted to local time resulting in 12/31/1600 vs. 1/1/1601 but I found my answer and after adding a simple check I was on my way.

FacebookDel.icio.usDigg It!

Tags: .NET | Programming

Updating my Starter Kit to Facebook Developer ToolKit v3.0 Take 1

November 29 2009 9:57PM

Over the break I took a look at updating my Facebook Developer Toolkit (FDT) Starter kit to the latest v3.0 release that was announced at PDC. My first thought was to download the sources via SVN but unfortunately, that failed so I resorted to using the SDK Source download which I’d rather not do as it leaves no easy way to keep up-to-date with recent checkins.

Anyway, I built the sources which “just worked”, surely a good sign.

Next, I worked to compile and run my Starter Kit application and here is what I found (at least so far):

  • Delete old referenced assemblies
  • Change using statements:
    • using facebook; –> using Facebook
    • using facebook.web; –> using Facebook.Web;
    • using facebook.Schema; –> using Facebook.Schema;
  • Master.API.uid; –> Master.Api.Users.GetLoggedInUser();
  • Master.API.friends.getUserObjects(); –> Master.Api.Friends.GetUserObjects();
  • Master.API.photos.getAlbums(); -> Master.Api.Photos.GetAlbums();
  • facebook.Schema.user –> Facebook.Schema.user
  • Master.API.users.getInfo(Master.API.uid); –> Master.Api.Users.GetInfo(Master.Api.Users.GetLoggedInUser());
  • facebook.fql q = new facebook.fql(Master.API);
    • Add using Facebook.Rest
    • facebook.fql q = new facebook.fql(Master.API); –> Fql q = new Fql(Facebook.Session.FacebookSession);
  • Convert Site.Master page Page_Load method to a constructor setting RequireLogin = true;
  • Regular Expression bug

Until I get some time to resolve the RegEx issue the rest will be on hold for a bit though things are looking pretty good and the above didn’t take long at all. I have noticed a few worrisome comments on the discussion forum.

FacebookDel.icio.usDigg It!

Thoughts on PDC 2009

November 25 2009 11:35AM

image I’ve read a few articles that appeared on my Tweet stream regarding PDC this year and unfortunately they took a rather negative point-of-view. I’m always surprised when I read stuff like this:

Not since PDC 2003 has Microsoft talked so much and said so little. As I listened to the keynotes and have reviewed the sessions, words "series finale" repeatedly popped into my head -- like a TV show coming to its end after a long run.

- Joe Wilcox
10 things about Microsoft's PDC 2009: The good, the bad and the ugly

Unfortunately, to me that article reads very negatively and while I’m not quite sure what’s wrong in Joe Wilcox’s world to write such a piece I hope whatever it is it improves as things aren’t nearly as dreadful as he leads on.

I was in Orlando in 2000 when Microsoft announced the .NET framework which was clearly an inflection point though, rather somewhat messaged, they eventually delivered on Steve Ballmer’s Developers! Developers! Developers! message. I think we may reflect on this year’s PDC as an equally important inflection point as Microsoft delivers on a far more effective and cohesive cloud computing strategy than last years “services” effort. I didn’t attend PDC last year though I tried to grok their cloud strategy and left me wanting particularly when compared to what Amazon offered roughly a year ago which was Windows truly running in a cloud.

moves it does deliver on a number of fronts while at the same time it seems there were some obviously missing pieces though Microsoft stands on much firmer ground than they have in past years with Windows 7 being very solid with lots of new and interesting features and Internet Explorer 8 is a solid browser now that there’s lot’s of competition (Chrome, Safari, Firefox). Btw, I’ve more or less switched to using Chrome as my browser of choice from Firefox v3.5.

Some of the highlights I took away from this year’s PDC…

image

Windows Azure ContainerWindows Azure was the major announcement at this event and compared to last years nebulous and confusing messaging which I never understood this year was very clear. To drive home the message Microsoft parked a Azure container right in the convention hall for people to browse in an around. Now, of course, these kinds of containers are not new nor unique to Microsoft but I think it delivered a clear message that their cloude (that’s the spelling they used this year) is real and happening right now. They plan to start billing Feb 1 for their cloud services. In contrast to last year, MS will host user customized VM’s in the cloude similar to what Amazon has offered for awhile now albeit on the latest MS OS rather than Win2003.

Windows Azure ContainerWhile support for custom VM’s running in the cloud is cool, perhaps the most immediately useful part of the Azure story may well be SQL Azure with it’s support for TSQL using existing tooling which is particularly interesting as it offers a “near” immediate use for Microsoft’s cloud services. I think this offering may also put pressure on ISP’s hosting MSSQL to offer more competitive pricing because Microsoft’s offering looks very compelling:

Web Edition Relational Database for $9.99/month includes:

  • Up to 1 GB of T-SQL based relational database
  • Self-managed DB, auto high availability
  • Best suited for Web application, Departmental custom apps.

My blog is hosted at discountASP.NET which costs $10/month for half the disk space. That’s not to say there aren’t other distinguishing factors between the two offerings but clearly our choices have expanded.

image

Next was the Silverlight Beta 4 announcement which, in my mind, has clearly become Microsoft’s preferred UI platform trumping both WinForms (no surprise) and WPF. At ScottGu’s keynote he mentioned Microsoft has quickly pushed out three Silverlight releases in 22 months and that the quick pace was going to continue with his announcement of the availability of beta 4. The latest release nearly places Silverlight on the same level as WPF for developing native Windows applications just checkout the “Move beyond the browser” section on the above SL Beta 4 link. The other really important piece was ScottGu’s mention that many of the new features of SL 4 are in direct response to user feedback. That’s key and illustrates that Microsoft is listening and tuned into the developer community which is what’s going to drive the adoption of technologies like SL and more importantly, at least for Microsoft, Windows 7.

That gets to the laptop announcement where Microsoft enabled every attendee of PDC to start developing Windows 7 applications immediately. A great move IMO, one that further underscores Steve Ballmer’s developers message. If you don’t buy just look at the GUI builder Lino demonstrates here that Apple provides for iPhone development as used by Mono Touch. You can’t tell me that that’s a good tools story, it’s at least a decade behind Microsoft if not more.

image

Speaking of tools, PDC 2009 was all VS.NET 2010 and there are many exciting new features both in .NET 4 and on the tooling side for developing WPF and Silverlight applications and services. Rather than rehash a lot of what’s been covered I’d point you to this blog post which does a nice job of covering a lot of “what’s new”. In many ways I see Microsoft weaving a more integrated development experience as many of the technologies they’ve introduced over the several years are maturing and with 2010 we’re getting much more tightly integrated tooling and as a result a far better developer experience.

Be sure to checkout the new features in WCF 4 and check out Mark Miller’s coding guitar and for those of you Delphi guys, yes that’s the same Mark.

What’s Missing

The biggest hole was Mobile, a problem I believe might have been inadvertently highlighted during ScottGu’s keynote when he attempted to demonstrate what will be a very cool streaming feature on an iPhone that failed to work though they tried four different phones. In fact, the iPhone made an appearance in both Keynotes something I really never thought possible when on day one, Vivek Kundra, the US Chief Information Officer demo’ed an Azure based jobs application on the iPhone. I saw a lot of people with Apple devices like iPhones and Macbooks myself included but this was still very surprising.

The End

Falafel Software Booth PDC 2009 Wrapping up, I really enjoyed the week at PDC especially being there with John Waters and Lino Tadros from the Falafel team. We laughed a lot (BTW, not safe for work) and generally had a good time meeting lots of people at the Falafel booth.

FacebookDel.icio.usDigg It!

PDC 2009 in LA

November 18 2009 2:00PM

I’m in LA with Team Falafel (in booth 117, come on by!) for PDC09 where Microsoft has some announced some exciting developments in their cloud computing strategy otherwise known as $g(Windows Azure). The announcements this year go a long way towards really completing with $g(Amazon’s EC2) offering including support for user created VM images that can run in the cloud. The official rollout won’t occur until Feb 2009 when MS will actually begin billing for usage.

One of the other big announcements is the beta of $g(Silverlight 4). There are some really compelling features and it’s looking more and more like Silverlight will be the preferred UI not only on the web but on the desktop as well trumping both WinForms and WPF. One thing that was particularly interesting to me was a Facebook demo of a Silverlight 4 desktop application for a few reasons. One, the application was a real highlight of lots of the new features in SL4. Two, I’ve spent time working with the Facebook Developer Toolkit (FDT) which has a new 3.0 release with support for Silverlight and this time it seems to have a bit more support from Microsoft than in the past with a commitment to keep the API up-to-date.

All in all, the conference seems to be pretty well attended with perhaps the biggest news being the give-away of 1000’s of free netbooks to all attendees.

FacebookDel.icio.usDigg It!

Tags: .NET

CruiseControl.NET VS.NET Starter Kit for plugin development

October 30 2009 10:59AM

At the Silicon Valley Code Camp 2009 I gave a talk called Extending CruiseControl.NET through the use of plugins. I discussed the necessary steps and illustrated with an example ISourceControl provider using the LinqToTwitter OS project on Codeplex. The provider polls a configurable Twitter account looking for Tweets that that start with “CI:” allowing the Tweeter to trigger a build of the project simply be tweeting something like: “CI:Start the build”.

It’s a simple example but illustrates how easy it is to create CC.NET plugins an extend the platform to uses beyond classic Continuous Integration.

Here is a link to the Starter Kit. Btw, you will need to update the ThoughtWorks assembly references to match your build of CCNET.

FacebookDel.icio.usDigg It!