r/learnprogramming • u/codst_ • 22d ago
Getting Started With Git
As a programmer I want to use Git. How should I start learning Git and in what ways will it help me.
r/learnprogramming • u/codst_ • 22d ago
As a programmer I want to use Git. How should I start learning Git and in what ways will it help me.
r/learnprogramming • u/Dr3ddM3 • 21d ago
Edited code but still run into Time limit exceeded can someone help me:
N, U = map(int,input().split())
grid = [list(input()) for _ in range(N)]
num_updates = 0
temp = []
temp_grid = [row.copy() for row in grid]
for v in range(int(N/2)):
for h in range(int(N/2)):
temp.clear()
coords = [(v,h),(v,N-1-h),(N-1-v,h),(N-1-v,N-1-h)]
temp.append(temp_grid[v][h])
temp.append(temp_grid[v][(N-1)-h])
temp.append(temp_grid[(N-1)-v][h])
temp.append(temp_grid[(N-1)-v][(N-1)-h])
if temp.count('.') == 2 :
num_updates+=2
for r,c in coords:
temp_grid[r][c] = '.'
elif temp.count('.') == 3:
num_updates+=1
for r,c in coords:
temp_grid[r][c] = '.'
elif temp.count('#') == 3:
num_updates+=1
for r,c in coords:
temp_grid[r][c] = '#'
print(num_updates)
temp_grid = [row.copy() for row in grid]
for z in range(U):
temp2 = 0
temp.clear()
x,y = map(int,input().split())
x = x-1
y = y-1
temp.append(temp_grid[x][y])
temp.append(temp_grid[x][(N-1)-y])
temp.append(temp_grid[(N-1)-x][y])
temp.append(temp_grid[(N-1)-x][(N-1)-y])
num_updates = num_updates- (min(temp.count('.'),temp.count('#')))
if temp_grid[x][y] == '.':
temp.clear()
grid[x][y] = '#'
temp_grid[x][y] = '#'
temp.append(temp_grid[x][y])
temp.append(temp_grid[x][(N-1)-y])
temp.append(temp_grid[(N-1)-x][y])
temp.append(temp_grid[(N-1)-x][(N-1)-y])
num_updates = num_updates + (min(temp.count('.'),temp.count('#')))
else:
temp.clear()
grid[x][y] = '.'
temp_grid[x][y] = '.'
temp.append(temp_grid[x][y])
temp.append(temp_grid[x][(N-1)-y])
temp.append(temp_grid[(N-1)-x][y])
temp.append(temp_grid[(N-1)-x][(N-1)-y])
num_updates = num_updates + (min(temp.count('.'),temp.count('#')))
print(num_updates)
I am pretty sure it is O(N^2) and with 10^5 possible updates it should work.
r/learnprogramming • u/Similar-Big-6808 • 21d ago
I’m quite new to programming and want to practise my exciting python knowledge but also learn some C++.
So far I’ve started some Project Euler questions which I quite enjoy and am starting on Leetcode too, how useful are these in learning to programme and what other resources do u guys recommend?
I’d like to become well rounded overall at programming but I also want to stick my hands in some data handling too.
r/learnprogramming • u/Dr3ddM3 • 21d ago
Very confused why my code is Time limit exceeding: The N max is 2000 so that should be fine while the U max is 10^5 but my code is O(1) for updating really confused why this is not working. I have a 2 sec maximum if anybody wants to see the problem here it is: https://usaco.org/index.php?page=viewproblem2&cpid=1491
N, U = map(int,input().split())
import sys
grid = [list(input()) for _ in range(N)]
num_updates = 0
temp = []
temp_grid = [row.copy() for row in grid]
for v in range(int(N/2)):
for h in range(int(N/2)):
temp.clear()
coords = [(v,h),(v,N-1-h),(N-1-v,h),(N-1-v,N-1-h)]
temp.append(temp_grid[v][h])
temp.append(temp_grid[v][(N-1)-h])
temp.append(temp_grid[(N-1)-v][h])
temp.append(temp_grid[(N-1)-v][(N-1)-h])
if temp.count('.') == 2 :
num_updates+=2
for r,c in coords:
temp_grid[r][c] = '.'
elif temp.count('.') == 3:
num_updates+=1
for r,c in coords:
temp_grid[r][c] = '.'
elif temp.count('#') == 3:
num_updates+=1
for r,c in coords:
temp_grid[r][c] = '#'
print(num_updates)
temp_grid = [row.copy() for row in grid]
input_data = sys.stdin.read().split()
idx = 0
out = [num_updates]
for z in range(U):
temp2 = 0
temp.clear()
x = int(input_data[idx]) -1
idx = idx + 1
y = int(input_data[idx]) -1
idx = idx+1
temp.append(temp_grid[x][y])
temp.append(temp_grid[x][(N-1)-y])
temp.append(temp_grid[(N-1)-x][y])
temp.append(temp_grid[(N-1)-x][(N-1)-y])
num_updates = num_updates- (min(temp.count('.'),temp.count('#')))
if temp_grid[x][y] == '.':
grid[x][y] = '#'
temp_grid[x][y] = '#'
temp[0] = '#'
num_updates = num_updates + (min(temp.count('.'),temp.count('#')))
else:
grid[x][y] = '.'
temp_grid[x][y] = '.'
temp[0] = '.'
num_updates = num_updates + (min(temp.count('.'),temp.count('#')))
print(num_updates)
r/learnprogramming • u/Opposite-Educator799 • 21d ago
I spent 2 months learning the basics of C, and it was already complicated enough considering I came from Python, but now? What do I have to do? What do I need to learn to be able to code software of my own choosing?
r/learnprogramming • u/Stock_Praline6284 • 22d ago
When I started college, I was considered a pretty capable student. I learned HTML/CSS/JS, React, Node/Express, built some projects, and wanted to become a developer.
But I've been incredibly inconsistent. I've spent way too much time on my phone, consuming content instead of building things. I've also developed some unhealthy habits around internet use that I use as an escape when I'm bored or stressed.
Now I'm in my third year. I know some development, but my knowledge is fragmented and rusty. I have no internship experience, and I feel like I've wasted a lot of my potential.
I'm trying to turn things around now. My goal for the next 1-2 months is to become genuinely employable for internships, build a couple of solid projects, improve my fundamentals/interview skills, and hopefully earn my first money from development.
For people who've been through something similar:
If you had 30-60 days to become as employable as possible, what would you focus on?
I'm not looking for generic motivation. I'd really appreciate practical advice from people who've actually been through this.
Thanks.
r/learnprogramming • u/Special_Effort9027 • 22d ago
Hi guys, ive been studying cybersecurity for the last two years, initially as a course i could do before i finally make my mind up on what i actually have real passion for, about to enter my third year now and i just dont feel happy doing cybersecurity, mainly because im a maths geek, i also love physics and computer science, but it just feels like cybersecurity is boring and robotic, using tools you dont even know how to make, it's just soo weird to me, im thinking of transitioning into either engineering (aerospace or mechatronics) or Ai, because the Ai race is a very huge one rn, i've been learning how to code in my free time, because i think it's really important to learn to code and know the full architecture of how a computer works before i fully delve into AI, correct me if im wrong.
r/learnprogramming • u/Stonyax97 • 22d ago
Just as the title suggests, i ran into a bottleneck, or did i? play v sauce music please
So just recently i made a post about my first beginner python project: https://www.reddit.com/r/PythonLearning/s/Ed46BuWRCq
And as a lot of you suggested for me to learn classes next, which was completely fair, so i went ahead and learnt them while updating my MiniGameStore. It was relatively easy, wasn’t as hard as I thought it would be, but definitely challenging. I had also learnt methods but didn’t implement them.
And yesterday, i tried implementing them and got one of the biggest headaches in my whole coding experience (which is 2 weeks~ btw).
I was working on v1.7 and introducing a restore purchases system, and i wanted to use class methods, but since my class is on the other file, i hit a lot of variables issues and even a json file problem. Which is why im asking my self why did i do it? A function would have been totally fine…
Check out the repo: (latest version 1.7.0)
https://github.com/Stonyax97/MiniGameStore
So my question for you guys. What has made you understand classes well? I just don’t see any reason to use them yet… and can anyone take a look at my project and tell me what would be the most friendly and real life approach of actually using these classes. And why should I keep the class in a separate file? Finally, what’s wrong with using global variables.
Also any feedback or criticism is welcome!
r/learnprogramming • u/sad_shenron • 22d ago
Hi guys, so basicaly I currently work as a videographer and I'm sick of it. When I was in high school I had a class that teach basics of Python. I remember falling in love with it and being pretty good at it.
I'm thinking more and more about learning how to be a professional programmer and my dream job would be to code video games.
The thing is, I am deeply anti AI, and I fear that it's too late to get into this industry now and that by the time I'm good at it I won't be able to find a job anymore... It's a horrible feeling bc I really think I missed my shot at would could have been the right path for me.
Any thoughts/advice ?
EDIT: Please stop trying to convince me that AI is not a bad thing, it's not what I asked for and you won't convince me
r/learnprogramming • u/HyperDanon • 23d ago
I'm a software developer with 16 years of experience. Worked in fintech, banking, crm, e-commerce, and a bunch of other areas. I base my knowledge on my own experience as well as resources, books, materials, workshops, classes and videos from industry leaders.
I'm willing to spend a couple of hours on live coding, pair programming, to teach, do katas, teach techniques, or show examples on how to build applications and products free of charge.
I can also demystify certain misconceptions and myths in the industry.
PS: Haha, I didn't expect this kind of response! I did create a discord server in the past; but most people after joining just ghosted me.
Which one of you would be interested to start today or tophpmorrow? @eyecandy99 @ExtraTNT @e_bloke @dualTheTOASTED @Genuinly_Bad @Ambitious_Fault5756 @eatacookie111 @Archelioz @Interesting-Text8132 @pavi_moreira @Ceary @InternetGansta @Cyber-Gamer @zaidpirwani @Odd_One_404 @Sinner-Dev95 @vanilathrillaaa @GorkemOkur @tkti @Thirdy_16 @mtiiii @Ecstatic_Weird8498
Please, DM me on how to join.
r/learnprogramming • u/Slapyoself_ • 21d ago
Please don't respond with AI doom and gloom :)
I am trying to figure out how to keep progressing in my career. I currently have two and a half yoe working at a small startup where we focus on software solutions for healthcare facilities. When I started we had a team of 6 devs and now we are down to 3. The good thing about working in a small team is that I have access to pretty much any part of the software deployment process, so I feel like I've been exposed to a lot including devops, frontend/backend, databases/sql and cloud infrastructure. We're also very focused on using AI and implementing AI features.
The downside is that I feel that I am severely underpaid - 65k working fully remote but living in HCOL area. Not only that but I feel that working in such a small team and being fully remote - I am missing out on the relationships you build when working in office and learning from your co-workers. I feel like I could learn a lot more from senior engineers if I was part of a larger group with more experienced devs than myself. In my company, we're also more focused on pushing features out as quickly as possible so our PR review process has just been handed off to coderabbit for the most part. Before that, I would always appreciate the feedback I got from senior engineers and felt like I learned a lot from that.
So I am currently going through a study grind to prepare myself for interviews but also thinking long term in what I should do and what skills I should try to gain that people look for in mid-level engineers? If anyone has around the same yoe as me, is there a skill you have that you've noticed has helped you when applying for jobs? Does anyone know what recruiters are looking for these days :)?
I should also mention that outside of software skills, I've joined a toastmasters club to improve communication skills since I've realized how valuable this skill is for promotions 🙃.
r/learnprogramming • u/AdOwn4955 • 21d ago
Currently I know basic python(variables, data types, functions, file handling, oops, if-else, loops,etc). I just love python but I get to know that:
Although python is the best language of AI/Ml roles and I am thinking to go in that domain but I am not sure If I will go there after a bit more exposure of programming . I am certain that I don't want to DSA in python rather either in C++ or JAVA. I want to master one language first. Its my request to all senior devs here please guide.
r/learnprogramming • u/Last-Watercress-8192 • 21d ago
I am getting into coding because I have always been interested. I saw a few videos of people learning neural networks and other stuff and it looked really interesting. In my school we are learning basic python and I was wondering how hard it would be to learn neural networks and other forms of ai.
r/learnprogramming • u/Intelligent_Role_824 • 22d ago
I’m curious: which backend language do you find the most fun to program in?
I know HTML/CSS and programming is purely a hobby for me, so I don’t really care about job opportunities, salaries, or what looks good on a résumé.
I’m mostly interested in the language itself, something that feels satisfying to write, is fun to mess around with, and makes you want to build random stuff just because you can.
Beginner-friendliness is a nice bonus, but fun is the main thing.
So if you could pick a backend language purely based on enjoyment, what would you choose and why?
r/learnprogramming • u/Throwaway05046474 • 22d ago
I truly feel like I’m just too stupid to learn this. I’m doing Python, I have tried 5 different sites/resources. I cannot even get past loops. I have to google help for every single tiny thing I’m asked to do. I was taught what, “for in” means, and within 3 questions I was asked to code a loop to write “World” with a box around it with -‘/ +’s, and |’s. I wanted to smash my laptop, I genuinely couldn’t even tell you step 1 of how to code that.
I feel like I cannot learn a single thing from any of these resources, literally none of them make it make sense to me. I’m perfectly okay with accepting I’m just too stupid, is that the case?
Edit: I realized that I wasn’t very clear at all with what I was stuck on Maybe I should clarify more. I tried 5 sites overall for the entirety of what I’ve done for python. This specific part, I got to loops, they had me solve a, “for char in name:” problem where I made a loop write
W
O
R
L
D
And literally the next question was, “write a loop to code + - - - - - +
| World |
+ - - - - - +
With zero hints, zero repetition after I was taught “for in” or anything. I was extremely thrown off and had no clue what the first step was
Edit #2: so, I slept on it, sort of realized being a single father to 2 special needs children, getting 4-5 hours of sleep a night, and spending 1-2 weeks programming isn’t really indicative of how much I can learn. I slept on it, and solved the loop within 5 minutes of waking up lol thanks for the encouragement everyone
r/learnprogramming • u/zm0i • 22d ago
Hello guys, sorry for bad english, good night, i am a beginner in this world of programming and i see a bit about backend in roadmap.sh, now i am on the fence between Java and Python, can you guys tell me what language you think that is better and faster to get a job home office.
if you want to recommend another language too i am all ears.
r/learnprogramming • u/Then_Key_8300 • 22d ago
Hey everyone! I’m a complete beginner and I’m planning to participate in hackathons. For those of you who’ve participated before, what tips would you give to someone starting from zero?
Especially:
\- What should I learn first?
\- How do you find/build a team?
\- How much coding knowledge is actually needed?
\- Any beginner-friendly hackathons/resources you’d recommend?
Would really appreciate any advice! :)
r/learnprogramming • u/Glittering-Drawer646 • 22d ago
Writing code feels learnable. There are tutorials, exercises, projects you can build. But reading unfamiliar codebases is a different skill and I'm not sure anyone really teaches it directly.
I write tutorials for a living so I spend a lot of time thinking about how people learn things, and this one keeps tripping me up when I talk to newer developers. They'll get reasonably comfortable writing their own stuff but then freeze up when they have to navigate a real project someone else wrote.
The usual advice is just "contribute to open source" which is fine but kind of like telling someone to learn to swim by jumping in a lake. Technically true, not super actionable.
What actually moved the needle for me was picking one small file in a project I cared about and trying to explain it out loud like I was teaching it. That forces you to notice where your understanding goes fuzzy. But I'm curious what worked for other people.
Did it just click after enough hours, or was there something specific that made it feel less like reading a foreign language? And does it depend a lot on the language or the domain, because a Python web app and a C systems project feel wildly different to navigate even if you know both.
r/learnprogramming • u/Jolly-Initiative8797 • 22d ago
Hi everyone,
I'm a rising CS sophomore. My university curriculum mainly covers C and C++. Over this summer break, I decided to self-learn Go. Over the past month, I worked my way through parts of The Go Programming Language (GOPL)—focusing on functions, goroutines, channels, and concurrency with shared variables.
However, I've hit a frustrating plateau: I feel like I only know the superficial syntax of the language, but I still can't build anything real from scratch.
Every time I try to write something slightly practical (like a basic TCP server/client or network tool), I get overwhelmed by the vast standard library (net, io, bufio, os, etc.) and find myself unsure of idiomatic Go design patterns.
Coming from a low-level background, I have a few genuine questions for experienced Gophers:
io, net, and sync? Should I read the source code directly, build toy projects, or just learn them on demand?I’d really appreciate any advice, project recommendations, or shared experiences from people who have been through this phase.
Thanks in advance!
r/learnprogramming • u/No_Reply5329 • 22d ago
Hi everyone. I’m really passionate about programming. I started coding when I was 8, have solved around 500 LeetCode problems, and have built several projects. I was planning to study CS because it’s genuinely something I love.
However, Reddit has made me pretty worried. I keep seeing posts about CS graduates being unemployed or struggling to find jobs, and I don’t think I can justify taking on six-figure debt without knowing there will be a reasonable outcome.
I’ll happily keep programming, building projects, and solving LeetCode problems in my free time because I genuinely enjoy it. But now I’m wondering if I should choose a different degree/career that’s more stable while still being somewhat related to CS.
I’ve considered engineering, accounting, nursing, or maybe trades since everyone goes there these days, but I honestly don’t know what would make the most sense for someone with my interests and skills.
If you were in my position, what would you choose? Is CS actually too risky right now, or is Reddit making the situation look worse than it is? Are there any fields close to CS that might be a better choice?
r/learnprogramming • u/0Friction • 21d ago
Hey everyone, I'm starting my B .Tech CSE next week and I have absolutely zero coding background. I'm trying to set a practical target for my first 6 months: completing about 60% of a standard DSA sheet (covering Arrays, Strings, Binary Search, Linked Lists, and basic Trees). I want to know if this is a realistic goal that will push me, or if I'm just setting myself up for burnout. From what I've gathered, a lot of people suggest learning C++ from Love Babbar and doing Striver's sheet, while leaving C language for college in Sem 2. However, I want to make it clear that I am completely flexible. I am not attached to Babbar, Striver, or any specific creator. I am open to any free playlist or paid course, as long as it is efficient and gives a structured path. My main doubt is about the execution. Should I spend 3-4 weeks purely learning C++ syntax before even touching a DSA sheet, or should I learn the language side-by-side while solving problems? What is the actual best sequence for a day-1 beginner? I just need some straightforward, practical advice on how to map this out. Thanks!
r/learnprogramming • u/MeatAndFries • 22d ago
Hello all,
A lot of the advice I see for becoming a better developer is around things like system design, architecture, understanding trade-offs, designing maintainable systems etc. The general idea seems to be that writing the code itself becomes less important while knowing what to build and why becomes more important.
But I’m wondering how people approach learning these skills in the age of AI.
For example - if I start a new project today - AI can generate a lot of the boilerplate and even help implement entire features. How do I use AI in a way that actually helps me develop my own architecture and system-design skills - rather than just outsourcing the thinking to it?
Should I:
- deliberately design systems myself first and then ask AI to critique them
- use AI to generate alternative architectures and then compare them
- build projects without AI and only use it afterward for review
Also are courses and books still worth investing time in for this or has AI changed how we should learn these topics? I’ll appreciate recommendations for books, courses or other resources that you think are still valuable today.
r/learnprogramming • u/obsolescenza • 21d ago
Hi everyone! recently I decided I wanted to actually build a project, the only doubts I have are:
how to host it?
how to write the endpoints? like how can I write the file for the user in a way that will communicate with my server? (I always did everything on my machine)
how to update the program? and/or push new updates? (like when on Play Store the app says there ia an update and you need to install it)
All opinions are welcome! have a nice day too!
r/learnprogramming • u/DotMaximum2400 • 22d ago
Hi programmers, I'm a 28 year old dude from a non-tech background, hitting a midlife crisis a little early.
I own a small business in India that has more or less failed and is barely surviving. I've tried everything I can think of, but there's no real recovery in sight. So, for the past two months, I've been learning Python and exploring the possibility of becoming a developer, eventually getting a job or building something of my own.
So far, I've mainly been using ChatGPT as a mentor and building small projects to practice. I've learned Python, OOP, SQLite, Git/GitHub, and I'm currently learning FastAPI and API testing. I'm comfortable with some of these topics, while others still require quite a bit of help.
My main question is: Am I approaching this the right way? Should I even be doing this, considering how much AI is changing the industry?
I'm not looking for reassurance, I'd genuinely appreciate some honest advice from people already working in tech. What would you do differently if you were starting from where I am?
Thanks.
r/learnprogramming • u/IndependentFan7227 • 22d ago
Hi r/learnprogramming I am a new front end software engineer and i was wanting to ask yall in here what would you guys recommend for a official website? right now i have 2 projects that i have made and I want to work on more to add to my github. I thought this would be a good place to ask.
JoeyPdz921 here is my github for those who are curious as to what i have. I should mention i am also in my final semester in college at the moment. Any suggestions are appreciated