Thursday, December 21, 2006

Cygwin users: Get rid of the "Terminate batch job annoyance"!

Just figured this out and thought I would pass it along. If you find it useful, please send me your Christmas bonuses.

I am constantly using cygwin (and IMHO every Windows-oriented developer should be doing the same), but I find it rather annoying when I go to close it using Ctrl+D, Windows XP always asks me:

Terminate batch job (Y/N)?

Why? Because the mouth-breathing people who wrote Windows like annoying you. As a result, they decided that anytime someone ran a batch file, when the batch file was terminated early they would ask if you really meant to do that. Yes, you are stupid. You didn't really mean to hit Ctrl+C, but rather meant to send a letter to your Aunt Tilly using the Microsoft Vexation Paperclip (MVP), which can help you write that missive. It can do this for many other things too. Incessantly.

This results in my having to press Ctrl+C, clicking on the X in the window, or some other such irritant. I calculate that, with the extra time it takes to tell Windows to take a hike, I have spent approximately 2.6458 work hours during my time at my current employment. This is time that could have been spent doing more productive things, such as writing Unit Tests, emptying my Recycle bin (Oh, no, you really didn't want Windows to remove that, did you? Even though the system already asked you if you really Really REALLY wanted to remove it already? Oh, no, you are stoooooopid!), or send witty emails to my co-workers. So....

The solution is to start cygwin without using the cygwin.bat file. Here is what you do:

* Right-click on the cygwin icon/shortcut and select Properties in the popup menu. A dialog box should pop up. (If it doesn't, you are screwed. Go to Jail. Do not pass Go, do not collect $200.)

* In the Target entry field, put the following (instead of the call to cygwin.bat):

C:\cygwin\bin\bash.exe --login -i

(change the path to wherever you installed cygwin if you did it the non-standard way, you rebel scum).

* Click on OK to close the dialog.

* You will now note that when you click on your shortcut, your cygwin window will open as you are used to, but now Ctrl+D will immediately close the window!

Your welcome.

Make Visual Studio Your Java and JSP Editor!

Yes, you heard me right. I find that as a contractor I am constantly going from one editor to another. Each has their advantages, but when it comes to working on a Window's platform, I find that Visual Studio .NET gives me a lot and it is something I am comfortable with. I can write .NET apps, C++ applications, and C# programs, all within the same editor.

Recently, I needed to go back to editing some Java and JSP code. Although the final platform was to be a Linux flavor, the development environment was on Windows XP Professional. "Hey," I thought. "Why not use Visual Studio to edit my Java code?"

After a bit of research, here is what I came up with. The steps are three-fold:

  1. Find a way to fool Visual Studio into thinking that when it is editing a JSP file, it should treat it as if it were an ASP file. This would include syntax colorizing, tabs, auto formatting, etc., all according to the Options I've set in my editor.
  2. Find a way to fool Visual Studio into thinking that when it is editing a Java file, it should treat it as if it were an C++/C# file. Like above, this would use all the Options I've set in my editor.
  3. Find out how I can make Visual Studio recognize the key words in my documents so that it will colorize the correct syntax.
Here is what I did:

1. Enter some stuff into the registry. (A note for first-timers: Playing with the registry is dangerous stuff. Not as dangerous as playing with dynamite or kissing a redhead, but you get my drift. If you don't feel comfortable in the registry, call in a favor on a friend of yours who does and can handle the risk. The last thing I want is some whiny email regarding you doing something beyond your ability to handle. 'Nuff said.

    a. Click Start and then Run. Type in "regedit" as the program to open (or use your own favorite registry editor).

    b. Navigate to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\Languages\File Extensions"

    c. Create a new key by right-clicking on "File Extensions" and selecting New | Key. Nave it ".java".

    d. Right click on the "(Default)" entry and choose Modify.

    e. In the Value data field, enter the following:
    {B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}
    Astute readers will note that this is the same Default entry you will find in the area under the ".cpp" extension.

Voila! Step number one is complete!


2.Step number two is similar, except this time we need to enter the .jsp extension with the .asp-like entry. Here's how:

    a. Click Start asnd then Run. Type in "regedit" as the program to open (or use your own favorite registry editor).

    b. Navigate to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\Languages\File Extensions"

    c. Create a new key by right-clicking on "File Extensions" and selecting New | Key. Nave it ".jsp".

    d. Right click on the "(Default)" entry and choose Modify.

    e. In the Value data field, enter the following:
    {58E975A0-F8FE-11D2-A6AE-00104BCC7269}
    Again, you may note that this is the same Default entry you will find in the area under the ".asp" extension.


3. Fine and well. You now can edit .java and .jsp files in Visual Studio. But you may notice that the .java files will be colorizing some of the wrong words, and leaving other Java keywords alone. What gives? The problem here is that Visual Studio was designed to colorize C# and C++ keywords, so you are out of luck when it comes to Java keywords that don't match up to the C++/C# words. To solve this, we need to address step number three. Here goes:

    a. Create a file called "usertype.dat" and place it in your IDE directory. I installed with the default options and found mine at "C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE". Your results may differ.

    b. In this file, add all of the keywords for Java, separated by a hard-return after each. For example, here is mine:

     abstract
    boolean
    break
    byte
    case
    catch
    char
    class
    const
    continue
    default
    do
    double
    else
    extends
    false
    final
    finally
    float
    for
    goto
    if
    implements
    import
    instanceof
    int
    interface
    long
    native
    new
    null
    package
    private
    protected
    public
    return
    short
    static
    strictfp
    String
    super
    switch
    synchronized
    this
    throw
    throws
    transient
    true
    try
    void
    volatile
    while

    c. Save it and your done! Next time you open Visual Studio and load a .java file, you should see all of the Jva keywords colorized according to your preferences.


Did you appreciate this tip? Good, you can send me lots of money!

Seriously, I believe information is like manure; if you don't spread it around, it stinks. Work it back into the community, and all kinds of great things can grow.

Wednesday, January 18, 2006

Reason's Why I Hate Qwest Telephone Service

So this will be a ranting blog. The problem is such:

A few months back I decided I needed a quicker and faster home internet connection. So off I went to do some research, and after some time I stumbled upon the website of my local telephone carrier, namely Qwest, Inc. There, proudly displayed on their front page was an ad I found hard to resist. It read:

"Qwest DSL - 19.95 a month for XXX number of months"
and then in small print
"If you sign up online"

Regardless of small print, signing up online is excctly what I prefer to do. I hate the call centers, the lengthy waiting on hold, and so forth. So I off I march to sign myself up for some new DSL service.

Problem is, I can't. No, it wasn't money, it wasn't love of my old service, it wasn't cosmic fate or the failure of the planets to align. The simple fact of the matter is that the Qwest server kept failing. Everytime I tried to sign up, I got to the same failure page. Sensing that something was wrong with their system, I bit the bullet and gave them a call.

So after the endless dial in menu, the lengthy wait, etc. I get a sales tech on the horn. I explain my troubles, and he says "No problem, I'll sign you up right now." I specifically ask, "I'm still getting the 19.95 deal, right?" To his dubious credit, he did manage to mumble something that could have been a yes or could have been a no. Presuming he has been overcome with the mindbending task of using his customer support computer to switch my service over to DSL, I (foolishly) take this for a yes.

While I am at it, Qwest is also heavily promoting the use of online billing, allowing them to lay off some employees because instead of sending me a statement in the mail, I will be the one to track and submit my payments electronically. Again, I love doing things electronically. The idea of not having to fill out a check, send off and envelope with a stamp, and so forth is appealing. So, great, let's do that as well while we are making some changes.

Well, soon the DSL modem arrives, I install it and we are off and running.

After a couple of months, though, I note that my phone bill, rather than shrinking as I expected with their "Bundle Savings," is actually larger. So I login and check my bill, only to discover that my DSL bill, rather than the promised $19.95 is now running me $31.99. Hmmmm... I send out an email to customer service asking them for some details. On the email submission form I am asked for my name, address, zip code, phone number, and (possibly, but I can't be sure, a couple pints of blood). I write:
I signed up for the DLS w/ MSN Premium promotion (19.99 /
month), and did recieve my service in late August. Looking at my bill,
though, I see I am being charged 30 dollars and change. What gives?
A day later, I get the following response:
Thank you for your recent e-mail inquiry to Qwest regarding the DSL
charges on your bill. I apologize for any confusion.

I am unable to provide any specific information, or make any changes for
this account as you did not provide your 3 digit account code for your
account. The three digit account code is the last three digits of your
account number located directly after your phone number.
Great. Thank you. To top it off, the following is placed at the bottom of the email:
Tired of receiving a paper bill?  Sign up today to pay your bill online!
at www.qwest.com/billpay

That's right folks. You, too, can sign up for a paperless bill so you don't have the funky 3 digit code from your paper bill, so you can't get any help from excessivly sphincter engaged customer support represenatives.

The level of service here is stunning.

So a couple days after that, I get on again, this time to have a nice online chat with a customer support person. Evidently using their instant messenger somehow validates me better than an email. Go figure. Here is the coversation:

Chat Information Thank you for using Qwest.com. A Sales and Service Consultant will be with you in a moment. Currently, your estimated wait time is 2 minutes and 14 seconds.
[I wait several minutes]
========================================================
Chat Information Thank you for contacting Qwest. My name is Jay. How may I help you today?
--------------------------------------------------------
Dan: Q: I signed up for DSL at the 19.99 rate (w/ MSN Premium), but my bill shows I am being charged 30.91. Why?
Dan: It was installed late Aug, 2005, BTW
--------------------------------------------------------
Jay: Sure, I will be happy to assist you.
Jay: Will you please verify the phone number that you are inquiring about?
--------------------------------------------------------
Dan: [I give him my home phone]
--------------------------------------------------------
Jay: Just to verify that I am speaking with the responsible party on this account, please provide me with the Qwest billing account code (the last three digits of the Qwest account number on your bill) or the last four digits of the account holder's Social Security number.
Dan: [I give him my SS#]
--------------------------------------------------------
Jay: I'm sorry for the delay. I'll be right with you.
--------------------------------------------------------
Dan: OK
[I wait several minutes]
--------------------------------------------------------
Jay: Thank you for waiting. I'll be with you in just a moment.
--------------------------------------------------------
[I wait several minutes]
--------------------------------------------------------
Jay: I show that you have the Choice DSL (up ot 256k) for $31.99 per month.
--------------------------------------------------------
Dan: Hmmmm... when I tried to sign up for this online the server wasn't working. So I called and the rep signed me up. I ask him specifically that I was getting the 19.99 deal advertised.
Dan: Can you please place me on that plan and credit my bill?
--------------------------------------------------------
Jay: With you already subscribed to the Choice DSL, you would not be eligible for the $19.99 promotion.
--------------------------------------------------------
Dan: Okay, but I didn't sign up for the Coice DSL. I signed up for the 19.99 / month with MSN premium.
Dan: Evidently the rep incorrectly signed me up to the wrong plan.
--------------------------------------------------------
Jay: I will be right with you.
[I wait several minutes]
--------------------------------------------------------
Dan: Okay: I am looking at the add right now online. It reads: "Web-only special Just 19.99/mo for a year on up to 1.5 Mbps speed Qwest Choice DLS Deluxe with MSN Premium.
Dan: So I guess I am signed up of Choice DSL.
--------------------------------------------------------
Jay: That would be the other part, with the order placed through the care center you would not have received the $19.99 pricing for the order would needed to have been placed online.
--------------------------------------------------------
Dan: I just haven't gotten the rate I was pormised because the online method DOESN'T WORK! I tried it and it continued to fail, so I called.
Dan: At least, it didn't work in mid-August when I ordered it.
--------------------------------------------------------
Jay: Thank you for waiting. I'll be with you in just a moment.
--------------------------------------------------------
Jay: I will be right with you.<>
--------------------------------------------------------
Jay: I apologize for the inconvenience.
--------------------------------------------------------
Jay: Is there anything else that I can help you with today?
--------------------------------------------------------
Dan: Yes there are some additional things.
--------------------------------------------------------
Jay: How may I help you?
--------------------------------------------------------
Dan: I note that my online bill still shows a past due amount, yet my Credit Union account shows that the full amount due has been sent.
Dan: Can you confirm that for me?
--------------------------------------------------------
Jay: Yes, I show a payment of <$XXX.XX> posted .
Jay: Your online bill statement available through MyAccount is updated monthly. Payments or credits made during the current billing cycle will be reflected on the following month's online bill statement.
--------------------------------------------------------
Dan: OK, I guess the web just takes a while.
Dan: Second, I currently have no phone line (no dial tone).
Dan: I went out to the phone line outside, and confirmed that this is the case there also.
Dan: Can you confirm if there is a downed line?
--------------------------------------------------------
Jay: There is nothing on the account to show that you shouldn't.
Jay: Please contact Qwest Repair directly at 1-800-573-1311 from any working phone, or click here to report a repair issue online.
--------------------------------------------------------
Dan: OK
Dan: What do we need to do about the DSL issue, or do I need to take that up with someone else?
--------------------------------------------------------
Jay: There is nothing that can be done about it. I am sorry. You can upgrade if you like, but you would not be able to receive the $19.99 pricing. It would be $44.99 per month for the DSL Deluxe.
--------------------------------------------------------

So at that is where I effectively hung up. If they ever try to tell you their customer service is first rate, you'll know they are full of baloney.


Thursday, December 29, 2005

Nothing to add here...

So there you go. I actually had forgotten that I had this Blog. It figures. Now that I remembered it, I guess I think about what I can blog about.

Monday, June 13, 2005

And why not?

I see that the blogging phenomenon has exploded, with every kid with an opinion to share spouting their sundry ideas and feelings onto the web. So why not me? Yes, I am just as opinionated as the next guy, but I don’t think that I will be sharing everything I think about with the unwashed masses in the Internet community without some forethought and research to back up said opinion. It seems today we all run about with the luxury of an opinion without paying the price of knowledge. I hope to avoid that here.

I also wish to acknowledge from the start that I am starting this on a whim. I might not make it past this first posting. I might post so extensively that my entire life is consumed in blogging. You never know. You’ll have to come back and find out.

Until later, then…