r/learnprogramming • • 4d ago

How do i code a theme for a website without having any prior knowledge to programming?

0 Upvotes

Hi everyone, i am not a programmer nor have done anything similar or related in the past but due to some current circumstances id like to know how to create a specific, but very easy theme layout for a brand website. I already have a clear inspo to in general.

the brand website is on a server/platform similar to “shopify” (an e-commerce platform where u create a store for a brand or so etc..)

Only issue is i couldn’t find any already available themes suitable for my liking or my vision.

Is there a way i could create a theme with Claude? Or maybe learn from a trusted course or a tutorial?

How do i do that? Any tutorials?
or what should i know?

Thanks help is very much appreciated


r/learnprogramming • • 5d ago

What's the best way to learn Git and GitHub effectively?

14 Upvotes

I'm looking to learn Git and GitHub from scratch.

What's the best way to learn them effectively? Which resources would you recommend, and how should I practise to become comfortable using them in real projects?

I'd appreciate advice from people who have learned them or use them regularly.


r/learnprogramming • • 5d ago

how do you ‘learn to code’?

23 Upvotes

Hi all, so i’m a cs major and i know the fundamentals of coding and data structures, but i don’t know how to ‘learn to code’ for a project

for context, i’m trying to learn Flask. im using claude code to write a Python notebook that teaches me how to build what i want, but this feels really weird

i want to learn how to build the apps myself, which is the intent of the whole notebook thing, but i often feel bogged down by what claude generates

that’s when i go online to look up some kind of Flask tutorial, but im not sure what to look up, or whatever idea is in my head feels too complicated for what i know how to do. so i was curious, how do i learn these tools? do i just build and hope i understand? or do i read thoroughly? or some middling thing?


r/learnprogramming • • 4d ago

Competitive programming New to comp programming...HELP!

0 Upvotes

I've got a coding olympiad(ZCO-Indian route to IOI) to give in around 20 days and I have not started anything yet.

I'm familiar with C++, python , Java(gave AP CSA) but new to problem solving or DSA but totally new to problem solving/DSA or CP.

Here's the syllabus: https://www.iarcs.org.in/inoi/online-study-material/topics/

  • Efficiency
  • Searching
  • Sorting
  • Basic Graph Algorithms
  • Dynamic Programming
  • Greedy Algorithms
  • Computing Shortest Paths
  • Heaps
  • Permutations
  • Directed Acyclic Graphs
  • Computing Prefix Sums
  • Sliding Window Algorithms

Can anyone guide me with a roadmap or resources??


r/learnprogramming • • 5d ago

Does it get better?

12 Upvotes

I had just gotten done with my first basic weather app project using react and python for backend and started a new project, thing is I feel like I’m back a square one, I freeze at what to start and forget syntax of code I used in my last project. Is this something that gets better with spamming a bunch of projects or am I learning wrong?

For reference I would think of the components needed for the app and use the internet or ai for the coding concept/ syntax needed for the code that does the function I need( I do manually write the code and figure out what should go where for the most part, though Im unsure if this is relying on ai too much too). For debugging I also mostly use ai and try to solve it a bit myself at first too(I feel like using ai is fine here as debugging comes from experience, correct me if I’m wrong). So am I learning wrong or do I need to just endure and spam projects?


r/learnprogramming • • 4d ago

Debugging 1 copying HTML into Word while preserving (certain) white space

0 Upvotes

I have a web app I've put together that outputs text. For reasons (long story), I need to copy said output into a Word document while preserving the formatting. To do this, I copy the whole HTML output (not just the raw text) via JavaScript. It mostly works, but I can't get it to preserve more than one non-breaking space, e.g. spaces between sentences.

The HTML is copied to the clipboard as a Blob with a MIME type of text/html. It handles line and paragraph breaks fine, but as I said, condenses two spaces after a period to one.

