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?

NEW BRCline Look

Looking at using this as my new design. What are your thoughts?

BRCline Consulting New Look ?

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.

$(div).scrollTop();

Scrolling to top of browser window is as simple as:

$(window).scrollTop(0);

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() {
$("input:text:visible:first").focus();
});
</script>

Hope this helps.

1and1.com – 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.

Hosting
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.

Unfortunately, many of the JavaScript frameworks are quite large for a web page. jQuery, for example, minified is nearly 56KB. Personally, I wouldn’t use jQuery or another JavaScript framework for static pages that might only read an XML file or display a simple animation: frameworks really are elegant for web applications. The size of frameworks isn’t much of an issue for people on broadband (cable, dsl, etc), but now as web developers we are beginning to see iPODs, iPhones, Blackberries, and other smaller electronics beginning to view our websites where the size and download speed of the frameworks, and website markup can begin to create havoc.

First, we should move all of the JavaScript to the bottom of the body because each HTTP request for an external document will block the rendering of the HTML until downloading has completed. JavaScript according to the W3C can “appear any number of times in the HEAD or BODY of an HTML document.”

Web Developers should also minimize the number of HTTP requests by combining all of the JavaScript into one file, and all of the css into a single css file. The Yahoo developer blog contains some really helpful tips. Yahoo also provides an excellent plugin for Firefox/Firebug that provides some tips and debug-type of information.

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