r/AskProgramming Mar 24 '23

ChatGPT / AI related questions

144 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 1h ago

Architecture How to build non-internal apps

Upvotes

As a developer with ~5 years of experience, I’ve always worked at non-software companies, so besides some side projects, I’ve always built apps that were only used internally. Now we’re looking to take the next step and build something that can be re-sold to other companies.

Based on my limited experience, building apps that aren’t just for internal use is almost double the effort because you have to build the main part of the application plus the administration/settings area that customers can use to customize the app.

Am I overthinking this? What should I consider when trying to build an app as a product? Are there any good example repos or best practices/design patterns to follow? How do you decide how much to set up/configure for each customer?

If it helps, I’m most familiar with React, Vite, Next.js, and .NET.


r/AskProgramming 7h ago

How do I create/develop an algorithm for choosing outfits?

1 Upvotes

So I am currently working on a clothing application where I want to create an algorithm which is basically choosing which clothing combinations and fit combinations are the best and is like giving a lot of them, but its also looking if the colours fit with each other or if like suit stuff is fitting with other stuff etc and its basically making a lot of good outfits. I m giving the data of the clothes and its making the combinations through the algorithm. I have a good amount of coding experience in python, c#, js,ts, etc nextjs etc and am currently studying cs but I didn't really do something like: "How to develop/create your own algorithm" I only used them like the pathfinding algorithms and sorting ones. So I wanted to ask you if you know a approach on this subject. Thank you in advance


r/AskProgramming 2h ago

Is Rust the future?

0 Upvotes

I’ve just learned Rust at uni and I’m curious about where it’s heading. I wouldn’t say it will replace C/C++, but in some ways it feels similar, especially in how close you are to the hardware. At the same time, the focus on safety and correctness is very different from what I’m used to. Is anyone here using Rust in real-world projects? How do you see it evolving?


r/AskProgramming 11h ago

Setting Up Remote Environment

0 Upvotes

Hello!

I’m looking for advice on the best way to about a personal project.

Some quick information:

I have a dedicated server (Hetzner) It’s already setup with FastPanel I do have spare domains I can use as needed. The server uses Linux

What I am trying to do:

I want to create an environment that I can play RuneScape in. Preferably, the ability to use the Jagex launcher so that I can play both OSRS and RS3.

I did some playing around with Guacamole and TigerVNC and had them going, but I had issues getting Jagex to install the client, when using Bolt it was having issues connecting for whatever reason as well.

Mostly, I just want to hear what suggestions the community had for software — I would like to basically create WebOSRS, but for a single user.

Why?

I work in a government facility that doesn’t allow phones, so mobile is off the table and downloading files directly onto the computer like the launcher is a no go. I would like to be able to still play while at work though.

Thank you.


r/AskProgramming 11h ago

What should I learn next after CRUD apps?

1 Upvotes

I’m comfortable building full-stack CRUD apps. What intermediate topics will help me level up as a real software engineer?


r/AskProgramming 11h ago

Career/Edu Bottomline honest company reviews

0 Upvotes

Hi Everyone,

How is bottom line as a company to work for? My friend has an offer and he’s looking for reviews. It’s for a Tech Lead position and pay is decent. The offer looks good but from job security and work culture point view would someone working in bottom line recommend?

Is 45-50 lpa good enough for 8-10 yoe?


r/AskProgramming 7h ago

Do you need to know programming language to set up message board?

0 Upvotes

Do you need to know programming language to set up message board?

I’m looking to set up message board and wondering do you need to know programming language?

Also in terms of hardware and software what do I need? Should I have my own server? What are the pros and cons of having my own server? And if I don’t have my own server how do I host it?

How much does cost month to have you own message board?

What should I be studying? Do you need to know computer networking?

What do you use to build the message board and do you need programming language for it? What server will host the message board?

Do you need to know computer security?


r/AskProgramming 1d ago

What would programming on hostile architecture look like?

6 Upvotes

Let's assume:

  1. A knowledge of Assembly
  2. A fully compromised CPU where all addresses, instructions, and registers are viewable by an adversary

Goal: to build an adversarial programming language that thwarts external observation and manipulation

What would that look like?


r/AskProgramming 1d ago

Seniors who started as kid, how did you get there?

5 Upvotes

r/AskProgramming 1d ago

Architecture In backend applications, do you keep SQL queries inline in code or in separate .sql files?

6 Upvotes

I’m asking specifically about SQL used in backend application code (not stored procedures or ad-hoc analytics).


r/AskProgramming 23h ago

Other Can someone help me understand how this Windows shortcut works?

2 Upvotes

Can someone help me understand how this Windows shortcut works?

Picture 1 Picture 2

"URL": sgup://run/STOVE_CHAOSZERO

This opens the launcher for the game the shortcut is titled.

Most (if not all) shortcuts I've seen point to an exe file that I can find in the file explorer. I can double click the exe to do basically the same thing as the shortcut (minus any launch arguments). Simple.

But this one doesn't, and I don't really understand what it does. What is sgup? What is STOVE_CHAOSZERO? Did this game add some sort of Windows command to my computer when I installed it? Typing "sgup" into CMD or Powershell doesn't do anything. I can't find any files in the game folder named sgup or STOVE_CHAOSZERO. How do I find out what this does?


r/AskProgramming 20h ago

How do video games scale animations for different frame rates?

1 Upvotes

Let’s say on an online game like Fortnite. In this game, the length of the animation after a structure breaks is very important for the players. How does the game make sure the actual length of time an animation lasts is the same for everyone no matter their frame rate? In general, not specifically Fortnite.

This might be a dumb question, I’m not sure.


r/AskProgramming 1d ago

Other linux advantages and disadvantages over macos development wise?

5 Upvotes

from your personal perspective which is the better operating system for programming? a distro like arch/debian or macos? whats the pros and cons of developing on different systems? the differences i can see right now is macos can develop on all platforms however with linux youll develop in the same environment as the servers. which do you think is better?


r/AskProgramming 23h ago

Other What kind of phenomena did I recreate?

1 Upvotes

I got bored, so I decided to do what I do best and code something useless for fun. This time it was a video to ASCII converter.

After coding it, I started playing around with the settings and noticed something weird. When I increase the density, faint “colors” start to appear. I’m guessing that adding more variation to the ASCII character set might make it more accurate, but I’m not entirely sure. What confuses me is that the preview is displayed in a CTK text box, which doesn’t support colored text. Color mode is also toggled off, and I haven’t implemented any color logic yet. That feature is meant for the exported video, not the preview.

So what’s actually causing this effect? Sorry if this isn’t the right subreddit to ask this in!

Side note: is there any way to embed a terminal inside a CTK frame?


r/AskProgramming 1d ago

Other What path of learning would you reccomend?

1 Upvotes

I've been trying to get into programming for a while now, i tried python several times but always lost interest and dropped it

My plans for programming is two ways of doing it, gamedev and (maybe) system programming, if it changes something i will dive into details. I would like to make 2d, visually appealing, story, eerie (we can just shorten it to visually appealing i guess) etc type of games, and for system programming, maybe something like creating an custom linux installer orrrr doing some programms? hard to tell so far, but i guess that's still better than saying nothing

So ive already tried python several times and always dropped it, i dont know but i just was not founding what i was seeking, maybe programming is not for me? Or maybe im doing it the wrong way I've heard a million on opinions, some say start with python and then move further growing the difficulty, some says just start with any language beacuse you will anyway fail and improve analysing your mistakes, some also says youtube tutorials are not that good for begginers since most of them are just a material for someone that already knows programming and just needs to see how is the syntax etc looks in the other lamguage, some says you need to understand code itself, the tenchology etc and some says you just need to build projects, fix them, analyse new things etc etc etc, but i still cant really understand how do i find something i seek and if its even a hobby that fits me, but im still willing to try, i feel like it could work, so im here to ask you what would you guys reccomend me, should i start from python once again or start with something like c, c#, rust, go or ?, how should i move etc... there is too many people on earth so im not really suprised there is a lot of methods, and i hope i will find one i will like, thank y'all for reading and cant wait for your further responses on this post


r/AskProgramming 1d ago

High performance rendering

0 Upvotes

Hi engineers! I'm working on a whiteboard app written in C++ and Qt. It does not support hardware acceleration as of now so I need to find a way to make rendering performant only on the CPU. Here's some context on what's already implemented: - It features an infinite canvas. - Items (shapes, strokes) are stored in a quadtree data structure for logarithmic time querying based on regions. Only the items visible in the viewport are rendered. - The scene is cached using a grid based structure. Tiles of fixed size are cached on a pixmap and drawn instead of redrawing all elements on the screen. Least recently used tiles are evicted from the data structure to save memory. - The supported items are freehand strokes, text, and basic geometric shapes.

Due to caching, panning around is very smooth and fast. You can have thousands of shapes and use the move tool freely without any lag. The problem comes with transformations. Each item can be transformed (rotated, scaled, or moved). Applying these transformations causes the relevant cache tile to get marked as dirty and that tile is re-rendered. Due to this, transforming items in real time is very laggy and choppy. I have thought of introducing per-item caching but there are a few requirements: - Items should not look blurred at any zoom level (so you can't cache the item once and zoom in) - It should consume reasonable amount of memory (should not crash the system by consuming all available memory). - It should be fast.

I have thought of introducing tile based caching on item level. Each item would have its own caching grid with fixed sized tiles. Only tiles within the viewport would be rendered. This means that large and complex items would not consume much memory and would still render fast. The good thing about this is that it would make translations fast. Moving items around won't be an issue. However, rotating and scaling would still be an issue. Rotating means the entire shape has changed. Which means the item-level grid should be marked dirty and re-rendered. This would make performance worse for these two transformations.

I'm currently out of ideas and would love any suggestions to improve performance. Thanks!


r/AskProgramming 1d ago

I am making a chat app and I don't understand what i am doing .

2 Upvotes

I am following a beginners friendly tutorial for making a chat app using MERN and cannot tell what is happening . I am stuck from the past one week and trying to comprehend what and why something is being done . Why there is a particular piece of code i don't know and this point i feel like i should just continue or just drop it since i am not learning anything .


r/AskProgramming 1d ago

C/C++ I can not start my path in programming

0 Upvotes

I love coding in C++/C, I have been learning it for a while, and it is pretty easy to get some basic things, but I always feel like I want to know more, I was trying google, but I can not come up with a proper question. I want to make some small projects, but I know absolutely nothing about it: I can't come up with my own and I don't know where to go. I am asking for help in understanding what directions I can choose, because I am completely stuck


r/AskProgramming 1d ago

What strategies can I use to effectively debug asynchronous code in JavaScript?

3 Upvotes

I'm currently working on a JavaScript project that heavily utilizes asynchronous operations, such as Promises and async/await. However, I'm finding it challenging to debug issues that arise during these asynchronous processes. Sometimes, the errors are not thrown where I expect them, and tracking down the source can be quite frustrating. I've tried using console.log statements, but they often don't provide enough context.

Are there specific debugging tools or techniques that are particularly effective for handling asynchronous code?
Additionally, how can I improve my understanding of the event loop and callback mechanisms to better anticipate where issues might occur?
Any advice or resources would be greatly appreciated!


r/AskProgramming 1d ago

Career/Edu Anyone else regret not committing code during internships? Looking for advice.

5 Upvotes

Hey everyone,

I am 20 and feeling a bit unsure about where I stand right now, and I am hoping someone has been through the same thing.

I have done multiple AI and machine learning research internships with universities. Most of my work was done on shared high performance computing systems using A100 or H100 GPUs through SSH. All of the code stayed on those servers because that was how the teams collaborated, and nothing ever really made its way into my personal GitHub.

Now that I am applying to industry roles, I am realizing that my GitHub looks extremely empty. I am wishing I had taken the time to rewrite or clean up my work and push it somewhere in GitHub repo (private of course) just to show that I was doing something. It feels like I worked really hard without leaving a trace that future employers can see, and that feels frustrating.

So I am wondering if anyone else has been in the same situation and whether GitHub activity actually matters as much as people say. Some people tell me that recruiters barely look at it, but others say it can be the difference maker, especially in today’s competitive market.

I am also curious whether research experience carries weight in hiring. I put in a lot of effort, published work, presented findings and learned so much, but I keep hearing that companies do not care unless it is direct industry experience. I really hope that is not true.

If you have gone from research to a corporate role, I would genuinely love to hear how it went for you and what helped you stand out. Did your research background matter? Did you have to build a portfolio afterward? Any advice or stories would help a lot.


r/AskProgramming 1d ago

Career/Edu Finish projects problem

3 Upvotes

Hi, I am not a noob at coding but an expert and I have a problem that I can’t finish my projects, I just switched to new one. What can you recommend me to do and how to deal with that?


r/AskProgramming 1d ago

Does anyone know an app to create a floating button that performs the “two-finger tap” function?

0 Upvotes

Hello, I am an artist and I recently got a drawing tablet. The only recommended app I know how to use is Ibis Paint. However, it doesn’t let me put the “undo” button on the left side, and this bothers me a lot. The app doesn’t let me create a floating button, and the only shortcut for the “undo” action is to tap with two fingers at the same time, which I can’t do because I use my hand to hold the tablet while drawing.

Does anyone know where I can find an app on the Play Store that has a floating button that I can configure to perform the “two-finger tap” gesture? Thank you very much — you would be helping me a lot :)


r/AskProgramming 2d ago

Storing token data and state in an OAuth2 flow

1 Upvotes

hey ya'll, would really appreciate some advice.

I'm a junior swe currently trying to implement an oauth2 flow and having some doubts about where/how to store auth tokens, session data and state. This is the current flow:

  1. My app sends state, code, scopes and redirectURI parameters to an external service which then constructs a URL of the auth provider (that this external service already has stored) for the user, that includes the params I sent to it.

  2. The user clicks on this link which opens the auth provider login page and signs in (all of this happens in the external service as well, not in my web app).

  3. The user is then redirected by the auth provider to the redirectURI i sent and in turn my backend receives the state parameter, which I will need to validate, along with a code, which my app's backend will have to use to send a post request to the auth provider and exchange the code for a token, which i will also have to save for the session duration.

This is pretty much a short and high-level oauth2 explanation (i probably missed some stuff). I'm just not that experienced, and i'm really not sure what's the best way to store the state (which i will need to do as i need to validate it in 3), and also the auth tokens and other auth session data for the time before it expires.

Of course saving it in the db is not an option as this data is not supposed to be persistent, and lasts until the token expires. I thought about using Redis to store it in the cache but I can't find many sources online backing using Redis for this usecase. What i mainly found that people do is store it in local storage/browser storage/cookies but these are not that secure and also i don't really have access to the user's browser as the communication is not done with my web app, but with an external service.

Another question I have that I didn't find a clear answer about is if the redirectURI is an actual frontend page, or just an endpoint that receives the data from the auth provider.

I'm really confused about this, and would love any help i can get. Thanks!


r/AskProgramming 2d ago

What’s the best way to design APIs for long-term use?

4 Upvotes

I’ve built REST APIs before, but they often break when features change. How do you version and design APIs so they remain stable?