Mike Schaeffer's Blog

Articles with tag: blog
August 3, 2018

It's been a long time coming, but I've finally replaced blosxom with a custom CMS I've been writing called Rhinowiki. More than a serious attempt at a CMS, this is mainly a fun little side project to write some Clojure, experiment a bit with JGit, and hopefully make it easier to implement a few of my longer term plans that might have been tricky to do in straight Perl.

Full source in the link above, a high level summary here:

  • Everything is in Clojure.
  • Backend format is Markdown as interpreted by markdown-clj.
  • Source code is highlighted using highlight.js.
  • Markdown rendering is done entirely on the server, with syntax highlighting on the client. (I'm looking into Nashorn to run highlight.js server side too, but don't know if that's possible within my time constraints.)
  • Back end storage is managed using and retrieved via JGit.
  • All requests are served out of memory.
  • There's a hand rolled (and conformant) Atom feed.
  • Also RSS 2.0.
March 26, 2014

Update 2019-01-17: KSM recently redesigned their website in a way that removes the original blog. Because of this, I've taken some of what I wrote then for KSM and re-hosted it here. Thanks are due both to KSM Technology Partners for allowing me to do this and to the Wayback Machine for retaining the content. All the links below are updated to reflect the articles' new locations.


Sorry for the radio silence, but recently I've been focusing my writing time on the KSM Techology Partners Blog. My writing there is still technical in nature, but it tends to be more heavily focused on the JVM. If you're interested, here are a few of what I consider to be the highlights.

In mid-2013, I started out writing about how to use Runnable to explictly enforce dynamic extent in Java. In a nutshell, this is a way to implement try...with...resources in versions of Java that don't have it built in to the language. I then used the dynamic extent technique to build a ThreadLocal that plays nicely with thread pools. This is useful because thread pools require an understanding of which thread you're running on, which thread pooling techniques can abstract away.

Later in the year, I focused more on Clojure, starting off with a quick bit on the relationship of lexical closures to Java inner classes. I also wrote about a particular kind of stack overflow exception that can happen with lazy sequences. Lazy sequences can nicely remove the need to use recursion while traversing their length, but each time two unrealized lazy sequences are combined, it adds to the recursive depth required to compute the first element. For me, this stack overflow was a difficult error to diagnose, because it seemed so counter-intuitive.

I'm also in the middle of a series of posts that relate the GoF command pattern to functional programming. The posts start off with Java, but will ultimately describe a Clojure implementation that compiles a stack based expression language into optimized Java bytecode. If you'd like to play with the code, it's on github.

September 12, 2009

It took long enough, but finally, I've taken the time to set up a better workflow for this blog:

  • The master copy of the blog contents is no longer on the server. It's now on one of my personal machines.
  • I'm managing site history using git . This was a nice idea, but git and blosxom have a fundamental difference of opinion on the importance of file datestamps. blosxom relies on datestamps to assign dates to posts and git deliberately updates datestamps to work with build systems. There are ways to reconcile the two, but it's not worth the time right now.
  • Uploads to the server are done with rsync invoked through a makefile. (ssh's public key authentication makes this blazingly fast and easy.)

Maybe now, I'll finally get around to writing a little more. (Or, I could investigate incorporating Markdown, or the Baseline CSS Framework, or....)

February 14, 2008
  • There was a copy/paste error in the version of ant-up I posted a while ago. It has now been corrected.
  • I ran across Adam Houghton's blog the other day. It looks pretty interesting and there's software to download (which is more than I can say right now). The blog seems to currently focus on Apple/Java/AJAX related content. The iPhone based javadoc viewer looks particularly interesting for those of us not interested in carrying around a library.
  • Also, on a totally different note is Autoblog, a 'professional' blog covering automotive news. It's updated fairly often too.
January 8, 2008

It seems that it's been a while since I've posted: about four months. That's longer then I meant, but isn't that always the case?

In the four months since I've not been posting, Ryan has crawled, learn to walk, learned to talk a little, and learned to respond to simple questions. Personally speaking, I've worked a bit on vCalc, not to mention the more important bill-paying work of my full time day job. Personally, I think Ryan is making me look like a slacker, but I suppose that's a matter of judgement. :-)

Anyway, I hope your holiday season was all you wanted it to be, and Happy New Year. I have a few ideas for new posts, so with some luck, the next gap won't be four months long.

Tags:blog
December 26, 2006

Well, another Christmas has come and gone. This one was particularly special for us, since it was both Ryan's first Christmas and our first Christmas with a child. Stereotypically for a child on Christmas morning, Ryan woke us up at 5:30 AM. However, true to his usual daily ritual, it was more because he was hungry than because he was excited about opening gifts. In a few years that will probably reverse itself. We also expect Ryan to start helping out a little more with actually opening the gifts. Since he's not quite five months old he had a little trouble with the wrapping paper; Mommy and Daddy had to help out a bit with that part. Once we got the gifts open for him, we'd show them to Ryan who would then promptly try to eat them. This worked better for some gifts than for others. :-)

For the majority of Ryan's Christmas, we tried an idea that Teresa suggested. Since Ryan's direct involvement in opening his gifts was limited by his age, we each got some surprise gifts for Ryan, and then opened the gifts to Ryan from the other parent. This made Christmas shopping particularly fun and also added to the surprise factor of Christmas morning. It was fun to see the different perspectives we brought to Ryan's Christmas: for an example, Daddy got Ryan a space heater (for bath time in the Philadelphia winter) and Mommy got Ryan a Leap Frog toy designed to teach farm animal sounds. The toy is actually really cool, even for adults: farm animals are represented with plastic blocks labled and colored to match the animal they represent. The blocks then have punch card like patterns of holes that signal the type of animal to the farmhouse. This enables the farmhouse to make the appropriate sounds for each animal. (The toy has blocks for three types of animals but a four bit animal encoding scheme that would allow it to distinguish between 15 different types of blocks. Daddy is very curious what the other 12 sounds might be.)

In the end, Ryan's most important gift this year was also one of the smallest. Due to a possible ear ache a couple weeks ago, Teresa ended up having to take Ryan to the doctor to have his ear examined. During that visit, Teresa asked and got approval for Ryan to start eating solid foods other than rice cereal. In honor of that newfound permission, we got Ryan some actual baby food as a stocking stuffer: two tubs each of green peas and squash. Christmas afternoon found Ryan eating away at green peas and absolutely loving them. Compared to the rice cereal, which is apparantly pretty awful, there's no comparision at all: Ryan loves his peas. He opened his mouth when he saw the spoon coming, pulled the spoon towards his mouth, and then licked the peas off the spoon. We have pictures and videos we're going to try to post in the next week or two.

We all hope everybody reading this is having a similarly blessed Holiday season and has a wonderful New Year!

August 28, 2006

One of the 'downsides' of the way Blosxom is implemented is that is relies on a post file's modification date to assign a date to the post. This makes editing files a little tricky: editing files on a Unix box updates the modification date and therefore promotes the post to the top of the blog. I don't know if there's a better way to do this, but I've written a little script that edits a file, making sure to restore the previous modification date.

The implementation is pretty simple: it uses mktemp to create a temporary file and touch -r to copy the modification dates from the post file to the temporary file and back. Be sure to modify the #! line to point to your installation of bash, should you decide to use this script. A nice generalization of this script would have it prompt for a description of the update and add the text to the post.

#!/usr/local/bin/bash

if [ $# -ne 1 ]
then
  echo
  echo "This script expects a command line argument: the
  echo "name of the post to edit."
  exit 1
fi

DATE_MARKER=`mktemp /tmp/date_marker.XXXXXX` || exit 1

touch -r $1 ${DATE_MARKER}

${EDITOR} $1

touch -r ${DATE_MARKER} $1

rm ${DATE_MARKER}
June 22, 2006

My blog setup requires that I log in via ssh to my webserver to use a text editor to edit articles in raw HTML. This is the downside of using barebones blog software. On the flip side, it'd at least be pretty easy to add a (private) article submission form. All it would have to do is present a list of subdirectories in the blosxom hierarchy, and allow content from a text box to be deposited into a named file with a specified timestamp (which can be set with touch). Step 2: allow these files to be edited in a text box.

June 6, 2006

With some advice from this site, I've slightly tweaked the layout of the blog. The sidebar is now one color all the way down, and some of the <pre> text in some older posts is now formatted to fit smaller lines.

Tags:blog
January 3, 2006

It's hard to believe that it's been six years since people were buying out stocks of portable generators and predicting the end of the civilized world. Still, there it is. One of the more interesting theories I've heard about the long term impacts of the Y2K scare is presented by Thomas Friedman in his book The World is Flat. In it, he describes Y2K as one of the ways Indian software houses first established themselves as a credible way to develop software. If that's true, then maybe there's an element of truth to what the Y2K 'doomsayers' were claiming six years ago. However, rather than the end of the civilized world, Y2K might have just signaled the beginning of the decline of pure software development as a viable American middle class career.

On a lighter note, every new year needs resolutions, and here are those of mine that are appropriate to this weblog.

  • More posts. Better Content.
  • The blog needs a few more features. Namely, it needs a way to look at historical posts, as well as a way to post comments or send feedback.
  • There will be a release of a new version of vCalc this year.
  • There will be a release of a new version of NoiseMaker this year.
Tags:blog
Older Articles...