Cale

This user hasn't shared any biographical information

Homepage: http://www.caledunlap.com/


Posts by Cale

A few web host reviews

You may have noticed my tweets there on the left about web hosts. I recently experimented with a few different hosts and griped about one of them (WebFusion). First off, if anybody tells you to use http://10bestwebhost2009.com, especially via Twitter, don’t bother, its spam and a total joke. This is a site that is written/funded/created by the hosts that just want to take your money.

Anyway, here I go (I’m starting with the ‘bad’ ones first)…

1) FatCow

This company is alright if you don’t need a really fast website with tons of uptime. It would make a good personal web host, especially at the price, but I definitely don’t recommend it for business hosting. When I used them, they worked out good for a few months, then went to total crap. My database driven websites started having trouble connecting to the database back-ends and my sites were down what seemed like more than they were up. I attempted to get my remaining balance refunded but apparently there is something in their fine print that doesn’t allow this.

Pros: Cheap (don’t expect a refund if you cancel). Probably good for a static site. They offer unlimited space and bandwidth which is nice. Customer support was knowledgeable as well. They also do some cross-business promotions with Google. Their control panel is pretty good too.

Cons: Not good for business websites or ones that require database backends. Performance is terrible.

2) WebFusion

I purchased an account with WebFusion just to see what it was all about. They offer ASP.NET (Windows-based) and PHP (Linux-based) hosting on their lower-tier plans and even offer Ruby on their higher-tier plans. I went the Windows route because their Windows hosting was actually cheaper than my current Windows host so I wanted to try em out. Do NOT bother with these folks.Their customer service is terrible. I had a problem getting a database imported using their control panel, so I asked if/how I could do it with SQL Management Studio (they don’t give out the FQDN of their DB server). I’m STILL waiting for a response. And since they boast a “24/7/365” support all over their site, I figured I’d get a nice snappy response. No, I did not. Then I submitted another request to have my account canceled because they are obviously not helpful and I’m stuck until I get a response. I’m STILL waiting for a response for this one too. So they effectively took my payment, gave me a bucket, then left me out to dry. How nice.

Update: They finally responded and promptly closed my account and refunded my money. It took several days for them to do that though. They they tried to get me to release my contact details over Twitter… lol. Pathetic.

Pros: Their control panel is almost stupidly simple to use. I had trouble with it because I’m a power-user. If you’re a basic user, have at it. Their price is also very nice.

Cons: They don’t know what customer service means and if you buy a Windows plan, expect to deal with the pains of not being able to use management studio—and their web interface for the database(s) sucks. I couldn’t even import a basic schema to it because it had problems with comments in the SQL. That’s pretty bad.

3) NetFirms

Netfirms is one of the larger hosts that I’ve worked with in the past. For the price, it isn’t bad. They’ve definitely got some cheap domains, even if you don’t buy a hosting plan from them. If you buy a domain from them, you get free hosting anyway. The hosting you get for free is VERY basic and will usually host a personal website just fine. That’s actually where I ran this one for a while (back when it was static content). I quickly realized how nasty their performance was when I put WordPress on their hosting space. I got a bunch of database timeouts and whatnot. Just all around not a very good place to stick anything mission critical. Otherwise not a bad host, especially for the price.

Pros: Cheap, especially when buying a domain. Don’t have to pay a higher premium for your domain if you choose not to host with them. Even if you buy JUST a domain from them, you’ll get a little bit of hosting no matter what; but it isn’t very good hosting.

Cons: Poor performance. That’s about all I can say about them. Their control panel isn’t bad though, for a custom written one.

Now on to the good hosts…

4) HostDime

These guys rock. The price is right, though still a bit higher than your bargain basement hosts. But these guys run on great hardware and don’t use crap control panels. Their staff is pretty knowledgeable as well. I’ve been back and forth with these guys but have never had a bad experience with them at all. I’ve been with them since around 2002 or so—though I am probably going to be canceling my current hosting with them soon. Not for any performance reason or anything, I just like hosting with a few more features (namely Ruby).

Pros: Good price, awesome features, they use cPanel, fast hardware, almost always up and available, good customer support, get a lot of space, bandwidth, and databases, also has quite a few stock scripts that can be installed with a few simple clicks. Makes a good business host.

Cons: No Ruby or Ruby on Rails support :( Otherwise there are no cons.

5) Arvixe

These guys are pretty good too. The price is fair, the staff is knowledgeable, the performance is great, and I have yet to experience any pro-longed downtime (if any at all, I haven’t noticed yet). I’ve been using Arvixe to support my ASP.NET development on top of SQL Server 2008 since around June 2009. Their control panel is a .NET standard control panel for web hosts (can’t remember the name off the top of my head). They also have a Linux facet of hosting too that I haven’t experienced but if it is anything like their Windows side, it is probably pretty damn good.

