Three things to get you through HTML/CSS and coding

Here are few things to think about, as you do your HTML/CSS on Codecademy, and then do your coding, but a lot of this will help for just about any of our tool/methodology exercises. They may not be as useful as the three things that Homer taught Bart, but they cover quite a bit.

  1. Every character matters, so check ’em. You may have figured this out already, but just in case, computers are a little like genies: they will execute your orders exactly how you have stated them, no more, no less, down to the lowest detail. In other words, they may not do what you want them to do, but they always do what you tell them to do. The predictability is nice. But it leads to “garbage in, garbage out,” an old saying among computer science folks (or at least, as old as computer science sayings tend to be) meaning that imperfect code will always be executed to produce imperfect results. Accordingly, when your HTML or CSS or code isn’t doing what you want it to do, check the spelling, capitalization, and punctuation. Period where there should be a comma, or vice versa? A colon/semicolon mixup? Confusion between / and \? Maybe a { for a ] or a (? They seem like small errors, but those are the first thing to verify when coding goes wrong.
  2. When stumped, do an internet search. There are approximately 1.27 zillion people who have already encountered the same problem that you are encountering, and at least half of them have posted a how-to or other useful reference on the internet. Open up a tab, type a phrase or question in the search box, and start checking out the hits. Chances are, you’ll find an answer. I’m constantly amazed by the range of information one can find on the internet to deal with the most arcane computer issues, not to mention kitchen tricks, household repair, travel tips, and just about anything you can imagine. It’s OK, and even encouraged, to do such searches in the context of this class.
  3. Copy and paste are your best friends. If you have code that works, don’t retype if you need it a second or third time. Copy and paste. See a routine on the web that will do what you need a program to do? Copy and paste. Having trouble with designing something in HTML? Do it in a WYSIWYG interface (like this one!), copy the HTML for it, and paste. Doing so does more than save you the time of typing, although that’s certainly not trivial. More than that, it greatly reduces the chances of a typo screwing up your code (See #1 above). Not sure how to look something up? Copy, and paste it right into the internet search bar (See #2 above). And there are even all sorts of tools to generate HTML, CSS, and code in various languages, that are designed for users to grab what’s generated there and paste it directly into their text editor. Again, I do this all the time, and so does anyone else who does computer work, and it’s OK, even encouraged, to use such tools in the context of this class.

If you’re encountering coding problems that these don’t solve, by all means please let me know. But you’ll find that remembering these three things will greatly reduce your frustration in problem-solving, and give you confidence that you can tackle tough stuff on your own.

Comment here