Home > education > What percent of your college course work is unit-tested code?

What percent of your college course work is unit-tested code?

December 5Hits:1
Advertisement

As a college student do you write unit-test for the project code you write? Do you know how to properly use TDD? Have you been taught to use testing frameworks (jUnit for example)?

I've just recently heard that a major company's project team was delivering software to User Acceptance Testing group that had only 7% line code coverage for unit testing. While that shocks me, it just tells me that this company's software engineering practice are immature. However I wonder if they could just hire a few recent graduates and raise the bar on the teams practices - assuming that these newly minted programmers were trained in the best practices.

Are you 2008 - 2010 CS graduates using best practices of unit testing your code?

Answers

I don't write unit-tests for the software I write for assignments, I usually just do some of my own testing and debugging.

Honestly, CS at my university is fairly broken, half the students are diehard passionate programmers who have learned nearly everything on their own. The other half can barely write a hello world in Java, and know no other languages and have extreme problems with even trivial programs. Students barely get much programming experience, most manage to squeak by copy & pasting code form books and the internet without really understanding it.

As part of the degree plan, you have to take courses on architecture and management that involve agile and the concepts of software testing and test driven development. However, these courses are taken pretty late (senior year) and are certainly not utilized in other courses.

If I had more time, I'd probably unit-test my code properly; unfortunately I'm working and taking 19 hours, so I've got alot of assignments and I can usually bang them out pretty quick and test them enough. I have gotten dinged a couple points for a bug here or there though, and unit-testing my code would certainly help get better grades on the assignments.

Sadly, my experience is that any REAL software development, any type of real-world systems programming or coding standards or best practice is done by those who write code on the weekends, and read about it on their own, and look for it on their own. The students who just go to class, I can't imagine how they're going to get hired. You get shown what all exists and that you need to know it in class, but not enough implementation.

Professors can't grade 50 students' programming assignments every week, so if they want to have lots of actual practice, they have us do group work. This results in the one or two good programmers doing almost all the work, and the rest follow along and try to read and modify their code. Maybe other Universities are better, and I think they claim to be; but I think in practice they aren't really any different.

As a college student do you write unit-test for the project code you write?

MS thesis project; sorta. I do interactive testing with Lisp/Slime. Some stuff gets unit tests, some stuff doesn't.

Do you know how to properly use TDD?

Meh, tried it, didn't see the point. Rather test during than before.

Have you been taught to use testing frameworks (jUnit for example)?

Why should a professor waste our time teaching me an API? If I can't learn an API, I need to leave the field.

(I graduated in 2008)

We learned ABOUT unit testing, and had to do so for some assignments in a class called "Team Software Project". The class was about software engineering practices. Other than that one class, it wasn't mentioned, but that class was required to get a BSc in Computer Science. The Computer Science department also offered a Software Engineering concentration that was more project-based, with classes devoted to testing, HCI, project management, etc. but still with a theoretical CS core.

Time is a big factor in this. You could do one programming assignment per month with time to TDD it, or you could do one every two weeks with some other testing method. In the workplace, the month is worth it because you will live with that code for months/years/decades, and maybe even make money from it. In the classroom where it's written and promptly thrown away (if not immediately at last check-in, at least at the end of the semester, maybe at the end of two for some special projects class), it just doesn't make educational sense. Your professor would rather you learn twice as many programming concepts through personal experience (a project), than learn one concept and spend weeks making the code bulletproof.

The goals are different. With the exception of a software engineering course, required-TDD on all projects might actually be a warning sign of a less-than-optimally-effective instructor at the college-project level (you're going to learn less).

And for laughs, there's always the silly case of write a unit test for Hello World before you know how to program... because you're learning how to write your first program :) Laugh. Do not take hello world example seriously.

In my university you can't complete a Software Engineering degree without taking a particular subject that focuses on teaching Agile software development methodologies. In that subject you can't claim any feature's implemented without reasonable testing through JUnit and Selenium.

However: TDD was taught but not enforced and due to group work some students could avoid exposing themselves to Selenium and/or JUnit.

Generally when the coverage is so low it has nothing to do with the skill level of the developers or how recently they graduated.

Usually two things have caused this, old code that was written before TDD was common (when much of your code base was written ten years ago, it would be extremely unlikely that you would have test coverage) and tight (often impossible) deadlines. Testing is one of the first casualties of the impossible deadline.

So adding new people more familar with testing is unlikely to change either fo those two conditions and test converage will likely only slowly improve.

That said, I personally have only rarely seen a recent graduate who cared much about testing. That is because the projects they work on in school are both small and not in need of maintenance over time. So the critical reasons for test converage are not there and most studnets don't do TDD routinely. Recent grads often also have to be taught about using source control. There is a huge difference between working on enterprise software and class assignments and thus these things are not really on their radar until they get dropped into a large and continuing project.

Just graduated recently with a degree in CS. I can honestly say that besides material that was focused on testing, I was never required to turn in tests. That doesn't mean I didn't write them though. I wish my school had discussed testing more. Testing, and source control.

