Posts tagged Business
Get a VS2010 Ultimate Experience for Less
3As of writing this blog post, there are thousands of developers converging in Las Vegas for the official release of Visual Studio 2010. I’ve been using Visual Studio 2010 for the a while now and it has been a generally positive experience. While as was exploring the VS2010 site I saw this question posed. “What Edition is Right for Me?” That prompted me to look through the editions. Microsoft has planned to sell for commercial versions: Professional, Premium, Ultimate, and Test Professional. A much smaller selection that the VS2008 editions, but that is a good thing. What shocked me was the outrageous price jump from Professional to Ultimate, from $799 to $11,899; that is over $11,000 difference for one copy of Visual Studio. So this blog post is to show you how to get an Ultimate experience for less, so that you can utilize that extra money for pizza and beers for you development staff.
1.) Visual Studio Professional ($799)
you are going to need this right? So what is missing from Professional that is in Ultimate?
- Intellitrace (Historical Debugger)
- Static Code Analysis
- Code Metrics
- Profiling
a.) Intellitrace ( $0 no alternative )
sadly I couldn’t find something that replaced this feature. It is very cool. Look at it this way though, the fact that Microsoft moved it up to the premium edition makes me think that they feel the common developer probably doesn’t need it. I also rarely used this feature in my own development.
b.)Static Code Analysis & Code Metrics ($410)
so what is static code analysis? Wikipedia defines it as the analysis of computer software that is performed without actually executing programs built from that software. Hmm… this sounds familiar, I think I’ve done that before. Oh wait I have! NDepend is a great static analysis tool that has been around for a while now.
c.) Profiling ( $0 – $500 )
There are a ton of profilers for the .Net framework, and some of them are FREE! In this post I chose the two that a company might buy ANTS Memory Profiler and JetBrains ReSharper.
2.) Testing
So you are a testing kind of developer, that’s great but you want all the extras that ultimate offers.
- Code Coverage
- Test Impact Analysis
- Coded UI Test
- Web Performance Testing
- Load Testing
- etc…
a.) Code Coverage ($479)
NCover is a mature and great tool for code coverage.
b.) Web Performance Testing and Load Testing($0)
The web has been around long before VS2010, so this problem has been solved a million times. Realizing that there are a ton of tools out there to do this and I won’t list each of them. Just Google and prepare to be overwhelmed by the possibilities.
c.) Coded UI Test ($0)
Watin allows you to code tests for UI interaction of web applications, which is probably the hardest interaction to test for.
d.) Resharper ($349)
I have to mention this tool just because it is so good and it improves the unit testing experience inside of visual studio, regardless of your framework.
3.)Database Development
the dreaded database…. how do we handle this stuff?
- Database Deployment
- Database Change Management
- Database Unit Testing
- Data Generation
a.) Database Deployment ($0 – not needed)
In theory this sounds great, but the majority of companies have a company structure that forbids any developer from making database pushes; the job of pushes are usually left to a Database Administrator. They will probably want to execute SQL that they have crafted and labored over.
b.) Database Change Management ($0 – code option)
again this is probably left up to your DBA with a combination of your source control (SVN, Hg, Git, TFS). I recommend looking into a migration framework if you really want to control the versioning of a database.
c.)Database Unit Testing (Whaaaaat? $0)
this troubles me on two fronts. First off you probably shouldn’t be unit testing enough of your database to have a whole project dedicated to it. Secondly, this is what developers refer to as integration tests and you don’t need any other tools other than your favorite unit testing package to do this. Granted, VS2010 probably has some nice UI tools to make this more pleasurable, but in my opinion tests are about results and not how pretty the UI is.
d.) Data Generation ($0)
This is a problem that isn’t that complicated to solve, and again has been solved. Check out AutoPoco which allows you to generate a ton of data easily through a fluent interface. After generation, just go ahead and pump this data into your database with your favorite ORM or DAL.
4.)Architecture and Modeling ($100)
Buy a whiteboard for modeling and get your team involved. There is nothing worse than an Ivory tower architect that pushes his architectural will on the team without discussion.
5.)Source Control ($300)
Unfuddle is a great online source control provider and in my opinion gives you a lot of things your business will use from Team Foundation Server. When I quote the $300, I am talking about for your whole company and not per developer. This is a huge cost savings. There are also a ton of other online source control providers that are similar to Unfuddle.
Tools I have to mention: TortoiseSVN, MsysGit, TortoiseHg, AnkhSVN (all free)
Conclusion and Total Price: $2637 ($2832 less than Premium and $9262 less than Ultimate)
That savings per developer is nothing to joke about. You could save over $9000 dollars but just looking around more. So what is the downside? Well you will have a hodgepodge of tools to use and many of these options might lack UI tools and possibly Visual Studio integration. Do your homework and see if the benefits of buying these tools outweigh your desire to have a all in one tool like VS2010. If you have a team of five developers, I just saved you over $45k. Your welcome.
FluentSitemap: Build Sitemaps for Asp.Net MVC
0Building your site is only half the battle. Getting people to know it exists is the other half. If you are creating a public facing site, or even an intranet that utilizes an in-house search server then I have created a library just for you. The library is FluentSitemap. This library is designed to help you easily build sitemaps to be utilized by major search engines. The great thing about this library is that utilizes all your existing routes and controllers to build a sitemap even for the most complex Asp.Net MVC sites.
The FluentSitemap library can be found at GitHub Here.
How to use you, Let me count the ways
There are several ways you can utilize this library. The first is to specify each node manually. Let’s look at how that looks.
// You can pass in a HttpContext from anywhere
// in you application
ISitemapConfigurator configurator = new SitemapConfigurator(HttpContext);
// create sitemap node and set
ISitemap sitemap = configurator.Create()
.WithLocation("http://localhost.com/")
.WithPriority(0.3)
.WithChangeFrequency(ChangeFrequencyType.Never)
.Set().Export();
The second is to use a controller/action pair.
// You can pass in a HttpContext from anywhere
// in you application
ISitemapConfigurator configurator = new SitemapConfigurator(HttpContext);
// Add From a controller and action
ISitemap sitemap = configurator.Add("Home", "Index")
.Add("Home", "About").Export();
The third is to use a route
// You can pass in a HttpContext from anywhere
// in you application
ISitemapConfigurator configurator = new SitemapConfigurator(HttpContext);
// Add From a controller and action
ISitemap sitemap = configurator
// Add From a Route
.AddFromRoute("Default", new {id = "2"}).Export();
The last is to use the ISitemetadata. This is specifically there for IoC.
public class HomeControllerSitemapMetadata : ISitemapMetadata
{
private const string Home = "Home";
#region ISitemapMetadata Members
public void Create(ISitemapConfigurator sitemap)
{
sitemap.Add(Home, "Index")
.Add(Home, "Scanner")
.Add(c => c.Metadata());
}
#endregion
}
public class OtherControllerSitemapMetadata : ISitemapMetadata
{
private const string Other = "Other";
#region ISitemapMetadata Members
public void Create(ISitemapConfigurator sitemap)
{
sitemap.Add(Other, "Index")
.Add(c => c.Test(1, "dude"));
}
#endregion
}
// An example, you'll probably use your favorite
// IoC container to resolve all the metadata classes
var metadata = new List
{new HomeControllerSitemapMetadata(), new OtherControllerSitemapMetadata()};
ISitemap sitemap = new SitemapConfigurator(HttpContext).FromMetaData(metadata).Export();
There is more API sugar, so go download it and give it a try.
C4MVC Presentation on Database Migrations
0Hello everybody. It has been about a week since I gave my C4MVC presentation on database migrations. The video is below, and the code is also downloadable below.
Asp.Net MVC 2 Quick and Simple Site – v1
0*Note: Asp.Net MVC 2 project in Visual Studio 2010
I sat down last night and was thinking about how I could get a simple starter site up and running for a client, until I could design something more tailored to their needs. There is nothing worse than having a “under construction” page or a “coming soon” page. It doesn’t really say much about what is happening or what might be coming. So I sat down and came up with the basics of what a client might want right from the start, here were my requirements.
- Set a Logo, Name, and Subtitle
- Be able to quickly edit a small about section (Content)
- Quickly add some of the more important social networks (Twitter, YouTube, FeedBurner, Delicious, MySpace, and Facebook).
- Be able to add Google Analytics (Optional)
- A dynamic image gallery (drop images in a directory and everything is done for you).
- Basic contact information. Email, Phone, and Website.
- No external libraries to install (this hurts but is helpful).
So I sat down and started writing. I wanted someone to be able to push this site without editing a lot of files or having to setup a database. I opted to put a lot of the client’s settings in configuration. Yes configuration sections are not the new hotness but they can still serve a powerful purpose.
My first iteration had me using controller actions for each part of the site, but I slowly realized it was overkill. I opted to have one controller action from my index, and then break sections up into partial views that would be all rendered at the same time. Then those sections would be hidden and made visible using JQuery. After a little design, I ended up with this.
Let’s look at how to set this up.
Step 1 – Setup the Configuration
There are some pretty simple configuration sections in the web.config included with this project. You will see two App settings: WorkImagesDirectory and GoogleAnalyticsCode. The WorkImagesDirectory is used to find all the images in your gallery. Thumbnails for all your images will be automatically created if they are missing. The GoogleAnalyticsCode setting should be set to your Google Analytics code UA-XX-XXXX (or something like that). If you leave out the Google Analytics code then the script won’t be output to the page.
Next you will see a ContactInformation section. In this section you can set the name, site subtitle, email, phone, and website.
Finally, you will see a SocialNetworks section. Only the social network usernames you set will show up on the page. You can set Twitter, Facebook, YouTube, Delicious, MySpace, and FeedBurner(a blog maybe).
Step 2 – Setup Content
Once the configuration is done, then you probably want to change some of the content to reflect some good information.
All tabs are separated into partial views: About, Contact, Work, Social. Just replace the HTML content in here with what you want, leaving the nested RenderPartials.
Step 3 – Modify Colors and Images
All the images and style sheets you need to modify are under the Content directory. If you like the color and just want to modify the avatar at the top, just overwrite the avatar.png under Content/img.
Step 4 – Deploy It
Just publish what is there to your hosting provider and you are ready to go.
Conclusion
This is a good little site to get up and running for your clients, but it isn’t anything ground breaking. The code is straight forward, so even a novice can get in there and change things. The point here was not to over complicate the solution with third party libraries. It is to get a site up with in minutes, while still giving some great functionality to the people that need it.
New Year – New Developer
1So we are sitting on what is the precipice of a new year. We can either choose to change and evolve with the times, or we can stay stuck in our ways. I have decided to make some new year’s resolutions to make me a better person and developer.
1. Get Into Shape
As developers we can spend a lot of our time on our butts, up to 8 hours a day. That is why I need to make a strong effort to be active. My definition of active is a solid hour of exercise five to six days a week. Exercise is only part of the solution. Did you know your body expends more calories digesting food then it does when you exercise? That is why I have to make an effort to eat less calories. Now that the holiday season is over, the temptation of gorging is gone with it. And finally, cut out all high-sugar drinks. Developers live off of energy drinks but each can of energy drink can be as much as 400 calories. That is equivalent to the calories found in a bagel! Replacing those drinks with water can cut out a lot of unnecessary calories.
2. Work On My Communication Skills
I can talk to people, but sometimes I don’t fully get my idea across. This can cause frustration on both my part and the listener. That is why I have to work on my communication skills. I will do this by being more conscious of the words I say, listen deeply to my counterpart, and being less abrupt with my answers. I will also be working on my vocabulary. Adding words to my vocabulary can give me a more diverse set of words to express my ideas and intentions.
3. Swear Less
Swearing is a powerful tool when used properly. It can express frustration, anger, and happiness all in a couple words. There have also been studies that show swearing can lead to better rapport between co-workers. That being said, I have to remember that there is a place and time to use certain words and phrases. For example, a holy place is no place to start dropping the F-Bomb.
4. Be More Systematic
I am trying more and more to depend on systems to make me more efficient and dependable. This will help me reduce times where I am just thinking of what to do instead of doing what I need to do.
5. Be More Assertive
Over my life I’ve learned that people can take advantage of you if you let them. They can also mistake your kindness for weakness. Letting the other party know why I won’t do something, or the conditions on what I’ll do given a task will make my life much simpler.
6. Give Love to the People that Deserve It
There are a lot of important people in my life, and some not that important. Giving more preference to those I love will make everyone happier.
7. Read, Read, Read
It’s surprising how much more knowledgeable you get by just reading what other people are doing. So I am dedicating 2010 to reading more.
The year is early and things could change, but for right now these are my resolutions. Do you have any?
No Pain, No Gain? Part 1: Bugs
0I recently listened to Jeremy Miller in the Alt.Net podcast, and I also watched the latest in the NHibernate series from TekPub. The common thread I see between both these things is the act of achievement in your own development life. Jeremy Miller talked about the state of Alt.Net and how he and others can further the cause of the movement. The main message I got was, get your house in order. Knowing who you are and what you do can go a long way in reducing the pain of development.
The TekPub series talks about NHibernate and integrating it into Rob Conery’s Kona project, but Oren Eine said something very interesting. NHibernate is a tool to keep you from doing the grunt work associated with a database. Which is exactly why I purchased the NHibernate series, I want to reduce the amount of time spent grunt working and optimize the time spent adding value.
This series of posts will be as much introspective as it is informative. I will look at things that cause me pain in my day to day development, and also explore methods to alleviate the pain (short of morphine shots).
Let’s start with the biggest area of pain, Bugs.
Bugs
No software developer likes to release code that has bugs in it, but bugs are an inevitable pain every developer will have to deal with. I personally have had my fair share of bugs, but I have always been able to resolve them quickly and effectively. The pain with dealing with bugs can come from two places: the act of trying to preemptively stop them, or the act of reacting.
Stopping Bugs
If you are anal about the code you write, then you probably employ some kind of testing methodology: Test Driven Development, Behavior Driven Development, Integration Testing. All These methods make sure your code works. The pain with using these methodologies is that they require a substantial amount of effort to implement. They require understanding and a time investment that some developers just don’t want to put in. I can’t say I blame anyone for not adopting a testing methodology, it takes discipline and dedication.
There are several test generating tools out there, but few really make the process any less painless. You usually are trading one set of pros and cons for another. The trick here is to build a system of developing tests regardless of tools you use. A system that is smaller in complexity is ideal. Test Driven Development has Red Green Development; a process where you get tests to fail then pass. A small but effective system of writing tests. A solid system can help bake practices in and make you more disciplined.
After understanding why I should write tests, I found that bugs in my code are melting away. It’s hard to make a test pass when all your assumptions are correct but the code isn’t. So am I saying that everyone should adopt a testing methodology? No I’m not, but I do recommend it to those developers who don’t like dealing with bugs later because it can substantially reduce those incidents.
So you’ve spent the time to write tests, but bugs still creep into your code. Time to panic! Aaaaah!
Fixing Bugs
I’ve seen this one too often. A bug is found and everyone goes into fire-drill mode. Managers hovering, programmers sweating, IT guys pushing continual updates. It is like watching a slow motion crash test. The problem usually get’s fixed, but not the best way. In addition, the fix usually introduces more bugs.
The solution here is to understand what is happening. Far too often, companies feel that panic mode is ok but it psychologically drains everyone involved. This can bring morale down and breed resentment amongst groups. Why didn’t the testers catch that major bug? How could the programmers have been so stupid? Why are the managers making me push a solution every 5 minutes? What happened to the order of things?
So how do you reduce this pain. Well I’ve experimented with a few options and found that sandboxing is the best course of action. A sandbox environment that is exactly like your production environment. This might seem obvious but the number one sin that most people commit is, they don’t respect the concept of those environment. A sandbox should be your first and only place you push code. Once you are happy, copy that exact environment over to production. There should never be any code directly pushed to production. Respect the structure you setup and it will help you, don’t respect it and it will come back to haunt you.
Beta environments are also a good way to reduce the pressure of critical bugs. Many application have employed this method with success. Create a clone of your web application/application that is strictly Beta. There is an implied agreement between you and your users that there are bugs and the experience might not be ideal. That way you won’t be surprised when a critical bug occurs, also your clients will hopefully understand why the application broke.
Conclusion
Bugs are a part of our development life. They are present and they will always be there. The best thing we can do is take an approach that makes it less painful in our development lives. Some developers are more comfortable writing tests to preemptively stomp bugs, while others thrive in the panicked environment of critical bugs. I personally feel that I don’t want to let bugs get out the door, so I test everything with a three pronged approach. Unit Testing, Integration Testing, and Quality Assurance.
Aqua Bird Consulting Blog On iPhone
0Now you can read the latest from Aqua Bird Consulting on your iPhone. No more gesturing to shrink, zoom, and pan across the blog. As you can see from the screenshots below it is readable and syntax highlighter is supported. Oh Jeez!! I should really charge my phone.
Timestamp Generator Tool For Migrations
0On my latest project, I’ve started using migrations as a way to iteratively create my database. This helps me focus on features as they evolve. Currently everything is ok, because I am the only one prototyping the system, but I started thinking about the other developers that might work on this project. What would happen when they begin writing migrations. First let’s take a look at how my current migrations look.
[Migration(1)]
public class AddUserTable : Migration
{...}
[Migration(2)]
public class AddRolesTable : Migration
{...}
[Migration(3)]
public class AddLocationsTable : Migration
{...}
Notice how it is simply numbered 1, 2, 3, etc. What happens when multiple developers are looking at the migrations and developing their own migrations. They will want to number their migration the next number in the sequence, which will be cause huge problems when they submit their changes to source control. Luckily the migration framework I am using supports integers of any kind as schema versions. The only consideration is that migrations are executed in sequential order based on the integer. Say hello to my little friend, the Aqua Bird Consulting Timestamp generator.

