Category: Uncategorized

Hosts File Location On Windows

Windows 95/98/Me c:windowshosts
Windows NT/2000/XP Pro c:winntsystem32driversetchosts
Windows XP Home c:windowssystem32driversetchosts
Windows Vista,7 c:windowssystem32driversetchosts

It doesn’t have an extension.

Modifying requires admin access on NT/2000/XP and greater.

Notepad must be started with full admin privileges by Right Clicking and saying “Run as Admin.”

SVN Working Copy xxx locked and cleanup failed

If you’re using Subversion at some point you will get the infamous “SVN Working Copy xxx locked and cleanup failed” error. Why you get this error is not exactly known by me, but I believe it to be partly because of subversion’s case sensitivity and Window’s case ignoring.

The simplest solution is to search for lock files which are 0 bytes long and delete these files. Try to commit again and you should have success.

There’s probably dozens of other ways to correct the error and I’m sure my solution won’t always work. How would you fix this problem?

Speeding Up IT?

In the February 28th 2011 edition of Information Weekly, Chris Murphy wrote an article called “IT Is Too Darn Slow.” Chris’ article can be summarized best by “isn’t about the speeds and feeds of technical performance, of gighertz this and gigabit that.” Chris goes on further to suggest that cloud computing, virtualization, and agile approaches are allowing CIO, CEO, and the rest of the board of the directors too demand quicker results.

I really agreed with the premise of the article although I haven’t really spent a lot of time working with virtualization. Virtualization allows us to consolidate multiple servers onto one server by allowing multiple operating systems to run on the same hardware. I really believe that being able to spin up new servers would allow development and changes to happen much more quickly.(At the very least virutalization can help all organizations save money on machines, power consumption, and air conditioning!)

Cloud computing is essentially taking distributed virtual machines (or raw hardware even) and allowing an application to make use of all the hardware and expanding as necessary. As Chris discusses in the article this allows a company to quickly add more infrastructure to meet demand which could allow for almost limitless usage.

Agile software development is based on the concept of spliting up programming tasks into very small and quick tasks and allowing the user to quickly begin to use the application and make changes as the process continues. The idea is that the user/ company can get software that meets their needs and is quickly adaptable as needs of course change.

Over all, I really felt that Chris has written a great article although I’m not sure that HP and some of the others he has discussed will be able to meet their goals of having nearly all projects under 90 days.

One point, I felt could have been stressed more in the article is that when you make software quickly and release that software when it is “good enough” is that it may end up being costly to change it later because of some mistake or incorrect assumption. We always need to invest some time in testing, and sometimes all that testing can’t be automated.

What do you think?

Fixing Hacked by iSKORPiTX

iSKORPiTX is some cracker that has apparently maliciously attacked thousands of websites and served mostly as a pain in the butt to the web development community and their customers. Godaddy appears to be one of his major targets as he maliciously hacks their websites.

One of my clients, hosted on Godaddy, was hacked by iSKORPiTX. How I resolved the issue is simple:

  1. Alert customer, have customer call Godaddy and complain.
  2. Change Godaddy password to something else
  3. Delete the following files: index.php, index.htm, index.html, default.htm, default.html, default.php
  4. Check each and every directory

Apparently, Godaddy’s software sucks and is easily hacked.

jQuery Scroll To Top

jQuery is so powerful and very flexible and usually makes so many complex takes so simple.

Anything with a scrollbar and can be selected can be programatically scrolled to to the top.


Scrolling to top of browser window is as simple as:


Help My Kijiji Ad Isn’t Showing UP

Kijiji occasionally will block an advertisement from showing up for twenty four hours to prevent spam. I’m not really sure if an employee actually goes through the queue of waiting ads and checks if it’s spam or not.

To find out where your ad is visible, you should use Kijiji’s status checker.

Setting Focus to 1st Text Field in jQuery

Setting focus to the 1st field in jQuery is actually really simple: there are some plugins that also can do it automatically on each reload of a form.

I usually just use the following code on any pages where there is a form.

