Suicide’s An Alternative – early demo version

Sitting and working in my office, listening to early Suicidal Tendencies.

Went looking on YouTube and found this, an early demo version of “Suicide’s an Alternative”.

Pretty cool. Very raw.

Updated: Whoa. Some more stuff.

“War Inside My Head”. But… is it? There’s no singing (well, maybe there is… I *think* I hear something faintly in there but can’t really tell), and it sounds nothing like the “final” version of the song.

“I Saw Your Mommy”. Boy… Mike sounds like a young kid. 🙂  He was probably 19 when this was recorded.

Another version

This is a great thing about the Internet. Finding gems like these.

Named pipes and unwanted hangs

The past few days I’ve been dealing with a wonderful little problem.

They’re called “named pipes“.

The main product I work on in my day job was doing some filesystem scans and would hang for some unknown reason. After much investigation we noticed the file it was hanging on was a named pipe file way down in the bowels of the system (a temporary file created by the com.apple.notify process). What was happening was well… it’s a pipe. Something in my app was opening that pipe and thus the app “hung” because it was now wanting to read from the pipe. Thing is, my app doesn’t care about pipes at all, it’s just working with files. As well, we weren’t explicitly opening the file; we would call some other OS routine and somehow somewhere in that OS function’s implementation it called open() and thus we hung.

And so, what a bear this is.

In the end we decided to check for and avoid pipe and socket files at all costs. Any means by which a file can “get into” the app, we put up a wall at the perimeter so no such files can even get in. We figure we keep them out at the wall, then we don’t have to spend lots of CPU cycles internally to constantly deal with them (tho critical code should still perform checks). Plus, since one big part of the problem is we can’t control what others do and if they might open() the file, we have to nip it in the bud as soon we become aware of the file and minimize how much “work” is done on the file in case some other function might open() the file and we risk hanging.

