Posted by John Lockwood on July 8th, 2006
I’ve posted my 70-536 Exam Sample Code that I mentioned last time. We’ll have a few tests from this NUnit test suite posted here on the blog shortly too to give you an idea.
Posted in Software | Add a comment »
Posted by John Lockwood on July 1st, 2006
When it’s a classroom!
OK, I admit it, I’m being obtuse. As programmers sometimes say to being caught in the act of being obtuse, “Why Do You Think They Call It ‘Code’?”
I’ve written about JUnit unit tests in the past, and and one could say that I was able to parlay my current contract based on my experiences with test first design, since the client in this case was interested in someone experienced with Xtreme Programming, and test first design and development is one of XPs cornerstone processes.
And indeed, at work it wasn’t long before we had an NUnit test suite going — I’ve been plugging my way through our new database test suite for a few days now. The coolest thing (in my opinion) to happen to unit testing in the time since I first used JUnit is automatic test composition. Back in the JUnit days, you had to create (and — worse — you had to maintain) a TestSuite. In NUnit, there’s no such restriction, simply mark the test classes and methods you want with the appropriate [TestFixture] and [Test] attributes, respectively, and you’re off and running. We’re using Namespaces to organize our tests in a visually appealing and logical way.
Today when I got Visual Studio installed, it also occured to me that NUnit is an ideal “snippet viewer” sort of an application, the kind of thing that’s ideal for organizing and writing code to learn new things and excercise unfamiliar classes — which of course is just the sort of thing if you’re preparing for a certification exam. So a test (in the software sense) is not a test when it’s a classroom to help you prepare for a test (in the academic sense).
It’s all good.
So I’m going to work in that way for awhile, developing my sample “apps” (i.e., learning exercises) in NUnit, and perhaps I’ll publish them up here for what it’s worth.
Posted in Software | Add a comment »
Posted by John Lockwood on July 1st, 2006
Well, I just found Bennet’s excellent Code Markup Plugin, and with it, I was able to pretty quickly fix the post about C Sharp Verbatim Strings.
I knew some smart guy would have written that, and sure enough, he did.
With very little extra work, I was able to get some cool formatting going.
Cool Formatting
using System;
using System.Text;
public class Hello
{
public static void Main()
{
String verbatim =
@"This is a
verbatim string, and it can go
on and on, using ""quote"" characters
etc but everything else
is not escaped, like tab characters, \t
and so forth.";
System.Console.Write(verbatim);
}
}
|
Posted in Random Particles, Software | Add a comment »
Posted by John Lockwood on June 29th, 2006
Just doing a bit of hacking with the C Sharp mono compiler this evening. (I’m waiting for Visual Studio to ship — what else?). Meantime I may have found my first error in Donis Marshall’s Programming Microsoft Visual C# 2005: The Language — which doesn’t bode incredibly well given that I’m only on page 23 or so.
Looking at verbatim strings, Marshall neglects to point out that to escape a string inside a verbatim string you use double quotes, not backslash quote.
Here’s a braindead example of the right way to do it. Mono users use mcs VerbatimString.cs to compile.
using System;
using System.Text;
public class VerbatimStrings
{
public static void Main()
{
String verbatim =
@"This is a
verbatim string, and it can go
on and on, using ""quote"" characters
etc but everything else
is not escaped, like tab characters, \t
and so forth."
System.Console.Write(verbatim);
}
}
You know, it took about three times as long to write the blog post as it did to figure it out to begin with. I love trying to write code in HTML. There should be a wordpress plugin or the like for that…
Posted in Random Particles, Software | Add a comment »
Posted by John Lockwood on June 28th, 2006
The ASP.NET contract I’m doing in Sac is going quite well so far. It’s a small and really congenial team, and in less than a week I started to make some good progress on some of the code.
There are some minor hiccups — development anti-patterns, if you will — but it doesn’t look like anything too dire. Some of this involves existing code written by a now-missing contractor, which is always a delicate matter. Everyone likes the guy and he’s clearly very sharp in his work, but some of the underlying framework of his that we’re coding too may have a bit of architectural gold plating (which is not so bad in itself except in insofar as it may violate the Pragmatic “DRY” rule). A little more of a concern is that it may drive our efforts in the wrong direction as far as being fat / difficult to fix (which IS so bad in itself). Must learn more…
But that’s just code, which can always be fixed or tossed. The really tough job — good management and a team that gets along well — is already in place. Without that no amount of code will save you anyway.
Also, being in Visual Studio again is a treat. It’s always had a fairly competent debugger — and let’s face it, as a programmer, that’s home. I keep a SlickEdit window open for the heavy editorial lifting, of course. The new SourceSafe integration is flawless so far, too, and that’s quite nice. I’m starting to get a pretty good feel for ASP.NET.
Posted in Random Particles, Software | Add a comment »
Posted by John Lockwood on June 24th, 2006
I’m grateful to my good friends at Robert Half for the exciting gig we’re working on now, developing in ASP.NET 2.0 using Visual Studio 2005 and SQL Server 2005. I’m very excited to be stepping back into the contract software labor force after a few years putting up web sites and selling houses, and getting back into using Microsoft’s tool set is exciting as well since many of my last major contracts were either Java (which is fine too) or ASP using Delphi — which is a bit too exotic and unmainstream for my taste. I like a little job security.
Actually, after real estate, I wouldn’t mind a LOT of job security, which is why I’m seriously considering just doing .NET alone for the foreseeable future. Java’s cool enough, but I don’t think it would hurt my current prospects to maybe do some certifications — and it would certainly help my current client if I threw myself into some spare time .NET hacking in preparation for those certifications, even if in the end I decide the certifications themselves are a superfluous expense.
So don’t be surprised if a lot of what you read here in the months ahead ends up being about the Road to .NET 2.0 Certification.
Stay tuned.
Posted in Random Particles, Software | Add a comment »