[personal profile] horrorcheck
In my text exploration game project, I'm using HSpec to test my game. Why test? I first learned about test-driven development a couple months ago during Code Retreat in Pittsburgh. I'd never done any TDD before that. But over the course of the day, I found I really enjoyed process of writing small tests and making them pass. Most of the day, I was working with people who were very experienced with testing, but in other languages like Java, Scala, Clojure, or Python. The last session was the only time I worked with another Haskeller, and neither of us new how to test Haskell with anything but types and visually checking output. He was satisfied with that, but I really wanted to to fully learn TDD. That's why I added it to my project.

Adding tests to my code helped me reason through a lot of problems. I realized that a lot of the way that I had structured my program at first didn't make much sense and was really hard to test. For example, putting too much in one IO function. Now I think my code is more modular.

I still have a lot to learn about TDD in Haskell. I have a really hard time keeping to the red -> green -> refactor thing. I tend to either forget about the refactor part or go from refactoring to writing a bunch of new stuff without testing first.
From:
Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address. Sign in using OpenID.
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.

Profile

horrorcheck

August 2015

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 23rd, 2017 04:23 am
Powered by Dreamwidth Studios