Skip to main content

Posts

Command Box and Jet Brains IntelliJ

My last post was about the new feature Testbox Watch which is in the latest version of Command Box. I wrote that it was probably a good idea to have two CommandBox windows open but with CB, my IDE, Photoshop, my project site, XKCD etc, the number of windows open is adding up quickly. For the last two years I've been using IntelliJ by JetBrains and recently discovered the concept of external tools but didn't really have one to use. I wondered if I could get rid of the "Testbox Watch" window in my previous post about that feature . My Folder Set up: root       runner.cfm       tests            test1.cfc            test2.cfc       testbox After a couple of false starts, some working but kludgy starts involving running .boxr files I came upon the following solution. Here is my package output from CommandBox: package show {     "dependencies":{     ...

New Testbox Feature - Watch

This week, Brad Wood from Ortus Solutions posted a video to the company YouTube Channel ( https://www.youtube.com/watch?v=7k2vXl8FQ24&feature=youtu.be )  about some of the new features in TestBox and CommandBox. One was the improved reporting with Testbox from CommandBox and some of the options involved. The other was a brand new feature for CommandBox itself and its integration with TestBox: Testbox Watch. If you've never used watchers in other tools such as Grunt, the concept is simple. The program "watches" the files in the folder and, when one is changed, it responds in a pre-ordained way. This could be rendering it, running a script or, in this case, running your TestBox test suites. 1. To test it out you need to have the latest version of CommandBox. Open CommandBox type upgrade --latest You might get the message that you can't upgrade automatically but you will receive the URL to do it manually.  Install the latest version.  Open CommandBox to co...

TestBox: Shooting for Test Reuse

For a recent project, I was trying to force myself to create unit and integration testing as part of the scaffolding. I had gotten to the point where my basic tests were moving along well and I was moving up the diagram from unit tests to integration tests. The basic project makeup is here: In working on the second tier cfcs (the image renderer, document render and the mesage renderer) I found myself starting to repeat some of the same tests again and again. The reason for this was pretty straightforward. All three of the renderers needed to return a struct with the same keys to the Decision Maker* so all three had a set of the same tests applied to them. This got tedious both to type out and the maintain as the needs of the structures morphed over time. Basically, the output from those and other other renderers that we'd develop in the future, needed to comply to an interface. All of them needed to have the same keys in the struct but the values would change based on the typ...

Getting up to speed with TestBox

Over the past several months, I've been trying to work more habits into my workflow that make the coding product I'm creating better, more solid and done with a higher degree of confidence and less back and forth between myself and QA. One way that I've been trying to do that is by implementing some Unit and Integration Tests into my work flow rather than just simply "code and reload" and see if it worked. The idea is that we can run pieces of our code in place to see if the individual functions in our CFCs are working as expected and going from the bottom up to see if the entire process is working as we expect. Last fall at CFUnited, I took a training course with Ortus Solutions and discovered CommandBox and Testbox which have changed the way that I approach projects.  There are a number of ways to set this up but here is what seems to be working for me Prepping the environment Open up CommandBox and navigate to the root of your site. CommandBox isn't...

Knowing Who Your Testers Are

I don't know about you but as soon as i get involved in a project I think I tend to treat people as if they are co-creators with me. This is great to a point until you start talking to people on the subway about your db design and eliciting their thoughts. Usually around then (or before this), they leave. I don't get invited to parties much. I love collaboration and teams. I'm a natural extrovert and need people to bounce ideas off and refine thoughts until I want them to go away and leave me alone to build what we just talked about. I really values the random access to colleagues (to a point) that comes from working in a team environment, especially after working for so many years as a "one person shop" However, last summer it was really hit home to me that you need to know who are your collaborators, who is your client, with whom you can co-develop with and who needs to be presented with a completed or almost completed product. In short, really assess to who...

Outlook Lists: Unexpected Behavior Problem

We ran into a problem recently in Outlook which has given me a new "pattern" I want to think about more. Here is the basic problem. Outlook stores the addresses from email messsages one "bucket" which it uses to autofill the TO field in new messages. There is a different "bucket" which contains all of your contacts. It makes sense that these "buckets" are seperate since you send and receive emails to and from more people than are in your contact list and it's nice to have those autofill when you are corresponding.Its like having a public area for the masses and then a subset of those emails which is private and includes friends, family and associates. There are ways of moving information from the autofill bucket to the contact bucket by right clicking on the address in the TO field and choosing ADD TO CONTACTS. This moves from public to private. It's also makes sense that your contact list should show up in the autofill. If contacts...

Why do we have that lever?

The Emperors New Groove is  Disney Animated Movie from 2000. It's clever, witty, funny and stars the voices of David Spade, John Goodman and Evil Johnny from News Radio  (Patrick Warburton). In other words, how can you go wrong. One of the recurring gags in the movie is when Yzma, the ursurper to the throne, urges her henchman, Kronk, to "pull the lever!" in variably he, does it's the wrong lever resulting in plunging Yzma into crocodile filled waters to the shreik of "wrong level" and the invariable question of "why do we even have the lever??" Visual: http://www.youtube.com/watch?v=sw2B9knw58U The same principle can be applied to UI. If you don't want your users to do something, don't LET them do it. If you don't want them to click buttons before they are ready, don't activate it. If there are are options that will break the app, don't present the options. If presenting a three year old with the option of playing with bloc...