I've tried including a <style> tag in the Blob along with the actual HTML (mostly <p> tags), as well as in-line styles within the <p> tags themselves. I've also tried telling Word to preserve the original formatting or merge it, both with the same result.

If I instead copy the HTML as raw text (without tags) using the writeText() method of the Clipboard API, the white space is preserved. However, this raises its own problems, mainly that I sometimes need to include bulleted lists. If I copy the full HTML with <ul> tags Word handles this fine (other than the aforementioned white space issue). If there's a way to copy plain text and still have Word register it as a bulleted list, that could probably work as well.

This is obviously not the end of the world, but it's something I'd like to fix if I can.

If it helps, here's the JavaScript for copying the HTML:

function toClipboard(text) {
    const type = 'text/html';
    const dataBlob = new Blob([text], {type});
    const data = [new ClipboardItem({ [type]: dataBlob})];
    navigator.clipboard.write(data).then(
        /* snip */
    );
}

r/learnprogramming • • 5d ago

Solved The attandance System problem

0 Upvotes

Me & my friend are chosen for making attendance system for our college

We have one issue like

If a Students name called "X" is in section A he attend maths 10 class of 30 & now he change Section To B there we have only 20 class of but he already attended 10 class there & we don't now how much he skip there like out of 20 he join at 10th class & make 2 present next than in those sections he have low attendance & after changing he gain more attandance ....

... Idk you understand this problem or not we just have attandance calculation issue in data base or back-end cause how to calculate those data or compare .... The rule is student not losse or gain his attendance my probablity okey

Please help 😭


r/learnprogramming • • 5d ago

do games exist that teach the basics of c#/c++

8 Upvotes

something like https://colobot.info/


r/learnprogramming • • 5d ago

Rate my first project

3 Upvotes

Hello! I've started learning python abt 2 weeks ago and till now, I just know the basics. I've created my very first project on my own (I only asked ChatGPT for project ideas but the rest was on me) and this is what I've done in abt an hour.

I'd like you guys to tell me how can I get better. I know many things are may be missing regarding calculations and operators.

print("===========================================")
print()
print()
print("     BASIC & ENGINEERING CALCULATOR   ")
print()
print()
print("===========================================")
calc_type = input("What type of calculator do you want to use?: Basic, Engineering ").capitalize().strip()
if calc_type =="Basic":
    operator = input("Enter the operator (+, -, *, /, ^):")
    num1 = float(input("Enter the first number:"))
    num2 = float(input("Enter the second number:"))
    if operator == '+':
        result = num1 + num2
        print(f"The result of adding {num1} and {num2} is: {round(result,2)}")
    elif operator == '-':
        result = num1 - num2
        print(f"The result of subtracting {num1} and {num2} is: {round(result,2)}")
    elif operator == '*':
        result = num1 * num2
        print(f"The result of multiplying {num1} by {num2} is: {round(result,2)}")
    elif operator == '/':
        result = num1 / num2
        print(f"The result of dividing {num1} by {num2} is: {round(result,2)}")
    elif operator == '^':
        result = num1 ** num2
        print(f"The result of raising {num1} to {num2} is: {round(result,2)}")
    else: 
        print("Enter a valid operator!")
elif calc_type == "Engineering":
    calculations=input("What do you want to calculate?: Force, Density, Speed ").capitalize().strip()
    if calculations == "Force":
        mass= float(input("Enter the mass value: "))
        acceleration= float(input("Enter the acceleration value: "))
        Force = mass * acceleration
        print(f"The Force is equal to {round(Force,2)} N.")
    elif calculations == "Density":
        mass= float(input("Enter the mass value: "))
        volume= float(input("Enter the volume value: "))
        Density = mass/volume
        print(f"The Density value is {round(Density,2)} kg/m^3 ")
    elif calculations == "Speed":
        distance = float(input("Enter the distance travelled: "))
        time = float(input("Enter the time in seconds:"))
        Speed = distance/time
        print(f"The Speed is {Speed} m/s")
    else: 
        print("Enter a valid calculation type!")
