Wednesday, 31 December 2008

Agile Planning - Prioritizing Features

I attended Giora Morein Agile boot camp course yesterday and during the day Giora (while talking about Agile Planning) has shown the following diagram: He then asked the class what would they think should be the best order in which to tackle the given features. Several answers were given and all of them started with the "Low Risk- High Value" category. I cant say I was too surprised by this. People, especially developers, have a tendency to first pick up the "low hanging fruits". Their natural reaction is to fear risks and go for path of least resistance (I've touched this subject in a previous post:Cost of Change – The Fear Factor). However the "responsible" answer, would be to start out with the "High Risk - High Value" category and...

Design For Testability - Lecture

On the 14/1 ill be giving a lecture for the Nes Tziona user group. The title for the lecture is Design for Testability is a fraud - TDD is easy! and will deal with the myth that user code must be designed in a specific way in order to make it testable. The complete lecture abstract with more info can be found here....

Wednesday, 17 December 2008

Code snippets for Isolator

I've worked a little with the AAA syntax of the isolator and after writing a couple of tests I felt the need to add some snippets to make things go faster. So here a couple I found useful. (In order to use just copy each xml code into a .snippet file and use the snippet manager to import them) The first one is for creating faked instance: <?xml version="1.0" encoding="utf-8"?><CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> <CodeSnippet Format="1.0.0"> <Header> <SnippetTypes> <SnippetType>Expansion</SnippetType> </SnippetTypes> <Title>Typemock Fake</Title> <Shortcut>tf</Shortcut> <Description>Create a fake instance</Description> <Author>Lior...

Tuesday, 16 December 2008

New Mocking Frameworks (C++ and Java)

Over the last couple of months (maybe half a year) there's a big discussion whether TDD/AUT is here to stay or is it just a passing fashion. I cant predict the future and as much as I believe in these concepts, only time will tell. However, since I'm paranoid by nature, I'm always on the lookout for indications that TDD is here to stay. A strong indication for me is the creation of new tools to help and simplify the writing of unit tests. I don't know if this is a pure incident or if someone up there is orchestrating all these but during the last week I was introduced not to one but to two new tools out there. Both of them are new mocking frameworks. The first one is a a mocking framework for C++ released by no other then Google! (named GoogleMock) this framework complete the unit testing...

Sunday, 14 December 2008

Windows 7 - Testing Aid.

Automating GUI testing still represents a big challenge for us. In fact I haven't seen a good affordable solution that will help in fully automating them. And where there is no automation what we left with are manual tests. Sometimes however help comes from places you least expect it, during a preview session for the upcoming Israeli Developer Academy III, Alon has demonstrated some of the new features that will be included in the new Windows 7 OS. What caught my eyes was a little application that Microsoft has included in as part of the OS which is called "Problem Steps Recorder". This application focuses on helping users produce detailed reports about steps taken which resulted in a defect they wish to report. now what is the connection? Simple, part of the problem with manual tests is...

Thursday, 11 December 2008

If its too hard - do it more often.

During a panel in the latest Scrum gathering, a question was raised regarding how deliver a potentially shippable product each sprint if it takes 3-5 days of stabilizing the product to get it to a release level. Its a relatively common question which has various answer, however Scott Ambler has given it a gem of an answer(in my opinion at least). His answer went something in the spirit of: if it takes you that long then you must do it more often, in fact keep on doing it until you learn how to reduce the time that needed for stability. This somewhat relate to a previous post of mine,  Cost of Change – The Fear . Investing the effort to fix pains that we learnt to live with is always a low priority. In fact the bigger the pain is, its harder to fix so it slips down the list. After...

Sunday, 7 December 2008

Distributed Card Meeting

I'm a big fan old low tech tools when it comes to meeting and information sharing. There's nothing more informative then a plain white board and nothing more useful then a bunch of sticky notes when trying to plan something. There are times when these tools are not optimal, usually this happens when all the participants are not physically present. In such cases try using CardMeeting, its a "whiteboard sharing" application that give imitate the behavior of a board and notes just done on a virtual wall that can be seen distributed places. On the up side the setup is very easy the use is very intuitive and it does keep it very simple. Also, the data can be exported into an excel sheet for future usa...

Monday, 1 December 2008

Scrum Master Certification

I'm proud to announce that I have finished my formal Scrum Master training and I'm now a full pledged Scrum Master. Its a big deal for me since being in the job of helping other integrate agile practices into their development process, the training really helped me sort things out and put them in the right prospective. Here are some pictures from the training sessi...

Wednesday, 26 November 2008

CPPing in .NET

I've talked about the trend of developers to use ready made solutions. The idea is simple enough. There is no need to reinvent the wheel. Almost every problem a developer encounters, someone else has already coded a solution. When taken to the extreme, we end with a development technique which can be termed "Copy Paste Programming" (CPP in short). Like anything in life there's a risk involved in this. In many cases code produced using this technique is less understood then code developed from scratch. And in most cases (I have seen) the ready made solution solves a slightly different problem then the one it is applied to. Which at the end leaves us with a piece of code that almost works but we don't know why. Its not that I'm against using other people code. In many cases its the most...

Capability of a Developer

Sometimes in life you join a discussion expecting the least, but surprisingly enough profound wisdom can be found in the least expected places. In a five minutes talk I heard a very wise man give a very good analysis of what is capability. It translate to something like this: Capability of a person is a combination of two elements The "body", which dictates the true ability/talent of the person. The "spirit", which dictates the will of the person. Taken to our domain, a developer capability will be a combination of the his technical knowledge(talent) and his motivation (will). When I want to increase a developer capabilities, I can either try to help him increase his technical know how, or try to help him on his motivation side. For best effect I try them both. ...

Monday, 24 November 2008

Outlook 2007 Hanging

Yesterday, I got into a battle with my outlook (2007). It all started after I received meeting invitation from a friend. Harmless enough isnt it? WRONG!!! When I first tried opening it, my outlook just froze on me. Being used to software crashes,  I terminated the program like I do every time. However for some reason, that stubborn message kept on freezing the outlook each time I tried to open it, and if that's not enough trying to delete it also made outlook freeze. It took me a couple of hours to try various things, but every operation that I tried on that message froze up outlook. I got so desperate so I even tried looking on the net for PST manipulation tools, that will enable me to hack in and make the message go away. (BTW I didn't find any) At the end however, I got lucky....

