186

Boris Cherny: TI-83 Plus Basic Programming Tutorial (2004)

It's funny how many software developers got into it due to being bored in class with a TI-83 and randomly trying to create programs.

15 hours agoz_open

That’s me with a TI-85 in 7th grade in ‘95 or so.

It was effectively a portable computer that I was allowed to use and play with in most classes.

Started with TI-BASIC, then discovered ticalc.org and the shell and assembly programming hacks, games, and home brew transfer cables.

It effectively started my electrical engineering and computer science career.

I know I’m not alone.

13 hours agonzoschke

Ah I was a few years later on the TI-86. Around 1999.

Between this, and SNES emulation (searching memory for values and adjusting things to see how they'd affect the game), I was destined for computer science.

2 hours agobmenrigh

Indeed, +1. I was the same though with a TI-83 instead. I had to get good at hiding the calculator under the desk in non-math classes because the English teacher (for example) would press me on "why do you need a calculator for English class?"

I'm kicking myself for not saving the game code I wrote for some of those early games. They weren't very good, but I'd love to see the code, despite the horrifying spaghetti that it was.

12 hours agofreedomben

Almost identical boat here. Had a borrowed TI-83, freshman year wrote 2048 && 1/2 of chess with only knowing basic variable usage, if, goto, and matrix indexing. Found out about actual loops and the ability to call a basic program from another latter.

10 hours agochainingsolid

We had a chat program on the TI-85 over an extended (10m) link cable.

Good times, indeed.

9 hours agochinathrow

I had a TI-81 (and then an 85 later on). I wrote a blackjack program. There was no link cable for the 81, so other kids had to type it in manually.

10 hours agodlevine

Same here! TI-85, and then HP48G series after that!

13 hours agoaklein

+1 ti85 7th grade '95

8 hours agocolinmegill

That was me. Algebra clicked for me so I found the pace of the class to be slow. Ended up creating a few programs to solve tedious things like the quadratic formula incrementally while displaying the intermediate steps so I could write them down on tests.

Authoring programs using the buttons on the calculator was not fun.

13 hours agomatt_kantor

> so I could write them down on tests.

We had show our calculator had been memory wiped before any tests.

Although in retrospect we only had to show the wipe screen which we probably could have coded up as its own program.

10 hours agocube00

Even though I never cheated, I never wanted my programs to get erased... I just created an image of the "memory erased" screen and showed that to the teachers.

38 minutes agostn8188

Most teachers were not good at checking this. There was an archive mechanism which would compress the file and IIRC, prevent it from showing up in the program list. You could of course just unarchive it.

9 hours agoz_open

It was OK, just needed to memorize the commands, they are all reachable via a combination of number keys :-)

12 hours agoNanoWar

I got Super Mario onto my TI-89

32 minutes agoaz226

Absolutely! It started with MENU() text adventure games and then got to drawing custom UIs with DRAW(). iirc, you could get small text by using TEXT() in the DRAW() command. The specifics might be wrong on that one though!

13 hours agobutlike

And many of the people I knew who went on to become real incredible software devs got tired of the limitations of basic and went to ASM. My friend and I started building (and selling) graphlink cables made from old printer parallel cables, mainly for the ASM hackers. We even sold them with a warranty!

12 hours agofreedomben

Hey, some of us are old enough to have done it on a TI-82 instead!

I already knew Basic from a DOS PC, but did write a Breakout clone while bored in classes on my TI-82.

11 hours agovikingerik

Says something interesting about education. Exposure to tools had perhaps as much impact than what the high schools were actually teaching .

7 hours agoseizethecheese

productive procrastination!

21 minutes agokellpossible2

TI-BASIC was also the gateway drug to writing assembly for TI-83.

9 hours agoteeray

Yes that’s exactly how I started coding!

9 hours agotcoff91

Wait, I'm not the only one ? :P . I was def the only one in my class and maybe we were 3 of all classes doing that

13 hours agottoinou

Same. I even convinced my mom to buy me a transfer cable so I could distribute my programs to my classmates. I was the "plug" for a brief time. Probably my closest taste of being "popular". It was nice.

13 hours agojoebates

I ended up building my own by "repurposing" and old printer parallel cable that my dad wasn't using. He wasn't thrilled about that, but seemed a little bit proud at what I did with it.

I eventually made enough money from "donations" from people to buy a proper cable, which did improve my DX quite a bit. The hacked up parallel cable wasn't the most reliable...