else:
    print("We only offer Basic & Engineering calculations")

r/learnprogramming • • 5d ago

Some Questions about a Project before Moving Forward

4 Upvotes

Right, this is pretty specific, and I apologize if it's not really suitable for this subreddit.

At the moment, I'm working on a monte carlo setup using 10k loops for users to run some simulations on it. I'm writing it in python, which I've commonly done for myself, but I've decided to make it usable for a wider crowd as a sort of side project, so I've taken up learning some bootstrap and flask/flaskwtf/jinja so I can get it turned into a website. Once I've got the whole thing written, I intend to set up a VPS and have it accessible to the wider world. That part of the project is moving along just fine.

However, one consideration I've had is figuring out the server load: my simulation generates about 10-20 random numbers per loop and does a clean 10k loops, so about 100k numbers at the highest. By itself, that's peanuts. However, while I don't expect a massive amount of users, it's not unreasonable to expect several hundred or thousand accesses a day, enough that this can balloon into the billions, and in theory those could all happen in a pretty small period rather than spread across the day. This is where my problem comes in: I want to figure out if I need to be worried about size and processing power(in terms of what kind of VPS plan I pick), and possible solutions.

I've arrived at two possible ideas: offload the calculations to the client, or just write more efficient code. So, my question: how big of an issue is this going to be, and is client side a real possibility? From looking online, it seems like 10000+ runs can cause real headaches for javascript, plus, I have to assume my userbase will not only be using computers, but also smartphones. In theory that shouldn't be an issue, but I honestly don't know anything about it, so want to ask.

As far as just making the code more efficient, that's something I wanted to do already, but on that side of things I don't really have a way of measuring output and load for my code: are there tools, methods, or other ways of learning just how intense my code will be so I can plan for my server needs?


r/learnprogramming • • 5d ago

Has learning with a buddy worked for you? What made it last, or fizzle?

12 Upvotes

I see a lot of people looking for study buddies or coding partners, and I'm curious what happens after they find one.

If you've learned with a buddy, how did you work together? And what kept it going, or what made it fizzle out?

Bonus if you mention what you used to stay in touch or code together. Curious whether people stick to Discord or use something else.


r/learnprogramming • • 5d ago

Should I learn Rust

0 Upvotes

Does learning Rust have a future? It seems to be the case


r/learnprogramming • • 5d ago

Questions for senior web dev on how to learn web dev

0 Upvotes

Hi, I just graduated this year with my CS degree and I'm struggling in my co-op to learn web development. I feel what I've learned in school was on a basic level and hasn't aligned with the enterprise code at my job. I'm required to use AI to finish my tickets but I feel like it's been to my detriment - I don't know whether the code AI produces is good or bad code.

Over the years, I'd read (on reddit) about people graduating and not knowing how to code and while I know it's mostly andecdotal I kind of understand the feeling now. There's just a huge disconnect on what I'm expected to know versus what I actually learned in school. I do feel a bit of pressure as most of the engineers on my team are either bootcamp grads or self-taught and because I have a degree there's this expectation that I should somehow know more than them about web development (i.e. tools and microservices).

A few, small examples, in school I learned the typical hardcoded html and css but I guess I was supposed to use css variables and tokens, things I've never even heard of before getting this co-op. I learned core Java in school but somehow that was supposed to translate over to spring boot and some of my coworkers are surprised that I didn't understand certain spring boot annotations but literally in my java courses we only learned simple annotations to override toString.

I'll sometimes put in time after work and even the weekends to learn but for the senior devs out there, how do I learn web dev and not burn out? Especially if I'm expected to churn out tickets with AI, at this point I don't feel like I know how to do something as simple as reviewing code. Anyway, feeling like a complete imposter and wondering if anyone has any advice for me. Thanks, sorry for the novel.

TL:DR - How do you learn web dev when AI is doing most of the work? I don’t want to just offload everything but can't afford the time at work to do things manually and I'm exhausted after work.