Tuesday, 18 November 2008

Documentation in an Agile Process

One of the more common misconception about agile is to think that it means no documentation. In the original Agile manifesto we can find that we value: Working software over comprehensive documentation For some reason people mistook this to mean that documentation has no place in an Agile process. In my opinion this is very far from the truth. What I do agree is that the commonly form for documentation i.e. text files, that most people mean when they say documentation, is probably not the best way to get the job done. Why do we write documents? I recently had a nice discussion with Eyal Katz about the need for documents. Eyal listed the following three reasons: To make the writer really think about what he is writing about. For example by writing a design document the designer...

Wednesday, 12 November 2008

Cost of Change – The Fear Factor

Oren has blogged on how to reduce the cost of change. He claims and I agree that Beyond anything else, it is the will of the team to accept the pain of making the change and actually doing this When accepting this mind set its usually a lot easier to find ways of reduce the change cost . i.e. make it easier to change. However I feel there’s another factor in equation, and that is the developer’s inherent fear of the unknown. Time and time again I’ve seen (and did that myself) programmers start implementing a change by attacking its easier parts first, leaving the real hard unknown issues to the end. When adding a new functionality to an existing system for example, there are two main steps: Implementing the new functionality. Integrating it into the given system. In most...

Test Types – Are we confused yet?

Recently I’ve encountered several places which discussed the different type of tests. Here are some terms I’ve seen: 1) Unit tests – the most widely used term, which still I’m afraid is open to interpretation. Up until now I haven't seen a good definition of what is a “unit”. Is it a single class? Is it a single component? where lies the line between different units? 2) Integration tests – again kind of vague, but mostly it means a test which encompass several “units” sometime the entire system. 3) Developer tests – this is a more broader term which means test written by developers. I myself don’t see much value in using it since it doesn’t give any indication to the tests nature . (also what are none developer tests? how to refer to manual...

Tuesday, 11 November 2008

The Future of Unit testing

I’ve recently watched the PDC 2008 panel Session on the future of unit testing. The feeling I took from this session is that Automated testing is here to stay. What gave me the indication that this is true is the fact that although the panel tried to focus on unit level testing, the audience tended to shift the discussion into other zones.Most of the audience questions were dealing with more complex scenarios, going beyond the unit level, that they encounter in real life. For me this gives a good indication that automated unit testing has taken its hold. I’m not sure if my interpretation is not Mistaken, but it seems to me that the available tooling solutions for writing unit tests has matured enough (yes even if you don’t like using mock frameworks) to the point where people are now trying...

Sunday, 9 November 2008

How to know which unit test calls a specific method

