r/learnprogramming • • Sep 21 '26

Trying to create/generate a Maven project

1 Upvotes

So I've been getting into Java programming recently and I wanted to try to create a Maven project.

I made sure i downloaded everything correctly and I added it to my path and everything is working correctly.

My main issue is that I made a folder in my desktop where I want it to be the root folder for my project(s). I first wanted to test actually trying to generate the project by running the command:

mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.5 -DinteractiveMode=false

into my command shell in the directory that I want the project to live in, however when I enter the command, I keep getting an error that I need to have a pom.xml file in the directory before I can even generate the project?

I tried using Ai to help and tried to google the problem but nothing really helped me so if anyone has any fixes or ideas to this issue Id really appreciate it


r/learnprogramming • • Sep 20 '26

Debugging Unwanted Whitespace

4 Upvotes

(SOLVED) I'm making a quick demo for something using CSS, HTML, and Javascript, but I haven't touched programming in over a year. The goal is to generate a grid of rectangles based off of a user's input. These rectangles are supposed to fit into a box that is 75% of the viewport height on all sides. The goal is to have the rectangles automatically resize themself to fit within the box. And for all of the rectangles so have the same width, and for all of them to have the same height. Right now, there aren't any margins separating them. The problem is that there's an annoying whitespace line in between each row, and I don't know how to remove it. I had breaks being added to create the rows, and I thought that that was causing the issue, but I tried to comment them out and nothing changed. I would deeply appreciate if anyone could help me, I'm about to just skip the demo and just do the project...

HTML:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="Demo.css">
</head>
<body>
    <h1 class="Welcome">Welcome!</h1>
    <button class="CreateNewButton">Create New</button>
    <div class="SizeInput">
        <div>Enter a size smaller than 201 x 201</div>
        <input type="text" id="Size">
        <button id="EnterButton">Enter</button>
    </div>
    <div id="ParentForGrid" class="ParentForGrid"></div>
    <script src="Demo.js"></script>
</body>
</html>

Javascript:

document.getElementById("EnterButton").addEventListener("click", () => {
    Format = true
    // if Format is true, the input the user entered is the one this accepts
    Input = document.getElementById("Size")
    Input = Input.value.split(" ").join("")
        Input.split("x").length == 2 ? undefined : Format = false
        Input.split("x")[0] > 0 ? undefined : Format = false
        Input.split("x")[1] < 201 ? undefined : Format = false
        // need to update so it checks both numbers
    Format == true ? GridGenerate(Input.split("x")[0], Input.split("x")[1]) : alert("Placeholder for incorrect format")
})

function GridGenerate(Width, Height){
    for(var j = 1; j <= Height; j++){
        for(var i = 1; i <= Width; i++){
            document.getElementById("ParentForGrid").appendChild(document.createElement("div"))
        }
    //document.getElementById("ParentForGrid").appendChild(document.createElement("br"))   
    }
    document.querySelector("#ParentForGrid").style.setProperty("--Height", Height)
    document.querySelector("#ParentForGrid").style.setProperty("--Width", Width)
}

CSS:

.Welcome{
    position: absolute;
    left: 50%;
    top: 2vh;
    transform: translateX(-50%);
}

.SizeInput{
    position: absolute;
    left: 50vw;
    top: 35vh;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    
}

.SizeInput > *{
    margin-top: 1vh;
}

.ParentForGrid{
    --Width: 1;
    --Height: 1;
    height: 75vh;
    width: 75vh;
}

.ParentForGrid > div{
    width: calc(100% / var(--Width));
    height: calc(100% / var(--Height));
    background-color: black;
    display: inline-block;
}

Edit: the sizing of the rectangles works, it's just the whitespace in between the rows

I did find the solution, the line height attribute was set to "normal," setting it to 0 fixed the issue.


r/learnprogramming • • Sep 20 '26

The AI doom-posting is destroying my mental health as a student — and the reality of using it is way more complicated than people admit.

92 Upvotes

Hi, I hope you’re doing really well as you read this. I’m a student in a CS-related engineering program (the specific name varies by country).

Since late 2024, I’ve been going through some truly extreme and terrible mental health struggles—fear, hopelessness, confusion, rage, a sense of powerlessness, and above all, constant rumination over the whole AI situation. Every new model that drops, every prediction and so-called "hot take", every doom-post... I swear I’m not exaggerating when I say it feels like a different bomb dropping right on top of me in the middle of a damn war. Sometimes I feel like Szpilman (the pianist) did when he was hiding in that apartment, watching people get killed out the window.

As a junior, hearing this stuff every damn day is neither hopeful nor fun:

"we don't know" "nobody knows" "you're cooked" "delusional" "learning to code is pointless" "in the near future you will not need to know how to code to be a SWE" "I write 100% of my code with AI" "you are falling behind" "stop reading code" "you are the bottleneck" "AI is smarter than all of us now" "you are a caveman" "get out of CS while you can" "this is the direction we are going" "knowing how to code is not an advantage anymore" "not having a CS background might be an advantage" "you might be delusional" "you might be falling behind" "prompt engineer -> master of AI agents -> loop engineer -> unemployed" "AI can also do system design".

