Announcement

Collapse
No announcement yet.

Do you remember your first bit of code?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Do you remember your first bit of code?

    I was looking through some old junk and found my Commodore 64 notebook. Inside is my very first bit of code.

    0 PRINT "HELLO WORLD!"
    1 END


    Not too bad, rather than just entering PRINT "HELLO WORLD!" I apparently prefixed line numbers to store the program in memory and then typed RUN to run the program. I can’t take any credit for this; I remember where these notes are from.

    I was introduced to BASIC at a C64 club that held its meetings in a mobile home park in Morgan Hill, California. I was just this random kid that showed up with both his parents. One of the guys sat me down and spent the night going over BASIC and the benefits of a 5.25-inch floppy punch. That guy was cool. I hope I'm that cool. later that same week I actually purchased a floppy punch that I found in a bin of random crap at a Kmart. Now that I think about it, that punch was my first hack.

    Do you remember your first bit of code?
    Ad astra per alia porci

  • #2
    Re: Do you remember your first bit of code?

    Originally posted by rkill View Post
    Do you remember your first bit of code?
    I started with gwbasic. To run a game you had to first load it, which displayed all the code. Didn't take long to see how I could start with 20 lives instead of 3, and then it was typing full games from a commodore book o code.

    Comment


    • #3
      Re: Do you remember your first bit of code?

      Technically, my first bit of code was a 'hello world' in C++ (or maybe even Visual C++, can't remember).

      My first real coding, though, was done in BASIC on a TI-83 calculator. One very nice advantadge of that environment, for all it's other limitations - it didn't have a keyboard, so all keywords were actually tokens selected from a menu.

      For me, this reinforced the idea of tokens/reserved keywords in a language, and also made the language more discoverable. as in - 'hmm. I wonder what 'while' does? what is 'goto', or 'lbl'?'

      direct pixel graphics access was also nice.
      It's not stupid, it's advanced.

      Comment


      • #4
        Re: Do you remember your first bit of code?

        Originally posted by YenTheFirst View Post
        My first real coding, though, was done in BASIC on a TI-83 calculator.
        Nice. For me it was a TI-85 :Disp "hello world"
        Ad astra per alia porci

        Comment


        • #5
          Re: Do you remember your first bit of code?

          Anyone play around with C64 sprite graphics (aka Movable Object Block)?

          I never did get one to run. I had a disk of samples but wasn't savvy enough at the time to figure out the code.
          Ad astra per alia porci

          Comment


          • #6
            Re: Do you remember your first bit of code?

            Real source code or programming?

            My first actual source code probably would've been for a Timex/Sinclair (yes, I still have it, and a bunch of audio tapes with programs I wrote) but it might have been on my uncle's Altair 8800b (which he later gave to me). Either would have been in BASIC. My uncle had a copy of MS BASIC for CP/M on 8" for the Altair. The TS also got me in to playing around with assembly, which I still do from time to time in the embedded world. Yes, sometimes interrupt latency counts.

            I think the first thing I ever "programmed" was a Big Trak. Still have that too, but the the original board died.

            Old programmers/engineers don't die, they just sit around and talk about legacy hardware...
            TSA luvs my Uzi.

            "We shall not cease from exploration. And the end of all our exploring will be to arrive where we started, and know the place for the first time." -T.S. Eliot

            Comment


            • #7
              Re: Do you remember your first bit of code?

              Mine was in basic as well, but rather than name the lines 0 and 1 I made them 10, 20, 30, etc. That way I could always add code if I made an error and needed something in between 5 and 6, it would be 50 and 60 so adding a line 55 was easy. I recall how slowly the programs ran. I wanted my Commodore 64 to play a short beep 20 times and then stop, so I made the beep sound and a counter in the coding. The 20 beeps took about 20 seconds, the system was just that slow. Not so today!

              I had done some earlier work too, around 1981, which involved Rat Shack's TRS-80 and a cassette drive.

              And for those of you who ever drive by all the windmills in Palm Springs CA, I used to have a job sending the use data to the power companies for payments. We used an Atari 800 and Rat Shack Model 100 (laptop?) for all those windmills. It was RS-232 or nothing!

              Comment


              • #8
                Re: Do you remember your first bit of code?

                Originally posted by astcell View Post
                ...but rather than name the lines 0 and 1 I made them 10, 20, 30, etc.
                It's 2012 and thanks to you I just now figure this out.
                Ad astra per alia porci

                Comment


                • #9
                  Re: Do you remember your first bit of code?

                  Originally posted by rkill View Post
                  It's 2012 and thanks to you I just now figure this out.
                  That's what going to Defcon is all about. Another success story!

                  Comment


                  • #10
                    Re: Do you remember your first bit of code?

                    the first computer i actually remember in our home that could easily be used for programming was a TI-99. i can recall my babysitter showing my mother and i how to bring up the BASIC programming interface. she then showed us something that her and her girlfriends did with a school computer, putting in this code...

                    Code:
                    10 PRINT "0000"
                    20 PRINT " 0000"
                    30 PRINT "  0000"
                    40 PRINT "   0000"
                    50 PRINT "  0000"
                    60 PRINT " 0000"
                    70 PRINT "0000"
                    80 GOTO 10
                    ... which would make a "wave", as she called it, on the screen. much like AST, i noted that the use of line numbers with space in between them allowed for additional code to be inserted easily. because of this, i made the following adjustment to the code, as the two women looked on with surprise...

                    Code:
                    10 PRINT "0000"
                    20 PRINT " 0000"
                    30 PRINT "  0000"
                    40 PRINT "   0000"
                    45 PRINT "   0000"
                    50 PRINT "  0000"
                    60 PRINT " 0000"
                    70 PRINT "0000"
                    75 PRINT "0000"
                    80 GOTO 10
                    ... my mom recounts me explaining to the babysitter that this would make the wave look "more curved" but what i was attempting to convey was the fact that it would appear smoother if one were to double-up the printed zeros at each crest and valley.

                    i can recall tinkering with this code for a good while longer that evening, even after my parents went out to dinner or the theater or wherever they were headed. i remember that i experimented with even deeper and more sinusoidal curves (not like i would have any idea what "sinusoidal" was at the age of 6 or 7) by doing things like this...
                    Code:
                    10 PRINT "0000"
                    20 PRINT " 0000"
                    30 PRINT " 0000"
                    40 PRINT "  0000"
                    50 PRINT "   0000"
                    60 PRINT "   0000"
                    70 PRINT "    0000"
                    80 PRINT "    0000"
                    90 PRINT "    0000"
                    100 PRINT "   0000"
                    110 PRINT "   0000"
                    120 PRINT "  0000"
                    130 PRINT " 0000"
                    140 PRINT " 0000"
                    150 PRINT "0000"
                    160 PRINT "0000"
                    170 GOTO 10
                    ... in the process learning that it was hard to get the zeros to line up in a pleasing visual way as i was writing the code once the line numbers jumped from 2- to 3-digit numbers. so i started adding leading spaces to the lines and the interpreter didn't seem to mind...

                    Code:
                     10 PRINT "0000"
                     20 PRINT " 0000"
                     30 PRINT " 0000"
                     40 PRINT "  0000"
                     50 PRINT "   0000"
                     60 PRINT "   0000"
                     70 PRINT "    0000"
                     80 PRINT "    0000"
                     90 PRINT "    0000"
                    100 PRINT "   0000"
                    110 PRINT "   0000"
                    120 PRINT "  0000"
                    130 PRINT " 0000"
                    140 PRINT " 0000"
                    150 PRINT "0000"
                    160 PRINT "0000"
                    170 GOTO 10
                    ... and ultimately what stopped me that evening was i began to become frustrated by the screen's refresh rate, or rather the rate at which the computer could print each line to the screen if i started to make the lines too "long" like this...
                    Code:
                     10 PRINT "0000"
                     20 PRINT " 0000"
                     30 PRINT "  0000"
                     40 PRINT "   0000"
                     50 PRINT "    0000"
                     60 PRINT "     0000"
                     70 PRINT "      0000"
                     80 PRINT "       0000"
                     90 PRINT "        0000"
                    100 PRINT "         0000"
                    110 PRINT "          0000"
                    120 PRINT "           0000"
                    130 PRINT "            0000"
                    140 PRINT "             0000"
                    150 PRINT "              0000"
                    160 PRINT "               0000"
                    170 PRINT "                0000"
                    180 PRINT "0                 000"
                    190 PRINT "00                  00"
                    200 PRINT "000                   0"
                    210 GOTO 10
                    ...as the lines got "wider" it would run more slowly and not flow as smoothly on the screen. i don't believe it occurred to me that evening to try adding blank spaces after the zeros further up in the program, so that the screen would print each line at the same speed.

                    instead, i played some TI-Invaders and then went to do some important LEGO work that i had been putting off or something.
                    "I'll admit I had an OiNK account and frequented it quite often… What made OiNK a great place was that it was like the world's greatest record store… iTunes kind of feels like Sam Goody to me. I don't feel cool when I go there. I'm tired of seeing John Mayer's face pop up. I feel like I'm being hustled when I visit there, and I don't think their product is that great. DRM, low bit rate, etc... OiNK it existed because it filled a void of what people want."
                    - Trent Reznor

                    Comment


                    • #11
                      Re: Do you remember your first bit of code?

                      I remember the first time I started to program, but not the first program that I wrote.

                      Way back in the day on my computer I had 2 games, Gorilla and Snake both written in QBASIC. One day for no apparent reason Snake quit loading and it would just say Syntax error. Back then with my age and limited resources it took me close to a month to figure out what the hell Syntax error meant.

                      Once I learned what it meant it only took me a couple of hours to fix the code.

                      If I get bored later maybe I will go look up the code again and find what I had to change to get it to work again.
                      There are techs that solve problems and there are techs that call other techs to solve problems.
                      Which one are you?

                      Comment


                      • #12
                        Re: Do you remember your first bit of code?

                        This was my first introduction to programming. It was built into a very awesome "Tour of the Apple IIGS" which was a program that taught people who had never used a computer before how to use one. It also included an introduction to programming:

                        http://imgur.com/a/jBLVd

                        Looking back it seems pretty remarkable. I don't think there's anything else quite like it today.
                        45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B0
                        45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B1
                        [ redacted ]

                        Comment


                        • #13
                          Re: Do you remember your first bit of code?

                          did some bbs vga loaders in asm back in the day
                          e: chris at lod.com

                          Comment


                          • #14
                            Re: Do you remember your first bit of code?

                            Arg. More nostalgia.

                            My two favorite early code memories... One was a game I wrote for the T/S1000 called "Viper" (BSG old skool). Can you imagine trying to do animation with the sprites available on a T/S1000? I had the 16k wibbly-wobbly "touch it you die" RAM pack, so I had more than enough memory for stuff like that. (That's supposed to be funny) Something like leave the Galactica, avoid an asteroid, shoot down a Cylon fuel tanker. Phun.

                            Another favorite was a something for my VIC20 that went through "random" tones and colors. I would crank the brightness and fiddle with the contrast on the old color TV I had, the changing screen colors were bright enough to light up my room. To this day I love pseudo-random synth music and flashing lights. I'm not sure if it's because of the resemblance of this piece of code to a techno dance club or because cranking the brightness up so high on that old TV irradiated my head.

                            I need to dig up my T/S1000 and see if it is still alive. I put it in a hideous white aluminum box with a surplus keyboard from RADio sHACK. It was ugly, but I had a "real keyboard" instead of the membrane thing. I think spending an entire weekend cutting out the top of the box with nibblers and painstakingly copying the membrane keyboard matrix to the "real keyboard" were early indicators that I was bound to be more of a hardware hacker...
                            Last edited by FirmWarez; August 20, 2012, 15:55. Reason: Incorrectly placed / Don't you hate it when that happens?
                            TSA luvs my Uzi.

                            "We shall not cease from exploration. And the end of all our exploring will be to arrive where we started, and know the place for the first time." -T.S. Eliot

                            Comment


                            • #15
                              Re: Do you remember your first bit of code?

                              I can't recall the actual first line of code I wrote, but it would have have been BASIC, and it would have been written in 1971. The computer was a Xerox Sigma 6 mainframe at the local university. Access was via an attache-case terminal, which used an acoustic-couple modem running at a whopping 110 baud. The input was a QWERTY keyboard, and the output was a thermal printer.
                              Last edited by Thorn; August 22, 2012, 19:28. Reason: typo
                              Thorn
                              "If you can't be a good example, then you'll just have to be a horrible warning." - Catherine Aird

                              Comment

                              Working...
                              X