Learning to Program for the First Time: Memorised Code, a Hot Head, and a Laptop That Gave Up

Table of Contents
Reading Progress
0%

On the first day of bootcamp, the instructor wrote one line on the whiteboard:

console.log("Hello World");

I typed it carefully, letter by letter, and pressed Enter. What appeared was not a greeting but red text: SyntaxError: Unexpected token '}'.

I sat there for a moment, then raised my hand and asked whether my laptop was broken. The whole room turned around. The instructor walked over, looked at the screen for three seconds, deleted a closing curly brace I had added at the end for no reason, and said: “There. Now it runs.”

Those twelve weeks changed how I think, and I do not want to make it sound cooler than it was. For the first three months of learning to program, I was not learning to understand. I was memorising. And it worked, right up until the exam question changed by one sentence.

Twelve weeks, twenty-four people, one badly air-conditioned room

My bootcamp ran five days a week, nine in the morning to five in the afternoon, twelve weeks in total. There were twenty-four of us from wildly different backgrounds: an accounting graduate, a teacher, a bank employee, one former barista, and me.

My laptop was not a programming laptop. Intel Core i5, fourth generation, 8 GB of RAM, and a 5400 rpm mechanical hard drive. The battery had to stay plugged in. I had no idea those numbers would become one of the main characters in this story.

The first week felt like a foreign language that happened to use Latin letters. int, String, void, public static. Every word had a meaning, but strung together into a sentence, all I could do was nod politely.

The instructor said one thing I wrote on the first page of my notebook: “Programming is not memorisation. If you memorise, you will stop at the first question that is different.”

I wrote it down. I did not understand it for another two years.

Three hours for one misplaced curly brace

My first mistake was not a grand concept. It was punctuation.

The day-two assignment: write a program that takes a number and prints whether it is odd or even. I wrote something like this:

int angka = 7;

