Category Archives: Rants

Ban SOPA/PIPA!!!

0
Filed under Rants

imageIf you don’t know about it, go here.

http://sopastrike.com/strike

Basically, SOPA/PIPA is a bill about to go before congress that could dramatically affect your ability to create new web content, as well as use existing sites freely.

For instance, do you like Craigslist.com?

Under SOPA/PIPA, Monster Cable (the company) could press to shut them down simply because people sell used Monster Cables through Craigslist and that eats away a little at Monster Cable’s revenue.

While I’m not blacking out my blog on the 18’th as many sites will be, this is definitely an important issue.

Call or email your congressman/senator now!

%$^&@*~ Worm!

0
Filed under Rants

imageWell, I’ve been working professionally for a long time now and have only had a virus/worm problem once (I knew better than to open the FTP port through my firewall, but my wife needed to send a large file, I wouldn’t leave it open, and, what could happen? <ugh>)…

Anyway, fast forward to last Sunday, I’m doing a some research on a little project of mine when suddenly things are running really slowly.

I check a few of the usual suspects and nothing. So I open TaskMan, figuring I’ve got FireFox running rampant and chewing a bunch of ram.

Well it was, but that wasn’t what was interesting.

What was interesting?

What was interesting was that I was seeing a 20 character long randomly named EXE run, spawn another similarly named EXE, then die. Over and over again.

That’s not the behavior of any kind of normal application.

Yikes.

First things first.

After some frantic clicking trying to kill the process before it could spawn, I finally managed to. Ok. So now what. I opened FireFox and Googled “random named exe running”, got back a list of results and clicked on one.

I ended up at some link farm page (you know the kind, tons of links, but nothing worth anything).

Ok. Back up and try another result. Different link farm page, but same format.

Huh-Whuh?

Ok, Search for “CreateWindow”, first Google result is an MSDN page, click on it, same dang link farm page!

Crap. I’d been hijacked.

Reboot

Maybe it was just an in memory thing, so I reboot (and disconnect from my network!).

Once I log back in, everything crawling. Back in TaskMan and I see, literally, dozens of randomly named EXE’s spawning and dying all over the place.

Double Yikes!

Eset’s NOD32 is running, but it can’t keep up.

Shutdown.

Using another computer, I used NOD32 to create an emergency rescue USB drive.

Back to the infected machine, I boot to the thumb drive and start a scan. Oh…..Dear……Lord….. This is going to take a while.

Hours Later….

When it finally finished, it’d found a number of infected files, particularly, the Win32/Olmarik worm, and cleaned them, but I wasn’t convinced.

I did a quick check for any EXE’s dated that day, and sure enough, there were dozens of them, all about 2.4mb in size, in the SysWow64 folder. I deleted them all, then searched for any other files modified in the last 2 days that I didn’t immediately recognize. I deleted everything I found.

Restart and everything’s running lovely again.

Not out of the Woods

I start up FireFox and Google search results are still redirecting to various link farms. Crap.

I use another computer to search for solutions…

  1. Uninstall FireFox
  2. Delete everything related to FireFox on your drive.
  3. Uninstall Java
  4. Delete everything related to Java on my drive

Reboot and reinstall FF. Back and working normally. Phew! I just have to restore all my bookmarks and addins and I should be good there.

Turns out, the worm creates some Java hooks into your browser than causes the redirection. Nasty stuff.

Still Not Out of the Woods

I suspected it still wasn’t over and sure enough, I’m right. A few hours later, I happen to need to use KeePass for a password. Pressing Ctrl-Alt-A (standard KeePass hotkey), I get an Explorer popup saying that “The executable 43HJKAN5H1AVC.exe could not be located. Remove this shortcut?”

Son-of-a-bitch.

The damn worm created short-cut links to those random named exes I’d already deleted.

So off I go hunting down all the LNK files modified in the last few days and delete all of them.

Finally, I believe everything’s back to normal (though I’m still walking cautiously for now). I’ve since run a full computer scan on all my machines with nothing noted. Fingers crossed.

Post mortem

I’m still not completely sure what vector the worm used to get in, considering NOD32 was running the whole time. The only thing I can think of was that my daughter was in and out of my office at the time. I could have been distracted at some point and clicked a popup that I didn’t really intend to click.

But that’s just a guess.

The second thing that bothers me is why NOD32 didn’t catch this. It did catch at least parts of it, but the Java browser hijack totally slipped through. Doesn’t give me a good feeling…

