Eps 8: Clean Up Your Code

Welcome to Talking HTML, an audio/video internet thing for web developers who are just starting out.

Write clean code

  1. Indentation
    1. make sure it’s consistent
    2. ensures readability of the code, maps out what you are doing and what element is nested where
  2. Make sure you’re naming your id’s and classes consistently
    1. they need to make sense and not just be garbled dumpster fires
  3. Make sure your code writing program uses colors for different styles of code
    1. elements, attributes, php vs html vs javascript
      1. will help to identify individual aspects of code faster
  4. Don’t be afraid to use the enter button
    1. space between content sections can help keep your code sorted
  5. Use multiple CSS documents when creating responsive designs
    1. ex – 1 style sheet for cell phones, 1 style sheet for tablets, 1 style sheet for large screens and then 1 style sheet for regular sized screens
  6. make sure all of your files are sorted and named properly
    1. no empty folders
    2. folders need to have an index.html page
    3. files need to be named appropriately
      1. your portfolio page shouldn’t be called “job stuff”
        1. leads to messy url’s and takes longer to find if you forget what you named things
  7. Use comments to specify code snippets and entire sections of your code
    1. commenting on your code can help you remember what your code does when looking at it. More importantly it helps others figure out what you’re doing if you pass a project on
    2. ex – comment what is navigation, sidebar, body, footer, special content
    3. comment on what code actually does

You can always use programs after the fact to take the spacing out of the CSS style sheets

 

Please go to iTunes and Stitcher and rate the show! Ratings get listeners!!

http://www.Webdevpod.com for all the content and links

@TNPWDesign

@tommnorman

DreamHost promo code – tnpw