Can you get a deadlock with a single lock and an IO operation?

Quite a while ago, I answered a question about the basic deadlock scenario on Stack Overflow. More recently, I got an interesting comment on it. The poster asked if it was possible to get a deadlock with a single lock and an I/O operation. My first gut reaction was “no, not really”, but it got me thinking. So let’s try to unroll the scenario and see if we can reason at least about my gut feeling.

Read More

Using tuned.conf to disable mongod startup warnings on RHEL/CentOS 7

RHEL 7 – and CentOS 7, which I used for this test – use tuned.conf to set a lot of system settings. Several of the tuned settings affect MongoDB’s performance; some are important enough that mongod actually triggers startup warnings. The main setting is transparent huge pages, which is a setting that does not work very well with databases in general.

The MongoDB documentation already describes how to disable Transparent Huge Pages (aka THP) using tuned.conf, but there are several other settings that mongod tends to warn users about if you run it on an out-of-the-box CentOS 7.

Read More

Digg Reader shuts down, and thoughts on organising my blog reading

Farewell, Digg Reader

Unfortunately,  Digg announced that Digg Reader is shutting down tomorrow. While I never used Digg Reader as my main RSS feed reader – I’ve got a paid subscription to Feedly – I was very happy to use it as a backup reader for those feeds that weren’t always that great at adhering to the RSS feed standard (I’m looking at you, bringatrailer.com) as it was more forgiving when it parsed feeds. Unfortunately it appears to be another one of the “feed readers are dying” incidents that seems to have started when Google Reader was shut down. There weren’t really that many alternatives in the first place unless one wanted to self host.

Read More

How to enable logging in the MongoDB Java driver

I will show you how to enable logging in the MongoDB Java driver and also how to set and change the log level. The official mongoDB Java driver uses java.util.logging as its default logging framework or sl4j if the latter is present. It can be very useful to enable logging in the MongoDB drivers to trace how the driver is interacting with the database.

Read More

Emacs within Emacs within Emacs…

A quick follow-up to my last post where I was experimenting with running emacsclient from an ansi-term running in the main Emacs. Interestingly, you can run Emacs in text mode within an ansi-term, just not emacsclient:

Yes, the whole thing got a little recursive. Yes, it’s a little silly, and yes, I’m one of those people who think they need answers to the question “I wonder what this unmarked button does?”

 

Running Emacs from inside Emacs

I’m experimenting with screen recordings at the moment and just out of curiosity decided to see if I can load and edit a text file inside the main Emacs process from inside an ansi-term using emacsclient.

Spoiler alert – yes, you can. At least the way it is set up on my system, emacsclient doesn’t play with text mode (-nw) as it doesn’t recognise eterm-color as a valid terminal type, but loading and editing the file into the GUI works flawlessly.

Emacs on the Linux Subsystem for Windows

I’ve had the Linux Subsystem for Windows enabled for quite a while during the time it was in Beta. With the release of the Fall Creators Update, I ended up redoing my setup from scratch. As usual I grabbed Emacs and a bunch of other packages and was initially disappointed that I was looking at a text-mode only Emacs. That might have something to do with the lack of an X Server…

For a free X Server on Windows, I had a choice of Xming and VcXsrv. I used Xming a long time ago and I’m happy to pay for software, but decided to go with something free for this initial proof of concept. Plus, I was curious about VcXsrv, so I picked that. I really like that its installer includes everything I needed right out of the box, including the fonts.

Read More

SE-Radio interviews Ron Lichty, must listen for development managers

The Software Engineering Radio podcast has just published an episode with an interview with Ron Lichty. It is well worth a listen if you’re thinking about moving from development into management or already are amongst the development managers. Unfortunately there is only so much that can be packed into an hour’s worth of a podcast, but just based on the podcast, Ron’s book “Managing the Unmanageable” just found itself added to my ever-growing reading list.

Direct link to the episode.

Installing specific major Java JDK versions on OS X via Homebrew

In an earlier post, I described how to install the latest version of the Oracle Java JDK using homebrew. What hadn’t been completely obvious to me when I wrote the original blog post is that the ‘java’ cask will install the latest major version of the JDK. As a result, when I upgraded my JDK install today, I ended up with an upgrade from Java 8 to Java 9. On my personal machine that’s not a problem, but what if I wanted to stick with a specific major version  of Java?

Read More

Emacs 25.3 released

Emacs 25.3 was released on Monday. Given that it’s a security fix I’m downloading the source as I write this. If you’re using the latest Emacs I’d recommend you update your Emacs. The vulnerability as been around since Emacs 19.29, you probably want to upgrade anyway.

Build instructions for Ubuntu and friends are the same as before, the FreeBSD port appears to have been updated already and I’m sure homebrew is soon to follow if they haven’t updated it already.