Running Tomcat 5 as a service under Windows 7 64-bit

December 12, 2011 Leave a comment

I had some trouble getting Tomcat 5.5.34 to run under Windows 7 64-bit. I found a solution that required copying msvc71.dll to the tomcat bin directory. I didn’t have this DLL, so I found it online and when I went to copy it to the bin directory, I noticed the bin directory contained two folders: i64 and x64. I suspect the i64 folder is for the Itanium processor. x64 contains another tomcat5.exe. I nixed copying the DLL and instead modified the service.bat file located in the bin directory.

I changed every instance of this:

%CATALINA_HOME%\bin\tomcat5.exe

To this:

%CATALINA_HOME%\bin\x64\tomcat5.exe

Then, I ran:

service.bat install

It worked for me! Now I have a tomcat service that doesn’t fail when starting up. Hopefully this can help you out, too.

Categories: General

Fog Creek Software Rolls Out Another Winner

September 13, 2011 Leave a comment

Oooooohhhh. I’m estatic about this new product. I’ve tried to find a simple, intuitive, easy-to-use tool for managing processes, projects, etc. without taking up a bunch of administrative time. Finally . . . this looks sooo promising. Gonna take it for a spin.

https://trello.com

Categories: Uncategorized

Steve Klabnik (gotta love a geek-styled web page)

September 12, 2011 Leave a comment
Categories: General

Software Development Interviews

September 12, 2011 Leave a comment

Having been on a number of these interviews throughout my career, I strongly believe that these interviews need a major overhaul. Often times, it seems the goal of the interviewer in the technical portion of the interview is to trick or stump the person being interviewed, and this is under the guise of ‘we want to see how you approach a problem’. I don’t mind at all being tested for my problem solving skills, however, the problems that are often presented are notreal world problems.

For example, in my entire career (over 15 years), I have never, ever, ever once needed to find an ancestor node in a binary tree. Nor, in reality, have I needed to traverse a binary tree. So, presenting this as a problem to solve is completely ludicrous in an interview. It doesn’t tell the interviewer anything when I can’t solve the problem in five minutes except that I have zero experience with binary trees.

Here’s where the need for a major overhaul comes in. Instead of irrelevant problems, how about presenting a real situation that you, as the potential employer, are facing or have faced, and then see how the candidate approaches that problem. After all, are you trying to hire someone who memorized an algorithm? Or are you trying to hire someone that can come up with practical solutions to real world problems?

Categories: Employment

INTP and ISFJ All In One — How?

April 18, 2010 4 comments

Wow, I haven’t written in a long time! Not that I haven’t wanted to, but because I didn’t have anything interesting to write about. I used to write all the time . . . short stories, creative works. Nothing was ever published, but I had great aspirations. Way back in the day (20 years ago or so), this was my life. Back then, I had taken the Keirsey Temperament Sorter test and turned out to be an INTP. Theoretically, an individual’s temperament doesn’t change throughout life. There’s supposed to be some sort of pre-disposition toward a certain temperament type. There may be characteristic changes within a type, but no type changes, so far as my research has shown.

Fast forward 20 years to today. A few weeks ago, I re-took this test and was surprised to see my type as ISFJ. It was an online test, so I kind of blew it off, thinking there was some mistake in the programming of the site. Yesterday, I bought David Keirsey’s book Please Understand Me II, and re-took the test again. I was ISFJ. So, the test I took online a few weeks back wasn’t wrong after all.

If temperaments are a pre-disposition, how is it that I went from an INTP in my late teen years to an ISFJ today? These are very different temperaments. There are some characteristics that overlap. NTs are geared toward creativity and engineering. I am a software engineer, so that makes a ton of sense. SJs are geared toward accounting, inventory and materials handling, not complex systems. For me, accounting-type jobs are far away from my personal desires. I love programming. I live and breathe complex systems.

Is it possible, then, for a person to have their temperament shaped a lot by life experiences? For example, SJs are the Guardians of society. These folks support the tried and true. Well, that’s not necessarily me. They also are ultra-dependable, to a point of taking on more obligations than they can possibly handle. That’s definitely me. And this is why I’m driven to research this area of my life . . . the “sick sense of responsibility” as someone once described me. Why am I like that? Don’t know.

Is it possible that a person can have two different temperament types overlapping? I don’t mean schizophrenic here. However, I can’t see how a person can go from an NT to an SJ type if temperament is a pre-disposition. Here’s an example. Like I mentioned at the outset of this post, I used to write all the time. Much of my teen years were spent writing stories. I loved it. I still do, but over the years the whole creative side of me just shut down. I can’t think of a single story to write, and I haven’t been able to in a very long time. Not that I don’t want to, I simply can’t. No energy for it as my energies are sapped up in my job, family and other obligations. There hasn’t been a shred of creativity in me in years and years. Yet, I started out that way, and yet, I have the desire to go back to that state of mind. So, at my core, I believe the NT part of me is still there, just somehow repressed, and that life’s experiences have the SJ part of me out in the forefront. Is this even possible? Does this make any sense?

Categories: Personality Tags: , , ,

Classic ASP “Write to file failed” Error

September 1, 2009 11 comments

A recent problem I came across in one of my applications is a failure to upload files over HTTP. I’ve been using this set of classic ASP file upload classes written by Lewis Moten from way back in 2002. The problem was that every file I uploaded from my brand new Dell notebook running Vista x64 failed with the error “Write to file failed.” Every browser on this notebook exhibited the same failure. Works fine from an XP box, though. So, I did some tracing and discovered that Vista, as a security precaution, does not send the full path anymore when doing an HTTP upload.

If you experience this, in the file named clsField.asp (actually, I may have renamed this long ago from its original name . . . I don’t remember) in this property: “Public Property Let FilePath(ByRef pstrPath)”, find this:

' Parse File Name
If Not InStrRev(pstrPath, "\") = 0 Then
    FileName = Mid(pstrPath, InStrRev(pstrPath, "\") + 1)
End If

And change it to this:

' Parse File Name
If Not InStrRev(pstrPath, "\") = 0 Then
    FileName = Mid(pstrPath, InStrRev(pstrPath, "\") + 1)
Else
    FileName = pstrPath        ' Vista doesn't sent full paths anymore
End If

That should clear up this error for you.

Categories: ASP

Does your Firefox load slow? Try this.

May 26, 2009 1 comment

Like me, you might really like Firefox. Generally speaking, it does a really good job. However, after turning on your computer (I’m talking Windows only), the first time you run Firefox it seems to take a long time to load up. Subsequent loads are okay, but that first one is the slow one. I recently came across a pretty nifty utility called Process Lasso by Bitsum Technologies. I can’t remember why I downloaded it . . . probably because someone recommended it as a way to speed up Windows Vista a bit. I’ve noticed  a significant improvement in load times for Firefox since I installed it a couple of days ago. That was a nice side effect. So, if your Firefox loads slow, try this utility (free for home use). It may speed up more than just Firefox. It works on pretty much all flavors of Windows, including XP x64 and Vista x64. Enjoy!

Categories: Tools & Utilities

Slick way of handling browser-specific CSS issues

May 14, 2009 Leave a comment

Every web developer eventually comes across a major headache in cross-browser functionality. My most recent one was with the alignment of text that follows a radio button. Vertically aligning that text with text that comes before a radio button is a bit of a pain. The easiest way to handle this is to use a table and set the valign attribute to middle, like so:

<table>
    <tr>
        <td valign="middle">Select:</td>
        <td valign="middle">
            <input type="radio" name="fruit" />Apple
            <input type="radio" name="fruit" />Orange
        </tr>
    </tr>
</table>

In this example, depending on your browser, you might see the text “Apple” and “Orange” sit lower than the “Select:” text. In Safari and Opera, this renders just fine. In IE, the text is 2 pixels lower and in Firefox, the text is 1 pixel lower. If we design for IE, then Firefox will be 1 pixel above, and Safari and Opera will be off. This is a case where browser-specific CSS is necessary, but you wouldn’t necessarily want to create a whole new stylesheet for it. Enter CSS Browser Selector by Rafael Lima. This nifty little piece of javascript lets you use browser-specific classes in your existing stylesheet. In this case, the solution was simple. First, we change the HTML a bit to put the text following the radio buttons in a label with a class named radio.

<input type="radio" name="fruit" /><label class="radio">Apple</label>
<input type="radio" name="fruit" /><label class="radio">Orange</label>

Then, we reference the small javascript file in our HTML header:

<script type="text/javascript" src="css_browser_selector.js"></script>

Finally, we add the browser-specific CSS to our stylesheet:

.ie label.radio {
    position: relative;
    font-weight: normal;
    top: -2px;
}

.gecko label.radio {
    position: relative;
    font-weight: normal;
    top: -1px;
}

label.radio {
    font-weight: normal;
}

Yep, it’s that easy. Now, IE and Firefox (gecko) render properly. Safari, Opera and other browsers just fall through to the last label.radio.

Categories: CSS Tags:

E Text Editor

May 7, 2009 Leave a comment

If you haven’t checked out the E text editor for Windows, you might want to. This is one powerful editor. I’ve been using the trial version for a little while and have just scratched the surface of some of the cool features. Just this morning, I watched the screencast on the home page and found out there was a very cool feature that will no doubt save me some time. I can use the CTRL key to select multiple words, and change them all at the same time. Imagine changing a variable name in just a small section of code. Just highlight each one using the CTRL key and start typing. I love it! It also supports snippets, which are nothing new, but are very cool anyway. E taglines itself as “The power of TextMate on Windows.” I’ve never used TextMate, so this is a new introduction for me, and I like it. It’s hard to impress me with a text editor because I am a huge vi fan. I used it for a long time on Unix, and in my current job, I use it all the time on various Linux servers. I carried that use over to Windows with gvim. It’s powerful, to be sure. So, for me to even discuss another text editor is a big deal. The trial version of E is time limited to 30 days and the purchase price is $34.95. When my trial is up, I’ll be purchasing this one for sure.

Categories: Tools & Utilities

Multitenant SQL Server Architecture

May 6, 2009 Leave a comment

We have a very large database where I work that is architected as a multitenant database. This is great since all we have to do is add a new customer record, and the rest takes care of itself. Because of the proprietary nature of our platform, I can’t put the table schemas up here for you to look at. However, I am looking for advice or techniques you may have used to solve a particular problem.

When customers import their data, imports go fairly slow. We give customers standard fields to import data into, but then they also have the option of importing custom fields. The table that holds custom fields allows one record per customer/user/field. Each record is tied to the user, and the user data is stored in another table. If a customer has 10 custom fields defined and they upload 50,000 users with all 10 field values, this is a total of 500,000 custom data records. The import process has to first see if the custom data exists. If so, it updates that record. If not, it inserts a new record. As you can imagine with this process, the more custom fields a customer has, the slower the import process becomes. Each custom field has to be tied to the user before it gets updated or inserted. The user may or may not exist, so we have to first insert or update the user, get the user id, and use that for each custom data record. That means no bulk loading because we first need the user id. Think of it as a master-detail relationship. The table that holds users is the master. The table that holds custom data is the detail.

I’m curious to know what you’ve done, or would try to do with a scenario like this to make it super fast.

Categories: SQL Server
Follow

Get every new post delivered to your Inbox.