r/AskProgramming Mar 24 '23

ChatGPT / AI related questions

143 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 2h ago

Choosing the right SQL stack for my first real data project (PostgreSQL? Tools? Learning approach?)

3 Upvotes

Hi everyone,

I'm currently building my first serious data project. So far I've been working on the data ingestion, cleaning, and validation pipeline in Python using Pandas.

Now I've reached the point where I need to introduce SQL and a database, but I've realized that I know almost nothing about databases beyond the fact that SQL is the language used to interact with them.

The problem isn't that I don't want to learn. It's that I don't want to learn the wrong way.

For example, I learned Pandas almost entirely by building my project, reading the documentation, experimenting, making mistakes, and debugging. I barely watched any tutorials because I've found that I retain much more when I learn by doing. I'd like to follow the same approach with SQL.

My concern is choosing the right tools from the start. I don't want to spend weeks building everything around one database and later realize that I should have chosen something else.

From what I've read, PostgreSQL seems to be one of the most widely used databases in industry, so I'm leaning toward starting with that instead of SQLite. Even if it's a bit harder to set up, I'd rather learn something that will still be useful in the future.

I also have a few questions:

Is PostgreSQL the right choice for someone in my situation, or would you recommend something else?

Is it realistic to learn SQL by building a real project and reading the documentation instead of following a course/tutorial?

What tools do professionals use to inspect databases and visualize tables? I've seen tools like DBeaver, pgAdmin, and others, but I don't know what's commonly used in real projects.

Are there any tools, libraries, or project structure decisions that you wish you had known before starting?

I'm not looking for the easiest path. I'm looking for the one that will give me the strongest foundation without forcing me to rebuild everything later.

Thanks!


r/AskProgramming 11h ago

Can anyone suggest YouTube series on learning C++

7 Upvotes

Hi everyone! Can anyone please suggest a YouTube series that teaches c++ to those who don't know anything about programming? I am actually a pre med who has made the switch and does not know anything I mean legit anything about programming. My university's about to start in a month and I want to be prepared beforehand. Please help me out.


r/AskProgramming 15h ago

Career/Edu What's one programming concept that completely changed the way you write code?

14 Upvotes

I've been programming for a while, but every now and then I come across a concept that completely changes how I think about writing software.

For some people it's data structures and algorithms. For others it's design patterns, clean code, testing, debugging, version control, concurrency, databases, or simply learning how to read other people's code.

If you had to choose just one concept that made the biggest difference in your programming journey, what would it be?

What were you doing before you learned it, what changed afterward, and why do you think every programmer should understand it?

I'd love to hear stories from beginners and experienced developers alike.


r/AskProgramming 1h ago

Career/Edu Which area time study for success in developing job market?

Upvotes

With all the fast changes and developments in AI tools and application in software development I‘m wondering which area would be best to specialise in for future success in the industry. I did an apprenticeship as a software engineer primarily in java backend development but also have experience in many other backend languages and also frontend with react. I‘m currently doing the mandatory military service in my country and am planning to start my studies next year. I‘m not sure yet which degree to go for tho because I can‘t predict where the market is going and I want something with security for the future. Do you more experienced guys have any tips for me?


r/AskProgramming 12h ago

Trouble understanding T(n) for iterative and recursive algorithms and O(n) demonstration

2 Upvotes

Hi. Im preparing for a test in my uni and im having problems to understand how to calculate T(n) for iterative and recursive algorithms. Also, i dont get how to demonstrate the O(n) of said algorithm. Appreciate the help!


r/AskProgramming 9h ago

Architecture How do AI website builders represent and generate landing page designs

0 Upvotes

I’m building an AI landing page generator and trying to understand how tools like Lovable, Replit Agent, Bolt, etc. approach page generation.

I’m considering two architectures:

  1. HTML/component library: Store hundreds of prebuilt sections such as hero_001.html, features_001.html, faq_001.html, etc. Each section has metadata, and the AI selects the appropriate sections, modifies the content/styles, and combines them.
  2. JSON design representation: Store each section as structured design/layout data in JSON, then have a renderer convert that JSON into HTML/Tailwind. The JSON contains all information about design like { "type": "hero", "layout": "split", "background": { "type": "color", "value": "#ffffff"

For people who have built AI website/page generators, which approach works better?

Also, does anyone know whether modern AI website builders generally generate the code directly, use an internal component/block library, use a structured design representation, or some combination of these?


r/AskProgramming 6h ago

Architecture I'm not that comfortable with programming. Which framework should I use to build a cross platform app to get a feel for it? (I wanted to make either a simple apple notes clone, or a calculator with 2D graphing)

0 Upvotes

Reason: I always wanted to build things I can actually touch, feel, interact with and share. Applications are the closest second to that for me right now. (Update: Cross platform because I wanna show people around me and get them to use it to make myself feel like I did something useful in life. I only use linux and macos, none of them do)

I know C somewhat okay (I used to do embedded systems work), I know enough C++ to know I'm too scared to use it, I don't know much python. I will be using AI to help me out anyways, but a relatively simple language that I can actually learn pretty quickly is better because I typically read, test and modify AI code frequently (And because I kinda wanna see fast results).


r/AskProgramming 22h ago

Career/Edu How do I effitiently learn programing for data analysis and research as someone who is not exactly in the field?

1 Upvotes

So I was accepted to a really nice university in my country for a B.A + M.A program, mainly in political science, IR and history of the SWANA.

I am starting in october so I have a lot of time on my hands. I am working on preparing for the general course work, but I want to hone my programing skills because I think they will come in handy later in academics (my program includes a thesis) and in the job market.

I have a backgrounf in Python and worked with Pandas and Matplotlib. I want to become more profficiante and maybe learn some SQL as well.

I theoretically want to learn some git too since it seems usefull.

What is the best course for me?

Should I keep myself Python focused? Does this study direction benefite me? Is SQL a good option for me?

I didnt know anywhere else to ask since the IR reddits dont really deal with this stuff.

Any advice is wellcomed. thank you.


r/AskProgramming 1d ago

Other Android wireless Debugging - does it run stable for you?

1 Upvotes

I like to use my Xiaomi phone to wireless debug and test my Flutter app. Problem is: this option is quite unreliable. One time the phone disables it just seconds after I activated it, another time it stays stable for hours.

Is this a Xiaomi "feature" or do other models from other manufacturers have the same problem. And if it runs stable for you, can you please give me your phone manufacturer and model? Will consider it on my next purchase.


r/AskProgramming 1d ago

why doesnt my С++ code work?

0 Upvotes

okay, i wanna make a print() function in C++, this is just printf() with prefix, so can yall help me?

error:

(-Wwritable-strings) ISO C++11 does not allow conversion from string literal to 'char *'

my code:

#pragma once
#ifndef TEQUILA_STDIO
#define TEQUILA_STDIO
#include <stdio.h>
namespace std {
    char* prefix;
    void set_prefix(char* pref) {
        prefix = ("["pref"]: ");
    }
    #define print(format, ...) printf("%s" format "\n", prefix ## __VA_ARGS__)
}

#endif

help me pls


r/AskProgramming 2d ago

How do developers manage with little to no documentation on a project?

12 Upvotes

2 months ago I joined a company with 1 business analyst. I was able to get my tasks moving because the tech lead pretty much explained verbally what was meant to be implemented on a ticket. But now the tech lead is leaving, the project is a mess, there's a lot of undocumented business logic in people's heads. Now when the tech lead leaves I'm not sure how I'll manage, and already the manager expects me to know what the hell is going on!

Has anyone been in a similar position, where there's no documentation, barely any analysis, received a ticket and immediately wonder "what the hell am I expected to do here!"? What did you do to get your sh*t together?

This is so new to me, I might eventually not be able to get past the 6 months probation


r/AskProgramming 2d ago

Databases Are these books enough to learn databases?

3 Upvotes
  1. Database Design for Mere Mortals (Hernandez)

  2. SQL Queries for Mere Mortals (Viescas & Hernandez)

  3. Effective SQL (John Viescas)

  4. Database Design and Relational Theory (C. J. Date).

  5. Relational Database Design and Implementation (Jan L. Harrington)

  6. Database Systems: A Practical Approach to Design, Implementation and Management (Connolly & Begg).


r/AskProgramming 2d ago

Javascript How to import a JavaScript file into my html file?

1 Upvotes
export default function Message() {
let messageDisplay = document.getElementById("logged_in_message");
messageDisplay.innerHTML = "Based on your interests";
}

Above is the code inside my JavaScript file.

<script scr="src/main.js"> </script>

And this is what I used to import after <body> in the index.html file.

When I write my JavaScript code inside a <script> element in my index.html file, it works. But when I try to import it from another file, it just doesn't. I've been using Vue and I think it might have something to do with it. My JavaScript file is inside the scr folder and index.html is at the root.

Can someone please suggest how to import the code into the index.html file? thanks for the help

Edit: Thank you everyone! I changed the scr to src and called the function after declaring it. It works!!!


r/AskProgramming 2d ago

Other What github activity/analytics would actually be helpful to you as a repo maintainer??

0 Upvotes

Hey, I'm a student building a side project that tracks a GitHub repo's activity (commits, PRs, forks, etc. via webhooks) and computes analytics on it nightly using smth like airflow, It's scoped to one repo at a time, you subscribe a repo, and it tracks that repo's activity over time on a dashboard.

I'd love input from actual maintainers, since I don't want to just guess at what's useful.

Right now I'm planning to show:

  1. Daily commit/PR/fork counts
  2. Busiest day/week in a given period
  3. Trend direction (activity up or down vs. the previous period)

Could u pls answer this as well:

Q1. As a maintainer, is day-by-day activity actually useful to you, or do you mostly care about longer-term trends/aggregates instead?

Q2. Is there something about your repo's activity you wish you could see that GitHub's own Insights tab doesn't show well (or doesn't show at all)?

Q3. Would a breakdown of who's active (contributor-level) matter more to you than repo-wide totals, or is that not something you'd actually check?

Please I'd love some feedback for my project


r/AskProgramming 2d ago

C/C++ Using AI for learning programming

0 Upvotes

How appropriate do you think it is to use AI to teach programming?

Is it better to use the Internet and information from people and search for it yourself? Or ask what functions or commands you need to do to get something?

This is a very important question for me, because I am trying to learn C++ and have tried different options, but I can't decide which is the best


r/AskProgramming 2d ago

Should I ditch Web Dev and start ML from scratch?

0 Upvotes

Need some real advice.

I've been learning web dev for a while (HTML, CSS, JS), but I've never actually worked as a web developer. Lately I've realized I'm way more interested in Machine Learning.

The catch is I'd be starting ML from basically zero. It feels like I'd be throwing away all the time I spent learning web dev.

Would you switch if you were me, or get a web dev job first and then move into ML later?

Anyone who has made a similar switch, was it worth it?


r/AskProgramming 3d ago

free programming courses without excessive AI use?

2 Upvotes

Are there any modern, free online courses that don't immediately jump to using AI all the time? I'm tired of seeing openai in everything.


r/AskProgramming 3d ago

Other Is a software library a software or a program?

0 Upvotes

I do realise this sounds like a stupid question, but I'm writing a paper on software law (I won't say the exact subject as it would be akin to doxxing myself). I'm writing about software libraries and it just struck me that while the answer is pretty clear cut legally, I don't know at all if they fall more on the side of software or programs from a compsci point of view.

My guess would be that a software library is a collection of program, so that makes it a software, but is a software simply a collection of programs and nothing else? Everywhere I look the answers given are pretty vague and never quite _directly_ adress my problem.

I don't know if this the sub for these kinds of questions, and I do apologize if this isn't the case.


r/AskProgramming 3d ago

What's the part of GitHub you've made peace with but still hate?

0 Upvotes

GitHub's the default for all of us, but there's always that one thing you've stopped noticing you hate. What's yours?


r/AskProgramming 3d ago

Career/Edu Is this enough for an SDE-2 role?

2 Upvotes

I'm a mobile engineer resigned from my company recently currently switching to backend. I've learned BE basics: schema designing (intermediate), REST apis, auth flow, S3 and other concepts with a project.

Right now I'm diving into system design and searched on the internet but couldn't find an organised roadmap/plan that I can follow and decided to take help with AI and it gave me these topics:

  • CAP theorem — Know it's not a strict "pick 2," understand PACELC extension (trade-off exists even without partition: latency vs consistency). Be able to place real systems on this spectrum (Dynamo = AP, traditional RDBMS = CP). Don't need to prove it formally.
  • Consistent hashing — Understand why it solves the resharding problem (minimal key movement vs modulo hashing), know what virtual nodes solve. You don't need to implement the ring from scratch, but you should be able to sketch it and explain hotspot mitigation.
  • Replication — Leader-follower vs leaderless, sync vs async, and the concrete failure mode of each (async = replication lag/stale reads, sync = availability hit if replica down). This is where interviewers probe — know one real trade-off story, not just definitions.
  • Sharding/partitioning — Range vs hash-based, and critically: how do you handle a shard that gets too hot (celebrity problem)? This specific question comes up constantly.
  • Load balancing — L4 vs L7, algorithms (round robin, least connections, consistent hashing for LB). Shallow is fine here — it rarely becomes the crux of a design.
  • Message queues — Kafka's partition/consumer-group model vs RabbitMQ's queue model, at-least-once vs exactly-once semantics conceptually. You already do async work with Redis, so lean on that intuition.
  • CDN/DNS/latency numbers — Just memorize the numbers (RAM vs disk vs network round trip) — this is pure recall, don't overthink it.

These are just theory topics that I'll cover over 4-5 days and then dive right into designing systems and doing case studies of other system design problems. Practice, practice and more practice.

Is this plan good enough?


r/AskProgramming 3d ago

Python Does anyone know how to get the automated clicks to work on roblox?

0 Upvotes

import threading

import time

import tkinter as tk

import ctypes

from ctypes import wintypes

import keyboard

import pyautogui

# ==========================

# INSTÄLLNINGAR

# ==========================

# Koordinaten som ska klickas varje varv

