I want a Markdown "during-view"

I like that Markdown and its kin have been adopted by more than just the geek community. The simple inline directives do not take away the focus of writing the text and the formatting available covers most of needs. However, the trend to provide an immediate, fully formatted view of the text is misguided. These "previews" take away from the goal of maintaining focus on the text and not it's presentation.

However, I too like the comfort of a correctness that comes with seeing a full formatted document and especially so with regards to sections and lists. What Markdown editors need is not preview but a kind of WYSIWYG presentation that keeps the primacy on the text and secondarily on the structure of the text. A means of doing this is to present the inline directives with formatting and the directives too. Thus, when I type *emphasize me* it is shown in the editor as *emphasize me*. If I use a heading directive

A short work
it presented for editing as
A short work

I did once see this kind of editor in a Java wiki application, but I have long since lost my reference too it. Perhaps it will resurface again as the Markdown tools authors rediscover this style of editing.

I am not going to create another account just to use your feature

Dear Marco,

I really like the audio tools included in Overcast, but I am not going to create another account just to use them. I read the FAQ and while I understand that in general saving battery life is great, but, really, how much battery is used to check a few feeds once a day? So, good luck and keep me informed of the non-account version of Overcast.

What would one use programming for if programming were easy?

I stopped by Slashdot today and found Normal Humans Effectively Excluded From Developing Software. I read it and many of the comments and started to think about this problem again. In my mind the problem is if programming were easy then to what purpose would someone put programming too? I am going to assume that what is meant by programming is of a general purpose kind so that, for example, using R is not programming.

2014-07-10 Update: People collect and organize things and while they do that they share the experience, the lessons learned, and the things found. Would you program that?

To be continued...

Logging and the utility of message patterns

I wrote a logging layer over log4j sometime ago. The layer was to encourage our developers to log at any point in the code where they thought some extra context would help resolve runtime errors. And so the layer had to have a familiar API, be effortless to code, and cheap to call. This posting is mostly about the cost to call the logger.

When a message is not going to be used you don't want to incur the cost of creating it. How often have we seen logging code that looks like this

logger.debug("short explanation: v1="+v1+"; v2="+v2+";");
Here the logged message is composed before the call to logger.debug() and it is composed even if the logging level is above DEBUG. If v1 or v2 have a complex toString() implementation, then you add this compositional time to the calling cost too.

The simple solution is to use java.text.MessageFormat with the debug() method, for example

logger.debug("short explanation: v1={0}; v2={1};", v1, v2 );
In this way, the time cost to calling debug() is the time taken to push three values on to the stack, call the method, and pop the three values off the stack. No composition time (or memory) costs are incurred at all. (I handle exception messages the same way, that is, all exception constructors accept a message pattern and message parameters and the message string is not composed until it is actually needed.)

I have since replaced Java's MessageFormat with a (mostly) compatible local implementation. This local implementation does simple composition tasks like formatting numbers without commas and Unicode escaping all non-ASCII, and non-visual characters. However, the primary reason to implement a replacement was to expand the available format types and format styles.

The first new format type added was json so that now when a parameter is so typed its value is transformed to a JSON representation before adding to the message. (In hindsight it should have been a format style.) Today I added the string format type and two format styles. One format style specifies a substring of the value using a start index & length and the other a start & an end index. The start and end indexes can be given as numbers or as searches. For example, the style /foo/:10 specifies a 5 character substring starting where "foo" is first found, and the style /foo/../bar/ specifiers a substring between (and including) the two searches. The using search is particularly useful if you know that somewhere in a very long string is an identifier that would be useful to have in the log.

Basic human concern for the welfare of others

I had a surreal moment this morning while walking Milo at our usual spot. A car was found in the nearby pond. (I later found out that two cars were stolen last night and this was one of them.) I happened to encounter a small group of acquaintances running with their dogs. I told them what I knew and their immediate response was 1) having a car in the pond is not healthy for the pond and 2) why were the police leaving their cars idling. WTF! Not one of them expressed interest or concern for a person or persons that might be in the car. I was shocked at their lack of the basic human concern for the welfare of others. I will resist extrapolating this one data point to the causes of America's problems.

A gnuplot example

If you searched for Gnuplot in this blog you know I am a fan of the tool. It is easy to install, somewhat easy to use, and very likely someone has already had and solved the exact same problem you are having now and wrote a blog entry about it. This is my contribution to the globally distributed Gnuplot cookbook.