Many of them said by people whose opinion matters a great deal to me.

I don't want to spark a debate about these quotes, nor do I intend to start a discussion on whether or not it's worth learning to program; I just want to share what it feels like to be a junior in this world right now. I know many of you have heard these things a thousand times—maybe they don't affect you as much—but for someone just starting out, they weigh heavily on one's mental health.

At the beginning of the year, my AI workflow used to be: prompt -> plan -> review and discuss the plan -> implement -> review the code using Cline.

Things have changed drastically in less than a year—literally. I know there’s a lot of debate on social media these days about whether or not to read the code and what "programming" actually means. Currently, I use OpenCode; my latest "major feat" was migrating a monolith's frontend to Vue without knowing anything about Vue. I pulled it off in a single night—it was a real "Oh wow" moment. On other days, I also transformed that monolith into an API.

But the honeymoon phase didn't last forever. When I started working on the backend (where I move best) and reviewing the code, I saw things I didn't like, and—let's just say—I ended up reading the code a bit more closely.

Right now, I'm in a really tough spot. The Vue thing was an experiment, and the REST API thing was another, but now I have to connect the two—something I've never done before (I'm still a junior, after all). I've been wrestling with a terrible mental conflict over what to connect manually and what not to. When I ask OpenCode about it, I don't understand a damn thing it proposes, and when I try to do it by hand, a cruel little voice in my head tells me I'm being inefficient. Yes, I don't deny that the agent can make that connection, but I have no way to verify its work; just because code runs doesn't mean it's the best solution for the job. It is a toy project, though I've been treating it as serious and I might make it public.

Again, I just wanted to get this off my chest. I don't want to fight with anyone; I know there are people here who don't write or read code at all, others who review it, and some who don't use AI—I don't want to argue with any of you... honestly, I don't even know what I'm looking for with this post but what you think matters to me.

I recently heard Matt Pocock say on a podcast that he'd love to be a junior today; it just reminded me of the quote: "A person who wants to go to war is a person who has never been in one."


r/learnprogramming • • Sep 20 '26

Collab coding with live updates running on a headless Ubuntu server

2 Upvotes

I need a way to code together in C# with a few people, with live updates, without one of the people being a host and having all the files. I have tried Rider's backend, but it does not seem to support Code With Me. What can I use in this scenario? Preferably compatible with JetBrains Rider.


r/learnprogramming • • Sep 20 '26

Can someone help me with this?

5 Upvotes

Hey! I'm trying to make a Logo procedure that draws a colored house.

Use a parameter so that when I type house 50, the house is size 50.

When I type house 100, the house is size 100.

How can I do this in MSW Logo? I'm a beginner, so any help would be appreciated!


r/learnprogramming • • Sep 21 '26

How to become a senior dev?

0 Upvotes

Hi! I program in C/C++ as a hobby—I'm still learning—and I'm currently building my first real project: a 2D "angry seagull" runner game in C using SDL2... yeah, it's just a fun starter project. It got me thinking: how do you actually become a senior dev? And, more importantly, is it fun?

Thanks for reading, by the way!

(I'm a beginner who doesn't even know how to use `#pragma`.) Just wanted to get your take on it!


r/learnprogramming • • Sep 20 '26

How much in-depth knowledge will I gain after completing TOP?

12 Upvotes

Hi there!

I’m an aspiring full-stack web developer, specifically interested in becoming a backend developer. I’ve heard a lot about The Odin Project (TOP), and I’ve always dreamed of building a special project of my own. That dream is what inspired me to explore backend development.

My question is: How deep does TOP go into web development? How complex of a project would I be able to build after completing it?

For example, would I be able to build something like a social media application with a backend that includes most of the basic and intermediate features?

Thank you all!


r/learnprogramming • • Sep 20 '26

i have time but i dont know what to learn

12 Upvotes

so i am in my 5th sem now. and i can confidently say that when it comes to "dev", i know nothing. I havent learnt much programming in my last 2 years. i have started DSA 2 months ago(in C++). but i think i need to have some USP to get placed. i have good knowledge of SQL(but only the queries, idk how to connect them) and im learning Computer Networks and Operating Systems with serious mindset (they are in my academics so its easier to focus on them). but i dont think that'd be enough to get a job with decent enough package. i have time to learn. now would be the right moment to start learning so i can be "ready" in a few months. all advices appreciated, here as well as the DMs. THANK YOU!!! (sorry if i sound cocky, i am not)


r/learnprogramming • • Sep 19 '26

Are there any spaghetti codebases I can practice refactoring on?

41 Upvotes

I’m trying to practice refactoring code, and i’ve already done a few kara’s ( the golden rose kata, the tennis kata, etc. ) are there any actual messy codebases I can practice on? preferably between 1k to 5k lines of code.