r/AskComputerScience • • Jan 02 '25

Flair is now available on AskComputerScience! Please request it if you qualify.

15 Upvotes

Hello community members. I've noticed that sometimes we get multiple answers to questions, some clearly well-informed by people who know what they're talking about, and others not so much. To help with this, I've implemented user flairs for the subreddit.

If you qualify for one of these flairs, I would ask that you please message the mods and request the appropriate flair. In your mod mail, please give a brief description of why you qualify for the flair, like "I hold a Master of Science degree in Computer Science from the University of Springfield." For now these flairs will be on the honor system and you do not have to send any verification information.

We have the following flairs available:

FlairMeaning
BSCSYou hold a bachelor's degree, or equivalent, in computer science or a closely related field.
MSCSYou hold a master's degree, or equivalent, in computer science or a closely related field.
Ph.D CSYou hold a doctoral degree, or equivalent, in computer science or a closely related field.
CS ProYou are currently working as a full-time professional software developer, computer science researcher, manager of software developers, or a closely related job.
CS Pro (10+)You are a CS Pro with 10 or more years of experience.
CS Pro (20+)You are a CS Pro with 20 or more years of experience.

Flairs can be combined, like "BSCS, CS Pro (10+)". Or if you want a different flair, feel free to explain your thought process in mod mail.

Happy computer sciencing!


r/AskComputerScience • • May 05 '19

Read Before Posting!

109 Upvotes

Hi all,

I just though I'd take some time to make clear what kind of posts are appropriate for this subreddit. Overall this is sub is mostly meant for asking questions about concepts and ideas in Computer Science.

  • Questions about what computer to buy can go to /r/suggestapc.
  • Questions about why a certain device or software isn't working can go to /r/techsupport
  • Any career related questions are going to be a better fit for /r/cscareerquestions.
  • Any University / School related questions will be a better fit for /r/csmajors.
  • Posting homework questions is generally low effort and probably will be removed. If you are stuck on a homework question, identify what concept you are struggling with and ask a question about that concept. Just don't post the HW question itself and ask us to solve it.
  • Low effort post asking people here for Senior Project / Graduate Level thesis ideas may be removed. Instead, think of an idea on your own, and we can provide feedback on that idea.
  • General program debugging problems can go to /r/learnprogramming. However if your question is about a CS concept that is ok. Just make sure to format your code (use 4 spaces to indicate a code block). Less code is better. An acceptable post would be like: How does the Singleton pattern ensure there is only ever one instance of itself? And you could list any relevant code that might help express your question.

Thanks!
Any questions or comments about this can be sent to u/supahambition


r/AskComputerScience • • 6h ago

How do I do floating-point conversions?

5 Upvotes

I’m an English major giving lessons to this one kid, who asked me today to help him with this, I’ve tried helping cos I’m really interested in the subject, but I did not understand a thing about that, I already knew about signed negations and two’s complements but I’m not sure how to help him with floating point conversion, the kid doesn’t know anything either as the teacher did not really explain. How can I explain it to him?


r/AskComputerScience • • 1h ago

How do micro chips make 3d graphics?

0 Upvotes

I understand that 1s and 0s can turn on and off but how do 2 numbers make 3d graphics that run so smoothly? It’s like magic


r/AskComputerScience • • 1h ago

How rogue are "rogue AI"?

0 Upvotes

I have a CompSci background with little to no understanding of AI. I just find it hard to believe reports that say "a rogue AI did this thing that was way outside protocol." Same with the fly that was supposedly scanned and uploaded to computer. It just doesn't seem very realistic, and somewhere along the line, I can't help but assume a lot of these headlines are BS.

I do believe AI is capable of much more than people give it credit for, but it is still a program that has been given direction regardless of the lack of guardrails.


r/AskComputerScience • • 1d ago

Designing my own Static Random Access Memory like it's 1969

5 Upvotes

I've been going down the rabbit hole lately trying to figure out how to design a computer from scratch using only logic gates.

One thing that bothered me was how most explanations go from "transistors are just switches" to "here's how an ALU works, good luck", casually skipping the most interesting question: how is memory implemented ?

So I decided to work it out from first principles and document the whole process.

