What is to become of the SharpSSH project?

The SharpSSH project has, in my opinion been a success.

 

It translates the standard jsch libraries into .Net CLR speak so that we C# and VB afficionados can play in the heterogeneous space, too. It was an excellent piece of work by the original developer, Tamir Gal, but it seems that he has tired of it. His own blog has not been updated since 2009 and the project itself has been stagnant for even longer.

Matt Wagner has made an attempt to fork and maintain the code but he will only be successful if people follow and contribute to the cause.

I think that the original SharpSSH project has been an immensely successful project, and that Tamir Gal should be commended.

 

However, we now need [...]

SharpSSH and getPermissionsString() [bug in SftpATTRS.cs]

I've been using the SharpSSH Library quite a lot, recently and I've been coming across quite a few unfortunate errors…

 

Today's was to do with permissions from an SFTP entry. When you execute this using the standard library you get access to a "longName" property which contains the UNIX style listing of the entry, such as "-rwxr-xr-x 1 root apache 58585 Mar 14 2009 wibble.exe".

What was throwing me was the date format; "Mar 14 2009" – we have a script at work which reports on vital files that appear to change. It's not complex, but it depends on the string basically, err, not changing. Problem is that when a file reaches its six month birthday, UNIX stops reporting it as "Mar 14 [...]

RC of Entity Framework 4.1 (including EF Code First) is released

Scott Guthrie announced on his blog that the Release Candidate of the excellent Entity Framework 4.1 is now available. See here for all the gen.

 

He has also updated the "NerdDinner" sample project to use the new EF4.1 features, especially the "Code First" pattern where you can create lovely, clean POCO models and have them automatically create the database schema, update the schema and handle the repository actions.

It's a fantastic post and goes a long way to explaining the topics. However, given the bleeding-edge of this technology, there are a couple of differences between Scott's code and the RC code that you can get from here.

New names for IDatabaseInitializer conventions

Scott's code shows the following to persuade (in debug code) how to recreate [...]

Rackspace managed hosting is EXCELLENT

OK, I need to admit  a little bias here; my company (on my recommendation) went with Rackspace for our SaaS offering.

 

That being said, I was faced with a dilemna a few weeks ago. I needed to quickly procure a web site with a vital and graphical message ("our house is for sale") and I needed to do it in such a way that my CFO/CMO was happy (wife controls costs and writes copy for any such venture). Technology choice? Easy; Joomla and the underlying technologies of PHP and mySql.

So, I knocked up a site on one of my many in-house Ubuntu VMs (LAMP on VM Server 2 on Ubuntu 8.04 LAMP on what-can-go-wrong-I'm-a-professional) and it was great(tm). Uh. Until I tried [...]

_CrtDumpMemoryLeaks() and related fun

Welcome to the 1990s….

So, I have a new application that is resolutely non-MFC and non-ATL. Why? Because it's a GINA DLL that can be running on a machine going back to early 2001 (not quite the 1990s of the previous line but close enough!) where we have no idea whether it is running on XP SP0, SP1, SP2 or SP3.

This app has a lot of malloc and a lot of new object() calls in it. Are these all cleaning up after themselves?

Surprisingly(!), the C RunTime Library gives us an easy way to check; you can call _CrtDumpMemoryLeaks()

It ain't as easy as that though (obviously). To be effective, you need to bear in mind the following;

_CrtDumpMemoryLeaks() only understands the context of its own [...]

Silverlight 4 and data-bound combobox - the answer

=========================================================================================

Update: 10th August 2010; Sorry, folks, this continues to be as complex before. What follows works ~95% of the time but will occasionally fail because the lookup data source is not available when the main data source is queried.

This really should not be difficult, but it appears that it really is.

I think that the solution is to move to an MVVM model, where the ViewModel presents the primary data source as well as the lookup data sources. Better; it provides dependency linking so that when the lookup lists change, then dependant views are updated.

You may now be thinking "WHAT!? It can't be that complicated, surely?!?!?!?". Well, I thought the same, and it seems that it really is that complex

It's [...]

Silverlight: how to decode a uri and pass the arguments to your method

The problem is that you need to pass your parameters to your Silverlight class and hopefully deal with them. First and foremost, how do you recognise that you’ve been called? Well, via the OnNavigatedTo event… this event is fired for every Silverlight page.

OK, so we captured the OnNavigatedTo event. What next? Well, next we try to decode the uri that was passed to the SilverLight app. Let’s pretend for a moment that we were called via “http:<YourSource>?title=myTitle&search=special”

We now have two session variables set; title=myTitle and search=special

So, how do we decode these? The easiest way is to use the SilverLight libraries to query the NavigationContext object;

if (this.NavigationContext.QueryString.ContainsKey("title"))                 this.Title = this.NavigationContext.QueryString["title"];

if (this.NavigationContext.QueryString.ContainsKey("search"))                 searchType [...]

So, why?

So this came about because I am writing a hobby app around a new CMDB. New what? Don’t worry… I’m just playing…

Anyways, I’m learning a whole load of new technology as I blossom from an amateur to a hobbyist level programmer. In particular, I’m getting to grips with NHibernate (database abstraction), MVC and a fabulous framework for tying it all together at SharpArchitecture from Billy McCafferty.

Stick with me for a trip into the [...]