- Introduction und a jump in the cold water
- Continuation with a few subroutines
- Here we go again: Creating the main game loop
- Cleaning, testing and debugging. Done!
- Gooodbye & useful resources
What you'll learn
- Starting a simple package in Go without fancy package management or using Go modules.
- Deal with functions from the standard library for formatted input/ouput.
- Use of primitive data types like string, bool, int and accessing elements of underlying arrays by their index.
- Work with values of type string and make use of methods provided in the package "strings" from the standard library.
- Conditional execution of external (non-Go) programs provided by your operation system.
- Design simple control flow by using for loops, if/else if/else, switch case, functions, range, aso.
- Read data from simple textfiles.
- Handling of the obvious errors and potential sources of errors.
- Pass a pointer value to a function accepting a parameter of type pointer to mutate a value.
- Add useful comments as minimal documentation to your code. (Yes, I know it could be done better!)
Description
Join me on an exciting short trip as we experience a little coding project with Google's programming language Go (golang). Together we will use the basics of programming and build the classic guessing game "Hangman" for the terminal - from scratch of course.
At the end of my latest programming course "Learn Programming in Go (golang): A Rich Guide for Beginners" I suggest my students to start using Google's programming language Go just by creating a simple "Hangman" game for the terminal. With this simple project I redeem the promise to myself to show you how easy it is to start coding with Go.
This project doesn't even have to show off with "fancy" features like to extensive use of slices, concurrency or complex structs that Go has to offer. Rather, I want to show how Google's programming language can be used to achieve respectable results in the shortest possible time.
The fun of "ease of programming" is in the foreground here! So enjoy it, it's free!
Why did Google develop a new programming language?
In Google's words, "Go was born out of frustration with existing languages and environments for systems programming. Programming had become too difficult and the choice of languages was partly to blame. One had to choose either
efficient compilation,
efficient execution, or
ease of programming;
all three were not available in the same mainstream language. Programmers who could were choosing ease over safety and efficiency by moving to dynamically typed languages such as Python and JavaScript rather than C++ or, to a lesser extent, Java. Go is an attempt to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. It also aims to be modern, with support for networked and multicore computing.
Finally, working with Go is intended to be fast: it should take at most a few seconds to build a large executable on a single computer. To meet these goals required addressing a number of linguistic issues: an expressive but lightweight type system; concurrency and garbage collection; rigid dependency specification; and so on. These cannot be addressed well by libraries or tools; a new language was called for."
In my humble opinion, Go is the best programming language you can learn today. I've worked with a few programming languages since I was introduced to programming through BASIC in the mid-80s, and Go is by far the best-designed language I've ever used.
Now start your computer and let's have some fun coding "Hangman"!
Other Courses
AAC- Visual Scene Display
Introduction to Visual Scene Display VSDs and Use of Scene and Heard Pro
Magical Techniques for Health: A Beginner's Guide
Magical techniques for maintaining and improving physical and mental health
Easy and Effective Self Care Routine for Freelancers
Learn simple and practical self-care strategies to enhance your well-being as a freelancer
3 Steps to Improve Your Public Speaking
public speaking, voice skills, speeches
Start up Airlines: How to launch an airline
Start up airlines are founded every year, learn how they do it!
Dropbox Made Easy
Learn the best practices for Dropbox and see how it can really improve your workflow!
About the instructors
- 4.56 Calificación
- 11301 Estudiantes
- 7 Cursos
Jens Schendel
jens schendel — citizen, researcher, tinkerer
CLA & CLE – C Language Certified Associate Programmer & Entry-Level Programmer
Harvard/edX CS50x Introduction to Computer Science
LPIC-2 & 1 Linux Engineer & Admin
CBSA & CBBF - BTA Certified Blockchain Solution Architect & Blockchain Business Foundations
CompTIA Linux+
Digital History:
Atari 2600, Commodore VIC-20, Commodore C64, Dragon 32, Dragon 64, Apple II, Amiga, x286, x386, x486, Pentium, Pentium II-4, Apple Mac G3, G4, G5, MacMini, MacBook, RasPi, workstations from i3-i7 und all places you can open a shell to! :-)
Student feedback
Course Rating
Reviews
Language / accent is little halting, But the explanations are good and can be more useful by adding some real-world like database handling, web server and module development
funny, short, to the point. a training you can follow watching on your mobile while traveling.
I'm incredibly grateful for the free Hangman coding training in Go! The step-by-step guidance was crystal clear, making the anyway not too complex game surprisingly easy to code. Can recommend this. It's free!
Yes. It jumps in pretty quickly
Quite well explained, as a beginner I have some challenges (such as pointers), but I'm sure I'll be able to find an answer to the challenges. Pace also suits me well, I hope to find more courses like this, and learn by doing!