To check is pretty simple. Code something like this (NB: I tried using the “code” tags and less-than/greater-than signs for the #include, but WordPress’ editor seems to get confused… so I just used the “pre” tag, which isn’t quite giving me the results I want either… oh well.).

#include "sys/stat.h"

bool
FileUtilities::IsUnsupportedFilesystemItem(
const char*    inPath)
{
    bool is = true; // assume failure, because if we fail on such 
                    // a simple operation something really has to be wrong
    if (inPath != NULL)
    {
        struct stat statInfo;
        int retval = lstat(inPath, &statInfo); // use lstat() instead of stat() because 
                                                   // we want to minimize resolutions or other "work"
        if (retval == 0)
        {
            if (!S_ISFIFO(statInfo.st_mode) && !S_ISSOCK(stat.st_mode))
            {
                is = false;
            }
        }
    }
    return is;
}

How you actually cope with it or if you consider them problems or not is up to you and your code and your situation. The key of the above is to get the file’s mode then check the FIFO and SOCK flags. If set, reject the file.

For most people, this isn’t going to be an issue or a problem. I mean, we went around for quite some time and never dealt with the issue. And in daily use, most people aren’t going to see pipe or socket files.

But it’s worth noting and thinking about. Nothing wrong with being a little defensive.

Self-document code is anything but

If you know me, or maybe you can just tell from my blog, I can be verbose.

It’s how I am. I tend to prefer more information to less. I think you get further in life by knowing more, not less.

But I also know this wears on a lot of people. They just want the bottom line and don’t care why or how you got there. IMHO that’s a pity because then they never truly understand and can never arrive at educated conclusions on their own. OK fine, a baby is made, that’s the bottom line. If you want to stop there and never know more, that’s your business. But in my book, knowing how to make that baby is interesting, and then going through the motions of making that baby even more interesting. 🙂  Like I said, it’s good to have knowledge and information.

I write software for a living. There’s great debate about documenting code, be it formalized documentation apart from the code or writing comments in the code itself. I’ve never jived with folks that say code should be self-documenting and that’s all the documentation you need. Sure, you should write readable and maintainable code. Naming your variable “numberOfObjects” is far better than just naming the variable “i”. But you must have comments. Why? Precisely.

Self-documenting code can tell you what and how, but it cannot tell you why. For that, you must use external documentation.

You must go through the effort of writing comments to explain bits of code. Depending on the code, you may also want to write larger external documents (e.g. in a word-processor) that explain the greater architecture and how all the parts of the code fit together and how to use it all. This is something that cannot be conveyed by reading the code itself, and I just don’t understand those that think this sort of documentation is a waste of time and somehow if you do it makes you “not a real programmer”.

Well buddy, real programmers know the moment after the code is written it must start being maintained. If you can’t remember what you had for breakfast a week ago, can you expect to remember why you wrote this code when you come back to it in 6 months?

Case in point. Just yesterday I was working on a bug in our software where the application would hang. All signs and symptoms were odd but somehow made sense to each other. When our QA guy told me one key point (“looking at the permissions flags, there’s a ‘p’… what’s that?”) it all came back to me. The file was a named pipe and I dealt with this very problem in the past. I went looking in code for where I previously dealt with it. I found it. The comment was dated over 5 years ago.

5 years ago.

When I fixed the problem — 5 years ago — I added copious comments to the source code to explain the problem in great detail; 50 lines of comments. I know many would say that was ridiculous! That it’s just his (annoying) verbosity! Well, thank goodness for it because without it there would have been no way I would have remembered that 5-year-old problem in such great detail and know exactly how to fix it (again) today.

Here’s an article by Jef Raskin discussing the same thing. Jef Raskin would know.

So yeah… people tell me I’m verbose. I really don’t care. I am who I am and I know when to be curt and I know when to ramble on. There are times when comments aren’t needed (don’t tell me what or how), but you do need to explain why and not be afraid to go into detail because the code you may have to maintain may be your own. Do yourself a favor and explain yourself. And if someday that code gets to be maintained by someone else, do them a favor and explain yourself.

I’ve never known anyone to say there’s such a thing has having too little ammo. I feel the same way about code comments and information. 🙂

Top Shot? I don’t care

So SaysUncle bemoans the Internet for spoiling the ending of the latest Top Shot episode. I’m sure he’s half-joking but also half-serious.

For me? I have no idea what happened or how it ended.

And I don’t care. Well, that’s not totally true. Fellow gunblogger Caleb Giddings was on that show and due to that I was mildly interested. Since someone in Uncle’s comments mentioned Caleb I wondered if he got eliminated. Seems he did. I watched his exit interview and I must say, Caleb left with class and grace.

I really don’t care for reality television and all the “reality competition” shows (a la “Survivor”). Oh sure, I thought this show might be nice for the mainstream to see that gun people can be normal folks, so I support it. And I did watch one episode a week or two ago just because I was flipping channels, it was on, so I figured I should finally see what all the hubbub was about.

And it just made me groan.

It’s the same old crap, with high school-level drama and childishness, because we need turmoil and conflict. Whine whine whine, cut to shot of a one-on-one interview of that person giving their “I don’t like the whiner” commentary to build conflicts. In-fighting. Backstabbing. Childishness. The biggest douchebags get the most TV time and the guys getting no camera time are probably just nice guys (but there’s no TV drama in being a nice guy). And of course, very little time was actually focused on shooting. Figures. I do think the shooting stuff was kinda cool… I liked the long bow work and then how they worked the elimination competition (with the crossbows), that was kinda cool. And I did also catch that one elimination where they did the shooting off the zip line. So the shooting events seem neat, but all the rest? feh. I’ve got better ways to spend my time than watching this “reality” stuff.

But you know, maybe it’s not too far off the mark. It does show people shooting, it does show some cool marksmanship stuff. And it does show that gunnies are normal folk: we’re just as subject to drama and childishness as everyone else. 🙂

Yogi Bear – Mixed Martial Artist!

Back in 1997, John K.redid some Yogi Bear cartoons (in his twisted Ren & Stimpy-esque style).

In one of them, he had Yogi and Ranger Smith doing a little “ground and pound”

John K.'s Yogi Bear & Ranger Smith - Ground & Pound (image taken from John K.'s blog)

Check out Ranger Smith’s half-guard!

Read all about it and see more rough sketches from that episode at John K’s blog.

Trigger Pull Weights

Every trigger of every firearm requires a certain amount of force to press/pull/activate it. Generally speaking, the lighter the pull, the easier the trigger is to manipulate and therefore you can operate the machine more effectively.

Buddy of mine lent me a trigger pull gauge over the weekend. I just measured a bunch of my guns and the results were surprising.

I measured a stock XD-9 vs. an XD-9 with a Springer Precision trigger parts kit vs. a XD-9 with a Springer Precision installed trigger job. As expected, the trigger pull weights went down respectively. The parts kit didn’t reduce the trigger pull weight as much as advertised but I’ll also say that I wasn’t able to measure this particular gun before and after the kit, only measuring a totally different but fully stock gun. Nevertheless, the kit is a huge improvement over the factory trigger (reduced take-up, reduced over-travel, reduced pull weight). The installed trigger job I was also surprised at because I asked for a particular weight but today measured a weight about a pound above what I had asked for. I’m not sure if I didn’t get the weight I wanted or if there’s discrepancy between how they measured vs. how I measured, or maybe something with the gauge. I’m going to chalk it up to user-error in the measuring process or something about the scale itself, and trust Springer Precision did everything right (they’re a stand-up company with a good reputation and I have no reason to doubt them).

