Read Next

Full Responsibility

One of the more helpful habits I've developed is taking responsibility for everything in my life. This is a strong contrast to the average victim / "things happen to me" mentality that a lot of people have.

Basically I assume that anything "bad" that happens in my life is a direct result of actions I took. If I lose money in the stock market I don't think, "Oh man... I'm so unlucky... the stocks went down."

Instead I think, "I bought those stocks and I lost money because of a decision I made."

Automatic Generation of Cucumber from Code

On Imported Blog

(All of the code mentioned here exists, and we're using it. Our actual codebase is all in Perl - I've written out examples here in Javascript for clarity and so there's no copyright issues. The actual implementation code for all this is pretty simple and not very clever, so I'm not planing to jump through the hoops needed to actually release it unless there is some massive unexpected demand...)

Let's start with Gherkin. Gherkin is basically a constrained application of English meant for specifying test cases. For example, for a calculator you might write:

You then set up a number of step parsers that match the steps (called step definitions), and execute code based on it. eg:

Rendering New Theme...