From time to time one faces the situation that one of the unit tests written fails inconsistently. The usual scenario is that when run alone the test passes, but when run as part of the entre suite the test blows up. In a lot of cases this results from some left over from previous tests. Here is an example of such a case (taken from Typemock-Isolator support forums - AAA tests pass individually, fail in suite). The reported error in this case indicates that for a mock setup in a given test was accessed in some other test which kind of confused the given test. Solving such an issue usually involves a lengthy Search&Destroy in which most of the work involves finding out which of the test is the one which is interfering with the given test. So here’s some code that should save most...

Thursday, 6 November 2008

The Fifth Value – Respect

There’s a lot to be said about respect but for some reason this value is not stressed enough. I think that much of what troubling the software development world today can be traced back to this value. Lets face it most developers are arrogant bastards(and yes I’m a developer too). Taken from Kent book: Every person whose life is touched by software development has equal value as a human being. No one is intrinsically worth more than anyone else. For software development to simultaneously improve in humanity and productivity, the contributions of each person on the team need to be respected. I am important and so are you. lets take a few examples I’ve encountered (ok, ok I’ve said those): “our customers does not know what they want. Ill tell you what they want” “our test team...

Wednesday, 5 November 2008

The Funny side of Metrics

From time to time I do stumble upon some great post. The following post (yes its an old one): Is it Wise To Aim for 100% NTF? did not only made me laugh it really made me think. Lesson learnt – Using humor to mask Wisdom is really effecti...

Monday, 3 November 2008

The power of combining Unit tests with Integration Tests (conclusion)

Here and Here I explained why I think that unit tests alone or integration tests alone does not do a good enough job at assuring the quality of the product. However, that combining the two test  levels, i.e. investing some of the effort in integration tests and in unit tests is what I call a winning solution. Investing effort on both levels allow one to benefit from both worlds on one side integration test will help in: formulizing the user requirements. make sure that system is working end to end. test non functional requirements on the other side unit tests will help in: driving the design of the system to a better one. give a good coverage of all parts of the system eliminating defects that get shipped with the system. I have been suing this approach in a...

Tuesday, 21 October 2008

Unit tests are not enough (Part 2)

In a previous post I've explained why integration tests alone will not be enough to create a high quality product. However assuming that unit tests on their own will be enough is also a Mistake I don’t intend to repeat. There is great value in adding integration tests (and specifically doing writing them before coding is started) that is not gained by writing unit test. Desired Behavior Unit tests are testing the actual behavior of a single small component. A good set of unit tests will assure that a unit does exactly what its programmer has intended it do to. However when a programmer does not fully understood the DESIRED behavior, his misunderstanding will not be caught by any unit test HE writes. Writing some integration tests will not only make sure that all units behaved as desired,...

Sunday, 19 October 2008

Integration Tests are not enough (Part I)

In the last year or so I have learnt the hard way that Integration tests to are not enough.Throughout this post I'm using the term "integration tests" to refer to a more specific kind of tests which are also known as User Acceptance Tests (UAT)There is value in writing Unit tests (and specifically doing TDD) that is not gained by writing integration test.Design Integration test are design agnostic. The main goal of integration tests is the prove that the system is working correctly, from the USER point of view. At most, when these tests are done TDD style they will help the API's of the system to look better. If we want to leverage tests to drive the system technical design, the tests must be aware of the different parts which construct the system design (Units) and explicitly test each of...

Monday, 13 October 2008

Numbers Talk - Real Agile Case Studies

I've recently found about the existence of the Agile Bibliography Wiki.I believe this site is a must for all those interested in understanding the real measured effect various agile practices can have on projects.I admit though that after diving into it for a couple of hours there's too much for me to digest at once. Therefore I will need some time to see what hidden gems I can find there. The most interesting thing in this WIKI (for me) is the existence of case studies which examine the effect specific agile practices such as TDD, Pair programming have. This gives me a good starting point in trying to show organizations that even early stages in adapting agile methodologies can have a good ROI.At any case I would like to thank George Dinwiddie for pointing me to this si...

Sunday, 12 October 2008

Self Distracting Code

Here’s a code segment for you:#define OPDEF( id, s, pop, push, args, type, l, OpCode1, OpCode2, ctrl ) id,typedef enum enumOpcode{ #include "opcode.def" CEE_COUNT,/* number of instructions and macros pre-defined */} OPCODE;#undef OPDEFyes I’m back to old C++ hard core coding just in case someone is missing.Before I start let me assure you that this piece of code actually works and after understanding what it does, I admit it’s doing so quite cleverly.BUT:It took 3 experienced programmers, sharing about 15 years of C++ coding between them, 15 minutes to fully understand what is going on here.This segment is using one of the nastier tricks in the book – putting an “#include” statement in the middle of the file to achieve code replacement.At first look this code seems be doing nothing – we...