if (angka % 2 == 0) {
    System.out.println("genap");
} else {
    System.out.println("ganjil");

It would not run. The message was ';' expected. I read it line by line, added semicolons in places that did not need them, and got a new error. I spent three hours on a single missing closing curly brace.

What annoyed me was not the time. What annoyed me was that I did not know how to find out. I did not know error messages carried line numbers. I did not know I was allowed to delete half the code to see which half was broken. I thought reading someone else’s code was cheating.

The first lesson that actually stuck: the computer is not angry at you, it is just honest to the point of being annoying. If one symbol is missing, it stops. It does not guess what you meant.

Memorising code, because it felt like progress fastest

By week three I had found a shortcut. I memorised snippets.

I kept about thirty of them in my notes: how to write a for loop, how to write if-else, how to show a Toast in Android, how to set up a RecyclerView, how to read input, how to change a button’s colour. Assignments started getting finished. My grades went up. I felt smart.

The table below is what “smart” actually looked like for me at the time.

What I memorised What I should have understood
The shape of for (int i = 0; i < n; i++) When the loop stops, and why i < n and not i <= n
A RecyclerView.Adapter copied from the previous assignment Why data should be separate from the view
An onClick block I pasted at the end every time The order code actually runs when a button is pressed
Error messages I avoided What those errors were actually telling me

The consequence showed up in week five, when the assignment changed slightly. The instructor asked for the list to be displayed in reverse. I had working code. I had all the right snippets. And I still could not finish it. I spent two hours poking at the for loop without knowing what I was changing.

Memorising is like memorising a recipe without knowing why the salt goes in after the water boils. As long as the recipe is the same, the result is the same. The moment the kitchen changes, everything fails.

A hot head: forty logic questions a week

Every Friday there was a logic quiz. Ten questions, ninety minutes, no internet. The questions had nothing to do with Android. They were star patterns, number sequences, prime numbers, and “print a triangle like this”.

For someone used to it, a star pattern is a five-minute exercise. For me, it was ninety minutes staring at a screen.

I remember one question: print a right-angled triangle of stars, seven rows tall. I knew the answer needed two loops. I knew the outer one handled rows. But I could not connect “row three has three stars” to the code I was supposed to write. I typed, deleted, typed again, and by minute forty my temples were genuinely hot. Not a figure of speech. I opened a window, washed my face, came back to my chair, and still did not get it.

My first quiz score was 40 out of 100.

What eventually helped was not another video tutorial. What helped was to stop staring at the screen and start writing on paper:

  1. Write what is being asked, in plain language. “Seven rows. First row has one star. Last row has seven stars.”
  2. Write the steps as a list. “For each row from 1 to 7: print as many stars as the row number, then move to the next line.”
  3. Only then translate each step into one line of code.
for (int baris = 1; baris <= 7; baris++) {
    for (int bintang = 1; bintang <= baris; bintang++) {
        System.out.print("*");
    }
    System.out.println();
}

The code is short. The long part is the process of getting there. Once I could describe the logic in my own sentences, the code almost always followed.

My head still got hot in the next quiz, but the score went up to 70. Not because I had become smarter, but because I had stopped trying to recall the answer and started trying to explain the question.

Up late: a 23:59 deadline that always became 2:30

Assignments were submitted through a system, and the deadline was 23:59. Over three months, I think I submitted before ten in the evening two or three times.

My daily rhythm: class ended at five, I went home, slept for an hour because my head could no longer think, woke up, ate, then sat down again from eight at night until two or half past two in the morning. Four to five hours of sleep. Repeat the next day.

At first I was proud of it. Staying up felt like proof of commitment. Slowly I noticed a bigger problem than the tiredness: code I wrote at three in the morning almost always had a bug I could not find until the next afternoon, and the bug was usually stupid.

One night I spent six hours on a feature that would not save data. I suspected the database, I suspected the adapter, I suspected a library. The next morning a classmate looked at my code for ten seconds and pointed at one line:

if (status = 1) {   // should be ==
    simpan();
}

One equals sign. Six hours.

Since then I have had a simple rule: if a bug has gone past forty-five minutes and I am starting to feel angry at the computer, I stop. Close the laptop. Sleep. The same bug usually takes ten minutes after I wake up. Not because sleep made me smarter, but because I stopped repeating the same way of thinking.

The laptop gave up before I did

This is the part I tell most often to people about to join a bootcamp, because it is rarely in the syllabus.

My bootcamp focused on Android. The main tool was Android Studio, plus an emulator to run the app. With 8 GB of RAM and a mechanical drive, opening Android Studio meant closing every other app. Chrome, Spotify, even the file explorer.

The numbers I still remember: while Gradle was syncing and indexing, RAM usage sat around 7.2 GB out of 8. The rest went to swap on the hard drive, and the entire laptop crawled. A single build to change one button’s colour took 6 minutes 40 seconds. The emulator needed another 3 minutes to be ready.

My laptop froze about three times a day. The worst one came in week eight: mid-build, the screen stopped completely. The mouse would not move, the fan was screaming, and nothing responded. I waited ten minutes, then held the power button. When it booted again, the project would not build. The .idea folder was corrupted, and I had to set everything up from scratch.

That night I learned two things. First, backing up a project is not a luxury. Second, performance problems are not always about my code — sometimes the machine genuinely cannot keep up, and the answer is not to push harder but to change how you work.

What I did after that:

  • Ran the app on a physical phone instead of the emulator. Builds were still slow, but at least two heavy processes were not running at once.
  • Turned off what I did not need: Instant Run, unused plugins, and the pile of browser tabs.
  • Committed to Git every time a small feature was done, not once at the end of an assignment.
  • Built once, then edited as needed, instead of hitting run after every one-line change.

None of that taught me a programming concept. All of it taught the same thing: when your tools are limited, your work has to be more deliberate.

JavaScript: the language that made me feel stupid again

After Android, the material moved to JavaScript for the web. I assumed it would be easier without a build step and an emulator. It turned out JavaScript has its own ways of making a beginner feel stupid.

The first surprise:

console.log(0 == '');      // true
console.log(0 === '');     // false
console.log(null == undefined); // true

I read that output several times. How can the number zero equal an empty string? The answer lives in loose type coercion rules, and at the time I did not have the vocabulary to understand it. All I took away was something practical: use ===, not ==, and do not trust comparisons that look strange.

The second surprise was code that ran in a different order from the way I read it. A function called before it was defined still worked. A variable that had not been assigned was undefined, not an error. Callbacks made me write code indented so far right it no longer fit on screen.

What saved me in JavaScript was not a thick book, but the habit of printing everything:

const angka = [1, 2, 3, 4];
console.log(angka.map(n => n * 2));       // [2, 4, 6, 8]
console.log(angka.filter(n => n % 2 === 0)); // [2, 4]

I used to memorise map and filter snippets without knowing the difference. After I printed the results myself and changed the input, it finally clicked: map transforms every item, filter selects some items. That sounds trivial. For me at the time, it was the turning point.

Flutter: the first time it felt fun

Three months after the bootcamp ended, I learned Flutter on my own. It was the first time learning to program felt enjoyable rather than tense.

The reason was simple: hot reload. I changed a colour, saved, and one second later the screen updated without losing state. After years of waiting on Gradle, one second felt like magic.

But Flutter also reminded me that changing languages does not remove the thinking problem. In Flutter everything is a widget, and widgets nest inside widgets. At first I wrote a single 600-line file because everything lived in one place. When the screen started changing on its own for no reason, I finally understood why people separate state from the view.

class CounterPage extends StatefulWidget {
  const CounterPage({super.key});

  @override
  State<CounterPage> createState() => _CounterPageState();
}

class _CounterPageState extends State<CounterPage> {
  int _count = 0;

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Text('$_count'),
        ElevatedButton(
          onPressed: () => setState(() => _count++),
          child: const Text('Tambah'),
        ),
      ],
    );
  }
}