Pros: Decent price, plenty of features, unlimited space and bandiwdth, good performance, standard control panel, and they let you manage your database with SQL Server Management Studio!!!!!11oneoneone. Makes a good small business host.

Cons: Haven’t really found anything worth listing. Maybe price, but you get what you pay for in the hosting business usually. If you want good stuff, you pay a little more than basement prices.

6) Site5

I could spend the rest of my life with this host, unless they REALLY screw up. I’ve been with them since November 2009 and have no complaints at all. They’ll host practically anything that can run on Linux including Perl/CGI, PHP, Ruby (+Rails), and even SSH!!! The price is pretty good too and I have no quarrels about performance. I moved from HostDime to Site5 ONLY because of the Ruby and Rails hosting. Plus the SSH access to my account gives me a lot of control over what I can do with it. Their control panel (the non-Backstage one) doesn’t LOOK like cPanel, but it is definitely cPanel. It takes a little getting used to but it isn’t too hard if you’re a cPanel user.

Pros: Fast, very smart and friendly staff, great performance, SSH access, Ruby hosting, they’ll host about anything under the sun, and the price isn’t too bad.

Cons: None.

A few handy Javascript Methods

So I’ve been doing a LOT of Javascript programming in the last few days and I ran into a few limitations of the language or constructs within the language. For example, certain versions of IE do not support the Array.indexOf() method. Another problem I ran into is that the Javascript language does not contain a method for performing deep copies on objects. So after some Googling I found a few ways around the aforementioned problems. The first one (indexOf) is as follows:

Array.prototype.findObject = (
    !Array.indexOf ? function (o) {
        var l = this.length + 1;
        while (l–) {
            if (this[l - 1] === o) return l – 1;
        }
        return -1;
    } : function (o) { return (this.indexOf(o) !== -1); }
);

The above code will add the ‘findObject’ method to your Array objects. Then you can use that instead of indexOf() and be guaranteed that it will work regardless if the browser supports indexOf or not.

The second one (deep copying) can be circumvented by creating a helper method which will perform the copy for you:

var ObjectHandler = {
    //public method
    getCloneOfObject: function(oldObject) {
        var tempClone = {};

        if (typeof(oldObject) == "object")
            for (prop in oldObject)
                // for array use private method getCloneOfArray
                if ((typeof(oldObject[prop]) == "object") &&
                                (oldObject[prop]).__isArray)
                    tempClone[prop] = this.getCloneOfArray(oldObject[prop]);
                // for object make recursive call to getCloneOfObject
                else if (typeof(oldObject[prop]) == "object")
                    tempClone[prop] = this.getCloneOfObject(oldObject[prop]);
                // normal (non-object type) members
                else
                    tempClone[prop] = oldObject[prop];

        return tempClone;
    },

    //private method (to copy array of objects) – getCloneOfObject will use this internally
    getCloneOfArray: function(oldArray) {
        var tempClone = [];

        for (var arrIndex = 0; arrIndex <= oldArray.length; arrIndex++)
            if (typeof(oldArray[arrIndex]) == "object")
                tempClone.push(this.getCloneOfObject(oldArray[arrIndex]));
            else
                tempClone.push(oldArray[arrIndex]);

        return tempClone;
    }
};

Just thought I’d share those with everyone. Credit for the majority of the deep copy code goes to http://blog.pramatiservices.com/deep-copy-in-javascript/ and credit for the findObject code goes to someone other than me, but I didn’t bookmark the link so I can’t find it again. Sorry :(

FIX: When you undock some windows or change the window layout in the Visual Studio 2008 Service Pack 1 IDE, the IDE crashes

FIX: When you undock some windows or change the window layout in the Visual Studio 2008 Service Pack 1 IDE, the IDE crashes.

I just thought I re-post this incase anybody stumbled upon my blog before they landed on the Microsoft page that had the fix for IDE crashes. I experienced this only one time when I was moving/undocking windows.

Enjoy.

Helpful Extension Methods to the System.String Class in C#

I’ve been doing a decent amount of string manipulation lately and decided to combine that with my newfound knowledge about .NET extension methods. If you don’t know what extension methods are, they’re basically a way to extend a class without needing the source code to that particular class–hence why I can extend the System.String type by simply writing another class. The key is with the parameters of your methods. Here’s the basic gist of it:

public static {Your Return Type} {Your Method Name} ( this {Type/Class you want to extend} {Parameter Name} )
{
     /* Your method body */
}

 

So the key here is the “this” keyword before the type identifier in the parameter list of the method.

