In our modern era of computing and gaming where big budget AAA games and closed console ecosystems dominate - there’s a longing for the simpler, more open times, where kids and adults alike were encouraged to code.

Originally published on Medium on March 22, 2024


Those of us who grew up tinkering with BASIC on iconic machines like the Commodore 64 or the ZX Spectrum know the joy of crafting programs from scratch, pushing the limits of hardware, and exploring the boundaries of creativity. It was there where we took our first steps in computational thinking and problem solving.

Enter the Steam Deck, a handheld gaming console that not only has helped to redefine portable gaming but also revives and enables the spirit of exploration and programming reminiscent of those golden days.

The Valve Steam Deck (Console-like but really a PC)


The Resurgence of Handheld Computing:

The Steam Deck offers a console-like experience:

Steam Deck has a user-friendly interface specifically designed for its gamepad controls. Its software and operating system are tailored for Steam Deck, making it the easiest way to get into PC gaming.

The good news is that completely unlocked and by design has full Linux driver compatibility, so it can easily be used as an all-purpose handheld PC with Arch Linux.

In comparison, your far more popular Nintendo Switch (and third best selling console of all time) is completely closed off. Its locked down to do one thing very well: play games. While that may fill some time consuming, that time could be more fulfilling spent crafting and problem solving.

Modern handheld computers like the Steam Deck are far more powerful than the Commodore 64 of old and, though certainly not the best machines you can get for coding, may very well be the only or the first PC a child has.


A Journey Back in Time:

I’ve previously touched on my experiences first beginning to code, using the Commodore 64 using BASIC:

My brother and I tried, and failed, to copy the code listing from the back of a manual or magazine. Frankly, we had zero idea what we were doing. We were simply blindly copying words and numbers onto the screen without understanding — pages upon pages of code listings, in the hope that the program would run…Our curiosity was piqued and we were hooked.

See: Hello, Future - Coding is Dead. Long Live Engineering!

The BASIC programming language, was by its very definition, designed to be easy to use:

BASIC (Beginners’ All-purpose Symbolic Instruction Code) is a family of general-purposehigh-level programming languages designed for ease of use.

And with the Commodore 64 your BASIC coding prompt was the first thing you saw when you switched it on. With the Steam Deck you have to do a little more work to get started coding but not much. If you’re just starting out here in 2024, Python (or Javascript) would be your best choice both as beginners and industry standard languagesWe’ll focus on Python.

See The Top Programming Languages


Setting Up the Development Environment:

First, you will want to enter the Desktop Mode. To access Desktop Mode, go to Steam > Power > Switch to Desktop.

Now, you can navigate the desktop by using the right Trackpad to move the mouse, R2 to left-click, and L2 to right-click. You can also bring up the on-screen keyboard by pressing Steam + X Button and use that to type. However, I would recommend that you…

Optionally:

Do yourself a favor and either get a dock and keyboard (The Logi K400 with a trackpad is a good option — or you could go with a bluetooth keyboard) and plug the Steam Deck in. There is great guide here from ETA Prime if you’re completely new to thisBonus points if you plug in a monitor too for more screen space.

Logitech K400 Plus TKL Wireless Membrane Keyboard for PC/TV/Laptop/Tablet with Built-in Touchpad

Whilst in Desktop Mode, Steam Deck works like a regular PC — you can browse the internet, download and install applications, and run programs outside of Steam that support the Arch Linux distribution perhaps most easily via FlatHub.


Part 1: Coding Online

Online IDEs (Integrated Development Environments) and REPLs (Read-Evaluate-Print-Loops) are a great way to be able to code anywhere and take some of the friction and potential frustration of setting up your environment away from new and experience coders alike. Modern REPLs even include AI coding assistants that will help you to learn how the code works and some best practices and techniques.

  1. Open Discover — it’s a small blue folder in the menu bar.
  2. If not already installed, install either FirefoxChromium, or Google Chrome, by searching for it in Discover and choosing Install. This will ensure you have a browser available.
  3. Once installed you can either Launch the installed browser from Discover or find open it from the Steam Deck menu.
  4. In your chosen browser navigate to https://repl.it.

  1. Choose Start creating and Sign Up or Log In with your existing user.

3. Choose a name, select where you plan to use it e.g. “For personal use” and your level of software engineering experience. Then click Start building.

4. Choose Python as your language for the template options, give it a suitable description and select Use Template.

  1. You’re in! Cycle through the workspace tutorial using Next until you are presented with the replit window.

Incidentally, all the steps from #4 to this point would also work on some of the more closed systems like your iPad, or iPhone, or any other tablet that has a browser. That’s the advantage of coding online.

  1. In the main.py window type:

    print("Hello, World!")

(You may find that the workspace reads your mind as you type – welcome to the present!)

  1. Now that you’ve written your first program, select Run to execute it.

Top Tip: Use Ctrl + (or Cmd +) on your keyboard to increase the text size.

After resolving dependencies, your code has executed. You’re a programmer now!

  1. Highlight the code you have written and click Explain from the context menu that pops up (If it doesn’t show up automatically, right click your selected text then click Explain).

Congratulations you’ve just used AI. You’re a 10X Developer now!

Welcome to the fun, easy world of 10X development, you have a gained a superpower! Your AI assistant will generate something akin to the below, explaining exactly what the code you have written does:

The provided code snippet is a simple Python statement that uses the print() function to output the text “Hello, World!” to the console.

Here’s a breakdown of the code snippet:

Syntax:

In Python, the print() function is used to display text or variables to the console.

The text to be displayed is enclosed in double quotes " ".

Functionality:

The print("Hello, World!") statement will output Hello, World! to the console.

Output:

When the Python script is executed, the output will be:

Hello, World!

This code snippet is a common introductory example used in programming tutorials to demonstrate the basic functionality of outputting text to the console.


In follow up articles we will discuss coding offline!

Coding purely online is fun and all, and should be part of your toolset but has limitations. If you want to gain real serious experience and use the power of your Steam Deck, setting up your own environments and running outside of the browser is where the greater challenge is to be had and something you will need to understand. — The Code Influencer

We will also cover how you can get started with a few other programming languages, push the boundaries, build communities and connect, and the joy of exploration!

Up Next: Hello, Nostalgia - (Re)discover the Joy of Programming on the Steam Deck (Part 2)

In the meantime, here are some helpful links to resources below. Why not try some code listings out in your Replit?


Additional Resources

IDEs

Projects / Code Listings

Learning

References

Steam Deck

Happy Coding on Deck!

Disclaimer:

The views and opinions expressed in this blog are based on my personal experiences and knowledge acquired throughout my career. They do not necessarily reflect the views of or experiences at my current or past employers