AUT in C++

Its been some time since I left the C++ field in favor of .NET development and recently I have taken some time to do some catching up. After focusing so intensely on developing a mocking framework it was only natural for me to start by looking what has changed in the areas AUT/TDD in C++.The bad news is that as far as I can tell, C++ AUT/TDD tools are still far behind in comparison to those found in .NET and Java. However there are some new tools on the block that seem to be heading the right direction so hopefully there is some change brewing.disclaimer: I am only starting to evaluate the changes and there is a good chance that I am missing some key change here.Therefore, for the sake of my own personal knowledge, I thought it will be nice to go over the tools I have found, and see if I...

Monday, 6 October 2008

Using Ready made solutions

Here's a paradox for you:Before starting to work as with .NET technology, I was a hard core C++ programmer. During that time the general approach around me was discouraging the use of external source components. The general attitude was always "we can do it better".This ingrained reflex was and still is one of the hardest thing for me to overcome. When starting to work with .NET, the developers around almost always tried to first find ready made solutions before reverting to coding themselves. Here's a nice post summarizing this approach: Search, Ask and only then Code.I find both approach somewhat funny:C++ - if we are such great programmers, humility would suggest that other programmers can do just as well, so their code would be just as good as ours. why not use it?.NET - if we can't write...

Sunday, 5 October 2008

Merge in SVN

At the end of the day there will be times in which branching will occur, resulting in the need to merge changes from one code line to another. Merging in an SVN system is a little different then what I expected resulting in me making Mistakes from time to time.Merge in SVN is a ternary operationI for one was used to treat merge as a binary operation. you take one source file and merge it into another resulting in the combined changes from them both. In SVN however, the merge operation always involves three factors. In fact I would think that a better name for merging in SVN would be “diff and apply”. When merging, we first take a given revision on a code line which we want to merge from compare it to some previous version on that line and apply the differences into a different code line that...

Friday, 3 October 2008

Source Branches

I hate branches. I think that branches are a bad solution for a stinking situation.now before you I get jumped, I’m aware that there are cases in which branches are a perfectly legitimate solution to a given situation, but still my advice would be to try looking at what is causing the need for the branch, in my experience there is an underlying problem that the branch will not solve.In the Last Alt .NET gathering I had a very nice discussion with Ken Egozi regarding branches. In that discussion ken and I represented the two opposites approaches. Ken on one hand is using Git and relies heavily on its great branching ability. To the point (if I understood him correctly) that he treat each source change as a different branch. I on the other hand uses SVN and try to avoid branches as much as I...

Thursday, 2 October 2008

Decoupling Testing from Design

A recent discussion has recently sparked up about whether or not can testing practices can be decoupled from design practices. Roy in his latest post "Unit Testing decoupled from Design == Adoption", has argued that one of the factor which prevents the masses from adopt AUT is the strong perception that AUT and design are strongly coupled, a perception which in his opinion is wrong. Udi on the other hand argues in "Unit Testing for Developers and Managers" that testing practices and design goes hand in hand.So can Testing be decoupled from Design?Well my answer is: Yes but probably not.The ContextTo clarify this cryptic answer I first need to put those practices in a context. As I see it, both design and testing are just means to reach an end. The ultimate goal is producing class A quality...

Sunday, 28 September 2008

MSTest – ExpectedException and exception message.

Since this is my first blog post ill start out small enough.Recently we have migrated our unit test from NUnit into MSTest. Although by large the transition was quite smooth, one of the more annoying issues is the different behavior of the ExpectedException attribute. An intended design or an oversight by MS? I would (wishfully) think the latter is the case. But in any case I would say its a Mistake.In any case, since MsTest does not support asserting on the exception message, we had to revise some of the tests. The revision itself is quite simple, just need to wrap the test code with try catch clause. Something like:[TestMethod]public void SomeTest(){ try { //The test code: //... //... Assert.Fail("We should not get here"); } catch(SomeExceptionType...

Saturday, 27 September 2008

First Post (Introduction)

Hi, my name is Lior Friedman and I'm a software developer.This blog is all about me trying to recapture and share my past (and future) mistakes, in the hope that putting them on paper will help me remember and avoid repeating them in the future. I will try to focus on my own personal mistakes, but I’m sure that from time to time I will share those I have seen made around me.I've been developing software in various fields and technologies for more then 10 years now (wow time do fly), and during the way I've made more then my fair share of errors along the way. The bigger of them are what got me to look up agile methodologies and so far I have found those much more appealing and effective then the rest.So do expect a good share of philosophy here, I will however always try to relate everything...

Pages 381234 »

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Walgreens Printable Coupons