Code and Cuckoos

0
Filed under Cuckoo Clocks, Rants

WP_000163Aside from the obvious connotations of the title, I’m actually talking about real cuckoos here, or rather, cuckoo clocks.

Ages ago, just after we first bought the house we’re in now, I was clearing out the attic space and happened upon an old cuckoo clock. This one was labeled a Schatz 8-day, and I’ve since learned it’s a pretty common German cuckoo, probably from the 50s or 60s. Not really a collector’s piece, but interesting none-the-less.

Of course, there’s no telling how long it had been in the attic before I found it, and, not having time or inclination to do anything with it, I stuck it on a high shelf in the garage and promptly forgot about it. You can see it in all it’s glory as I found it in that first picture.

Flash forward to a few weeks ago. I finished out a second contract with a law firm, doing MSSQL Server tuning and optimization, and had some time, so I decided to clear out the garage.

Lo and behold, that cuckoo was still up on that top shelf. Dusty, but otherwise just as I’d found it almost 7 years ago.

The Old Code

Obviously, it was missing some numerals. The hands were so brittle they snapped when I tried to adjust the time. One of the birds on the front piece was gone, no idea to where. The chains were utterly tarnished. The mechanism was completely dusty and grungy. And the bellows (the parts that actually make the cuckoo sounds) literally disintegrated when I took them out and tried to test them.

WP_000161   WP_000162   WP_000164

However, the mechanism appeared to be all there. Both bellows were there. Both weights were there. I still had the chains and the backplate with the chime, so there were lots of positives.

Refactoring

The first step was getting the mechanism out. Pretty simple, really. The bellows needed to be removed, but they were held in with a single screw and a set nail. The mechanism itself was held in with 4 small screws.

I blew it out with an airgun, but it became clear it needed a full on cleaning. After a little internet research, I found that clock cleaning solution is essentially water, ammonia, and Murphy’s Oil Soap, of which I had all three. Mix it up, soak the mech for a few minutes, wash it out thoroughly and the mech was looking almost new.

WP_000168   WP_000169 

Next, I got online and found a clock store that sold virtually identical parts. 10$ later and I had on order paper for bellows, replacement numerals and a new pair of hands.

Repapering the bellows looks hard, but was quite straightforward. You just have get the folds in the right places. And some glue and clamps later, the numerals and hands were back on and looking MY-T-FINE…

WP_000187   WP_000188

The Build or Buy Decision

At this point, the only thing left was that bird (or lack thereof). I found an auction on eBay selling a virtually identical bird, but at the last minute, I got caught up in, well, life, and completely missed the auction completion. Doh!

Tons of searches and even emails to clock shops turned up nothing. It was becoming clear that this particular decision was being made for me.

Proper Object Inheritance

Obviously, I needed a new bird almost exactly like the original, but in reverse. So, trace and reverse to get this.

WP_000211   WP_000213

I didn’t have any linden wood (the typical Cuckoo clock wood), so some clear pine would have to do. And my carving toolchest is a tad limited.

WP_000215

 

Unit Testing

After a few hours of grinding, whittling and chiseling, I ended up with this.

WP_000216   WP_000218

This was a good enough result that I decided to continue on with the project and finish it out. I had to pick up some modeler’s paints, but I had an airbrush, so I was good on that front.

“Good enough” Engineering

The final result came out pretty reasonable. Not a perfect match, but close enough.

WP_000224  WP_000221 

WP_000220

Post Mortem

So, what does rebuilding a cuckoo clock have to do with developing commercial software?

More than you might think. When you look at cuckoo clocks, or really, mechanical clocks in general, you really come away with the strong conclusion that clockmakers back when were the engineers and programmers of their day. Looking at the complex system of gears, the escapement, and the cams that drive the bellow lifts and gong ringer, it’s not too hard to see a system of subsystems, inputs, outputs, and programmed behaviors.

As programmers, we spend a lot of time staring and computers and wrestling with the bleeding edge of technology.

Sometimes, it can help put things into perspective by wrestling  with a bit of 1700’s bleed edge technology.

Google Mail and Attachments

0
Filed under Rants, Tweaks

imageJust discovered something incredibly nifty about GoogleMail (GMail).

I’d written a message, and had included the sentence “I’ve attached this document in Word format for your review”.