setState is simple: tell Flutter that some data changed, and Flutter redraws the part that needs it. But I needed a few small apps before I actually believed that was enough, and before I accepted that most of my bugs were not Flutter bugs but state stored in the wrong place.

Go: the language that made me stop memorising

Two years later, I started working and writing Go. If I had known earlier, I might have learned Go first for a strange reason: Go is too small to memorise.

The syntax is tiny. There are not five ways to write a loop. There is no magic. The official formatter (gofmt) shapes everyone’s code the same way, so there are no style debates burning your energy.

What changed how I learn were two small things: an unused variable makes the build fail, and errors are values you have to handle, not something you throw upward and forget.

angka, err := strconv.Atoi(input)
if err != nil {
    return fmt.Errorf("input bukan angka: %w", err)
}

In Java and JavaScript I could write half-finished code that still ran and failed later. In Go I could not. The compiler refused. At first it was annoying. A few months in, I noticed the effect: I had started reading my own code as a whole instead of pasting pieces until it ran.

That was when I genuinely stopped memorising. Not because I resolved to, but because the language left no room for it.

What actually changed

If I boil it down, five things changed about how I learn, and none of them came from a new tutorial.

  1. I read the error to the end. File name, line number, error type. I used to close it immediately and guess. Now reading the error is step one, not an admission of defeat.
  2. I built small projects I actually used. A simple notes app, a water reminder, an expense counter. Three screens, no database. Small projects teach what assignments do not: deciding for yourself.
  3. I rewrote code without looking. After finishing a feature, I closed the example and wrote it again from scratch. If I could not, I was still memorising.
  4. I stopped treating all-nighters as effort. Enough sleep makes debugging faster. That is not motivation talk, it is an observation from years of debugging my own bugs.
  5. I asked other people to read my code. Not for a grade, but to see which parts I explained confidently while being wrong.

If you are just starting

I am not going to say “anyone can code” and leave it there, because that sentence is useless when you are stuck for three hours on one curly brace.

But here are a few things I wish someone had told me in week one:

  • Being confused is part of the process, not a sign you lack talent. What is dangerous is being confused and pretending to understand.
  • Memorising code early on is not a sin. It is a foothold. The mistake is stopping there.
  • Struggling to read other people’s code is normal. Read one function, not one repository.
  • A slow laptop is not a reason to quit, but it is also not something to fight with all-nighters. Adapt how you work to the tools you have.
  • If a problem has taken an hour and you are repeating the same approach, stop. Rewrite the question on paper, or ask.

Closing

These days, when I write Go or Flutter, I still forget function names and have to open the docs. The difference is that I no longer panic. I know what I need is not memory, but the ability to break a problem into small steps I can test one at a time.

The i5 laptop with 8 GB of RAM is gone. The bootcamp ended years ago. But to this day, whenever I see a red error message, I still remember the heat in my temples and one misplaced curly brace on day two.

And I am still grateful to the instructor who deleted it without laughing.

Comments

comments powered by Disqus