Tag | TDD Posts

The Chippewa Valley .NET Users Group is holding their first Code Camp on Nov. 8th, 2008 in Eau Claire, WI. I’m one of the presenters, and I'll be talking about XNA. I think it's pretty neat how Doug Rhoten and Dan Krueger (the CVCC planning committee) are providing a Microsoft Technologies track and an Agnostic/Cross-over track. With that, there will be sessions covering topics such as Cloud Computing, Rails, XNA, AJAX-enabled Websites with Java and NetBeans, C++, Real World practices with WPF & ...
As I try and learn about all the available productivity features of R#, I will post what I learn here... for posterity and for anyone who might find it useful. Alt+Insert is used to generate code in the text editor window. If you are in the text editor, it will bring up a context menu to allow you to generate ctors, members and properties. If you highlight a place in the Solution Explorer and hit Alt+Insert, it will bring up a context menu for generating a class, interface or struct in that folder ...
We held our sprint retrospective last Friday. One of the positive items that appeared was the newly introduced AAA style unit tests (Arrange-Act-Assert). I noticed that Jan Van Ryswyck just posted about this style of tests. This is kind of an extension to his post. What we're doing is very similar. There really is added value to this AAA style: Tests tend to become more readable. Test boundaries are explicit. You only test what is under test. You actually design the system first. When the test is ...
Recently, the CEO of Sprint could be seen in TV commercials stating "Technology is only great when you know how to use it." Here is an article that digs a little deeper into this ad campaign. The purpose of the campaign is to highlight Sprint's customer service, which of course is vitally important to any company providing products or services. I am not here to criticize Sprint. In fact, if you read the article, you will see that they are addressing technology simplicity as well as customer service. ...
Well, the first iteration of my new project finished yesterday and the retrospective went well, for our first. Troy led the retrospective and tried to keep us on track with the things he’d done before in retrospectives. It was my first retrospective on a professional project, so I thought I’d share our process. First, Troy hit the whiteboard with three columns: Start Doing, Stop Doing, Keep Doing. These are pretty self-explanatory but I’ll touch briefly on each anyway. Start Doing – Things that we ...
I realize I have been a bit quiet the past few weeks, but we just kicked off the first iteration of a new project at work, so still settling into the project groove. Luckily, the team I am on is outstanding, so there has been good progress made for the first iteration. Now, for the real purpose of this post. I've been a TDD enthusiast for about a year now and have been reading and watching videos about BDD the past few months and I am really intrigued. I have been trying it over the past week (using ...
Today is supposed to be the longest day of the course. I'm wondering if that's realistic. We started a little later than usual because we're all feeling the stupor from sleep deprivation. But hey, you can only learn when you get out of your comfort zone. Pair programming frenzy Right now, we're driving out the domain model design, hitting it big time TDD style. JP spits out the tests. We're writing the implementation to them. There's a healthy competition amongst us. The first to make one test pass ...
Phillydotnet.org 3rd code camp for 2008 will be held at the DeVry University campus in Fort Washington, PA on Saturday, October 11 from 8:30-5:00. Please register on our web site.-->Detailed directions are on the DeVry web site. sold out. There will be another Code Camp in May.--> Lots of code, just say no to slides! 8 hours 50 sessions (8:30, 10:00, 12:30, 2:00, 3:30) 10 tracks including new IT Infrastructure and Enterprise 500 seats with tables (laptops welcome) Free breakfast, lunch, and afternoon ...
http://codebetter.com/blogs... I felt that a pointer to this article is worth while. I have spent a fair bit of time trying to determine what my preference was between MVP and MVC. I tend to lean more towards the MVP side and this article mentions directly why I like it so much more. MVC tears out the state awareness that the standard ASP.NET web forms come with. I spent so many years in ASP classic wiring up form and query string variables ...
There is a good video on practicing test driven development on ASP.NET's website. You can view the video here. If your new to TDD this should be of interest to you. Technorati Tags: TDD,Test Driven Development,Training,.NET LiveJournal Tags: TDD,Test Driven Development,Training,.NET del.icio.us Tags: TDD,Test Driven Development,Training,.NET IceRocket Tags: TDD,Test Driven Development,Training,.NET 43 Things Tags: TDD,Test Driven Development,Training,.NET BuzzNet Tags: TDD,Test Driven Development,Training,.NET ...
For those that weren't able to attend last Tuesday's Northwest Arkansas .Net User Group meeting, 8/5/2008, Zach Young (our Vice President of the group) was able to secure Jeffrey Palermo as a speaker for a special meeting this Thursday (8/14/2008). This is a huge boon, as Jeff is one of THE most sought after speakers in North America. Jeff is most known for the Party with Palermo series of events before each of the major conferences. Jeff hails from Austin, Texas, which was recently named the hardest ...
Leonardo da Vinci, when he painted Il Cenacolo, or as we call it here in the US, The Last Supper, produced studies for the work before he began to paint. Later, when the painting was restored in the 1970s, researchers used infrared reflectoscopy to look underneath the outer coats of paint to find that the original work of art was in fact very different from what tourists had seen for the past few generations - mostly because of the poor showing conditions for the painting, but partly because Leonardo ...
I have looked at others' strategies for arranging projects within a solution, and I have experimented with my own until I cam up with the following (mostly based on my own OCD about organization, but somewhat based on actual development reasoning). I must preempt by saying that I am using the MVP pattern for my projects, so that influences my arrangement somewhat. I will also say that I enjoy using periods in my project names. Mostly because it looks clean to me, but also because I have a need sometimes ...
improve my => 'code' One of the interesting features of Agile development is the regular feedback created by the methodology. Continuous builds, especially when they show graphically when they are broken or have failing unit tests, give Agile teams a sort of self awareness about the health of their project. Many Agile projects even give visual cues regarding the health of the project for instance showing the health of the build through the use of traffic lights (green for good, red for broken). ...
In the application I've been working on, we have the requirement to handle unique constraint errors gracefully. It wasn't really hard, I just had to check for OracleException.Code == 1. The trick was the testing. Testing a unique constraint error was not a problem. The issue is verifying that other exceptions are bubbled up properly. The basic exception handling code is like this: 1 protected bool HasUniqueConstraintError( Action databaseAction ) 2 { 3 try 4 { 5 databaseAction(); 6 return false; ...
Approximate strong classification behaves identical to strong classification restricted to a subset of all classes. Considering the fact that A way to get some of the features of dynamic layout from a layout that was created in absolute coordinates is to scale the UI. In retrospect, sometimes business components need to retrieve information from external sources in order to do their work. The internal mechanisms of what allows user-mode debugging to work have rarely ever been fully explained. Approximate ...
I saw this book in Borders and, when I read the table of contents, I KNEW I wanted to read it. I had just returned from Headspring & Jeffrey Palermo's Agile .NET Boot Camp class in Austin, and this covered a lot of the same things (and a few others), so that made it very poignant. I am adding this book to my must read list. I got through it in about a week. It is VERY easy to read. For developers looking to take their development skills to the next level and are not able to go to Jeffrey's course, ...
Nowadays program and hardware adaptation to take advantage of dynamic changes in behavior is becoming increasingly important as a result of technological trends. The requirement for co-existence is essential for any language claiming to be general purpose. Subsequently, the service agent manages communication between a business assembly and an external Web service. Consequently, A composite service is atomic in nature, but orchestrates the invocation of component services into a business level process. ...
One of my fellow Coders 4 Charity Groupmates, Lee Brandt, will be speaking about Test Driven Development using C# tonight. If you are in town you must come. If you are not in town and you want to come. Well hop on a flight? Anyway, here is the official information *commenses brainwashing tactics*: Topic: TDD Using C# Test-Driven development is a methodology that can help developers write solid, well-designed code. Very few developers practice it because very few understand how it works and how to ...
OK. I've had a few days to decompress. I am still beating on my deck for the TDD presentation tomorrow (actually tonight) for the .NET Users Group. So I have had some time to decompress and debrief my boss about what I am bringing back from the Agile .NET Boot Camp with Jeffrey Palermo in Austin, TX. Man! we actually covered a lot! Jeffrey did a great job of making it seem like not much, but when I got back and started telling my boss about it, there were just TONS of things to talk about. We talked ...
Jonathan Starr joined in the "to var or not to var" discussion that occurred recently with his post "Code Redundancy Is NOT Necessarily Bad". No, I'm not jumping into the ring with this whole var thing. Not much anyway. Ok, maybe a bit at the end, it's all Jon's fault, the text box on his comment section is too small, so I made a post instead, and that lead to me thinking harder about the subject, and things kinda' just took off from there :P In his first post, which I've linked to, he declared: ...
improve my => 'code' I was just reading Jeff Atwood's recent blog article Department of Declaration Redundancy Department He makes the case that writing code without static typing is easier to read, and "Anything that removes redundancy from our code should be aggressively pursued -- up to and including switching languages." My take is "maybe". Say I have a class named Example that implements two interfaces, IFoo and IBar. When I instantiate I have several options when dong so statically. Example ...
One of the common scenarios I find myself in is needing to be be able to mock an object instantiated during the lifecycle of another object. For example, a service object might need to, on receiving one message, create an entity, and on receiving another message, call some method on that entity. The easy way to do this is to make a builder as a service for the object needing construction, and mock out the builder object to return a mock. So, for that service-layer code I'm trying to test... 1: public ...
Our www.Phillydotnet.org second installment of the 2008 Code Camp series will be held at the DeVry University campus in Fort Washington, PA on Saturday, May 17 from 8:30-5:00. Please register on our web site.-->Detailed directions are on the DeVry web site. sold out. There will be another Code Camp in May.--> Lots of code, just say no to slides! 8+ hours 40+ sessions (8:30, 10:00, 12:30, 2:00, 3:30) 8 tracks + lunchtime entertainment 500 seats with tables (laptops welcome) Free breakfast, lunch, ...
Quote: ...legacy code is simply code without tests. - Working Effectivly with Legacy Code - Micheal Feathers I was discussing testing with a friend the other day, mainly Test Driven Development and we got onto the topic of new code without tests and retrofitting them. The first thing that popped into my head was the above quote and the following: Quote: Code without tests us bad code. It doesn't matter how well written it is; it doesn't matter how pretty or object-oriented or well-encapsulated it ...
Last month was a busy month for me. We deployed the first version (beta) of the product I have been working on over the last couple of months. Meeting the deadline with all of the promised features (almost) was critical. However, when you fix the time line and fix the feature set, then something else has got to give. You guessed it, quality. Quality is not just a concern over failures. There is a level of quality in your successes as well. So far, the feedback on the product has been very positive, ...
I am pushing myself down the TDD path. I say pushing because it is definitely a hard row to hoe. I'm not used to the test-first paradigm. I am getting better, but the purpose of this post is to talk about some of the benefits I have reaped from TDD, and help myself (and hopefully others) to learn why test-first development can help you code and your design. Stability Obviously, if you are writing a failing test, writing code to pass the test, confirming this every step of the way and your code coverage ...
Wouldn't it be great if we could just utilize some new methodology or tool out there and instantly insert quality directly into our software? Like, just add *whatever* and *poof* - you get quality! Of course, that isn't reality. TDD will not *guarantee* quality. NHibernate will not guarantee quality. NUnit will not, neither will BDD, or DDD, or any other buzzword that is happening currently. The output of software may be something automating a process, but the process of software development is still ...
As I wander further into the landscape of Test-Driven Development and ASP.NET MVC, I find myself being pounded by tools. The Dependency Injection frameworks like StructureMap, Unity, NInject, Castle Windsor, Pico.NET and Spring.NET. It's also damn near impossible to do TDD without hitting a mocking framework like RhinoMocks, Moq, TypeMoq and NMock. Then, if you're serious about your enterprise-level development, you begin looking at code analysis and documentation generation frameworks. Now maybe ...
As I am learning about TDD and MVC, one thing comes up. How should I arrange my models, views and controllers? Of course, I know I need to set up the models view and cotrnollers folders for ASP.NET MVC, but what view actions should go into a controller? An example may help illustrate my question: In the default project template for an ASP.NET MVC app, you get a HomeController which has to actions in it: Index and About. Should the about really be an action on the home controller? I guess my initial ...
Rob Conery has started posting a series of web casts on building a storefront website with the MVC framework and using TDD principles. Rob has been very forthcoming in that he is *not* an expert in TDD, and he is *not* doing this series as a "how to"...more of a "learn along with me" type of thing, which is great! If you haven't done TDD before and want an interactive way to learn, consider following Rob's series and interacting with him via his blog. Initial Webcast Second Webcast D ...
For someone like me, who has never traditionally done test-driven development, it sucks. It's hard to get used to writing the test first, then when you write your test, it's easy to start writing the code to make the test pass and forget that you're doing TDD and just continue coding. It's also hard to know WHAT needs to be testing and HOW to test everything you need to, at the appropriate isolation level. To add to my frustration, I starting my first fully test-driven project (on my own) and learning ...
I am creating a blog engine. Not because the world needs another, but because there are some techniques I want to learn about and creating this very straight-forward project will allow me to do that. First step was to create the project and start experimenting with Test-Driven Development inside MVC for ASP.NET. I started by searching for TDD MVC and ASP.NET which led me to this article by phil haack. While trying to put together some of my first tests, I had to use a mock object. The easiest way ...
I've been developing with Test Driven Development for awhile now (more in the form of Behavioural Driven Development) both in and outside of work. I've recently started a new job where TDD isn't used and I've been showing the other developers how I use it. If you have ever read a TDD book, you'll know every argument against TDD they have given to me: Adds too much time Not beneficial for the client Makes things complicated It's to be used by people, not machines Bad experience Adds too much time ...
I thought I would take a small moment to introduce myself and give some context around my opinions. I have been developing software professionally for 12 years in consulting, product development, corporate IT, premium Brand web sites and e-commerce. I until recently worked for a well known golf equipment company as the Director of eCommerce Technology. In this role I have worked on a number of ecommerce sites and have learned a great deal about online retail for both new and used products. I have ...
As I've noted before, Dave Laribee was recently interviewed by Scott Hanselman on Episode 104 of Hanselminutes. The reaction that I've seen has been pretty positive from what I've seen. It's great to see the ALT.NET message being spread outside the core believers group. Many people can be turned off after a few discussions on the altdotnet mailing list and not get the real gist of what the group is about. Dave did a great job explaining the core principles of ALT.NET which are: Use the right tool ...
There are some key practices that all Agile developers should be familiar with. In fact, "familiar" probably isn't strong enough. One of these practices is test-driven development (TDD). As one of the most important activities it ironically requires a lot of discipline. What does Red-Green-Refactor mean? Here is a brief description. There are plenty of places to learn about TDD and Refactoring in more depth. Red: write a test (it fails of course) Green: write the least amount of code (the simplest ...
The Rockville .NET User Group (RockNUG) will be holding their next meeting on Wednesday, March 12th, 2008 from 6:30PM-9:00PM. This month, they'll be having a pretty interesting topic on refactoring in C# with Jonathan Cogley. I've had my refactoring and agile boots on lately, so I can definitely relate. I don't know what I would do though without my Resharper 4.0 Nightly Builds... I've had a few issues here and there, but nothing to discourage me from continuing usage. Anyhow, here are the details: ...
http://www.hanselman.com scotths@microsoft.com New web project type for asp.net More control over your </html> Testable framework Not for everyone Master Cheif GU! .NET 3.5 MVC web application template. Options: Enable testing right out the gate. NVUnit or any Unit. No testing option System.Web.MVC System.Web.Extension System.Web.Routing [Namespace] Controllers Models and Views Controller is a base class Index and about public class's {controller/action} Direct relationship. Flexible Fundamental, ...
Scott Hanselman just updated and/or added some terrific screencasts showcasing ASP.NET MVC, which just went wild as Preview 2 today. He talks about some significant changes from the December CTP and walks through several examples that make understanding and implementing the MVC simple, understandable, and (IMO) ultimately sellable to the uninitiated/uninterested. He covers, with great clarity, several methods for displaying data, working with forms in CRUD operations and helper classes that will ...
A while ago, I posted about Behavior Driven Development (BDD) while using the NBehave, and I think I went too far into the tool without going into the whole thought process instead. I've had a series of these blog posts in my head but have been fighting writers block in order to get them out the door. BDD Introduction Anyhow, there has been a lot of discussion around BDD lately on the altdotnet mailing list around the definition and applicability of BDD in regards to Test Driven Development (TDD). ...
Some time ago I wrote a post in which I talk about how you can do unit tests over your text templates using the GAX Host. In that example I used a very simple template which receives just a couple of string properties. But it becomes more complicated when you have properties which are complex types ok I know, most probably you're thinking that can resolve that just creating your own mock objects and you're right. But the thing is that you can do that in a really easiest way using a mock framework. ...
Grrr... Just wasted lots of time on a stupid mistake due to misleading error message. I hate it when that happens. I usually do self-hosting for my WCF services, but on a project I am working on we wanted to host in IIS. I was focused on the security aspects - trying to get Integrated Windows security on a web site, using impersonation to call the service under the client's credentials, protecting the service with Integrated Windows Authentication and turning off anonymous access in IIS. I was trying ...
God I love writing Unit Tests. I either find bugs in code, bugs in my unit tests (darn cut and pastes), or bugs in my head. Let me explain in a second. I like TDD. I also like, TAD (Test After Development) or the one I use the most these days: TASAYC (Test As Soon As You Can) The benefit of using TASAYC, is that you're creating unit tests about code you haven't touched in quite a while. You either write the wrong unit tests because of "bugs in my head", the wrong unit tests because of assumptions ...
Honestly speaking i was never a fan of TDD till few months back, but the more i read on this topic the more i am facsinated about it. Not untill I read Agile Principles, Patterns and Practices by Robert C Martin, where he talks about the relevance of unit test to validate both design and code smell. Okies let me brief out some of the new cool features of xUnit.net Things i liked of xUnit.Net compared to NUnit Single Object Instance per Test Method. No [SetUp] or [TearDown] - replaced by constructor ...
Ok, so it isn't necessarily the most efficient way to spend your time. It is usually better to buy your tools whenever possible, but it is a great way to learn. Of course I am not talking about recreating Nant or CruiseControl. What I am suggesting would be more in the nature of a test harness for integration testing purposes. These are strategic tools that will pay for themselves as you move from development into production support. One area where these harnesses come in handy are integration points ...
I'm still prepping a few posts on F# and Design by Contract (DBC), so stay tuned in the next day or so. But, I recently read through the altdotnet mailing list about conducting interviews and phone screens. Jeremy Miller had a great response to this that I felt needed its own response. I've been interviewing people all throughout my career and I've definitely picked up on things as time goes on, honing the craft as it were. Cloning Myself It's true in the past I've been guilty of wanting someone ...
Recently among other places it was asked on the altdotnet list about the strategies of unit testing with regards to assemblies and naming This message here caught my eye regarding putting your NUnit tests in the same assembly as the code under test. The message states about putting the tests in the same assembly : There are a couple advantages to this approach: The nearness of the files will make it easier (and therefore more likely) that developers will work on the test in tandem with the class ...
Last night was the first user group meeting of 2008, and it was my first meeting - I have blogged about it before, just being the socially inept loner that I am!!, I just haven't got round to going. The presentation was on Test Driven development TDD (Another post coming on that!) from a guy called Craig Murphy - this is a really interesting subject to me as we adopt TDD as best we can, it does however sometimes gives way to deadlines!! It was reassuring to see that we go about TDD in the right way ...
The Tampa Bay chapter of the International Association of Software Architects (IASA) is dedicated to building a community of professionals interested in topics related to software architecture. This organization welcomes all interested professionals. Whether you are a senior enterprise architect at a fortune 100 company or an aspiring architect with only a few years of experience. When: 1/31/2007 6:30 PM - 8:30 PM Topic: The Perfect Pattern Storm, where TDD meets UX and MVP As host of ARCast.TV, ...