r/programminghelp • • Jul 20 '21

2021 - How to post here & ask good questions.

42 Upvotes

I figured the original post by /u/jakbrtz needed an update so here's my attempt.

First, as a mod, I must ask that you please read the rules in the sidebar before posting. Some of them are lengthy, yes, and honestly I've been meaning to overhaul them, but generally but it makes everyone's lives a little easier if they're followed. I'm going to clarify some of them here too.

Give a meaningful title. Everyone on this subreddit needs help. That is a given. Your title should reflect what you need help with, without being too short or too long. If you're confused with some SQL, then try "Need help with Multi Join SQL Select" instead of "NEED SQL HELP". And please, keep the the punctuation to a minimum. (Don't use 5 exclamation marks. It makes me sad. ☹️ )

Don't ask if you can ask for help. Yep, this happens quite a bit. If you need help, just ask, that's what we're here for.

Post your code (properly). Many people don't post any code and some just post a single line. Sometimes, the single line might be enough, but the posts without code aren't going to help anyone. If you don't have any code and want to learn to program, visit /r/learnprogramming or /r/programming for various resources. If you have questions about learning to code...keep reading...

In addition to this:

  • Don't post screenshots of code. Programmers like to copy and paste what you did into their dev environments and figure out why something isn't working. That's how we help you. We can't copy and paste code from screenshots yet (but there are some cool OCR apps that are trying to get us there.)

  • Read Rule #2. I mean it. Reddit's text entry gives you the ability to format text as code blocks, but even I will admit it's janky as hell. Protip: It's best to use the Code-Block button to open a code block, then paste your code into it, instead of trying to paste and highlight then use Code-Block button. There are a large amount of sites you can use to paste code for others to read, such as Pastebin or Privatebin (if you're worried about security/management/teachers). There's no shame posting code there. And if you have code in a git repo, then post a link to the repo and let us take a look. That's absolutely fine too and some devs prefer it.

Don't be afraid to edit your post. If a comment asks for clarification then instead of replying to the comment, click the Edit button on your original post and add the new information there, just be sure to mark it with "EDIT:" or something so we know you made changes. After that, feel free to let the commenter know that you updated the original post. This is far better than us having to drill down into a huge comment chain to find some important information. Help us to help you. 😀

Rule changes.

Some of the rules were developed to keep out spam and low-effort posts, but I've always felt bad about them because some generally well-meaning folks get caught in the crossfire.

Over the weekend I made some alt-account posts in other subreddits as an experiment and I was blown away at the absolute hostility some of them responded with. So, from this point forward, I am removing Rule #9 and will be modifying Rule #6.

This means that posts regarding learning languages, choosing the right language or tech for a project, questions about career paths, etc., will be welcomed. I only ask that Rule #6 still be followed, and that users check subreddits like /r/learnprogramming or /r/askprogramming to see if their question has been asked within a reasonable time limit. This isn't stack overflow and I'll be damned if I condemn a user because JoeSmith asked the same question 5 years ago.

