Embrace Your Inner Artisan

“You ask why we would bother with this hold equipment when we could feed a computer design into a software-operated machine to do most of the manufacturing for us instead. But where’s the fun in that? We love getting our hands dirty making things and fiddling with little parts to get them to work together. You build a closer relationship with what you’re making when you work by hand. You can hear when the cutting speed of a lathe or drill is perfect, and you can feel from the resistance wether the pressure of your tool is correct. We like this sense of connection to the objects, and to the generations of artisans who came before us.”

“Hands of Time – A Watchmaker’s History” – Rebecca Struthers

Wether you’re a watchmaker, a chair craftsman, construction worker … or even software engineer – this connection to craft, and craftsmanship is timeless, and I believe, human. Even the artisans among us revere the other artisans around us, and we all experience that sense of awe when we newly perceive an artifact of “art.” Being artisan is a universal human trait. I think at its most basic core this is because storytelling is our unique ability amongst the animal kingdom, and at the very least, each of us has the capability for story telling. Even if we as individual may question our skill as story teller, it is in us. We can all at the very least gaze into the clear night sky and announce in awe : “Look — Stars!” A story is born.

We software engineers are also storytellers. We often forget this trait of our artisan selves as we are busy calculating how to move concept A from location S to location D. What we “do” (writing code, designing computery things) is to the end of doing work for humans, or giving other humans space to tell their story (even if it’s just the millionth “name, address phone” online form.. ugh!)

Software artisans speak of writing code that “tells a story.” This doesn’t mean writing code that spells out the text of “Hansel and Gretel.” We mean that the code we’re writing, the routines that accomplish that work for humans, need to be readable, need to tell the story of how that concept A made its journey from locatin S to location D. We need to tell the story even of what is “concept A” and what or where are it’s relative imaginary locations S and D. All this becomes tangible to humans in very abstract ways. A traverse from S to D … and now you have $100 added to your bank account. Some other A traverses from its S to D and now you have a brand new account on Instagram. We make these concepts reality and in the process have to tell stories.. both to our software-developer selves, and also to the other humans who are the “consumers” of this software. When we have the opportunity to be telling dual stories – one to ourselves, one that others will see and use – it is in this moment that we can pause and consider the ancestors who come before us, the stories they have told, or left a mystery. We have a connection to them, as they left stories and tools behind for us to use. In almost all modern software, we use “open source libraries” – collections of software written by other engineers, offered up to the public to re-use – to be integrated into their own story. Many of these software libraries have 10,000s or 100,000s of hours of developer time spent on their creation, often by dozens of other developers.

Take a moment today to appreciate the art you are creating, in whatever way you are telling a story. Even if it’s “Look, the Sun!” Someone will notice. Someone will experience your story.

Embrace your Artisan.

An ADHD Adventure

I have been on an ADHD adventure nearly my whole life. My first diagnosis was somewhere in my mid-late single digits (5-7ish). Back then it was ADD, and the only possible relief was Ritalin – as far as “we” know anyway.

A lot has changed in the nearly 50 years since then. I have been officially/unofficially diagnosed with ADHD for at least 20 years. Wellbutrin has been the Medical MD “solution”, which I’ve taken on and off. Only this past month, after 20 years, did a life coach ask me if I was on an ADHD med, with the focus of our coaching to handle my ongoing symptoms of lack of focus, trouble with organization/prioritization, and trouble with focus. Life coach says : Anyone on ADHD med should be having a much different experience with these issues.

So, a Psych MD consult and a new ADHD med starting today.

Do I feel different?
Maybe? It’s only been 4 hours. Seriously. I think I do sense better “presence”. I’ll follow up this post in a month or so.

DHH – Software’s Warrior

Warrior? That’s a bold statement, and possibly widely discarded by DHH himself and the industry at-large. Really, though, think through the HerosJourney, what are the basic traits of the Hero – courage, vision, principles.

DHH on courage.
The article RailsIsOmakase presents an underlying trait of DHH – courage to stand his ground, regardless of the hell-and-high-water that will come. For 10-years on he has stood by the principles of Rails, and really more personally, has stood by his own principled views, even in the face of wild backlash over his own bold statements in RailsConfPresentations.

DHH with vision.
Well, an easy seque from the discussion of courage – DHH has held the constant vision from the very start of where Rails fits in the wider arena of Web Frameworks, and that vision has been maintained through the years.