I want on a single chart the lines graphs of count of all queries, count of matching queries, and mean duration of all queries. This chart gives me the temperature of the previous day's query load which is a useful qualitative factor for capacity planning. The data retrieval results in records representing a 10 minute interval with counts of all queries, counts of matching queries, and mean durations. This is then plotted to give a chart like the following:

The file of records contains values that looks like

2014-07-07T00:10:00     10449   3850    934
2014-07-07T00:20:00     18445   5676    407
2014-07-07T00:30:00     18497   6507    535
2014-07-07T00:40:00     11419   4463    734
2014-07-07T00:50:00     11634   4454    724
2014-07-07T01:00:00     11960   5077    808

The Gnuplot script is

set terminal png size 800, 400 small interlace
set output "/tmp/chart.png"
set size ratio 0.5

set xdata time
set timefmt "%Y-%m-%dT%H:%M:%S"

set xlabel "Hour"
set format x "%H:%M"

set ylabel "Count"
set ytics nomirror
set yrange [0:40000]

set y2label "Milliseconds"
set y2tics
set y2range [0:4000]

set title "MetaData matching search counts and average durations (10 min intervals) for 2014-07-07"

plot \
  "/tmp/chart.data" using 1:2 title "Query count" with lines, \
  "/tmp/chart.data" using 1:3 title "Matching count" with lines, \
  "/tmp/chart.data" using 1:4 title "Request duration" axes x1y2 with lines

The chart is produced daily and it is useful to visually align several days of charts to look for patterns. For comparable charts this requires that the charts all have the same y-axes ranges. To do this Gnuplot's range setting is used. If you do not want a fixed range then remove the set yrange ... and set y2range ... lines.

I hope this helps someone else with their Gnuplot use.

Atlassian has forgotten that Jira is a communication tool

Atlassian has forgotten that Jira is a communication tool. Comments need numbers so the team can communicate with specificity everywhere. See Skype and development teams as it applies to Jira also.

No more chickens

The last of our chickens were attacked last night. Two dead and one so badly mauled that it had to be put down. Our home is once again without the soothing sounds of chickens humming their songs as they explore and sun-bathe in the garden's beds.

Restic to the flame

I bought a copy of Dreadball earlier this year mostly to have a sports boardgame that Henry and I could play. (Owen is happy playing non-sports oriented games.) The material used for the Dreadball figures is, what has come to be called, "restic" -- some combination of resin and plastic. It has a reputation of being difficult to prepare for painting. (For a counter experience read How to clean restic.) One piece of advice I read in the comments section of Seeking advice on preparing the minis for play was to flash the flashing with a cigarette lighter's flame. After too many hours of trimming with a knife I decided the give the flame a go. The basic approach is to warm the material enough so that you can smooth out the heavier flashing with your thumb and for the lighter flashing to burn off. And, after a little trial and error, it does work. However, for detailed, thinly molded elements of the figure you still need to just use a knife. Using the flame often ends with stumpy ears and hands. Even with the few errors the figures look fine after priming.

Walter Dean Myers and Henry

I was very sad to hear that Walter Dean Myers died today. While he wrote for young adults I enjoyed reading them as did my son Henry. It was Walter Dean Myers' books that got Henry to keep reading fiction outside of school.

Skype and development teams

My employer extensively uses Skype to coordinate and communicate. (Email is almost unused.) Within a software development team there are some regular annoyances that come from Skype's current design. I don't blame Skype or Microsoft for this situation as I think we are using the wrong messaging tool. However, using Skype in my team has clarified what the messaging tool needs. The changes that would make Skype better for software development teams are

  1. Use a fixed format font for sender and receiver because we still manually align tabular data and draw ASCII diagrams.
  2. Don't interpret any of the message text as emoticons, links, telephone numbers, etc. Most of the time the interpretation is inappropriate.
  3. Identify every message in a conversation so they can be referenced. We use specific identifiers -- file paths, line numbers, revision numbers, etc -- because specific referencing means that all parties in the conversation are using the same data. Use a simple initialssequence number identifier for ease of typing. (No UUIDs, please.)
  4. Includes images in conversations. Images are only slightly less important than text to a successful conversation.
  5. Show more messages on the screen. Do this not by making the font smaller, but by reorienting the message presentation to take advantage of monitors having more width than height.

What do you want to change?

Wanted: Portable worktop and toolbox

