Skip to content

Did some house keeping on my blog

So I visited my blog again after a long period of not caring at all. Now I care a little bit again. I have a few posts that I want to write in the near future and I found myself with a few extra minutes to kill today so I figured I would make sure Wordpress was update to date and working fine. So this morning I upgraded to the latest and updated all my plugins as well. So looks like I’ll be good to go when I’m ready to write.

Tagged

Ooops, found a remote weblogic exploit

I accidently the whole weblogic. Found this gem today on accident:

ERROR: transport error 202: handshake failed - received >
ÿô< - excepted >JDWP-Handshake< ["transport.c",L41]
JDWP exit error JVMTI_ERROR_NONE(0): could not connect, timeout or fatal error

It’s executed remotely and I just happened to have the logs scrolling in another window and bam, server became unresponsive.

You and your comments stink

//This code is a piece of shit!!!!1!

//OMGZ, why are we doing this?

You’re as helpful as an art critic, and just as productive. Unless you’re going to pick up a paintbrush and repaint it (I’m keeping with the art metaphor) STFU.  Ok, done with the metaphor.

There should be a separate log for keeping a laundry list of what needs to get looked at or refactored. Adding more noise to the already deafening code base shows me that you “think” you’re a 31337 programmer but do not have the skills to back that up. It reminds me of a bit from family guy where two guys are in Starbucks ” doing some writing” on their laptops and saying something along the line of “why write if no one sees you writing?”. This is the same thing, why actually fix an issue when you can just say “he look everyone, I see a problem but I’m not going to fix it! Look at me!”

So basically don’t crap on a turd taco and expect someone else to clean it up.

I think I’m going to start ending all my rant posts with song lyrics. So here goes, a new motto for code smells:

If there was a problem yo I’ll solve it
Check out the hook while my DJ revolves it

– Vinilla Ice – Ice Ice Baby

What’s on my book shelf

I needed something small to post to make sure I have a “June” archive posting. I know it’s cheating, but I have a few longer things I have in draft status from April that I haven’t completed yet. So I thought I would throw this up there.

Clean Code by Bob Martin

I’m about half way through the book and it’s some very obvious stuff but still needs to be said (and confirmed that others feel the same way too). It’s not a “HOWTO” book in terms of programming, but more of a “Well since you’re already doing this, why not do it well?” He lays out suggestions for such mundane things as naming methods, variables, comments, and other strokes of the keys that most developers take for granted as tertiary functions of programming. But they are indeed the marathon aspects of software, they’ll be there long after the author has left for greener pastures.

The Hot Shoe Diaries by Joe McNally

I just started this last night and I’m only on page 23. This too is not a “HOWTO” book, from what I’ve gathered so far, but a tale of photographers persuit of learning and experience (though he’s been doing it for 35 years already). What drew me to this book were that he’s a Nikon shooter (I had a D70 and now a D90), he’s a strobist (I love my SB-600), and the way he presents the material is in a very personable and relatable manner. I hope the rest of the book is as interesting as the first 23 pages.

Besides the fact it doesn’t work, it’s perfectly fine

I’ve said this a few times in response to people asking me to look into issues, let me explain what that means (or at least how I use it). In general, a feature requires a number of pieces to work in symphony in order to function correctly. If one of those things is incorrect, the feature falls apart. For example, on a recent project there were a few things that needed to be true in order for it to work correctly:

  • Correct version of the JAR deployed
  • Correct version of the JSP pages
  • Correct configuration files in place
  • Correct database values in place

So when I say “besides the fact it doesn’t work, it’s perfectly fine”, I’m saying all those pieces appear to be correct. They’re the known first places to check when there is an issue (and in general the pieces I’m responsible for). I would say a good 95% of issues that were reported involved one of those four pieces, usually the database values so I check there first (or make them do it since it’s usually their fault).

So the next time you hear me say this, rest assured I’ve looked into the parts I’m responsible for. I don’t come out and say that because that would be rude, implying that I’ve done my job and I wont do yours for you.

Tagged ,

You Broke It You Bought It

There needs to be some type of “You Broke It You Bought It” policy in software engineering. I just encountered a situation where a developer deleted a piece of my code in a later release, either on accident or on purpose, and somehow I’m roped back into it. I’m getting emails telling me “You need to look into it!” Bullshit! I didn’t delete the code, I didn’t tell him it was OK to delete the code. I don’t even know what this guy is working on. But yet, somehow, I’m still responsible for it.

I’m not the type of person to throw my hands up and say “hey, that’s not my job man”. I’m usually always willing to lend a hand regardless if I’m some how Kevin Bacon’d to the project. But this is complete horse crap.  It’s people being lazy and no one wants to accept responibility for it. This could be handled by any number of people actually involved with this developer, project, or even the source code management.

So to conclude (and now my new automated email response for requests like this), I leave you with some lyrics.

A few times I’ve been around that track
So it’s not just gonna happen like that
‘Cause I ain’t no Hollaback Girl
I ain’t no Hollaback Girl

Gwen Stefani – Hollaback Girl

Tagged , ,

Another new host, but at least it’s the same blog!

I’m giving another host a try, http://prgmr.com/xen/. It’s cheap, it’s linux, and I get root. It’s run by a few people and they seem very honest about when they run into issues (whether caused by them or not). So since I don’t have really high demands on my blog other than being able to do what I want, when I want to, I thought I would give them a whirl.

I’m currently signed up with the 512m memory plan for $12/m, quite a bargin IMO. My next step is to purchase another domain and hook it up to the server and use that as a starting point. I might just keep blitzstein.net parked where it is (it’s only $25 a year) and use this new domain / server as my playground since that’s what I’ll be using it for mostly. The other host supports PHP just fine, but has the standard shitty apache/fcgi setup for rails.

Tagged , , ,

Hit a snag with Netbeans, Maven, and testing utils.

I switched to Netbeans probably a month or so ago for this small side project I’ve started and so far I’m digging it. However I hit a little issue that Eclipse never had a problem with. I’m using DbUnit for integration tests and I have an AbstractDbUnitIntegrationTest class that does a CLEAN_INSERT on the database for every test, which is great. But that means I need to have a data set to start with.

To accomplish this, I’ve written a small DbUnitUtil class that exports all (or some) tables from my database to /src/test/resources/data.xml where that abstract class then loads from. I’ve already written this class for another project I did last year so it’s easy enough to use, however, if you have a class in /src/test/java/, Netbeans automatically assumes it’s a unit test and tries to run with with ‘mvn test’. This class has a static void main method and should be run as such, but I cannot figure out how to get Netbeans to recognize that with the current root directory being test.

So to resolve this issue, which only occurs when I want to export a data set, I have to move this class to /src/main/java, where it doesn’t really belong, and maven realizes it has a static main void and runs it as expected. I’ve tried the DbUnit maven plugin but it seems to have a bug in it when specifying where to actually export the data file to, it just ignore it and uses the default.

Tagged , , ,

5 Days of Wicket

mystic blog » 5 Days of Wicket.

I hope he’s successful because I really wanted to give Wicket a try for a project but got frustrated. I’ll be checking in on the progress.

Tagged

RegEx Ninja: Make sure a String does not contain a pattern

^((?!highLightRow).)*$

I wanted to make sure a string did not contain a piece of text, specifically “highLightRow”. The reason is I’m writing test cases in Selenium and I want to make sure a line does not contain an error. The way I know it contains an error is if the text looks something like this:

<div id="my-id" class="someclass another class highLightRow">There was an error</div>

So after I write a test to make sure it works, I want to assure that “highLightRow” is not present, and I use that RegEx

Tagged