Wed, 30 Jan 2008 13:06:00 GMT
As I had written here, I am working on a freeware program called JNFileCombiner to combine parts of files numbered .001 through .nnn. I had seen other programs do this, as well as batch files (just by copying the files together), but I figured this was a very simple project to get started with fully unit-testing code.
Peter Waldschmidt of Gnoso was kind enough to support this open-source project by giving a license to NCover free of charge, and already I have seen benefits to improving my unit tests. I've found that exception scenarios were not covered by my tests.
Last night, I posted the first version of the application, with source, to a new codeplex project here. It's a bit rough around the edges, but it works. I really need to work on complete comment coverage, simplification of the unit tests, and some refactoring, but I'm working that into the plan for V1.1.
Thu, 24 Jan 2008 17:38:00 GMT
I've decided to delve more into fully unit-tested code and write an application from scratch using TDD methodologies after being re-invigorated by Robert C. Martin's fantastic Craftsman article series ( http://www.objectmentor.com/resources/publishedArticles.html -- click on the "Test Driven Development" category).
I'm using NUnit ( http://www.nunit.org/index.php ) to do unit tests, with TestDriven.NET ( http://www.testdriven.net/quickstart.aspx ) used along with an obsolete version of NCover ( http://www.ncover.com ).
I have no complaints with NUnit, but TestDriven.NET has some strangeness in studio 2008 that I will detail shortly, once I make sure the issues that I am facing are not simply due to PEBKAC on my part. NCover seems quite nice to be able to have a way to see NUnit coverage, without resorting to the MS tools (which do not seem to play nicely with external testing frameworks like NUnit).
Fri, 15 Dec 2006 21:35:00 GMT
I had found out about SSW's Code Auditor product through one of those ubiquitous Top 10 .NET Developer Tool lists recently, and as I'm at the start of a new project, felt that I should run it through an auditor to nip common code errors in the bud as early as possible. This tool retails for about $305US, and can embed itself right into Visual Studio. Here's my thoughts on it.
1) Customized rules are possible to match your own inhouse conventions.
2) The individual rules are mostly great.
3) Works with Team Foundation
4) Works against uncompiled code -- this is very cool.
5) Integrated with JetBrains dotTrace Profiler
What I'd Suggest (Improvements):
1) Trial version does not scan all files -- non-complete trial.
2) Initial run against my web site (just starting out) caused the application to throw an exception. Actually all subsequent attempts to use the addin were also unsuccessful.
3) Spell check for programmers! But there should be a quick button to just run the spell checking rule against the open document via the auditor toolbar.
4) Rule about starting boolean properties with a verb does not take into account existing verbs used in the .NET framework like "Enable" in the case of "EnablePasswordRetrieval"
as in System.Web.Security.MembershipProvider. It caught "Requires" as not being a verb as well as in "RequiresUniqueEmail", which is technically correct, however
this is not something the end user will be able to have control over.
5) Cascading rules should be removed as they are checked off -- ie. When fixing an "Empty Catch Block", this could also fix "No empty code blocks".
6) On the html output report, switching back and forth between views remembers your checkboxes, which is great. However, if I check off that I fixed 3 different rules associated
with the same file in the "By rule" view, and change to the "By file" view, it doesn't know that I fixed all rules associated with that file.
7) The "The Rules" view is fantastic.. they show you each of the rules they check for, the regular expression used to check against, and how many hits for that regex.
8) I'm not convinced all rules can be created via regex.
I'd use it. I spend so much time in visual studio, and am not alone on the team. Being able to have checkin policies that force a certain level of code quality is worth using this product in and of itself, even without SSW's ability to add customized rules.
Mon, 06 Mar 2006 13:48:00 GMT
It'll be a short posting day for me today as I get ready to head down to sunny Miami for a few days. Learn2Asp is providing free training webcasts for ASP.NET as well as the opportunity for free Visual Studio standard, a price reduction on MSDN Pro, and some other goodies. You can get to the webcasts here. They seem to be targetting crossover developers, as the material is tailored to 3 distinct areas: JSP devs, PHP devs, and ColdFusion developers.
The webcasts are too many to list (for being free, I was amazed at the width of scope of these 'casts). Here's the perks for attending three:
Fri, 03 Mar 2006 13:28:00 GMT
Found a post on how to install IIS7 on the latest build of Vista (5308), and wanted to do some staging for my stagnant personal site on my laptop (that has Vista installed), and decided to give it a whirl. Thanks, Dan Bartels for doing the writeup. That's some great site design on his page!
We were told to keep an eye on IISSEVEN.COM, and I certainly will.With this build, after going to the usual IIS snap-in under MMC, you'll notice a difference. As they say, a picture is worth a thousand words...
Tue, 28 Feb 2006 23:06:00 GMTIf you're trying to create a gridview, automatically bound to either a SqlDataSource or an ObjectDataSource (the better of the two options), and want edit and delete functionality, do not forget to set the DataKeyNames property to the primary key of the table or object you are trying to delete. Otherwise Edit/Update seems to work, but Delete will complain that it cannot find the parameter, even if you are defining DeleteParameters in the DataSource itself.
Sat, 25 Feb 2006 13:59:00 GMT
...then you might be running into this issue with the installers, as reported by Jason Sacks. Keep your eye on his blog for a resolution to this. Here's the telltale sign in the install logs that you'd see:
[SDKSetup:Error] Config_Products_Install: Windows SDK Setup (failed): Installation of the "Microsoft Windows Software Development Kit" product has reported the following error: Fatal error during installation.
Update: seems this may be due to a bad iso -- either because of me or msdn. But the second download worked like a charm!
Fri, 24 Feb 2006 13:10:00 GMT
Here's an easy way to check if a temp table exists, before trying to create it (ie. for reusable scripts) from Simon Sabin's post :
IF object_id('tempdb..#MyTempTable') IS NOT NULL
DROP TABLE #MyTempTable
CREATE TABLE #MyTempTable
ID int IDENTITY(1,1),
That way, if you have to change databases in the query window, you don't have to drop the tables before you run it again.
Thu, 23 Feb 2006 23:38:00 GMTI had ordered some 3D glasses for a very old TV show, based on the Pulfrich effect, in fact the show mentioned on that site, Doctor Who. I found a place online selling them for only 99 cents each, called Science Stuff. The cool thing is that they are great for sports with a lot of motion (like skiing, or what happens to be on the Olympic coverage now, replay of Figure Skating. The principle is that by tinting one side, you're slightly slowing the light hitting your eye, causing your brain to percieve 3D. There's the normal sensation with 3D glasses after you take them off, where your eyes feel wierd seeing the same amount of light in both eyes again!
Tue, 21 Feb 2006 23:05:00 GMTI found a great resource that is a knowledge base of extremely detailed info regarding stop errors, also irreverently known as Blue Screen of Death (BSOD) errors. For anyone thinking that they can't look up the error while the machine is in a blue screen, after a reboot, the stop error will be in the Event Log.
Tue, 21 Feb 2006 22:58:00 GMTI'm eagerly awaiting the rumored February CTP of Windows Vista. Bink.nu reports it will be made available today, February 22nd
Tue, 21 Feb 2006 13:44:00 GMT
While I've had plenty of experience in fixing seemingly dead physical machines, the death of my Team Foundation Server Dec. CTP machine has me flummoxed. It just sits there with a blinking cursor when I start the vitual machine up. This leads me to the following potential problems:
I'd like to get this back up and running so I get my beta source repository back. For now I'm working disconnected, which works exceedingly better than in previous iterations of Visual Studio.
Tue, 21 Feb 2006 13:13:00 GMT
What it does is allow you to create a list of DivX movies, pass that list across to Windows Media Encoder (a free MS tool, and a prerequisite for this method), and play them from the XBOX 360 by viewing the stream from the PC.
What this is actually doing behind the scenes is encoding (hence the encoder) the movie / tv show / whatever to ASX / ASF on the fly, and passing THAT to the 360. The 360 knows how to play an ASF, and does so with no problem.
Thu, 16 Feb 2006 22:10:00 GMT
After being away for a couple of days on vacation & catching up, here's a bit more of a frivolous post.
FTKernelAPI is an open source library for connecting to the bittorrent protocol trackers. With this library, it's simple to write a torrent app... or you can just use a third-party prepackaged solution, like uTorrent, but where's the fun in that?
Fri, 10 Feb 2006 14:04:00 GMT
By entering SQLCMD mode in a SQL Server Management Studio query window, you can do some very handy things without needing to jump back out to the command prompt.
Commands can be run just like at the command prompt, by prefixing the line with "!!" a la:
!!bcp MyDatabase.dbo.MyImportedTable in c:\temp\sqlimport.dat -Umydbuser -Pmydbpass -Smydbserver -n
And by executing (ctrl+e) that line, it'll import your database... easy, and if you save in a database project,
you can even have these included in the source control flavor of your choice.
Fri, 10 Feb 2006 02:57:00 GMT
I just got back from the first meeting of the Central NJ .NET User Group, hosted in East Windsor, NJ area by Jason Beres (Infragistics). There was a pretty good showing, especially for a first meeting; I would estimate 20-30 people. There was good pizza, time to network, & a talk by Miguel Castro on intro ASP.NET 2.0 topics.
I believe it was decided that DonXML will be doing the next talk; check out http://www.donxml.com and http://njdotnet.net/ for details. I managed to score a piece of software from a raffle, and the office park was very easy to find, right off of Rt. 571, in the main building, in a medium-sized room with stage & screen. All-in-all, a good time... and an opportunity for those in the general area to get some quick tutelage for free, with the ability to ask questions of some good speakers. Hope to see more people there next meeting!
PS: sorry for the non-linkage; this post will be edited once I'm not on a Vista box Update: Edited with links.
Wed, 08 Feb 2006 13:28:00 GMT
After hitting the 16gb limit in Exchange 2003 a while ago, we decided to use the temporary 1gb extension registry key to let the mail store start again so we could clean up old emails & have a mail store again.
When later we found out we could upgrade to SP2 and not have to worry as much (the db was forcing itself offline every few weeks), we researched and installed the patch.
Fast-forward to this morning, when I was surprised to find the mail store down again, this time due to the 18gb limit! A Quick google search led me to this article explaining that it's not an automatic increase, but rather the result of 2 registry keys, still being forced to a maximum of 75gb (a lot of mail).
You can configure a logical database size (logical size means the physical size of the .EDB and .STM files minus the logical free space aka white space in each) limit for each Exchange database by creating a DWORD registry key named “Database Size Limit in GB”. This key should be created under the following location for the mailbox database and public folder database respectively:
If you wanted to set a limit of 40GB for the Public Folder Store, you would simply need to create the same key under the Public-GUID and configure it with a decimal value of 40.
After doing this, and restarting the information store service, you'll find an event in the Event Viewer's Application Log, id: 1216, with a message something like: "First Storage Group\Mailbox Store (MAILSERVERNAME)' is limited to [value entered, ie. 40] GB."
Wed, 08 Feb 2006 00:12:00 GMT
Through the use of Creative's SoundFont technology, you can get a pretty realistic sounding rehearsal tape for free, depending on the type of music you're working on. Here's a link to tons of different sounfont sites, with the key being the larger ones are usually better, including a few full orchestral sound fonts to let you play out full scores.
How I usually go from score to audio cd is as follows.
First, a midi is needed (I can't play piano fast or well enough to encode this myself for the long pieces I usually do this for). The Silvis Woodshed has been great for many classical pieces, but most of the time a simple google search for "[piece name here] AND MIDI" works.
Second, I use Noteworthy Composer to import the midis, saving them each as NWC files, so I can figure out which midi channel goes with each voice part. If I picked the right midi, each voice part is on a different channel. If not, go back to step 1.
Third, windows explorer, copy the set of midis into four folders, in folders: NWC\S, NWC\A, NWC\T, NWC\B for each of the voice parts needed.
Fourth, go into Noteworthy Composer (NWC), and for each file in each voice part, adjust the volumes. I usually use 60 for orchestral/accompaniment, 75 for the other voice parts, and leave 127 for the current folder's voice part. Be careful here -- most imported midis tie the first channel to the first staff AND the rhythm staff.
Fifth, map the staff's channels to the appropriate soundfont via Creative's SoundBank manager software. Audigy series cards all come with this software to my knowledge. Be awware that you'll want to share system ram with the sound card so you'll have enough to load in some of the larger soundfonts, and increase the ram size to something large, like 384 or 512.
Sixth, (after quite a lot of manual work), this is the painstaking part. I open up Adobe Audition (previously Syntrillium's Cool Edit), and start a new document. Open up the first NWC file, press record in Audition, and Play in NWC, repeat ad nauseum for each midi file, for each voice part. Save in WAV\S, etc.
Seventh, open up each document, & normalize all the audio.
Eighth, burn each audio cd master, adding in CD-Text (very cool for display on players that support it). The end result is a tape where the musician can learn their part, with it being the dominant notes played, while still hearing the harmonies behind them.
Ninth, obviously the duplication process where each cd is documented.
It's my hope to create a c# little app to automate steps 4, 6, and 7, but for the 3 times or so a year I do this, it may not be worth my time.
Tue, 07 Feb 2006 13:59:00 GMT
I had found "Team System Rocks" a few days ago; the site is full of video / powerpoint combo tutorials to either or both show how to accomplish simple tasks in what is at first a daunting interface, or explain the architectural concepts behind the TFS (Team Foundation Server) API and framework.
To give you an idea of just how different it's been for me, it took me 15 minutes & lots of googling to figure out how to switch from sourcesafe to the Team Foundation Source Control. Here's the way to do it in case anyone else is trying:
To configure Visual Studio to use Team Foundation source control
1. From the Tools menu, choose Options.
2. In the Options dialog box, navigate to SourceControl, expand it, and then click Plug-in Selection.
3. In the Current source control plug-in drop-down list box, choose Visual Studio Team Foundation Server.
4. Click OK.
Tue, 07 Feb 2006 13:48:00 GMT
As word gets out that Team Foundation Server has been signed off to RC (release candidate), which should be made available on MSDN soon, the plans for budget allocation and boss-justification must loom close for those who plan or hope to use it. Thankfully after a long, widespread blog dialog, involving key Microsoft decision-makers all the way up to "Soma" Somasegar, there may be a simple no-cost, free, limited solution for small teams. To appease the masses, MS is making available to those MSDN customers who currently have a "role" subscription (one of the premium MSDN subscriptions, aka a migrated Universal or Enterprise MSDN subscription) a free-for-five-users version of Team Foundation Server. They will still only have access to the development tools included in their role, and would need to purchase the Team Suite edition of Visual Studio to get the benefits of other roles, but at least now will have the following:
Just to clarify, here's the word straight from Rick LaPlant's blog post:
" The TFS 5 user version means 2 things. first, that the server is throttled to allow no more than 5 named users on the server. Second, it means that up to 5 people can connect to the server without purchasing anything else. Your question seemed to be about the CLIENT role based skus. If you currently have MSDN/U subscriptions when we ship later this year you will get one of the role based skus (dev/test/arch) for each MSDN/U license. If you want ALL roles for each person (4 people for you i think) then you would pay incrementally for the Suite. Now, in my post I said that for the 1st year (more precisely for 90 days after we RTM), you can get the Suite upgrade at retail for 2299, which is the SAME cost as MSDN/U retail upgrades today. So the net is, for 90 days after we RTM, you can get (at retail, different for volumen license) the full suite and a server that will scale to 5 people for no more than you'd pay today.
however, i do want to be clear one more time. The 5 user license to TFS is to the server. if you want all the roles for a single person, you have to buy the suite. we are making it cheaper for our best customers (MSDN/U customers) to get the suite so that each person can all of the client roles, but you still need the suite. "
So I have set up a TFS server, and am happily making work items, etc. There are things that I like & dislike about the product so far, but since this post is a bit on the long side already, that shall wait for later posts.