I’ve wrapped all of my extension methods into a single class simply called “ExtensionMethods” and added it to my project. The namespace doesn’t matter, so I haven’t included it in this example. You can either use the global namespace (though I don’t recommend it) or just create your own namespace called whatever you want.

Without further adue, here’s the code:

public static class ExtensionMethods
{
    /// <summary>
    /// Includes the trailing path delimiter.
    /// </summary>
    /// <param name="InputPath">The input path.</param>
    /// <returns>The input path including a trailing path delimiter if it doesn't have one</returns>
    public static string IncludeTrailingPathDelimiter(this string InputPath)
    {
        if (!InputPath.EndsWith(Path.DirectorySeparatorChar.ToString()) &&
            !InputPath.EndsWith(Path.AltDirectorySeparatorChar.ToString()))
            return InputPath + Path.DirectorySeparatorChar;
        return InputPath;
    }

    /// <summary>
    /// Asserts the trailing path delimiter.
    /// </summary>
    /// <param name="InputPath">The input path.</param>
    public static void AssertTrailingPathDelimiter(this string InputPath)
    {
        InputPath = InputPath.IncludeTrailingPathDelimiter();
    }

    /// <summary>
    /// Trims the extension from a file name.
    /// </summary>
    /// <param name="InputFile">The input file.</param>
    public static void TrimExtension(this string InputFile)
    {
        int start, count;
        if ((start = InputFile.LastIndexOf(".")) > 0)
        {
            count = InputFile.Length – start;
            InputFile = InputFile.Remove(start, count);
        }
    }

    /// <summary>
    /// Gets a file extension of a filename.
    /// </summary>
    /// <param name="InputFile">The input file.</param>
    /// <returns>The file extension</returns>
    public static string FileExtension(this string InputFile)
    {
        int start, count;
        if ((start = InputFile.LastIndexOf(".")) > 0)
        {
            count = InputFile.Length – start;
            return InputFile.Substring(start, count);
        }
        return string.Empty;
    }

}

 

Now whenever you use a System.String object, you’ll be able to simply call these methods as if they were part of the System.String class. IE: string MyFileExtension = MyFilePath.FileExtension();

I’m sure I’ll add on to this as I go along.

Now I really hate AT&T

So, as a continuation of my last post about how much I hate AT&T… the line tech finally come on site when they said he would. He apparently found a bad ring ground at the neighborhood’s equipment. He replaced it and my ringtone is now nice and clear and I consistently test at 6Mbps…. yay.

Well that lasted for a month or so. Now I’m down again. I replaced my modem entirely after the last occurrence of problems so that I could be better “supported”…. yes I put supported in quotes, because AT&T’s “support” is a joke to begin with. Now that I’m down again, the modem is giving some pretty good indicators as to why: “Could not find an ATM circuit.” Cute.

I call in and an automated message tells me that they’re “working to resolve a network outage in my area. The estimated resolution time is 12am.” I called at 3:30am. So, 3 1/2 hours have passed since their estimated resolution time. I know that this is an “estimate”, but seriously… 3 1/2 hours off? Some estimate, they might as well have simply said “We’ll be down for a while. In the mean time, play boardgames and jerk it to Playboy like the good ol’ days.”

I pressed zero and got to a support tech… we’ll call him “Albert” (real name was probably something closer to Habeeb Mohammednirishnikahnapali). I told him that I’m aware there’s a network outage, but the estimated time was midnight, it is now 3:30…. is my issue related to something else? He went through the motions like a good little AT&T drone…. ran the line test and attempted to get more information about the outage for me. He came back with the results of the line test: Line is good, but my area is still affected by an outage. And unfortunately the NEW estimated resolution time is “Monday.”

MONDAY!?!?! What the hell! I’ve been down since Thursday! I guess it will be pretty difficult to do things like pay my bills, turn in my school work, and perform my job functions. This is terrific. I should sue for lost wages or something… if any lawyers out there are planning to issue a class action lawsuit against AT&T, count me in. I don’t care what its for, count me in. I want to hit AT&T where it hurts. They only thing they value is money and I’d love to get mine back.

Luckily for me, I have T-Mobile cell phone service (because I dropped Cingular before the AT&T buy-out). I also have a Google Android phone with a tiny app called PdaNet. I’m forced to use the 2G internet connection that I have through my cell phone in order to do any online stuff. At least I have something, but I still can’t do any work-related stuff over this connection. I need a broadband connection for that.

Anyway, I’ll be calling AT&T and asking for a credit. I will only be paying AT MOST 87% of my bill if I am indeed down until Monday. I’m sick of paying for a full month of service, when I’m actually only getting about 20 days or so. This is a great way to start off the month of October… 4 day outage without a single notice to their customers.

Please somebody save me.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes