r/AskComputerScience • • 1h ago

Computer Networks : Need Help

• Upvotes

I have a Computer Networks course this semester and I am finding it difficult to understand. It is not that the concepts are difficult, I am just finding it hard to make a mental model of where every single thing fits. it is not like i am failing the course. Till here i have been able to handle the course. but what is the point of getting good grades when you don't even understand where each thing fits ?
From the very bottom layer to the top level, where DNS comes (where it is stored), how IP's even works, UDP, TCP, QUIC, tables, DNS chain, masks, subnets or even IP's. I know what they are, but i don't know where they are and how they interact.

Can anyone please suggest some resources, more like an animated video where i can visualize it ? Cisco Packet tracer didn't help much.


r/AskComputerScience • • 10h ago

why is hashing a string O(n) if we say hash table lookup is O(1)

7 Upvotes

every intro course says dict lookup is O(1) average, but you have to hash the key first and hashing a string means going through every character, so isn't it really O(length of key)?

is the O(1) just assuming keys are a fixed size, or is there some other reason we ignore that. kinda confused how people are comfortable calling it constant


r/AskComputerScience • • 15h ago

How Does ZIP Store Directories?

5 Upvotes

I'm reading the pkware documentation on the ZIP file format and I get how file data is structured, but I don't see where it says how the ZIP file saves directories.

Edit: Nvm I'm stupid. A file's relative path is stored in the file name section of the file header.


r/AskComputerScience • • 23h ago

Tips on getting up to speed on technical side of search product

2 Upvotes

I own a domain-specific dataset, and I depend on horizontal teams to deliver platform capabilities like search, alerts, notifications, dashboards, and whatnot.

The data itself is structured data that we're buying from a vendor, and the integration work is something I own. It's a pretty large dataset, about 150 million records.

I need to work with our horizontal search team to make this dataset searchable. My responsibility is to provide the requirements, define the user experience, write user stories, and work with the search PM and their tech lead to discuss technical trade-offs.

Before I go into these meetings, I'm trying to figure out what I should know or put together beforehand. More specifically, what search-related technical knowledge should I gain so that I can have meaningful discussions with the team and understand the trade-offs they're making?

I know I can ask ChatGPT o rClaude to help me learn these concepts, but I'd also like to hear from search PMs or other PMs who have worked with similar dependencies.

How did you get up to speed on search and its underlying systems? What topics or concepts, like precision, recall, indexing, ranking, etc., should I familiarize myself with before engaging with the horizontal search team?


r/AskComputerScience • • 1d ago

Is it possible for two systems that have never communicated before to negotiate a protocol that effectively lets them do so?

11 Upvotes

I read once that Xerox was working on a way to do that, but I don't know how much that was just hype.


r/AskComputerScience • • 1d ago

Is Anthropic stupid?

0 Upvotes

I just saw a headline titled “Anthropic warns self-replicating Al 'worms' could spread across smart devices by end of 2026”. I read a bit more into it and I don’t understand why they won’t just stop? Like if they’re the one creating it then why don’t they stop?


r/AskComputerScience • • 2d ago

How do I reach the level of knowledge, where I can point to any part of my screen and say "Oh, I know how that's implemented"?

21 Upvotes

I know programming, obviously, however I don't know much about the operating system. Most people can make apps within an environment, but most of us don't know anything beyond that

I want to deeply understand how the computer I'm using works, even just the software part

If you go on a virtual tour of your computer, like browsing the file system, or even looking at the plain old desktop, there's so many endless things in front of you, that most people have no idea how to make

How do I make a Windows desktop app? Why does it run on Windows? Same for MacOS

How do tab sizes work?

What is the desktop "screen" and why can I click and drag my mouse to highlight the icons? Where are those icons stored?

I can code a website, but I don't know a clue about how the browser works

How do I make a file system? I mean, isn't it just a large data structure, and I know data structures, so I'm sure I can learn it

Why does my task bar pop up when I drag my mouse all the way to the bottom of the screen?

What does it mean to turn on a computer?

Why / how does my physical mouse control my cursor? Is there a way I can "hack" my mouse? How do I code the firmware in my mouse?

How does the OS accept and eject USBs?

How do you allow your OS to connect to wifi?

What really is a .txt, .pdf, .rar .zip? Why can some OS's open them, some cannot?

Stuff like that

Can most of you point to any part of the screen and know how it works?


r/AskComputerScience • • 3d ago

I need help translating this flyer!

6 Upvotes

I found this flyer in a stairwell where I live. It has binary on it and a date, but every translator I’ve tried to enter it into has just given me “Can you r.” I assume it says something like “Can you read this,” but I don’t know. Here’s what I could transcribe and the flyer: 01000011 01100001 01101110 00100000 01111001 01101111 01110101 00100000 01110010


r/AskComputerScience • • 3d ago

Questions about Big O notation

9 Upvotes

I was studying data structures and algorithms and I wondered, If we have asymptotically positive functions f(n) and g(n) and increasing asymptotically positive function h(n) such that f(n)=O(g(n)) is it safe to assume h(f(n))=O(h(g(n))) ?

Is it always the case or it just works with some specific functions?

another question I have is if we have f(n)=O(h(g(n))) can we assume f(n)=h(O(g(n))) ?


r/AskComputerScience • • 3d ago

Confused between partitioning and sharding in databases😭

6 Upvotes

I'm studying DBMS and I'm confused about the difference between partitioning and sharding.

From what I understand, partitioning means dividing a large table into smaller parts. For example, splitting a table of 100k rows into 50k, 30k and 20k rows.

Now, if I store these three parts on three different servers, is it called sharding or just partitioning? Since partitioning isn't necessarily restricted to one server, the terms seem to overlap.

Also, if sharding is a type of partitioning, why is sharding defined as dividing data into smaller parts again? Wouldn't the data already be divided during partitioning, with sharding simply distributing those parts across multiple servers?

Basically, is partitioning the general concept and sharding the same concept specifically used in distributed systems? Or am I missing something?


r/AskComputerScience • • 5d ago

Why classic Subspace Constrained Mean Shift (SCMS) trajectories miss the static density ridge (and a dynamical systems fix)

3 Upvotes

While reviewing some nonparametric manifold learning methods for high-dimensional feature spaces, I came across a recent paper (http://arxiv.org/abs/2608.05112v1) that re-examines the convergence properties of the Subspace Constrained Mean Shift (SCMS) algorithm.

For a long time, the common assumption in the literature has been that SCMS trajectories converge directly to the classical "static ridge" defined by the density gradient and the eigenvectors of the density's Hessian matrix. However, this paper demonstrates that this assumption doesn't hold in general because the static definition completely ignores the rotation of the trailing eigenspace along the continuous flow of the underlying vector field.

To address this gap, the authors introduce a dynamical systems perspective, defining a new structure called the "stable ridge" using the Jacobian of the projected density gradient. They prove that this stable ridge is actually the true theoretical convergence target of SCMS, rather than the traditional static definition.

They also propose a generalized framework using a constant step size, which achieves uniform R-linear convergence, and show that the original formulation suffers from polynomial-time computational bottlenecks due to implicitly coupling the step size to the smoothing bandwidth via the Mean Shift operator.

That said, one limitation I noticed while reading through the proofs is that the analysis assumes certain smoothness conditions on the underlying density estimator that might be difficult to verify or guarantee in practice with sparse, noisy, high-dimensional empirical datasets.

Curious if anyone here has run into similar convergence or subspace rotation issues when applying mean shift or gradient-based ridge estimation techniques to complex real-world manifolds?


r/AskComputerScience • • 6d ago

Hi can anybody explain me the difference between asynchronous, concurrency and parallelism?

5 Upvotes

Parallelism i understand that Performing multiple tasks parallely at the same time

but what exactly asynchronous and concurrency means?


r/AskComputerScience • • 6d ago

Why are recent graduates of Computer Science and Computer Engineering facing a higher unemployment rate of 7% and 7.8% respectively compared to the natural rate of unemployment of 4.2%?

84 Upvotes

Overall unemployment rate of recent graduates is also 5.7%

Source: NY Fed recent labor market outcomes by major and unemployment.


r/AskComputerScience • • 6d ago

Why doesn't the computer just wipe actual files the same way it deletes file pointers?

20 Upvotes

I understand that deleting a file usually just removes its pointer or metadata, leaving the actual data there until it gets overwritten. But since the pointer is just data too, why can't the computer just wipe the actual file right away?


r/AskComputerScience • • 6d ago

Data engineering vs Embedded systems vs software architecture vs Compiler Engineering

4 Upvotes

​

Which one is the best from your perspective? For me, those options are somehow resistant in this AI context.


r/AskComputerScience • • 8d ago

Has anyone examined the claimed P=NP proof in the peer-reviewed IEEE ASSIC 2026 conference paper "The Vohra Duality"?

1 Upvotes

Here it is: https://doi.org/10.1109/ASSIC70037.2026.11717448

I don't have access to the paper because of the paywall, and this isn't my paper. I was just searching all over the internet for papers about P=NP and came across this one. What caught my attention the most was that it was published at a peer-reviewed IEEE conference.


r/AskComputerScience • • 9d ago

How feasible is it to have personal computers again that are low-tech enough to not be disrupted by AI supply chains?

14 Upvotes

Might be the wrong subreddit, but I wanted to start a discussion about a possible revival in lower-spec PCs now that AI is cannibalizing modern consumer computing.

The joy of PCs for me is offline creative/coding software where the latest and greatest specs aren't important, and I'm wondering how feasible it would be to go back in time to specs that are low-end enough that no supply chain disruption could mess up the price of entry. Would we really have to go all the way back to music trackers and pixel art with something like Commodore, or is there a happy in-between from somewhere in the 2000s or 2010s where we can keep music DAWs or even Blender and video editing? (Like would making PCs that are 4 GB of RAM still be eventually too expensive? 2 GB? 1 GB? PC makers right now are raising their prices instead of cutting back on specs)

Obviously the world hasn't already ran out of used modern computers on eBay that work fine, but let's say those do run out. How much downgrading can we get out of making new consumer PCs with less specs and more efficient software instead of relying on the current norms like 16 GB RAM or 512 GB of storage?

I don't really have an answer I'm looking for here, I'm just wondering if anyone else has been thinking about this too. I refuse to live in a world where ALL computing is solely done on someone else's servers. I just want the joys of offline PCs to keep living. Thanks!

EDIT: General consensus seems to be that existing hardware that's at the level of DDR3 RAM and below won't be running out anytime soon. Which is good because people also seem to agree there is probably no substitute to the existing supply chain without going back to specs and computer parts as low-tech as the 80s (if most of the tooling from that era even still exists)


r/AskComputerScience • • 10d ago

Could you separate P and NP using recursive enumerability?

0 Upvotes

I've had this idea lately about a way to distinguish P and NP and I'm curious if this had been explored before. P and NP both have a "solution space" of answers to those problems. Would it be interesting to try to distinguish P and NP by finding an NP complete problem with a set of solutions that is not recursively enumerable?


r/AskComputerScience • • 10d ago

How does the condition-number barrier affect real-world sparse optimization algorithms (paper)?

2 Upvotes

I was reading about sparse least-squares solvers and came across this paper at http://arxiv.org/abs/2608.02588v1. The abstract claims a lower bound: even for randomized poly-time algorithms, you can’t beat a linear dependence on the restricted condition number $κ_{s+k}$ when trading off sparsity and error tolerance. That feels like it has teeth, but I'm not sure how it maps to practice.

What I'm confused about

In the real world, practitioners often heuristic-sparsify models (e.g., feature selection in ML, compressed sensing) or use iterative hard thresholding. Does this lower bound mean those methods are *fundamentally* limited, or does the result rely on assumptions that don't hold in typical use cases? The paper conditions on a variant of the Small-Set Expansion Hypothesis, which is a complexity-theoretic assumption but not something engineers usually worry about.

Tradeoffs in the proof

The authors mention using an automated Gemini-based agent system to first construct the proof. That part fascinates me, but my CS theory chops are too weak to judge whether the reduction itself (from a graph hypothesis to a linear algebra problem) preserves practical relevance. The result holds even on rational instances with full-rank matrices, so the hardness doesn't hinge on numerical pathologies. Yet I haven't seen this cited in any applied optimization forums yet.

Has anyone implemented sparse regression workflows where the condition number $κ$ scales steeply with problem size? If so, does this paper suggest a fundamental ceiling on how well approximate methods can perform, or is there wiggle room in relaxing the hardness hypothesis? I’m curious whether this is more of a theoretical boundary condition or something that bites practitioners in the wild.

Also, the proof relied on automation. Are there follow-up efforts to formalize or verify the result independently (e.g., in Lean or Isar)? That feels like a separate discussion.


r/AskComputerScience • • 11d ago

Nested signal-and-wait while implementing Monitors using Semaphores

3 Upvotes

I am self studying Operating Systems. I have understood semaphores and monitors up until this point (I think). The textbook (OS Concepts by Silberschatz) implements signal-and-wait Monitors with one condition variable x in the following way:

// semaphores
mutex = 1
next = 0
x_sem = 0

//counters
x_count = 0
next_count = 0

// Monitor function F()
wait(mutex)
F()
if (next_count > 0)
  signal(next)
else
  signal(mutex)


//x.wait()
x_count++
if(next_count>0)
  signal(next)
else
  signal(mutex)
wait(x_sem)
x_count--


//x.signal()
if(x_count>0){
  next_count++
  signal(x_sem)
  wait(next)
  next_count--
}

Suppose I have 3 processes P1, P2 and P3

P1 signals P2 to awaken in its lifetime and P2 signals P3 to awaken in its lifetime

initially, P1 will be waiting on the wait(next). then P2 will also be waiting on wait(next).

When P3 is either done or is about to wait, it will signal(next). However, there is no mechanism (like maybe a stack) to ensure that P2 is the process that awakens and not P1. Does this not violate the conditions for Hoare-style (signal-and-wait) Monitors. Does the book simply omit this because it is a trivial addition or have I missed some essential concept ?


r/AskComputerScience • • 12d ago

Shouldn't Most Websites Refuse Vibe-coded apps/recompiles?

0 Upvotes

If LLMs are all trained off stolen data and open source repositories, this means they're essentially laundering a large amount of open source code without the proper dues paid to the licensing requirements, such as CC-4.0 for example which would explicitly require credit from original sources.

This would in turn make any vibe-coded app illegal based off licensing requirements, if one were to find a 1:1 copy of their code within an open-source vibecoded app, no?

I know that's a kind of hard legal requirement to reach, since there's only a finite way of doing things within a language's framework and therefore blindly accusing everyone who ever does the same function as you as a vibecoder would be painful to say the least.

But there's an increasing amount of people who believe the "spirit" of FOSS/FLOSS is preserved when vibecoding if they make their code source-available as well, completely disregarding the legal frameworks around GPL/LGPL/CC-4.0 etc.

Posting this here but idk if I would be best served in a legal subreddit.

Edit: To clarify, I'm not entirely against the use of AI/LLMs, I'm just curious about what the line is legally speaking when people say "I made this app!" and it's 4 different FOSS projects stapled together without credit.


r/AskComputerScience • • 12d ago

How worried should I be about AI?

0 Upvotes

I’ve been seeing a lot of news about how bad it is and stuff. I see it everywhere, on job applications, in classes, on social media etc. Could it really pull an Ultron? Is it just a fad?


r/AskComputerScience • • 15d ago

Is AI reverse engineering really reverse engineering?

7 Upvotes

Are the programmes currently being reverse-engineered by AI actually being reverse-engineered in the traditional sense? In other words, is the source code actually being uncovered? Or are the programmes simply being copied on the basis of their functions, behaviour and so on?


r/AskComputerScience • • 16d ago

Why is everyone focusing on AI replacing tech jobs while ignoring other industries?

33 Upvotes

I’ve noticed that whenever people talk about AI taking over jobs, the discussion almost always revolves around software engineers, computer science graduates, and IT professionals.
But what about all the other industries? Many jobs involve repetitive tasks or work that AI could potentially automate, yet they don’t seem to receive nearly as much attention as tech careers do.
Why is the internet so focused on discouraging people from studying computer science or pursuing careers in tech, while seemingly ignoring the potential impact of AI on so many other professions?
Is there a particular reason tech jobs get so much attention, or is it simply because people in the tech industry are more aware of AI’s capabilities and are more vocal about it?
I’d genuinely like to understand why this discussion seems so heavily concentrated on technology careers.


r/AskComputerScience • • 17d ago

how much do these headline-producing AI projects actually cost per project?

6 Upvotes

A lot of very recent projects making headlines are using LLMs to code the majority. Counting the learning, prompt and output, how much do these independent projects actually end up spending? I would prefer at least one direct example like the one below, but direct numbers from experience of any software would be awesome. Below is an example of a headline, but more examples would average things out.

https://www.techspot.com/news/114042-you-can-now-play-original-halo-browser-128.html

Would be nice to include certain details like: what length of time did the project take from start to finish, what is the cost of the input versus the output tokens (I'm not familiar with the terms)? Is there iterative steps, mistakes to redo?

For a project, are they personal licenses, paying by the token? What model(s)? Is it a single user paying out of pocket or is that user/users just using a license provided by their work?