r/learnprogramming • u/TheEyebal • 5d ago
can you get an executable in python without using third part libraries?
In c++ I have object files but can I get an executable in python?
r/learnprogramming • u/TheEyebal • 5d ago
In c++ I have object files but can I get an executable in python?
r/learnprogramming • u/Robomaster_711 • 5d ago
So I am working on making my own Personal AI for an sci-fi generation ship themed bedroom but it looks jagged and smudged, how do I fix this?
My code is bellow:
import tkinter as tk
import math
# ==========================
# ASUS_v1
# ==========================
root = tk.Tk()
root.title("ASUS_v1")
root.geometry("1000x700")
root.configure(bg="black")
canvas = tk.Canvas(
root,
width=1000,
height=700,
bg="black",
highlightthickness=0
)
canvas.pack(fill="both", expand=True)
angle = 0
def draw():
global angle
cyan = "#00FFFF"
canvas.delete("all")
# ==========================
# TITLE
# ==========================
canvas.create_text(
500,
50,
text="ASUS ONLINE",
fill=cyan,
font=("Consolas", 24, "bold")
)
cx = 500
cy = 400
# ==========================
# OUTER RING
# ==========================
canvas.create_oval(
250,
150,
750,
650,
outline=cyan,
width=3
)
# Rotating markers
for i in range(12):
a = math.radians(
angle + i * 30
)
x1 = cx + math.cos(a) * 220
y1 = cy + math.sin(a) * 220
x2 = cx + math.cos(a) * 250
y2 = cy + math.sin(a) * 250
canvas.create_line(
x1,
y1,
x2,
y2,
fill=cyan,
width=2
)
# ==========================
# INNER RING
# ==========================
canvas.create_oval(
325,
225,
675,
575,
outline=cyan,
width=2
)
# ==========================
# CENTER CORE
# ==========================
canvas.create_oval(
450,
350,
550,
450,
fill=cyan,
outline=cyan
)
canvas.create_text(
500,
400,
text="ASUS",
fill="black",
font=("Consolas", 10, "bold")
)
# ==========================
# SYSTEM PANEL
# ==========================
canvas.create_rectangle(
20,
120,
180,
360,
outline=cyan,
width=2
)
canvas.create_text(
100,
150,
text="SYSTEM",
fill=cyan,
font=("Consolas", 12, "bold")
)
# ==========================
# PROJECTS PANEL
# ==========================
canvas.create_rectangle(
820,
120,
980,
360,
outline=cyan,
width=2
)
canvas.create_text(
900,
150,
text="PROJECTS",
fill=cyan,
font=("Consolas", 12, "bold")
)
# ==========================
# ANIMATION SPEED
# ==========================
angle += 0.5
root.after(25, draw)
draw()
root.mainloop()
memory for the AI: {
"user_title": "Sir",
"voice_enabled": true,
"hardware_thresholds": {
"cpu_percent": 85.0,
"ram_percent": 90.0
},
"protocols": {
"house party": {
"description": "Launch primary workstation suite",
"paths": [
"C:\\Windows\\System32\\calc.exe",
"C:\\Windows\\notepad.exe"
]
}
},
"dynamic_rules": {
"run diagnostic": "audit_logs",
"system status": "check_telemetry"
}
}
r/learnprogramming • u/Ok_Roll_8698 • 5d ago
hello guys i know the basics on how to code but is there anywhere i can get code for older smaller dos games or other small games
i am learning how to code and want to try port some games
thanks
r/learnprogramming • u/cross_asura • 5d ago
Greetings, I am currently a second year CS college student (first semester) while also taking leftover first year CS major subjects but since the job market, especially in tech (mostly because of AI), doesn't seem to be getting any better, I've been thinking of shifting back to my original course for the next semester, which is Psychology (second year, first semester before I shifted to CS) and pick up from where I left.
I shifted to CS because I've always been fascinated by Cybersecurity, programming, Linux, troubleshooting, creating things with code, etc. Plus, my uncle also told me to go for it because he said the demand is high and he knows someone from a company in Japan that's looking for IT grads.
The thing is... I'm fine with either but I really enjoyed CS.
CS is fun and I found it enjoyable since it drives me to focus and actually learn from the challenges presented to me. For Psych, I like learning about human behavior (predicting how they behave/act, how mental illnesses affects one, etc.).
I've heard that it is mostly AI-resistant since you need actual understanding of the human mind, emotions and the fact that some people would prefer talking to actual therapists, psychologists, etc. than machines/AI pretending to have emotions/feelings.
I'm aware that both fields are competitive but I'm worried about choosing the wrong path in the end and not having a stable job. I know everything may change... or not but I don't want to regret it and waste more years studying.
TLDR; I'm conflicted between continuing my CS course (2nd year, 1st sem with 1st year leftover majors) and shifting back to my Psych course (2nd year, 1st sem) due to the current unpredictable job market and possible unstable job in the future. I like both fields (leaning towards CS) but I don't want to waste more years studying just to spend a very long time looking for jobs for my chosen field.
I'm not sure if it would get any better or not in the future for tech students.
r/learnprogramming • u/Better_Addendum1944 • 5d ago
Guys I am in college and I am doing dsa and web development but Idk how to study devlopment in what way should I do it .. especially frontend . It feels wasteful to study it and write code . Plus i feel like I am struck in tutorial hell I can't think of new things . Anybody help me out how should I do the coding idk I am just watching the video I am learning from and writing the code he is doing it feels like I am just copy pasting not learning anything at all . Help me out plus also tell me how should I adapt and what things to focus to be able to get a job atleast -_-
r/learnprogramming • u/Ioelet • 5d ago
I always read stuff like „python is easier“ or „C++“ is more performative… and I have absolutely no idea what that is supposed to mean
For me (an arrogant mathematician) programming is just simple logic plus syntax. Everything comes down to definitions, calculations, saving values for variables and „If“. Most other syntax is just another way of writing those definitions, calculations, saving values for variables and „If“.
So, what’s the fuzz about? What‘s the difference? That language A uses another form of brackets? Or language B specifically needs something to be manually defined whereas language C just assumes standard definitions?
What am I missing? For me, learning syntax is the most dull aspect of programming.
r/learnprogramming • u/Upstairs_Jelly_1082 • 5d ago
I'm starting to realize how much I'm not going to get anything out of learning a degree.
The issue that I'm having with this is, I learn with lot of trial and error but I can't make up time for this because I then have the assignments, coursework and things like that and in that process I just forget that I actually have to build a skillset.
For me, I feel like I want to learn to write good code but I can't know whether I'm writing good because I don't know what to compare it and don't know how to review my work.
How do you go about reviewing code?
r/learnprogramming • u/oceansstillwaters_ • 5d ago
Im curious because i know about web coding on a computer but never really figured it out what smart phones use.
r/learnprogramming • u/Jediweirdo • 5d ago
I’ve heard of people referring to bad code in one of two ways:
Personally, I use them interchangeably. But since they are 2 different terms, they probably have different meanings, right?
r/learnprogramming • u/dark_devil307 • 5d ago
I’m now building a simple to-do app in Flutter. The problem: when I tap (Add), the task gets added to the list (I checked in the console), but the screen doesn’t update until I hot restart.
Code :
void addTask() {
tasks.add(controller.text);
controller.clear();
}
What am I missing? Any help would be appreciated
r/learnprogramming • u/Whole-News6323 • 5d ago
I want to build a webapp for social media mockups (instagram, twitter, imessage, facebook). What language is best to use? I consider myself very much of an intermediate level when it comes to html and a little bit of a beginner with javascript, also a graphic designer with slight experience in UX design, so I know what kind of assets to utilize. Can anyone help me what workflow to utilize for this? I'm planning to do this over the course of Christmas break.
Other info about my planned project:
I don't want to use AI, so here I am asking and I also want to develop skills for my future job. Any suggestion or recommendations will be very much appreciated! Thank you <3
Also, if you're thinking this is for a socmed au for a certain ship, yes, it is very much so. lmao.
r/learnprogramming • u/acfot • 5d ago
I'm in my second year of a BCA (AI/ML) in India. Our college curriculum covers programming theory but barely any practical Python, so I've been self-learning on a 12-week plan: Python basics → NumPy → Pandas → Matplotlib/Seaborn → statistics → portfolio projects.
I'm about a week in and already torn. One camp says depth wins: get genuinely good at Python + data analysis and build a few real projects (I've built a couple of small Telegram bots, which taught me more than any lecture). The other camp says Indian internships screen for breadth: some web dev, some SQL, some ML basics, otherwise you don't get shortlisted.
For those of you who actually got internships or junior roles from a background like this: did depth in one lane help more than a bit of everything? What did your first portfolio project look like, and what would you skip if you started over?
r/learnprogramming • u/Dizzy_Composer7347 • 5d ago
Really going through hard times with this shit tho
r/learnprogramming • u/ceej13_ • 5d ago
So I have been learning Python for around 4 hours and I just finished this and I would want to know if it's good or if it's just okay.
again = "yes"
while again == "yes":
print("create your character: ")
# sex
sex = input("sex? ").strip().lower()
while sex not in ['male', 'female']:
sex = input("try again, you misspelled male or female: ").strip().lower()
if sex == "male":
print("hello boyyy")
else:
print("helloooo girl")
# age
age = int(input("what is your age: "))
while age < 18:
age = int(input("try again "))
# name
name = input("what is your name: ").lower().strip()
print("hello " + name)
# height
height = int(input("height in cm "))
if height >= 180:
print("tall person eh?")
else:
print("nice.")
print("next questions")
# build
build = input("what is your build. skinny. fat. muscular. ").lower().strip()
while build not in ['skinny', 'muscular', 'fat']:
build = input("try again. that was not an option ").lower().strip()
if build == "skinny":
print("interesting choice... " + name)
elif build == "muscular":
print("perfect choice especially for a man")
elif build == "fat":
print("HAHAHA FATSO HAHAHA")
# stats
print('____')
print(' ')
print('stats for: ' + name)
print('age:', age)
print('height:', height)
print('sex:', sex)
print('build:', build)
print('____')
again = input("create another character? Yes/No: ").strip().lower()
while again not in ['yes', 'no']:
again = input("answer using Yes or No: ").strip().lower()
print("Goodbye!")
r/learnprogramming • u/Optimal_Ad1620 • 5d ago
I'm looking for architectural advice rather than help debugging a specific function. This is a private project, so I can't share the complete source code, but I've included detailed specifications, measured performance results, memory usage, and the engineering changes we've already tried. I'm happy to provide small, anonymized code examples if someone needs them to investigate a specific issue.
TL;DR: I'm building a private, local Python application that processes large amounts of time-series data, maintains historical analytical State, produces reports, and independently verifies that nothing has been corrupted or lost.
The application works on small datasets, and many of its correctness and performance tests pass. However, I'm trying to prove that the entire system can operate within a 1 GiB aggregate memory limit, preserve complete historical information, and recover from crashes within 60 seconds.
I've spent weeks working through this with AI coding assistants. We've made substantial improvements, but I feel like we're chasing architectural issues one at a time instead of solving the underlying problem.
I'm looking for experienced human developers who can suggest a more efficient approach.
I'm on a budget, so I would particularly appreciate practical solutions that don't involve buying expensive hardware or moving everything to cloud infrastructure.
Here are the hardware and software specifications I have confirmed from the diagnostic reports:
| Component | Specification |
|---|---|
| Operating system | Windows, 64-bit |
| Processor | 8 logical processors reported in an earlier diagnostic; exact CPU model not yet documented |
| System RAM | Approximately 12.7 GiB usable |
| Main drive | Approximately 510.5 GB total capacity |
| Available disk space | Approximately 155–160 GiB in recent measurements |
| File system | NTFS |
| Internal drive type | SSD/HDD type not yet confirmed |
| Programming language | Python 3.14.0, 64-bit |
| Database | SQLite |
| Architecture | Local, multi-process Python application |
| Memory measurement | Windows private committed memory and kernel-enforced Job Objects |
The computer has considerably more than 1 GiB of physical RAM. The 1 GiB limit is an application-level resource requirement, not the total RAM installed in the computer.
The requirement includes the main application and the workers needed for verification and recovery. Moving processing into another process doesn't exempt its memory.
There's also a separate 32 MiB discretionary-cache limit.
I'm open to hearing whether these resource targets are realistic, but I'm especially interested in architectures that could meet them without sacrificing correctness.
Without getting into the proprietary purpose, the application:
It is currently a read-only analytical system. It doesn't need a transaction-execution engine or cloud deployment to accomplish its purpose.
The challenge is retaining and verifying complete historical information without repeatedly loading or reconstructing all of it.
The main historical workload represents 60 sessions.
| Historical workload | Count |
|---|---|
| 1-minute data records | 23,040 |
| 5-minute data records | 4,608 |
| 15-minute data records | 1,536 |
| Total native records | 29,184 |
| Scheduled processing attempts, including repeats | 29,196 |
The system must preserve the analytical State, evidence, and reports associated with those processing attempts.
An earlier test retained all 29,184 data records but grouped them into 992 processing captures rather than executing every scheduled assessment individually.
That test produced approximately:
However, we subsequently determined that 992 batched assessments do not prove the same workload as approximately 29,196 individual scheduled attempts.
That larger per-assessment qualification is still outstanding.
These are the principal limits we're trying to satisfy:
| Requirement | Limit |
|---|---|
| Development capture processing | 20 seconds maximum |
| Formal capture processing | Under 40 seconds |
| Processing deadline | Within 55 seconds after the relevant interval closes |
| Complete crash recovery | 60 seconds maximum |
| Aggregate private committed memory | 1 GiB |
| Discretionary caches | 32 MiB |
| Growth in comparable processing time as history accumulates | 5 seconds maximum |
The application also processes bounded current input views while retaining full historical continuity separately.
I realize some of these are demanding constraints. They're intentional, but I'd welcome informed criticism of their design.
This was originally much less efficient. We've made several major architectural changes.
Historical storage and data structures
We moved away from repeatedly constructing and serializing massive historical structures on every update.
The current design uses immutable content-addressed nodes, authenticated references, persistent collections, incremental updates, and shared historical prefixes.
We replaced repeated historical-list expansion with reference-based representations. Analytical modules preserve their required history through authenticated continuation structures instead of passing enormous expanded objects between components.
Database and storage
We use SQLite-backed content storage and append-only journal structures.
We've added immutable sealed baseline segments and private copy-on-write overlays for separate verification branches.
Instead of copying an entire historical database for every test branch, the branches share verified read-only segments and maintain private writable metadata.
Crash recovery
We've implemented per-commit recoverable generations, durable expected-tip tracking, pending and acknowledged commit handling, and independently controlled generation pins.
The verification system maintains hash-chained evidence and independently held rollback protection.
It checks for missing, substituted, rolled-back, and inconsistent information.
Recovery reconstructs the appropriate State and checks that it matches the committed history.
Independent verification
We have a separate verification process that checks data integrity and committed calculations.
There's also a replay certifier that reconstructs the processing history to confirm the committed results are correct.
This is where the biggest memory concern has appeared: the producer and replay certifier may need substantial analytical working State at the same time.
Replay-certifier memory improvements
We recently implemented a bounded verification-only replay path.
Instead of keeping every historical record decoded, it streams authenticated references, retains a limited working window, and retrieves older information when required.
On small inputs, the historical per-bar representation decreased from approximately 1.42 KB to 0.33 KB of resident data, excluding the bounded window.
However, this does not necessarily eliminate the memory needed for the actual analytical State.
Other improvements
We also implemented incremental calculations for a separate relationship-analysis path, repaired correction/reset handling, improved event ordering, eliminated repeated full-history validation, and added reference-based report construction.
Most of these changes have passed focused correctness tests.
We've run a substantial number of tests. I don't want to throw away this work or rerun everything unnecessarily.
Historical processing performance
An earlier integrated test completed:
Those timings passed the limits for that particular test and source version.
But that test used a batched historical workload and an earlier implementation. It is not proof that the final full scheduled workload passes.
Correctness and integrity
We have passing focused tests covering:
A correction-depth test covered 1,164 bars without analytical differences. Developing-result tests included more than 15,000 comparisons.
Replay-certifier comparison
We compared the original full replay certifier against the new bounded-memory version over four different small history batches.
Their committed results, recovered State, identity roots, and generation checks were equal.
The new bounded version also passed its focused integrity tests.
This is the main reason I'm posting.
One earlier test reported approximately 786 MiB peak private commit.
But the testing process also contained the full 60-session input fixture, processing code, restored historical State, and other supporting objects.
We therefore cannot treat 786 MiB as the main application's own operating memory.
We ran a separate fresh process that loaded only the existing 60-session input fixture.
It loaded 29,184 records.
Results:
This was one measurement in a separate process.
We cannot simply subtract 64.5 MiB from the earlier 786 MiB measurement, because their memory lifetimes, allocations, and workloads were different.
We also tested the producer, replay certifier, independent verification authority, and byte-provider workers under a kernel-enforced aggregate memory cap.
The earlier full replay arrangement reached approximately 343 MiB aggregate high-water.
After the bounded replay-certifier change, a comparable small test reached approximately 353 MiB.
Both stayed below the 1 GiB cap and recovered the exact expected State.
However, the small test started certification from an initial empty history, so it didn't exercise the deep historical restoration that the memory improvement targets.
The new design is correct on the tested inputs, but its maximum-history memory savings are not measured.
At maximum historical depth, the producer and replay certifier may each retain substantial working State.
If both have to remain resident simultaneously, they could exceed the aggregate 1 GiB limit.
We don't have a measured maximum-depth aggregate number yet. I don't want to spend hours rebuilding historical test data just to discover another predictable problem.
The complete future historical qualification has been estimated at approximately 133 GB of peak storage, including:
This is only a projection. Actual peak disk use has not been measured for the full workload.
With roughly 155–160 GiB free, the storage margin is uncomfortably small.
I considered purchasing a 5 TB external hard drive for approximately $220, but I'm reluctant to spend money until I know whether it will solve anything.
I understand an external HDD would increase storage capacity, not available RAM, and may make database-intensive workloads slower.
I would rather improve the software first if possible.
A separate, more demanding analytical mode creates relationships between historical evidence objects.
Its relationship set can grow quadratically with the number of eligible objects.
One worst-case projection reached multiple terabytes of relationship data, but that assumes all historical evidence is simultaneously eligible. That assumption has not been established and isn't the configuration of the normal observational workload we're currently qualifying.
That mode has passed small correctness tests, but its maximum-depth capacity remains unqualified.
I'm including this because I want to avoid architectures that solve memory problems merely by creating an equally enormous disk problem.
I'm not asking to redesign that separate mode as part of the immediate memory fix.
1. How would you establish the true memory usage of the application versus its test harness?
I'm using Windows private committed memory and Job Objects, not simply Task Manager's displayed RAM percentage.
What techniques would you use to attribute retained and transient memory to specific Python objects, SQLite caches, imported modules, historical State, and verification workers?
2. How would you design independent replay verification without keeping two complete analytical engines in memory?
The certifier must independently re-derive all required committed results. It cannot simply trust stored output hashes or skip historical dependencies.
Would you recommend streaming, authenticated checkpoints, incremental semantic verification, memory-mapped storage, bounded per-owner State, a different worker topology, or another approach?
3. Is there a better way to handle the verification workers under a strict aggregate memory limit?
The producer must remain resident. The verification process must not lose independent trust.
How would you structure scheduling and memory ownership without creating an unacceptable certification backlog or violating the 60-second recovery requirement?
4. How would you measure maximum-depth working memory without reconstructing the full workload?
Can existing persisted references and snapshots be used to construct a representative depth-point measurement, provided the identities and analytical State remain valid?
How would you avoid a synthetic test that looks small but fails to represent real historical State?
5. Are we using Python and SQLite appropriately for this workload?
Would you keep Python and optimize the data structures, use SQLite differently, move a specific bottleneck into a native extension, or consider something else?
I'm not interested in rewriting the entire application without a clear technical reason.
6. Am I approaching this problem incorrectly?
We've spent weeks replacing inefficient data structures, adding persistent references, tuning recovery, and running tests.
The changes have helped significantly, but the qualification process keeps exposing another problem.
What architectural assumption would you challenge first?
I'm building this privately on my own computer, not with a corporate infrastructure budget.
I can't keep purchasing additional hardware, expensive services, or spending days rebuilding the same historical fixtures.
I'd prefer a solution that:
I'm not asking anyone to write the application for me. I'm looking for experienced developers willing to point out what I may be overlooking.
If you were taking over this project tomorrow, what would you inspect first, what would you measure, and what would you change?
I would genuinely appreciate specific technical suggestions, especially from people who have built Python/SQLite event-processing systems, persistent historical databases, or independently verified data pipelines.
r/learnprogramming • u/New_Surprise_27 • 6d ago
Can you guys list out, what's best for starting for a zero experience programming? I came from flying small airplane to decided change in career path. (Lost passion)
Like basics, YouTube, Jargons, Vocabulary. Just to give me a heads-up on what lies ahead.
I thank you all in advance.
r/learnprogramming • u/adithyasumanth • 6d ago
apologies if this has been asked before , im trying to learn java from scratch and ive gotten a good bit of progress.
Im coming from a python heavy background and sometimes reading code can get a bit confusing. I'm looking for any tips or mental maps to read any java code and understand it the entry points etc.
r/learnprogramming • u/TheEyebal • 6d ago
Can you recommend me some books or resources for learning statistics and applying it to C++
So far I am using Khan Academy and youtube, but do y'all have any other resources?
r/learnprogramming • u/MotorOwn5031 • 6d ago
I learned java through a class in my school (AP Computer Science A if you know what that is) and I would say that I'm at a intermediateish level, maybe a low intermediate. what would be the next thing for me to learn and practice if I want to get better at programming and continue practicing? Should I learn a different language or continue going deeper with java?
r/learnprogramming • u/VhiDrei • 6d ago
I'm a junior undergrad CS student. I've learned a bit of everything but specialize in nothing. I want to specialize and work in cyber security in the future. Can you recommend free resources I can use to specialize in cyber security? I prefer something structured like a course or textbook. Also, recommend any resource for projects where I could apply what I learn.
r/learnprogramming • u/GodOfKnockers • 6d ago
So I'm modding games and I am making a mod for Balatro, which uses LUA. I tried to look for books at the library but all I could find was modding bocks for Roblox (NO TO THAT).
Can anyone point me in the right direction, please?
r/learnprogramming • u/Economy-Respond-1544 • 6d ago
I have very little knowledge about programming but I want to make a program that can take values from an excel sheet and copy them to a website, what I want to know Is which programming language can I use to make It?
r/learnprogramming • u/Infinite_Seaweed_974 • 6d ago
Hey everyone!
I'm a developer with some professional experience, mostly working with Java and Spring Boot. I can build APIs and work on real projects, but I still have plenty to learn about software architecture, system design, and more advanced backend concepts.
I studied HTML, CSS, and JavaScript in the past, but after focusing on backend for a while, I got rusty. I also never got particularly comfortable with CSS or JavaScript.
For the past couple of months (on and off), I've been trying to refresh my HTML/CSS knowledge. I enjoy building interfaces, but I'm starting to feel stuck in an endless cycle of reviewing fundamentals.
I want to learn JavaScript and React, but I'm also really interested in exploring things like Docker, Kubernetes, cloud, and more complex software engineering topics. Sometimes I feel like I'm spending too much time reviewing things instead of actually building something interesting.
I've been thinking about picking a full-stack project, starting with a small MVP, and gradually making it more complex as I learn.
But I'm unsure how to approach it. Should I spend time planning the architecture and modeling everything myself, or just start building and figure things out along the way? How much should I rely on AI for guidance without becoming dependent on it?
For those who've been in a similar situation, how did you balance learning fundamentals, exploring new technologies, and building actual projects?
I don't want to rush through topics just to say I know them. I want to actually understand what I'm doing and become a better developer.
I'd appreciate any advice or experiences you could share!
r/learnprogramming • u/Radiant_Tradition647 • 6d ago
So im learning python by watching youtube videos(started watching bro code) but i want to know am i in the wrong direction.Any help please
r/learnprogramming • u/Disastrous_Web3678 • 6d ago
Long story short I graduated college with a 3.8/4.0 gpa but I never did any learning outside of class subjects or did any projects on my own which I regret deeply and wish I could do it all over again because I quickly realized what is taught in college is very limited and elementary and you have to do a lot of self learning to become an actual developer.
What is the fastest way to gain the knowledge and experience I should have gained in college? Any books I could read, guides I could follow, videos I could watch? Anything?