Project home: NStun

 Frog's Brain News Feed 
Monday, May 26, 2008  |  From Frog's Brain

Moved to here.

Friday, August 17, 2007  |  From Frog's Brain

I don't think it is a coincidence that my favorite development tools are so well documented. The only reason they kept my attention long enough probably has more to do with their level of documentation than their level of "coolness".

Direct links to documentation for some of my favorite tools.

Thursday, July 26, 2007  |  From Frog's Brain

Handy guide that I've perused once or twice for tips on formatting strings in C#.

String Formatting in C#

Thursday, July 26, 2007  |  From Frog's Brain

There are a lot of reasons typically given for software projects failing, poor management, lack of requirements, and lack (or excess) of talent are common reasons I've heard(used) for failed projects that I've witnessed(particpated in).

Coding Horror has an excellent article that presents 3 alternative reasons that projects may fail that might not be intuitive at first.

Will My Software Project Fail?

CH presents three new pillars of successful software projects.

  1. Version Control
  2. Work Intake Management
  3. Build System

These are three things that I've lobbied for in every project I've ever worked on, even when I couldn't articulate what I wanted because I hadn't yet seen it in action.

Tuesday, July 24, 2007  |  From Frog's Brain

Regular expressions are great. Little strings of yummy helpfulness.

Here's a little regex that can be used to trim all some or all of your trailing whitespace.


Just pass nothing for the replacement.

Monday, July 23, 2007  |  From Frog's Brain

  1. Log off

    Don't stay logged into shared machines, log off when you are done. The performance overhead of multiple logged in users is bad enough when we're all working, but do we really need 4 instances of ScrnSve.exe running too? Also, if you're logged in but unavailable then managing the machine is more difficult if a reboot needs to be done or other system maintenance. And for Knuth's sake, please don't stay logged in over night.

  2. Disable the screensaver.

    Sure, we can't be constantly logging in and out, there are times we will be working for extended periods of time on the shared server and may be pulled away during that time. No sense in running another application whose only purpose in life is to burn cycles and render pretty pictures when no one is looking.

Monday, July 23, 2007  |  From Frog's Brain

TextPad is my text-editor of choice. It's simple, fast and lightweight. Plus it supports regular expressions and wildcard searches.

When preparing a post for upload onto the site I often need to replace the leading whitespace with HTML encoded whitespace. This replacement will have to be run for leading whitespace character you wish to replace, but don't worry TextPad will let you know when there are no more replacements to be made.