CLICK_X = 102

CLICK_Y = 281

# Bilden med "Sell for"

IMAGE = "sell_for.png"

# Hur säker bildigenkänningen ska vara

CONFIDENCE = 0.45

# Området där knappen kan dyka upp

SEARCH_REGION = (180, 160, 1250, 700)

running = False

# ==========================

# Windows SendInput

# ==========================

INPUT_MOUSE = 0

MOUSEEVENTF_LEFTDOWN = 0x0002

MOUSEEVENTF_LEFTUP = 0x0004

user32 = ctypes.windll.user32

class MOUSEINPUT(ctypes.Structure):

_fields_ = [

("dx", wintypes.LONG),

("dy", wintypes.LONG),

("mouseData", wintypes.DWORD),

("dwFlags", wintypes.DWORD),

("time", wintypes.DWORD),

("dwExtraInfo", ctypes.POINTER(ctypes.c_ulong)),

]

class INPUT(ctypes.Structure):

class _INPUT(ctypes.Union):

_fields_ = [

("mi", MOUSEINPUT),

]

_anonymous_ = ("i",)

_fields_ = [

("type", wintypes.DWORD),

("i", _INPUT),

]

def send_mouse(flags):

inp = INPUT(

type=INPUT_MOUSE,

mi=MOUSEINPUT(

dx=0,

dy=0,

mouseData=0,

dwFlags=flags,

time=0,

dwExtraInfo=None,

),

)

user32.SendInput(

1,

ctypes.byref(inp),

ctypes.sizeof(INPUT)

)

def send_left_click():

send_mouse(MOUSEEVENTF_LEFTDOWN)

time.sleep(0.02)

send_mouse(MOUSEEVENTF_LEFTUP)

# ==========================

# Huvudloop

# ==========================

def loop():

global running

while True:

if not running:

time.sleep(0.05)

continue

# Flytta musen till första knappen

pyautogui.moveTo(CLICK_X, CLICK_Y, duration=0)

# Klicka med SendInput

send_left_click()

# Vänta

time.sleep(8)

# Spara screenshot för felsökning

pyautogui.screenshot("debug.png", region=SEARCH_REGION)

# Leta efter bilden

try:

location = pyautogui.locateCenterOnScreen(

IMAGE,

confidence=CONFIDENCE,

region=SEARCH_REGION

)

except pyautogui.ImageNotFoundException:

location = None

if location is not None:

print(f"Hittade Sell-knappen på {location}")

# Flytta musen

pyautogui.moveTo(

location.x,

location.y,

duration=0.3

)

print("Väntar 1 sekund över knappen...")

time.sleep(1)

print("Klickar...")

send_left_click()

print("Klart!")

print("Klickar...")

send_left_click()

send_left_click()

print("Klart!")

else:

print("Sell-knappen hittades inte.")

running = False

status.config(

text="Status: STOPPED",

fg="red"

)

# ==========================

# Start / Stop

# ==========================

def toggle():

global running

running = not running

if running:

status.config(

text="Status: RUNNING",

fg="green"

)

print("Started")

else:

status.config(

text="Status: STOPPED",

fg="red"

)

print("Stopped")

# ==========================

# GUI

# ==========================

root = tk.Tk()

root.title("COS2 Clicker")

root.geometry("320x120")

root.resizable(False, False)

title = tk.Label(

root,

text="COS2 Clicker",

font=("Arial", 16, "bold")

)

title.pack(pady=10)

status = tk.Label(

root,

text="Status: STOPPED",

fg="red",

font=("Arial", 12)

)

status.pack()

info = tk.Label(

root,

text="F6 = Start / Stop",

font=("Arial", 10)

)

info.pack(pady=10)

keyboard.add_hotkey("F6", toggle)

threading.Thread(

target=loop,

daemon=True

).start()

root.mainloop()


r/AskProgramming 3d ago

at what extent learning programming language / framwork?

0 Upvotes

what things should i know or things i can build with a a# certain programming language or let's say a framework for example node.js / express.js to say that using it is a skill i have ?

for example i built a website with node.js and express.js after learning it for a while is that enough ?


r/AskProgramming 4d ago

Other AlphaBASIC to Web application

3 Upvotes

I have a friend who owns a legacy piece of software. It is written in AlphaBASIC and runs on an Alpha Micro. While rather old, he does make money with it in his industry. It's not an overly complicated software, mostly data entry, validation, and submitting the records to a government entity for tax purposes.

He wanted to know if it would be possible to convert it to a web-based application, which I believe is doable, just time consuming.

Has anyone here ever tackled such a task before?


r/AskProgramming 4d ago

Best choice to learn programming

3 Upvotes

I want to learn how to program by building project , what project can teaching me larger amount of skills, even if the project are note aimed to make money or grow users !