12 hours agofreedomben

The TI-83 taught an entire generation that programming was possible on hardware you already owned. No IDE, no internet, no Stack Overflow. Just you, 8 lines of visible code, and a 96x64 pixel screen. Everything since then has been more powerful and less magical.

4 hours agoarian_

For anyone wondering, Boris Cherny created Claude Code.

13 hours agovvoyer

Where React

12 hours agocap11235

"Caused" or "unleased" might be better words. Unleashed onto an unsuspecting innocent world. Caused to industry that did not mistreat him in any way.

11 hours agodude250711

"Created the nuke" is the best framing. Detonated a WMD on the field of rigorous practice.

11 hours agoacedTrex

Chao ab ordo

10 hours agoarcanemachiner

I received the TI-83+ manual on the first day of high school and read it back-to-back that same day.

Subsequent math classes, I started by writing a BASIC problem to solve the type of math problem we were given.

I can't decide if I got really good at solving those math problems by solving them generally once, or really bad at solving those math problems for never having solved them more than once or twice by hand while writing the program.

Those programs were very inefficient, and you could code the TI-83+ in assembly, but it required uploading the code via cable. I recall being able to play small internet-downloadable network games with two TI-83+ connected. I never got around to writing any games myself.

14 hours agosshine

Would be crazy if the Ilya S he thanks in the first page was Ilya Sutskever

9 hours agoharmoni-pet

Was thinking the same thing. Seems unlikely?

4 hours agosebmellen

thinking the same x2 hahaha, would be awesome

3 hours agovmesel

I'd like to know too

an hour agokyars

The Basic was SO BAD that I had to learn Z80 assembly to make anything good. Really.

No sane Basic should leak stack memory just because you exited an "If-Then" block without reaching the corresponding "End". Yes that's a thing. If you use "If-Then" and the code never reaches the "End" because you used "Goto" to leave the block, a few bytes are leaked every time that happens, and eventually the program stops with "ERR: Memory". You needed to use "If" then "Goto" on the immediate next line, and that would avoid the leak. Exiting the program or stopping it will give you back all the leaked memory, including seeing that error.

Then you have the lack of actual subroutines or functions. All you can do is call into a separate program, and return things by putting them in specific variables. But the Basic doesn't even have "Gosub".

Also, it's very very slow.

12 hours agoDwedit

That wasn't "leaking stack memory" except in a very literal sense: the BASIC language keeps a stack of the control structures you're inside, so that when you hit an "End" or "Else" statement it knows where to go next. This "stack" of control structures isn't lexically scoped; it's dynamic, based on what control flow commands you've hit. So yes, if you use "Goto" to set up a situation where you're hitting "Then" over and over without ever hitting a corresponding "Else" or "End", the control flow stack will just keep getting deeper and deeper. That's not a "leak" per se: all those "Then" structures are still there, waiting for their "End"s, and will do the natural thing if you give their "End"s to them — even somewhere someone used to lexically scoped languages wouldn't expect. Sometimes you can do cool things with this.

See subsection 2.1 in https://www.ticalc.org/archives/files/fileinfo/145/14542.htm...

(I should add that the first image on that page shows one neat effect of non-lexicality: you can put an "Else" statement as the body of an "If", so that it's skipped when the "If"'s condition is false.)

2 hours agoquuxplusone

But isn't that just how the world works? As kid I got ERR:MEMORY allot while trying to create games. It was until I started to read a C book which said "We will not use goto in this book. It is a dangerous function that can lead to memory leaks. For example if you jump out of a function, said function will stay in memory because it never finishes." That was the light bulb moment for my TI-Basic problems.

For me the bad part is that the official TI-83 manual has a code example for the GETKEY function that is using GOTO to jump out of a loop.

8 hours agonoAnswer

No, it's not how the world works. The warning about "goto" in C is about memory leaks due to misusing malloc/free. The issue with TI-Basic is about the interpreter using a stack for if/else/end blocks.

In normal programming languages, If-Then-Else is made up of a conditional branch to get you into either the "If" part or the "else" part, and a jump to skip you past the "else" part to the "end if" part. There is no stack used for that.

8 hours agoDwedit

hm ok. Still, my misunderstanding helped me to write TI-Basic programs that no longer crashed. :-)

7 hours agonoAnswer

Yep. It was an incredibly constrained environment, which honestly made me feel so happy when I got things to work well :)

