*
The moose likes Testing and the fly likes Testing and the affect on junior programmers? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Testing and the affect on junior programmers?" Watch "Testing and the affect on junior programmers?" New topic
Author

Testing and the affect on junior programmers?

Allan Christensen
Greenhorn

Joined: Oct 21, 2003
Posts: 24
Hi all,

I'm a mature student (with six years prior experience working as a programmer) studying Computer Science. I'm about to write my thesis for which I've decided to write a platform for software developers to collaborate on writing software. The platform will focus very much on Extreme Programming practices (Pair programming, Code conventions, Code ownership, Testing, etc.). However, during the initialise stages of my project I got thinking about the effect that testing may have on Junior Programmers (e.g. graduate computer science students, programmers with limited project experience)?

I would like to hear peoples' opinion about the effect of testing to such programmers. Does it increase the quality of the code they write? Would it motivate them to write better code or demotivate them from writing code at all?

Any comments are welcome as I think this is a pretty interesting topic.

Kind regards,
Allan
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
Quality will sure improve.

But it will take some time to cajole them to go after unit testing(more code writing for this purpose). I think they need to emphasise more on test driven development in universities.


Kishore
SCJP, blog
Allan Christensen
Greenhorn

Joined: Oct 21, 2003
Posts: 24
Originally posted by Kishore Dandu:
I think they need to emphasise more on test driven development in universities.


