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.

Under New Management

This day just gets better. I arrived home early (boss gave the company a half day leading into the 3 day weekend). Of course we all took off even earlier than that to go watch X3. But I get home and my copy of “Schlock Mercenary: Under New Management”:http://www.schlockmercenary.com/ arrived, all nice and signed. Time for some good reading.

The book is excellent quality, paper is great, colors are rich. Howard did an excellent job getting this book out.

Some teaser quotes:

__You’ve got some *return fire* on you sir…__
__Put me out, please.__

– and –

__There is no overkill, only “Open Fire” and “Reload”__

X-ed up

Well, just got back from X3. Very fun movie. Lots of good action. The only problem is the main things to talk about in the movie give away a lot, so I can’t discuss them yet.

One thing to remember when you go see it, stay through the credits…

In retrospect, one thing that I really liked about the movie is that they did a very good job with the teasers of misguided fans into what was coming. Sure certain major things were known, but a lot of detail would specifically make you think different things were to occur.

In the way of nitpicking (that which I can do without giving stuff away). Angel, yes he’s in, but he plays such a minor bit that it’s kind of disappointing. I would really have liked to see him with a much larger part. Also, where was Nightcrawler??

Definitely worth watching, they do set up for sequels, but there are major character *elements* that will need to be resolved for one, several are hinted at or shown, but a couple will need help.

Overall, I loved it.

Separating My Shoulder

Today was one of those days where something happens to make you want to pat yourself on the back so hard you could separate your shoulder.

Last night we rolled out patches I had made to the “Freeside”:http://www.sisd.com/freeside giving it a “Memcache”:http://www.danga.com/memcached/ storage. To start with I overloaded the built in object retrieval mechanism to transparently use the cache (if enabled, as always it’s optional) to retrieve either data hashes, or actual objects. This was a little tricky as we are required to scrutinize rather closely our data, in order to deal with Sarbox controls. So I had to store data in it’s still encrypted form, and only allow decryption after cache retrieval on privileged access.

There are several places that can still be cached, but we went with this first implementation as it was the best single point to tackle, and now we have real proof. With the first day’s billing run (it’s a daily processing system) I compared the load and process counts on our database server the day before and after.

Yes, this one piece getting cached dropped the database load by approximately half. Yes, HALF. w00t! And tomorrow will be even better because so much of today was loading the cache.

I love it when things work right. Next up more usage of the cache, but even more important, making sure it gets committed into the GPL tree.

What’s Your Show

With the number of foodies who read this and “my friends blogs”:http://openclue.org/ut I bet a lot of us have thought about what kind of Food Network show we might have if our cooking was presented. So I’d like your feedback, if your cooking was to be made into a show, what would the title, theme, and other elements be?

As for my cooking, as grandiose as I’d like it to be, I can only sum it up as _The Lazy Bachelor_ . I enjoy my food, I like to cook, but I am above all *lazy* (hey, it is one of the key traits of a programmer). So much of my food comes from last minute food hacks, combinations of leftover, canned, or prepared foods.

I think that Food Network took this idea and did actually make a show for it, but instead of the whole bachelor angle that I mention, they messed it up by creating that show with the strange ‘Sandra Lee’ lady that scares me. The concept is similar, but the angle they present the show is just _strange_ imho.

So what’s your take?

Cable Down

For the first time in my experience, I had a cat5 cable go out on me yesterday. Now, I’m not talking some cable that was just sitting around, or one that was physically broken in some manner (bent, crimped, broken RJ45, etc). No, this was a short run of cat5 (5′ maybe) that connected a box to a switch, and was working perfectly for the last 2 years. then *BAM* it’s dead. Played around thinking the card had gone bad, switching things around. Turns out, just the cable was dead.

OSCON and ON and ON

One thing I forgot to mention in last nights post, for those who liked the post by “MJD”:http://www.plover.com , he is one of the presenters at “OSCON”:http://conferences.oreilly.com/oscon/ again this year. If you are interested in attending, we have a LUG discount (or a student discount if you are still stuck there). Contact me for details. MJD has always been one of my favorite geek presenters, very engaging, thought provoking, and entertaining.

Oh, and yes, I’m signed up for one of his tutorials, and one of damian’s 🙂

“!http://ug.oreilly.com/banners/oscon/OSCON06_usergroup_120x240.gif (OSCON)!”:http://conferences.oreilly.com/oscon/

Fun with Adwords

I’ve found it interesting, despite my blog’s content, at the number of “google ad’s”:http://www.google.com/adsense related to nuts, bolts, and tools because of my domain name. Now I’m afraid, with the last post discussing a ratchet that it’s going to really skew the results even more. Let’s see what fun it really comes up with.

Ratchet Effect and Bad Programming

One of my favorite geeks, “MJD”:http://www.plover.com/ just did a blog entry where he talked about the “ratchet effect”:http://www.plover.com/blog/prog/featurism.html where he talks about how we tend to use the mechanical advantage our tools give us to add cruft that we _believe_ will help out ourselves, or others at a later date. Oftentimes we add in things (as the parens in his example) that we _think_ will make something easier to read, or show our intent, but in actuality this often doesn’t really help us the way we think it should.

Take for example a recent posting I made about over-optimizing a one-liner to where I had to add compiler hints for the list operations to be factored out correctly. Is this really the best way to accomplish a task? Sure, there are extra operators and parentheses attempting to make it more ‘understandable’, but it really wasn’t good outside of the one-liner that I intended it because it was full of junk that attempted to make it understandable to something. And yet, it’s great to know and understand how it works.

My favorite quote comes from the very end, _”…the world is full of incompetent programmers. But no amount of parentheses are really going to help this person anyway. And even if they were, you do not have to give in, you do not have to cater to incompetence. If an incompetent programmer has trouble understanding your code, that is not your fault; it is their fault for being incompetent. You do not have to take special steps to make your code understandable even by incompetents, and you certainly should not do so at the expense of making it harder for competent programmers to read and understand, no, not to the tiniest degree.”_

How often do we, or certain languages (Beyond the social/political issues) do just that? Bending to the needs of the lowest common denominator. Do we write ourselves into corners trying to keep with a single syntactic style, a certain design pattern, or other concept?

On that vein, I’ll segway into a link that if I recall, Stuart posted in #utah this morning, “Signs You’re a Crappy Programmer”:http://damienkatz.net/2006/05/signs_youre_a_c.html to me this just seemed to tie in very well with the last part of MJD’s post.