r/AskProgrammers 10h ago

What is the funniest code you ever read in production?

16 Upvotes

This is a piece of code I found while refactoring our insanely complex drag-and-drop component canvas that already went through several refactors for performance optimization in the past:

function refreshShape(shapeId: number) {
return shapeId;
};

I'm not even kidding. My teammate and I laughed so hard. It was probably written by someone at some point to do something and either got distracted or was multitasking. This was before LLMs were being integrated in our workflows.


r/AskProgrammers 5h ago

Sophomore CS student feeling completely lost and looking for a structured roadmap or expert advice to rebuild my fundamentals

5 Upvotes

Hi everyone, I'm currently a sophomore Computer Science student, and lately I've been feeling like I've fallen far behind. I passed my introductory programming courses Python, C, C++, Java/OOP but over time I feel like I've forgotten almost everything because I rarely used those concepts consistently. One thing I've realized about myself is that I learn best with routine and structure. I don't do well jumping between random YouTube videos or constantly changing resources. I'd much rather have one high quality source for a topic, study it consistently every day, solve exercises, and gradually build my understanding.

So I have a few questions:

If you could start over as a sophomore, how would you rebuild your CS fundamentals?

What would your roadmap look like over the next 1 year of dense study?

What resources books, courses, websites would you choose for DSA, Operating Systems Computer Networks Computer Architecture Databases Linux Cybersecurity (just enough to understand the field before specializing).

How do you deal with forgetting? I constantly feel like I learn something, then months later I can't remember enough to use it confidently. Is this normal? How do experienced engineers retain knowledge without trying to memorize everything?

Is it realistic. or even useful, to aim for a broad understanding of all the major CS areas before specializing? Or should I focus deeply on one area much earlier?

I see NeetCode recommended everywhere, but it seems heavily focused on coding interviews and LeetCode. Is that actually a good place to build CS fundamentals, or is it mainly interview preparation? Should I first study algorithms from a textbook/course before using NeetCode?

If you've ever felt behind and successfully caught up, I'd really appreciate hearing what worked for you. I'm especially interested in advice from people who felt "late" compared to their peers but eventually became competent engineers.

Thanks in advance.


r/AskProgrammers 10h ago

Honestly, 80% of developers today are missing what this dude is talking about

Post image
1 Upvotes

r/AskProgrammers 13h ago

Opensource PHP/Laravel LMS system feedback

2 Upvotes

Hi everyone,

Over the past few months, we've been building TadreebLMS, an open-source Learning Management System focused on enterprise and corporate training.

We've recently completed a major restructuring of the project

How can we use AI in our product and process to speedup the development, process and customer support ?

The project is built with:

  • PHP / Laravel
  • MySQL
  • Bootstrap / JavaScript
  • Docker

GitHub:
https://github.com/Tadreeb-LMS/tadreeblms

Issues:
https://github.com/Tadreeb-LMS/tadreeblms/issues

We have a huge roadmap like SCRUM Integration, UI upgrade as per FIGMA, Gap Analysis Module Integration, Integrations with HR Systems etc...

Please anyone experience or architect in PHP can give recommendation on best practices, gaps in the system etc..


r/AskProgrammers 43m ago

What is this optimization technique called in high-performance network software?

Upvotes

I’m working on a traffic generator to test my own XDP/eBPF filter in a controlled lab environment (my PC sending traffic to my Raspberry Pi on my own network).

I noticed that in some applications, two programs written in the same language can have vastly different performance.

For example, some software can only send a few requests/messages per second, while others can generate thousands per second even on relatively weak hardware.

What is this concept or optimization area called?
I’m looking for topics such as:
asynchronous I/O
multithreading vs event-driven architectures
lock-free programming
kernel bypass
zero-copy networking
batching
efficient socket APIs
packet generation optimization

If I want to build a high-performance TCP/UDP packet generator for benchmarking my own network stack and XDP filter, what technologies, algorithms, or papers should I study? For traffic generator i am using c# and for the XDP filter classic C. ( or should i use different for the traffic generator? I think its okey its console app )


r/AskProgrammers 43m ago

What is this optimization technique called in high-performance network software?

Upvotes

I’m working on a traffic generator to test my own XDP/eBPF filter in a controlled lab environment (my PC sending traffic to my Raspberry Pi on my own network).

I noticed that in some applications, two programs written in the same language can have vastly different performance.

For example, some software can only send a few requests/messages per second, while others can generate thousands per second even on relatively weak hardware.

What is this concept or optimization area called?
I’m looking for topics such as:
asynchronous I/O
multithreading vs event-driven architectures
lock-free programming
kernel bypass
zero-copy networking
batching
efficient socket APIs
packet generation optimization

If I want to build a high-performance TCP/UDP packet generator for benchmarking my own network stack and XDP filter, what technologies, algorithms, or papers should I study? For traffic generator i am using c# and for the XDP filter classic C. ( or should i use different for the traffic generator? I think its okey its console app )


r/AskProgrammers 21h ago

What would it sound if I tell you that my algorithm is letting coding agents to understand codebase nearer to how developers understand?

0 Upvotes

While doing a lot of vibe coding( not straight vibe coding, but spec driven-architecturally designed) and building full fledged application hosted on AWS and publishing to playstore, I generated an interest in agent memory and then built something around the memory, but still I wasn't convinced with the way coding agents explores the codebase by ripgrep or get-content.

So, I went deep into data science - basically graph database, gremlin, GraphSAge, A*, and many other. The thing I noticed was that " A model doesn't know what it doesn't know".

Which means, a function might have been changed or updated for 100 times, and each change carries some info, coupling, architectural descions(few times), and many such. But the agents at the time of exploring it sees the function as a static image without any layers beneath it. Sometime it might do - git diff but, a function being designed in that way carries a huge coupling with other functions over different commits. The agent barely figures out these relationships and concludes its descions merely on calls, imports, indexing of the other functions, docs, git log... But a developer trying to fix or update to accomodate a newer update, it first understands what and why of class, file, functions and related then updates.

This is why, Agents prefer on building a completely new functions, methods rather than just updating a small change in the same function.( the reason behind is that, an agent doesn't know that it doesn't know). Yes, I read github repo - ponytail which tells similar but it is mostly a smart prompting to compell the agents to grill before writing.

But, what if we provide the exact info that it misses, what if we provide, which functions are structurally similar, what if we traverse from commit -follow the edge(might be descions, update, fix, or such) land to some function states of those functions, understand them, traverse to that function, understand the clusters of those functions, read which functions are co-changed with that particular on which specific problem - then traverse the vector aided traversal with the edges leading to other functions... and so on.

I mean yes I am talking about embeddings of nodes, edges on some graph database and providing tools to the agent to explore the codebase, not only exploring, grill the codebase, understand the each bit of things before concluding any descions and recursively traverse between interconnected nodes with the help of multi-weighted edge between nodes.

I know 30% of the graph data should be populated by LLMs, but these can be done by any lightweight models or even self hosted ollama models on 16GB VRAM Mac or so.

If it sounds any good, then I have been building and had been testing for past 2 months, and results are way more efficient and effective. Token consumption literally reduced by 5x and effectiveness is still not as good as it should be because models are trained to use the cli commands, but working on that as it needs more depth knowledge of data science.

I reallly need you guys to put me on right boat if you have any things to say, grill, the comment section is all yours. - Pardon for my English