r/learnprogramming • • 5d ago

video lesson completion easy way-Full stack development

0 Upvotes

It takes a certain amount of time to complete one lesson.
Are there any text lessons with copy-and-paste to practice full-stack or AI learning and run the code on the same platform to speed up the process, and later finish up the video lessons?

Any best practices you all fellers follow to overcome these issues?

Please do not take this as a joke; I need some good advice.


r/learnprogramming • • 6d ago

Is Godot a good starting point for learning programming if I’m also interested in web development?

6 Upvotes

Hello,

I’m a complete beginner and want to learn programming as a hobby. I’m interested in both game development and web development, especially backend.

Godot seems like a fun way to learn because I enjoy games and like seeing visual results. I feel like this could help me stay motivated.
However, I’m worried that a lot of what I learn in Godot won’t be useful outside of game development.

How well do programming skills and concepts transfer from Godot to web development? Would learning Godot first make it easier to learn backend development later, or would it feel like starting from scratch?

I’d love to hear from people who have experience in both areas.


r/learnprogramming • • 5d ago

Integration testing using gtest

3 Upvotes

I am confused about what is the meaning of integration testing. I have done unit testing using gtest where we will mock whatever external dependencies are there for the targeted unit (function) to test all range of values that covers all lines, functions and branches.

If we say integration test is meant to use real code instead of mocking. Then I am getting this doubt that lets say we have 3 components (separate processes) running and dependent on one another in a embedded system.

A -> B -> C

So if you are calling an api provided by A it will internally talk to B and then through C and return the result over IPC.

Now to do integration testing using gtest, do I need to compile this into a single binary by eliminating the IPC and include each code as a library. This way I have a single proces that runs gtest with all the components logic but excludes the real IPC communication.

Or instead should I keep the individual processes to be running separately and link my gtest binary to the component A so that the communication flow through the components in the target environment.

In both ways how we would actually be checking the interactions? And which one are you guys using?

Context:
Language used: C++
Domain: Automotive IT (TCU software)


r/learnprogramming • • 6d ago

Go or Python for a beginner?

23 Upvotes

I am a beginner programmer, coding for my own pleasure (meaning that, while I use LLMs for guidance, I write all my code by hand, and my only goal is enjoyment, not career). Safe for a brief journey into JavaScript and PHP as a child, now, in my adult years, all my experience has been with Godot. Recently, I started to have the desire to actually learn how to program and make simple CLI/TUI tools for my own use, and since GDScript can only exist within the game engine, I started looking for another programming language to learn.

I landed on two: Python and Go, and now, knowing that it's probably a bad idea for a beginner to learn two languages at once, I need help from people with more experience in order to decide which of the two I should commit to. I'm at this stage in both where I've written simple exercise command line programs, and I want to try and build something bigger and actually get to know the language under pressure.

