RSSAmplifier

Blog

Seven steps

Recent content on Seven steps

blog.trevoke.netRSS feed ↗90 posts

Latest posts

GenAI Is a Power Tool — Don’t Use It Like a Crutch


 
You're knee-deep in a sprint.
 
 
 A teammate is out sick. Product wants the filtering module updated by EOD. You’re juggling two different refactors and a Slack thread that just won’t die. You think: 
 
 “I’ll just ask ChatGPT for the price filtering logic — it’ll save me an hour.” 
 
 
Fast forward: the code runs, the tests pass. Ship it. 
 
A…

Agile and lean art delivery


I've been helping teams and organizations improve their approach to agile and lean delivery for a decade now, and by far one of the most difficult things to wrap one's head around is the idea of iterative delivery of value. I don't know about you, but I'm tired of these various hypothetical images depicting what agile delivery is supposed to look like. Is it a skateboard that becomes a car?…

Slack time explained


 
What problem are we trying to solve?
 
 
 You're a software product team. Your job is to steadily deliver working product. Generally this means there's two types of work you're going to do: 
 
 Work that directly correlates to delivering value to the customer 
 Work that directly correlates to the ability to keep on delivering value at the same pace 
 
…

GenStage demystified


GenStage is a miracle of UX for developers. There's only one catch: because of its purpose, it's built for the machine, not for the developer. Let's go over what GenStage is for, and see just how simple it is to start using it. 
 
 
Why would you use GenStage?
 
 
 
GenStage is what you would use if you had 'some work' ( events ) that needed to go through one or…

Choosing the right editor


 
Choosing the right editor
 
 
 
 
Intro: My editor history
 
 
 
Here are my 'credentials'. You know, establishing why you should be reading this at all. 
 
When it comes to editors, I've honestly fumbled around quite a bit in the past fifteen years or so. I had not encountered an editor until some dude taught my Comp Sci 6/9 class and…

The first step in learning any new programming language