I wonder if I still have my minesweeper program on my old calculators.

10 hours agopavel_lishin

Also there are only 27 variables. Which made it hard for me to write a Snake clone until I figured out how to use Lists.

9 hours agocanjobear

Lots of stories about being bored in class and making programs, so I thought I'd share mine.

The functions feature allow you to define and graph equations with x and y. Well other variables also factor in including program defined variables such as z. That enables 3d orthographic graphs to be drawn.

Then I took it a step further and translated the results into a matrix and used that data to make real 3d projections of my graphs (or other shapes)

A bit serendipitous as my father just gave me back the calculator I used, I will be passing that down to my kids.

9 hours agokyleperik

That brings back memories...

In 2008 I was in high school and wrote a TI-BASIC tutorial in German [0] on my blog that became by far the most popular thing I wrote - maybe on par with my post about how to fix a quest bug in Skyrim by teleporting Delphine.

I was a bit mad back then that people for some reason appreciated those posts more than many very deep teenager ramblings about politics/philosophy :D

[0]: https://archive.haukeluebbers.de/2008/12/ti-basic-tutorial-1...

15 hours agodubbel

I hope / don't hope to be famous enough one day that people start looking through my blog and forum posts from when I was a teenager. :|

15 hours agocoreyh14444

Luckily for me the company that hosted mine went under, nothing is accessible anymore, and there is no snapshot in the Internet Archive.

15 hours agokergonath

Do you think Boris can still be reached under pickledcherry668@yahoo.com ?

13 hours agoloehnsberg

Completely off-topic, but I recall hearing that Boris spent some time in Japan before Anthropic, learning to make miso paste the traditional way while living there. Interesting to see that he's been interested in lacto-fermentation for decades now.

9 hours agosushid

Only bc we’re on a nerd site, miso doesn’t involve lacto fermentation in any significant way. And I guess you can pickle cherries in any number of ways that aren’t lacto fermentation.

3 hours agoblovescoffee

there's only one way to find out

10 hours agospate141

"His ugliness was the stuff of legend. In an age of affordable beauty, there was something heraldic about his lack of it."

-- William Gibson, Neuromancer

I just love opening a page, and it is not vomited with claude's aesthetics.

12 hours agojackdoe

Ilya S?

15 hours agopama
[deleted]
12 hours ago

this was definitely me in high school. i still fondly remember the day when we could use our Ti-83+ for our exam but we had to show the teacher that we cleared memory for notes and formulas.

So i wrote a program that just made it look like I cleared memory and it worked like a charm.

I don't remember if I even stored anything that could be constituted cheating but it was more about the satisfaction of knowing I outsmarted them, heh.

10 hours agodack

Is there something similar for the HP 48G calculators that anyone knows of?

12 hours agochollida1

I did not realize Boris made the tutorial that got me into programming. Wow. What a great find! And is the Ilya S Ilya Sutskever?

5 hours agosneilan1

I love seeing everyone share their stories if learning on a TI-8x.

My school recommended the 83+ but I ended up with an 85, probably because it was on sale or something. This meant I couldn't share games that all the kids had in their 83 so I got my start by copying them by hand and trying to figure out the syntax differences by guessing. After one of those I was able to start making my cheater programs and aced geometry because of it.

12 hours agosanex

I went with a TI-89 and had one good friend in HS that had one as well. This would have been late 99-00, I believe.

Fondest memories were recreating my school C++ project in TI BASIC and showing it to my teacher, using utilities to restore apps and data after a "reset" in math class so I could skip over memorizing equations, grayscale erotica, and of course Phoenix.

https://www.youtube.com/watch?v=ke6DnczjaK0

12 hours agofishtacos

He started undergrad in 2009.. how old was he when writing this? 12-13??

3 hours agosebmellen

From an earlier post, I had the realization that many of us started programming at this age on calculators.

3 hours agomrwaffle

He talks about TI-83 programming in the Pragmatic Engineer Podcast interview.

4 hours agoruraljuror

I like the "challenges" part at the end, especially the varying difficulty levels:

* A quadratic formula program, which outputs the number of roots and the x-intercepts upon the user inputting the values of A, B, and C.

* A fighting game, with health, a store, different enemies, weapons, armor, etc, with graphics and animation.

11 hours agot0mek
[deleted]
11 hours ago