I hooked up the little utility into Visual Studio as an external tool, similar to the “CreateGUID” tool.

Now anytime I need to generate an integer for my migrations, all I have to do is click that timestamp generator button and the application will come up with a generated integer. The date and time used is UTC, which means you should be ok even if you have team members around the country or even around the world. I also allow you to select the date of the timestamp. In the instance you choose to generate a timestamp from the datepicker, the UTC time will be used of the current UTC DateTime.
Hope this helps other migration users, I compiled this to work with the .Net 3.5 framework.
Visual Studio 2010 Without ReSharper 5.0
1I’ve started a new project in Visual Studio 2010 because I want to take advantage of the new features in ASP.NET MVC 2. The features I am really interested in are Areas and the support of the new client side validation libraries that utilize the Data Annotations attributes. I sat down and set up my new solution as usual. Everything at this point was going great. Rolling up my sleeves, after several minutes of coding the ReSharper 5.0 nightly build started barfing on me. The shortcut keys barely worked and it would constantly freeze VS2010 when viewing Html pages. Ultimately, I realized that ReSharper 5.0 was not ready for VS2010, although it works great in VS2008. Now I was faced with the cold reality of having to uninstall ReSharper, for the greater good of the project. I haven’t coded a project without ReSharper in about two years, but now I am venturing forth until ReSharper 5.0 can catch up with me. Below, I’m going to list the things that I miss most about development life with ReSharper.
1. Development Time Error Checking
Resharper tells you that you’ve made a mistake before you ever compile your solution. It is constantly compiling you application in the background and making sure everything is still gravy. This keeps you from hitting f5 or Ctrl+Shift+B every ten seconds. This has to be the feature I miss the most. This is definitely a feature Microsoft should look into building directly into future versions of Visual Studio. Wouldn’t you like to know that you typed something wrong the second you type it wrong? In addition to finding your mistakes, it places a nice little sidebar to tell you where you can find where you went wrong.
2. Solution Wide Searches for Dependencies
Resharper is really smart about what classes you are using. It can search through your entire solution and add any dependency to your existing project. This greatly reduces the need to right click on a project and click the “Add Reference” option. It even remembers third party assemblies and can add them; assemblies like NUnit or Enterprise Library.
3. Ctrl + Click = Magic
ReSharper lets you hold down the control key on your keyboard and click on a class name, which instantly takes you to the source of that class. Can greatly speed up you navigational abilities.
4. ReSharper Test Runner
ReSharper has a great test runner which runs almost all unit testing frameworks. The alternative for me right now is running tests using TestDriven.Net and Gallio, which isn’t too bad but it isn’t as nice a workflow as using ReSharper.
5. The Super Shortcut Alt+Enter
Alt+Enter, remember that key combination if you want to be a coding ninja. A super shortcut in ReSharper that understands the context you are in and shows you appropriate actions. Want to remove unused namespaces? Move your cursor to the namespaces section of your code and press Alt+Enter. Want to use var instead? Alt+Enter. Want to rename a file to match a class name? Alt+Enter. Want to move a class to a namespace? Alt+Enter. Want to rule the world? Alt+Enter (coming in ReSharper 6).
6. Smarter Templates
If you use code snippets in Visual Studio then you owe it to yourself to look at the templates in ReSharper. You can create really smart templates that include things like namespaces, filename, and much more. This feature has save my fingers countless hours of typing.
Conclusion
I miss ReSharper, but the advantages to using VS 2010 greatly outweigh my selfish need to be comforted by a productivity tool. Until ReSharper 5 becomes more stable I will have to wander the development wilderness alone. Lets hope that isn’t too long.
Business Ideas : Development Mobile
3A requirement for working with some businesses is that they want you to work on site with their development staffs. I personally like that, because in addition to meeting new people I get to interact, teach, and learn a few new things from other developers. The frustrating part is that they usually clients never accounted for outside developers or staff and they always happen to find the smallest, most isolated area for you to sit in. In addition to less than ideal seating arrangments, I have a certain development environment setup for increased productivity, comfort, and overall well being. So I thought how do I keep all the things I like but still give the client the comfort of being on site? Let me introduce the Aqua Bird Consulting Development Mobile.
You probably have some questions that might be running through your head. Let me address some of them.
Why wouldn’t you just get a laptop that you could take to client sites?
That would only address my development environment as far as hardware and software. A development environment consists of a lot more than that. Whiteboards are integral, lighting, office supplies, and furniture.
What about things like internet, phones, and television, and the thing that drives them all electricity?
Anybody these days can afford wireless broadband, Scott Hanselman had a review of one provider and got some pretty decent speeds. Phones…*cough*… everyone has a cellphone right? I could approach television in two ways, I could go through the internet or get a satellite dish. Electricity will be provided by several batteries daisy chained together. If it works to power million watt competition stereo systems, I’m sure I could power some over the counter electronics.
What happens when nature calls?
I’d hope my clients would be nice enough to let me use their facilities; but if they choose not to then I could drive to the closest gas station. This is a vehicle we are talking about.
Won’t you get claustrophobic sitting in a dark truck compartment?
Well I am considering placing windows and sunroof, this would make the compartment feel more open and keep the smell out, especially when dealing with smelly code.
What about multiple developers?
This is a concern, but I find most projects really only need about three to four developers, which a group of developers would easily fit into. They would just have to cut back on the hot pockets and red bull.
I’m still batting this idea around in my head, it might seem crazy at first. but the more I think about it the more sense it makes. Not saying it will happen any time soon, but many successful businesses have moved into the back of trucks and have never looked back. Let me know what you think and if you have any other ideas or questions about the development mobile.



