title
What was Coding like 40 years ago?
description
🧠 Pricing Update! Sign up for Nebula! — https://go.nebula.tv/codingtrain — $5 per month or $30 per year!
Take a trip back in time and let's code the Snake Game in AppleSoft BASIC on a restored Apple II+ computer! GOTO and GOSUB! Line numbers! https://thecodingtrain.com/challenges/173-snake-applesoft-basic
🎥 Previous video: https://www.youtube.com/watch?v=FfCBNL6lWK0&list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
🧠 What is Code?: https://nebula.tv/what-is-code
🎶 Coding Together: https://soundcloud.com/user-207981744-979066415/coding-together
AppleSoft BASIC:
🍎 Basic Programming Reference Manual: https://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Software/Languages/Applesoft%20BASIC/Manuals/Applesoft%20II%20BASIC%20Programming%20Reference%20Manual.pdf
🪧 Peeks, Pokes and Pointers: https://archive.org/details/peeks-pokes-pointers
Apple II Emulators:
☕ Applesoft BASIC in JavaScript: https://www.calormen.com/jsbasic/
🍎 Apple IIjs: https://www.scullinsteel.com/apple2/
🍎 MicroM8: https://paleotronic.com/software/microm8/
Editing by Mathieu Blanchette
Animations by Jason Heglund
Coding Together Theme by Will from America (https://twitter.com/willfromamerica)
Eye of the Tiger cover by Leon from @neoexplains
Additional music from from Epidemic Sound
Timestamps:
0:00 Hello from 1981!
0:35 Opening Theme
1:29 Getting started
1:50 Fundamentals: PRINT, line numbers, LIST, RUN, GOTO
3:50 HOME (clear screen)
4:10 Variables
5:11 HTAB, VTAB
5:24 GOTO
5:44 Animation
6:20 Subroutines and GOSUB
7:17 Peeks, Pokes, & Pointers
8:07 RETURN
8:35 Write IF for keyboard interaction
9:35 Delay loop
11:16 Working with Arrays (DIM)
13:47 Remarks (REM)
14:01 Random Food Position (RND)
15:26 Debugging Montage
17:34 Snake Subroutines
23:15 Move Food
25:44 Improvements
27:02 Emulators
27:25 Nebula Class! What is Code?
🚂 Website: http://thecodingtrain.com/
👾 Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
💡 GitHub: https://github.com/CodingTrain
💬 Discord: https://discord.gg/hPuGy2g
💖 Membership: http://youtube.com/thecodingtrain/join
🛒 Store: https://standard.tv/codingtrain
📚 Books: https://www.amazon.com/shop/thecodingtrain
🖋️ Twitter: https://twitter.com/thecodingtrain
📸 Instagram: https://www.instagram.com/the.coding.train/
🎥 Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
🔗 p5.js: https://p5js.org
🔗 p5.js Web Editor: https://editor.p5js.org/
🔗 Processing: https://processing.org
📄 Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new
detail
{'title': 'What was Coding like 40 years ago?', 'heatmap': [{'end': 106.888, 'start': 90.023, 'weight': 0.776}, {'end': 1627.105, 'start': 1586.39, 'weight': 0.845}], 'summary': 'Explores a coding challenge on an apple ii plus computer in apple basic, learning applesoft basic and programming basics, memory access, and creating a snake game, including debugging and code refinement, providing insights into coding 40 years ago.', 'chapters': [{'end': 109.688, 'segs': [{'end': 109.688, 'src': 'heatmap', 'start': 90.023, 'weight': 0, 'content': [{'end': 90.963, 'text': 'Okay, the jig is up.', 'start': 90.023, 'duration': 0.94}, {'end': 92.864, 'text': 'These are fake glasses.', 'start': 91.363, 'duration': 1.501}, {'end': 95.144, 'text': "There's no prescription lenses in them.", 'start': 93.144, 'duration': 2}, {'end': 96.005, 'text': "I can't see a thing.", 'start': 95.204, 'duration': 0.801}, {'end': 99.626, 'text': "I'm putting on my real glasses, okay? Today is..", 'start': 96.045, 'duration': 3.581}, {'end': 102.246, 'text': "Shoot, this Casio watch doesn't tell me the correct time or date.", 'start': 99.626, 'duration': 2.62}, {'end': 104.207, 'text': "It's August 2022.", 'start': 102.506, 'duration': 1.701}, {'end': 104.687, 'text': 'Here I am.', 'start': 104.207, 'duration': 0.48}, {'end': 106.888, 'text': 'This is my childhood Apple II Plus computer.', 'start': 104.867, 'duration': 2.021}, {'end': 109.688, 'text': "Let's get started looking at basic code.", 'start': 107.668, 'duration': 2.02}], 'summary': 'The speaker admits to wearing fake glasses and struggles with a faulty watch, while preparing to use a childhood computer for coding.', 'duration': 109.478, 'max_score': 90.023, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw90023.jpg'}], 'start': 0.21, 'title': 'A coding challenge', 'summary': 'Details a coding challenge on an apple ii plus computer in apple basic, possibly 40 years in the future, where the presenter attempts to program the most popular coding challenge ever.', 'chapters': [{'end': 109.688, 'start': 0.21, 'title': 'Coding challenge on apple ii plus', 'summary': 'Details a coding challenge on an apple ii plus computer in apple basic, possibly 40 years in the future, where the presenter attempts to program the most popular coding challenge ever.', 'duration': 109.478, 'highlights': ['The presenter attempts to program the most popular coding challenge ever on an Apple II Plus computer in Apple Basic, possibly 40 years in the future.', "The presenter mentions that the audience doesn't need to worry if they have never programmed in Basic before, as they will be shown step by step.", 'The presenter humorously mentions fake glasses and a Casio watch that does not show the correct time or date.']}], 'duration': 109.478, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw210.jpg', 'highlights': ['The presenter attempts to program the most popular coding challenge ever on an Apple II Plus computer in Apple Basic, possibly 40 years in the future.', "The presenter mentions that the audience doesn't need to worry if they have never programmed in Basic before, as they will be shown step by step.", 'The presenter humorously mentions fake glasses and a Casio watch that does not show the correct time or date.']}, {'end': 415.462, 'segs': [{'end': 136.595, 'src': 'embed', 'start': 109.728, 'weight': 0, 'content': [{'end': 115.07, 'text': 'So the first thing I want to show you is that just at the command prompt with that blinking cursor, I can type code like print.', 'start': 109.728, 'duration': 5.342}, {'end': 118.949, 'text': "Oh, isn't that beautiful keyboard? Hello, world.", 'start': 117.168, 'duration': 1.781}, {'end': 124.551, 'text': 'I can also put a line of code in a program by writing a line number.', 'start': 119.529, 'duration': 5.022}, {'end': 125.211, 'text': "That's right.", 'start': 124.771, 'duration': 0.44}, {'end': 131.032, 'text': 'I actually have to specify a line number, like line 10.', 'start': 125.451, 'duration': 5.581}, {'end': 136.595, 'text': 'No text editor for me with automated line numbers and all that fancy future stuff that you have.', 'start': 131.032, 'duration': 5.563}], 'summary': 'Demonstrating manual coding at command prompt, including print and line 10.', 'duration': 26.867, 'max_score': 109.728, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw109728.jpg'}, {'end': 200.421, 'src': 'embed', 'start': 174.792, 'weight': 2, 'content': [{'end': 179.193, 'text': "So if you like this one, let me know in the comments that you'd like to see more Apple II videos.", 'start': 174.792, 'duration': 4.401}, {'end': 186.576, 'text': "But let's see how far I can get showing you everything that there is to know or that I know about AppleSoft BASIC just by making the snake game.", 'start': 179.474, 'duration': 7.102}, {'end': 190.677, 'text': 'Now, one of the things I would find in this manual is the fact that there is a graphics mode.', 'start': 186.836, 'duration': 3.841}, {'end': 194.419, 'text': "And I think if I type GR, It's going to enter graphics mode.", 'start': 190.977, 'duration': 3.442}, {'end': 195.019, 'text': 'That was kind of cool.', 'start': 194.459, 'duration': 0.56}, {'end': 198.901, 'text': "And there's even HGR, which will enter a high-resolution graphics mode.", 'start': 195.039, 'duration': 3.862}, {'end': 200.421, 'text': "Maybe that's for another time.", 'start': 199.281, 'duration': 1.14}], 'summary': 'Demonstrating applesoft basic by creating a snake game, showcasing graphics modes like gr and hgr.', 'duration': 25.629, 'max_score': 174.792, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw174792.jpg'}, {'end': 282.567, 'src': 'embed', 'start': 240.943, 'weight': 1, 'content': [{'end': 246.727, 'text': "as well as the X and Y position of the snake itself and the piece of food that it's trying to eat.", 'start': 240.943, 'duration': 5.784}, {'end': 247.828, 'text': 'So I need some variables.', 'start': 246.887, 'duration': 0.941}, {'end': 253.837, 'text': 'This happens to be a 40 by 24 display.', 'start': 250.236, 'duration': 3.601}, {'end': 257.838, 'text': 'And let w equals 40.', 'start': 255.798, 'duration': 2.04}, {'end': 260.978, 'text': "That's me creating a variable, assigning it the value 40.", 'start': 257.838, 'duration': 3.14}, {'end': 263.56, 'text': 'And I can actually also say let h equal 24.', 'start': 260.978, 'duration': 2.582}, {'end': 268.522, 'text': 'So I can put two lines of code essentially in one by joining them with a colon.', 'start': 263.56, 'duration': 4.962}, {'end': 271.483, 'text': "And we can take a look at the program, and we see what I've got so far.", 'start': 268.542, 'duration': 2.941}, {'end': 276.864, 'text': "Now it's important here that I'm leaving space between line 10 and line 20, because guess what?", 'start': 271.543, 'duration': 5.321}, {'end': 280.766, 'text': 'If I want to put a line of code in between those, I got no copy-paste.', 'start': 277.164, 'duration': 3.602}, {'end': 282.567, 'text': 'I got no move things around, no edit.', 'start': 280.766, 'duration': 1.801}], 'summary': 'Creating variables w=40 and h=24 for a 40x24 display.', 'duration': 41.624, 'max_score': 240.943, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw240943.jpg'}, {'end': 382.985, 'src': 'embed', 'start': 354.506, 'weight': 4, 'content': [{'end': 357.308, 'text': "Now I'm noticing that I only have left and right arrows.", 'start': 354.506, 'duration': 2.802}, {'end': 359.61, 'text': "There's no up and down arrow on this keyboard.", 'start': 357.548, 'duration': 2.062}, {'end': 365.054, 'text': "So let's use W for up, S for down, A for left, D for to the right.", 'start': 359.93, 'duration': 5.124}, {'end': 367.355, 'text': 'I need to handle the keyboard interaction.', 'start': 365.554, 'duration': 1.801}, {'end': 377.763, 'text': "Aha!, I would like to have a separate function that takes care of reading input from the keyboard and then changing the values of X and Y based on whatever input it's getting from the keyboard.", 'start': 367.656, 'duration': 10.107}, {'end': 382.985, 'text': 'How do I write a function? Well, another word that I could use is subroutine.', 'start': 378.303, 'duration': 4.682}], 'summary': 'Developing a keyboard input function to manage x and y values for a program.', 'duration': 28.479, 'max_score': 354.506, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw354506.jpg'}, {'end': 415.462, 'src': 'embed', 'start': 389.728, 'weight': 5, 'content': [{'end': 394.75, 'text': 'There is another command, which I love even more, called gosub or gosubroutine.', 'start': 389.728, 'duration': 5.022}, {'end': 400.932, 'text': "So I'm actually going to just wipe out line 60 and say gosub some line number far far away,", 'start': 395.03, 'duration': 5.902}, {'end': 403.753, 'text': "that I can't mess up with the lines of code that I'm writing right now.", 'start': 400.932, 'duration': 2.821}, {'end': 405.794, 'text': "Let's say 1,000.", 'start': 404.173, 'duration': 1.621}, {'end': 411.118, 'text': "Then I'll add my go to line 40 back at line 70.", 'start': 405.794, 'duration': 5.324}, {'end': 415.462, 'text': 'Now I need to write my subroutine, my function at line 1000.', 'start': 411.118, 'duration': 4.344}], 'summary': 'Introducing gosubroutine, replacing line 60 with gosub to line 1000, and re-adding go to line 40 at line 70.', 'duration': 25.734, 'max_score': 389.728, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw389728.jpg'}], 'start': 109.728, 'title': 'Learning applesoft basic and programming basics', 'summary': "Introduces applesoft basic, covering commands like 'print', 'list', 'run', and variables, and discusses programming basics, emphasizing subroutines and keyboard interactions for directional movement.", 'chapters': [{'end': 268.522, 'start': 109.728, 'title': 'Learning applesoft basic', 'summary': "Introduces the basics of applesoft basic, demonstrating how to write and run a program with commands like 'print', 'list', and 'run', while also showcasing the use of variables and graphics mode to create a snake game on an apple ii computer.", 'duration': 158.794, 'highlights': ["The chapter demonstrates writing and running a program in AppleSoft BASIC using commands like 'print', 'list', and 'run', showcasing the manual entry of line numbers and the use of 'go to' command. The speaker demonstrates the manual entry of line numbers and the use of commands like 'print', 'list', 'run', and 'go to' to write and run a program in AppleSoft BASIC.", "The use of variables for storing data, such as canvas dimensions and position of objects in the snake game, is showcased, with 'let' commands used to create and assign values to variables. The speaker demonstrates the use of variables to store data, such as canvas dimensions and object positions in the snake game, using 'let' commands to create and assign values to variables.", "The introduction of graphics mode in AppleSoft BASIC, including the use of commands like 'GR' and 'HGR' to enter different graphics modes, is briefly discussed. The speaker briefly discusses the introduction of graphics mode in AppleSoft BASIC, including the use of commands like 'GR' and 'HGR' to enter different graphics modes."]}, {'end': 415.462, 'start': 268.542, 'title': 'Programming basics and subroutines', 'summary': 'Discusses the basics of programming, including handling keyboard interactions and creating subroutines, emphasizing the use of commands such as gosub and keyboard inputs for directional movement.', 'duration': 146.92, 'highlights': ['The chapter emphasizes the importance of leaving space between lines of code to allow for adding new lines without the use of copy-paste, move commands, or editing, limiting the addition to 9 lines between line 10 and 20.', 'It explains the use of keyboard inputs (W, S, A, D) for directional movement, highlighting the need to handle keyboard interactions and create a separate function to read input and change the values of X and Y based on the input.', "It introduces the concept of subroutines, equating it with functions, and emphasizes the use of 'gosub' command to call subroutines, providing an alternative to the 'goto' command."]}], 'duration': 305.734, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw109728.jpg', 'highlights': ["The chapter demonstrates writing and running a program in AppleSoft BASIC using commands like 'print', 'list', and 'run', showcasing the manual entry of line numbers and the use of 'go to' command.", "The use of variables for storing data, such as canvas dimensions and position of objects in the snake game, is showcased, with 'let' commands used to create and assign values to variables.", "The introduction of graphics mode in AppleSoft BASIC, including the use of commands like 'GR' and 'HGR' to enter different graphics modes, is briefly discussed.", 'The chapter emphasizes the importance of leaving space between lines of code to allow for adding new lines without the use of copy-paste, move commands, or editing, limiting the addition to 9 lines between line 10 and 20.', 'It explains the use of keyboard inputs (W, S, A, D) for directional movement, highlighting the need to handle keyboard interactions and create a separate function to read input and change the values of X and Y based on the input.', "It introduces the concept of subroutines, equating it with functions, and emphasizes the use of 'gosub' command to call subroutines, providing an alternative to the 'goto' command."]}, {'end': 855.053, 'segs': [{'end': 593.472, 'src': 'embed', 'start': 564.195, 'weight': 3, 'content': [{'end': 567.097, 'text': "OK, now it's animating kind of fast, which is fine.", 'start': 564.195, 'duration': 2.902}, {'end': 568.878, 'text': 'But I would like to be able to slow it down.', 'start': 567.177, 'duration': 1.701}, {'end': 572.16, 'text': "I think it's going to be quite hard for me to play this game with it running so fast.", 'start': 568.898, 'duration': 3.262}, {'end': 575.162, 'text': 'So I think, if memory serves me correctly,', 'start': 572.321, 'duration': 2.841}, {'end': 583.287, 'text': 'the way that this is actually typically done is by writing a for loop that just counts through a bunch of numbers before it can move on to the next line of code.', 'start': 575.162, 'duration': 8.125}, {'end': 585.669, 'text': "And you would think that wouldn't cause much of a delay.", 'start': 583.568, 'duration': 2.101}, {'end': 588.711, 'text': "But on this computer, it's quite a nice solution for this.", 'start': 585.689, 'duration': 3.022}, {'end': 593.472, 'text': "So let's actually right before line 70 where I say go to 40.", 'start': 589.071, 'duration': 4.401}], 'summary': 'The speaker wants to slow down the animation, plans to use a for loop for delay, and finds it to be an effective solution.', 'duration': 29.277, 'max_score': 564.195, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw564195.jpg'}, {'end': 733.792, 'src': 'embed', 'start': 705.635, 'weight': 1, 'content': [{'end': 709.821, 'text': 'What is the dimensionality of the array? And it could be multiple dimensions.', 'start': 705.635, 'duration': 4.186}, {'end': 711.784, 'text': "I'm going to stick with a one-dimensional array.", 'start': 710.062, 'duration': 1.722}, {'end': 714.909, 'text': "And let's just go with a fixed length of 100 for right now.", 'start': 711.804, 'duration': 3.105}, {'end': 721.065, 'text': 'So now I have an array with 100 spots for x and 100 spots for y.', 'start': 716.923, 'duration': 4.142}, {'end': 724.487, 'text': "Then I'm running out of space for my lines of code.", 'start': 721.065, 'duration': 3.422}, {'end': 733.792, 'text': 'Then let the first element of the array be 20 and the first element of the y array be 12.', 'start': 724.847, 'duration': 8.945}], 'summary': 'Utilizing a one-dimensional array with 100 spots for x and y, and initializing the first elements as 20 and 12.', 'duration': 28.157, 'max_score': 705.635, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw705635.jpg'}, {'end': 803.215, 'src': 'embed', 'start': 766.065, 'weight': 0, 'content': [{'end': 767.447, 'text': 'But I feel good about doing that.', 'start': 766.065, 'duration': 1.382}, {'end': 768.088, 'text': 'I can do it.', 'start': 767.647, 'duration': 0.441}, {'end': 768.729, 'text': 'I can manage it.', 'start': 768.168, 'duration': 0.561}, {'end': 769.57, 'text': "It's just typing.", 'start': 768.909, 'duration': 0.661}, {'end': 774.296, 'text': "And in fact, this line 40 is going to change soon, as you'll see.", 'start': 771.232, 'duration': 3.064}, {'end': 776.919, 'text': "But let's just get what we had before working.", 'start': 775.117, 'duration': 1.802}, {'end': 790.554, 'text': "Is this the same program we had before? Let's find out.", 'start': 787.708, 'duration': 2.846}, {'end': 794.151, 'text': 'Looking good.', 'start': 793.271, 'duration': 0.88}, {'end': 803.215, 'text': 'Now, we need to pick a location for the food that the snake is attempting to get and then print that to the screen as well.', 'start': 794.872, 'duration': 8.343}], 'summary': "Confidently managing coding tasks, with upcoming changes in line 40 and adding a location for snake's food.", 'duration': 37.15, 'max_score': 766.065, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw766065.jpg'}, {'end': 868.239, 'src': 'embed', 'start': 832.918, 'weight': 2, 'content': [{'end': 835.14, 'text': 'And I need to get a random value.', 'start': 832.918, 'duration': 2.222}, {'end': 837.501, 'text': "So I'm going to look in my manual here again.", 'start': 835.2, 'duration': 2.301}, {'end': 841.824, 'text': 'RND for random is on page 102.', 'start': 837.521, 'duration': 4.303}, {'end': 846.147, 'text': 'Returns a random real number greater than or equal to zero and less than one.', 'start': 841.824, 'duration': 4.323}, {'end': 852.632, 'text': 'Oh, and it takes an argument where if I pass in a number greater than zero, I get a new random number each time it was used.', 'start': 846.167, 'duration': 6.465}, {'end': 855.053, 'text': 'This is going to be some number between zero and one.', 'start': 852.692, 'duration': 2.361}, {'end': 857.535, 'text': 'Multiply that by the width.', 'start': 855.874, 'duration': 1.661}, {'end': 868.239, 'text': "and convert it oh no, it's not a text editor and then convert it to an integer, because the food position can't be a decimal number.", 'start': 858.175, 'duration': 10.064}], 'summary': 'Using rnd function to generate random real numbers for food position.', 'duration': 35.321, 'max_score': 832.918, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw832918.jpg'}], 'start': 415.462, 'title': 'Memory access and snake game programming', 'summary': 'Covers accessing computer memory for keyboard input at memory address 49152 and programming a snake game in apple basic, including debugging, user input handling, animation creation, delay addition, array usage, and random number generation.', 'chapters': [{'end': 466.827, 'start': 415.462, 'title': 'Accessing computer memory for keyboard input', 'summary': "Discusses accessing the computer's memory to read the last pressed keyboard key, including instructions on peeking and poking the memory and identifying the memory address for keyboard input at 49152.", 'duration': 51.365, 'highlights': ["The chapter highlights the process of accessing the computer's memory to read the last pressed keyboard key.", "It provides instructions on peeking into the memory and poking the memory for reading and writing to the computer's memory.", 'The manual specifies the memory address 49152 for reading the keyboard input.']}, {'end': 855.053, 'start': 466.827, 'title': 'Programming a snake game in apple basic', 'summary': 'Demonstrates the process of programming a snake game in apple basic, including debugging, handling user input, creating animation, adding a delay, using arrays, and generating random numbers for positioning the food.', 'duration': 388.226, 'highlights': ['The chapter demonstrates the process of programming a snake game in Apple Basic, including debugging, handling user input, creating animation, adding a delay, using arrays, and generating random numbers for positioning the food. The chapter covers the step-by-step process of programming a snake game in Apple Basic, detailing debugging, user input handling, animation creation, delay addition, array usage, and random number generation for food positioning.', "The game's animation is created and a delay is added to slow down the game by utilizing a for loop that counts through a bunch of numbers before moving on to the next line of code. A for loop is used to slow down the game's animation by counting through numbers before proceeding to the next line of code, resulting in a slower game pace for improved playability.", "The process of using arrays to store the snake's position and length is discussed, with a fixed length array of 100 spots for x and y being utilized. Arrays are employed to store the snake's position and length, with a fixed length array of 100 spots for x and y being utilized to manage the snake's movement and growth.", "The method of generating random numbers is demonstrated using the RND function to determine the position of the food within the game. The RND function is employed to generate random numbers, enabling the determination of the food's position within the game for added variety and challenge."]}], 'duration': 439.591, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw415462.jpg', 'highlights': ['The chapter covers the step-by-step process of programming a snake game in Apple Basic, detailing debugging, user input handling, animation creation, delay addition, array usage, and random number generation for food positioning.', "The process of using arrays to store the snake's position and length is discussed, with a fixed length array of 100 spots for x and y being utilized.", 'The method of generating random numbers is demonstrated using the RND function to determine the position of the food within the game.', "The game's animation is created and a delay is added to slow down the game by utilizing a for loop that counts through a bunch of numbers before moving on to the next line of code."]}, {'end': 1734.242, 'segs': [{'end': 961.387, 'src': 'embed', 'start': 899.956, 'weight': 2, 'content': [{'end': 901.357, 'text': 'Something crazy is going on here.', 'start': 899.956, 'duration': 1.401}, {'end': 902.838, 'text': 'Oh, look at that.', 'start': 901.998, 'duration': 0.84}, {'end': 904.739, 'text': 'H tab FY.', 'start': 902.858, 'duration': 1.881}, {'end': 905.8, 'text': "That's a mistake.", 'start': 904.819, 'duration': 0.981}, {'end': 907.601, 'text': 'You probably noticed that.', 'start': 906.4, 'duration': 1.201}, {'end': 909.062, 'text': 'I did not.', 'start': 908.542, 'duration': 0.52}, {'end': 910.403, 'text': 'V tab.', 'start': 909.842, 'duration': 0.561}, {'end': 916.887, 'text': 'Illegal quantity error in 55.', 'start': 914.806, 'duration': 2.081}, {'end': 919.248, 'text': 'Hmm Okay.', 'start': 916.887, 'duration': 2.361}, {'end': 919.889, 'text': 'Line 55.', 'start': 919.529, 'duration': 0.36}, {'end': 926.053, 'text': "Did I just pick a bad random value? Let's debug this.", 'start': 919.889, 'duration': 6.164}, {'end': 955.197, 'text': "We can join more than one thing while we're printing with semicolon.", 'start': 950.97, 'duration': 4.227}, {'end': 961.387, 'text': 'So print fx, colon, space, then fy.', 'start': 955.277, 'duration': 6.11}], 'summary': 'Debugging issue with illegal quantity error in line 55 while printing fx and fy.', 'duration': 61.431, 'max_score': 899.956, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw899956.jpg'}, {'end': 1627.105, 'src': 'heatmap', 'start': 1576.602, 'weight': 0, 'content': [{'end': 1586.39, 'text': "So there's more than I need to do here, right? I need to do some error checking to make sure the food is always picked between 1 and 40 and 1 and 24.", 'start': 1576.602, 'duration': 9.788}, {'end': 1592.656, 'text': 'I need to make sure the snake is not allowed to go off the edge, game is over, or run into itself, game is over.', 'start': 1586.39, 'duration': 6.266}, {'end': 1594.818, 'text': "I'm going to write that basic code.", 'start': 1593.016, 'duration': 1.802}, {'end': 1599.002, 'text': 'reorganize this, clean up the line numbers, add some code comments.', 'start': 1594.818, 'duration': 4.184}, {'end': 1600.403, 'text': 'show you what that looks like here.', 'start': 1599.002, 'duration': 1.401}, {'end': 1601.424, 'text': "I'm also.", 'start': 1600.783, 'duration': 0.641}, {'end': 1606.348, 'text': "in case you don't happen to have your own Apple II Plus just sitting around, you want to try this yourself.", 'start': 1601.424, 'duration': 4.924}, {'end': 1609.05, 'text': "I'm going to include links to a bunch of different emulators.", 'start': 1606.348, 'duration': 2.702}, {'end': 1612.553, 'text': 'I found on the web that you could try running this code and modifying it.', 'start': 1609.05, 'duration': 3.503}, {'end': 1622.502, 'text': "And I really hope that you make your own version of the snake game in BASIC and share it with me at the link on the Coding Train website that I'm showing you right now.", 'start': 1612.914, 'duration': 9.588}, {'end': 1627.105, 'text': 'But if you liked learning about Apple soft basic programming on an Apple two plus,', 'start': 1622.642, 'duration': 4.463}], 'summary': "Ensure food picked between 1-40, 1-24 and snake doesn't go off edge or run into itself. provide emulators to run and modify code.", 'duration': 22.4, 'max_score': 1576.602, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw1576602.jpg'}, {'end': 1638.271, 'src': 'embed', 'start': 1612.914, 'weight': 4, 'content': [{'end': 1622.502, 'text': "And I really hope that you make your own version of the snake game in BASIC and share it with me at the link on the Coding Train website that I'm showing you right now.", 'start': 1612.914, 'duration': 9.588}, {'end': 1627.105, 'text': 'But if you liked learning about Apple soft basic programming on an Apple two plus,', 'start': 1622.642, 'duration': 4.463}, {'end': 1632.288, 'text': "maybe you have a friend who's never coded before and wants to learn to code from scratch in basic.", 'start': 1627.105, 'duration': 5.183}, {'end': 1638.271, 'text': 'Guess what? I just made an entire course all about how to code.', 'start': 1632.528, 'duration': 5.743}], 'summary': 'Encouraging viewers to create their own snake game in basic and offering a course on coding for beginners.', 'duration': 25.357, 'max_score': 1612.914, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw1612914.jpg'}], 'start': 855.874, 'title': 'Debugging snake game', 'summary': "Involves debugging the code for printing the food position at line 55, identifying a mistake in using 'h tab' instead of 'v tab', and utilizing semicolon for printing fx and fy values. it also details the debugging process and code refinement of a snake game in apple basic, including fixing code errors, optimizing game performance, and sharing resources for creating and modifying the game in emulators and learning platforms.", 'chapters': [{'end': 961.387, 'start': 855.874, 'title': 'Debugging food positioning', 'summary': "Involves debugging the code for printing the food position at line 55, identifying a mistake in using 'h tab' instead of 'v tab', and utilizing semicolon for printing fx and fy values.", 'duration': 105.513, 'highlights': ["Identifying and correcting the mistake in using 'H tab' instead of 'V tab' for the food position at line 55.", 'Utilizing semicolon to print fx and fy values for debugging purposes.']}, {'end': 1734.242, 'start': 961.407, 'title': 'Snake game in apple basic', 'summary': 'Details the debugging process and code refinement of a snake game in apple basic, including fixing code errors, optimizing game performance, and sharing resources for creating and modifying the game in emulators and learning platforms.', 'duration': 772.835, 'highlights': ['The speaker identifies and corrects code errors related to initializing variables, subroutine placement, and loop structure, resulting in the successful functioning of the snake game. The speaker identifies and corrects code errors related to initializing variables, subroutine placement, and loop structure, resulting in the successful functioning of the snake game.', 'The speaker optimizes game performance by addressing animation speed, error checking for food and snake position, and cleaning up code, enhancing the overall gameplay experience. The speaker optimizes game performance by addressing animation speed, error checking for food and snake position, and cleaning up code, enhancing the overall gameplay experience.', 'The chapter concludes with the speaker sharing resources for running and modifying the game in emulators and promoting a course on learning Apple BASIC and coding, extending an invitation to share modified versions of the game. The chapter concludes with the speaker sharing resources for running and modifying the game in emulators and promoting a course on learning Apple BASIC and coding, extending an invitation to share modified versions of the game.']}], 'duration': 878.368, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/7r83N3c2kPw/pics/7r83N3c2kPw855874.jpg', 'highlights': ['The speaker optimizes game performance by addressing animation speed, error checking for food and snake position, and cleaning up code, enhancing the overall gameplay experience.', 'The speaker identifies and corrects code errors related to initializing variables, subroutine placement, and loop structure, resulting in the successful functioning of the snake game.', "Identifying and correcting the mistake in using 'H tab' instead of 'V tab' for the food position at line 55.", 'Utilizing semicolon to print fx and fy values for debugging purposes.', 'The chapter concludes with the speaker sharing resources for running and modifying the game in emulators and promoting a course on learning Apple BASIC and coding, extending an invitation to share modified versions of the game.']}], 'highlights': ['The chapter covers the step-by-step process of programming a snake game in Apple Basic, detailing debugging, user input handling, animation creation, delay addition, array usage, and random number generation for food positioning.', 'The speaker optimizes game performance by addressing animation speed, error checking for food and snake position, and cleaning up code, enhancing the overall gameplay experience.', 'The presenter attempts to program the most popular coding challenge ever on an Apple II Plus computer in Apple Basic, possibly 40 years in the future.', "The chapter demonstrates writing and running a program in AppleSoft BASIC using commands like 'print', 'list', and 'run', showcasing the manual entry of line numbers and the use of 'go to' command.", "The use of variables for storing data, such as canvas dimensions and position of objects in the snake game, is showcased, with 'let' commands used to create and assign values to variables."]}