Two Plus Two Publishing LLC Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > Other Topics > Programming

Notices

Programming Discussions about computer programming

Reply
 
Thread Tools Display Modes
Old 07-28-2011, 12:44 AM   #46
Carpal \'Tunnel
 
tyler_cracker's Avatar
 
Join Date: Apr 2005
Location: Shallow End OTKP
Posts: 13,905
Re: Software Design

i'm working my way through martin's old blogs. this one is a nice distillation of the position i've been trying to espouse:

http://butunclebob.com/ArticleS.Uncl...itivityProblem

Quote:
I have been consulting for a number of teams that have adopted Agile Methods, including TDD. One common issue I have found is that developers drop the discipline of TDD in the face of schedule pressure. "We don't have time to write tests" I hear them say. Before I comment on the absurdity of this attitude, let me draw the parallel. Can you imagine an accounting department dropping dual entry bookkeeping because they've got to close the books on time? Even before SARBOX such a decision would be such a huge violation of professional ethics as to be unconscionable. No accountant who respected his profession, or himself, would drop the controls in order to make a date.
tyler_cracker is offline   Reply With Quote
Old 07-28-2011, 12:57 AM   #47
Carpal \'Tunnel
 
jjshabado's Avatar
 
Join Date: Jul 2006
Posts: 11,034
Re: Software Design

Quote:
Originally Posted by tyler_cracker View Post
i think the argument is that it's never worth it to skip tests if you care at all about quality and/or maintainability. tdd actually saves time in the relatively near term by making the addition of new features (and the refactoring required to add those features) faster as well as safer. after-the-fact QA is not and will never give you the same level of quality as having every line of your code under test.
I've worked on two main types of programs in my career: 1) web sites with very rich user interactions and 2) data processing programs where the user has little to no input.

If we're talking about programs like 1) I strongly disagree with the two bolded sections above. Writing and maintaining tests for the front end can be a massive time suck - especially when you're supporting browsers from IE 6 to the latest Chrome. If we're talking about programs like 2) we're almost certainly in agreement.

On top of that, it's easy to get decent QA staff for manual testing that cost 1/3 to 1/4 of the cost of Devs.


Quote:
Originally Posted by tyler_cracker View Post
i do think that the the tdd practitioners' position is sufficiently strong that if you are going to claim your case is an exception to the rule, you should have a good reason for it. i dont think that "it takes too long" or "it's too hard" are good reasons. (not ascribing either of those excuses to you shabby.)
Are there any good studies backing up their position? I've never seen any (and I've never really looked).

Quote:
Originally Posted by tyler_cracker View Post
expensive to write/maintain tests sound like a separate problem .
True. But I've never seen easy to write/maintain front end tests for complex web sites.

Quote:
Originally Posted by tyler_cracker View Post

were you pairing with one person all the time or with different people? what kind of software? any examples of giant wastes of time?
There were two of us as in-house developers and we were working with a team of 4 contractors. The 6 of us switched partners fairly equally. We were working on a fairly complex (from the UI perspective) web application.

A giant waste of time for me is to have two people build the shell of a new page. Or adding a field to a db table and pushing that data through the system to the front end. Or fixing a configuration problem on a machine (I remember one day two of us spending half an hour waiting for something to download...). There's a certain amount of boilerplate work that just doesn't require two people to do when building a Java website.

Quote:
Originally Posted by tyler_cracker View Post
how many qa cycles does it take before you break even on those 8 hours, even just for testing that feature? how expensive is it when that feature has a bug that no one notices because it's so rarely used? if the feature is truly rarely used, can you just get rid of it?
I agree, all of these questions are important. I just don't agree that its obvious that the answers point to manual QA not being the answer.

Quote:
Originally Posted by tyler_cracker View Post
i do think there is philosophical and even practical value in taking the 100% stance. for one thing, if your underlying philosophy is "yeah this is great... 90% of the time" then people are going to constantly claim that their code is in that 10% -- more excuses for not following the best practice.
I do agree with this. But I think there are ways around it. For example following a simple code review process for all check-ins gets you a lot of the same benefits as pair programming, without wasting as much time time, and also ensures that the proper things are unit tested (while also distributing knowledge of the code base and proper design techniques and thus speeding up future development).
jjshabado is offline   Reply With Quote
Old 07-28-2011, 01:01 AM   #48
Carpal \'Tunnel
 
