Saturday, 23-Feb-13 14:49
Pencil-and-paper -programming

While cleaning up some old cupboards I found an old booklet from 198-something. At that tender age of fifteen-ish, instead of going to hockey practice or hanging out with other kids in the mall, I wrote Z80 assembly language programs with paper and a pencil; something that I had completely forgotten. I didn't have money for an assembler, so I painstakingly looked up the hex code equivalents for the mnemonics and then wrote a BASIC program to write those into memory.

My bedtime reading at the time was "The Complete Spectrum ROM Disassembly" - a book full of commented machine code. Which, in retrospect, was a bit sad, but on the other hand, it gave me a very complete understanding of how a computer works. And that has been very useful in my career.

Hover over the image for more.

Tuesday, 12-Feb-13 23:24
Running Java programs over SSH/X

Sometimes you need to run Java GUI programs over an SSH tunnel. However, this can be excruciatingly slow, because X's and Java's understanding of how to draw stuff just doesn't seem to be very compatible.

Here's what I do to make it tolerable, if not pleasant.

First, use a fast cipher like blowfish with SSH (assuming these aren't your default options):

   ssh -C -c blowfish myself@mymachine.org

Second, when starting the java app, use something like this (invocation may be slightly different depending on your environment):

   export JAVA_OPTS="-Dsun.java2d.pmoffscreen=false ${JAVA_OPTS}"

This turns off the offscreen pixmap support as detailed in JDK6 documentation, and makes for a significantly faster experience.


Private comments? Drop me an email. Or complain in a nearby pub - that'll help.



More info...  
"Main" last changed on 10-Aug-2015 21:44:03 EEST by JanneJalkanen.