I have the following dynamic form in my GitHub Inventory project : I created the form with KnockoutJS , using some ideas from this article . The detail view looks like this: <table id="acquisition_items" class="jtable"> <thead> <tr> <th>Product Name</th> <th>Quantity</th> <th>Price</th> <th>Value</th> <th><button data-bind="click: addItem">[+]</button></th> </tr> </thead> <tbody data-bind="foreach: items"> <tr> <td> <input data-bind="value: ProductName" type="text" value="" /> </td> <td> <input data-bind="value: Quantity" type="text" value="" /> </td> <td> ...
I already wrote this project once, on GitHub , but I can't say that I like the result. I wrote that code without TDD, mostly to see if I can still work in the "normal" fashion. I can, but I had a bug that took me a while to even discover and then was difficult to write tests for. I also hate the temporal dependency in that design (if you don't call the SortBy method first, the ExcludeRecords method will return incorrect results). Anyway; here's attempt number two, writing that code using TDD. Structure I start by creating my usual structure for projects of this type - a library for the logic, a console application for the main program and a test project for tests. I also use the Enable NuGet Package Restore option (right-click on the solution node) to add the three NuGet files that will allow someone to automatically download all the packages I'm referencing without wasting space in the source code repository. (Right now I've only added the Moq pa...
I don't believe in Hell. Several years ago I decided to fully accept the preterist theory (short version: everything in the Bible has already happened); this has led me to universalism - everyone goes to heaven. I've held this belief for quite a while now. I just changed it - somewhat. I suddenly believe in Hell, a place of such misery and torture that people can't really imagine it. A horrifying place. I also believe I'm in it right now , I just found a tiny bit which is somewhat less horrible. (I try not to make too many waves so I don't get moved to a more horrible part.) This movie is why I think so - Johnny Got His Gun . It made me realize that politicians and soldiers are, if not the Devil, then something very close to it. They do their best to make other people's lives and homes a Hell. Hiroshima and Nagasaki might have been the clearest example, but read this description of the carpet bombing of Tokyo from Wikipedia: On March 9 and 10 1945, B-29 Sup...
Comments