Related Articles

  • What percent of your college course work is unit-tested code? December 5

    As a college student do you write unit-test for the project code you write? Do you know how to properly use TDD? Have you been taught to use testing frameworks (jUnit for example)? I've just recently heard that a major company's project team was deli

  • What percent of width can an adsense ad unit use without income falling off?December 14

    In an effort to follow google adsense's policy of not pushing content down the fold with use of a very wide ad unit, I decided that on my webpages, I use only square ads so that text is around the ad unit and then the ad unit becomes less intrusive.

  • CakePHP 3 Display Colleges owned by AdminsFebruary 10

    I have two tables colleges and college_admins. Each College is owned by a CollegeAdmin who is a User. I'm using the Auth component to authorize access to which pages can be viewed by which user. Now, I want to each CollegeAdmin to list only Colleges

  • How do i use a web browser to FTP with a user/pass where the pass has a @ in it?October 4

    How do i use a web browser to FTP with a user/pass where the pass has a @ in it? Example: ftp://user:[email protected]@192.168.1.1 the above will not work. --------------Solutions------------- Maybe ftp://user:[email protected]? You'll need to encode the

  • Graduate expectations versus reality October 17

    When choosing what we want to study, and do with our careers and lives, we all have some expectations of what it is going to be like. Now that I've been in the industry for almost a decade, I've been reflecting a bit on what I thought (back when I wa

  • FPGA development kit for beginners , Spartan6 or Spartan3?October 21

    I intend to purchase an FPGA, development kit and I have looked at both the Xilinx and Digilent website. Both seem to have good development kits. I have never worked with FPGA's before but have some experience working with microcontrollers. I see tha

  • Why does DirectX use a left-handed coordinate system?November 7

    I considered posting on Stack Overflow, but the question strikes me as being far too subjective since I can't think of a reasonable technical explanation for Microsoft's choice in this matter. But this question has bugged me for so long and the issue

  • What are useful metrics for source code? December 18

    What are useful metrics to capture for source code? How can metrics, like for example (Executable?) Lines of Code or Cyclomatic Complexity help with quality assurance or how are they beneficial in general for the software development process? -------

  • Why write clean, refactored code? February 22

    This question already has an answer here: Does craftsmanship pay off? [duplicate] 16 answers This is a question I've been asking myself for a long time. Thought of throwing out it to you. From my experience of working on several Java based projects,

  • Getting graduates up to speed?March 3

    This question got me thinking about how comapnies deal with newly-hired graduated. Do experienced programmers expect CS graduates to write clean code (by clean I mean code easily understandable by others - maybe that is too much to expect?) Or do sig

  • Future of web development - Front-end Back-end development?June 22

    People used to say it's "better"/"Make more money" to do back-end programming (PHP, asp.net) instead of front-end(HTML, javascript) for web development. But I notice that HTML5, CSS3, WebGL, Javascript are gaining importance. We can ev

  • proxy authentication in system settings but with a twistOctober 24

    We have a password policy that enforces the users to use special characters in their passwords. Hence some passwords will be [email protected]#k for example. Now to specify the system wide proxy settings (Why isn't this done more intuitively like for instance t

  • How to set Global Proxy where the username contains an "@" character? October 24

    We have a password policy that enforces the users to use special characters in their passwords. Hence some passwords will be [email protected]#k for example. Now to specify the system wide proxy settings (Why isn't this done more intuitively like for instance t

  • How stable are digital multimeters' parameters?November 24

    I live in a region where standard mains voltage is 220 volts. Recently I tried to measure it using a digital multimeter. The multimeter specs say that it has maximum error of 1,2 percent of the displayed value plus 3 units (volts in my case). So I me

  • Is unit testing procedural code effective?May 22

    On a current project, the powers that be want to have unit testing incorporated into our development cycle to avoid the constant amount of bugs that seem to seep into our code. The problem is that the spaghetti code is 95% percent procedural, which I

  • Should I continue my self-taught coding practice or learn how to do coding professionally? June 25

    Lately I've been getting professional work, hanging out with other programmers, and making friends in the industry. The only thing is I'm 100% self-taught. It's caused my style to extremely deviate from the style of those that are properly trained. I

  • How to become a good team player? July 6

    I've been programming (obsessively) since I was 12. I am fairly knowledgeable across the spectrum of languages out there, from assembly, to C++, to Javascript, to Haskell, Lisp, and Qi. But all of my projects have been by myself. I got my degree in c

  • Do I need to use an interface when only one class will ever implement it?August 7

    Isn't the whole point of an interface to for multiple classes to adhere to a set of rules and implementations? --------------Solutions------------- Strictly speaking, no you don't, YAGNI applies. That said, the time you'll spend creating the interfac

  • Is using Interface implemented by single class a not recommended practice? August 7

    Isn't the whole point of an interface to for multiple classes to adhere to a set of rules and implementations? --------------Solutions------------- Strictly speaking, no you don't, YAGNI applies. That said, the time you'll spend creating the interfac

  • Code testing practiceSeptember 3

    So now I have come to the conclusion like many others that having some way of constantly testing your code is good practice since it enables fewer people to be involved (colleges and customers alike) by simply knowing what's wrong before someone else

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.552 s.