Unfortunately, I forgot to attach the document.

When I clicked Send, Gmail popped up a messagebox asking me if I’d intended to include an attachment, because I’d written in the email “I’ve attached….”.

Clever stuff. Simple, but clever.

I can’t count how many times having that little feature in Outlook would have saved me from having to respond later with the attachment I meant to send.

It’s little things like that that can make a big difference in app usability. Things like automatically formatting a phone number, or automatically picking a Zip code once the city and state have been entered, or entering the city and state from the Zip code. Or how about a calendar system where, for the date of the appointment, you could enter “2 weeks from monday” and have the system determine the correct date?

A GOSUB By Any Other Name

0
Filed under .NET, Rants, VB Feng Shui

imageI’ve been using VS2010 for a while now, and there’s definitely a lot to like in this release. Granted, the UI is a little slower than 2008, but that’s mostly because of all the new WPF goodness baked into every nook and granny of the IDE now.

One thing that I’d been looking forward to is multi-line lambdas in VB. C# has had that since 2008 (or possibly before), but VB was always limited to a single line or (more typically) a call to a function, which could be multiline.

Still, when you’re talking about lambdas, you’re typically talking about small chunks of code that you almost never really want to be a separate function, Private or not. It’s just that much more clutter.

VB2010 finally addresses that disparity and you can now do multi-line lambdas in VB.

Dim MyLambda = Function(arg As String) As String
   arg &= ","
   arg &= "More"
   Return arg

'And to call it
Debug.Print(MyLambda("TestArg"))

Now, technically speaking, you might argue that “MyLambda” is an anonymous method. And you’d be right. Anonymous methods, delegates, and lambdas are, essentially, different names for the same thing. Basically, they’re all just ways of “embedding” code into a variable, and then being able to call that code.

In the olden days, you’d use pointers for such folderol, but this is managed .net code, and pointers are all but verboten in these parts.

But wait!

The thing is, it struck me at one point, while recently describing how you might actually use a delegate to a colleague, of the similarities between anonymous functions like the above, and the much maligned VB GOSUB statement (GOTO’s less recognized little brother).

Dim Arg as string = "testArg"
Gosub MyLambda
Debug.print(Arg)
Return

MyLambda:
   arg &= ","
   arg &= "More"
   Return

Don’t get me wrong, I never found GOSUB to be particularly all that clean a construct. I used it on occasion, but not often. You couldn’t pass explicit arguments with GOSUB, and executing a variable GOSUB required the ON x GOSUB statement, which was pretty abysmal to use.

Still, all the makings of a lambda were right there, all along.

Get Out The Vote!

0
Filed under Rants

image Or rather, Get out AND vote!

I’m not going to get up on any soapboxes here about politics. That’s not what this blog is all about. But whatever your inclinations are, at least get down to the polls this Tuesday and put your vote in!

Now, back to hacking at a generic interception framework!

Old School Advice That Still Rings True

0
Filed under Rants

Earlier today, I was reading an excerpt from an interview with Dan Bricklin (the guy that invented the spreadsheet, for those that might not know).

He was asked about his approach to building programs back in the day (the mid 80’s, all legwarmers and The A Team).

His response was quite interesting, very “agile” when agile only meant an adjective to describe gymnasts.

One thing I’ve always done, for many years — I know Bob Frankston did, too — you have to figure out a path through the whole thing and implement that first. And then you go back to add more. Getting the path through is like building a scaffold. A lot more is put on [the application] before it’s a real product, but you have the critical path in place. It’s always building off something that’s working.

I thought that was fantastic. Yet another example of how programming seems to be a lot of doing the same thing over and over, just with each generation coming up with trendy new names for it all in the process.

Phillips Comes Through

0
Filed under Rants

image It’s been almost two months since we got hit by lightning that took out almost all the electronics in the house. A very looonnnngggg two months. Far more time that I would ever want to spend hassling with insurance adjusters, repairmen, UPS vendors, etc.

Still, it could have been worse.

Fortunately, a little good news came in the mail today.

I’d built a very custom computer to power a gaming rig I’m building. It was connected to a Philips Surge suppressor with a “master” outlet, basically, a surge suppressor power strip with one plug that is the “master” plug. When whatever is plugged into that plug is turned on, all the other plugs come on. When turned off, all the other plugs completely power down. They’re a great way to cut down on vampire devices that suck energy even when “off”.