<script type="text/javascript">
$(document).ready(function() {

Hope this helps. – Web Hosting Review

Purchasing web hosting service is extremely easy; however, purchasing great web service is extremely difficult. Some of the web hosts pretty much register the domain and give you access almost immediately to some temporary space while the DNS wait period occurs.

I can’t remember how long it took for me to get access to the temporary space on 1and1, because I started hosting with them around 2003 / 2004. I have used 1and1 pretty much exclusively since purchasing my first domain name and can’t say I have a lot of complaints although there are definitely somethings I wish they did differently.

I haven’t had any issues with the actual web hosting although I do find it frustrating that things like FTP accounts are so limited. I was thinking about including hosting in my web design/development projects and allowing the company FTP access but that would limit me to 50 clients per package. An important thing to keep in mind is that if you are going to use a 1and1 database (MySQL / MS SQL) is that it is behind a firewall and you must use their web based tools.

Customer Service
The four times, I have had to deal with 1and1 I was extremely disappointed with the level of customer service. For example, there was a severe email outage for about two days and staff seemed to be indifferent to the issue. Before you go with 1and1 make sure that you know exactly what you are doing, and that you have patience because their technical support/customer service is terribly slow. The FAQs aren’t exactly great and often don’t really contain remedies to the problem: for example why is DOMDocument disabled and how do I fix the problem? Well, 1and1 doesn’t actually say at the time of this writing!

Billing Practices
I’m not exactly thrilled with having to pay for a full year’s service at a time and not getting any sort of deal for allowing them to use my money for free for like 12 months. Cancelling domains and packages is quite tricky on the billing/cancel application partly because you have to respond to an email at least once and then wait some period of time (2 months?) and make sure again that the item is actually cancelled.

Final Thoughts
1and1 was the cheapest host that I could basically find around 2003/2004 and still seems to be one of the cheapest. I wouldn’t describe the experience as great but I also wouldn’t say it was terrible. If you are price conscious, willing to learn, and have patience then your 1and1 experience will probably be similar to mine.

Kijiji Advertisement – Are You Kidding?

I was surfing the local Kijiji looking to see if maybe there might be some interesting contract work. Naturally, I wasted approximately forty-five seconds reading the three advertisements until I found this really pathetic offer:

“I need a website built in the next 4 weeks.
Website will have up to or may be more than 50 pages.
Will like people to be able to subscribe to posts and blogs
I will like some admin management to be able to update blogs
Website will have a 6 page flash video on the header
Some pages will have multi columns (2-3)
Some pages will have links to other pages and pictures
I will like to have some forms filled and submitted on the site
Website will have RSS feed and comment compactibility.
I have all the pictures and content ready.
Website will have google adsence
Unfortunately, I have budget restaints, I can only afford $400 for this.

If you are up to it, please send the following info
1. Your name
2. Sample sites you built
3. Phone number
I prefer someone in St. Catharines, or if you don’t mind meeting once a week until job is done.”

I have no doubt, I could implement this using some sort of content management system with a customized template but I also know that if I use WordPress even I would need to spend at least eight hours coming up with the design and then coding it. And of course, that still doesn’t help with the required forms issue does it?

Inline vs External JavaScript

In general, we never should have embed JavaScript inside the same file as the HTML markup and should instead place the JavaScript into an external file.

The content, presentation, and interaction code should all be separate to make your life easier as a website developer.

  • Cleaner Code. Cleaner code is much quicker to find errors in, and will reduce the complexity. In addition, changes only need to be made in one file instead of in potentially dozen resulting in a significant saving of your time and money for your client.
  • JavaScript will be better cached for future use and will reduce the size of the HTML file. Users won’t need to download the file every time the user revisits resulting in very quick retrieval.
  • Different Parsing Systems. The parsing systems used for HTML/XHTML are vastly different from the parsing/compiler systems used for JavaScript are different and can introduce nested quote problems.

JavaScript And Site Performance

JavaScript and the respective frameworks have really began to gain traction over the last couple of years. I would argue that most of the JavaScript frameworks are excellent, and truly are great for the user experience and for the programmer experience.

Continue reading

The Rise and Fall of Waterfall

Sadly, I still think there are a lot of companies that still just think,code, guess, code, guess some more and maybe eventually come up with something. We need a repeatable process that should be fairly iterative.

The Ten Commandments for C Programmers

by Henry Spencer

1. Thou shalt run lint frequently and study its pronouncements with care, for verily its perception and judgement oft exceed thine.

2. Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end.

3. Thou shalt cast all function arguments to the expected type if they are not of that type already, even when thou art convinced that this is unnecessary, lest they take cruel vengeance upon thee when thou least expect it.

4. If thy header files fail to declare the return types of thy library functions, thou shalt declare them thyself with the most meticulous care, lest grievous harm befall thy program.

5. Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest “foo” someone someday shall type “supercalifragilisticexpialidocious”.

6. If a function be advertised to return an error code in the event of difficulties, thou shalt check for that code, yea, even though the checks triple the size of thy code and produce aches in thy typing fingers, for if thou thinkest “it cannot happen to me”, the gods shall surely punish thee for thy arrogance.

7. Thou shalt study thy libraries and strive not to re-invent them without cause, that thy code may be short and readable and thy days pleasant and productive.

8. Thou shalt make thy program’s purpose and structure clear to thy fellow man by using the One True Brace Style, even if thou likest it not, for thy creativity is better used in solving problems than in creating beautiful new impediments to understanding.

9. Thy external identifiers shall be unique in the first six characters, though this harsh discipline be irksome and the years of its necessity stretch before thee seemingly without end, lest thou tear thy hair out and go mad on that fateful day when thou desirest to make thy program run on an old system.

10. Thou shalt foreswear, renounce, and abjure the vile heresy which claimeth that “All the world’s a VAX”, and have no commerce with the benighted heathens who cling to this barbarous belief, that the days of thy program may be long even though the days of thy current machine be short.

Dell Studio: Epic Fail

Dell fails again, this time with a Dell Studio 1550.Keys being pressed weren’t being sent properly to Windows 7, and LEDs weren’t properly lit. Solution seems to be removing the battery and pressing the power button for 10seconds.

Continue reading

Difference between HTTP Methods (Get & Post)

It has been quite a while since I have used Yahoo! Answers. I often find many of the answers to questions are blatantly wrong or that the person answering doesn’t really provide a link to additional information. This blog post is designed to include additional information on the Get & Post methods of HTTP and what should be one of the simplest topics, but isn’t because some people insist on using large words like idempotent.

HTTP uses two methods of getting and receiving data from a webserver, generally these two methods can be split into two simple phrases:

  • Get = operations that can be safely repeated because there’s no side effects. Never use get for sensitive operations, or when uploading files.
  • Post = operations that might have side effects. I always use post for any operation, I don’t want repeated again; usually this is any operation that involve database manipulation like creates, updates, or deletes.
  • The default for form submission, or even just simple website browsing is a get request. Basically, every time you click a link this a get request and most of the time you submit a form this is a post request. When using a get request to pass information, you will often see what variables after a question mark, called parameters in the url.

    Get Method
    This blog post’s web address ( ) makes use of a parameter in it’s url. The parameter or variable is simply the letter p which we can easily see is equal to 98 and because of the parameters being in URL.

    Unfortunately as a result of the parameters being in the url there is a limit of how much data can be submitted (256 bytes is the limit in some browsers.) Obviously, using get requests is not a secure operation as the user can clearly see what is being passed along and what each value is equal to. One of my favourite uses of the Get request is to use it for anything, I would want the user to be able to link or bookmark as this page should always work.

    Post Method
    Post is the slightly more secure of the two methods but should never be the only technique used for operations involving Credit Cards, Identification Card Numbers (Social Insurance Number, Driver’s License Number,etc ).

    Post relies on data being sent back to the server in a content message that contains the parameters and their respective values. The content messages do not have a defined maximum length, so this is the prefered method of submitting anything with lenghty text or many answers.