An engineer who writes code should also write essays

Typewriter
A hipster PC (Image by Erik Dungan)

A couple of years ago, I came across an essay by Shubhro Saha, a software engineer at Facebook in California, entitled “Software engineers should write“.

I’ve been thinking about this a lot recently.

He writes,

“An engineer who writes code should also write essays.

“Software engineers should write because it promotes many of the same skills required in programming. A core skill in both disciplines is an ability to think clearly. The best software engineers are great writers because their prose is as logical and elegant as their code.

“[…] Even if nobody reads your essay, writing it will make an impact on you. It will clarify your opinion on a topic and strengthen– or even weaken– your beliefs. The process alone of putting jumbled thoughts into concrete words is valuable.”

It’s a very good essay with a very compelling argument.

At high school I ‘failed’ my English higher the first time round; I actually got a D pass but the school felt that I could do better. They were right: I sat it again in sixth year and got a C.

It wasn’t until I went to university and studied Hebrew that I really began to understand language better. After that I went back to English and read numerous books about syntax, and grammar and punctuation. And I read widely.

I read well-written books and articles and journals. As I read them I stopped to consider why they had been written that way. I questioned why certain words has been used: what effect did they have. I analysed sentence structure. And I observed how simple the best writing was.

And I wrote. I wrote a journal—I still do. And a blog (this one). And a book, which was published in 2007. I’m currently, and slowly, writing another.

Writing helps me to clarify my thoughts. It helps me to express myself better. And if any of it helps someone else, or makes them laugh, or look at something from a different perspective then that’s a bonus.

I suspect that it does also help me write better code. And at the very least: better comments.

If you are a coder then I encourage you to read the article. If you are a writer and are wondering whether you ought to learn to code then perhaps start here: please don’t learn to code by Jeff Atwood.

Using TreeSize Free to increase disk space

A couple of days ago, when I switched on my PC and opened My Computer I was presented with a bright red drive tile icon, indicating that it was running short of free disk space.

Drive C is red and reports 10.0 GB of 111 GB free
Drive C isn’t looking very healthy

I was puzzled as I had only recently run CCleaner to collect unused files, old browser caches, un-required file settings and bin them all. I was sure that I had over 13 GB of free space.

TreeSize Free

I turned to TreeSize Free to help me identify what was taking up so much space. I first blogged about TreeSize Free in 2011 in a post called My top free Windows 7 add-ons.

Once installed, all you do is right-click a folder (or drive), select TreeSize Free from the context menu and after running for a moment the application will tell you how large that folder and all its sub-folders are.

This is what it looks like.

Screenshot of TreeSize
TreeSize shows me that I have 5.4 GB of music in the Amazon Music directory

What I learned the other day was that four items were taking up the most space:

  • Podcasts (14.8 GB)
  • Amazon Music (5.3 GB)
  • XAMPP Apache server (2.9 GB)
  • Adobe CS4 applications (2.7 GB)

I deleted the podcasts and music—I keep the music I listen to on another drive, this is simply where I download them after purchase.

Then I uninstalled Adobe and XAMPP, and reinstalled them on a larger drive.

Now I have a much more healthy 36.0 GB of free drive space.

Drive C now shows 36 GB free
That looks more healthy

If you are in a similar situation, I thoroughly recommend TreeSize Free. As they say: if you don’t measure it, you can’t control it.

Stream Planet Rock radio in MusicBee on your PC

Pure Evoke-1XT Marshall edition
Pure Evoke-1XT Marshall edition

I wake up most mornings to Planet Rock radio on my beloved Pure Evoke-1XT Marshall DAB radio. But that’s in my bedroom, I don’t currently have a DAB radio in my study and Screamer Radio no longer works for Planet Rock.

Which got me thinking: could I somehow convince my digital music player of choice, MusicBee, to stream Planet Rock? It seems to handle pretty much everything else I throw at it.

The answer is yes; this is how in three easy steps.

1. Find the Stream URL

The first thing to find out was obviously the URL to stream Planet Rock. Thankfully that is displayed very prominently on their listening online page. This is what they currently are (although I guess, they may be subject to change):

  • http://www.planetrock.com/planetrock.m3u
  • http://tx.sharp-stream.com/icecast.php?i=planetrock.mp3

Both work, depending on the player you use, e.g. iTunes, Windows Media Player, MusicBee, etc; I use the first one.

2. Play the stream in MusicBee

Next, we need to tell MusicBee to use that stream.

Screenshot of MusicBee menu
File > Open Stream

That’s as simple as opening the menu and selecting:

  1. File > Open Stream.
  2. Then paste in the URL and click OK.
Screenshot of dialog to enter URL
Paste the URL then click OK

This may take a few seconds while MusicBee connects to the streaming audio feed and then BINGO! you’ll suddenly be listening to Planet Rock on your PC.

Don’t go setting your watch, though, to the streamed version. It can have a few seconds delay between broadcast and it emerging from your PC’s speakers. (My PC stream is currently 1 minute 25 seconds behind my DAB radio broadcast.) This is due to the software buffering enough data to ensure continuous playback, so that if some data goes missing and has to be re-requested from the server or if there is a local data bottleneck the audio doesn’t suddenly drop out.

What’s nice is if you use the first URL (the one ending /planetrock.m3u) then MusicBee will also display the name of the track currently playing:

Screenshot showing the name of the track currently playing: Iron Maiden—Wrathchild
Now playing…

3. Save the stream as a playlist

The final thing we need to do is tell MusicBee to remember this station. It would be a bit of a hassle to have to find, copy and paste that URL every time you want to listen to the radio.

Again, that’s simple.

  1. Right-click the name of the track
  2. From the context-menu select: Send To… > Playlist > <New Playlist>.
  3. A new playlist will be created in the Playlists panel, with the edit caret waiting for you to give it a name.
  4. Enter a meaningful name, mine says Planet Rock DAB.
  5. Then press Enter to save it.
Screenshot showing how to save the playlist
Send to > Playlist >

Conclusion

That’s all there is to it.

While I usually listen to MusicBee using the compact player view, when listening to streamed radio I prefer the mini player view which also pulls in the current track’s artwork.

Screenshot of mini player view
MusicBee mini player view

Software removal tool fixed my problem with Chrome running slowly

Progress cursor shows an egg-timer next to a pointer
They call this progress…?

Me and Google Chrome had another falling out this week. This time it wasn’t about bookmarks but speed.

For some reason, over the last couple of days Google Chrome suddenly felt very sluggish. Whenever I opened a new tab it would take a few seconds to open and a few more to load the page—notably longer than usual.

And a similar experience after closing a tab: the cursor would change to the ‘progress’ cursor (arrow with egg-timer) for a few seconds.

Having put up with it for a couple of days I couldn’t stand it any longer.

Things I tried that didn’t fix it

  1. Running system file checker (sfc /scannow) from an elevated command prompt.
  2. Disable all extensions (chrome://extensions/).
  3. Disable all plugins (chrome://plugins).
  4. Disable hardware acceleration in settings.
  5. Uninstall Chrome, reinstall dev channel version.
  6. Uninstall other recently-installed applications.
  7. Run Malwarebytes scan (0 threats found).

One forum suggested installing the latest NVIDIA graphics card drivers. Another pondered whether it was related to the recent Windows update. Plenty of people advised switching off hardware acceleration (I’d tried that, it didn’t help).

What I tried that did

The Chrome software removal tool — still currently in beta — is a clever application that scans and removes any software that may cause problems with Google Chrome.

This application will scan and remove software that may cause problems with Chrome, such as crashes, unusual startup pages or toolbars, unexpected ads you can't get rid of, or otherwise changing your browsing experience.
This application will scan and remove software that may cause problems with Chrome, such as crashes, unusual startup pages or toolbars, unexpected ads you can’t get rid of, or otherwise changing your browsing experience.

I ran it. I waited, and hoped, and it worked! I have my whizzy Chrome back. I guess that something was corrupted.

As well as scanning for typical malware that can corrupt your installation of Google Chrome it also kindly offers to perform a ‘factory reset’ and return your browser settings to defaults.

In a way I find it curious that Google are only now offering this as a currently beta standalone application when Microsoft Internet Explorer (for all its criticism) has had this built-in for years.

I ran the software removal tool which quickly returned this dialog:

No programs found
No programs found

Nothing suspicious found. I clicked Continue and was invited to reset my browser.

Reset Chrome settings — that's what fixed things for me
Reset Chrome settings — that’s what fixed things for me

That’s what fixed it.

This is definitely another useful tool in my diagnostics toolkit. Thanks Google.

It’s a relief to have had this fixed. That said, I’ve said it before that if there were the same Trello plugins available I would move to Opera tomorrow.

Write! (beta) — a distraction-free text editor for Windows

Write! A distraction-free text editor for Windows. Here it is showing the navigation bar.
Write! A distraction-free text editor for Windows. Here it is showing the navigation bar.

A few months ago, while I was editing some documents in Markdown, I came across Write! — a new text editor (still in beta) that is being marketed as “writing instrument for digital age [sic]” and a “distraction-free text editor that does not suck”. So I downloaded it and took it out for a spin.

I like it, but…

For the most part I like Write! It’s clean, it’s fast, and it has a minimal set of usable features that don’t get in the way.

It’s like a prettier Notepad but with a spell checker, a navigation bar on the right-hand side (like Sublime Text), and a basic understanding of Markdown (so you can make text bold, for example, by typing **example**).

I have a couple of issues, though, which prevents me from using this as my text editor of choice for writing.

Proprietary format

My main niggle is that by default Write! saves to its own proprietary format. This is a zipped, XML-based file format (.wtt), and as far as I can tell this isn’t compatible with the OpenDocument text (.odt) format. The simple document above (showing the first chapter of JRR Tolkien’s The Lord of the Rings) contains the following files:

  • document.xml — the actual document, plus some meta data such as word count.
  • history.xml — an undo history.
  • package.xml — this seems to define the package format and encoding (UTF-8).

You can export to PDF, OpenDocument, plain text, and three flavours of Markdown (Textile, Markdown, and Wiki) but that has more of a disruptive workflow than simply tapping Ctrl+S every few minutes.

Similarly, it would be great to be able to associate Write! to open certain file types, such as text (.txt) or Markdown (.md, .mdown) files.

Not full Markdown support

By default I tend to use basic, vanilla Markdown rather than Textile or Wiki). By default Write! is configured to support a mixture of the other two. That’s not a problem as a quick visit to the settings will put that right.

Write! settings dialog
Write! settings dialog

But Write! only supports a small subset of Markdown:

Supports

  • Headers prefixed with hash (# for H1, ## for H2, etc.).
  • Unordered lists using minus (-) and plus (+).
  • Numbered lists.
  • Links (but you cannot easily edit the link, text or title).
  • Emphasis (italics and bold) using asterisks (*) or underscores (_).
  • Automatic links in the format <http://example.com/>.
  • Backslash escapes, e.g. \*literal asterisks\*.

Does not support

  • Setext style headers (underlined using equal signs or dashes).
  • Blockquotes.
  • Unordered lists using asterisk (*).
  • Code blocks — 1 tab, 4 spaces or three backticks ().
  • Inline code using single backticks (.example {}`).
  • Horizontal rule.
  • Images.
  • Automatic links for email addresses, e.g. <[email protected]>.

Cannot type with help window open

This seems to be a basic requirement that has been overlooked: if I tap F1 to bring up the help text (shortcuts and markup) I cannot keep the help window open while typing into Write! If I start to type I get an irritated 'bong!' sound from my PC.

Surely I should be able to refer to the help text while typing.

Conclusion

If Write! supported at least:

  1. The ability to select which format to save to by default (even on a document-by-document basis); (MUST)
  2. The ability to open certain file types in Write! (MUST)
  3. Full support for Markdown. (MUST)
  4. Ability to type while referring to the help text. (SHOULD)

then I would without a doubt use this text editor for all sorts of small writing tasks, such as writing documentation, journalling, text editing, etc. Until then, I'll just keep updating the beta and see what gets added in the future.

For me this is definitely one application to keep an eye on but it isn't for production use quite yet.

Bonus

What is nice is that you can vote for future features from the website's Feedback link. One of those suggestions is to save in plain text format; I've just submitted an idea to fully support Markdown.