DEV Community

Cover image for Remembering Why We Code: Dropping AI for Fundamental Learning
Anna Villarreal
Anna Villarreal Subscriber Community Curator

Posted on

Remembering Why We Code: Dropping AI for Fundamental Learning

The rewarding rush of manual problem-solving

Excitement

I wanted to share my excitement of forcing myself to build without using AI.

I would say I've been learning to code semi-consistently for roughly 3 years. Most recently, I started a class called Java 2. It builds on foundational concepts learned in the previous class. I feel I might be spread a bit thin, dabbling over here in Ruby, dabbling over there in Python, and then poking around at Java on Sunday afternoon. Good thing they share the overarching concepts or it would be utter confusion. ¯(°_o)/¯

As many of us have been leaning heavily into AI to build amazing things at lightspeed, I made the conscious decision to not open a single AI tool as I power through the first assignment of the class. I said to myself "No, I'm going to struggle because I want to understand." And I can tell you, after using AI constantly, this was a wakeup call to the real rewards that exist when you stop relying on AI.

I did google a few things, but that is allowed if you ask me. This is the internet, after all.

bird is the word

peter griffin bird is the word


Getting Things to Click Again

At some point in my assignment things started clicking again. That was an amazing moment. A class can have methods, we can call those in the main function, I can nest switch statements for nested menus, and I can debug in real life with minimal resources! Twice I got stuck, and twice I came out the other sided with that excited "**** yes, it's working!" moment - a feeling I have been missing for some time. The feeling that you struggled and powered through it and figured out what was seemingly impossible by yourself.

Here is the sub-menu I built today with a nested switch statement.

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

// Runs a console program that lets the user add and analyze texts,
// then stores and prints the texts entered during the session.
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        List<String> texts = new ArrayList<>();
        boolean running = true;

        System.out.println(" --------------------------------");
        System.out.println("|      Paragraph Parser         |");
        System.out.println(" --------------------------------");
        System.out.println();


        while (running) {
            System.out.println("1. General Text Analysis");
            System.out.println("2. Do a specific text analysis");
            System.out.println("3. Display Texts");
            System.out.println("4. Exit");

            int choice = readInt(scanner, "Choose an option: ");

            switch (choice) {
                case 1:
                    Text analysisResult = displayText(scanner, "Add text to analyze:\n");
                    System.out.println(analysisResult);
                    break;
                case 2:
                    // nested switch for sub-menu text analysis tools
                    Scanner scannerNestedScanner = new Scanner(System.in);
                    boolean extraTestRunning = true;

                    while (extraTestRunning) {
                        System.out.println("1. Word frequency finder");
                        System.out.println("2. Find frequency of specific character");
                        System.out.println("3. Find the number of unique words");
                        System.out.println("4. Return to main menu");

                        int extraChoice = readInt(scannerNestedScanner, "Choose text analysis tool (Enter number): ");
                    switch (extraChoice) {
                        case 1:
                            WordFrequency wordFrequency = new WordFrequency(displayText(scannerNestedScanner, "Enter the text to search through:\n").content.toLowerCase());
                            String wordToFind = displayText(scannerNestedScanner, "Enter the word to find its frequency:\n").content;
                            wordToFind = wordToFind.replaceAll("\\p{Punct}+", "");
                            //strip punctuation so it doesn't affect the word frequency count
                            System.out.println("Word frequency analysis for: " +wordToFind+ " -> " + wordFrequency.findWordFrequency(wordToFind));
                            break;
                        case 2:
                            CharacterFrequency charFrequency = new CharacterFrequency(displayText(scannerNestedScanner, "Enter the text to analyze:\n").content);
                            System.out.println("Character frequency analysis for: " + charFrequency.getCharacterFrequencyCount(displayText(scannerNestedScanner, "Which character are we looking for? Enter a character:\n").content.charAt(0)));
                            // Add your extra test logic here
                            break;
                        case 3:
                            UniqueWords uniqueWords = new UniqueWords(displayText(scannerNestedScanner, "Add text to count unique words:\n").content);
                            System.out.println("Number of unique words: " + uniqueWords.getUniqueWordCount());
                            break;
                        case 4:
                            extraTestRunning = false;
                            break;
                        default:
                            System.out.println("Invalid option for extra test.");
                        }
                    }
                    break; // Add this break to prevent fall-through from case 2 to case 3 in the main switch.

                case 3:
                    System.out.println();
                    displayTexts(texts);
                    break;
                case 4:
                    running = false;
                    break;
                    // Fall through to default case if needed.
                default:
                    System.out.println("Invalid option. Please try again.");
            }
        }

        System.out.println("\nFinal text list:");
        displayTexts(texts);
        scanner.close();
    }