DHH as principled.
Courage and Vision need to be grounded on principles. Like Omakase, there are certain decisions that can be ceded and compromises that can be achieved, yet a set of main rules and guides drive the overall path of development and change over the Rails framework. There are a multitude of examples of this, and DHH has led the 37Signals team with principled vision through so many successful projects.

Whether DHH would consider himself to have ever been the Warrior of any Hero’s Journey is not really the point. We can celebrate his guidance and vision for the Rails project and by extension our Rails community by that name anyway, since what we can truly celebrate is the Courage, Vision, and Principled Guidance that DHH has given to us all these years.

Thanks David!

Rails + Webpack + Webpack-Manifest + React + Babel 7 + HMR – [chunkHash]

I’m writing this quick one up so you can save the 1.5 hours that I spent debugging this.

Terms :
HMR – HotModelReload – webpack-dev-server option to trigger browser-auto-refresh when webpack detects filechange (and re-compiles)

Here’s what I’m using :

  • Rails 5.2
  • Webpack-Manifest Gem
  • Yarn
    • Webpack (-cli)
    • Webpack-dev-server
    • @babel/core
    • @babel/preset-react

The issue : When running webpack-dev-server with --hot option (enable HotModelReloading, webpack compile fails with :

ERROR in chunk hello_react [entry]
js/[name]-[contenthash].js
Cannot use [chunkhash] or [contenthash] for chunk in 'js/[name]-[contenthash].js' (use [hash] instead)

Context : With Rails + Webpack-Manifest gem, webpack config is being used from ./config/webpack/environment.js (and it’s named siblings).

This SO discussed the problem and solution
https://stackoverflow.com/questions/50217480/cannot-use-chunkhash-or-contenthash-for-chunk-in-name-chunkhash-js-us
It does not unfortunately tell you very well what to do with

// 4th SO andswer of SO:50217480
output: {
    filename: process.env.production ? `bundle-[chunkHash].js` : `bundle-[hash].js`
}

Luckly, this SO includes a complete webpack.config.js (still not quite where we’re at with webpack-manifest… close.
We’ll notice that output.filename is part of the main config.
I validated this by adding console.log("webpack env", environment) to ./config/webpack/development.js and verifying that, apart from output of virtual-object names, :outputis indeed on the base config object.

SO (THE ANSWER) : edit ./config/webpack/development.js and add : config.output.filename = "js/[name]-[hash].js".

// ./config/webpack/developer.js - at least for my app

process.env.NODE_ENV = process.env.NODE_ENV || 'development'

const environment = require('./environment')

const config = environment.toWebpackConfig();
config.devServer = {
  contentBase: '.',
  host: "localhost",
  port: 3035,
  publicPath: 'http://localhost:3035/',
  historyApiFallback: true,
  proxy: {
    '/packs': { // string to look for proxying requests to api
      target: 'http://localhost:3035', // Path of your rails api server
    },
  },
}
config.output.filename = "js/[name]-[hash].js"

module.exports = config;

Enjoy!

Building an App – EKG

In this series, I’ll build an app in step-by-step posts that will produce an EKG (heart monitor) display.

The inspiration is the Phillips IntelliVue MP50 (found at my local hospital):

Tools we’ll use

Pretty much the whole point of this series… to learn some new tools and techniques:

  • Rail 6 – coming from a Rails 4/5 background, I’ll point out specifically “new to me” details.
  • SvelteJS – both introductory how-to and deep-dive into charting and real-time data streams.
  • Real-time data streams – although our sample data comes in CSV form, we’ll build some benchtesting harness to present this data to our front-end in “real-time”

Assumptions I’ll make

This tutorial makes many assumptions about you, the reader. Hopefully you can find what you need in the EKG – Resources page.

  • You know what Terminal is (or Cmd and PowerShell). You know what $ means in script examples
  • You know Ruby, and maybe Rails (not necessarily version 6)
  • You know some basic database operations, at least enough to understand Sqlite db

Project Details

I’ll be working through the following details over the series:

  • EKG sample data / downloads
  • Streaming real-time data to client (websockets)
  • SvelteJS
  • ChartJS (as a SvelteJS component)
  • ChartJS real-time update
  • Display layout
  • Automated downloads of sample data (web scraping the EKG sample-data site)
  • Creating a desktop app (ElectronJs + SvelteJS)
  • “VCR” controls over display – a design addition leveraging our desktop/mouse/keyboard oriented implementation

Let’s get started!

BlazorWasm template for Visual Studio 2019

As of Dotnet Core 3.1 Preview1 (3.1.0-preview1.19506.1), the blazorwasm template is missing from the default manifest.

If you’re following FreeCodeCamp – How to create a SPA with Razor pages and Blazor then this is a problem for you! As well, the New Project UI has changed and does not follow the VS 2017 flow.

The solution is found here. Use the dotnet CLI to add the blazorwasm template and then to create the demo project.

dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview1.19508.20

Now dotnet new -l will show blazorwasm as a template option.

dotnet new -l

Templates                 Short Name    Language     Tags
----------------------------------------------------------------------------------------------------------------------------------
Blazor Server App       blazorserver    [C#]         Web/Blazor
Blazor WebAssembly App  blazorwasm      [C#]         Web/Blazor
                                                     /WebAssembly

And now, create the demo Solution :

dotnet new blazorwasm --hosted -o BlazorSPA

This creates the 3-project solution (--hosted) under the new folder blazorwasm (-o blazorwasm).

Update Oct 21, 2019 – Found “Get Started w/ ASP.NET Core Blazor” page, including Dotnet Core 3.1 compatible template.

Write Better Software : Embrace your Humanity

This is a bit of a stream-of-conciousness post about thought processes-vs-time.

As a software developer, I invariably encounter new challenging problems, algebraic, database, mathematical. I spend time working through these problems, and the larger more complex ones take significant time, hours, many-hours, days. The day problems are the frame of reference that is interesting here.

 
How do we solve our problems? How much subconcious thought is involved in brainstorming solutions, testing them against the constraints and requirements of the problem-set, and ultimately encountering a solution that fits?

 
I believe every human, in and out of technology work, encounters a situation to “sleep on it”. In the developer community, I have discussed with many many colleagues about problems and how a colleague solved it while eating breakfast, in the shower, in their dreams, etc. I have solved computing problems in every one of these ways, and I’m sure many more. I recall solving a problem while watching the sunrise once… and computing was not on my mind in the moment.

 
The fact is that every living moment of our life colours the work that we do in technology. These complex computing environments that we are implementing in technology today easily defy our abilities to immediately grasp the full-breadth of the design, the implications of design decisions, and the constraints, requirements, and responsibilities of components of the design at various levels of abstraction. Every time we are introduced to a new application design, it takes time to fully absorb that information and be able to make new hypotheses, suppositions, corrections, enhancements, and improvements upon that design. Our brain, though, is not as compartmentalized as we belive (or sometimes wish!). All those moments “off-hours”, spending time with family or friends, eating a meal, watching TV, reading a book, sleeping, dreaming… change the connections in our vast computational grey-matter. Those changes then directly affect the way we consider and imagine the technological problem-set that is also at hand over the time of days.

 
Our humanity colours everything we do and think about as computer scientists. It is extremely important that we embrace this aspect of our humanity, and embrace our colleauges humanity as well. Take time and give our wet-ware the computational time it takes to gain our insights and understandings of our common problem-sets.

“Sleeping on it” could be the best thing for your career you could do.

It has done wonders for my career!

Heroku ! Fingerprint already exists when key-comment does not match account email

I recently registered on heroku with my work email address : peter@fitzgibbons.info (obsfuscated)
My ssh id_dsa though is signed with my personal email address : peter.fitzgibbons@gmail.com.

Heroku doesn’t like this one bit.
Following this advice, I created id_heroku_rsa wtih my work-email comment.

Still no-joy.  But, this StackOverflow thread left a clue… using the ssh debugging output, I can see that ssh is still trying to send id_rsa or id_dsa.
The answer, included on that post is to ‘ssh-add’ the special key created.

Voila, now my push succeeds.

STOP SOPA

From Wikipedia on STOP SOPA DAY

Imagine a World
Without Free Knowledge

For over a decade, we have spent millions of hours building the largest encyclopedia in human history. Right now, the U.S. Congress is considering legislation that could fatally damage the free and open Internet. For 24 hours, to raise awareness, we are blacking out Wikipedia. Learn more.