Showing posts with label progress. Show all posts
Showing posts with label progress. Show all posts

Wednesday, June 17, 2020

The Cost of Hidden Wires

In working on the Calm codebase one of the first things I did was wire in Wallaby.js because, well... it's amazing, and I absolutely love it. Having been in a mix of C# and JavaScript, Wallaby gives me the immediate feedback I find most useful in my TDD cycle. I do have a small love affair with the test runner, but... I will be using it as an example of how I used in a manner that gave me issues once I moved Calm into CI. I don't hold Wallaby responsible for it, I just hit a snag that needed to be addressed.

I've long held the belief that starting a project comes with it a special set of skills that I admittedly continue personal growth within. Wiring a project together to fit the needs of the overall longevity of it caries a set of unknowns sometimes that may or may not be obvious to you in the moment. And often that wiring is hidden away where you're unlikely to bump into it or have a need to go seek it out. Here is my simple example.



There is a small cost in time and a little bit of re-work that I had to pay in detangling some hidden wires in my specs. Wallaby provides a setup function that I had been leaning on until now. It was taking care of wiring some dependancies that each of my spec's needed... like hooking up chai and sinon, and it looked something like this:

'use strict';

module.exports = function () {
return {
name: 'Calm',

...
setup: function() {
chai.should();
var sinonChai = require('sinon-chai');
chai.use(sinonChai);
global.sinon = require('sinon');
global.next = function() {};
},
...
};
};
Having this configuration and wiring in the Wallaby configuration file meant that I did not have to import  those into every test file I created, which was great! That's the point of hidden wires... they are out of your way and do some special sauce to make you more productive. Once I spun up a test file, I could get on with the work that I truly cared about... my tests, without having to pull in that setup every time. I had even setup up my package.json to tell you that you could not run the specs from the command line if you ran "npm run test"... you would get the message:

"scripts": {
"test": "echo \"Error: use Wallaby to run tests from within your favorite Wallaby configured IDE\"",
"start": "node app.js"
}

I naturally hit a wall the second I began wiring up Continuous Integration in Circle Ci. Up to this moment, I hadn't had a need to run the tests from the command line. Remember, I'm still very early in the lifetime of this project, so I don't have a ton of code... it's still just basically a holding page with a few experiments in it that I've done along the way:




This issue could have been addressed in several ways, some involving more complexity than others, and I'm still deciding what I want to do long term. My immediate desire was to get specs running in CI... and CI deploying the application, that was it. And I was looking for the smallest commitment I could make in getting that there from a codebase perspective because I knew I would have my hands full enough understanding the CircleCI ecosphere.

In the short term, I've chosen to write a function containing all of the same configuration, moving it out of the Wallaby configuration to somewhere that can be exercised when specs are run from the command line, like this... testHarness.js is then imported into each spec file:





This may not be where things live long term, or maybe they are... the project still has a long way to go. This was a good first step though towards getting all the specs to run in CircleCi and deployments going out when things merge into the primary branch. As for the npm configuration to to run on the command line... it's now a punt to mocha :).



I haven't lost anything in my usage of Wallaby and CI works... a win win. My point in all of this is that the hidden wiring of pieces of our system often give us some efficiency or clarity in some other part of the system. The system is more scannable when reading the codebase, reducing some level of cognitive load along the way which is for sure valuable. Anytime I can reduce the amount of stuff I have to think about is typically a great thing. It can however come out of hiding as the system evolves though, and we need to be prepared for those types of moments. In my case it was a straightforward enough fix to make progress.


Wednesday, June 3, 2020

Leaning on The Pomodoro Lately


It's funny how accidentally we discover things sometimes... a lot of the time. I think it would be interesting to have a catalog of things I've discovered on purpose, and things that I've discovered by total accident. I suppose that's simultaneously one of the best things about the very nature of the web (accidental discovery) and one of the the worst things (my quest for "accidental discovery" can be a complete timesink). 


I remember sitting in my cubical at my first programming job at TRX in Atlanta, GA, scouring the web for an answer to something (probably how to formulate some regex to scrape data off of a passenger name record), when I stumbled on an article about something called the Pomodoro Technique of all things. I remember reading the article and thinking to myself, "What a novel idea... sounds interesting... I think I'll give it a try sometime." In it's most basic form the Pomodoro Technique is a method for managing your time developed by Francesco Cirillo (when he was a college student) where you:
        1. Pick something that must be done.
        2. Set a timer for 25 minutes.
        3. Work on the task.
        4. End work when the timer rings.
        5. Take a 5 minute break.
        6. Repeat 2-5 until your task is complete.