Part of being a professional programmer is learning new languages (seriously — past a certain point, you should be fluent in a couple of languages, but that's another blog post), and part of being a good programmer is being effective at doing so. The very first step in learning a new language is being able to write some code with it. Further steps usually involve mastering the syntax as well…

Maintainability Is Relative


I just found a great example of the variability of the need of creating maintainable code. 
 
Somewhere around 2006, I created a script that posts to the Livejournal community daily_tao a new chapter of the Tao Te Ching every day. Today in 2016, I had a need to look for the script, the second time in maybe the last eight years that I had to look at it. 
 
I temporarily wasn't…

Benefits of a rapid test suite


 
The value of a rapid test suite
 
 
 
 
Developers and codebases
 
 
 
The bare minimum required of a developer is 'make this change without breaking anything else in the code', and if you've been around software development for any period of time, you know that's harder than it seems. 
 
Most of the time that a developer spends on any given…

Why Elixir is the next Great Tech


 
Elixir, because:
 
 
 
I think of Elixir as an idea whose time has come; or rather, a great gathering of ideas. 
 
 Erlang has solved the problem of distributed computing (and therefore, of concurrency) decades ago, and now concurrency is a very desirable tool, as the amount of data we crunch regularly has increased exponentially. 
 TDD has brought a more…

The value of estimates for a team


 
What this entry is and is not about
 
 
 
This entry talks about estimates in a relatively perfect world. This entry does not talk about problems that teams run into when dealing with estimates in a world where estimates are often misunderstood and where parties try to pile up additional meanings and metrics to estimates. 
 
 
 
 
Why talk about…

The code showed that I understood a wall existed


Someone I worked with once said, 'The code didn't demonstrate that I hit a wall, just that I understood a wall existed.' 
 
This colleague had been using the technique of Test-Driven Design (TDD) to methodically get the codebase up to a point where it could be refactorable and, at the same time, to a point where a problem with the current design decisions could surface.
He was…

Lesson from emacs: keep data easy to manipulate and easy to present


 
Spreadsheets
 
 
 
Spreadsheets are evil. And do you know why? Because they're too powerful. Here is the sweet spot of spreadsheets: tables of related data on which calculations need to be made . Here is not the sweet spot of spreadsheets: everything else . 
 
Spreadsheet software is so powerful nowadays that you can make visualizations for almost anything. And…

Shu ha ri and evolution of a skill

&#xA;Shu Ha Ri comes from the world of Japanese Noh theater, and has been since attached to the world of martial arts and <a title='Alistair Cockburn's words on Shu Ha Ri' href=' http://alistair.cockburn.us/Shu+Ha+Ri '>Agile development</a>. Roughly, 'shu ha ri' means 'learn / detach / transcend'. The link has some words about that meaning. I'd like to talk about my particular take on Shu Ha Ri,…

Learning and fear

&#xA; “Life is going to present to you a series of transformations. And the point of education should be to transform you. To teach you how to be transformed so you can ride the waves as they come. But today, the point of education is not education. It’s accreditation. The more accreditation you have, the more money you make. That’s the instrumental logic of neoliberalism. And this instrumental…

The Litany Against Fear

&#xA;So, the litany against fear goes like this: &#xA; &#xA; I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain. &#xA; &#xA; &#xA;And here's my…

Ruby is alive and well

&#xA;I'm back from Rubyconf. &#xA; &#xA;Some people say Ruby is dead. We can probably gloss over Zed Shaw's famous <a title='Zed Shaw's famous rant on the Rails community' href=' http://web.archive.org/web/20080103072111/http://www.zedshaw.com/rants/rails_is_a_ghetto.html ' target='_blank'>rant</a>, since it's from roundabout 2007. My understanding is that the thought came about because of the…

First Class

&#xA;The first class went really well. &#xA; &#xA;My teaching tempo is still pretty good, though I did underestimate how much information I was giving the new students. Next time, I need to make sure I don't overwhelm them, and keep them to a smaller set of basics. &#xA; &#xA;This feels right. I know it's what I'm going to keep doing. Now I need to balance continued growth with proper teaching…

Sparring

&#xA;<h1>What Sparring Is</h1>&#xA;Sparring is a playful and explorative interaction. &#xA; &#xA;Sparring is an exercise, a drill. The Japanese use the word KUMITE - which basically means 'grouped hands' or 'pair hands', 'joined hands', 'hands together' (the Wikipedia article suggests 'grappling hands'). &#xA; &#xA;Sparring is a two-person free-form exercise wherein you get to examine scenarios…

School creed

&#xA;In the dojo where I spent my formative years as a martial artist, there is a school creed. A quick search online has revealed that many schools have a similar creed. Every class says it as we begin, after bowing in, before calisthenics. I hear it and/or say it about three times per dojo night. &#xA; &#xA;It's a simple creed, and clearly not unique. Here's what it says: &#xA;…

Add a user to the wheel group in OSX

&#xA;Why are these things always so weird? Someday I'll understand why OSX is set up that way. And on that day, I'll probably weep. &#xA; &#xA;<blockquote>$ sudo /usr/bin/dscl . -append /groups/wheel GroupMembership <em>username</em>&#xA;<p style='padding-left: 30px;'></p>&#xA;</blockquote> &#xA; &#xA;This was found here : https://discussions.apple.com/thread/1230828?start=0&amp;tstart=0

Is Rails dying?

&#xA;More to the point, should Rails die? &#xA; &#xA;Rails brought a lot of great things - it made it dumb easy to package an entire app together. It abstracted the complexity of the storage layer. It created an entire market. Things like Heroku, Railsonfire/codeship and other companies turned a profit by extending the benefits of Rails. And things like Capistrano were born. &#xA; &#xA;Everything…

Hard-and-fast, black-and-white rules for getting started with Object-Oriented Programming

&#xA; No object should have more than three public methods &#xA; Objects should not have getters or setters &#xA; Everything else must be private &#xA; If three private methods are doing something similar, then maybe those are the public methods of another class &#xA; Never inherit &#xA; Always compose &#xA; Changeability is the most important thing &#xA; A 'good' variable name is a name that…

Ruby: gem ffi on OSX Mountain Lion 10.8

&#xA;EASY! &#xA; &#xA; sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2 &#xA; &#xA;&nbsp; &#xA; &#xA;That's it. You can now install ffi 1.5.

Hear no evil. See no evil. Speak no evil.

&#xA;I had an epiphany tonight about something that just about everyone knows: the three monkeys. And I wanted to share it with you. &#xA; &#xA;The three monkeys are accompanied by the words: 'See no evil. Hear no evil. Speak no evil.' The funny thing is that one monkey is covering his eyes, one monkey is covering his ears, and one monkey is covering his mouth! Let's examine that for a second.

The schism in martial training paradigms

&#xA;<h2>You're training wrong! No, YOU're training wrong!</h2> &#xA; &#xA;A recent set of conversations have led me to examine the major difference in martial training. I'm going to start by separating training in two categories, making an imperfect black-and-white model of the martial world: &#xA; &#xA;<ul>&#xA; <li>Traditional eastern training</li>&#xA; <li>Jeet Kune Do-like…

Devise &#43; rspec error: undefined method &#39;name&#39;

&#xA;If you're using Devise and rspec on Rails 3, and you want to override a controller, and you end up with an error that makes no sense whatsoever: &#xA; &#xA; &#xA; &#xA; 1&#xA; &#xA; &#xA; Undefined method 'name' for nil:NilClass &#xA; &#xA; &#xA; &#xA; &#xA;well then, you probably want to add the following line to your tests: &#xA; &#xA; &#xA; &#xA; 1&#xA; &#xA; &#xA; @request . env […

The Tooth of Knowledge (Lyrics)

&#xA;This song is at least as old as 1973 and is originally from Italy (Giorgio Gaber - Dente della conoscenza). If you like finding patterns, making analogies and metaphors, and overall pondering, then examine the tooth of knowledge in the contexts of: science, religion, culture, society (etiquette, etc), and finally, the internet. &#xA; &#xA;&nbsp; &#xA; &#xA;(note : 'SHHH' is an inhaling sound)…

Ruby: What is at_exit and how to write tests for it.

&#xA;Ruby has a neat feature called at_exit which takes a block and then executes the contents of this block when the program ends. There are a couple of VERY important details: &#xA; &#xA;<ol>&#xA; <li>It takes a block and converts it into a Proc object at the time of parsing. This means that the data has to be available in the binding, or you'll run into errors. Example: instance variables need…

Art of Agile Planning / Art of Agile Delivery, by James Shore and Diana Larsen

&#xA;The Art of Agile Planning (#aoap on Twitter, and AOAP from now on) is a 2-day course. The focus is on understanding the higher-level constructs of Agile and how they imbricate. In the course, one learns how the ideal Agile team is composed (hint: it's cross-functional and co-located) and what practices and techniques will be used to organize at all levels, from the developers' standup to the…

Society&#39;s focus on knowledge

&#xA;Here is a thought with which I've been wrestling for quite a while - the focus of society on knowledge and what it could be doing to us as people, human beings, and members of society, as well as to society itself. &#xA; &#xA;<h4><strong>Knowledge is power</strong><em> - knowing more can only help you</em></h4>&#xA;In the West (bounded to the east by Russia and to the west by the Americas),…

Grepping a single file for &#39;dynamic&#39; content

&#xA;You can use xargs to grep the same word through different files. But how do you use xargs to grep different words through the same file?&#xA;Like this: &#xA; &#xA; echo 'your fancy word finder stuff here' | xargs -i bash -c 'grep -n '{}' your/file/here &#xA; &#xA;Not something that's useful every day, but when you want it, hot damn is it nice to have.

git usage conventions

&#xA;We've been using git at work for a greenfield project and, so far, this has worked for us. It could be a useful template to get another team started.&#xA;We have gotten rid of the name 'master', which is only a convention anyway, and instead are using a few permanent branches:&#xA;<ul>&#xA; <li>production (only stable code which gets deployed to production goes there. The only branch to be…

Matt Damon&#39;s Speech at the Save Our Schools Rally

&#xA;I flew overnight from Vancouver to be with you today. I landed in New York a few hours ago and caught a flight down here because I needed to tell you all in person that I think you’re awesome.&#xA;I was raised by a teacher. My mother is a professor of early childhood education. And from the time I went to kindergarten through my senior year in high school, I went to public schools. I wouldn’t…

L&#39;inventaire - Jacques Prevert

&#xA;Une pierre &#xA; &#xA;deux maisons &#xA; &#xA;trois ruines &#xA; &#xA;quatre fossoyeurs &#xA; &#xA;un jardin &#xA; &#xA;des fleurs &#xA; &#xA;et un raton laveur &#xA; &#xA;une douzaine d'huitres un citron un pain &#xA; &#xA;un rayon de soleil &#xA; &#xA;une lame de fond &#xA; &#xA;six musiciens &#xA; &#xA;une porte avec son paillasson &#xA; &#xA;un monsieur décoré de la légion d'honneur &#xA;…

Get started with Ruby

&#xA;First, <a title='official Ruby site' href=' http://www.ruby-lang.org/en/ ' target='_blank'>get Ruby</a>. Install it as explained on the website. Once you're more comfortable with it, in a few weeks, you can check out <a href=' http://rvm.beginrescueend.com/ ' target='_blank'>RVM</a>. Not now though - you'd just confuse yourself. &#xA; &#xA;The two important command-line tools are going to be…

A scene from a story: martial arts training

&#xA;The Master had been clear on this point - the room was treated so the five physical senses would be useless. When Scott asked how, the Master laughed and told him it was magic. Scott had chuckled and shaken his head. Clearly, no point in arguing - not today's knowledge. &#xA; &#xA;Scott blinked and the test began. He relaxed and extended his consciousness into the ground below him and around…

Punches and the lower back

&#xA;Sensei helped me figure out that my punches are all wrong, and the issue has been traced to lower back muscles. Thankfully, I've got tons of subway time now, so I can practice standing. For those of you who don't study martial arts… That last sentence is not a joke.

New position at Cyrus

&#xA;On Monday, April 26th, I am starting a new job at Cyrus Innovation. It may well be fair that I am starting a new career - it's a hop, skip and jump for me. I'm switching from Systems Administration / Tech Support / Hell desk (not a typo, sadly) to Development / Programming. &#xA; &#xA;I am very much looking forward to it. It means a hobby/job switch: I will now do sysadmin stuff as a hobby,…

Ruby callbacks (hooks)

&#xA;Hooks are a fascinating bit of Ruby magic. They are methods you can define with actions to run when something happens. You can put triggers in your code. &#xA; &#xA;<a href=' https://web.archive.org/web/20130210090846/http://www.khelll.com/blog/ruby/ruby-callbacks/ '>This blog post</a> explains them very well; and for more information, get 'Metaprogramming Ruby', which is a great book - not…

Nidan test

&#xA;On February 28th, 2010, I took the test to become a second-degree black belt. &#xA; &#xA;Here is a summary of what I had to do, besides the calisthenics: &#xA; &#xA;<ul>&#xA; <li>All my empty-hand forms, opposite side. There are eight of them. This meant that if the first step was with the left foot, I had to do it with the right foot. I suppose you could also call that 'mirror'. The names…

Github&#39;s customer service: bad review

&#xA;I will readily admit that I don't know all that much about Github or Git for that matter. I use them, they're handy, and that's where it stops. I read about a git feature called 'smart HTTP', which would allow to communicate both ways with git (push and pull) with HTTP or HTTPS. So, I asked Github about it - it would be nice for them to have this feature, because I currently can't push to…

Teaching kusanku to sankyu

&#xA;Last night, after some kicking drills and sparring, sensei entrusted the adult class to me and told us to work on kusanku. The 'adult class' yesterday consisted of three sankyu.&#xA;I looked at the clock, rubbed my hands together and said 'Alright everyone, we have twenty-five minutes' worth of kusanku. Let me know if you have questions or doubts.' &#xA; &#xA;When we had finished walking…

Gentoo on a Dell Inspiron Mini 10

&#xA;There are a few gotchas: &#xA; &#xA; If you have a SSD drive, you need to <em>modprobe pata_sch</em> to see it. &#xA; when using GRUB, install it on whatever drive the hard drive is, even if it's /dev/sdc – and let your FSTAB use /dev/sda. Chances are that /dev/sda is your liveUSB. &#xA; In the kernel, in the I2C options, don't let it pick automatically - instead, select the algorithm options…

Country alert levels

&#xA;Let's break the monotony with something funny: &#xA; &#xA;The English are feeling the pinch in relation to recent terrorist threats and have raised their security level from Miffed to Peeved ' Soon, though, security levels may be raised yet again to Irritated or even A Bit Cross. The English have not been A Bit Cross since the blitz in 1940 when tea supplies all but ran out. &#xA;…

New gem: ListBrowser

&#xA;I was working on a parser for a very specific tree structure, and was frustrated that there wasn’t a simple way to parse it in irb. 'What??', I thought. 'I have to use my brain?! God forbid!'. So I set to using my brain a little more to create this tool. It’s not much, but maybe it’ll make someone’s life a little easier. &#xA; &#xA;Install: (set up gemcutter)&#xA; gem install ListBrowser

Git : moving a remote branch

&#xA;One can't actually move a remote branch, but you can copy a branch and delete a branch, so… &#xA; &#xA;Copy oldbranch in repo to newbranch . &#xA; &#xA; &#xA; &#xA; 1&#xA; &#xA; &#xA; git push {repo} {oldbranch}:heads/{newbranch} &#xA; &#xA; &#xA; &#xA; &#xA;Ex: git push origin foobranch:barbranch &#xA;renames foobranch to barbranch &#xA; &#xA;Remove a remote branch: it’s all about the colon!…

Inter-array permutations in Ruby

&#xA;I don't really have a better name for this. It's also not completely clean, but it works. I had, almost a year ago (362 days ago), written a blog post about <a href=' http://trevoke.net/blog/2008/12/20/lexicographic-permutations-in-ruby '>lexicographic permutations</a>. That was about permutations of elements within one array.&#xA;Someone on ruby-forum asked about permutations between…

Random constrained permutations in Ruby

&#xA;Look, Ma, these are my baby steps in algorithms! &#xA; &#xA; &#xA; &#xA; 1&#xA; 2&#xA; 3&#xA; 4&#xA; 5&#xA; 6&#xA; 7&#xA; 8&#xA; 9&#xA; 10&#xA; 11&#xA; 12&#xA; 13&#xA; 14&#xA; 15&#xA; 16&#xA; 17&#xA; 18&#xA; 19&#xA; 20&#xA; 21&#xA; 22&#xA; 23&#xA; 24&#xA; 25&#xA; 26&#xA; 27&#xA; 28&#xA; 29&#xA; 30&#xA; 31&#xA; 32&#xA; 33&#xA; 34&#xA; 35&#xA; 36&#xA; 37&#xA; 38&#xA; 39&#xA; 40&#xA; &#xA; &#xA;…

Calling Rake tasks within the Rails env

&#xA;<a href=' http://railsblogger.blogspot.com/2009/03/in-queue_15.html '>Calling RAKE tasks within the Rails environment</a>. &#xA; &#xA;Good to know.

On re-reading old code

&#xA;I came across this beauty in some old code of mine: &#xA; &#xA; &#xA; &#xA; 1&#xA; 2&#xA; 3&#xA; 4&#xA; 5&#xA; 6&#xA; 7&#xA; &#xA; &#xA; def same_modality? list &#xA; check = list [ 0 ][ 0 ] &#xA; list . each do | i | &#xA; return false if check != i [ 0 ] &#xA; end &#xA; return true &#xA; end &#xA; &#xA; &#xA; &#xA; This was 'necessary' because I got an array of one-element arrays back, and…