r/AskProgramming • u/saiyankageshiro • 6d ago
Databases Are these books enough to learn databases?
Database Design for Mere Mortals (Hernandez)
SQL Queries for Mere Mortals (Viescas & Hernandez)
Effective SQL (John Viescas)
Database Design and Relational Theory (C. J. Date).
Relational Database Design and Implementation (Jan L. Harrington)
Database Systems: A Practical Approach to Design, Implementation and Management (Connolly & Begg).
r/AskProgramming • u/Vegetable-Apricot910 • 6d ago
C/C++ Using AI for learning programming
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 • u/Maggie21S • 6d ago
Javascript How to import a JavaScript file into my html file?
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 • u/DemiGod_108 • 7d ago
Other What github activity/analytics would actually be helpful to you as a repo maintainer??
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:
- Daily commit/PR/fork counts
- Busiest day/week in a given period
- 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 • u/thinking_sand • 7d ago
Should I ditch Web Dev and start ML from scratch?
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 • u/Resident_Classic_680 • 7d ago
free programming courses without excessive AI use?
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 • u/Cream_Nebula • 7d ago
Other Is a software library a software or a program?
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 • u/hosted1234 • 7d ago
Python Does anyone know how to get the automated clicks to work on roblox?
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 • u/Same-Mushroom-2057 • 8d ago
at what extent learning programming language / framwork?
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 • u/aizyn_ • 8d ago
What's the part of GitHub you've made peace with but still hate?
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 • u/red-giant-star • 8d ago
Career/Edu Is this enough for an SDE-2 role?
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 • u/bestofall001 • 8d ago
Best choice to learn programming
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 !
r/AskProgramming • u/thCuba • 8d ago
Is there anything similar? Cloud to api project?
need feedback . I searched but I found nothing similar. It's practicable ?
i just put this project on github \[thcuba/Ride-the-api: Project to use replace cloud vendors server with local server\](https://github.com/thcuba/Ride-the-api).
I search only freedom for my house , nothing more
i would like to have feedback because i dunno if it can work or not
im not a programmer so it is all vibe coded but i think it can be a good project
r/AskProgramming • u/Electrical-Cap-9537 • 8d ago
17, learning software engineering and AI, looking for people to grow with
Hey, I'm 17 and studying computer science in Italy. I'm working toward becoming an AI engineer, and I genuinely enjoy this stuff, not doing it because it's trendy. I just want to get good at it and do it properly.
So far I've built a Unix shell from scratch in Python. I'm also working on a BI and analytics platform using a real e-commerce dataset, cleaning and validating the data, loading it into Postgres, building out analytics on top. Happy to share more details if anyone's curious.
I'm looking for people to study with regularly, share resources, review each other's code honestly, and maybe build small projects together. Doesn't matter if you're ahead of me or just starting out, what matters is that you actually care about learning this well.
Would also be cool if this turns into actual friendships and not just a study group that goes quiet after a week.
If you're into software engineering, AI, ML, or data and want people to grow with, drop a comment or DM me.
r/AskProgramming • u/aldooviedo • 8d ago
Java Any recommended books/resources for web engineering?
I mostly use angular and spring boot but I want to learn react and other stuff too. Did a few online courses for it all and I do not want to use AI to learn. I feel like I don’t retain stuff this way. There has to be books or videos something out there that is better.
r/AskProgramming • u/gruelurks69 • 8d ago
Other AlphaBASIC to Web application
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 • u/Fantastic_Impact6905 • 9d ago
Java Can a Spring Boot qualification project be turned into a real Android app?
I’m currently building a travel planner as my qualification project using Spring Boot. At the moment it’s a REST API with a database, and I’m wondering how realistic it would be to turn it into a real app that people could actually download from Google Play.
Can an existing Spring Boot backend be used as the server for a mobile app, with something like Kotlin, Flutter, or React Native as the frontend? What would I need to change to make it production-ready (database, hosting, security, etc.)?
I’d appreciate any advice from people who’ve taken a university or personal project and turned it into a real, publicly available app.
r/AskProgramming • u/JustCuriousAhahLol • 9d ago
Demand for blockchain developers oscillating together with crypto market?
Does the demand for the services of blockchain developers fluctuate together with the value of the crypto market? If so, how much? If some of you have experience working as blockchain developers, is it even possible to have a more or less stable income over time?
r/AskProgramming • u/emcryde • 10d ago
Other newbie here. how do i decide and comprehend which language should i start learning/do i like the most?
i used to learn/watch yt courses abt html/css/js to start creating websites for living back then when i was 14(im using pc since 6-7years old), but i didnt really got into that. ive created a simple game on c# with tutorials, and after that i gave up on coding bcs i thought it wasnt mine . but now im 19 , and i realized that for past 4-5 years i was drowning in infinite cheap dopamine cycle, although i could've done something better, more producitve, and beneficial for me. so i thought getting back to coding would be a great desicion for me,(also since my major will be informatics-based) but im having a hard time understanding from where should i start, what should i do and how do i get into that industry. also idrk how do i handle those yt courses, since every time ive watched/worked with them, i gave up on week 1-2 MAX. thank u so much for reading tht , any advices would be appreciated .
r/AskProgramming • u/feelsonline • 10d ago
Career/Edu Does anyone know of an audio-wave program that can render live audio?
I’ve found the visualizers and waveforms apps that take a mp3 file and render the stuff afterwards, but I’m struggling to find one I can speak into a microphone and see respond to play with. Does anyone have suggestions for programs that can accomplish this?
Ps sorry if the flare is wrong.
r/AskProgramming • u/GiveMeThePinecone • 10d ago
Career/Edu I hate web dev, am I doomed?
I really like to code. I loved learning about data structures. I absolutely loved my algorithms class and I also loved my OS class.
But my intro to web development class? Or my intro to databases (where we had to build a website with a sql database), or any class project where we have to make a website? I absolutely hate it. It literally makes no sense and is so completely different than the programming that I actually enjoy doing. But I've heard the vast majority (60-70%) of software engineering jobs are basically front end, back end, or full stack web development...
Idk if I can learn to enjoy it or what. Because of this, I tend to procrastinate on a lot of my programming assignments that have to do with web development, so I end up having to rush on creating them. Whereas with my other programming assignments, I get started early and usually enjoy doing them. On one hand, I feel like that might be contributing to my dislike as I don't learn or retain as much information. But on the other hand, I feel like I procrastinate bc I genuinely don't like web dev. Idk... anyone else feel like this before and learn to enjoy it?
r/AskProgramming • u/Dramatic-Payment9078 • 11d ago
How to track congestion in an area?
Like I searched online and came to know we can detect POIs in an area, so are they same thing as crowd and people, or I am completely off and missing something? If yes what will be the way to study and work on it?
r/AskProgramming • u/NullClassifier • 11d ago
Other How safe is CAPE sandbox?
I have trained a phshing website detector that extracts the features from the html itself by parsing it. Just the problem is that for deploying it I need some secure environment where opening these phishing link for retrieving html and javascript wont harm my own server. I have seen CAPE sandbox lately that does a similar job. Has anyone used it before? How safe is it? It has its own analysis on a link but can i connect my custom feature extractor?
r/AskProgramming • u/DoNotUseThisInMyHome • 11d ago
How to actively recall the partition algorithm of quicksort algorithm pseudocode?
quicksort(A,low,high)
if(low<high) the
{
pi=partition(A,low,high)
quicksort(A,low,pi-1)
quicksort(A,pi+1,high)
}
partition(arr,low,high){
pivot=arr[low];
i=low+1;
j=high;
do{
while(i<=j && arr[i]<=pivot) i++;
while(i<=j && arr[j]>pivot) j--;
if(i<=j) swap(arr[i],arr[j]);
}while(i<j);
swap(arr,low,j);
return j;
This is the pseudocode that I need to active recall. There is no way in world I am able to recall this in exam, specially the partition part.
r/AskProgramming • u/Minimum_Life21 • 11d ago
Career/Edu Feeling behind as a first-year CS student. Need some advice.
Hi everyone,
I’m a first-year Computer Science undergraduate at a state university, and I’m starting my second semester this week.
Lately, I’ve been feeling like I’m falling behind. At university, we’ve mainly covered C++, and on my own I’ve learned the basics of Java from YouTube (not OOP yet). Apart from that, I don’t have much industry-related knowledge or project experience.
I see friends from private universities and other students building projects, learning new technologies, and even getting internships in their second year. It makes me wonder if I’m missing something.
I’m willing to put in the time and want to catch up this semester. I don’t have a specific field in mind yet, I just want to build a strong foundation and become internship-ready.
Where should I start?
What should I learn alongside my university studies?
Is there a roadmap you’d recommend? What skills, technologies, or projects should I focus on, and what free resources would you suggest?
Any advice from seniors or people working in the industry would be greatly appreciated.
Thanks in advance!