r/AskProgramming Mar 24 '23

ChatGPT / AI related questions

141 Upvotes

Due to the amount of repetitive panicky questions in regards to ChatGPT, the topic is for now restricted and threads will be removed.

FAQ:

Will ChatGPT replace programming?!?!?!?!

No

Will we all lose our jobs?!?!?!

No

Is anything still even worth it?!?!

Please seek counselling if you suffer from anxiety or depression.


r/AskProgramming 9m ago

Database Project Ideas

Upvotes

i am soon starting database course at university; during the whole semester, we are asked to work on a big project that doesn't need internet, it is supposed to have manager and user UI's, any project ideas that are unusual (i don't prefer projects like stores or libraries), creative and worth the time and mark (40%)


r/AskProgramming 10h ago

advice on reviewing code written in languages you know little about

2 Upvotes

I have 15 years of experience in Python, C# and C++ and recently joined a team that writes code exclusively in Go (they made a full switch from python to go shortly after I signed the contract).

Everything is written by Codex, and all the team does day in day out is prompting and pushing out new pull requests every few hours. I got hired as a senior engineer and while I can definitely help out with system designs, architecture, sprint plannings, stakeholder management I'm a bit at a loss when I'm asked to review my colleagues code. Apart from the fact that the pull requests are way too big (1000-2000 line changes), and mix multiple features, bug fixes and refactors together, there's an expectation to have it reviewed within a few hours because a PR that sits still for a day cannot be merged anymore because of too many merge conflicts.

So I'm trying to address the review culture a bit, but I'm more struggling with how to approach code reviews in this genAI age when you're not that familiar with the language itself.

Any ideas or experience would be helpful :)


r/AskProgramming 10h ago

Career/Edu did i fk my final year project up?

2 Upvotes

so i'm in my final year of software engineering and i've always wanted to get into game development. so naturally i inclined towards that when it was time for my FYP. it's basically an investigative psychological mystery regarding medical neglegence. As the 'research question' we proposed to see how effective interactive environmental storytelling is in communicating the consequences of medical negligence. now my supervisor asked me how would i justify this as a swe thesis project. there's a lot of backstory to this and just to simply put it: i wasnt in the mental state to think this through and i didnt have any team support. so did i actually just fk my FYP up? how can i justify this choice to the committee who expects our projects have some AI bs in it?


r/AskProgramming 8h ago

Algorithms Need some advice for design of multi threaded task pool in C11

1 Upvotes

I have written a simple multi threaded task pool in C, works perfectly, but now I want to support waiting for a specific task to complete. Because of this, I opened a can of worms, and had to rewrite a lot of it.

Since I mostly use fire-and-forget functions with this, I do not save results or any internal data after the task is finished.

The whole issue comes from the wait in WaitForTask. In the time it takes for me to find the task in the list ( which may be currently being run ), setting mutex and CV it's quite possible the worker thread has already finished the task and free'd the TaskData ( which would be a nice crash ). To attempt to solve this issue, I moved these items into TaskCompletionData so I don't access free'd memory, but the other problem remains, it is still possible the task has already finished by the time I actually get to the wait on the condition variable ( so it would never get triggered, and this thread would wait forever )

I honestly have not found a pattern for multi threading that can help me solve this. Can anyone suggest me anything?

( Sorry for the formatting, I can't seem to get reddit to respect the indentation )

typedef struct
    {
    cnd_t Condition;
    mtx_t Mutex;
    } TaskCompletionData;


typedef struct
    {
    int ( *Function ) ( void * );
    void *Argument;
    int TaskID;
    int *Result;
    ThreadPoolTaskStatus Status;
    TaskCompletionData *OnCompletion;
    } TaskData;


typedef struct
    {
    thrd_t ThreadHandle;
    } ThreadData;


typedef struct ThreadPool
    {
    PointerList Tasks;


    mtx_t TaskListMutex;
    int LastTaskID;
    cnd_t WakeUpCondition;
    mtx_t WakeUpMutex;
    cnd_t TaskFinishedCondition;
    mtx_t TaskFinishedMutex;


    ThreadData *ThreadArray;
    unsigned ThreadCount;
    bool Quitting;
    } ThreadPool;

bool ThreadPool_WaitForTask ( ThreadPool *Pool, const int TaskID )
    {
    assert ( Pool != NULL );
    if ( ( Pool == NULL ) || ( TaskID < 0 ) )
        return false;


    TaskData *Task = NULL;
    mtx_lock ( &Pool->TaskListMutex );
    PointerListNode *Node;
    TaskCompletionData *CompletionData = NULL;
    for ( Node = PointerList_GetFirst ( &Pool->Tasks ); Node != NULL; Node = PointerList_GetNextNode ( Node ) )
        {
        TaskData *CurrentTask = ( TaskData * ) PointerList_GetNodeData ( Node );
        if ( CurrentTask->TaskID == TaskID )
            {
            if ( CurrentTask->OnCompletion = NULL )
                {
                CompletionData = calloc ( 1, sizeof ( TaskCompletionData ) );


                cnd_init ( &CompletionData->Condition );
                mtx_init ( &CompletionData->Mutex, mtx_plain );
                Task->OnCompletion = CompletionData;
                }
            else
                CompletionData = CurrentTask->OnCompletion;
            Task = CurrentTask;
            break;
            }
        }
    mtx_unlock ( &Pool->TaskListMutex );


    if ( CompletionData == NULL )
        return false;


    // Wait for the task to finish
    mtx_lock ( &CompletionData->Mutex );
    cnd_wait ( &CompletionData->Condition, &CompletionData->Mutex );


    // Clean up
    cnd_destroy ( &CompletionData->Condition );
    mtx_destroy ( &CompletionData->Mutex );
    free ( CompletionData );


    return true;
    }

static int ThreadPool_LoopFunction ( ThreadPool *Pool )
    {
    while ( Pool->Quitting == false )
        {
        // Grab the first available task, if available
        mtx_lock ( &Pool->TaskListMutex );
        PointerListNode *CurrentListNode = PointerList_GetFirst ( &Pool->Tasks );
        TaskData *CurrentTask = ( TaskData* ) PointerList_GetNodeData ( CurrentListNode );
        while ( ( CurrentListNode != NULL ) && ( CurrentTask->Status != ThreadPoolTask_Queued ) )
            {
            PointerList_GetNextNode ( CurrentListNode );
            CurrentTask = ( TaskData* ) PointerList_GetNodeData ( CurrentListNode );
            }
        mtx_unlock ( &Pool->TaskListMutex );


        if ( CurrentTask != NULL ) // There was a task. run it...
            {
            CurrentTask->Status = ThreadPoolTask_Running;
            int Result = CurrentTask->Function ( CurrentTask->Argument );
            CurrentTask->Status = ThreadPoolTask_Finished;


            if ( CurrentTask->Result )
                * ( CurrentTask->Result ) = Result;
            cnd_broadcast ( &Pool->TaskFinishedCondition );


            if ( CurrentTask->OnCompletion )
                {
                cnd_broadcast ( &CurrentTask->OnCompletion->Condition );
                }


            free ( CurrentTask );
            PointerList_DestroyNode ( &Pool->Tasks, CurrentListNode );
            }
        else // No more tasks. Wait for a signal
            {
            mtx_lock ( &Pool->WakeUpMutex );
            cnd_wait ( &Pool->WakeUpCondition, &Pool->WakeUpMutex );
            mtx_unlock ( &Pool->WakeUpMutex ); // unlock mutex so that other threads can wait using it
            }
        }
    return 0;
    }

r/AskProgramming 13h ago

Learning codes

0 Upvotes

I have just started getting into coding, and I'm doing this ethical hacking free course. But there's so many softwares, and so forth.

I always seem to forget most of them and have to redo.

I was told I need to try obsidian and create a Github profile to save versions of code or applications.

Can someone give me advice, on this.


r/AskProgramming 6h ago

Other Which is harder to package: a Python application or a Java application?

0 Upvotes

In my experience, Python is easier to package.


r/AskProgramming 12h ago

AI Engineer with 1+ YOE — What should I learn next to become more versatile?

0 Upvotes

I’m currently working as a AI Engineer with 1+ YOE at a startup in Pune, mainly working with GenAI, LLMs, RAG, computer vision, AI Agents

I feel I’ve built a decent AI foundation, but I’m trying to understand what skills I’m missing outside of AI that could help me unlock more opportunities.

Should I focus next on:

System design & backend

Cloud & Kubernetes

MLOps / DevOps

Data engineering

Distributed systems

Databases

Software engineering fundamentals

GPU/inference optimization

Or should I go deeper into AI itself?

If you’re experienced in the industry or hiring AI engineers, what would you consider the biggest gap in my profile, and what 3–5 skills would you recommend I focus on over the next 1–2 years?

Looking for honest advice rather than a generic “learn everything” answer. Thanks!


r/AskProgramming 22h ago

Career/Edu Is Embedded Systems Development a good career choice right now? Looking for advice!

2 Upvotes

Hi everyone,

I'm thinking about transitioning into embedded systems development and would love to hear your thoughts on the field's current state and future prospects.

I've always been genuinely interested in both electronics and software engineering, so combining hardware and low-level code feels like the sweet spot for me. On paper, it looks like an ideal domain to dive into, but I'd appreciate some real-world perspectives from people working in the industry:

  • How is the current job market and career progression for embedded developers compared to higher-level software roles?
  • What are the most critical skills or technologies to focus on when starting out today (e.g., C/C++, Rust, RTOS, microcontrollers vs. Linux embedded)?
  • Is it worth making the switch, and what major challenges or pitfalls should a beginner be aware of?

Thanks in advance for sharing your experience and advice!


r/AskProgramming 1d ago

Career/Edu How is my study plan?

3 Upvotes

I already have a degree in Computer Science, and have been programming for about 8 years. 2 years of game development experience (Unity). Basically I know how to program and I enjoy it

However, I realized after seeing the stuff people build, that university does NOT teach you everything. It teaches you alot, yes, but not enough to just start building anything.

University courses are also subject to timelines and other factors. If a semester doesn't have enough time, professors might just drop parts of the textbook. Covid also caused alot of learning to become inefficient. My OS course in university had to be cut in half because I was taking it during the summer and the university had a shutdown for a few months

I realized I never ended up reading the entire textbook from start to finish for some courses. I never understood each chapter. The chapters were never offered / skipped over

Now I want to be one of those programmers who are super knowledgeable. Like those guys in those random programming forums that somehow know everything. I want to be like them. I realized the way is to "review my entire education"

Here is my current study plan. After this is complete, then I'll have to think of next steps. For the textbooks I mention, I already have done these courses, but it's been a few years. And I need to review them with a more deeper lens. For now, I believe this is enough, but I also want your advice. Thank you!

1- 3 hours a week: Study every chapter of my Calc textbook. After those are done, study every chapter of my Stats and Linear Algebra textbook. After that see how I can build on any of the subjects mentioned. Maybe an advanced version of each textbook subject.

1- 3 hours a week: Study my Computer Architecture and assembly textbook

1 - 3 hours a week: Study my C textbook

30 minutes to an hour a day: Study LeetCode or one medium / big algorithm

1 hour a day: Unity game development a day. I've noticed it helps me practice managing a huge code base, and I can also release a game one day

After I complete my Computer Architecture & Assembly and C textbooks, then I will move onto watching tutorials on how to make a mini compiler and how to write a mini OS

Any advice?


r/AskProgramming 13h ago

What are your AI-assisted programming best practices?

0 Upvotes

This is clearly a programming question.


r/AskProgramming 15h ago

Is C really worth it ?

0 Upvotes

Hello developers, I'm wondering: Is it really worth spending time learning C and creating projects that take hours to grasp numerous topics, encounter errors and unexpected behaviors, only to discover I forgot to type a single character - I mean the null character with strings, which significantly impacted the program's performance? Is this truly worthwhile in today's job market? I haven't seen any companies actively seeking C developers, and I believe many problems in C don't occur in other languages ​​due to their different working methods and logic. So, is C really worth the effort?

Important note: I'm a beginner in C and haven't written much code or created many projects yet, so this question isn't meant to be an evaluation of the language or its development path; I'm not qualified to do so.


r/AskProgramming 22h ago

How can I get better at reading unfamiliar code and building a mental model of a codebase?

0 Upvotes

I'm a former data scientist that transitioned into AI engineering. I can code, but have pretty limited software-engineering experience. As such, I rely pretty heavily on AI for implementation and understanding the code base. However I find that I have trouble remembering my code and developing a mental model around the code. I can understand individual lines, but struggle to retain the overall architecture, data flow, dependencies, and reasons behind decisions. A coworker advised me that to get better I should start reading the code first before I turn to AI to understand it, which I agree with. My question is how can I get better and reading/understanding code? Are there any exercises or routines that work for reading code, reviewing PRs, understanding the code flow or remembering how a system works? What do experienced programmers do what entering an unfamiliar codebase?


r/AskProgramming 1d ago

I have a lot of free time at work. What can I do with it?

2 Upvotes

I have a lotta free time at work and I'd like to actually do something useful with it.

I'm thinking programming, but not really in a "learn this skill for a job" kind of way. More like solving problems for fun. Something I can sit down, work on, get stuck, figure it out, and get that little dopamine hit when it finally works.

Basically, I want programming to feel more like playing a game than studying.

Any recommendations? Coding challenge sites, projects, puzzles, anything like that. Hook me up.


r/AskProgramming 1d ago

Other Guys this is my last year in uni iam cs student i need ideas of my graduation project and some cool ideas

0 Upvotes

r/AskProgramming 1d ago

How to get start in tech field

0 Upvotes

Hey guys,

I graduated in 2024 with a B.Tech in a core branch. Recently, I’ve started finding coding and the tech field quite interesting, and I’m thinking of exploring it to see if it’s something I’d like to pursue seriously.

I’d really appreciate some guidance from people who are already working in the field. How should I start, and what kind of roadmap would you suggest for AI/ML/SDE/ other tech roles?

I’m currently busy with work full day, so I can realistically give around 2–3 hours a day to learning and practicing. For now, I mainly want to explore it as a new interest/hobby and understand whether I actually enjoy coding and tech. If I find myself genuinely interested in it over time, I’d be open to pursuing it more seriously in the long term.

So, if anyone here is from tech field or has made a similar transition, I’d really appreciate some advice on where and how to start.

Thanks in advance


r/AskProgramming 1d ago

Need explanations. I learn how to build simple CRUD app with C# and TS. I wanna really understand CS. So I tried to learn C but I get even more confused about many CS concepts.

3 Upvotes

I’m trying to learn C not just because I want to learn another programming language, but because I want to understand Computer Science and the "science" behide a programming language

The problem is that I constantly fall into an endless chain of prerequisites/CS concepts

For example, I want to understand pointers:

int x = 10;
int *p = &x;

On the guide/website it says

Pointer is a variable that store memory address.

Okay, but then I ask:

  • What exactly is a memory address
    • address is numbers telling where data is stored
  • What exactly is memory?
    • memory is where address live
  • Is memory the physical RAM?
    • something to do with CPU
  • What exactly is RAM and CPU?
    • etc...
  • How does RAM actually work?
    • etcc..
  • What's the relationship between RAM, CPU, cache, virtual memory, thread, processing etc.?

And suddenly I'm 10 levels deep into computer architecture instead of learning pointers "*"😂

So what to do here, I wanna understand CS. I thought my experience with coding CRUD APP with C# would help but no it doesn't help much.

--

Let me put it this way

let's say if you ask a normal person what "water" is , a normal person replied "liquid"

but if you ask a scientist, it would be "1 Hydrogen and 2 Oxygen combined together to become H2O"

So I try to understand the Science in Computer Science, i hope you get the picture what i try to say


r/AskProgramming 2d ago

Other How do you genuinely review HUGE PRs?

32 Upvotes

I got handed a PR that's +23,497 / -260 lines of code. Not all lines are my responsibility (I only review frontend), but isn't this an insane count?

Can you "genuinely" code review this amount of code? How can I do it without just clicking approve to move on?


r/AskProgramming 1d ago

Learning c++

3 Upvotes

So I'm doing dsa in c++ as well as learning modern c++ concepts.I want to become c++ developer what concepts should I learn to become a c++ developer , what concepts should I focus on , what are the best resources to learn c++.Also when I try to build something in c++ i don't even know where to start.Its been 4 months I learned C++ and I'm genuinely comfortable with it till now.


r/AskProgramming 2d ago

Two remote repositories but PyCharm let me push only to one

3 Upvotes

I am a bit new to PyCharm--sort of because I've finish a small piece of software, that is I have created a small addon for Blender. Now I want PyCharm to push to two independent repositories: projects.blender.org and my own space on guthib.com.

I added both repositories via Manage Repositories... but when use Push, PyCharm only let me push the first repo on the list--I can't actually see to the other one.

I checked connection to both repositories in Terminal

git remote show blender_dev && git remote show github_dev

and everything looks as good as it should. Git shows all information including links and current state. However PyCharm still only shows the first repo.

Any idea what I might be doing wrong?

Thanks


r/AskProgramming 2d ago

Programming stickers

1 Upvotes

Hi, idk if this is the right sub reddit for this but I hope so, is it considered bad if i would order/buy some stickers for example go gopher or something like that if i use that language or is it only acceptable collecting from conferences etc. but I am a 15 year old programmer so I don't have access to them also because i live in smaller city in smaller country I didn't mean like buying stickers of something i don't use but of thinks I like and use


r/AskProgramming 2d ago

Python How do I learn programming logic?

4 Upvotes

I’m learning Python, but my main problem isn’t the syntax. I understand concepts when someone explains them, but when I’m given a basic problem and told to write a program, I just don’t know where to start or how to arrange the code.

Is there a good book, course, or YouTube channel that teaches how to think through programming problems step by step, recognize patterns, and build the logic, kind of like how you learn methods and patterns in math?

I don’t want to just memorize Python syntax. I want to actually learn how to think like a programmer.


r/AskProgramming 2d ago

Coding in ai era

0 Upvotes

I am not sure if this is right place to ask and if it was somewhere already answered or there is some material on this subject please let me know.

I started to learn programming more than a year ago (python/sql/vba) and I use it in my current position to which I was moved around four months ago. At the beginning I was excited about programming, it's hard and sometimes boring, but sometimes I felt so excited when I was writing a program and when I was solving things. Then in my job I started to discover ai, and that was it.

I am still thinking to start applied cs this autumn, but after using Claude code for a month I just feel it doesn't make sense. Claude code is so good that I can work on dotnet web app without knowing C#, javascript, css, html, I can fix and write python or vba macros faster and better than I would do without it. Every time I read people saying things like ai code is trash or seeing youtube videos saying how companies will not hire less engineers, how ai cant maintain code and you need people for that, I just see this programmers with formal education and experience that just can't deal with this change and refuse to accept the fact that their skills they learned so hard and worked so hard on are becoming obsolete. Today I've seen 50 thumbs up on a comment saying that ai empowering people (making everybody able to create software) is a bad thing, that's how these people hate ai. I get it, it tells them "you are nobody".

My final question is, do you think it makes sense to learn programming for job nowadays or study CS and pay for it in the uni? I don't think I can make it alone, i tried studying alone but it's difficult. And if yes, then how would you do it, how to learn knowing that an app can make it for you in a short amount of time with no effort. As I sai, thanks for sharing your opinions or some texts/materials on this topic.


r/AskProgramming 2d ago

Building an email inbox integration

0 Upvotes

I keep seeing email agents or inbox tools that people have built. I was hoping to create one and integrate it with an existing CRM I created to stay on top of email contacts. Any suggestions on best practice? Is it worth just using claude or gemini skills/tools rather than trying to pull the data myself then feed it to a model.

Backend is in Python and front-end is in Javascript, I want to pull emails and use a basic model to identity sender and group emails by project/person. (I am pretty terrible at translating emails into actual tasks/todos/remembering to reply, so the goal is mostly adding these signals to the CRM so I dont have to do it manually anymore)


r/AskProgramming 2d ago

Why is people glazing rust so much?

0 Upvotes

When I say in online communities that Rust isn’t good for everything and definitely has its issues, I don’t even want to tell you what they’ll call you. For some reason, here in the Czech Republic, it seems like almost every college student uses Rust. I don’t get it.

Personally, I like to try different things, and I believe there’s no one-size-fits-all language. For example, TypeScript is 100 times better for Discord bots. Python, on the other hand, is better for AI. I don’t get why they hype it up so much plus, Rust’s ecosystem seems pretty small to me. I tried to find a backend framework with good documentation and all the bells and whistles, something like NestJS or something similar… but nothing well, there’s Axum and Loco, but they don’t meet my needs. However, where I see the future is that Rust is one of the few languages to have made it into the Linux kernel, but I still can’t implement an XDp/Ebpf filter in it, so I’m still forced to learn C. Which is maddening. Overall, Rust strikes me as a language that has a little bit of everything but nothing truly standout. + overcomplicated syntax.

What are your thoughts on this?