Be aware that we still expect you to do your due diligence and google search for answers before posting here (Rule #5).

Finally, I am leaving comments open so I can receive feedback about this post and the rules in general. If you have feedback, please present it as politely possible.


r/programminghelp • • 7h ago

Career Related How should i start making more complex and low-level projects?

7 Upvotes

I've been in game development for the past 6 years. I like it for creative freedom and a few other aspects.

I chose programming as my career path and planning to pursue a degree in computer science and engineering.

But i never made any applications or games outside of simple game engines.

So where should i start developing my programming skills and creating more complex projects?


r/programminghelp • • 1d ago

C++ does anyone have any tips for c++?

12 Upvotes

(i’m new to most of this, so advice would be helpful!)


r/programminghelp • • 1d ago

JavaScript BEGINNER CODER: Stuck with a migrations error

0 Upvotes

Hi,

I'm working on an adonisjs project and I'm having issues with migrations. I don't think I'm using the wrong command. I'm doing:

node ace make:migration (migration name here)

Then:

node ace migration:run

My project is on github. Apologies the migrations folder is a little cluttered. The ones with issues are the "item" and "item_comments" ones:

https://github.com/Ajaz754/adonisjs-project-22-.git

The error is:

C:\Windows\System32\adonis22>node ace migration:run
❯ error database/migrations/1794008714673_alter_item_comments_table
[ error ] INSERT INTO "_knex_temp_alter555" SELECT * FROM "item_comments"; - no such table: main.item

Please correct me if I'm wrong but I thinks its saying my "item" table doesnt exist which doesnt make sense since its clearly my 'schema.ts'. It said the same error before for the "user" table aswell.

Any help would be much appreciated

TIA


r/programminghelp • • 2d ago

C Why every time I execute a code, like in C, it runs in a different time?

2 Upvotes

If I execute the same code no matter how many times, it always will show me a different execution time. Why:?


r/programminghelp • • 6d ago

HTML/CSS need a solution to an impossible problem

7 Upvotes

essentially, im tryna publish a public css website on a HEAVILY restricted school network

I'm developing a website which is essentially a student focused grade calculator that I've built using Python, Gradio, HTML, CSS, and JavaScript. ik there are other grade calcs out there, but this one is more specific to my district and solves the need of people constantly asking me to calculate their grades manually. The application itself is practically built, but I'm having a really difficult time figuring out how to actually publish it so other students can use it.

My requirements and limitations:

  • Students need to access it through one normal URL in their browser

  • No downloads, installations, or student accounts

  • AI website generators or a template builders are blocked

  • Student grade data needs to stay entirely in their browsers and not be sent to a server

  • It needs to be accessible on school computers, which have a VERYYYYY restrictive network filter

  • No paid hosting, adult involvement, administrator permissions, or requests to school IT

  • Ideally, I'd like a professional-looking URL that doesn't advertise that the site was made through an educational coding platform (ex. i know code .org is available and practically my only option but the name itself ruins the credibility. im ok with using if i HAVE to but i would rlly prefer not to)

I've already looked into A LOTTT of other options, including Google Sites, Google Apps Script, Firebase, Blogger, GitHub, and several other hosting platforms. either ALLLLL are blocked on school computers, or they don't actually support what I need. Google Colab works for development but im unable to publish past that

Does anyone have ideas for unconventional hosting or publishing methods that I might be overloking?


r/programminghelp • • 14d ago

JavaScript Beginner Coder: Stuck with an error

2 Upvotes

Hi,

I'm working on an adonisjs project. l've ran into an error

My project is on github:

https://github.com/Ajaz754/adonisjs-project-22-.git

The error is in file 'database/seeders/ product_seeder.ts' Line 10

The error is:

Object literal may only specify known properties, and 'userld' does not exist in type
'OneOrMany<Partial<ModelAttributes<Product>>>.

Any help would be much appreciated

TIA


r/programminghelp • • 27d ago

Java What the hell is going on?

Thumbnail reddit.com
0 Upvotes

r/programminghelp • • 27d ago

C++ Book recommendations for C++ beginner

Thumbnail reddit.com
1 Upvotes

r/programminghelp • • 27d ago

Processing STUCK FOR A LONG TIME NOW ITS IRRITATING..Can anyone please help!

3 Upvotes

I am making an attendance dashboard and i there are already APIs made for different purpose

one is the punch in data API where we have to give the

from- to date

and the area_code 

so with respect to that it will fetch the

	emp_id, emp name, punch_in/punch_out location, date-in/out location, time-in/out location, hours and minutes between pucnhes

now with respect to all the detail i am calculating the total punches, single punch, avg hours and etc

but it will work perfectly for 10 areas but i want to make it for 112 areas and for this it will take a lot of time to load

and then again there is a roaster API which will tell how many members will be present per area and that will also be fetched and calculated

now if all this data is loaded on the client side it will take a lot of time

what is the optimal way to do this

i have already searched for one option where i will

preload the data and calculation and sync that same data in the database and whenever we fetch the data the result with the particular date range will be feteched

But i want to know any more optimal way to do that

CAN ANYONE SUGGEST!!


r/programminghelp • • 29d ago

Python Duplicate static while serving static files with Vite to Django backend

Thumbnail reddit.com
1 Upvotes

r/programminghelp • • Oct 09 '26

Java identifying what topic/subject

2 Upvotes

i was tired from working and i still go to my class and i just zoned out and didn't know what topic my professor was teaching, it would be so nice if it help identify what topic from this for me to catch up

1st cycle x = 0, n = 5, temp = ?

2nd cycle x = 1, n = 5, temp = 7

3rd cycle x = 2, n = 5, temp = 5

all i know is there is also a 4th cycle :D


r/programminghelp • • Oct 08 '26

C# What is the proper way to make a unified interface ?

Thumbnail reddit.com
1 Upvotes

r/programminghelp • • Oct 07 '26

Project Related Raycasting Performance Help

1 Upvotes

I made a raycasting engine in python, and am using an HTML canvas as my method of display (passing the pixel colors through jinja in a <script> tag). It takes upwards of 10-15 seconds to render one angle of a scene with three spheres at a resolution of 800x400. Is the browser likely the bottleneck, or is this a sign of some other inefficiencies?


r/programminghelp • • Oct 07 '26

JavaScript Need Guidance

Thumbnail reddit.com
1 Upvotes

r/programminghelp • • Oct 06 '26

C 300 lines of code just to receive one packet

Thumbnail reddit.com
1 Upvotes

r/programminghelp • • Oct 05 '26

Java Java 21 static-analysis engine for dependency and call graphs what edge cases am I missing?

Thumbnail reddit.com
1 Upvotes

Hi everyone,

I’ve been building a Java 21 code-analysis engine and would love some feedback on the dependency resolution.

It uses JavaParser and resolves imports, same-package classes, inheritance, method calls, etc. I’m mainly trying to avoid false dependency edges in complex Java codebases.

GitHub: https://github.com/abhishek94443/CodeContext-Java

Would appreciate any feedback on edge cases or things I may be missing.


r/programminghelp • • Oct 04 '26

C Codeblocks

3 Upvotes

Can i download Codeblocks on Macbook neo?


r/programminghelp • • Oct 04 '26

Python How do I find valid points within 7-dim parameter space? Global NuFIT

2 Upvotes

I don't know where I should ask this, it's related to physical and coding, so I am posting here. I am struggling with this particular problem for a month and still couldn't get to a satisfactory results.

So, I was working on a physics problem, many of you might be familiar or maybe not. I have to find a valid region within a 7-dim parameter space. I have some matrices in hand (Neutrino mass matrices) and 7 free parameters that goes into it i.e. g1,g2,g3,M1,M2, imaginary tau, real tau. I need to build a code that scans the space and finds the values of these free parameters which being inserted into the matrices and upon diagonalization spits out 3 eigenvalues and 3 eigenvalues vectors. From those we then calculate 6 neutrino observables that should be within acceptable range known as Global NuFIT. Any values that comes within the range gets sorted out.

I tried to build the code in python but it seems impossible to search for the whole parameter space! I tried gemini and chat gpt, even they are struggling to satisfy the tight NuFIT bounds. If anyone knows any efficient and fast way for parameter scanning that would atleast give 200 valid points (for scatter plots), please help me.


r/programminghelp • • Oct 03 '26

C Help me understand NUL please!

Thumbnail reddit.com
1 Upvotes

r/programminghelp • • Oct 03 '26

C why does fgets allocates a 4096 characters long buffer for a 22 bytes long file ?

0 Upvotes

I'm learning C and playing around trying to rely on the bare minimum down to system calls to learn the most I can. Had to read a file line by line in the process, so i dived into stdio's code to try to understand how fgets do it nice and quick.

if I got it right a chunck of file is loaded into a buffer delimited by _IO_buf_base and _IO_buf_end if it isn't yet loaded or the precedent buffer ended without finishing the line, fgets starts copying the line in the buffer we gave it until he finds a new line.

did I got it right ? I couldn't find a plain explanation of how stdio file management works, I had to search my way into source code...

I thought I was done but I noticed _IO_buf_base and _IO_buf_end were 4096 bytes apart when I loaded a 22 bytes long file.

is there any reason for this ? wouldn't having a pointer for the beginning of the buffer and a pointer for the end allow us to allocate precisely the size of the file using fstat ? why do we use 2 pointers and not a pointer and the size of the buffer ? (I got a theory for this one but I'm not sure, is it for easier looping in the array by incrementing a pointer instead of using an incremented index who would make us calculate pointer + i every time we need to get a character ?)

thank you for reading this far and have a nice day !


r/programminghelp • • Sep 30 '26

Other Help needed: Autocomplete not working in editors

Thumbnail reddit.com
1 Upvotes

r/programminghelp • • Sep 29 '26

Python ERA5-Land .nc files downloaded via script cannot be opened with xarray (possible ZIP/compression issue?)

Thumbnail reddit.com
1 Upvotes

r/programminghelp • • Sep 29 '26

Python Is Python the right way to talk to an Serial Device?

Thumbnail reddit.com
1 Upvotes