What software do you use to write your code?
Microsoft Word? Pages?
Dreamweaver? Kompozer?
If you answered YES to any of those, here is some bad news for you. You’re using the WRONG software, and this article will tell you why.
Using a visual, or WYSIWYG, editor?
A visual editor, like Dreamweaver or Kompozer, is a program that builds HTML code for you.
There are many reasons why you shouldn’t use a visual editor. Visual editors write messy code and if for whatever reason you need to edit an bug in the code, it can be hard to fix because you aren’t familiar with the code making up your page.
All good web designers and developers write their code themselves. If you want to be taken seriously as a coder, stay away from visual editors.
Using Microsoft Word, Pages, Open Office, or Google Docs?
These programs are all word processors, and they’re simply not designed for writing code. To some it may seem obvious, but some people try to use programs like these to write their code. Don’t fall into this trap!
Word processors like Microsoft Word, Pages, Open Office, or Google Docs all use their own code to format things like bold, italic, line breaks, margins etc. Just like you don’t see the HTML code when viewing a web page, word processor code is hidden from you too. But it’s there, and if you have a document that contains code, it will be interfered with by the existing (hidden) code in the document.
This will almost certainly corrupt your code and cause it to stop working properly. So stay away from word processors too.
Use a text editor instead
That’s what not to use, what about what to use?
The answer is a plain text editor. These are programs that don’t add in their own code to documents, so you can write code without worry of it being corrupted.
All computers come with a plain text editor. On Windows it’s Notepad, on Mac it’s TextEdit. Use these programs to write your code and you’ll have no troubles. If you’re using TextEdit however, it’s important to select ‘Make Plain Text’ in the Edit menu before you write your code – otherwise you’ll experience the same problems as you’d get from a word processor.
When you’re saving your file, make sure you’re giving it the right file extension, e.g .html, .css, .js, .php. If it’s .txt, your code won’t do anything!
Try a full featured text editor like Sublime Text
Notepad and TextEdit are basic text editors with little functionality. The good news is, there are editors out there that have plenty of features built in to help you code easier. For this, Sublime Text is our recommendation. If that’s not your cup of tea, just google ‘text editors’ and you’ll get dozens of decent alternatives.
Did you make the mistake of using software you shouldn’t use to write code? What do you use now? Tell us!
Disclosure of Material Connection: Some of the links in the post above are “affiliate links.” This means if you click on the link and purchase the item, I will receive an affiliate commission. Regardless, I only recommend products or services I use personally and believe will add value to my readers.