Enter fullscreen mode Exit fullscreen mode

I discovered that having nested switch statements is both doable and useful. I heard somewhere that this is often used in games and it's nice to have an understanding of how one might incorporate that.

Guys I seriously encourage you, put down the AI just for a few hours and fight with something. Your old self, those feelings you have been missing, they will return! Instant youth, almost guaranteed. XD

Tell me, what have you recently challenged yourself to build without using AI?

Top comments (8)

Collapse
 
mk023 profile image
Marco

This one landed at exactly the right time for me. 😄

I've been thinking about almost the same problem recently. I use AI heavily in my engineering work, and it is incredibly powerful for building, exploring architectures and moving quickly, but I realized that speed can hide a very different question: could I still reconstruct the reasoning myself?

So I've started deliberately separating "building mode" from "learning mode". In learning mode I want the friction back: documentation, writing the code, getting stuck, debugging, and understanding why something works before asking AI to solve it for me.

I really like that you also distinguish this from simply searching the web. Looking something up still leaves the assembly of the solution in your hands. Having an AI produce the whole path can remove exactly the struggle that makes the concept stick.

And yes, that moment when something finally clicks after fighting with it for a while is completely different. 😂

I don't think the lesson is to stop using AI. For me it is becoming more about knowing when AI is accelerating work and when it is accidentally accelerating past the learning.

Really enjoyed this, Anna. 👏

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

Thank you for your perspective! I like that you have created space with learning mode to keep your skills sharp.

Collapse
 
redhabenkortbi profile image
ReDhaBenKortbi

Same thing I did a week ago! I went through all fundamentals and told myself we never going to use AI. Now I am writing code myself and figuring out things when Im stuck by googling or reading docs !

I started to feel the “Yes, that is the solution” again!

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

Such a great, human-needed feeling!

Collapse
 
viniseven profile image
Marcus Vinícius

AI has brought immense speed and abstraction to programming, leading many people to overlook complexities—the very things that make the learning journey and the day-to-day practice of coding both challenging and rewarding, whether you are creating simple things or complex systems that can be used to make a real-world impact.

Even with the AI boom, I still write all my code completely by hand, which gives me the freedom to structure my overall code and the entire project architecture my own way. Right now, I use AI mainly as a fast, intelligent documentation lookup—and actually a bit more than that, as a tool to help me interpret errors and suggest fixes, without taking away my ability to structure and solve the core problem myself.

I intend to rely more heavily on it in the future, but only once I've built a moderately solid foundation and gained enough hands-on experience developing solutions by hand.

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

I think the only way to grow is to actually sit with the code and think about what its doing. I couldnt imagine someone taking on a senior developer position one day, or any developer position really, having done nothing but vibe code up to that point. There is a vastly widening knowledge gap in my opinion. They say ai writes all the basic code now, well in order to get to that higher level, you have to know how code works and what it does and what its limitations are. Else, impending doom. There is alot to say about this, and I admire your passion.

Collapse
 
codingwithjiro profile image
Elmar Chavez

I had fun reading your article and I completely agree. Sometimes doing even the basic projects without AI at all reinforces us in a way that makes more dependable in the long run. Build small but foundational concepts, when things get big, the only thing you'll just have to learn is how to connect them.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.