.comment-link {margin-left:.6em;}

I Hate Linux

Wednesday, November 14, 2007

Edge cases and polishing

Some say that that the majority of developers are psychologically incapable of adequately testing their own code (outside of unit testing) because subconsciously they know where their program works and where it doesn't and will avoid straying from the path so that their program keeps working great.

I admit it... I'm one of those developers.

Right now I'm having the fun of forcing myself down random paths to test strange edge cases for my new Windows Home Server add-in... cases that it would be more than fair for me to just say say "Sorry, but you did something I told you not to do and now this add-in cannot clean up after itself"... but I'm not.

Technically everything I am doing is unsupported by Microsoft as I'm using a number of Windows subsystems that shouldn't ordinarily be used by a Windows Home Server user... in fact normal use of them could even violate the end user license agreement.

What I'm trying to do this evening is do my best to make sure that even if a user enables DFS and dinks around with that or other such systems, I'm able to gracefully handle dang near anything the user might have done.

That being said... grrr.

Once I've got those edge cases accounted for... I need to improve my logging and I'll be all set.

</rant>

Labels:

Wednesday, November 07, 2007

Grumble Grumble Visual Studio bugs

Off and on for the last couple of days I've been playing around with making Visual Studio project templates and customizing them with Template Parameters and ran into a little issue... the assembly name template being specified in the larger template is simply ignored.

What does that mean? If I create a custom template with the AssemblyName tag being specified as say... Xyz.$safeprojectname$, and create a project named "My Test Project" based on it... the resulting assembly name is "My Test Project", not Xyz.My_Test_Project as that syntax would generate for a namespace... even on a fully patched copy of Visual Studio 2005.

From the looks of it this has been bugged before on Connect... but ultimately closed as not reproducible.

Thinking I can show how to reproduce it.. I've submitted it myself: Custom AssemblyName tag ignored in template.

There still exists a problem... the same issue exists in at least Beta 2 of Visual Studio 2008. Someone first pointed it out in April 07 as existing in the March CTP, and in my testing it seems that this still exists... so it to has been bugged.

Grrr.

Double Grrr I suppose when it sounds like Beta 2 will be the last publicly available version of Visual Studio 2008 before they RTM so there will be no way for me to know if this bug has/will be fixed by then.

Labels:

Monday, October 29, 2007

Phase Two & Three: Windows Shares & IIS

Despite intending on being more logical in my coding and perfecting one set of API calls before moving on to another... over the weekend it was a fairly chaotic process as I ran back and forth between different pieces to make my ugly form with a dozen text boxes and two dozen different buttons to let me test out every little thing including installing Windows components using an answer file.

After much work it's all done... well mostly.

Early yesterday I began cleaning up the code a bit and moving it in into an actual add-in which works great (despite being ugly as heck) and squashed the last remaining bug in my add-in (that I'm aware of)... now I just need to figure out why IIS no longer wants to serve pages over HTTPS to the directory I created.

Labels: ,

Friday, October 26, 2007

Phase One: DFS

Despite my earlier estimate... I'm now expecting that my new WHS add-in will take significantly longer than first expected... largely because of the fights with the Win32 API.

Currently (first of 3 separate API sets I need to work with) I'm implementing support for the Windows Distributed File System which requires 7 (for my purposes) or so API calls and while all are documented on MSDN, only a handful are on PInvoke.net or blog posts (yes once I'm done I'll share some of what I've come up with)... so I get to spend plenty of time writing my own definitions and plugging away at them, making sure I understand exactly what it is expecting when the MSDN docs are less than clear.

I dunno about you... but I really am no fan of marshalling pointers to arrays of structures.

I'm happy to say though that despite all of this, I've implemented and got working 5 of the 7 API calls I need, think I've identified #6 and have yet to figure out how to accomplish the 7th task.

Labels: ,

Thursday, October 04, 2007

How little I know

Over the years I've found that I'm an unusual kind of .NET developer... as I really don't use databases directly either personally or professionally.

Sure BrendansStudentLoans.com has a SQL 2005 backend with a dozen quick stored procedures... but other than that, the only real DB programming I've done was in the 2002 timeframe when taking a database programming class back at DSU and where I became quite proficient at writing PL/SQL... so much so that the teacher ended up using my homework assignments and tests as the answer keys and lost only a single point during the semester... only because I ended up making the same mistake as everyone else on the final.

Why is this relevant? Because I'm seeing this week just how rusty I've gotten and how things have passed me by.
This week I am taking MOC 2779: Implementing a Microsoft SQL Server 2005 Database (for free) so as to learn a bit more about the data world and wow... there are a lot of things I'd heard of... but never used... and even more things that I'd never even heard of.

Wow.

More so it's been interesting during practices and labs when we've got to write some (at times) complex queries... and I completely forget SQL syntax for a join or how to do other SQL operations from a hand written query. It's especially interesting as SQL is so different than the way I think... I tend to be a more procedural person than simply not a declarative person.

That reminds me... where the hell is the Intellisense in SQL Server Management Studio? Yes I know there are other tools that offer it... but come on... this is a Microsoft tool... released in 2005!

So taking this course has been a bit of a humbling experience... but also one that reminds me that there are areas I need to keep up on and try to use a little more if for no other reason but then to keep up on it.

Labels:

Sunday, September 09, 2007

Windows Home Server Tab Test Loader

One big problem with any kind of add-in tab development for the Windows Home Server Console is that testing is a #&*%. Even if you don't build a full installer every time, you've still got close the console, copy the DLL over to the server and re-launch the client... even if just to see if a label is in the right position.

And that all assumes that you've laid things out right internally.

The Home Server Console is pretty explicit on how a tab should look and how it can be loaded and is unforgiving if you are wrong and will fail pretty silently.

So as to avoid such problems I built this quick and dirty tool to check for those same things... as well as give me a quick and easy way to test some aspects of my add-in without having to deploy it.

Unfortunately due to the way some of the Window Home Server Controls (from HomeServerControls.dll) and dependant components do logging and loading of resources, add-ins loaded in this tool will not look as they do in the real thing (color wise) and may require being run as Administrator.

Windows Home Server Form discussion

Labels: , ,