Make a Message Useful in a Report

Yes it’s true: AI can code, and much better than any beginner. And yet, there’s still a lot of value in learning to code. If you can read and change code, then you can describe what you want and adapt the result. Using AI + understanding programming is a superpower that can make you a very valuable employee, or a self-powered founder.

In this course, you’ll practice both skills together while looking at a realistic project of building feedback report lines from a spreadsheet. You’ll read and write code that you’ll learn to understand and explain.

Assume you work at a company that does stuff for humans and, you know, sometimes those humans send in some feedback. Here’s one example feedback record that you’ll be working with. It has an id, a topic, and a message:

id topic message
F-104 Delivery My parcel arrived two days after the promised date.

Imagine that you have a looooong spreadsheet with many such entries to go through. A program can filter for specific ones and turn a record into one readable report line following your taste or company specifications, e.g.:

Language: Text
F-104: My parcel arrived two days after the promised date. [Delivery]

Granted, not much changed here between the spreadsheet row and the report line, but you’ll start with a small example and build it up from there. So let’s take another step back and sort out a bit of terminology first.

What even is a program? A program is a list of exact instructions that a computer carries out in order. These instructions are written in a programming language and make up the program’s source code. They’re just text, and nothing happens until something runs them.

Try it below by putting the four instructions in the right order, then press Run and watch the computer carry out your instructions one after another:

Interactive diagram — enable JavaScript to view.

You just wrote an abstract program. Each line is an instruction that the computer executes in order. You can play around some more with it, change the order, press Run again, and see the output differ. That’s programming in a nutshell.

There are many programming languages out there, and the one you’ll use in this course is called JavaScript. JavaScript runs in web browsers and in Node.js outside a browser, but you won’t need to install anything to get started. The embedded exercises in this course can run your code when you press Run Tests, so after every change, click that button to see the new result.

Alright, that’s a lot of terminology to get started, and our brains have a hard time keeping information we don’t use, so it’s time to practice and recap. Already, you say? Yes, already! This course is meant as a practical, hands-on learning experience and you’ll start getting active from lesson one.

When you click the button below, a chat opens up where Mentor AI will ask you three quick questions and gives you feedback on your answers. Explain what a program is in your own words to grind your brain gears into active mode:

Alright, nice work. Keep practicing what you learn by actively doing something. Chat with Mentor AI, type code in exercises, and maybe even get out a pen and paper to doodle alongside. Doing helps your brain remember and integrate new concepts and ideas, and that’s how actual learning happens.

You can keep a local reference copy of this course’s source code. Try the exercises before opening the completed solutions:

In the next lesson, you’ll encounter your first exercise and start programming. You’ll change a line of code so that the report line the code assembles shows the record’s topic.

Run the code often and read the error messages. They’ve got useful hints for you and will help you understand what’s happening. You can also expand the exercise to a full window for a nicer learning experience by pressing T or clicking the Full screen button in the top right.

Become a Member to join the conversation.