r/AskProgramming • u/NebulaIntelligent817 • May 07 '26
C/C++ So what arrows -> in C language are and what they do?
So I'm new to programming and i want to know what arrows do in C and how and when i use them (And i have exams in 2 weeks)
r/AskProgramming • u/NebulaIntelligent817 • May 07 '26
So I'm new to programming and i want to know what arrows do in C and how and when i use them (And i have exams in 2 weeks)
r/AskProgramming • u/Grazztjay • May 06 '26
Does this really work? Seems way too easy. I dont get how big companies like Netflix wouldn't have a way to detect this.
r/AskProgramming • u/Illustrious-Smell491 • May 06 '26
Hi ,
I’m looking for some advice . My dad has been a database developer at a senior level) , since he got to this country at 21 (he is now 60) . He’s worked with the same bank his whole career , until in 2024 he was assigned to a small team to work on a project for the bank, then in April of 2025, the whole team was laid off due to difficulties with the team supervisor (her whole team was laid off including her). My dad has been trying to land a role in his field since then to which he has had no luck at all. He believes his age is the main reason for this , but I’ve spoke to recruiters on his behalf who has explained that there is still a demand for database developers with his experience in this climate. My opinion is that he should have ever accepted the termination without asking to be placed in some other role , especially because of the fact that he has been an employee for over 20 years , but my father is very simple and chose to walk out with his head high and hope for the best. But that has no been the case , this last year being unemployed has really taken a toll on him mentally and he feels that he won’t be able to work again because no one will even give him the chance because of his age. I set him up with a few temp agencies who have told that there is still hope and have prepared him for interviews ( which always get rescheduled or fall through completely. I have tried to help him in various ways, worked on his resume, but we have had no luck. any suggestions to help my dad out ?
r/AskProgramming • u/Almesii • May 06 '26
Hello There,
I have a question regarding CPU<-->GPU data design. Im working on a falling sand game. This game is meant to have a PhysicsSystem, where I load the Simulation at runtime. A PhysicsSystem might be TemperatureDiffusion, Gravity, ChemicalReaction and so on.
I have a ChunkManager, which switches between Read/Write once all PhysicsSystems are simulated
I can already see, that this will take loads of compuation power to work in more than 1fps. Thats why im trying to design the whole System as GPU friendly as possible (not implementing it yet though).
To save up on simulation time i only want to simulate the neccessary Instances. For example, if the Temperature difference is miniscule the System should ignore it.
Thats why every Simulation-per-Instance should only run when a condition is met. Further, this would still requiere to check every instance on every chunk. Each Simulation might also update other instances to run later on.
Thats why i though about an ACTIVE property. Only ACTIVE instances get evaluated and only those that succeed the test get simulated.
TemperatureDiffusion diffuses its temperature to the neighbours. Those neighbours now should also be simulated. So the simulation should update the list of Active elements.
I figure the best way is to work with big arrays when talking about GPUs.
Im conflicted between using a more costly
{ChunkIndex, InstanceIndex, Active}
and a more complicated
ChunkCount, {[InstanceCount{InstanceIndex}], [InstanceCount{InstanceIndex}]}
as the output.
Further, how could i update such an array? Do i use an AtomicCounter?
;
;
using PhysicsFunction = std::function<ActiveChunks>;
using ConditionFunction = std::function<bool >;
;
;
;
;
//Implementation
void
void
const bool
const size_t
The idea is to use ActiveQueue to get an array of all InstanceIndices of a Chunk for the gpu.
ChunkManager:
Read----------|
Write---------|
|
ActiveQueue-->GPU-->ActiveChunks
^------------------------------'
r/AskProgramming • u/Ok-Spray-4041 • May 06 '26
For context, i’m 20 years old already with knowledge of javascript and css but i’m not sure if i should continue trying to progress in coding/take it more seriously.
With the rise of AI i’m already seeing people losing their coding jobs as AI is supposedly taking over their role, so i’m unsure what type of coding would be less likely to get taken over by AI and if it’s even worth me trying. Is there still demand and is it possible without a degree related to coding.
If so, what steps would I need to take to get a good coding job, and how long would it take for me to become employable if i stay consistent?
r/AskProgramming • u/IamTheGoodest • May 06 '26
I can search for a string that I know exists in my code and VS won't find it, or only finds one instance. When I search in my repo on dev.azure.com it finds all of the instances. If I open the file that was found in the repo, THEN VS will find it. I am searching "Entire solution".
I would love to be wrong, tell me how I'm doing it wrong.
r/AskProgramming • u/ajaypatel9016 • May 06 '26
Cloudflare caching vs auth flash - is there a true zero-compromise solution?
I'm building a Next.js 15 app with Supabase auth and Cloudflare as CDN. My public pages (home, docs, changelog) should be cached by Cloudflare, but my header shows either "Sign in" or a "user account" dropdown depending on auth state.
The deadlock: if `FrontLayout` is a static server component (no `cookies()` call), Cloudflare can cache it - but SSR renders "Sign in" for everyone, causing a visible flicker to "User Account" on hydration for logged-in users. If I call `cookies()` server-side to pre-populate the auth state, the page becomes dynamic, and Cloudflare can't cache it at all. Is there a cleaner solution for this?
r/AskProgramming • u/mastr1121 • May 05 '26
I learned (very very basic) HTML through uploading stuff on Gmbinder (a website that allows me to upload D&D content using html.)
I'm wondering if, as I learn more about HTML and programming in general can I get a job without having to sign away my soul to get a piece of paper that says you spent thousands of thousands of dollars to show people you program alright?
r/AskProgramming • u/Charleslecpierre • May 06 '26
Hey everyone. I’m not from a tech background, but I’ve been coding with VB since middle school days and I feel like I have a pretty strong base now , at least for the basics and some intermediate stuff like variables, loops, functions, simple OOP concepts etc...
I have a lot of free time right now and I want to learn either C++ or Python. I wanted to ask how difficult it might be for me to learn it and which one should I ideally pick up?
r/AskProgramming • u/Ok_Balance_855 • May 05 '26
r/AskProgramming • u/lelelesdx • May 05 '26
I was reading thru some programming history and I was shocked how much trouble (misuse of) printf has caused. It literally took decades before C and its compilers considered it a static error.
r/AskProgramming • u/Competitive_Toe_8233 • May 05 '26
Currently I have a bunch, 100's, so I can not go over them one by one on something like adobe, of multiple page images documents that I want to convert to pdfs. The issue is the ocr/text recognition is horrible and I am looking for a viable way to covert from images to pdf and have text recognition checked over by AI. Claude is good at correct errors but the OCR then becomes out of work and in the wrong place
r/AskProgramming • u/samirson • May 05 '26
i programmed a script to brute force passwords but this is not optimal, do you guys know any way that works with any lenght passwords?
the script that i programmed only works with <5 lenght passwords >5 passwords takes wayy too much time.
r/AskProgramming • u/Underpowered007 • May 05 '26
Hey Everyone,
I am a hardware designer who needs to now build some software to showcase the capabilities. I have figured out my requirements but cannot decide which framework to use given my circumstances.
I need the app (Windows/Android for now) to be able to access USB and WiFi to ingest data at a rate of 2MB/s. This data then needs to be processed through some DSP, displayed on a chart at a constant framerate and potentially stored to the disk.
I have been considering Flutter and Qt using PySide6. From my very minimal research I find that Flutter is very easy to setup but might struggle with signal processing stuff, plus need to learn Dart.
Pyside6 seems ideal as I have some experience with QML/C++ and python for desktop but not sure how painful it will be to package it for mobile devices and support numpy/pyserial etc.
I know I am trying to look for an easy way out but I want to put little time into this, since I would rather spend time into my hardware.
Regards
r/AskProgramming • u/Technical_Introvert0 • May 04 '26
So I have been trying to learn the windows API in C/C++.. so far I only know shellexecute thanks to RAD Studio.. and sleep ().. But I wanna understand the rest of the whole WIN32 API.. where can I find the resources? I checked the microsoft site and they have some of them not all. I am essentially looking for a course..or book to check out
r/AskProgramming • u/TV-Daemons • May 04 '26
Hello everyone! I just finished my first year in college with my last two classes learning python and front end web development using s,css,js and at the end using react. I was wondering if there was any websites that might throw me project ideas for practice as right now I just want to get better at the basics without trying to come up fully with an idea if that makes sense. Lemme know any sites and tysm!
r/AskProgramming • u/Objective-Farmer4183 • May 03 '26
I've seen a lot of people saying that Rust = C but more secure. Is that true? Is there any catch or something? If you've used both of these programming languages, what was your experience with each? Which ones did you prefer?
I am writing this because I still don't know in which language should I code my backend for a website, and I don't want to mess things up. I am choosing low level because I want performance and low RAM usage + I am more familiar with low level languages.
TLDR; When do you think I should rather use C over Rust and vice versa?
r/AskProgramming • u/No17TypeS • May 03 '26
I've been programming as a hobby for almost 10 years now and I don't get why there are so many modern companies still enforcing such limits. I've seen a bank make a new app and downgrade from an alphanumeric password to a PIN. NTE (a game that came out a few days ago) forbids special characters and limits the password length to 32.
When I was 16-17 (!), I had to build a project which needed to store passwords safely so I had to learn that. Knowing all this actually makes it worse because I know that hashing functions do operations on byte buffers (IIRC, but the result is the same anyway), which doesn't care at all about length or the charset. Then, there's SQL injection and stuff like that but AFAIK, in every relevant framework, there are functions to sanitize and check inputs.
I don't buy that a 16-year-old would do better than companies with paid programmers so I must be missing something. In the age of massive breaches, what makes them have such limits?
r/AskProgramming • u/Traditional-Bank5621 • May 03 '26
I am working on my first personal project outside the university, it is only me and an idea that one friend of my gave me but he do not code. i am working on scrum methodology, but now i have encountered a dilema. at the end of the sprint how can i make sure that my code is good and i am not just increassing my wrong decisions? If any one is interested on looking at the repo i can send the link , it is an app to help with household orgaization and task delegation , all of this is recorded in the wiki
r/AskProgramming • u/_g550_ • May 04 '26
global agent is made by create_react_agent and wrapped by agentExecutor, both imported from langchain.agents.
Then I use this line:
global_agent.invoke(gr.ChatMessage(content=message, role='user'))
which throws exception: gradio.exceptions.Error: "Data incompatible with messages format. Each message should be a dictionary with 'role' and 'content' keys or a ChatMessage object.
I have tired all below:
response = global_agent.invoke({"input": message})
response = global_agent.invoke({"role": "user", "content": message})
response = global_agent.invoke([{"role": "user", "content": message}])
history.append(gr.ChatMessage(role="user", content=message))
response = global_agent.invoke(history)
response = global_agent.invoke(gr.ChatMessage(content=message, role='user'))
I've been trying to resolve this for a few hours now and internet is no help.
This is the definition of the function that produced global_agent:
def create_global_agent() -> AgentExecutor:
prompt = PromptTemplate.from_template("You are AI assistant...{tools} ... \nQuestion: {input} \nThought:{agent_scratchpad}")
`llm = HuggingFaceEndpoint(`
repo_id="mistralai/Mistral-7B-Instruct-v0.2",
huggingfacehub_api_token=XXXXX,
temperature=0.7)
agent = create_react_agent(llm=llm, tools=weather_tools, prompt=prompt)
agent_executor = AgentExecutor(
agent=agent,
tools=weather_tools,
verbose=True,
handle_parsing_errors=True,
max_iterations=6,
early_stopping_method="generate"
)
return agent_executor
r/AskProgramming • u/dsecurity49 • May 03 '26
I’m trying to avoid using redis/rabbitMQ and built a small HTTP job bus using flask+sqlite.
Workers poll for jobs, and I’m relying on: BEGIN IMMEDIATE a single UPDATE ... RETURNING query to atomically claim jobs so multiple workers don’t grab the same task.
This is the core query:
WITH candidate AS (
SELECT id
FROM intents
WHERE expires_at > :now
AND status != 'failed'
AND claim_attempts < :max_attempts
AND (status='open' OR (status='claimed' AND claimed_at < :stale))
ORDER BY claim_attempts, created_at, id
LIMIT 1
)
UPDATE intents
SET status='claimed',
claimed_at=:now,
claimed_by=:claimer,
claim_attempts=claim_attempts+1
WHERE id = (SELECT id FROM candidate)
RETURNING id;
Sqlite is running in WAL mode with a busy timeout. It works fine for a few workers, but I’m trying to understand the limits:
At what point does SQLite become a bottleneck here?
Is SQLITE_BUSY inevitable under higher concurrency?
Has anyone used SQLite like this in production for low/medium workloads?
Would love to hear real-world experiences or failure points.
Repo for context: https://github.com/dsecurity49/Intent-Bus
r/AskProgramming • u/EnD3r8_ • May 03 '26
Hello.
Me and my friend want to play games at school but they have banned all games sites and all roblox incoming requests. They have also banned all proxy sites and since Chrome on school computers is configured to be always on guest mode, we can't install extensions, also, I dont know why I can’t install Opera, basically, we can't do anything.
And I was thinking that I could create my own proxy more or less like 'croxy proxy' (https://www.croxyproxy.com/_es/) and host it on my rasberry pi and access it through a domain in duckdns thay is pointed to my ip and my port opened would opened. I have some questions.
What I want is basically to create my own proxy just with nodejs that supports https and sockets, also I want to be able to play decently through it so I can bypass my school's firewall.
Thanks for everything. Have a good day.
r/AskProgramming • u/Aditya_10204 • May 03 '26
I’m working on an assessment where I need to create a coding task (basically SWE-bench style). The idea is:
take an existing repo (I’m using pydantic)
write tests that fail on the current code
provide a patch that fixes it
and the task shouldn’t be trivial for an LLM to solve(it should be solvable, llm should solve it around 4/10 times, models like haiku)
The difficulty requirement is the tricky part. It shouldn’t be impossible, but also not something a model solves instantly every time.
What I’ve been doing so far:
using Claude Opus to explore the repo and identify possible bugs or edge cases
writing tests around those cases
then in a separate run, giving the instructions to a smaller model (like Haiku)
letting it generate a patch
and running that patch against the tests I wrote
I’ve been repeating this loop for quite a while.
The problem is, most of the time the model just figures it out. Even with edge cases, chaining conditions, or slightly more complex scenarios, it still manages to fix things pretty reliably.
So I’m clearly missing something.
I feel like I’m designing bugs that are too local or too easy to pattern match, but I don’t really know how to move beyond that. At the same time, I can’t just make things random or overly complex because the task still needs to be fair and testable.
Also, I don’t have the option to modify the codebase directly — I can only define behavior through tests and provide a patch — so that constraint makes it harder to think creatively about it.
At this point I kind of know I’m not approaching it with the right mental model, just not sure what the correct approach is.
If anyone here has worked on:
SWE-bench style tasks
LLM evals / coding agent benchmarks
or even just tricky real-world debugging cases
I’d really appreciate any pointers on:
how you think about difficulty in these tasks
what patterns actually make models struggle
or how you come up with good task ideas
Right now it just feels like I’m going in circles.
r/AskProgramming • u/TheOffBeatDoc • May 03 '26
EDIT: Note - I am talking about the open-source Chromium engine (not the Chrome browser here)
I’ve been thinking about this, and I might be missing something obvious, so I’m asking out of genuine curiosity.
Web apps feel like the most universal thing right now. Almost every modern app, SaaS, all the AI tools, even office suite and media editing tools are shipping with web UIs, which run on any device with a browser irrespective of the OS, basically solving cross-platform dev.
Now, lot of these apps which are installable bundle Chromium inside them (like Electron apps). Even PWAs, while lighter, still rely on Chrome or another browser engine to run. So, ultimately this results in a huge package, duplicated browser engines, and the app itself being kinda “second class citizen” compared to the embedded browser.
So why don’t OS developers just integrate Chromium directly into the operating system as a native architecture? Each OS already has its own frameworks, but if Chromium was built in, developers could ship one unified codebase without needing separate native builds. Web apps wouldn’t feel so constrained or bloated, and they’d be treated more like first class citizens.
Is there a fundamental reason this doesn’t happen? Performance? Politics? Standards? I’m not sure, and I’d love to hear from people who understand this better.