Posts Tagged ‘Unit Test’

As a programmer do you want to work on operational programs or do you want comabat training?

April 22, 2010

Tank: We’re supposed to start with these operation programs first. That’s major boring shit. Let’s do something a little more fun. How about… combat training.
Neo : Ju jitsu? I’m gonna learn Ju jitsu.
[Tank winks and loads the program]
Neo : Holy shit!
Tank : Hey Mikey, I think he likes it. How about some more?
Neo : Hell, yes. Hell yeah.

Well I can tell you that I prefer comabt training…

(more…)

RU A Developer Using Firefox?

March 27, 2010

XRefresh

This program is for you!

I want you image

It does an automatic refresh of the pages that are being served by your development work. Whenever you save it will automatically do a refresh on the the web page.

How it works, is it has two programs. One is an add-on to Firefox. The other is an application you run from your desktop.

The application on the desktop monitors your development work directories. If any saves are done on the files in those directories, it will let the add-on for Firefox know to do a refresh on any pages for those directories.

Scenario:

Joe Sofwarer TDDs his code using qunit.

  1. So he writes a test (RED).
  2. Ctl-s.
  3. Loads up the unit-test page in Firefox.
  4. Gets his results.
  5. Writes code to make his (RED) test a (GREEN) test.
  6. Ctl-s.
  7. Goes to Firefox.
  8. Refresh button pressed.
  9. Reruns unit-test page.
  10. All is (GREEN).

Ten steps required for development.

Add XRefresh

  1. So he writes a test (RED).
  2. Ctl-s.
  3. Loads up the unit-test page in Firefox.
  4. Gets his results.
  5. Writes code to make his (RED) test a (GREEN) test.
  6. Ctl-s.
  7. All is (GREEN).

Seven steps required for development.

Faster feedback. Now there is more time to design and write code.

Or even blog about saving some time.

Recommend you check out there page, XRefresh.

Ugly Developing!

JS_RUnit Reformulated

November 17, 2009

js_runit is now a standalone JavaScript testing framework. So if your into a minimalist JavaScript testing experience, this tool is for you. Two files to download. The html file and the JavaScript file. Included with this is an example of Passive View with unit tests.

To really appreciate this see the passive view example.

The unit tests for the above example can be found here.

Happy unit testing.

Javascript Complexity

October 14, 2009

Javascript is a language used in web development. I would argue that it is Object Oriented (OO). And due to this the principles guiding development in an OO language apply.

When developing software, at its basic level, you have three responsibilities that need to be managed.

  1. Input: consist of user actions.
  2. Output: change to the web browser.
  3. Logic: any piece of code where a decision is made.

To manage this complexity, you should be Unit Testing if not testing-first.

A simple Javascript unit testing framework used for Rails.

 

js_runit