how easy should be it reach an author?

I was reading Deep Work:Rules for Focused Success in a Distracted World. On page 243, the author writes:

Most nonfiction authors are easy to reach. They include an e-mail address on their author websites along with an open invitation to send them any request or suggestion that comes to mind. Many even encourage this feedback as a necessary commitment to the elusive but much-touted importance of “community building” among their readers. But here’s the thing: I don’t buy it.

Scott and I are non-fiction authors of three cert books. We don’t encourage email. We do encourage communication. All three of our books encourage readers to contact us using the forums at CodeRanch.com. This works well for us because there are others who have the possibility to answer and it doesn’t come with a quick reply assumption. (Although we often do reply within a day or two if nobody else has first).

We do like hearing from readers. We like hearing about their success on the exam. We like hearing when they find an errata. (see why posting errata matters). We like hearing what they are looking for clarification.

I wonder if this comes from our domain. Computer programmers don’t write a book expecting to make loads of money. And we aren’t required to publish for our jobs. The author of this book is a professor. So I wonder if he thinks of his book differently? Or if it is that Scott and I were active on the forums before writing a book so wish to remain accessible?

github two factor and eclipse

I was talking to a coworker recently about using Eclipse with Git. I had done this back in 2010, but it has been a while. I use git at the command line. He also said Eclipse Oxygen support for Git is better than in the past. Could be. To be honest, I don’t remember doing this in 2010 other than the command line being far easier.

Anyway, I decided to try again. The UI was intuitive. I went to commit. The git staging view (confirmation dialog) showed up at the bottom where the console is rather than popping up like SVN does, but that’s minor. It gave me a choice of “commit and push” which is nice as it isn’t a two step operation.

Then I hit a problem. I turned on GitHub two factor authentication back in 2014. Which means my user id/password isn’t accepted through Eclipse. Luckily this is easy to get past:

  1. Go to github and choose settings (from the upper right pulldown under your avatar)
  2. Click the very last link which is Personal Access Tokens
  3. Choose “Create new token”
  4. Enter a description. I choose “Mac Eclipse”
  5. Choose which permissions you want to grant. I chose the Repo checkbox.

Then I tried to commit and push using my git username and the generated token string as the password. Success. (I didn’t pull because nobody else use this repo)

Note: I got an error “git-receive-pack not permitted” when I didn’t choose the Repo checkbox. In Eclipse, it showed my change as committed (which it was), but it wasn’t pushed.

eclipse and line wrapping

Last month, a co-worker referenced an Eclipse setting that I wish I’ve known about for years.  With streams, I typically indent code like:


list.stream().filter(j -> j.disabled)

.map(j -> j.name)

.forEach(System.out::println);

Then I’d let Eclipse format the code and it would turn into a one (or two) line wall of text. I’ve been “solving” that problem by adding comments before some of the methods so Eclipse couldn’t wrap it. Some of those comments are useful for those new to streams. However many are redundant. You probably don’t need a comment that the last line outputs :).

Then my co-worker taught me that there is an Eclipse setting to control the line breaks. Wish this was on by default!

How to configure

If you don’t already have a custom Eclipse formatter:

  1. Eclipse preferences
  2. Java > Code Style > Formatter
  3. New
  4. Enter a name
  5. Click ok

Control line breaks

  1. Edit the profile
  2. Line wrapping tab
  3. Check “Never join already wrapped lines”