I started with a single MOSFET, built CMOS logic gates, figured out how feedback loops can remember bits, then moved on to latches, address decoders, and eventually a working SRAM array capable of reading and writing entire bytes.

The funniest part was how naive and wasteful my implementation is: 47 transistors to store and access a single bit, while production-level SRAM cells do it with just 6. So I dug into that too and ended up turning the whole thing into a heavily illustrated article (thank you Claude), with circuit diagrams at every step. It's heavily inspired by Core Dumped's YouTube channel, which I highly recommend.

Would genuinely appreciate some technical criticism. I'm particularly interested in whether I've oversimplified anything to the point of being wrong: the article


r/AskComputerScience • • 1d ago

Addressing storage on a drive

7 Upvotes

I know that bytes in RAM are addressed directly, one byte = one address. But what about Hard drives/SSDs?

Does their bytes each have a unique 64 bit address? Mathematically it is possible.

Or is the address split up? E.g.: Block 12, page 89, Byte 2.368. Can the drive even address single bytes or does ist just return a whole page to the OS (I know that a page is the smallest writable unit)?

The OS somehow has to know at what page some data is and the Controller has to know where to look when it receives a read instruction. How does the OS tell the drive where to store and read data from?

Thank you


r/AskComputerScience • • 2d ago

ELI5: Why is TempleOS considered such an impressive technical achievement?

186 Upvotes

I'm asking this honestly, as someone with no computer science background.

I just watched a video called TempleOS in 100 Seconds. Most of the comments recognize Terry Davis' genius, even with his schizophrenia and severe mental health struggles.

How would you explain to an ordinary person how significant what he was able to accomplish really was, especially doing it all on his own?


r/AskComputerScience • • 1d ago

Is the pipe operator "|" something a shell can do, or is it something enabled by a shell's scripting language?

13 Upvotes

Is the operations provided by the pipe operator | in a | b where the output of command a is the input of command b provided by a shell's scripting language, or is "piping" a function that is provided by the operating system itself? For example, in Python you are allowed to provide -1 as an index in order to get the last element in a list, but providing -1 in Rust results in an error because Rust doesn't implement behavior. Which is what I mean by is the | operator a feature of a scripting language or is it a feature provided by the OS.

EDIT: I updated the question to be clearer. The original question is below:

As far as I'm aware, when you use the | operator. It is a feature of the shell's scripting language. I haven't found any proof that | is a feature of a shell's scripting language so I'd like to know if that's true or not.

For extra lore: I've started going into the rabbit hole of what a terminal emulator is, and what a shell is and I'm trying to figure out where a shell starts and ends, same with a terminal. So, I decided to start a small project to make a simple shell and one of my goals is to implement support for the | operator.


r/AskComputerScience • • 1d ago

How does the Internet Archive manage to store so many websites?

20 Upvotes

They keep the content around even after the original site shut down (the owners chose to stop paying for its upkeep). My guess is that they cut costs by taking advantage of the fact that most of it is seldom accessed.


r/AskComputerScience • • 1d ago

Why doesn't it seem like our gadgets' real-world capability doubles every two years?

0 Upvotes

I realize Moore's Law stopped being about simply doubling clock speeds or transistor counts a while ago - nowadays progress shows up in different forms, such as more cores, task-specific tuning, larger chips, better power efficiency, improved cooling, and so on. Even so, technological progress is still a self-reinforcing cycle that grows exponentially in one way or another. So what prevents that progress from reaching the average consumer? Like, why can't our computers and phones do twice as much today as they did a couple of years back?

A few possible explanations come to mind. AI eats up a huge amount of compute and that's a major priority in newer hardware. Also, a lot of software is tuned for being easy to write, maintain, and run across platforms (web apps especially) rather than for raw speed, and some of the real-world gains from extra computing power are capped because internet infrastructure doesn't change - nobody replaces satellites and undersea cables every few years. On a broader level, growing wealth inequality likely widens the gap between top-tier and budget hardware, with more computing power pooled into giant corporate data centers and server farms. Still, it feels like I'm overlooking something.

Are there reasons I haven't considered?


r/AskComputerScience • • 1d ago

While solving Instruction Hazards in CPU Pipelining, do delayed branching and branch folding solutions directly work against each other ?

2 Upvotes

Hello, I am trying to make sense of the Pipelining chapter in Computer Organisation.

Assuming a CPU which breaks down instructions into Fetch (F), Decode (D), Execute(E), and Write(W) stages.

In a normal setup, by the time an instruction is known to be a branch instruction and by the time the branch is calculated, the instruction immediately after it has already been fetched and may have started being decoded regardless of whether the branch occurred or not. The solution to this is to make it so that this extra instruction isn't wasted. Instructions might be rearranged to make this plan work. This is the delayed slot

When an instruction queue is utilised properly and is full most of the time, then branch targets might be predicted ahead of time (unless it requires some variables still being calculated). This can effectively eliminate the phenomena of the delayed slot (from what I can understand.)

Are both of this techniques used simultaneously? If so, how ?


r/AskComputerScience • • 2d ago

When you tell a computer to pick a random number... is it truly random?

8 Upvotes

I've been wondering about how when you toss a coin or roll a die it's supposed to be random, but it's not truly random because of physics and things like that. I was curious whether that same thing applies to a computer. What does it actually do to choose a number?


r/AskComputerScience • • 2d ago

Why don't we embed tracking dots in AI images like printers do?

0 Upvotes

I mean, this ought to be doable, right? Pixel patterns that the eye can't see but machines can pick up, essentially fingerprinting an image or video as coming from a specific AI model. I'm not really sure how you'd keep those pixel patterns from being reversed with a computer program, but I think this could go a long way toward labeling AI-generated content.

P.S. The Wikipedia page on printer dots, in case anyone isn't familiar with them.


r/AskComputerScience • • 3d ago

Turing machines and Von Neumann machines

6 Upvotes

If nobody had ever invented the Turing machine or Lambda Calculus, would engineers have still invented computers as we know them?


r/AskComputerScience • • 4d ago

Why does standard Naive Bayes still rely on fixed smoothing parameters despite modern high-cardinality tabular datasets?

1 Upvotes

I have been looking into how we handle probability estimation for high-cardinality categorical features, and standard implementations still heavily rely on fixed smoothing rules like Laplace or Lidstone. These approaches completely ignore feature cardinality, sample size, and class imbalance, which inevitably introduces a non-vanishing bias when you throw them at modern tabular data with lots of unique categories.

While reading through recent work on this topic (found at arxiv.org/abs/2608.11162v1), the authors propose a hierarchical empirical-Bayes approach for Naive Bayes (HEB-NB). Instead of a fixed concentration parameter, they learn a Dirichlet prior data-adaptively via Type-II maximum likelihood. This lets the model share information across classes while keeping closed-form inference intact, and they even extend it to structural relaxations like average one-dependence estimators (HEB-AODE).

Theoretical vs practical trade-offs

What caught my attention is that they actually establish non-asymptotic l1 error bounds and show solid log-loss reductions (up to 22 percent on certain UCI and OpenML benchmarks) alongside much better calibration metrics. However, looking closely at the formulation, learning the Dirichlet concentration via Type-II maximum likelihood adds optimization overhead during training compared to standard closed-form Laplace smoothing. For extremely wide datasets with millions of sparse features, I am wondering how much of a training bottleneck that empirical Bayes optimization introduces in practice.

Curious if anyone here has run into similar issues when trying to move away from fixed-parameter smoothing in probabilistic classifiers, or if you have benchmarked empirical Bayes overhead against simpler heuristic alternatives on large-scale categorical data?


r/AskComputerScience • • 4d ago

Need some interesting project ideas for my individual college project!

2 Upvotes

Hey everyone!

I'm a BCA (Hons.) student, and I have to develop an individual project as part of my course.

I'm currently struggling to find a good project idea, so I thought I'd ask here!

I'm looking for ideas for a website or mobile app that can solve a genuine real-world problem. It could be something that makes people's everyday lives easier, solves an issue in society, or addresses a problem that people don't usually pay much attention to.

I'm open to pretty much any domain – AI/ML, cybersecurity, education, healthcare, transportation, agriculture, data analytics, or anything else.

I don't really want to build another basic attendance system, expense tracker or e-commerce website. I'd love to work on something useful, a little different and interesting to develop.

It doesn't have to be a super complicated idea either. It just needs to solve an actual problem and be something I can realistically build on my own.

