DEV Community

Cover image for What was the first program you wrote?
Adam Davis
Adam Davis

Posted on • Updated on

What was the first program you wrote?

When I was in middle school, a friend showed me that you could write programs on a TI-84 calculator.

I didn't know about loops, variables, functions, or conditionals.

All I knew was how to print text and use goto statements.

Gif of program

But that limited knowledge was enough for me to make simple scrolling animations when I was bored in math class.

Knowing only a small number of programming constructs can sometimes be enough to make simple programs.

When you first started learning about code, what was the first program you wrote? How far have you come since then?

Discussion (18)

Collapse
tiguchi profile image
Thomas Iguchi

I don't really remember anymore what my very first program was, but it was definitely written in BASIC on a Commodore Amiga 500. I guess it was probably a couple lines of code to print something to the screen and play a beep sound. I learned BASIC using the programming manual that came with the machine.

What I do remember more clearly though is, that some of my earliest programs were a calculator, a few simple text adventures and a primitive "Eliza" style conversation bot that gave random canned responses based on keywords. I also wrote a few programs that would just draw random colors and lines

Collapse
brewinstallbuzzwords profile image
Adam Davis Author • Edited on

I didn't realize people used to learn code from physical manuals that came with the computer. It makes sense now that I think about it, but it hadn't occurred to me before

Collapse
tiguchi profile image
Thomas Iguchi

Back in the 1980ies, people who purchased a personal computer were usually dealing with a primitive operating system that was often interfaced through a BASIC interpreter. So I guess at that time having a manual that explains BASIC was a necessity 😄

The Amiga was a step up though. It featured multitasking and a proper graphical user interface with screens, windows and a mouse, so no programming language knowledge was really required, but it still came with that manual

Thread Thread
brewinstallbuzzwords profile image
Adam Davis Author

Yeah my first computer came installed with Windows XP, so definitely a different experience

Thread Thread
tiguchi profile image
Thomas Iguchi

I've been actually wondering if getting started with programming is more difficult or inaccessible nowadays, because modern operating systems tuck away easy and obvious access to programming environments. Older versions of Windows and MS-DOS still came bundled with QBASIC. Today it requires more of a conscious effort to download something from the Internet, and even then, what to choose from? There is just too much choice.

What motivated you to learn programming on a PC?

Thread Thread
brewinstallbuzzwords profile image
Adam Davis Author

That's an interesting point!

I guess it followed from toying around with simple programs on my calculator first. From there, I knew I liked writing code and wanted to learn more.

On my TI-84, all the programming commands were in a single menu where you could scroll through and figure out what the possibilities were. So while it was a far less capable device, it felt like it was designed to invite my curiosity.

I noticed a similar phenomenon when I taught elementary school students Scratch for a couple years. They didn't look up tutorials or read documentation, the language and interface were just designed to encourage experimentation and learning by doing.

The first few times I tried to learn programming on a PC, I remember getting caught up in the installation steps or not knowing how to compile or navigate the command line. I tried to learn C++ when I was 15 and I don't think I ever successfully compiled and ran a program I wrote myself.

But after a couple more failed attempts, I started writing some Java and Swift a couple years later.

Thread Thread
tiguchi profile image
Thomas Iguchi

That's great, so programming is part of the curriculum in elementary schools? I guess they actually do learn that programming is a thing that can be done on a computer.

Experimentation is definitely key, and it used to be more tedious and time consuming in the past, often leading to crashes and even complete system lockups. So next to curiosity for experimentation it was also necessary to muster up some courage to break things 😆

I also learned over the years that having a clear goal in mind is absolutely crucial for overcoming those initial hurdles while learning a new programming language. Did you specify any goals when you taught your students? Or was it more playful and they would come up with their own ideas?

Thread Thread
brewinstallbuzzwords profile image
Adam Davis Author

I taught at an after-school program, so I'm not sure how often it's incorporated into the regular curriculum. Definitely seems to be happening more at magnet schools though. I live in an area that has a large engineering industry, and it seems like there's all sorts of STEM magnet schools popping up.

The program was centered around making games, so usually the goal was to replicate some pre-existing game. But they had a lot of freedom in how to implement it. It was cool to see how some of them would really into the logical aspects (interesting scoring systems, adding settings menus) while others would get the basic version of it working and then spend the entire rest of the time on the design or sound effects

Thread Thread
brewinstallbuzzwords profile image
Adam Davis Author

And on the topic of how software has changed the way people think about computers, this article is pretty interesting:

theverge.com/22684730/students-fil...

Collapse
dilutewater profile image
Rachit Khurana

Last year, I wrote a python program for my school project. It was a trivia quiz game with GUI made using tkinter. I used online apis for gettings question & then stored the stats in a binary file.
Now this year we have to extend that project & incorporate databases, so I will be using sqlite db to store questions & stats.
So yeah, that was my proper first program that I wrote.

Well, now I have even learned Django & can build proper websites with backend. I even made a trivia quiz website using Django 😅 . triviaquiz.redcrypt.xyz/

I have learned quite a lot from back then but I still have a lot to learn. Just waiting for my exams to get over so that I can continue the learning.

Collapse
brewinstallbuzzwords profile image
Adam Davis Author

Nice job 🎉 Those button animations are pretty fun

That's definitely a lot more than I did starting out 😅

It always amazes me how much people are able to accomplish when they learn to code in a more structured environment.

I built some simple Java programs and iPhone apps in high school, but I generally felt like had no idea what I was doing until I had more formal instruction in college.

Collapse
dilutewater profile image
Rachit Khurana

Oh, about that button animation, that I just took from a public codepen, I am more interested in backend so I just use prebuild components for frontend & use bootstrap. 😅

Collapse
ksengine profile image
Kavindu Santhusa

I wanted to create a game when 8 years old. I learned about visual studio from my father. Then learned some HTML from him. But I haven't understood them.

When 12 years old I had created a game using Microsoft PowerPoint.

When 13-14 years old I learned VB.NET and created some incomplete programs.

Collapse
andreidascalu profile image
Andrei Dascalu • Edited on

It was the year of the Lord 1995 and the gods that be blessed my village with an HC tape computer. I wrote a simple BASIC ( you could say) program to display first 100 Fibonacci numbers.
Slightly exaggerating, I didn't live in a proper village but sometimes it felt like that.
Now I work in a few different languages, mainly Go and PHP but also feel comfortable in Rust, Elixir and JS. Doing mainly distributed cloud applications.

Collapse
brewinstallbuzzwords profile image
Adam Davis Author

BASIC was a bit before my time, but I've heard teachers and colleagues talk about it

What have you built with Elixir? It's been my hobby language for a little while and I've been enjoying it

Collapse
ferceg profile image
ferceg

10 PRINT "HELLO"
20 GOTO 10
RUN

C-16, ~1988...

How far am I now? hm... I haven't used goto in the last 20-25 years :)

Collapse
megadocker profile image
Collapse
alsidneio profile image
alsidneio

it was a c++ program from the C++ for Dummies book I was following. instead of "Hello, world" i printed "Aye cuz, whats happening"