Thursday, June 30, 2005
Automated Web UI Testing
Scott Hanselman is using Watir, an open source Ruby library, to do his Web App testing. He says it's "the bomb." It wires together with NUnit by spawning a new process on Ruby's shell to run asserts from Wasir. Looks pretty neat.
Hanselman also points out how to use Firefox's Web Developer extension to help out. Another +1 reason why Web Developer's so cool.
I've got some upcoming work which will need some web testing. I'll be sure to look at this!
Wednesday, June 29, 2005
Forgotten Passwords for MSDE 2000 or SQL Server?
I know I never have, but here's a fix in case you have: while logged on as a user with admin privileges, change the login security mode to Windows Integrated. Use
osql -E to log on, then use sp_password to change the sa account's password. Remember password or note it in a secure place. Change back to the appropriate security mode and you're set. You'll need to first stop the MSDE or SQL service, plus close out any apps (including VS) which might be using the services.
There's a good article covering this on Microsoft's help site. I stumbled across this while looking for something else, because I'd never, ever forget a password.
That's my story and I'm sticking to it.
My "Effective C#" Review on Slashdot
I wrote a review for Bill Wagner's Effective C# and posted it to Slashdot. Slashdot actually gives a hoot about how reviews read. Tim Lord is a tough, but fair editor who helped me to polish up my review. He's a tougher editor than my wife, even, and I didn't think that was possible! The end result was a much stronger product and the editing process was actually enjoyable because Tim edited the structure of my review, not its voice or style.
So the review's finally up on /. and the reaction from the crowd ranges from insulting to insightful to amusing.
Insults include the normal Microsoft bashing from folks who can't get past C# being a Microsoft product and look at its many benefits. A couple folks also didn't like that I'd gotten the book for free as part of the Dayton .NET Developers Group, or that I'd tried to pull Wagner's company in on a consulting gig some years ago. I put forth both those points in a disclaimer section at the front of the review just to be clear about it. How many others are up front about similar situations? Give me a break.
Amusing includes the folks who blew off Wagner's book as just another syntax or design book. A couple folks preferred works from Herb Schildt whose books, in my opinion, have numerous errors or bad practices and clearly demonstrate that one doesn't have to be a good programmer to write vast numbers of books. More folks said something along the lines of "Just get a design patterns book, that's all you need!" No, dudes, Wrong Conclusion.
Insightful points included one fellow remarking I'd missed an important point by associating Wagner's book with Scott Meyer's Effective C++ which really is a seminal work for C++ developers.
Thankfully there appear to be quite a few folks who understand that Effective C# isn't about syntax and it's certainly not just a replacement for design patterns. Syntax and pattern references have their required places on the bookshelf, but books like Wagner's are just as vital on the bookshelf. Good developers/engineers/geeks need to understand the ramifications of specific choices for the language they're working in. Wagner's book hits this on the head.
I had a feel for what the crowd reaction on /. would be when I wrote the review. All the same, it's an amusing thing to see in reality!
Tuesday, June 28, 2005
VS2003 Solution Templates
More stuff everyone else most likely knew ages ago, but since I'm just starting out in this envronment...
Here's a good MSDN article on creating your own solution templates in VS2003. This shows how to nicely break out solutions in n-Tier format, plus there's some good discussion on architecture and application modelling. Very useful stuff.
Documenting Code with VS Macros
There's an interesting-looking article on MSDN about using Visual Studio macros to document source code. It appears this is only applicable to VS2005, but the macros support VB.NET too.
It will be interesting to check this out and see how it compares to Roland Weigelt's killer tool GhostDoc. GhostDoc (C# only) generates all the comments for fields, methods, etc., plus fills in the comments by deducing text from the names and types of the target. You get near-perfect complete comments -- as long as you've done a good job with your naming. (Go read McConnell if you aren't doing a good job naming!)
There are also a couple widgets which will allow you to get XML document files produced from VB.NET code in VS2003. Check out VBCommenter and VB.DOC. I'll be exploring both these, and how well they wrap into NAnt, as part of my upcoming project.
Monday, June 27, 2005
Virtual PC & CD/DVD Issues: RTFM
I spent a couple hours this morning trying to figure out why Virtual PC wouldn't recognize my Win2K CD I'd created from an MSDN ISO image. I couldn't get the d@mned thing to boot off the CD, even though the host system would recognize the disc and boot just ducky. I've used VMWare for several years and never had any similar troubles.
Finally, I right-clicked on the image of the CDROM in the VPC's left tray. Lo and behold, a context menu with "Capture ISO Image" appears. Duh. A simple browse to the image file on the host system's hard drive and POOF! I'm off and running. A quick search of the VPC help file said as much.
Scott Hanselman had a good post on the importance of starting out with fundamentals when troubleshooting an issue. His team lost half a morning for ten folks. I just lost a couple hours, but it was a good kick in the pants reminder to what I'd learned the hard way from some very tough sergeants when working on radar systems while flying on E-3s years ago: RTFM and KISS. Start with the basics, check the manuals. Usually not said in such a mild manner, though.
Sunday, June 26, 2005
Recipe Blogging: Brined Pork Loin
I was turned on to brining pork some years back when watching a show by Ming Tsai on FoodTV. I've come to the point where I brine most all larger pork cuts, be they thick chops or hefty loins. Brining's a great technique for keeping the pork very juicy and tender, plus it's a great way to infuse the cut of meat with great flavors. I've got a couple different riffs I use for pork. This one's my psuedo-Eastern variant. Check the Notes section for a psuedo-Southwestern variant.
Brined Pork With Bitter Vegetables (psuedo-Eastern Style)
Serves 6 - 8
1 x 2 lb pork loin, trimmed of fat (NOT a pork tenderloin!) ~1 qt water 1/3 c. kosher salt 1/2 c. sugar 2 bay leaves 5 - 8 green cardamon pods, cracked open 5 - 8 black cardamon pods, cracked open 2 star anise 2 - 4 pieces dried orange peel 2 Tbs Chinese style soy sauce 1 large bunch arugula (~2 c.) (radicchio works well here too) 1/4 red onion, cut into 1/4" slices- Pour the water in a heavy saucepan. Add the salt, sugar, bay leaves, both cardamons and star anise to the water. Bring to a simmer over medium-high heat, stirring frequently until the salt and sugar are dissolved. Remove from heat and leave to steep and cool.
- When the brine is cool, place the loin in a large ziplock bag. Pour in the brine, squeeze the air out of the bag and seal.
- Place the ziplock bag in a shallow bowl and leave in the refrigerator overnight. In the morning, turn the bag over. (Often the top side of the loin peeks out of the brine. Turning keeps the little bugger evenly brined.)
- About 90 minutes before serving, pull the pork out of the brine and rinse well. Pat dry, cover with a bit of plastic wrap and leave in a plate on the counter to allow it to get a bit closer to room temperature. (See Notes.)
- Get a HOT fire going off to one side, not the center, in your grill. I use charcoal and don't have any experience with gas grills. (See Notes for info on my charcoal use.)
- When the coals are hot, place a small disposable aluminum pan near the center of the grill.
- Working directly over the coals, sear the meat on all sides. This usually takes about 1-2 minutes per side depending on how hot your fire is and how close it is to the grill. Make sure to get all sides of the meat, including the ends.
- Pour liquid in the aluminum pan (beer, apple juice, or orange juice all work very well, all with subtle differences), then place the meat over the pan. Cover the grill and cook for 30 - 45 minutes until a quick read thermomneter reads 145F. (See Notes)
- Remove the meat from the grill, tent with aluminum foil, and cover with a couple kitchen towels to help preserve the heat.
- Let rest for 10 minutes. The meat's temperature will continue to rise a few degrees, plus the meat will firm up and won't lose all its juices when you cut it.
- While the meat is resting, place a sautee pan over high heat. Rinse the arugula and let drain a bit. Sautee the onions for a few moments in some olive oil. Toss in the arugula and sautee until slightly wilted. Remove from the pan. (See Notes)
- Slice thinly the pork and place on a platter. Cover with the arugula/onion mix and serve.
- Do NOT leave your pork loin out in a blisteringly hot spot in the kitchen, okay? Please?
- I use a charcoal chimney starter filled with briquettes (mine's even cheaper than the Weber). When those are hot I dump them in my grill and pour on a large heap of hardwood lump charcoal. The lump charcoal gives the food great flavor, the briquettes longer lasting heat.
- I have a passle of lava stones in my charcoal grill which are normally used for gas grills. I do a lot of indrect cooking where the meat's off to the side of the coals. The lava stones make a great heat mass, distributing the heat from the coals evenly throughout the rest of the grill.
- Overcooked meat is awful, but undercooked is nasty and potentially unhealthy. Various chefs I've heard have all said 137F is the magic number to kill off the nasty bugs which may live in your cut of pork. The extra temp here is for security, but still leaves the pork nice and moist -- plus the brining helps ensure moistness.
- The bitter arugula or radicchio gives a wonderful contrast to the pork's sweetness. This is an Italian cooking trick I learned from another FoodTV cook: Mario Batali.
- Southwestern variant: Leave out the cardamons, star anise and orange peel. Instead use 1 tsp cumin seeds, 1 tsp mustard seeds, 1 tsp black peppercorns.
- Last bit of TV chef wisdom: Don't panic if you char one side of the meat. Make sure to let the meat rest after removing from the grill. Then use a good, sharp knife and cut the meat very, very thinly. We're talking nearly lunchmeat thin. Having the meat so thin really reduces the impact of any char I mean slightly overdone portion. I learned this from Iron Chef Sakai who I saw once badly zorch a cut of pork. He never let on that he'd overcooked the meat. Instead, he sliced it very thin and got terrific compliments from the tasting panel. Who says TV ain't educational?
Code Metrics Tools
Dave Donaldson posted on NDepend, a good-looking metrics tool. I'm excited about checking it out; hopefully it supports VB.NET as that's what my upcoming project will be in.
A couple other good metrics-related tools which I've found handy:
NCover's got a spate of widgets to go along with it, making it a very handy metrics tool for seeing unit test code coverage.
Other good tools:
- DevMetrics' community edition
- CRPlugin for DXCore. I haven't fooled with this in some time, so I'm unsure of its status. The Project Page has said they'd have more content up in "the next week or two" for the last several months...
Thursday, June 23, 2005
Wal-Mart Wants Your Home
The Supreme Court has decided that your community leaders can evict you from your home in order to build shopping malls and hotel complexes in order to increase tax revenues. The Fifth Amendment, which allows the government to take private land for "public use", has taken a beating in the last decade. Wal-Mart, Costco, and numerous developers have persuaded local community leaders that "public use" really means taking away the home you've been paying for and raising your family in, only to increase the community's tax base.
I doubt that any of these community leaders have evicted themselves from their homes...
(Via Instapundit)
Daily Finds #149
OK, so I'm off by a couple.
All right, I'm off by 148 Daily Finds.
- From Scott Hanselman: some killer music.
- From Eric Gunnarson: A horribly addictive game. Stay away if you value your sleep and sanity. I mean it.
Wednesday, June 22, 2005
Palm 500 Woes
I bought a Palm 500 around four years ago. I'm a cheap SOB and didn't want the flashy colors or extra widgets associated with the higher-end models. Plus I had to buy it out of my own pocket because the company I was with at the time were even cheaper SOBs who didn't seem to think I needed to have any mobile device when I was onsite with customers. (One of the many reasons they're the company I used to work for.) The 500's been a terrific servant and I've had a great experience with it.
Unfortunately, the damned thing's not working well with my new install of Office 2003. The m500 is PalmOS 4.x and DataViz's Documents To Go/Inbox To Go doesn't work well with the newer Office. Well, to be more precise, DTG's latest version works fine, but not v6.x which I have and which is the only version which will run on PalmOS 4x. Crap.
So now I'm going to have to look around for whatever newer low-end model will work with my mishmash of software. Bother.
I'd love to hear any feedback any of my four readers out there might have. What kind of PDA are you using, and more importantly, are you happy with it?
Tuesday, June 21, 2005
Great Tool: MindManager
Ben Carey blogged about how useful Mind Manager is here and here. All the other tips I've gotten from Ben's blog have been great, so I decided to give Mind Manager's demo a try.
Holy smokes. Ben wasn't kidding. This is what Microsoft's One Note wished it was half of. It's terrific for rapidly brainstorming out ideas, organizing them into a sensible map, assigning tasks, and showing interrelationships. I love the visual aspect of it, and I think it's a good start for a Big Visible Chart. I've played with it for outlining a couple book reviews, laying out infrastructure tasks and knowledge building I need to do, plus have started an initial map of a potential project I may be working on.
MM Pro even links tasks from maps into Outlook, so it's a great organizational help for keeping your work straight. I've just scratched the surface of this neat tool. I'm sure I'll find more great stuff in the next couple weeks.
The brainstorming aspect of MM is what really attracts me. I've sat in plenty of BS (brain storming, not the other BS) sessions where I wished I had a good tool for capturing ideas flowing out. MM helps with not only the capture of ideas, but I believe it would be a terrific helper in keeping creative ideas pouring out.
The professional version's not cheap: $350, but the standard version just doesn't seem anywhere close in comparison. I can't foot the bill for Mind Manager until I get some steady revenue coming in, but it's definitely on the list for future tools to buy. Until then I'm stuck with the crappy Mind Manager wannabe One Note which came with my MSDN subscription.
ASP Apps Without Web Projects
I've just started working with Web applications in VS.NET 2003. One big gripe: I hate the mess with Virtual Directories scattering files all over the place.
Thank goodness I picked up a copy of Expert .NET Delivery Using NAnt and CruiseControl.NET by Marc Holmes. I found a gem of a reference tucked in all the other great info in the book: Swapping Web Projects for Class Libraries. None other than Fritz Onion has a Wiki site explaining the steps involved. He also gives a bit of background on why he does web apps this way.
Fritz's hack I mean trick gives you the web component wizards within class library projects.
Much cleaner, much simpler.
Monday, June 20, 2005
Book Review: Wagner's Effective C#
Here's a review I posted on Amazon.com regarding Bill Wagner's Effective C# from Addison-Wesley. The review's been slightly edited from what I posted on Amazon.
Disclaimers: 1) I got this book for free from Addison-Wesley as a regular giveaway for our .NET Developers Group (www.DaytonDevGroup.net). 2) I attempted to get SRT Solutions, the author's consulting company, involved in a software development project several years ago. The project tanked due to customer constraints and other business issues not related in any way to Wagner or his company. End Disclaimers.
Wagner's book is a terrific companion to books like McConnell's Code Complete, 2nd ed., or Kernhigan and Pike's The Practice of Programming because it's specific to C# and hits hard the implementation details of working in that language.
I also think this book speaks to a wide range of readers. Certainly, seasoned developers will blow through this content, fine-tuning their coding methods or starting new ones. Wagner specifically points out how practices experienced C++ developers may use aren't good practices in C#. New developers also can greatly benefit from this book by using it to properly form development habits early in their careers.
There are a large number of typos which really stinks because it needlessly detracts from an otherwise terrific work. A-W obviously had lousy proofreaders for this task.
Wagner's writing is clear, concise, and targeted to helping developers understand the ramifications of various choices when working in the .NET Framework and C# specifically.
Which brings me to a point: Don't skip this book as Just Another C# Reference. It most certainly ain't that. It's a terrific book on specifics for implementation. I also think it's got content which spans the gap from C# to other .NET languages. Not everything's applicable to VB.NET or COBOL.NET (Ick!), but there are still some sound general .NET principles.
Good developers need to understand the ramifications of choices they make designing and implementing a system. Wagner's book is invaluable for this, and it certainly belongs on any C# developer's bookshelf.
Tuesday, June 14, 2005
Legal Guide for Bloggers
The Electronic Freedom Foundation has an interesting-looking guide to legal issues for bloggers. It runs the gamut from liablility issues to FAQs on issues you might face when doing political blog coverage of campaigns. (Thank the reprehensible actions of our federal government, elected and not, for vague restrictions on your First Amendment rights regarding election and political coverage.)
(Via Jeff Jarvis.)
Bread Blogging: Garden Herb Bread
This is is adapted from Electric Bread, a great book full of good recipes for your bread machine. I do a lot of rustic loaves, but it's nice to pull out the machine once in awhile too, although I most often tend to start a batch on dough cycle, have it knead, and then do the final rise and bake in a regular loaf pan.
Without further ado,
Garden Herb Bread
1 1/8 c. water, warm (~90 - 100F) 3 tsp active dry yeast [see NOTES] 1 c. white bread flour 1 c. whole wheat flour 1 c. amarath flour [see NOTES] 2 Tbs dry milk 1 Tbs honey 1.5 tsp salt 2 Tbs butter 1 Tbs minced fresh chives 1 Tbs minced fresh marjoram 1 Tbs minced fresh thyme [see NOTES]- If using a bread machine, pour the water in the dough bucket. Sprinkle yeast on top. Let the yeast bloom about five minutes. If mixing by hand, pour water into a large bowl, sprinkle yeast on top and let bloom five minutes. [see NOTES]
- Keeping aside 1/4 c. of the white flour, add in the remaining ingredients and turn on the bread machine's dough cycle. Keep a close eye on how the dough's progressing, adding in extra white flour so that the dough is barely tacky. If mixing by hand, do the same -- keep aside some of the flour, add the rest of the ingredients and knead for ~10 minutes. I won't go into details of hand mixing -- please see Reinhart's The Bread Baker's Apprentice: Mastering the Art of Extraordinary Bread. [see NOTES]
- Let the dough finish rising in the dough cycle if you're using the machine. If hand mixing, scrape out the bowl, lightly oil it, plop the dough in, roll it around, cover with a plastic sheet and let rise in a slightly warm place for ~60 - 90 minutes until doubled in size.
- Remove the dough from the machine or bowl and place on a lightly floured surface. Gently pat into a rectangle 8" wide. Roll the rectangle up, pinching the seam as you go. Gently plop into a bread loaf pan. Spritz the surface with cooking spray and cover loosely with plastic wrap. Leave to rise until the loaf is about one inch above the lip of the loaf pan. This will take about 30 minutes if you used a bread machine (the dough will be very warm and the yeast very active), or about 60 minutes if you hand mixed.
- Well before the loaf's rising is complete, preheat the oven to 375F.
- When the rising is complete, remove the plastic, and set the loaf in the oven. Bake for 30 - 45 minutes until an instant read thermometer shows 195 - 200F in the center. Remove from the oven, wait five minutes, then remove the loaf from the pan.
- Now comes the worst part. Let the loaf cool completely on a cooling rack. Avoid slicing into the loaf immediately because it's finishing up its baking as it cools. Slicing into the loaf right after it comes out of the oven will leave you with a slightly soggy center.
- OK, you can't wait an hour and neither do I, but at least give it 15 minutes to cool. The bread will still be warm enough to melt some butter or margarine, but will have gotten past the slightly soggy center stage.
- Amarath flour. Good stuff. From an ancient grain (woo, that sounds impressive!), it lends a neat, nutty flavor to loaves. Best used as 25% - 33% of the flour in a recipe. Find it at Trader Joes or better supermarkets.
- Herbs. Try to use fresh herbs, but not everyone's got them at hand. 1 tsp dried (not ground!) of each would work fine, but be sure to smash the dried herbs in the palm of your hands before adding -- it helps to bring out the aromatics in the dried herbs. Cut the measurements to 1/4 tsp if you have ground herbs.
- Yeast. Use a good quality yeast like SAF if you can find it. Fleischman's is fine, but SAF is a wonderful step up. Letting the yeast bloom, or proof, is a critical step in getting the best performance from it, especially if you store your yeast in the freezer.
- Kneading/Mixing. Take care with the texture and feel of the dough if you're used to making rustic breads. Rustic doughs are sloppy sloppy wet wet mess messes. This loaf should be barely tacky at the most, and absolutely not sticky. Add more flour as kneaded. Heh.
Saturday, June 11, 2005
Dayton .NET Developers Group News
Today I had the neat experience of appearing on IT Matters, Dayton's local talk show on 1410, WING AM. Dave Donaldson of the Columbus .NET Developers Group joined me to help publicize the great .NET developer communities we have in Columbus, Cincinnati, and Dayton. (OK, it was mostly to help me publicize Dayton's group.)
Brad Proctor and Bob Kwater took great care of us and provided a terrific venue for pushing the value of joining a .NET developers group. The downside is that the IT Matters show is on Saturdays during baseball season -- normally it's on during prime weekday evening commute time. Still, I'm hoping we'll get a fair amount of interest generated from this show. I'll be continuing to appear on a monthly basis to talk about each month's upcoming topics.
Me big radio star. Ugh.
UPDATE: Fixed spelling of Bob's name. Also, Michele asked for info about the group -- here's the Dayton .NET Developer Group's site. Should have put that up from the first. Duh!
Garden Blogging: Rose Squatters
A robin family built their nest right on the rose trellis by our front door. Last year a family built a nest in the Japanese Maple right in front of our reading room window which was great for our daughter to watch the little babies -- until our cats cleaned out the nest. We came close to felinecide on that day, let me tell you.
This family chose a much better location. Our cats are tough decendants of farmyard cats, but I don't think even they could scale this trellis into the nest protected by the New Dawn's aggressive thorns!
Look closely to Momma Robin's left (your right) and you'll see two beaks poking out from under her protection. Pretty cool!
Garden Blogging: More Roses
Yes, you have to suffer through lots of pictures of my roses. I've worked hard with them. The least you can do is suffer through a few pictures of them. Be thankful my wife's forbidden me from posting pictures of my kids on my blog.
This shot is of my New Dawn climbing rose at my front door. I planted it three years ago and it's really exploded. There's a neat quip about climbing roses: the first year they sleep, the second they creep, the third they eat your house. This one's certainly doing that. In addition to all the growth in this photo, the rose wraps around a corner to the right and spreads over the front of the house as well.
Be sure to check out the next post/photo for an interesting detail of the rose bush.
Friday, June 10, 2005
Recipe Blogging: Carnival of the Recipes #43
Songstress7 has outdone herself with this week's Carnival of the Recipes. I'm there myself with my FrazzledDad Fajitas, but check out all the other great stuff contributed to this episode of COTR.
Check out Beth's site for the complete list of COTRs on the right sidebar.
Subscribe to:
Posts (Atom)