Discussion

Ask HN: How do I start with test driven development?

I'm a student developer, @pravj on GitHub. I try to follow the best possible development practice when I'm working like documentation, respecting language's style guide etc.

But one thing I don't like with me is that I never write tests.

Why I never followed that aspect is because I always felt that the thing that I'm writing, sounds totally OK.

One another negative point is that I don't actually get it that How to do/start this and what type of tests I should write for any given project. Maybe this is because I have never done this before.

For example recently I wrote a identicons library, Penticons[1]. It generates GitHub contribution flavored identicons. You can read the development story here[2].

Now, the thing that stopped me from writing tests was, I thought that ultimately it's a image generation library, why this thing needs any tests.

I don't want to lost my 1 point in the Joel score. Whenever I see a build passing label on a GitHub repository, It makes me crazy.

I'm asking here because I just love HN, I know people will suggest some awesome things here.

1. https://github.com/penticons/penticons.go

2. http://pravj.github.io/blog/penticons-the-hash-game/

136 points pravj 11 years ago 64 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton