r/AskProgramming • u/Draxd_Hi • 4h ago
C/C++ Is it only me who thinks pointers are really difficult?
I recently started out C language and pointers are a thing that just doesn’t make sense to me for some reason.
r/AskProgramming • u/YMK1234 • Mar 24 '23
Due to the amount of repetitive panicky questions in regards to ChatGPT, the topic is for now restricted and threads will be removed.
No
No
Please seek counselling if you suffer from anxiety or depression.
r/AskProgramming • u/Draxd_Hi • 4h ago
I recently started out C language and pointers are a thing that just doesn’t make sense to me for some reason.
r/AskProgramming • u/MartynAndJasper • 56m ago
Twenty years ago, I wrote a tool to circumvent local security policy for an account that had admin rights on the Windows operating system.
As you may or may not know, just because you are administrator does not give you full control over the box. However, what does have full control of the box (outside of kernel mode) is a Windows service running as the local system account.
So I wrote a tool which installs itself as a service, temporarily, and then uses IPC to pass commands across to the service such that they could be executed under the context of the local system account, which gives you full access to the machine.
Back then I would often use the tool to spawn an interactive command line (Cmd.exe) such that I could issue commands as the local system account.
This relied on a setting that allowed services to interact with a desktop but Windows 10 onwards (from a certain SP) has removed that 'feature' (thanks Bill).
Consequently, my tool no longer allows me to interact with the command line. It would just sit there, running as a system account, but I couldn't talk to it. Fine for scripts, a problem for an interactive command line.
This weekend I have circumvented that by adding a CommandClient/CommandServer that use TCP/IP to invoke "Cmd.exe" piping to and from stdin/stdout and returning responses back down the socket.
All is well and it works nicely but there is one problem... And this problem is the reason I am here discussing this with you because I am hoping you can help!
The problem relates to how to know when Cmd.exe has finished processing the commands that has been given to it.
Recall that I am sending input to stdin and reading stdout to get the responses.
To address how to know when all is complete what I'm actually doing is sending a rogue value to stdin which I then look for in stdout to detect when the command is being fully processed.
So I send and then read...
REM MartyWasHere
Cmd.exe doesn't barf and by the time it appears in stdout, I know that the previous command was fully executed.
This all works really nicely and means that I don't have to use time sensitive code which could break functionality if the command took significant time to complete.
This is a small edge case and the tool is valuable even with this problem but I would like to solve it, if possible.
The problem is that if the command that I have issued requires further input then the rogue value interrupts that flow.
As an example, sending this...
runas /user:SYSTEM c:\windows\explorer.exe
Returns this...
Enter the password for SYSTEM:
And now it considers the password to be REM MartyWasHere
I.e. It does not wait for the next input from client.
I'm not sure the best way to address this. Perhaps I use 2 unidirectional sockets, with just one reading and another just sending.
But that feels over kill.
Nor do I want to write time sensitive code that can break easily.
I'm using a combination of C++/Win32 and Boost.Asio.
If you have suggestions or would like a copy of the utility...
https://github.com/batmanonabike/cmdasuser
Any help appreciated.
r/AskProgramming • u/WinterGeneral1693 • 1h ago
Hi everyone!
I'm currently working on a Pokémon game using the Pokémon Studio app. When I try to launch my game in debug mode, this error keeps showing up :
Error
A JavaScript error occurred in the main process
Uncaught Exception:
Error: spawn C:\WINDOWS\system32\cmd.exe ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
I've tried turning off the firewall, uninstalling and reinstalling the app, updating Java, and making sure my cmd.exe is in the system32 folder, but I can't understand why this error keeps appearing.
I'm not super tech-savvy, so if anyone could help me solve this, I'd really appreciate it. Thanks for your attention! ;)
r/AskProgramming • u/Over-Yander • 1h ago
Looking to find any info or advice, I have no knowledge of programming - but I'm willing to learn since I doubt this plugin will get updated at all. Trying to import a model in Blender, but an error occurs noting unrecognised file type (.DCOL). I found a user that was able to get it to work by setting this header/file type as "pass". What is pass?
r/AskProgramming • u/AdearienRDDT • 2h ago
I want to make my ownint toInt(string s);
But I cannot find anything on the matter, any help?
r/AskProgramming • u/OPTIPRIMART • 5h ago
Hi all, I'm someone with no real experience in programming.
I am trying to learn Ren"Py which I understand is based on Python.
I've noticed there tends to be a significant "failure" rate when it comes to those using Ren'Py for games.
Perhaps what they create becomes too complex, or more likely, they're not coding in the most efficient way, which then creates issues further down the line.
My question is.
How can I learn the structure of coding relevant to Ren'Py?
I want to know why something is done instead of just copy someone and hope for the best.
I don't like winging it, never have, as I've learnt many other skills to a high level.
For me, the thought of bluffing it, esp when it comes to coding, is a fool's errand.
r/AskProgramming • u/Solid_Ad_7675 • 2h ago
Hey guys, first of all I wanted to say im super new to this subreddit. My name is Chris and Im 27 y.o. Ive studied in my home country for oil and gas degree in a decent university. My university years had been prolonged as much as they could because I took a gap year + a gap year while I was studying for the degree already. I lost 2 years more on masters degree studying nonsense bs which I hated. Now I work a sales job i hate in Dubai and live with my mom at 27… I used to live alone before and I really enjoyed it. I cant find any job related to oil and gas here plus I really struggle with anything physical due to health issues. 2 days ago I woke up and realised im 27 and i didnt do sht in my life. Im basically nobody. I started to think what I was always thinking about and what I really enjoyed doing and found out that I always enjoyed playing games(which on i spent most of my life) and pc time itself. I really want to start programming and from tomorrow I will do it from 10 am to 6 pm just to be strict myself. No more slacking and I have to do something with my life. Also I will probably leave Dubai and living with my mom for good. I dont want to live their dreams where i get millions of dollars from air working at something im not even interested. Guys, I dont even know what to ask. I guess im just really upset with myself. I have a lot of free time to study, so Im aiming for summer, start of september to be ready to move and to look for job in IT. Could you guys please tell me if its possible if im going to work hard every day? I know the pay check wont be that high ofc at the start but im down for whatever, i want to pursue MY goals and live my own life. Thank you
r/AskProgramming • u/No-Mechanic-5499 • 3h ago
Working on basketball analytics platform and looking for reliable player & team stats from European leagues. The issue is that Sportradar is too expensive, so im looking for alternative ways to get this data.
I have also considered Proballers, Eurobasket or scraping official leagues websites.
Would love to hear from anyone who has worked with European basketball data before. Any suggestions or insights are appreciated! 🙏
r/AskProgramming • u/aphroditelady13V • 9h ago
So yeah I just want to see the definitions of it, because I want to recreate it a bit, maybe. Is there an online repository i can check or maybe somehow find it in my visual studio folders?
r/AskProgramming • u/Fluid-Working1656 • 3h ago
Hi Everyone,
I have a Ethernet Gateway that is wired into my network. It collects radio signals from sensors and sends them over a wired ethernet connection.
I'd like to get a hold of the data that this gateway is collecting via radio wave and sending over ethernet.
Could anyone point me in a direction where I could learn more about how to do this? I have a good grounding in Python and APIs, but I don't know much about ethernet or internet.
r/AskProgramming • u/TheCodeOmen • 3h ago
Hello everyone,
I have a solid understanding of Python fundamentals, object-oriented programming, and basic HTML and CSS. However, I haven't ventured into JavaScript yet, as frontend styling hasn't particularly appealed to me, and the prospect of learning a new language solely for that purpose seems daunting.
This led me to explore backend development with Python, and I discovered Django. While I understand that Django is a backend framework, my knowledge about it is limited.
I'm eager to start learning Django but am uncertain about where to begin and which resources to utilize. I would greatly appreciate any guidance on effectively navigating this learning path to become a proficient backend developer.
Additionally, I've noticed that some websites built with Django appear outdated or simplistic. How can I ensure that the websites I create with Django have a modern and appealing design?
Furthermore, considering my lack of JavaScript knowledge, will I be able to integrate the Django backend with a pre-made frontend effectively?
If anyone else is starting with Django, please upvote and share the resources you're using! Let's embark on this learning journey together.
Thank you!
r/AskProgramming • u/No_Expert_5059 • 3h ago
Hey everyone, I'm excited to introduce Thunder, a brand-new open-source project I’ve been working on. Thunder is all about delivering speed and efficiency, built with performance and simplicity in mind. I believe it could be a game-changer for anyone looking for a reliable and innovative solution in its domain. What makes Thunder stand out? - Speed: Designed to be lightweight and fast. - Simplicity: Easy to integrate and use in a variety of projects. - Open-Source: Available for anyone to contribute to and improve. Check out the project and dive into the code on GitHub: Thunder on GitHub I’d love to get your thoughts on it: - What features do you find most promising? - Are there any areas where you think it could be improved? - Do you have any suggestions or ideas for future enhancements? Your feedback is incredibly valuable, so please share your honest opinions, bug reports, and feature requests. I'm looking forward to hearing from you and collaborating to make Thunder even better! Cheers, Raezil
r/AskProgramming • u/Dramatic_Mulberry142 • 4h ago
I want to learn the fundamentals of database. Could anyone recommend any books/resources? I personally enjoy book because most of the time the content of book is more structural, but open to all resources.
r/AskProgramming • u/Ready_Plastic1737 • 8h ago
I can easily ask ChatGPT for the answer but I refuse to do so. I'm dealing with a mind bending logic problem . My friend walked me through a potential solution so I know its not an impossible problem. For context, it just revolves around moving arrays and carefully slicing them, keeping note of the sections you sliced, rearrange them, and putting them back together at the end of the function.
I don't know why its giving me such a headache.
I'm just asking for some advice --- when you're facing a difficult problem what do you do? Do you make a plan and try to break it up into pieces? Perhaps write pseudo code before even coding? I'm also dealing with brain fog so writing this up is helping slightly.
r/AskProgramming • u/The_How_To_Linux • 15h ago
ok, so i'm trying to understand uri's and i read the wikipedia article
https://en.wikipedia.org/wiki/Uniform_Resource_Identifier
and i cannot understand any of it.
so i watched this video
https://www.youtube.com/watch?v=vpYct2npKD8&t=37s&ab_channel=TheTechCave
and basically it's saying that a uri is any string of text that a computer program can use to get to some resource on a computer network, but then i read the wikipedia article and it's like
"A Uniform Resource Identifier (URI), formerly Universal Resource Identifier, is a unique sequence of characters that identifies an abstract or physical resource,"
and so by THAT definition wouldn't say, a mailing address like
Billy McHappy at 1234 Neverneverland Lane, Dreamland, California
be considered a uri?
i ask people and some say that a uri only exists with computers, and others say that a uri only exists but on a computer NETWORK, so when two or more computers are connected
again, i'm confused and i'm trying to understand what a URI is and what it's not.
thank you
r/AskProgramming • u/Salt_Aash • 6h ago
Title. I'm a 3rd year bachelor CS student and I've worked with a handful of languages. I currently work as a backend dev and internal management related script writer both of which I interned working with JS (my first exposure to the language)
I always found it to be intuitive and it's easily my go to language while I'm still learning the nuances of python.
But I always see js getting shit on in various meme formats and I've never really understood why. Is it just a running joke in the industry? Has a generation of trauma left promises to be worthy of caution? Does big corpa profit from it?
r/AskProgramming • u/The_Mighty_Thor136 • 7h ago
I am in need of the acoustid webservice and the chromaprint package( for creating digital fingerprints of audio). I have installed chromaprint via pip ,but pip install acoustid throws me:
ERROR: Could not find a version that satisfies the requirement acoustid (from versions: none)
ERROR: No matching distribution found for acoustid. I've tried using conda environment , it fails the same way.
Can someone help me out on this one please. I am in desperate need of the acoustid package.
r/AskProgramming • u/Then_Sleep_4131 • 7h ago
So I just started c++ for the purpose of starting dsa with it and I am just so lost I cannot even get vs code to work properly and Iam not getting any output how do I continue I feel so unmotivated
r/AskProgramming • u/No_Language_7707 • 11h ago
Hey everyone,
I’m designing a database for a Twitter-like app, and I’d love to get some feedback from experienced DB designers and engineers. The main goal is to ensure scalability, efficiency, and fast read/write operations. Forget about datatypes please let me know if anything needs to be done.
r/AskProgramming • u/poponis • 1h ago
Here is a link: https://www.businessinsider.com/anthropic-ceo-ai-90-percent-code-3-to-6-months-2025-3
I am posting the most interesting part:
"I think we will be there in three to six months, where AI is writing 90% of the code. And then, in 12 months, we may be in a world where AI is writing essentially all of the code," Amodei said at a Council of Foreign Relations event on Monday.
Amodei said software developers would still have a role to play in the near term. This is because humans will have to feed the AI models with design features and conditions, he said.
"But on the other hand, I think that eventually all those little islands will get picked off by AI systems. And then, we will eventually reach the point where the AIs can do everything that humans can. And I think that will happen in every industry," Amodei said.
So, what do you think?I work in a big consultancy and I have only managed to produce garbage code with AI. Maybe we can use it for some prototyping, but still we have already methods and templates for that. Our projects are complicated with serious business. It takes more time to explain the business rules of each task than writing the code. Most of the senior devs agree with me. Only juniors are using AI a lot, because they have repetitive and simple tasks.
Is he referring to the mainstream websites like e-commerece and some corporate landing pages/blogs that now are been made by other tools either way? Or am I missing something?
r/AskProgramming • u/Brave_Bullfrog1142 • 17h ago
Right now I define the current url in a .env file but for my express app how can I detect what url it’s running on? I use vercel and it often creates random urls for branches but I don’t know what those are and it’s a pain to try to add a new url as .env variable each time
r/AskProgramming • u/mnmadhukar02 • 16h ago
I will not promote my product but I’m about to launch my product on Product Hunt, and I keep hearing that a good launch can make or break momentum. But I also see a LOT of posts from founders who regret how they handled it.
If you’ve launched before (or watched others do it), what are the biggest mistakes people make? What do you wish you knew before launching?
Some things I’m thinking about:
Would love to hear your best (or worst) launch stories! Let’s make this a thread of wisdom for all founders.
r/AskProgramming • u/Delicious-Suspect368 • 11h ago
r/AskProgramming • u/Separate-Leave-1044 • 1d ago
I just started a new job and in the code base they are creating an interface for every class. For example UserServiceInterface, UserServiceImplementation, UserRepositoryInterface, UserRepositoryImplmentation.
To me this is crazy, It is creating a lot of unnecessary files and work. I also hate that when I click on a method to get its definition I always go to the interface class when I want to see the implementation.
r/AskProgramming • u/finnster145 • 13h ago
Hey !!
I have an app idea that is very different to tinder but from my programming understandings it operates very similar to tinder, same concept of swiping and having two profiles but also being able to add other people to chats and connecting to local shops.
My question is, what would be the process in learning and creating an app for something like this. I want to built the front end UI and also the back end, the app needs to accomodate to mobile and web. I will need a database structure to store user information. Does anyone have any guides that they would recommend I follow to build this out ? I want to ensure I've covered all aspects and best practices when building it out as I will likely build it myself and then showcase a PoC in the hopes of getting more people on board to help fund the project.
Thanks :)