The thing is, Savage advertises that their AccuTrigger can be adjusted down to 1.5# weight. I have one such trigger and it’s adjusted all the way down, but it measured 2.75#. So… there’s an extra pound in the measurement. Is it how I’m measuring? Is it something with this scale?  If we chalk it up to one of those factors, then all the issues with the Springer triggers goes away and the numbers come out about right. Or of course, it could be the trigger is actually that weight. Don’t have enough ways to externally validate the numbers I’m seeing.

It was also interesting to see how other factors of the trigger contributed to the trigger feel. For instance, my snub’s trigger weight and the weight on a particular AR single-stage trigger were about the same, but the AR trigger feels much better and to my brain always felt lighter because it doesn’t travel as far as the snub’s trigger.

Overall, I don’t care that much about the specific numbers, more that it was interesting to see what the guns came in at and how they compared to each other and then how this all entered into the feel. Just a little fun with a pull weight gauge. 🙂

Updated: I did a little more playing with this. Consider a trigger is a lever and if you pull closer to the fulcrum (where the trigger pivots) it’s going to require more force than if you pull towards the tip of the trigger. If I try almost at the tip of the trigger of the XD with the trigger kit, I lost about a half-pound of pull from my previous measurements, so that brings the pull weight reduction more in line with their advertised reductions. Trying with the Springer-installed job and while I can get a hair lower than before it’s still not down where I asked for it to be.

Tres Brujas

Austin’s own The Sword have a new album coming soon (Aug. 24) called “Warp Riders”.

They just released a single from it, Tres Brujas.

It sounds… different. Still The Sword, but still different. But production also sounds a little slicker… maybe it’s just that.

The stuff I saw them perform live when opening for Motörhead a few months back? It sounded awesome, so I’m still looking forward to the new album. I won’t judge it by a single.

Just have to wait until next month to see….

Sunday Metal – Assjack

I’ve known about Hank III for a while but never got around to checking his stuff out, be it his country stuff or his more metal efforts.

I recently went through his catalog and it’s pretty damn good. I really like his country work: it’s outlaw country of the modern age. Damn good stuff.

But this is Sunday Metal, so I present “Choking Gesture” from his band Assjack, recorded right here in Austin at Emo’s.

BP1 & AT-6

Spent the day at KR Training.

I started out helping with the Basic Pistol 1 class. As always, the class was full. The demographics ran the gamut, as it tends to. I will say there were more women in today’s class than usual, including some younger women (mother-daughter combos, which was cool). The class ran well.

The afternoon was AT-6: Advanced Training Pistol Workout. There were only a few people signed up for the class, so Karl didn’t need any help with it. Instead, he suggested I shoot the drills, which was a good suggestion. I took AT-6 a few months ago, but there’s certainly no harm in extra trigger time. Some of the drills were the same, some were different. For instance, we started off shooting the FBI Qualification test, then moved on to 25 yard group shooting. A lot of strong-hand-only and weak-hand-only shooting. Shooting on the move. You end up working things that you may not like to work, but the only way to get to be the best and a well-rounded shooter is to not just practice the things you like, but to practice the things you don’t like and practice them until you like them (thank you, Brian Enos).

Reading my assessment of the first time I took the class, I’ve certainly improved. In fact, while I was shooting today I was generally pleased with myself. I was calling my shots and knew when I screwed up a shot. One thing I continue to have trouble with is my eyes at 25 yards and finding and holding that solid and repeated point of aim with each shot. My trigger control was alright (we did ball and dummy and I wasn’t seeing any dipping of the front sight when the ball went off), it’s my eyes and what I’m (not) seeing. Speaking of eyes and triggers, I’m still not getting on the trigger soon enough… rather, I distinctly found times where I should have been on the trigger sooner but instead was like: present, find front sight, OK it’s aligned, now press the trigger. But I’m feeling it and knowing what it is. It was only a few days ago that I worked the “fast shooting” to learn what a sight picture with 0.20 second splits would look like, so it’s all just not ingrained in my head… still need to work on learning that and allowing myself to do it. Overall, happy with how things went, I know what I need to continue to work on.

In related news… for today I used my XD-9 with the Springer Precision trigger kit in it. Probably 400-ish rounds today and the gun ran like a champ. It’s still not 100% like the other gun with the really tight trigger, but it’s rather close. I know my head was focused in part on the trigger wanting to see how it felt and how it worked, and I think it did fine; if anything, my focusing on the trigger took my focus away from shooting. It’s one of those “just shut up and shoot” things… “mind no mind” and so on. Just shoot, forget about the rest. And that works out well for me. I’m pleased with the results of the trigger kit. I’ll keep shooting this gun for a while.

Good day. No sunburn. Stayed hydrated. Got some good trigger time. Good day. 🙂