Preparedness

Preparation isn't just about carrying a weapon wherever you go. There is more to it than that. Preparation is having the tools that you need, when you need them.

Practically, there is a problem with that. Clearly you might need a bathtub here and there. You know, those times when you think 'man, I could really use a bath'? But you don't carry one. When you travel, though, might it not be a bad idea to have a bit of soap in case you fine a place you can get clean?

That's the kind of preparation I am talking about here. Pragmatic preparation is my goal. I am a fairly parochial chap; I go to see clients, and come home. I travel only occasionally, and live in the suburbs. This defines in part my preparation tactics. If you are in a rural setting, or travel a lot, and your strategy includes preparation, your needs will differ.

My personal preparation includes two phases. I have certain things that are always on my person. There is also a 'kit' of items that I stash in a hall closet to those 'better grab the kit before I go out' kind of trips.

On my person, I have three things that I always carry: a belt, a Leatherman Wave, and a lighter. I believe that each of these things - none a weapon in most minds - is an important part of hour by hour preparedness. A belt fives you two extra feet of reach, is a Kusari Fundo, and can be used as a restraint. A Leatherman trims toenails, disassembles anything, and has a four inch blade with a thumb release. A lighter gives light, can be a distraction, and lights cigars.

The kit is a little more complete. I don't have a complete inventory at the moment, but off the top of my head, I have the following:

  • screwdrivers
  • a crowbar
  • wire
  • rope
  • an emergency blanket
  • first aid
  • smoke bombs
  • waterproof, windproof matches
  • water purification
  • a mechanical flashlight
  • thermite and starter
  • a glass cutter
  • epoxy
  • wire cutters
  • a small butane torch
  • a slingshot
  • nails
  • duct tape
  • and a few other things


When your brother and law calls and says "I have a problem, can you come over?" it is time to grab the kit. When you have to go to a strange part of town, grab the kit. If there is an odd noise outside, grab the kit. Get the idea? It is self protection times twelve.

What to you do to assure preparedness?

Something to think about

If you had to run a mile, could you do it? I don't mean in a race, or among friends. I mean running a mile as if your life depended on it? How about the life of your spouse, or your child?
Really? How about after a full meal? Or after three drinks? Or if you were ill? Or injured?
How about through pouring rain? Or through standing water?
What if you were carrying someone else?
Just to test, I ran around a lake with my son on my shoulders, while we were on vacation. We were near the recent shuttle launch, and I used the Magic If. "What if that shuttle exploded and there was rubble landing all around me?" I needed to get to shelter: to save myself and my son. I had just had a full meal, and a beer. I couldn't do it.
Could you?
While you never know what adrenaline can do, wouldn't it be good to know that it was possible to run like that in a Magic If situation? If you had the energy of a real life or death situation it should be even easier - you should be able to go twice as far.
This is something that everyone should think about - not just warriors. It doesn't take the shuttle exploding to make for a situation in which a person might have to run a mile under less-than-optimal situations. Train like you needed to run that mile to save what is dear to you.

SSIS ProgramTeam == Monty Python?

Error message from SSIS:

Warning: 0x80019002 at File Loader - Trans Package - Invoice: The Execution method succeeded, but the number of errors raised (3) reached the maximum allowed (3); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.

Skit from Holy Grail:

Then, shalt thou count to three. No more. No less. Three shalt be the number thou shalt count, and the number of the counting shall be three. Four shalt thou not count, nor either count thou two, excepting that thou then proceed to three. Five is right out. Once the number three, being the third number, be reached, then, lobbest thou thy Holy Hand Grenade of Antioch towards thy foe, who, being naughty in My sight, shall snuff it.

Only their hairdresser knows for sure.

ASP.NET Membership, SqlMembershipProvider, and LDAP

As part of my work at OmniPath, I need to create an LDAP provider that confirms credentials if they are not already in the ASP.NET Membership system.  It seems that ADAM is the pathway to this, but I bet there are a bunch of tools out there that already will do this for me, maybe even already set up for Community Server.  When I was at the Community Server Developers Conference last month, I talked to a few people that had done this, but did I write down their email?  Nooooo....  Anyway, that's the next job that I need to look at.

Boy, it's nice to be back writing random thoughts in to a blogging engine.  How did I not do this for the last four months?

A client reminded me of a project that we did together ten years ago that revolved around tracking scope points into requirements into designs into test plans.  It was very slick.  There was a way for people to comment on the document remotely, and then the author could mark down comments and accept the changes, and only the unhandled comments would be taken to the quality gate meetings.

Sound familiar?  Sharepoint and Office 2007.

So, I am going to look at renewing that project using contemporary technology.  There is a lot of stuff already out there - with a good set of templates, I bet I won't even have to write any code!  W00t!  Looking forward to that.

C# is the new VB

I am officially tired of the C# versus VB sniping, folks.

 

C# is just Microsoft's way of making code bigots program in VB.

 

Let's face the facts.  VB has traditionally brought three things to the table that couldn't easily be accomplished in ASM or C++ or Java or whatever:

 

  1. A ubiquitous runtime library
  2. Semi-structured typing
  3. Memory Management

 

Guess what C# has.  You guessed it.

 

  1. The .NET Framework
  2. The Object
  3. The GC

 

Just.  Like.  VB.

 