Inside the TextPad Replace dialog ... (Don't copy the quote marks!)

Find what:  "^\(\(&nbsp\;\)*\)[[:space:]]"

Replace with:  "\1\ "

To restore the whitespaces use the follow expression.

Find what:  "^\(\([[:space:]]\)*\)&nbsp\;"

Replace with:  "\1 " <-- Notice that there is a single space character after the \1.

Thursday, July 19, 2007  |  From Frog's Brain

Just taking another peek over to the the Sun's side of the Sun/Microsoft fence and checking the color of their grass.

Another tool for testing the reliability of your tests is Jester. This tool will actually tweak your code as your unit tests are executed to see how well the tests hold up to changes.

There's already a C# port named Nester. I'm definitely going to try to integrate this into my CI process.

I have to admit, this isn't going to be funny (heh, wocka-wocka-wocka) the first couple times but it'll be interesting to see where it takes my code.

Thursday, July 19, 2007  |  From Frog's Brain

Just reporting on untested code is nothin'. How about a tool that *removes* untested code.

Check out the oh-so-provocatively named coverage tool, Guantanamo.

When Guantanamo detects untested code it will actually remove it from a working copy of the codebase. C'mon, if you want to move from the foo-foo world of XP and into the hardcore world Mountain Dew level of extreme it should remove the code from source control. Currently the tool is only available in the Java world, but with most of the XP tools stack (ant, junit, cruisecontrol, jcover) will eventually find it's way into the C# world.

If you're wondering about the quality of your unit tests, and are in the Java world, check out Ashcroft. The same guy who gave us Guantanamo also created this tool for analyzing your unit tests. By checking your tests against a set of guidelines your testing practices become more focused and streamlined.

They are building a 10 Commandments of Unit Tests, here's a direct quote from their site.

  1. I am the class being tested. Thou shalt not test any other class but me.
  2. [Thou shalt write isolated tests]
  3. [Thou shalt not access files during unit tests]
  4. [Thou shalt not write two tests which depend upon each other]

This is good stuff, and I'm looking forward to more of these kinds of tools in the .NET world. Sure we have VS.NET and it's a great tool, but it seems like everything we have is clones of stuff from the Java universe. Are there any tools really unique to .NET that didn't originate as a direct reimplementation of a Java tool?

Saturday, July 07, 2007  |  From Frog's Brain

Streamripper is a plug-in for WinAmp 5.0 that will allow you to save streaming music to disk. Simply download the latest version and run the installer. When you start WinAmp an additional window titled "STREAMRIPPER" will be open as well. While listening to a stream that you want to record, click the start button in the Streamripper window. StreamRipper will beging to save the files in a folder on your desktop by default. To change the location of the save folder, click the config button in the Streamripper window, select the File tab and change the output directory to wherever you want Streamripper to save to.

A thorough tutorial on how to use Streamripper with WinAmp can be found here.

Saturday, July 07, 2007  |  From Frog's Brain

DotNetKicks is a social bookmarking site, kind of like Digg but targeted at .NET developers. The stories are moderated using a democratic system where articles get votes, called kicks. The more kicks you get the higher up you move in the story hierarchy. When a story is submitted it starts in a pending stories queue. If you get enough kicks your story will be moved from the pending stories queue to the front page. This might all sound like fun and games but what really perked my ears up was their integration with Google's AdSense to earn money for submitted stories. DotNetKicks will split 50% of the ad revenue for clicks through to stories you submit. Nice.

The trick is getting submitted, if your readers aren't aware of DotNetKicks they won't know to submit and/or Kick your articles. You need a way to let them know about the site, but without being crass about it. I didn't want to manually submit my post every time I blogged, so I used Blogger's template system to help do it for me.

<p><a expr:href='"" + data:post.url + "&title=" + data:post.title' expr:id='data:widget.instanceId + "_kickit"'><img expr:src='"" + data:post.url'/></a></p>

I created a tag that I inserted into my Blogger posts template that will automatically display the number of kicks the article has received so far. If you click on the link and the story hasn't already been submitted you will automatically be redirected to DotNetKicks article submission page with the link and title already filled out for you. If the story has already been submitted your vote will be added to the kicks counter.

To add the tag into your post template go to the Template tab under your Blogger accounts Customization section. Select "Edit HTML" and check the "Expand Widget Templates" check box. Scan the template until you find a line that looks something like "<p><data:post.body/></p>". That is where the Blogger templating engine inserts the body of your post. I inserted my tag to appear directly below the body of my posts but you can play around with whatever position you like by using the "Preview" button. You'll have to save the template to apply the changes when you are satisfied.

PS, I used the above steps to post this article to DotNetKicks.

Saturday, July 07, 2007  |  From Frog's Brain

Sure, I can code with no pants on. But if I'm working on a team it's better if I put on some nice slacks.

Thursday, July 05, 2007  |  From Frog's Brain

I just got back from seeing the Transformers movie. All I have to say about that is, "Mr. Bay I am sorry for doubting you." This is what summer popcorn adventure movies are supposed to be. Simple, straight-forward action, driving music and just enough humor and light romance to keep it fun. And gigantic robots smashing the shit out of each other.

Personally, I have quite a history with the Transformers franchise. The first thing I ever purchased with my own money was a first generation Optimus Prime. I had to do chores at my father's truck shop for several weekends before I saved up enough money. $13.00 American. As with all children's fancies I eventually traded him for a new Rodimus Prime around the time of the first Transformers movie. Big mistake, Rodimus was never as much fun as Optimus.

I'm pretty sure I did more than my fair share of whining and wheedling whenever my mother got too close to the toy section, but my biggest showdown with my mom was over the Transformers movie. We were at a Jewel that had a video rental center towards the front of the store that was carrying the object of my desire. I don't recall the entire event completely, but I'm sure it went something like this. As my mother entered the cashiers line to pay for our daily bread when I began my attack. She was informed of the movie and just how important it was, but she resisted. As she packed up our groceries and moved out towards the door I realized the object of my desires was not in our possession, I became frantic. I remember stomping and crying and yelling that I was being abused and she probably didn't love me or care about me. She kept her will and I didn't get the movie that day, but I like to think I put up quite the scene. I have to admire her fortitude, I was quite the showman.

Autobots, transform and roll out.

Tuesday, July 03, 2007  |  From Frog's Brain

Small Solution Structures

If the project space is small I'll just name the folder and solution to match the fully-qualified namespace.




Larger Solution Structures

If the solution directory tree is very deep or there are many projects are under the root namespace I will break the solution folders up to remove redundant uses of the root name.




This will help keep to avoid errors when a path can get too long and wreak havoc with some source control tools.

Project Structures

The project names will follow suit, leaving out the name of the solution.





The exception is that the project output will be the fully-qualified name of the project. This makes identifying the assembly easier and prevent collision of names like Library.dll.

Folders Not Divided By Namespace

Inside of projects I try to follow the same structure but if a folder is not to be included in a namespace or I want to group some files without changing the namespace structure I will create a folder with a "_" prefix.





All files inside of "_" prefix folders are considered to be in the same namespace as their parent folder.

I've tried variations of these structures but will be implementing this as the standard structure for all projects I am responsible for in the future. It's the cleanest and easiest to manage layout I've worked with and has grown from experimentation over a couple years. So, if you look at some of my code and it doesn't already follow this pattern it will eventually.

Tuesday, July 03, 2007  |  From Frog's Brain

I get all verklempt over automated builds. The usefulness of scripting your builds and running them on an automated system cannot be overstated. Period.

Preventing bloat and keeping your builds in sync with the code base is difficult if you don't keep them close. Typically code will be split into separate files to make it more maintainable, build files are no different. I've found that a single build file for anything but the simplest project can grow very unwieldy quickly but by keeping only one coordinating build file at the solution level and splitting the builds up by project, automated builds can be easier to implement and manage. Also, by keeping the files alongside the code they are the building the builds stay in sync with the code they are building.

For example, I have a solution containing 3 projects. One is an executable, two are libraries. The folder structure and the naming of the solutions typically follows the structure of the namespaces.

Let's work from a root folder named 'source' sitting on C:.


Inside of here I have a solution folder named FrogsBrain.MyFancyPants, the solution will match the name of the folder.


I'll go ahead and add my standard folder to hold my master build script.


The primary concern of this build file will be to call the project builds in the correct order and perform any global configuration for those projects.

Now I will build the project folders.


And this too will contain a folder for it's respective build file.


The pattern will be repeated for the other two projects.


VS.Net Solutions can hold items that are not inside a project. Unfortunately, whenever you just add a Solution Item, VS.Net will ignore the folder structure and link to the item directly underneath the solution name. To imitate your physical folder inside your solution, add a new Solution Folder and name it '_build' to match your physical folder, then add the master build file as a Solution Item inside that folder.

Now your VS.Net Solution will look like...


Now your build files will be added to source control and versioned alongside the code they are building. This will make executing automated builds easier because the location and naming of the build files will be standardized, making the process easier and more repeatable.

Tuesday, July 03, 2007  |  From Frog's Brain

I have really enjoyed using SourceGear's Vault source control server for all my personal development needs for quite a while and I have been nothing but happy with them, I need to expand my horizons.

What I really like about SourceGear, aside from their excellent products, is that they seem to really get how to cater to the small, independent software developer. By providing a free single-user license they put themselves within reach of the developer who could not otherwise afford their product. They also are owned by an individual who really seems to know how to communicate with developers on their level. Through his blog about the daily issues of his software firm and excellent book, Business of Software, which I own and recommend picking up. Also, they support developers desire to extend their products with an automation API and a set of NAnt extensions.

But comfort breeds complacency. I need to try new stuff and see what's out there.

The world of source control tools has seen a surge of growth and even better, competition over the past couple years. The list of actively developed source controls tools, that are within the reach of a mere mortal developer, has grown tremendously and the choices are all very attractive.

So, I've decided to play around with a couple vendors that have licenses that appeal to me. So here's a brief description of what I want in terms of features and licensing.

Cheap, or at least reasonably priced, since I'm not writing packaged software for sale at this point, I'd like a vendor who has discounted licenses for open-source software developers and teams. I like to constantly merge/check-in my code to the repository so having to break flow by leaving the comfort of VS.Net is not desirable. Also, I don't like having to memorize the command-line utility, I am a GUI brat and although I've worked with services and console apps for years I prefer managing the server via some form of GUI, web-based or standalone application doesn't matter. There also needs to be the ability to integrate with CruiseControl.NET and NAnt. Also, labeling needs to be easy, branching and merging of branches should be simple operations. The creation of repositories and working structures needs to be painless. Checkins needs to be atomic and transactional, individual pieces of changelists need to be easily rolled back and commit failures cannot corrupt the repository.

I know that my needs are very MSDevcentric. Hey, it's my list, if you want stuff for whatever platform you work in then that's your wish-list. So basing my requirements off that list I've looked around and have picked a couple tools that I am going to evaluate and report on before I decide whether to just stick with Vault or begin using another tool for my everyday use.

  • Perforce

    Very attractive open-source developer friendly licensing. An excellent book that covers Perforce as a tool is The Build Master which I own and have read.

  • Subversion

    CollabNet binaries, can't beat the license, FREE! I don't own this one yet but will be ordering it from Amazon. Version Control with Subversion

  • Visual Source Safe 6/2005

    From personal and painful experience, "Blech". I inherited it at my job but it's better than everyone working off a shared folder.

  • SourceGear Vault

    What I currently use, but will list it's merits. Vault is also covered in Coder to Developer, which I read cover-to-cover but then gave away as a gift to an excellent Agilist developer when he moved on to another company. Also, I think it's where I first heard about Vault.

  • Team Server

    I love me some CodePlex, best place for MS-based OSS projects I know of but I'm going to focus on the SCM aspect.

  • Surround SCM

    The current likely candidate for replacing VSS at work.

As I work through the different tools for the next couple weeks I'll update on my experiences using those tools in my day-to-day development tasks.

Thursday, June 28, 2007  |  From Frog's Brain

Every wonder what career a character like Cartman might gravitate towards when he grows up? If you said Project Manager then you probably work as a developer too. Pushy, whiny, demanding, self-centered and glad to criticize you while you are working.

Well, the trick is to assert your dominance and become the alpha dev of your team. Not that you want their job, just that you need to assert that you are a confident professional. But unlike Cartman's mom, you can't actually pinch your PM's in the neck. What you can do is assert your own authori-tay.

If your PM has as much willpower to control work intake as a greedy little piggy then you need to take action. Tsst! They need to flip the words around in their title and learn that if they don't want to look bad they need to "manage projects". It's not your fault they promised that the invoicing changes, website updates, database optimization, customer xyz's customizations and anything else they see lying on the ground while walking to their desk, would all be done by Friday; it's theirs. Sit down with them, list the projects they want to accomplish and figure out what you can finish by Friday. Then work out what it will take to accomplish the entire list. They can then take that to whoever they swore their first born to about that Friday deadline and take their lumps. Don't work overtime just because they cry "but maaa-aam, I want you doo eet, whaaa!". You are only reinforcing negative behavior. Overtime should only be allowed in the case of actual emergencies and by emergency I mean that space aliens and the government are somehow involved.

Pretty soon they will get used to actually working WITH you to plan their projects. And with patience and proper manager training, you will win the war and find yourself in an agile shop without a single shot being fired*.

*Or you'll be fired. This is insanity, I am an insane person. If this works for anyone then they should get their own television show.

Thursday, June 28, 2007  |  From Frog's Brain

Basically it's the George Costanza model of software development. The only requirement is to know the vocabulary, not that you need to know what the words mean though.

For example.

Agile says to not have constantly changing priorities while expecting your developers to change on a dime.

Clumsy says, the more projects the better, what else are the developers going to do with their time? Test, bah!

Agile says to keep meetings to a minimum.

Clumsy says that whoever passes out from lack of oxygen first wins.

Agile cares about the developer's quality of life and acknowledges that it is important for the long term success of the project.

Clumsy says "Whip the horse until it's dead." (This I have on reliable hearsay was an actual statement made by someone with a very fancy title and doors on his office.)

 Frog's Brain News Feed 

Last edited Apr 6, 2007 at 6:38 PM by frogsbrain, version 3


No comments yet.