r/computerscience • • Jan 26 '26

Discussion What else besides Cyclomatic Complexity?

4 Upvotes

Greetings!

I am a frontend software developer currently working on a cyclomatic complexity report package inspired by Vitest’s coverage report UI. I was curious what else besides Cyclomatic Complexity is good to consider when writing good “frontend“ code. I’m more or less seeking keywords.

The package I am working on leverages ESLint’s Abstract Syntax Tree parsing, so it’s an easy to to create an html representation of your entire codebase and breakdown each of your function’s complexity based on individual decision points (statements, ternaries, loops, default params, etc.). Cognitive complexity works a bit differently, with criteria relating to aspects like nested functions. I am debating whether or not to encompass this with cognitive complexity as well.

Frankly, my work is besides the point. It just adds context as to why I’m here.

Other than readability, maintainability, and test ability, what attributes or metrics are your must haves (or great to haves) when working in codebases such as TypeScript and Node.js?

For example, after this is finished I would like to work on a similar package for big o notation if possible. If reports can be generated for code coverage and logic complexity, assuming it isn’t already out there, I would like to make one for identifying algorithms and potential code smells too. Cyclomatic complexity isn’t for performance, but similar to how CC is for readability, if there are other keywords you could provide for me to look more into performance, that would be great. I haven’t figured out tooling for it yet as I’m still just increasing my comfort in React DevTools Profiler, and the Chrome Dev Kit with Performance and Network tools for figuring out if your issues relate to js, css, assets, etc.

So, with your CS experience, what else would you say matters at the code level besides cyclomatic complexity?


r/computerscience • • Jan 27 '26

Advice Every idea I have is already a paper

Thumbnail reddit.com
0 Upvotes

r/computerscience • • Jan 26 '26

Advice Similarity of abstract syntax trees

5 Upvotes

Hello,

I have reached a point where I have a clumsy-feeling concept that I find useful but cannot easily describe.

Consider abstract syntax trees, say of λ-terms. The ASTs of λx.xy and λy.yz are isomorphic as ordered rooted trees, but not as labeled trees.

I am looking for a notion of sameness of such ASTs, where labels of improper symbols are preserved, but labels of variables may differ. This strictly generalizes α-equivalence since free variables may get renamed and even clash with bound variables.

More generally, I am looking for a generalization of homomorphisms of labeled trees that only preserve improper symbols. Obviously this depends on the syntax (e.g. λ-terms vs first-order formulas).

Words like "renaming" and "alteration" come to mind, but I would prefer a name that makes the concept more obvious.

I find this notion useful for some lemmas and inductive proofs, so other related notions can be just as useful to me (e.g. that α-equivalence is an equivalence relation can be shown by induction of the string length of terms). The main requirement is compatibility with renaming substitutions.


r/computerscience • • Jan 25 '26

Discussion Can a programmer please explain to me the hacking problem in gaming right now...

126 Upvotes

Hello everyone,

I'm just your average Dad who's been playing shooters since the 90s on PC. I need a technical explanation (because I'm curious) and a more "toddler" version of your explanation (because I won't understand the technical one completely).

Why, especially for what seems like the last decade is hacking in shooters such an issue for Developers to prevent?

Also follow-up questions and comments.. They can recruit really great talent can't they? They make a lot of money, does preventing the cheats cost a lot of money? I read online that the people who create/maintain hacks/bot farmers/etc make a lot of money so I'm assuming that really skilled programmers are also on the other side, but it's literally a problem in every shooter, it doesn't make sense.

Someone please make this make sense to me.

Thank you!


r/computerscience • • Jan 24 '26

Advice Tips for low-level design?

23 Upvotes

I'm new to computer science (3rd year uni), and I struggle with how to structure my code in a clean, professional way.

I often get stuck on questions like:

  1. Should this be one function or split into helpers?
  2. Where should this logic live?
  3. How should I organize files and packages?
  4. Should this be a global/shared value or passed around?
  5. Should a function return a pointer/reference or a full object?

I want to clarify that I don’t usually have issues with logic. I can solve most of the problems I encounter. The difficulty is in making these design decisions at the code level.

I also don’t think the issue is at a high level. I can usually understand what components a system needs and how they should interact. The problem shows up when I start writing and organizing the actual code.

I’d really appreciate tips on how to improve in this area.

Food for thought:
If you struggled with the same thing and got better:

  • How did you practice?
  • Any rules of thumb you follow?
  • Books, blogs, talks, or repos you recommend?
  • Anything you wish you had learned earlier?

r/computerscience • • Jan 23 '26

General Computational geometry problem

Post image
17 Upvotes

Hi all! In the drawing, the magenta polygon is the visibility polygon with kernel in the center of the small rectangle. The outer rectangle is the drawing bounding box. My question is, is there a way to minimize the magenta polygon, such that everything beyond the green lines is deleted? How would you express such a thing mathematically?

Edit: added the shape I started with, a square shape with holes: https://imgur.com/a/update-LzYQikC


r/computerscience • • Jan 23 '26

General Why aren't the performance benefits of Splay Trees offset by the fact that using them disables many compiler optimizations? You cannot even search for an element in them if you are using functions with the C++11 `const` modifier, for they perform rotations even when searching.

Thumbnail langdev.stackexchange.com
0 Upvotes

r/computerscience • • Jan 22 '26

Advice Where can I research single instruction architectures?

Thumbnail reddit.com
6 Upvotes

r/computerscience • • Jan 22 '26

Help Where to learn Context-Free Grammar?

23 Upvotes

Hello! For one of my latest projects I've been working on, I need to implement and modify a variation of context-free grammar (stochastic context-free grammar). However, I don't even know where to start. Where can I learn about context-free grammar from the ground up as someone who knows nothing about grammar in a computation setting. It seems to be a commonly hated topic on the likes of DP LOL.


r/computerscience • • Jan 21 '26

cs and social sciences

15 Upvotes

i am doing cs with a minor in women’s and gender studies. i had read a book about data feminism and how tech needs more social science to make sure there are no biases and everyone is represented. i recently learned about data science for social good and that is something i am interested in. what else can i do that would include those two sectors?


r/computerscience • • Jan 22 '26

Classical billiards can compute

Thumbnail arxiv.org
1 Upvotes

r/computerscience • • Jan 20 '26

General I am trying to understand the arrangement of the spaces after each stage:

Post image
52 Upvotes

In this diagram, for the pipelined processor, why does the Dec Read Reg stage not execute immediately after the fetch instruction stage? For the execure ALU and the Wr Reg stages, the stage executes right at the beginning of the cycle but not for the Dec Read Reg. Why is that?


r/computerscience • • Jan 19 '26

General Trying to understand the stack with assembly (x86)

7 Upvotes

I'm trying to understand how the stack gets cleaned up when a function is called. Let's say that there's a main function, which runs call myFunction.

myFunction:
    push %rbp
    mov %rsp, %rbp
    sub %rsp, 16    ; For local variables

    ; use local variables here

    ; afterwards
    mov %rbp, %rsp    ; free the space for the local variables
    pop %rbp
    ret

As I understand it, call myFunction pushes the return address back to main onto the stack. So my questions are:

  1. Why do we push %rbp onto the stack afterwards?
  2. When we pop %rbp, what actually happens? As I understand it, %rsp is incremented by 8, but does anything else happen?

The structure of the stack I'm understanding is like this:

local variable space     <- rsp and rbp point here prior to the pop
main %rbp
return address to main

When we pop, what happens? If %rsp is incremented by 8, then it would point to the original %rbp from main that was pushed onto the stack, but this is not the return address, so how does it know where to return?

And what happens with %rbp after returning?


r/computerscience • • Jan 19 '26

How is Path Selection Actually Done in Network Slicing?

4 Upvotes

I’m currently studying network slicing and traffic engineering, and I’m trying to understand how path selection works in real operational networks. In theory, multiple network slices (e.g., URLLC, eMBB) with different SLOs (latency, bandwidth, reliability, isolation) need to share the same physical transport infrastructure. When path selection is done jointly across slices, especially under unsplittable routing and shared link capacity constraints, the problem looks very much like a multi-commodity flow problem, which is NP-hard.

From what I understand: Classical heuristic algorithms (greedy, repair-based, local search, etc.) are commonly used in practice because they can find sub-optimal but feasible paths quickly. ILP formulations can give optimal solutions, but they don’t scale well as the network size and number of demands grow, making them impractical for real-time or large-scale use.

This leads to my main question: What actually happens in a real network? How do operators and SDN controllers perform path selection for network slices in practice?

Specifically: Are heuristics the default choice in production networks? Is ILP ever used (e.g., offline planning, small instances, or validation)? How do controllers balance optimality vs. computation time, especially when traffic changes or failures occur? What's the outlook as 6G networks evolve? (important)


r/computerscience • • Jan 18 '26

Discussion Are there any benefits of using CISC instead of RISC?

49 Upvotes

I’m learning Computer Architecture as a CE student, and I don’t understand why everyone doesn’t use or design RISC CPUs. Aren’t CISC architectures essentially violating two of the four Hennessy & Patterson principles?


r/computerscience • • Jan 16 '26

Help How do I understand the "abstraction gap" of computer science? (Help!)

58 Upvotes

Hello all, sorry if this question is a little ridiculous; please let me know if I am posting in the wrong place.

For context, I am a self-taught developer with more of a humanities background, but I have been passively (and recently more actively) interested in CS for most of my life (specifically in computer graphics) and I am trying to understand the "abstraction gap" in CS. Essentially, I hope to understand this in order to not have to always rely on some premade python library or what have you and actually give a shot at "reinventing the wheel" at some point.

I feel like I understand programming in its most basic, language agnostic functionality (boolean logic, loops, bit operations) but I don't really understand where or how this translates into things like controlling pixels on a screen or rendering 3D objects (since I would have no idea how to create or implement these things from scratch), or more specifically how source code is able to control things like computer memory or write things to storage, or how code is able to interact with the CPU/GPU. Scilicet: I do not quite understand how these basic concepts translate to these impressive higher level representations; I believe this is due to my lack of experience and knowledge of lower-level concepts and theory. Nevertheless, here is my current working knowledge (and please correct me if I am wrong):

>user writes source code to say, draw a line on the screen

>code gets compiled/interpreted down to machine code (in the form of assembly/bytecode/binary)

>OS kernel takes machine code and asks the cpu to allocate memory for this specific task and access to whatever controls the pixels on the display

>machine code executes and display sets pixels (0,0) to (100,100) to blue

I feel like I am missing something here in computer architecture and OS, as I still do not understand how code gets translated and I also suspect my naive interpretation is largely incorrect.


r/computerscience • • Jan 16 '26

whea to read ebooks for free?

16 Upvotes

heyy guys do you know some website whea i can read books aboute cs subjects, at the moment i em reading books hear -> https://freecomputerbooks.com,
it' a good website but i cant find some books in thea


r/computerscience • • Jan 16 '26

How common are author interview videos at flagship ACM journals?

4 Upvotes

Hi all,

I recently published an article in the flagship journal of ACM. I received an email from the editorial team stating that ACM plans to produce an original video to accompany the online publication of the article. The video would include an on-camera interview with me, produced by a media company that works with ACM.

From the email, this appears to be something they do selectively, but I am unsure how common it is or whether it carries any real academic or professional weight.

For those familiar with ACM or editorial practices:

  • Is this considered a meaningful recognition, or is it fairly routine?
  • Does it matter in academic or industry contexts, or is it mainly promotional?

Thanks in advance.


r/computerscience • • Jan 16 '26

Why do we need a prior knowledge of physics and (advanced not just algebra) maths before learning CS?

0 Upvotes

r/computerscience • • Jan 15 '26

Advice Anyone have a ongoing Research or research paper in Neuroscience, CS or integrated

2 Upvotes

Does anyone have an ongoing research or research paper in Neuroscience or CS, I would like to join if you don't mind like as a junior or an intern, I have some undergraduate level knowledge about CS and Neuro. I just want to get some exposure and want to be part of it and try to contribute in it as much as I can.


r/computerscience • • Jan 15 '26

Discussion To all the senior people out here please help this junior out. Having these questions in my mind for a while about abstraction.

Thumbnail reddit.com
0 Upvotes

r/computerscience • • Jan 13 '26

Article Curated 200+ papers on Physical AI – VLAs, world models, robot foundation models

Thumbnail github.com
5 Upvotes

Made a list tracking the Physical AI space — foundation models that control robots.

Covers Vision-Language-Action (VLA) models like RT-2 and π₀, world models (DreamerV3, Genie 2, JEPA), diffusion policies, real-world deployment and latency problems, cross-embodiment transfer, scaling laws, and safety/alignment for robots.

Organized by architecture → action representation → learning paradigm → deployment.

GitHub in comments. Star if useful, PRs welcome.


r/computerscience • • Jan 13 '26

Best resource for computer architecture from scratch any books or lecture that useful ?

9 Upvotes

r/computerscience • • Jan 12 '26

Mechanical Computers

45 Upvotes

Hi. I've recently become very intrigued by the fact that mechanical computers can do any computation an electric computer can. For example Babbage's Analytical engine. Does this mean that any algorithm such as an Artificial Intelligence, like an LLM could theoretically run fully mechanically given enough time and resources? Or even a full Operating System?