This made me wonder about Boris Cherny's professional career pre-Claude Code, so I did a customary "Boris Cherny wiki" Google. I'm shocked to learn he doesn't have a Wikipedia page! Is this my Hacker News bias? He's a ubiquitous online topic and has had an outsized impact on the world over the last year, but maybe I don't understand Wikipedia's criteria for biographical articles. I have a conspiratorial suspicion that Wikipedia has a (well-earned) anti-LLM bias so AI topics are unrepresented there.

5 hours agosp1nningaway

I think that's fairly standard for Wikipedia. Most tools have no page at all, and popular tools will typically have a small wiki with the author in black text. Then an author who writes multiple widely used tools may or may not get a page. Look at the wiki of someone prodigious like Bellard and even then it's just a rather sparse straightforward list of things he's done.

5 hours agosilisili

There‘s HP calculator guys and TI guys. Around the age of 17 I spent lots of time programming my HP28s calculator in a Forth like language that had symbolic mathematics, lots of ideas from Scheme (closures, functions as first class arguments, recursion). It felt like magic dealing with concepts I hadn’t seen in the C compiler on my Amiga or later in Turbo Pascal. But I saw these concepts later in Mathematica and was familiar.

I had programmed games, complex 3d visualisations (super slow but oh well), and was totally fascinated by what this device could do.

15 hours agosubmeta

An HP 50g was my calculator of choice, and the whole RPN style really rubbed off on me. Plus it had more advanced symbolic algebra capabilities than a ti83 equivalent. I enjoyed learning common lisp, scheme, racket, etc through high school and college and still am fond of them today because of this calculator.

14 hours agofaxmeyourcode

Most if not all high schools and colleges in the US required TI “graphing” calculators for algebra/trig on up. I don’t know if they still do. I never saw this HP28, sounds awesome!

14 hours agole-mark

I remember one of my math teachers claiming only TI showed up to the math text book meetings or something like that, so guess what calculator the book recommends...

10 hours agochainingsolid

The rest of the world only has Casio, I think.

15 hours agootabdeveloper4

I got a TI83 in 4th grade and I realized programming is how you made video games and I decided "ok I'm going to learn to program"

I read the whole manual's programming section but couldn't make heads or tails of it. It assumed you knew basic logic/programming and mostly explained functionality/syntax.

Then in 5th grade my friend who was 3 years older was like "hey look I made a story in my calculator" and it was this big choose your own adventure story. He showed me how to use goto, how to display text, and a function for multiple choice user input + goto. I was in business!

I wrote my own story but had a section where I wanted to do different things if you had gotten an item already so I had to program the whole story twice and only enter the second version from the option where you get the item. I tried writing a more complicated story with more items but the duplication was insane 3 items required 3!=6 copies of common locations. I was like "this is dumb there's got to be a better way" and I looked at the manual again and now I had enough of a framework to understand "OH a variable is whether you have the red key, why didn't they just put that?"

12 hours agoyinksta

For those souls loosing their skills to the easiest to adopt technology ever created... agentic development works for him because he KNOWS what he is doing in the first place!

12 hours agojvillasante

Pretty much every tool is far more powerful for those who understand the job it does.

11 hours agobrookst

he and I share the same favorite programming book and until now I didn't know anyone else in this boat:

Functional Programming in Scala

11 hours agobeastman82

I would be more interested, how I can disable the auto-power-off on my TI-86 (ROM v1.3 emulated with virtual Ti)

13 hours agokh2engab

This is a really interesting direction. Thanks for sharing!

10 hours agoMiles_Stone

The original manual for the TI83+ is what actually got me into programming. It was pretty nice.

15 hours agomsk-lywenn

[dead]

12 hours agoredsocksfan45

this is what got me into programming, before i even knew i was a programmer

9 hours agokeeganpoppen

Ah yes, my first love. I remember creating a quiz game based on greek mythology, and a little RPG where I realized the power of exponential functions by wrecking my power curve.

12 hours agoquxbar

Does it run Doom?

8 hours agoitrunsdoomguy

My "bored in class" story: In addition to plenty of stickman fighting animations, I wrote a full "Geometry" helper program which solved arbitrary triangles, did the quadratic equation (including imaginary roots), and maybe one or two other things that I don't remember.

We could have a quadratic equation solver on tests, but not the other functions. I put a splash screen that said my name and "Quadratic Equation Solver" which prompted a, b, and c if you pressed ENTER. If you pressed the right button on that splash screen (sin, naturally) it would unlock the full menu.