I don't want to hear any more crap.  Neither language is better, just as Blue isn't better than Green.  They are both languages, they do the same thing, they compile to IL, there is no effective difference.

 

Want to impress me?  Use both.  Or write in C++.  C# programmers don't impress me.  I used it for three years and switched to VB because I like it better.  Not because it is better, because I like it better.

 

There, I feel a lot better.  Don't you??

News flash: MSXML6 breaks stuff

I should be used to this.  Really, I should.  It is just SO easy to make bad assumptions about Microsoft software when you are coding.  Take MSXML6 ... please!  (That's my best Dangerfield, I swear!)  They added a XMLHttpRequest class, which Netscape has supported forever.  My inherited Learning Management System has this conditional:

if (window.XMLHttpRequest) 

{ 

          //assume Mozilla 

}else{ 

          //assume Microsoft 

} 

Now, this code is just there to help determine if the ActiveX control should be used, but of COURSE the original developer leaned on it later for all SORTS of stuff.  So, when MSXML6 came out, with its juicy new XMLHttpRequest object, the conditional assumed Mozilla, and, well, hilarity ensued.

The rocking starts earlier every year

Well, I don't talk much about our son on this page, but this is too good to pass up.  At the gaming conference Origins this year, CD101 (a local radio station) had a booth.  Gabrielle and I are fans, and we stopped to chat for a second with Adam dozing in his carriage.  The gave us one of their ubiquitous stickers, which somehos ended up on the carriage.  A picture and much hilarity followed, and it ended with Adam's first internet appearance.

It's a weird, weird world, folks.  A picture of Adam with a cthulu handing over the edge of the carriage on CD101's web page ... because we went to a gaming conference.  What's next I wonder...

Open Source and Enterprise Development

I attended a panel discussion about open source and enterprise development.  There were some stellar people on the panel, including:

  • Rocky Lhotka
  • Sara Rain
  • Rod Johnson
  • aak, I forget the other two!


Anyway, that's not important right now; I'll update later with the other two names.  Point is, they were asked about the whys and wherefores of open source in the enterprise space, and mentioned the 'cool' factor and the security of seeing the code as the primary factors for open source utilization.  I think they were wrong.

First, the reason people use open source is that it is free.  At the enterprise level, there is usually no shortage of money, but I don't think most open source is utilized at the enterprise level.  I think it is utilized at the department level.  Departments have budgets, and after the bubble burst, there is no departmental money in any enterprise.  Mid-level enterprise architects are using the software because there is no budget for a document management solution.  Instead of writing it themselves, they use open source.

Second, they overlooked the most important thing that open source is used for - education of the community.  When you have the best and brightest writing software then giving away the source, people use it for examples.  I use Community Server and Dot Net Nuke on a number of projects - because they are free, and good.  I use the source code to show how best to solve difficult problems every day, because they people who wrote them are smart.  That's what open source is doing for the development community more than anything else.

The panel also dismissed the idea of open sourcing products for end-of-life projects because 'what community wants to manage the source of Microsoft Money?'  Well, I disagree there too.  I bet someone would take the project on.  And I bet people would use it - because it is free, and good.  I don't care if the source is a mess.  Someone will own it, and someone will use it, and it is no hair off of anyone's back.  Visual Basic 6.0 would be a fantastic product to open source.  There is a monster community out there, and it is made up of developers.  Someone will use it and someone will own it.

Ever needed to search for a string in your stored procedures?

I was digging through an older database I am rewriting and I stumbled on this little stored procedure.  It uses the internals of SQL Server to search the stored procedures for a provided string.  Just one of those bits of code we are all meaning to write but never do.

CREATE PROCEDURE Find_Text_In_SP
@StringToSearch varchar(100) 
AS 
   SET @StringToSearch = '%' +@StringToSearch + '%'
   SELECT Distinct SO.Name
   FROM sysobjects SO (NOLOCK)
   INNER JOIN syscomments SC (NOLOCK) on SO.Id = SC.ID
   AND SO.Type = 'P'
   AND SC.Text LIKE @stringtosearch
   ORDER BY SO.Name
GO

I'm not even sure who wrote it but it seems like something handy to have around.

Getting the version from a ClickOnce published application

Do you get the requirement to put the version in the title bar of your apps?  I do all the time.  With the advent of ClickOnce, though, most apps have TWO version numbers, the Assembly Version, and the Publish Version.  If you go by the Publish Version (you aren't alone) you can get the Version number using the System.Deployment.Application namespace.  Make sure you import it first, and reference it too.

If ApplicationDeployment.IsNetworkDeployed Then
  Me.Text = String.Format("{0}, Version {1}", Me.Text, ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString)
Else
  Me.Text = String.Format("{0}, Version {1}.{2}.{3}.{4}", Me.Text, My.Application.Info.Version.Major.ToString, My.Application.Info.Version.Minor.ToString, My.Application.Info.Version.Build.ToString, My.Application.Info.Version.Revision.ToString)
End If 

Bill Sempf

Husband. Father. Pentester. Secure software composer. Brewer. Lockpicker. Ninja. Insurrectionist. Lumberjack. All words that have been used to describe me recently. I help people write more secure software.

PageList

profile for Bill Sempf on Stack Exchange, a network of free, community-driven Q&A sites

MonthList