Skip to content

Instantly share code, notes, and snippets.

View mikermcneil's full-sized avatar
🧑‍🚀

Mike McNeil mikermcneil

🧑‍🚀
View GitHub Profile
@mikermcneil
mikermcneil / 2023-scraps-from-fleet-user-story-issue-template.md
Last active February 21, 2023 04:12
2023 scraps from Fleet user story issue template (scrum, some content repurposed into fleetdm.com/handbook) For more info see https://github.com/fleetdm/fleet/pull/9375/files#diff-bed3ac553c0b018fe8820eab07bd3ec4b0423c6a149a178e59a80d5fa31b3c33
name about title labels assignees
🎟  Story
Specify an iterative change to the Fleet product. (e.g. "As a user, I want to sign in with SSO.")
story,:product

A user story is estimated to fit within 1 sprint, is QA'd, and drives independent business value.

@mikermcneil
mikermcneil / advanced-javascript.md
Last active December 14, 2022 13:53
Some things I've learned about writing Javascript

You know, if you simplify something, you don't have to work as hard, learn as much, or bother other people with as much complexity.

That's how I like to write code anyway. More conventions, fewer ways to do things, less cognitive load.

More creative energy to make good decisions. More brain space to move quickly.

Here's what I'd say if I was teaching a younger version of myself advanced JavaScript:

  • data types
  • made a commitment not to use classes, new, or constructors at all (plenty of other ways to look clever)
@mikermcneil
mikermcneil / client-side-validation.md
Created November 8, 2022 17:17
Should I use client-side validation any time I possibly can? When is it worth it to use server-side, instead of client-side validation?

Client-side validation is always less work and easier to maintain because it requires one less integration point between backend and frontend, and no spinner, so no timing issues. Always use client-side validation any time you can. Occasionally it seems easier to check things on the server, but without exception, I have always found this impression to be wrong, when looked back at in retrospect. There are some times you need server-side validation, such as for uniqueness constraint checks in the database, or any kind of database-based check. (Because the browser doesn't have access to the entire database, nor should it.)

@mikermcneil
mikermcneil / principles-for-delivering-professional-services.md
Last active November 17, 2022 04:12
Principles for delivering professional services

Principles for delivering professional services

mikermcneil, 2022-08-10

A few principles for delivering a great customer experience and successfully completing professional services engagements. The following are lessons that I had to learn the hard way. Hopefully, they save you some trouble!

  1. Daily communication with the customer (like a standup during the engagement)
  2. Timebox the engagement (ok to scope features, but also set a timeframe.)
  3. Make it explicit who is working on it and how many hours they'll be working per week.
  4. Do frequent demos during the project (weekly or biweekly). If the customer doesn't show, demo internally anyways. Fix bugs that come up in the demos before moving on. Fri morning or Thu afternoon demos work best, to leave time for bug fixes before the week (and sometimes project timeframe) ends.
@mikermcneil
mikermcneil / do-i-need-queues-in-nodejs.md
Created January 17, 2022 02:30
Do I need queueing in Node.js / Sails.js?

Question

So I guess in Rails and Laravel world queues and background jobs are really all front and center but I don't hear that mentioned even moderately in Node. What will be the equivalent?

Answer

Mike McNeil sent the following messages at 8:21 PM

The equivalent is like what's in the sendTemplateEmail() helper in default new sails apps, at the bottom

I know of a couple of valid reasons to use queues in Node.js:

@mikermcneil
mikermcneil / values-2022-01.md
Last active January 13, 2022 06:32
everything is in draft
@mikermcneil
mikermcneil / monitor-a-sails-app-in-papertrail.md
Last active August 3, 2022 16:08
Here's how to monitor your Sails app for missing `await`s, 500 errors, failed script runs, and more

Monitoring your Sails app for errors

Monitor your Sails app for missing awaits, 500 errors, failed script runs, and more!

Here's how to monitor a Sails app for errors using Papertrail, a logging tool that works with anything but is particularly easy to use as a Heroku add-on. This search string uses Papertrail's search syntax, but the log output it's searching for is not Heroku-specific; neither is it Papertrail-specific. (Search "sails.js platzi" for a tutorial with an example involving Heroku. See part 5.) Anyway, you can use the general principles here to monitor a Sails app using any logging tool.

(error: Sending 500 ("Server Error") response:) OR (error: Background instruction failed:) OR (WARNING: A function that was initially called over 15 seconds) OR (Error: Internal error occurred while running) OR (warn:) OR (Could not run script)
@mikermcneil
mikermcneil / finding-the-fault-lines.md
Last active May 9, 2021 01:27
Finding the fault lines - Longitudinal vs latitudinal work division

Finding the fault lines

May 8, 2021

In our agile world, we often divide up tasks longitudinally; that is, along goal-oriented lines. This results in mini-projects like “put documentation on the website” or “put a contact form on the website”.

This is an intuitive and low-effort management exercise, which can have great results. And I love how it lets you put trust in people to figure things out. The problem is, to assign a directly responsible individual (DRI), they have to be the right person to make decisions about every part of the project: from the marketing copy to the coding to the deployment of the changes. If they don't? Not only can it be very frustrating for them, but output and quality of work can suffer. Not to mention that getting things back on track can eat up valuable time for other members of the team.

Alternatively, you can divide tasks latitudinally - along their natural, functional lines. These lines have to be felt out, since they depend on the nature of the types of work in

@mikermcneil
mikermcneil / is-sails-maintained.md
Last active January 22, 2023 04:05
Is Sails maintained?

Originally posted in sindresorhus/awesome-nodejs#998 (comment)

Just want to clear things up here: the Sails framework is actively maintained and widely used. For context, I am its creator and BDFL. @eashaw is lead maintainer and community manager. @DominusKelvin also maintains an active supplementary community called SailsCasts. https://sailsjs.com/support has a full list of resources you might want to check out. As far as what that means: there's a daily check for vulnerable code paths, a weekly roundup of community GitHub issues/PRs, and active development as needed to fix any priority bugs. This is all funded by Flagship customers and supplemented by my continued personal financial commitment to keep the Sails framework alive.

This will continue for many years to come.

image ![image](https://user-images.githubusercontent.com/618009/108785018-37378000-753

@mikermcneil
mikermcneil / avatar.component.js
Last active June 8, 2020 18:24
Reference component (parasails / Vue)
/**
* <avatar>
* -----------------------------------------------------------------------------
*
* @type {Component}
*
* --- SLOTS: ---
* N/A
*
* --- EVENTS EMITTED: ---