In IntelliJ set up a run configuration (Run/Edit Configurations) as follows:

Add a new ‘Remote’ configuration
Give it a name
Set transport to ‘Socket’
Set debugger to ‘Attach’
Set host to localhost set port to 9999 (so it matches the port you set in SBT_OPTS in the sbt.bat file)

Now if you scroll the list for a while, particularly if you sort of wiggle it up and down quickly and then let it go the list will be completely covered by a solid block of the colour specified in the childDivider property. This will remain for a few seconds and then disappear.

Once upon a time I was presented with the following test in an interview:

Given a mapping of digits to an array of characters, ie."1"={},
"2"={"A","B","C"},
"3"={"D","E","F"},
etc.

Print out all the string permutations a given input of digits maps to.
So for instance the string “23” should return:
AD
AE
AF
BD
BE
BF
CD
CE
CF

Another way to think of this is a function that returns all the possible combinations of letters the digits could represent if they were keypresses on a standard phone keypad.

I did a pretty bad job at this when I was asked it, partly because it was quite late at night, and partly because it’s not the sort of thing you find yourself doing that often, but today I found myself with a little bit of spare time on my hands and thought I’d give it another go.

I chose to do it in Scala rather than in Java which I had used last time and of course this led to the solution being much more elegant and succinct. If fact this is exactly the sort of problem that demonstrates the value of functional programming.

I find it useful to be able to quickly generate a list of all changes in the current branch which have not yet been merged into master. It’s a good way to come up with a change list when doing a release for instance. To do this in git you can use the following:
git log master.. --pretty="%s"

This assumes that you are on a branch which is off master (if you are on master you could use the path ..my-branch) and that the changes have not yet been merged into master, and it will give you a list showing only the commit messages, ready for copying and pasting into that release note.