Well, the computer was fried by the lightning. As was the Altec Lansing speaker/subwoofer system connected to it.

I’d called Philips to try and file a claim against their “25,000$ connected equipment guarantee”. Obviously, my losses weren’t that much but every little bit would help.

They sent out a UPS mailing label to return the surge suppressor (it still worked but they wanted engineering to investigate it).

So I boxed it up and shipped it, along with the rundown the the fried equipment.

It took about 2 weeks, but today I get a package in the mail. They sent me a new surge suppressor (not sure how much the old one helped, as it was fried and my PC was fried, but that’s another story) and a check to cover the damages.

I’d had my doubts whether anything would come of that guarantee, but they did indeed come through, so hats off to Philips!

HP G85 and JetDirect for the Win!

1
Filed under Hardware, Rants

image I’ve always been a bit of an HP fan when it comes to their printers. Ages ago, my dad bought a LaserJet that worked for what seemed like forever.

So, back when I first started telecommuting, when I needed a printer, I naturally thought of HP and ended up with a G85 Inkjet/Copier/Scanner.

I also picked up a JetDirect box to let me hook it up directly to an ethernet network. This was all circa 2000. Yep, seriously olden days.

But, that printer is still going strong. Absolutely no problems with it. I’ve dropped it. Moved twice. And most recently, the house got struck by lightning. I lost computers, a SAN drive, network switches, hubs, a TIVO, even UPS’s and my AC units.

But that printer and the Jet Direct box survived unscathed.

So what?

Here’s the thing. The G85 is a great scanner, BUT, the software is hopelessly outdated and HP hasn’t updated it since the XP days. So running it under Vista or Win7 has been a pain.

After the lightning, I was re-setting up new machines, when I happened to try browsing over to the printer’s IP address, basically on a whim.

Guess what I found?

image

That JetDirect box has a webserver built into this WHOLE TIME!

Not just that, but check that scan button…

Click it, and it leads you to this page…

image

Yep, that’s right, you can initiate a scan right here, from the browser, then download the resulting image. No drivers to load, no compatibility issues. Nothing but good ol’ fashioned sweetness.

I’ve had this thing literally ten years and never knew that was there. Certainly never came across it in the docs or any online info.

Turns out you can teach an old dog new tricks (or get him to do tricks you’ve never seen before <g>)

Lightning Strikes

0
Filed under Rants

And let me tell you, in this day and age, lightning can just plain suck.

Garage Door opener, AC units, all my computers, UPS’s, TIVO, home audio, phone systems, NAS drives, cable box. You name it, it got smoked.

I’ve spent the last three weeks scrambling to get new machines setup, get backups restored (fortunately, I had recent ones), get repair techs out for the big stuff, and take care of the smaller stuff myself.

And I had a whole house surge suppressor, and well as UPS units on all my machines and some of my audio gear. Smoked them all as well.

So, any lessons learned? Oh yeah.

  1. Make SURE you know what’s covered by your UPS “connected equipment guarantee”. Keep all that paperwork filed somewhere for quick retrieval.
  2. Keep good records of purchases of anything you plug in. I keep mine in Quicken. Then keep backups of your Quicken data and the program disks so you can install to another machine and retrieve the data.
  3. You’ll typically have about 10 days to file a claim. So keeping recent backups of that data will help immensely with quickly pulling together all your records of what you had, when you bought it, and how much you paid.
  4. Check with your homeowner’s insurance. You likely have a 1% or 2% deductable. If your house is 250,000$, that’s a sizable chunk of change you’ll be out. And keep in mind, the insurance companies will depreciate the value of your equipment by how long you’ve owned it, so it might be even tougher to get up to that 1 or 2%.
  5. UPS’s can protect equipment but they won’t always work. Have backups. Make sure they’re restorable.
  6. You can almost be guaranteed that it’ll cost you more to replace all the equipment that you lost than it did to buy it in the first place. Why? Because if it’s computer stuff, you’re not going to go out and buy an exact replacement, you’ll buy something more modern, more harddrive space, bigger monitor, faster CPU, more memory, etc. Prices have come down since you bought, after all.

With the backups I had, it took a while, but I’m back online, and with almost my complete previous setup. Still lots of little stuff to take care of, but it’s getting there.

The good news is, we weren’t home, and there was no damage to the house itself, short of a few blown circuit breakers, and a blown GFCI.

In other words, lucky!