Challenging Learning Experience
I used to think that learning a new skill would be a walk in the park because I consider myself “the learning man” — I mean I have the passion, i’m willing to learn, the resources are available. You’ll agree with me that I literally possess everything required in the book to learn a new skill. But what is this feeling? When I found myself racing against the clock to deliver a project on a skill i’m yet to master. I could feel my heart pounding in my chest, I almost lost my usual cool and composure. Then it hit me that I need to “go beyond plus ultra”
There’s the mainstream notion: “if you believe, you can achieve it” — Truth is believing alone doesn’t get the job done. I can’t sit down, fold my arms and expect a miracle to happen. I had to put my back to work, denied myself food and sleep, collaborated with friends and colleagues. That’s what it means to “go beyond plus ultra”.
I had to come up with a logic for the function. As if that wasn’t tasking enough, I had to write about ten tests and made sure the function passed all the test. PS: I had less than 5 hours to understand, write and push to gitHub (Jasmine.github.io, stack overflow and Google came in handy).
The gist of Test Driven Development(TDD) is to
1. Write(add) a test.
2. Run the test expecting it to fail.
3. Update a functional code (just enough to pass the test).
4. Run the test and expect it to pass.
5. Refactor code — Reorganize codes to make it more readable.
Crazy right? How can someone write a “test” and expects it to fail? — don’t answer that.
You may not really understand Test Driven Development(TDD) by reading and studying alone. You need to try it hands-on. Although I learnt it the hard way.
I hope I inspired somebody.