I think at the time, I toyed around with working on a few things using Pomodoros... but the technique didn't immediatly stick for me. I don't think I was serious enough about it, even if I had seen some benefit out of using it for a few things. 

Flash forward several years... I'm at a new job with a great group of developers that I learned a lot from at VersionOne. They had a deeply-seated tradition of pair programming, which was new to me at the time. One of the things that we all loved to experience when pairing was a sense of getting through the things we needed to get done with a sense of flow in getting through them. To that end, a couple devs liked working via a Pomodoro Timer. 


Kept with us during the 25 minutes was a sheet of paper to record anything that was important to come back to and take care of, but not germane to the task we had at hand. These two practices I have kept with me and have used on and off ever since I learned them. Sometimes I have been more disciplined about the timer, and other times not as much. I have always... always... kept the habit of a small piece of paper to record things on to come back to. As humans, we're not built to keep track of more than about 4 things at any given time. The little piece of paper is the external brain that frees me to be more creative. More on that in another blog post.


Flash forward a few more years and here we all find ourselves wrapped up in the hands of a COVID-19 based pandemic, and for those of us fortunate enough... working from home full time. Many of us also found ourselves as poor substitutes for the amazing teachers that our kids had in school. Here we were, overnight seemingly, tossed into a world where we were expected to be as productive as we had ever been at work... and also be immediately available for our kids when they needed help for something related to school... or any other creative thing that came to their minds. 

Time management and retaining a sense of flow in my work life became an immediate challenge. My kids needed help understanding some of their assignments, and I was their substitute teacher. My employer required me to be continually making progress on all things work related. How was I going to get through this without making my kids feel guilty for asking for help? How was I going to claim the time required to make meaningful progress at work? Hellooooo to tha Pomodoro!!

I've rediscovered my disciplined relationship with the Pomodoro Technique. There were several days where at the end of the day I was asking myself why had I not completed anything. It was in part the nature of the work that I was working on, and in part needing to be the awesome dad/substitute teacher my kids needed me to be. I've been using the Pomodoro Technique as I always have, really no different other than I don't really pair at my current employer. I'm just using it much more regularly lately than I had been over the past year or so. It's helped me with letting my kids know when they can snag me to ask questions they have needed help with. And it's helped me with staying focused and on task to get through the day to day coding work that I do. The family get's me for little windows of time, and I get a state of flow through my day. It's honestly been a godsend.

All of that having been said, my hope is to start utilizing some of the aspects of the technique that I haven't been using. If I'm successful in pulling them in, I'll check back here and share how it has affected my work. If you've not ever tried the technique, I encourage you to give it a shot. I think you'll be surprised at how helpful and useful it can be.






Sunday, September 9, 2018

Using 'host' while Bootstrapping Calm

I've been in the process of bootstrapping Calm (a new app I'm building out as part of my side hustle). Every time I set up a new project from scratch, I'm reminded of those things that I do only very rarely. Setting up the VM, nginx, ssh, firewalls... all of these are things I do rarely in comparison to the day to day development work that I do.

I'm always pleased to find a new small utility or tool along the way. Today I found the host command for verifying that the dns servers that I'm hitting from my house have the updated name servers I just adjusted with my domain registrar. It's an alternative to nslookup, and gives some really useful information.

For my needs, the following did the trick

host -t NS getcalm.io

The -t NS piece tells host to query for name servers, which was just the piece I needed. And yes, I was pleased to find that the new name servers had already propagated.

getcalm.io name server ns3.digitalocean.com.
getcalm.io name server ns1.digitalocean.com.
getcalm.io name server ns2.digitalocean.com.

Tuesday, May 17, 2016

Eventually Crappy People Show Up, and I'm Flattered

ShopToTrot has been out for a little more than a year now. We've gotten enough users for me to say that there is enough interest to keep going, and that feels really really killer. Like anything that attracts people online, some people that come through can be, well Crappy. There, I said it. By Crappy I mean that they have no intention of using the system as it was intended. They are there just to cause trouble.


Well ShopToTrot has received enough attention that we've gotten our first Crappy user that hung out just to put junk ads into the system. This one did have a sense of humor though. He or She at least mocked us a bit by putting in a photo of their "horse" (seen above) that mirrored our stock photo that we use if you don't put any pictures of your horse in (seen below).


For a moment, I was highly irritated. But that shortly gave way to flattery. Someone cared enough to come into our system and stink it up a bit. My point to all of this is simply, enjoy the Crappy people. They can't help themselves, and truly probably need a hug.

More to the point, they are a signal that you are becoming successful. And... if it weren't for them, you might not harden the system.