Feeling the Synergistic Flow

For quite a while when I come into work I’ve been using x forwarding, or vnc to access certain beloved applications from a linux box under my desk to my PowerBook. Today I decided to make the change to “synergy”:http://synergy2.sf.net

After actually taking the time to clean my desk some, I started by moving my big old crt over to where I normally put my laptop and flat panel. I knew that wouldn’t work though, taking way too much space, so I went over and talked to a “sucker”:http://blog.harleypig.com that I know, and swapped my crt for his flat panel. Truth be told, it’s a nice crt, and quite higher resolution, but I needed the depth. Now it’s hooked to “pelargir” and sitting next to my laptop and screen, making three panels in a row. I moved my keyboard and mouse over to the linux box and made it the server, this way even without my laptop, the linux box and laptop can function independently.

The nicest thing, is I’m running kmail again without the overhead of remoting it! One keyboard, one mouse, two computers.

Debguts and Perl

So I’m working on a bugfix for some code of mine, and I really need to see why something is happening, and I pull it up in the Perl debugger. as I’m stepping through a very long set of actions, validation all the different data at various points, I come to a fork that explains a lot of my problems. Great, now I want to continue along this branch and verify things are happening, but the first part of this fork is a method call that I really don’t want to do. Now it’s safe, I’m running in a sandbox and I can screw up the data all I want, but it took quite a while to get to the point that I’m at, I haven’t saved out all by watches and breakpoints yet, and I really just want to continue, without running this first piece of code. It’ll just make me spend more time than I want to at that point.

Anybody else ever wanted to ‘Skip’ in your debugger? Well, I presented this question to a few coworkers who all agreed that they didn’t know of a way to do it, when suddenly Paul mentioned, “Well, if you could just change the symbol tree”. “Harleypig’s”:http://blog.harleypig.com eyes then lit up thinking about the possibilities there.

So I made the suggestion to try on the fly replacing the subroutine in the object’s namespace with a new one, and Harleypig was already pulling up a terminal to start playing.

I think he’ll be posting his test code here very shortly, but suffice it to say, it works well. Inside the debugger we just dropped a new anonymous sub in the namespace, in that case clobbering the routine we wanted to modify. (*Namespace::Sub = sub { … }; ) It would be just as easy to move the old one, substitute the new routine, then move it back afterwards.

All sorts of insidious evil. A day in the life of a programmer. I love languages that allow you to dynamically rewrite a running program.