I follow @unclebobmartin on twitter and was also getting caught up with his blog posts and have been enjoying his rant-like video posts. I particularly liked this one about Architecture Deference and even tweeted saying so. I found it to be a good pre-cursor to this post on Screaming Architecture which I'm sure came partly as a result of the first.
I've been dealing with issues in some of our apps and haven't been able to put my finger on where they stem from and these posts really seemed to highlight for me what it likely was in the approach that caused these issues. From the running of tests taking too long to too much focus on the aspects that don't really matter and should be deferred, I think I know where many of the issues lie. The only problem now is figuring out how to fix it once it's been done... or is it too late? Would it be too much to decouple the model, or the architecture, from the frameworks and tools to make it not worth the effort? Do we just say lesson learned and take a more correct approach the next time around?
How tired am I? Do I just want to go to sleep in the bed that's made or do I remake it? Can it be remade?
Friday, October 7, 2011
Friday, January 21, 2011
Making Mock Data Fun
While looking at documention for Pivotal Tracker's Activity Web Hook we were looking at the following piece of XML they provide as sample data:
<?xml version="1.0" encoding="UTF-8"?>
<activity>
<id type="integer">1031</id>
<version type="integer">175</version>
<event_type>story_update</event_type>
<occurred_at type="datetime">2009/12/14 14:12:09 PST</occurred_at>
<author>James Kirk</author>
<project_id type="integer">26</project_id>
<description>James Kirk accepted "More power to shields"</description>
<stories>
<story>
<id type="integer">109</id>
<url>https:///projects/26/stories/109</url>
<accepted_at type="datetime">2009/12/14 22:12:09 UTC</accepted_at>
<current_state>accepted</current_state>
</story>
</stories>
</activity>
They also show the following example for creating a new user:
e.g. Name, email, or James T. Kirk (JTK) <kirk@starfleet.edu>
We couldn't help but laugh and think that pivotal must be a fun place to work. While discussing other types of funny mock data we'd seen both in our own office and elsewhere we had the thought that having fun mock data could help get developers more involved with testing.
In my experience most developers dislike creating data to test with. I'm not talking about making mock objects but making actual test data that mirrors what you'd expect to have in a real system. It's tedious and not very fun. Nothing beats real data of course, however, a good set of mock data makes it much easier to test an application either manually or in some automated CI system so it is definitely something you want to have when developing an application.
Tuesday, July 6, 2010
Switching to PivotalTracker
For our SCRUM development we have used a variety of tools to plan and track our work.
Mingle
We used Mingle for a long time but found that because it is so customizable it makes it very easy to overcomplicate your project and process. We also spent a large amount of time configuring, setting up and tweaking mingle to create the ideal project template. Mingle is also very slow and seems to require a server with a huge amount of resources to run smoothly.
Scrum Ninja
Scrum Ninja has a lot of nice features and seems to be going in the right direction but it was very glitchy and we even lost some data at one point. We were able to get most of it back through their support but it was definitely a hassle. Searching didn't work very well and although the card wall view is a nice idea it can be hard to read. The export format is relatively useless leaving out important data like dates. It wasn't even worth trying to parse the exported text with a script to extract what we wanted.
Pivotal Tracker
Pivotal has done a very nice job with their Tracker product. We first tried at the same time as ScrumNinja and first impressions left us feeling it was more restricted or had fewer features in some areas. We gave it another go and now realize it has a much simpler interface that we've found frees us up to just work on the project rather than spending time setting it up in the tool. It has several integrations with other projects and an open API for custom integrations. We've also made suggestions and bug reports and had very quick responses and fixes. It also uses csv as an export format. All in all we're very happy with Tracker so far. Plus, it's free.
Mingle
We used Mingle for a long time but found that because it is so customizable it makes it very easy to overcomplicate your project and process. We also spent a large amount of time configuring, setting up and tweaking mingle to create the ideal project template. Mingle is also very slow and seems to require a server with a huge amount of resources to run smoothly.
Scrum Ninja
Scrum Ninja has a lot of nice features and seems to be going in the right direction but it was very glitchy and we even lost some data at one point. We were able to get most of it back through their support but it was definitely a hassle. Searching didn't work very well and although the card wall view is a nice idea it can be hard to read. The export format is relatively useless leaving out important data like dates. It wasn't even worth trying to parse the exported text with a script to extract what we wanted.
Pivotal Tracker
Pivotal has done a very nice job with their Tracker product. We first tried at the same time as ScrumNinja and first impressions left us feeling it was more restricted or had fewer features in some areas. We gave it another go and now realize it has a much simpler interface that we've found frees us up to just work on the project rather than spending time setting it up in the tool. It has several integrations with other projects and an open API for custom integrations. We've also made suggestions and bug reports and had very quick responses and fixes. It also uses csv as an export format. All in all we're very happy with Tracker so far. Plus, it's free.
overcomplicating things with the repository pattern
The Repository pattern was used in a project by some team members 6 or so months ago and it's being mentioned again along with concepts of an Aggregate Root in discussions on refactoring another project. Both of these projects were C# projects using LINQ to SQL. While working on the first project I kept thinking that the repository pattern seemed to just over complicate things and I couldn't see what real benefit it brought to a fairly simple application. Now, I've done some further reading on Aggregate Roots and found ties to the repository pattern again. As I read through several definitions I kept thinking that the main benefits are already provided via LINQ and implementing it on top seemed to only add another abstraction layer. I did some more searching on the subject and found this article: Repository is the new Singleton and it just echoed everything I was thinking.
Creating a repository for data that is already in your DB is overkill when you are using LINQ (and likely any modern ORM) for accessing that data since the data access provided by LINQ is itself making use of the repository pattern . A good place where the repository pattern would be useful is where you may have different sources of data.
Here is another interesting article about the Purpose of the Repository Pattern that talks about some of the issues when using this pattern along with LINQ. The DataContext issues he mentions exist generally in a Web Application built on LINQ and not just when using repositories. Our team got around some of the DataContext issues by using a DataContext Factory that we found that creates a scoped DataContext within the HttpContext and while within the scope of the HttpContext it always returns the same DataContext. This helps keep anything within the HttpRequest in the same Unit of Work. It was also written to work within the current thread if a HttpRequest is not available (a non-web app).
Creating a repository for data that is already in your DB is overkill when you are using LINQ (and likely any modern ORM) for accessing that data since the data access provided by LINQ is itself making use of the repository pattern . A good place where the repository pattern would be useful is where you may have different sources of data.
Here is another interesting article about the Purpose of the Repository Pattern that talks about some of the issues when using this pattern along with LINQ. The DataContext issues he mentions exist generally in a Web Application built on LINQ and not just when using repositories. Our team got around some of the DataContext issues by using a DataContext Factory that we found that creates a scoped DataContext within the HttpContext and while within the scope of the HttpContext it always returns the same DataContext. This helps keep anything within the HttpRequest in the same Unit of Work. It was also written to work within the current thread if a HttpRequest is not available (a non-web app).
Tuesday, February 9, 2010
Is the industry moving away from Agile?
I don't think so.
I'm writing this in response to a link to this article on slashdot that a friend sent me asking the question which I've used as the title for this post. (The slashdot article references this blog post which is a good and informative read in itself and I found I agreed with many of his points. What starts as an emotional rant turns into a very well presented article.)
There isn't just one way of doing development or just one way of doing agile; hence the name agile. I thought the first poster on slashdot hit it on the head especially with his comments about having the right people and making adaptations to your business.
The author leads into the article complaining about agile but later talks about how many other methodologies can also be successful. The important thing in my mind is picking the right approach for the job (or team even; some methodologies only work with a certain type of people) and also understanding that methodology properly. In fact, the understanding must come first to be sure that you do pick the right approach for your team/project.
The author made a good point about how some people use the words "agile" and "scrum" interchangeably. It is my opinion that these are the teams that fail at agile. It could be that some see agile as being less structured and as a result end up thinking there are fewer rules and less accountability. An agile approach may give the developers more leeway and freedom but with that comes more responsibility. My experience has shown that a junior team usually cannot succeed in these circumstances. They typically will not have the experience required to make the design and implementation decisions that are usually made by someone else in a different model. It's been a challenge to overcome with some of our teams.
We use SCRUM outwardly but also take the XP approach mentioned by Kent Beck in "Extreme Programming Explained" and implement changes slowly. We reflect each week in our sprint retrospective on how those changes helped/hindered us and we also talk about new ideas and ways to improve our process. Yes, we follow a scrum model but one that we have adapted to our needs. We also know that it is more than just doing this list of things and then we'll have it right. We know that the business needs change, the business itself changes and that we need to be able to change and adapt in order to keep pace. I feel that with the right mix of people and support from management agile can be very effective.
Although we don't do game development where I work, I had previously found this pdf about lessons learned implementing SCRUM at Bioware and one of the key things I took from that was that they also ended up adapting SCRUM to their own needs. I think this is key to success with any methodology; being able to take what works and adapt where you need to.
Subscribe to:
Posts (Atom)