Run Local Scripts on Heroku

In order to run an arbitrary script on Heroku, you can use the Heroku console. They state that "you can use heroku console as a stand-in for Rails’s script runner", but one key component of the script runner is that you can run files. You can run files in your git repository that are deployed to the instance that you want to run them on by using the method advocated by Steve Wilhelm.

What if the file is not checked in or you need to make rapid modifications for prototyping? If you have a lot of code that you want to write and you want to be able to easily modify it, try the solution below. Manually typing in many multi-line statements at the console (and retyping when you make an inevitable mistake) is frustrating.

Read on →

How to Run A Successful Brown Bag System

Software Engineering Professionals has a brown bag system that has been going on for over a year now. This post will describe how this successful system works.

Overview

Brown bags (also known as 'lunch and learns') are a great way to spread knowledge among coworkers. They are a way for managers and employees to present on topics they are interested in. As the name suggests, brown bags are held during lunch. People bring their own lunches, and kill two birds with one stone by learning and eating at the same time. Presentations or fishbowls are generally the formats of choice.

I think the biggest benefits of a well-run brown bag system are:

Read on →

Redundant Communication Redundancy

I'm sorry I wrote such a long letter. I did not have the time to write a short one.

Abraham Lincoln

For a long time, I strove to be efficient in communication. I would carefully consider the right words for things, especially when writing. But I realize now that good communication should have some redundancy.

Most of the time, the point of communicating is to convey information. Of course, there are other reasons people might converse. Redundancy is nice because it gets the message across eventually. Communication is inherently a very lossy channel.

Read on →

Show Git Version a Heroku Repository Is Using

I tried git show and git log, but these operate on the local repository and defined remotes. In order to see what git treeish your Heroku repo is using, try:

$ git ls-remote git@heroku.com:APP-NAME.git
97ec101adde21cfaf7f8c3ed47656e	HEAD
97ec101adde21cfaf7f8c3ed47656e	refs/heads/master

To find out the Heroku git repository name, you can also try

Read on →

What Are Your Negative Gains?

I came upon a helpful tool for diagnosing why I sometimes do things that logically seem to be against my best interests. Odds are, you are probably doing it too without even knowing it.

The concept

The concept is "negative gain." It is the positive reinforcement that one gets for doing behaviors that have negative results.

It is easier to make the changes you want once you are aware of what you get out of being the way you are. This is called the 'negative gain'. It is what we give ourselves for unconsciously not choosing to be or do what we want out of fear of failing.

A negative gain provides a temporary compensation – a kind of second best – for finding an excuse not to do what we want to do, because our fear prevents us. Negative gains are false friends, because they seem to make us feel better in the short term, but turn out to be a sham as we realise we are failing to make things better for ourself.

We even feel worse when we keep on using the same old mechanisms of avoidance. Negative gains are different from 'rewards' where we have chosen to be or do what we want. Examining some typical negative gains should make the concept clear…

Read on →