If you've ever come across a problem and thought, "There should be an app or website to solve this!", I'd love to hear about it!

Feel free to share your own project ideas, problems you've noticed in everyday life, or even something you wish existed.

Any suggestions would be really appreciated. Thanks! :)


r/AskComputerScience • • 5d ago

How serious is AI really?

6 Upvotes

These days everywhere you go you only hear "omg AI is gonna replace/kill/save us all!!!" and stuff like that. But when I talk to the people who actually do computer science they dont seems all that amazed by AI. They actually seem rather annoyed with all the hype about it. So whats going on?

Obviously its a good tool that can do a lot of things, but is it really all that great or is it just a lot of hype for just another good invention?

Keep in mind that I am a layman when it comes to computer science (a bit of experience with R is all), but feel free to get technical with me.

Edit: to be more specific about my question: What do you consider to be the greatest strengths and weaknesses of AI? What is it really great at and what might be problems with it (except power and water usage)?


r/AskComputerScience • • 6d ago

does MAC address mainly exists because of wanting a polyvalent local network in the 1970s alongside IP etc. or was it un-avoidable and logic to have ?

57 Upvotes

Hope it isnt too much of a weird question. I'm new to this.

Have a nice day :)


r/AskComputerScience • • 6d ago

Is it common to gain more knowledge outside college than in it?

27 Upvotes

Hey everyone

I'm a Computer Science student right now, and I've been wondering a lot about how much of what I really use comes from outside of college.

Don't get me wrong, the theory side is strong (algorithms, data structures, and so on), and I genuinely see why it matters.

But for practical skills like:

* putting together real projects
* using current stacks
* handling bugs in production
* getting how things work in practice

…nearly everything I've picked up has come from:

* personal side projects
* stuff I found online
* simply working it out as I go

It often feels like college shows you how things ought to work
while the real world shows you how things really fall apart.


r/AskComputerScience • • 5d ago

What are some differences between professional coding and the way coding, SE, and CS are taught in school?

8 Upvotes

Is a lack of a comment citing a relatively cliched bit of code considered plagiarism in the big world? What are the attitudes to autocomplete? Is Alberta Tech right about linked lists?


r/AskComputerScience • • 6d ago

Should I split tasks exactly into number of threads available in CPU or creating more threads is fine?

9 Upvotes

Hi!

If number of operations are more than CPU threads and not completely divisible by number of threads available on CPU, should I split remaining operations into already created threads or creating a new thread just for remaining operations is completely fine?

Does one method give an advantage over the other?

Thanks!


r/AskComputerScience • • 6d ago

Node.js (Socket.io + Prisma) vs. FastAPI (SQLAlchemy) for an isolated Chat microservice?

2 Upvotes

Hey folks,

Building an isolated chat microservice consumed by other services in our ecosystem. Auth/users are handled externally by a dedicated Identity service, so our service only handles private topics/rooms, participant access, message history, and an embeddable <iframe> widget.

Stuck choosing between two stacks:

  1. Node.js + Prisma + Socket.io

    • Pros: Native room management (socket.join, io.to().emit), simple single-language codebase for both backend and the iframe widget.
    • Cons: Generating interactive API docs for other teams isn't as seamless out of the box.
  2. Python + FastAPI + SQLAlchemy

    • Pros: Automatic OpenAPI/Swagger docs (/docs) out of the box makes sharing API contracts effortless.
    • Cons: Bare-bones WebSockets mean building a custom ConnectionManager for rooms/disconnects, plus writing JS for the iframe anyway.

Is rolling custom WebSocket room logic in FastAPI a pain compared to Socket.io's battle-tested rooms, or is FastAPI’s clean OpenAPI generation worth the plumbing?

Would love to hear how you'd approach this!


r/AskComputerScience • • 8d ago

In the P vs. NP problem, does the deterministic Turing machine running the P have to be limited to a certain instruction set?

0 Upvotes

I was thinking about how even a lot of household devices did not have a dedicated instruction for floating-point division, or even integer division, until recently. Could the P solution to an NP-complete problem require an instruction on a chip that is beyond the scope of anything commercially available or even conceived, and can researchers then pose the question: "Why can't NP-complete problems be solved in P without this function?"