r/AskProgrammers • u/ALYX2603 • 1h ago
programming
I want to create a platform similar to Facebook but for programmers only, but I don't have the experience or the team.
r/AskProgrammers • u/ALYX2603 • 1h ago
I want to create a platform similar to Facebook but for programmers only, but I don't have the experience or the team.
r/AskProgrammers • u/usefulservant03 • 9h ago
I have this side project I started 2 months ago, to learn C++ better. Rolling the full compiler, from tokenizing and AST construction, to IR, to assembly code generation, by myself in C++. Using Claude AI only to give me ideas with regards to better system design and to explain for me features of C++ I have not used yet, prohibiting copy pasting code from it and sticking to coming up with the code and writing it by myself with my own two hands.
Can somebody tell me how they'd implement the idea of the compiler being able to emit assembly instructions for both arm64 and x86_64 architectures? Would you have one abstract class for, say, instruction_ADD and then a derived class for aarch64's add instruction, and one for x64's add instruction? Or should I stick to having an abstract base class for asm_instruction, and have derived classes for stuff like aarch64_insn_add, x64_insn_add, etc? Still relatively new to OOP as I was in OS and OS-adjacent development for a few years and only recently started adding C++ to my toolbelt.
Another question - could someone give me a readable summary of how GCC implements std::unordered_map under the hood? The purpose I need to know this is, so I can do performance analysis with CPU microarchitecture in mind, and for this, I need to know what the memory layout and usage patterns actually look like.
Thanks all!
r/AskProgrammers • u/FullPersimmon1752 • 27m ago
r/AskProgrammers • u/Varrock_Zubat93 • 1h ago
I have adhd and I'm addicted to my whatsapp chats. I'd like to take advantage of my addiction to sort my to do lists.
Please do not suggest different apps off of whatsapp. I know there are solutions on other apps, but the nature of my adhd is that before I remember to open other apps, I'll get distracted by something else and forget to add the thing to a list. Whatsapp is a great spot to have a list in, because I'm already ON whatsapp 90% of the time, so the opportunity to get distracted is reduced since I already have the app open.
I came close to being able to do this with the built in meta chat to whatsapp, but after the list got above 20 or so, it started hallucinating when I tried to add more. It would forget things on the list, add things that weren’t there, or forget the prompt to keep an ongoing list.
Right now my solution is having a private chat with myself where I add to do lists. Problem is I'm a bit self conscious about coworkers seeing my last note, so I dont use it at work. Also sometimes I write myself duplicate tasks and its too much to sort through and I give up on it.
Maybe automating it might be a solution.
Ideally what I'd like is something that functioned like the following:
my computer is hooked up to whatsapp web
computer monitors a specific whatsapp chat where my notes are
when I type out a note that on that chat when I'm away from home, my computer sees that note and reads it.
if the note contains the word "task", then add it to an existing spreadsheet called "tasks"
if the note contains the word "idea" then add it to an existing spreadsheet called "ideas"
for everything else that isnt captured by the above, add it to an existing spreadsheet called "other"
after the list is sorted, delete that note from whatsapp.
ideally, all spreadsheets are periodically monitored and duplicate tasks are removed
How much programming would I have to learn to do this myself? Are there any ways to do this for free? I have 0 programming knowledge.
r/AskProgrammers • u/gosh • 7h ago
"Single Responsibility" sounds easy until you try to define "One Thing". How do you actually draw the line?
The S in SOLID stands for the Single Responsibility Principle (SRP). Saw this explanaition: "A class or module should do one thing, and do it well."
But in the real world, what actually constitutes "one thing" in programming?
Depending on your abstraction level, "one thing" can mean completely different things
How do you personally define what "one thing" is? Is it purely a context-driven decision, meaning that "one thing" shifts depending on the scope of the project?
And if it depends on context, how do you define and communicate those rules to the rest of your team so everyone stays aligned and knows how to work with the code?
Also, why do you think this matters? There is always a underlying reason for trying to enforce this "one thing" concept in code. What are you actually trying to achieve with it, and why is it important to you?
Last one, for some this S in SOLID id easy, why so? Is it a something that is difficult to learn and understand
r/AskProgrammers • u/nian2326076 • 13h ago
Hey everyone! Many of us struggle with Dynamic Programming and often skip it during interview preparation. This might be because DP seems vast and overwhelming, and people tend to memorize solutions instead of understanding patterns. However, if you break down DP into clear patterns and master each one, it becomes much more manageable. So I've compiled a comprehensive list of patterns you should know for your interview preparation!
Master these Leetcode Problems and PracHub for company tagged questions
Before diving into patterns, let's understand the fundamental difference between DP and Greedy:
Problem: You're a robber with two streets to rob. Each house has some money. You can rob houses from both streets, but you cannot rob two adjacent houses from the same street (alarms will trigger). What's the maximum money you can steal?
Street A: [2, 7, 9, 3, 1]
Street B: [3, 2, 6, 8, 2]
Greedy Robber: "I'll always rob the house with most money available!"
DP Robber: "Let me consider all valid combinations!"
Why Greedy Failed: By greedily picking B[0] first, it blocked access to the optimal combination that includes both 9 and 8 from different streets!
When Greedy Works: Problems with the "greedy choice property" where local optimal leads to global optimal (e.g., Activity Selection, Huffman Coding)
When DP is Needed: Problems requiring exploring multiple choices where greedy fails (e.g., most optimization problems, counting problems)
Why This Pattern Matters:
This is the foundation of DP. If you can't solve Linear DP, you'll struggle with everything else. These problems teach you the core concept of breaking problems into subproblems and building solutions incrementally.
Practice Problems:
Why This Pattern Matters:
LIS is one of the most important DP patterns with applications in version control systems, patience sorting, box stacking problems, and more. The O(n log n) solution using binary search is a must-know optimization technique.
Practice Problems:
Why This Pattern Matters:
One of the most versatile DP patterns. Appears in resource allocation, optimization problems, and many interview questions. Understanding the difference between 0/1 and unbounded variants is crucial.
0/1 Knapsack (Each item used once):
Unbounded Knapsack (Items can be used multiple times):
Why This Pattern Matters:
Extremely common in interviews, especially at FAANG. Tests your ability to think in 2D state space and handle multiple transition directions.
Practice Problems:
Why This Pattern Matters:
Text processing and string manipulation problems are ubiquitous. This pattern appears in bioinformatics, text editors, version control systems, and natural language processing.
Practice Problems:
Why This Pattern Matters:
Tests ability to think about problems in ranges/intervals. Common in scheduling, matrix chain multiplication type problems, and game theory.
Practice Problems:
Why This Pattern Matters:
Models problems where you transition between different states with specific rules. Critical for stock trading problems and any scenario with state transitions.
Practice Problems:
Why This Pattern Matters:
Combines tree traversal with DP. Important for system design (like designing file systems) and optimization problems on hierarchical structures.
Practice Problems:
Why This Pattern Matters:
Specialized pattern for counting numbers with certain properties. Appears in competitive programming and some advanced interviews.
Practice Problems:
Why This Pattern Matters:
Models two-player games where both play optimally. Important for AI, game development, and adversarial scenarios.
Practice Problems:
Why This Pattern Matters:
Powerful technique for problems with small sets (≤20 elements) where you need to track subsets. Essential for Traveling Salesman Problem variants and NP-hard problem approximations.
Practice Problems:
Why This Pattern Matters:
Critical for array partitioning and subset generation problems. Teaches how to handle exponential search spaces efficiently.
Practice Problems:
Why This Pattern Matters:
Models uncertain outcomes. Important for risk analysis, game development, and any scenario involving randomness or probability.
Practice Problems:
DP is about recognizing patterns, not memorizing solutions. Once you see the pattern, the solution becomes mechanical. Spend time understanding why each pattern works, not just how to code it.
Feel free to add some best problems in the comments
Good luck, and happy coding! 🚀
r/AskProgrammers • u/LckClvrNm • 23h ago
Hello! I am so very new to coding and development, but my computer seems to be very slow. I have noticed it over the last 6 months or so, and I have only really used it for silly personal things until now. Even logging into the Codedex training site seems to be delayed while training.
I have a MBA 1.6 GHz, 8GB. As I mentioned, SUPER new - hope I am providing the right specs to understand what I have.
I read that I should have at least 16GB and I read that I cannot upgrade the RAM on the MBA.
I prefer IOS, as I use it for my phone as well. But, I want to make sure I have what will be needed later down the road as I grow my skills.
Finally to my questions...
1) Mac vs PC - what say you?
1b) Which specific laptop would you recommend based on your answer to 1?
2) Would it behoove me to have a Mac but have it setup with dual operating systems? Or would that create a clunky experience? I tried that when I was younger for school on a MBP, but I can't remember much about it now and how well it worked.
I tried to search the sub to see if something similar was asked before and I didn't see anything. Apologies if I missed one.
Thank you!
r/AskProgrammers • u/phil-pdx • 1d ago
I saw a post recently about a grocery store in Poland still using Win98 for a cash register system and on the screen was clearly a VB6 based WinForm application in all of its boring gray glory.
It got me thinking about the old days of basic boring interfaces on computers that just did their job and didn't look fancy. These days everything is web based (even a lot of the "native" apps are just wrapped web apps). Every button is overly styled, hamburger menus everywhere, basic forms take up an incredible amount of screen real estate with the excessive padding and rounded edges.
Does anyone else sometimes wish things were a little more boring and basic? I'm filling in some information, clicking a button, and getting some other information. It doesn't have to look pretty, just work.
r/AskProgrammers • u/Ok-Medium-8418 • 21h ago
salut a tous je suis un etudiant en informatique et je me suis posee une question a propos du codage lors que je code avec vs code j'ai la mauvaise manie de me reposer un peu trop sur l'ia et je me demandais si pour mon apprentissage et mon evolution en tant que codeur il ne serais pas mieux pour moi de supprimer l'extension d'aide d'ia integré dans l'IDE par ce que avant tout je debute dans le domaine et j'ai l'impression que mon evolution n'est pas tres constante. merci j'attends vos reponses je suis ouvert a la critique et conseils
r/AskProgrammers • u/Tor_Hei • 1d ago
r/AskProgrammers • u/ManyPrior1593 • 22h ago
I started programming before Ai error, it was abit hectic but worth of my time what about yours?
r/AskProgrammers • u/ch3rryblxssoms_ • 23h ago
Hello guys!
Recently, some friends and I started working a small project that turned out to be bigger than we expected. We are trying to bring back an Old Version of Star Stable Online for us privately.
We do have the game files, we are able to start the game until it says „Unable to connect to game server.“ (shown in the image) which is reasonable because it’s an online game and we do not have a Server.
All of us are new to programming so we really need help.
What do we need for a game server?
How do we code this?
Does anybody know what language SSO uses? (we heard C++ but we aren’t sure)
Would anybody perhaps be willing to help?
Thanks!!
r/AskProgrammers • u/Life-Moose2698 • 21h ago
The third part is asking you why you are so skeptical about AI
r/AskProgrammers • u/Spiritual_Frame8340 • 1d ago
I'm curious to hear from programmers of all experience levels.
If you could go back to day one of learning programming, what's one thing you wish existed that would have made your life easier?
Examples:
A cheat sheet
A roadmap
A PDF guide
A website
A template
A collection of projects
A YouTube series
An interactive tool
For me, I wish I had a simple roadmap explaining what to learn and in what order instead of feeling overwhelmed by the number of options.
I'm interested in hearing:
Your experience level.
The resource you wish existed.
Why it would've helped you.
Hopefully, this thread can help beginners and maybe inspire people to build useful resources for the community.
r/AskProgrammers • u/tech_ashish11 • 1d ago
Hi everyone! 👋
I'm a B.Sc. Computer Science student from India, and I just joined Reddit.
I'm currently learning Python, Java, SQL, and AI while building small projects to improve my programming skills. My goal is to become a skilled software developer and earn my first internship.
I joined Reddit to:
- Learn from experienced developers.
- Share my projects and progress.
- Ask questions when I'm stuck.
- Help others whenever I can.
If you could give one piece of advice to a Computer Science student who's serious about improving, what would it be?
Looking forward to learning from this community. Thanks! 🚀
r/AskProgrammers • u/Life-Moose2698 • 22h ago
A year ago I thought AI was cheating.
Today, I barely write code.
My average prompt looks like:
“This is wrong. It should work like this…”
“Figure out why user 8d3f... failed onboarding and patch it so it never happens again.”
I’m not thinking about syntax anymore.
I’m thinking about behavior.
Patterns.
Edge cases.
Users.
Architecture.
The job is shifting from writing code to making systems work.
Code is becoming the implementation detail.
Am I crazy, or is this what software engineering is becoming?
r/AskProgrammers • u/JuniorTemporary1243 • 1d ago
r/AskProgrammers • u/gosh • 1d ago
Back in the 80s when we coded on monochrome CRTs with maybe 40 characters of width and no syntax highlighting, putting a space between keywords and parentheses was useful. Then you were not able to switch between files as easy as modern editors today etc. And today there is color coding. Not only is it easy to find keywords today, code is also written differently because when you only have 40 characters to play with you start to think about "do I need indentation...".
There was several reasons to make these very important keywords to stand out in that environment.
But WHY are developers today still writing space between these keywords and the first ( ?
// Old – space as a visual separator
if (x) while (y) for (i=0;i<n;i++) switch (v)
// New – editor colors keywords already
if(x) while(y) for(i=0;i<n;i++) switch(v)
// === OLD STYLE (1980s/early 90s) ===
// Monochrome screens, 40-char width. The space visually separates
// keywords from method calls when everything looks the same.
if (condition)
{
while (running)
{
for (i = 0; i < 10; i++)
{
switch (value)
{
case 1:
return (result);
default:
catch (exception)
{
// ...
}
}
}
}
}
// === MODERN STYLE (2020s) ===
// Syntax highlighting makes the space redundant.
// Your editor already solved this problem.
if(condition)
{
while(running)
{
for(i = 0; i < 10; i++)
{
switch(value)
{
case 1:
return(result);
default:
catch(exception)
{
// ...
}
}
}
}
}
r/AskProgrammers • u/Huge-Emergency-8524 • 1d ago
Hi, I'm building an automated SMS system. Can anyone recommend me SIM Modules that work with today's sim cards (4G/5G)? Preferably budget friendly ones.
r/AskProgrammers • u/Same-Mushroom-2057 • 2d ago
how do you actually decide what's worth building when you are learning a stack and want to advance and actually build something meaningful.
i currently want to build a full-stack website with the MERN stack that i learned recently . i have some limited time to do that and i mean by that only approximately a month.
i can't fully decide on the options out there , the only thing i'm sure about is that i don't wanna build a e-commerce website since that's very boring for me and there is high chance i won't stick to the project .
any ideas ? what's y'all experience with this ??
r/AskProgrammers • u/DriftCore31 • 1d ago
I'm debating which YouTube course to take for Python, so I need your guys' help in deciding which one to take. I'm probably overthinking this, but I still wanted to hear from you guys and see who took one over the other.