×

READY FOR A NEW CAREER?

But not sure where to start? Find out if a tech career is right for you.

TAKE THE 3-MINUTE QUIZ

What’s the Difference Between Scripting and Coding?

coding vs scripting
Get Our Free Ultimate Guide to Coding for Beginners

Get Our Free Ultimate Guide to Coding for Beginners

Make a plan for learning the tech skills you need to land a new job with this 60+ page FREE ebook!

Next on your path toward demystifying tech jargon is the difference between coding and scripting. You may have heard these terms thrown around in ways that make them sound similar: “You’ll need to learn coding languages to make a website,” or “We need to use a script to automate our network login.” It sounds like coding and scripting are two ways to describe programming on a computer, so they’re identical, right? Well, not exactly. Coding and scripting are related, for sure, but there’s a subtle (yet distinct) difference.

According to Skillcrush WordPress Instructor Maren Vernon, it’s easiest to think of it like this: Coding is an umbrella term that applies to all computer languages. Whenever you’re using a machine language to write instructions that a computer or computer program can understand, you’re coding. But under that big coding umbrella there are specific kinds of coding, one of which is scripting. So then what exactly defines scripting?

Scripting is code used to automate processes that would otherwise need to be executed step-by-step by a web developer. Where different kinds of coding languages (such as markup languages like HTML and CSS) are used to tell computers how to display a website, scripting languages (including PHP, Ruby, and JavaScript) are used to give instructions to programs (like websites) that are running on a computer. In other words, you wouldn’t use scripting or scripting languages to program static features like the overall appearance or layout of a website or web application, but you would use a scripting language to tell the static website to “do something,” making your static content dynamic.

Vernon says that WordPress sites are a good example of a situation where scripting languages come into play. “Developers building WordPress themes or plugins use PHP to call for site content, be it a reusable snippet of code from another file, or information stored in the site’s database that a user has entered. That information is processed and output as HTML, which then lets site visitors see the content in their browser,” she says.

For instance, Vernon says, a PHP script makes it possible to have your three latest blog posts automatically appear on a site’s homepage. Or you could utilize conditional statements (if/else/endif) to change what is displayed on the site based on parameters—e.g. if the site administrator uploads a photo to x field, show the photo; if not, show y default photo or show nothing. And—since code written in scripting languages is able to make decisions and relay instructions to its parent program—these functions happen automatically. The user viewing the website doesn’t see the script or its process, they just see the end result. Meanwhile, the site’s developer is able to implement these features with a one-time set of instructions, rather than hand-coding every single instance and outcome of a dynamic function (because who has time for that?).

So remember: Coding includes more than just scripting, but scripting is a kind of coding. Whether it’s building a chatbot that sends back inspirational quotes, causing a pop-up window or form to appear on the screen in response to user behavior, or having animation occur when a user scrolls past a given point on the page, these are the kinds of tasks scripting can automate on a website.

Get Our Free Ultimate Guide to Coding for Beginners

Get Our Free Ultimate Guide to Coding for Beginners

Make a plan for learning the tech skills you need to land a new job with this 60+ page FREE ebook!

Your email address will not be published.

Cancel

4 comments

  1. Roxanne Replied

    Thanks for writing this article Scott. I’m a new student of web development, and I find that this topic is best understood by using a comparison/contrast method of writing and that is the approach that this good article was written.

  2. Bob Breinl Replied

     … I have thought this question like that code is a compiler talking to the microchip in machine code and everything else is a script … everything that is anything logistically descriptive like IF (x) THEN (y) reads like a script of a real language whether it is logic in a spoken language or a computer language (JavaScript, AppleScript etc) … script=language , code=machineCode ??? just my thought on the matter

    • FRANK WEYL Replied

      NO MATTER HOW COMPLEX THE ARCHITECTURE OF THE CPU, IT IS STILL IS BLOCKS OF TRANSISTORS WHICH ARE EITHER ON OR OFF.
      TO FULLY CONTROL THESE THIS BLOCKS, ONE MUST FIRST UNDERSTAND THE PIN-OUTS OF THE CPU.
      MACHINE LANGUAGE IS THE ONLY PRECISE WAY OF RENDERING COMPLETE CONTROL OF THE CPU AND ITS INTENDED PURPOSE.
      ALL BOOLEAN LOGIC IS INHERENT WITHIN ITS STRUCTURE. THERE ARE OTHER MESO-STRUCTURES SUBSERVIENT TO THE LOGICAL MATHEMATICAL LOGIC STRINGS WHICH HAVE BEEN SHOWN TO ENHANCE OR MODIFY THE INSTRUCTION (SET).
      LIKE ALL LANGUAGES, THERE WILL ALWAYS BE ERRORS IN UNDERSTANDING AND PRECISION.
      MACHINE CODE IS LENGTHY AND CAN BE TEDIOUS TO CONSTRUCT.
      BUT I WOULD RATHER AVOID A ROADFULL OF POTHOLES THAT I KNEW WERE THERE, THAN DRIVING HEADLONG INTO A LOGICAL DILEMNA.
      COMPLEXITY PRODUCES ERRORS….

  3. RC Replied

    I’ve studied both and I enojoy scripting way better, developed platform on java and objc, but its not for me I believe coders need to be imaginative and creative creating something out of nothing is f#cking hard specially for me I’m not good at that, even with the help of ample smace cakes doesnt help, That’s why i’d rather automate t. been loving now, steady song puppet everything going smooth deploy sit back and chill

Want more articles like this?

Sign up to get the most recent tech news, tips and career advice.