jjshabado's Avatar
 
Join Date: Jul 2006
Posts: 11,034
Re: Software Design

Quote:
Originally Posted by tyler_cracker View Post
i'm working my way through martin's old blogs. this one is a nice distillation of the position i've been trying to espouse:

http://butunclebob.com/ArticleS.Uncl...itivityProblem
Hah, see here's one of our disagreements.

I think its silly to imply that all software bugs are equivalent to the accounting errors that are likely to be introduced through not using proper accounting techniques.
jjshabado is offline   Reply With Quote
Old 07-28-2011, 10:11 AM   #49
Carpal \'Tunnel
 
jjshabado's Avatar
 
Join Date: Jul 2006
Posts: 11,034
Re: Software Design

Quote:
Originally Posted by tyler_cracker View Post
i'm working my way through martin's old blogs. this one is a nice distillation of the position i've been trying to espouse:

http://butunclebob.com/ArticleS.Uncl...itivityProblem
Ok, that article left me pretty annoyed. But I just read another one and I really liked it (amazing how much I like the article is correlated to how much it reinforces what I think...) :

http://butunclebob.com/ArticleS.UncleBob.P2M2

Quote:
I have observed that mature agile teams will pair a little over half the time; perhaps as much as 70%. I think this is healthy. I'm not a proponent of 100% pairing. Instead I thinkk you should use pairing like any other tool. Use it when it works. Having said that, I also think pairing is useful in more cases than it's not, and should be aggressively pursued. However, pairing is not a religion, and, like anything else, should be used thoughtfully.
jjshabado is offline   Reply With Quote
Old 07-28-2011, 03:34 PM   #50
Carpal \'Tunnel
 
kyleb's Avatar
 
Join Date: Sep 2004
Location: Seattle
Posts: 37,852
Re: Software Design

What if you replace "pair" with "test?" All of a sudden TESTING IS NOT A TOOL YOU HEAR ME GOTTA BE DONE 100% OF THE TIME
kyleb is offline   Reply With Quote
Old 07-28-2011, 04:40 PM   #51
Carpal \'Tunnel
 
muttiah's Avatar
 
Join Date: Aug 2004
Posts: 21,429
Re: Software Design

Quote:
Originally Posted by weevil View Post
Lately I've been running in to problems writing larger programs (solo personal projects) without formulating a clear design plan beforehand. I typically start coding a program with only a few basic classes and functions in mind, and ad-hoc others on as needed, which leads to lots of messy coupling issues between classes, as well as poorly defined class and function structures once I'm past a few thousand lines of code. I try my best to refactor and clean things up periodically, but I've been hitting a wall lately and simply rebuilding projects from the ground up. I think I've come to the point where I need to bite the bullet and learn how to design a project before I start coding so I'm not spending so much time writing throw-away code.

I'd love to hear how others who reached this point handled their progression into writing larger, more complex programs, as well as suggestions on books or design tools (UML, w/e) to check out.
TBH your approach seems fine . In programming you don't know the elegant solution until you learn from doing it the ugly way. The bolded part is key. Practice refactoring , not re-writing. You learn more from refactoring than starting fresh, because the previous design flaws are clear. One popular method of development, test driven development is hugely dependent on refactoring. Get something to work, then continually refine the code so it works cleanly.
muttiah is offline   Reply With Quote
Old 07-28-2011, 05:26 PM   #52
enthusiast
 
Join Date: Nov 2008
Posts: 88
Re: Software Design

Sounds to me like you need to learn some design patterns. Try this book: Head first Design patterns. It's definetly one of the best books I've read and it never gets boring at all.
Viincent is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 12:21 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.
Copyright © 2008-2010, Two Plus Two Interactive