Leo and I were talking about our first-world troubles of 1) not having a permanent miniatures painting station and 2) the that the temporary one we do have takes us away from the family at night. I have tried multiple ​solutions but so far nothing has stuck as work​ing​. In general, what I think I want is a portable worktop and toolbox. This way I can quickly retrieve it & open it up for working and later close it & store it away. The following have been inspiring and all within my skill level and with tools I have available​


I really like how this has a proper place for each item and that the work surface is quite wide.​


This one reminds me of the old portable writing desk​s. I like that it has draw for storage but that this is under the work surface is going to be inconvenient too often.


While not strictly as portable a worktop as the others, it is f'n awesome! and has many great ideas.

​I did make the following as an experiment of a least complex solution -- a wide box with lid that acts as copyholder and support for built-in lighting.

But, in the end, I did not like it. I mostly did not like that when the lid is open it blocks my view of the room and family. I have not put any time into designing an alternative yet -- but I will.​

Using standard open dialog box in NetBeans

You can have NetBeans use OS X's standard open dialog instead of the poor Swing alternative. To do this, update your "netbeans.conf", mine is at /Applications/NetBeans/NetBeans\ 7.3.1.app/Contents/Resources/NetBeans/etc/netbeans.conf, to include the flag "-J-Dnb.native.filechooser=true" in the "netbeans_default_options" property.

iPhones and camera lens lint

My iPhone 5 has lint between the camera lens and the external housing. I had the same problem with my iPhone 3G. Is this a common problem for folks who do not put their iPhone in a case and keep the phone inside their pants front pocket?

Using greenstuff

I am about to convert a female fantasy figure into a dark age warrior. I have clipped off the fantasy weapon, modified a hand to hold a sword, and the other hand to hold a shield. Now I have to reduce the exposed cleavage and so will be using some "greenstuff" to cloth her. Since I have never done this before I looked on YouTube.com for tutorials. While there are many, I thought this one on making a cape was especially helpful

Dip 'n Spin

I have been playing with "dip" again to quickly apply shading to my minis. The Army Painter Dark Tone is, essentially, a black stain. The results are too black for my liking: everyone looks like they just emerged from a coal mine. Not wanting to spend another $30 on the Strong Tone I picked up a small can of Minwax Polyshade Antique Walnut. This I like much better. It might also be that for dark age Welsh it is just seems more appropriate. That is, the minis look grubby. There are many tutorials on how to apply these products so I won't go into that here. Instead, I just want to put another plug in for using soda bottle caps and necks.

When using stains you have to remove the excess. Most folks don't actually dip the mini in the stain but instead dab the stain on with a sacrificial brush. Then, as the stain pools, using the same brush to remove the excess. Well, I wanted to try dipping and so I needed a means of removing the excessive excess stain this leaves on the mini. Flicking was not in the cards. Instead, I hot glued a soda bottle neck to a stick, attached the stick to a drill, screwed the bottle cap attached mini on, and gave it a spin!

It does work. However, either my drill does not spin fast enough or I need a more random motion as too much stain remains. And so you need to go back to the mini with a brush and remove the remaining excess. All in all, the dabbing method is the most effective.

For related postings see wargames.

English Language & Usage Stack Exchange

I am clearly the last person to ask about English language usage, but I am very interested in its edge cases. I subscribe to the http://english.stackexchange.com/ weekly newsletter and find it fascinating. My guess is, you would too.

Want a simple, synchronized shared scrapbook

I have all these local, really high tech hardware, software, & networks on my desk and the only easy way for me to copy a URL from iPhone to Mac and vis versa is via a text message (I use Skype to SMS). All I want is a simple, synchronized shared scrapbook for text and images between all my devices. Can someone please make this happen?

Update: A friend suggested Pushbullet. It looks to be a useful service, but I really don't want another account just for this small need. From reading between the lines, Pushbullet looks to do nothing more than coordinate a Google Drive document (or folder of documents). Which I can also do with a URL bookmark. Which I did. This seems to work well.

SAGA Links

The "Wednesday Gamers" will be playing SAGA starting next week. (Even if our minis are only primed!). To help prepare the gamers I collected this list of SAGA links.

Meeples & Miniatures's Review
SAGA First Look
The Tapestry (dedicated to SAGA)
Battle Boards for Dummies
Board Game Geek's SAGA page
How to play SAGA
SAGA Dark Age Skirmish Game Tournament Report

If you have any good links please do add them in the comments.