The long way through Software Craftsmanship

On private but leaked information in a SaaS

Nov 4, 2019 - 3 minute read - Comments - gitexamplesensitive-informationcodenameuuidtoolboxtoolstealth-modenon-disclosure-agreementsecurity-clearance

This is another tool for your toolbox: how to uncorrelate public and private information. Context Context: there are clients who have sensitive information. Some is just ‘companies being stealth’ (e.g., don’t want to make public until launching), some is just protected by a Non-Disclosure Agreement (NDA), some are protected by security clearance. The more sensitive, the greater protection needed. This tool applies to all sensitive information, regardless of where it’s stored or how it is used.

Automatically keeping the intermediate history of your work using git

May 29, 2019 - 2 minute read - Comments - tooltoolboxgitdocumentationspikeautomationmarkermarker-interfaceflowproblemsolution

This is another tool for your toolbox: using git to automatically document your development process (special cases only.) Context When I’m spiking a feature, I usually get in the zone (e.g., Csikszentmihalyi’s Flow), and I can forget my good engineering practices, searching for that desired answer. After a few of those bouts of coding, you realize you’re wandering. You circle around, get lost, get back on track, then get lost again.

Writing safe(r) bash scripts

Jul 13, 2018 - 13 minute read - Comments - bashshguidescriptone-offmaintenancesolidsingle-responsibility-principleperlrubymaketip

After writing more and more bash scripts for a client, I’ve decided to write down my thoughts about it. This assumes you have some knowledge about bash, as it is not intended as a beginner’s tutorial. Why bash scripts? Bash is present in almost every unix/linux-based stack, now some Windows as well. An exception is the ‘alpine’ docker images, which have a smaller, lighter shell (more on that later) Everything that you can automate, you can do from bash.

Questioning the existing choices

Jul 4, 2018 - 2 minute read - Comments - clientquestioningchoicepragmatismversioninggitsolutionif-it-aint-broke-dont-fix-it

Context For a client, we have worked on a service that works with files (containing sensitive data) that get corrupted very often. The use case is generally: Two/Three file opens per day One modification per 10 file opens One corruption per 100 file opens Initial solution The initial solution was just to copy the file (file.txt) before opening, after closing. This results in two files (YYY-MM-DDTHH-mm-ss_before_file.txt, YYY-MM-DDTHH-mm-ss_after_file.txt).

Support for out of hours on-call support

Oct 5, 2016 - 1 minute read - Comments - on-callsupportreadme

As the preface for the guide for on-call support, a positive note: README You’re cool. I know it. Do not trust yourself, trust me that I trust you. You might be sleepy. It’s OK Everything is going to be fine. Take 5 minutes to think about anything, anytime. Especially before any rash decision. With great power comes great responsibility. Use it wisely. Restoring the services comes first, investigation comes second Do the very minimum of investigation after the incident (collect things that might disappear), leave the rest for the next day on office hours Whenever everything is done, go to sleep but keep an eye on your phone.

Refactoring functional code

Sep 28, 2016 - 1 minute read - Comments - clean-codefunctional-coderefactoringrefactorcode-snippetsnippet

With my pairing mate we have refactored this piece of functional code. Original code: function filterTokens (rawTokens) { const cleanedTokens = => (token.length && token[0] === '-') ? token.substring(1) : token) return cleanedTokens.filter(token => token !== '' && stopWordsArray.indexOf(token) === -1) } Refactored code: function filterTokens (rawTokens) { const cleanedTokens = => startsWithADash(token) ? removeDashFrom(token) : token) const processedTokens = cleanedTokens.filter(token => isNotEmpty(token) && isNotAStopWord(token)) return processedTokens function startsWithADash (token) { return (token.