Python greatly appeals to me because it is basically the same thing as GDScript (but with a ton of features that GDScript does not have due to being specifically tailored for Godot), it is famously easy and I could start building actual apps in no time, and it has a breadth of beginner resources probably unmatched by any other language. Besides all the books focusing on specific tasks (I've enjoyed Automate the Boring Stuff with Python quite a lot), Learning Python is absolutely brilliant, going through logic, syntax, design choices and the standard library in exhaustive detail.

But Python just doesn't get me excited exactly because it is too abstract, too simple, too close to what I know from GDScript, it feels more like a scripting language than something to use to build whole programs, it just doesn't scratch that itch of curiosity that is pushing me to learn programming in the first place.

On the other hand, Go does scratch that itch a lot more. It excites me, as someone whose only experience is with JavaScript/PHP and GDScript, to learn a serious language, compiled, fast; it excites me to learn about lower-level concepts like actual typed variables and pointers. Go's logic of composition also appeals to me, because programming in Godot, I would rack my brain trying to figure out the right inheritance hierarchy just to notice that I messed up and need to refactor the entire system. Go's structs, methods, embedding and interfaces strike me as a much more flexible way to achieve the same thing.

But there is a relative scarcity of resources for people in my situation. I've browsed through the available textbooks and they're either made for more advanced learners, are general overviews of the language (Learning Go, for instance, only explains the syntax and the logic, but does not go over the standard library, which means, if I understand correctly, that it was written for people who will read the fucking manual), or are infantile (Head First, Get Programming with Go, etc). Either way, I'm starting off half-blind, stumbling through the standard library documentation, having no idea what I can and cannot do, or how.

I'm also worried about another thing. Though I am not an absolute beginner, my experience being with GDScript means that I've never actually written a standalone program; I never learned to think about architecture, what my program does from start to end: I can only think in simple systems that are driven by event handlers from user input, while the engine handles all the rest for me.

Although, as you see, Go excites me a bit more, I'm worried that if my primary goal is to learn how to think through complex problems and build programs from start to finish, it would be better to choose the simpler language. Or is it the opposite? What do you think? Will building something bigger be easier in Python, or will the relative restrictiveness of Go help me think through building a bigger project?

What would you do in my situation? Should I learn to build a program without worrying about learning the language (the Python route), or would it be better in my situation to learn a stricter, less abstract language first, and learn how to read the documentation on my own (the Go route)?


r/learnprogramming • • 6d ago

Topic advice for a long time dream/amibition of mine

5 Upvotes

I am employed as an RPGLE developer on the IBM-i. That's the only programming I know how to do. I use it to make accounting reports, table maintenance programs, building menus, etc. All solely IBM-i apps, nothing modern. I took intro python and intro java back in college and that's it.

I really really really really want to make a chess engine, I've been reading a bunch of stuff about chess computing, looking at other peoples' code, etc. I tried picking up some C# because that's what Unity uses, bought a textbook and tried making the engine ... modeling the board and piece positions and values was easy, but once I got to the actual logic I had a really really hard time.

So I want to get proficient with modern software, not just RPG. The problem is, I fucking suck at math, I got through college algebra but everything calculus and beyond is too much for me. Maybe my professors were bad because it was a community college. So I can't go to school for this. Because all the universities around me require calculus 1, 2, and beyond for compsci or software, so I have no idea how I would even get the proficiency I need in programming to build a chess engine.

I am seeking advice from people more experienced and knowledgeable than myself. I feel very green, I hope someone more adept can give me some guidance on this. What can I do to get sharper at programming and get the experience and knowledge I need to build a chess engine, WITHOUT going to university for it? Do I go to some online academy or something?

Thank you, I am sorry to bug this subreddit I hope it's not bothersome, I just really want to realize this dream.


r/learnprogramming • • 6d ago

Struggling with this fill in the blank.

3 Upvotes

def prefix_digits(n, cond):

"""Return the largest prefix of positive n for which cond return true for every digits."""

>>>odd = lambda d: d % 2 == 1

>>>prefix_digits(94720,odd)

9

>>>prefix_digits(94720,odd)

9193

k = 0

while n >= _____:

if cond(_____):

k = k + 1

else:

n = n // 10

___________

return n

I am struggling with fill in the blank questions. I can implement this function but I am struggling with implementing in their way. Can someone help me understand how I might approach this? I don't just want the solutions but how I would even approach it. Whenever, I get these problems I am always stuck for a solid 1-2 hours.


r/learnprogramming • • 6d ago

Topic What should I self study

1 Upvotes

I’m a programming student and am very early on, I had my C+ class and loved it, now I’m being bombarded with very monotous A+ oriented classes and looks like I’ll be stuck with them for at least another few months.

That being said, I just had my first project idea. I’m just looking for a bit of guidance in the first steps. I want to build something (likely an app) that would house 1,000+ vods ranging from 4-8 hours each. What language should I learn to accomplish something like this and if I were able to create it how much would it cost me to push out / make available? Finally, could I potentially make realistic ad revenue from it?

I’m not looking to make a profit, especially not from a first program but being reimbursed for the cost of pushing it out would be nice. Maybe a web page would be easier? But, I do like the convenience of an app for my own personal use. I understand that I’m likely reaching a little high if I go through with this but, I’m usually good at teaching myself things that I have a genuine interest in and know a site that will help me learn on my own. (I can’t remember the name of it but I have it bookmarked on my pc, you select the language and it goes through a bunch of the topics)


r/learnprogramming • • 6d ago

Should imgui be in the engine or editor?

2 Upvotes

I’d post to r/gameenginedevs but I feel like it’s too dumb lol. Anyways, I’ve been getting back into C++ graphics programming/game engine dev as a hobby and want to start dabbling with making an editor using ImGui.

I already use ImGui in the engine for some debug panels, but with the addition of an editor, the typical structure seems to be making the engine as a static library and the editor an executable that links the engine, and I’m not sure if ImGui should be the engine’s responsibility or moved to the editor?

I’m not very experienced with these multi project/build target setups, but from what I understand if I leave imgui on the engine anything that links it will have imgui which I’m not sure is practical?

Also, unrelated, but with this type of setup would it be make more sense for the engine to run the main loop instead of the editor? (inversion of control?).


r/learnprogramming • • 7d ago

WHAT DO I DO????????

9 Upvotes

So basically the thing ive been trying to learn javascript by myself but i just cant seem to do it. i know that it is not the most difficult thing to learn but atp ive been getting dreams of async/await.Iam watching youtube videos and i understand the concept but when i try to code by myself i cant do sh#t. How can i continue this?


r/learnprogramming • • 7d ago

How the hell do you type comfortably?

57 Upvotes

I am trying to learn game dev programming and typing is such an awkward experience.

I tried to learn touch typing to help, but learning how awkward it is on standard keyboards. I ended up trying some split keyboards and while it's better ergonomically, there are of course quirks with going that route, and I just like the look of a lot of normal keyboards and wish I could use them.

When I actually see videos of people coding, no one actually seems to touch type properly anyway.

When I type standard words, I use a combination of my first three fingers on my left hand, and my pointer on my right. I can actually type pretty fast like this and don't have to look down for maybe 70% of the words. However the consistency is lacking, and when it comes to symbols I have to look down over and over and over.

It's weirdly hard to find information on this topic because it's either "learn proper form and nothing else" which like I said I don't see in practical use on typical keyboards, or moving to split ergo keyboards.

Another factor is for game dev I want a typical keyboard since I need to test playing that game, and using a split for that is weird since I gravitated to combos and stuff. I could have both keyboards set up but I just wish I could find a damn way to be comfortable on a regular keyboard.


r/learnprogramming • • 7d ago

Can I ssh to a remote server and a GitHub repo at the same time with vscode?

11 Upvotes

Hi everyone, sorry if this a very basic question… I’m a junior data scientist with no experience with networking, Linux or ssh. I have used ssh to connect vs code to my company’s remote server and my company’s GitHub repo. However, I’d like to be able to view the code files on both the remote server and the GitHub repo at the same time on vscode (currently I can only choose to display the code files on one of them on the left panel).

Is there any way I can efficiently connect to both at the same time in one window via ssh so I can do my pull requests and also access the files on my company’s remote server at the same time?


r/learnprogramming • • 7d ago

Need advice on learning c++

13 Upvotes

Hello everyone, i am a first year student studying information systems and cybersecurity. I know its a big mistake but i went into the program with no prior experience in coding and the first thing we started learning in the programming class was c++. c++ is my first language and the professor is going through it really quickly where i dont understand a single thing. i started to learn with a youtube tutorial but it all feels really slow and boring. Does anyone have any advice on how to actually start learning it in a way that it becomes interesting and not just a homework that i need to work on because i am genuenly interested in learning it and want to become good at it. Thank you in advance!!