I absolutely agree with you here. My experience of going back to university to finish my degree has been a big surprise. It has surprised me in that good coding practise are not taught. At the university where I am at they do not even teach Design Patterns. They briefly mention GRASP patterns (but don't think you could classify them as actual Design Patterns).
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
I think that imposing a techique without explaining it serves to nothing. I guess that the best way to educate is to present the best techniques with their pros and cons arguments. Than everybody will be able to decide what way he will go.
On the other hand a bad coder/programmer will remain a bad coder even if he os coding using TDD. While a good/talented programmer - presented with the right knowledge - will be able to realize the benefits.
I am sure that for the good programmer example the code will keep improving (using testing), but I am not sure I can say the same about the bad coder.

./pope
(not being mean, just realistic )


blog - InfoQ.com
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
Originally posted by Ali Pope:
On the other hand a bad coder/programmer will remain a bad coder even if he os coding using TDD. While a good/talented programmer - presented with the right knowledge - will be able to realize the benefits.
I am sure that for the good programmer example the code will keep improving (using testing), but I am not sure I can say the same about the bad coder.


Surely by having to pass unit tests the bad programmer will improve the robustness of their code. So that they also improve as programmers
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


Would it motivate them to write better code or demotivate them from writing code at all?

Its the reality of good quality, professional software engineering. Let them know what they are getting into at the start, rather than six months into their first job. Better for all.

The unfortunate truth is that most of us see the value of testing because we have also witnessed what happens when not enough attention is paid to it in a project.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Ali Pope:
On the other hand a bad coder/programmer will remain a bad coder even if he os coding using TDD.

...which is why we shouldn't let people become "bad programmers" in the first place.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
Originally posted by Lasse Koskela:

...which is why we shouldn't let people become "bad programmers" in the first place.


We can always stop them at the interview stage(unless it is a entry level position, and every body needs a first chance)
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Yes, I suppose we could, but wouldn't it be better to have higher standards for people graduating from college in the first place? What if the first thing a hiring company would need to do was not telling the new recruit that "everything you've been told at school is more or less crap"?
Allan Christensen
Greenhorn

Joined: Oct 21, 2003
Posts: 24
Originally posted by Ali Pope:
On the other hand a bad coder/programmer will remain a bad coder even if he os coding using TDD. While a good/talented programmer - presented with the right knowledge - will be able to realize the benefits.
I am sure that for the good programmer example the code will keep improving (using testing), but I am not sure I can say the same about the bad coder.


I think it is important to differentiate between people who don't care about programming and people who are not yet good at programming but what to get there. Everyone starts out as a "bad" programmer until we find out how everything works.

I agree with you totally that people who are bad and don't care that they are bad will continue with their ill practise. However, are there many of those kind of programmers out there?
Allan Christensen
Greenhorn

Joined: Oct 21, 2003
Posts: 24
Originally posted by Paul Sturrock:

Its the reality of good quality, professional software engineering. Let them know what they are getting into at the start, rather than six months into their first job. Better for all.

The unfortunate truth is that most of us see the value of testing because we have also witnessed what happens when not enough attention is paid to it in a project.


Yes, good point. I've also found that you can get addicted to writing (acceptance) tests - there is nothing like verifying that your code really works. As you mentioned, I also think that it is a matter of introducing the subject as early as possible so that the programmers can see the benefit from day one.
Allan Christensen
Greenhorn

Joined: Oct 21, 2003
Posts: 24
Originally posted by Lasse Koskela:
Yes, I suppose we could, but wouldn't it be better to have higher standards for people graduating from college in the first place? What if the first thing a hiring company would need to do was not telling the new recruit that "everything you've been told at school is more or less crap"?


I completely agree with you Lasse. To me, going back to University to complete my degree has been really disappointing. I think that the standards are so low because universities generally don't like to fail too many people and instead make the content of their modules easier and easier.
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
The university cannot replace your will to learn. I do agree (as I already stated) that teaching the right stuff is the only solution. But it is not a solution to impose a technique. As Paul said we by ourselves must find the right way.

./pope
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
Originally posted by Nigel Browne:
Surely by having to pass unit tests the bad programmer will improve the robustness of their code. So that they also improve as programmers


Only if the tests are written by somebody else . Otherwise the test will have the same quality as the code itself: bad.

./pope

PS: when I use bad coder I do not mean beginner coder.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30512
    
150

Allan,
Definitely an interesting topic.

Junior programmers need to learn what to test. Otherwise, the tests will be worthless. Having said that, I think even bad tests would increase the quality of the code a little. Mainly because it injects testing into the thought process.

A related myth is that testing only needs to be done by junior programmers. I assume you see why this is a myth, but it is related to your topic. I have spoken to several experienced programmers who feel this way.

On a personal note, I am currently going to grad school (and am a programmer with 2 yrs experience.) At my school, they require all submitted code to compile and come with a record of what was tested and how. This isn't using xUnit, but it's a good start. By contrast, the school I went to for undergrad allowed you to submit code that didn't compile or work as long as you tried.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
Originally posted by Kishore Dandu:


We can always stop them at the interview stage(unless it is a entry level position, and every body needs a first chance)


This is not very sure (if they are in both positions). I think that this kind of filtering must be done in university already: teaching and evaluating.

./pope
Allan Christensen
Greenhorn

Joined: Oct 21, 2003
Posts: 24
Originally posted by Jeanne Boyarsky:
A related myth is that testing only needs to be done by junior programmers. I assume you see why this is a myth, but it is related to your topic. I have spoken to several experienced programmers who feel this way.

I know exactly what you mean. I know several programmers who have this view, and I usually call them 'Hackers' rather than programmers as they usually don't following a structured approach.

I've found that the real challenge is coming up with tests and the more experienced you get the more tests you come up with and the quality of the application and code therefore rises.

Originally posted by Jeanne Boyarsky:
On a personal note, I am currently going to grad school (and am a programmer with 2 yrs experience.) At my school, they require all submitted code to compile and come with a record of what was tested and how. This isn't using xUnit, but it's a good start. By contrast, the school I went to for undergrad allowed you to submit code that didn't compile or work as long as you tried.

I think that is a great way forward. Wish more universities would catch on to this kind of thinking. I've helped out so many 1. year students and in most cases their problem is that they don't know where to begin, and how to measure when they have solved the problem.
[ October 15, 2004: Message edited by: Allan Christensen ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Testing and the affect on junior programmers?