r/computerscience • u/Background_Class_558 • Sep 16 '26
r/computerscience • u/Plastic_Chest1621 • Sep 14 '26
Help Help proving this đ
I know I can't just directly cancel nlogn with theta(nlogn).
Can anyone please help to solve this đ
r/computerscience • u/ManningBooks • Sep 15 '26
Discussion Whatâs one algorithm every programmer should know and why? [5 ebook giveaway]
galleryIf you could add one algorithm to every programmerâs mental toolkit, which would you choose?
Not the one that looks best in an interview. The one that genuinely changed how you solve problems.
Iâm Stjepan from Manning Publications, and the r/computerscience moderators kindly gave me permission to post this.
Weâve just launched Aniket Wattamwarâs Algorithms Every Programmer Should Know in MEAP, Manningâs early-access program:
https://www.manning.com/books/algorithms-every-programmer-should-know
The book is built around a simple idea: knowing an algorithm means more than reproducing its implementation. You should recognize the kind of problem it solves, understand why it works, and know when its tradeoffs make it a goodâor badâchoice.
The chapters available so far cover GaleâShapley, the Hungarian algorithm, RabinâKarp, KnuthâMorrisâPratt, and Horspoolâs algorithm.
But weâd like to hear your answer:
Whatâs one algorithm every programmer should know, and what makes it worth knowing?
Real examples are especially welcome. Maybe it saved a production system, simplified something you had overengineered, or gave you a new way to think about an entire class of problems. Disagreements are welcome tooââevery programmer should know Xâ is a claim worth challenging.
Weâre giving away five copies of the ebook. The giveaway is open for 48 hours, and weâll award the copies to the five comments that contribute the most to the discussionânot simply the comments with the most upvotes. Weâll announce the winners here after it closes.
If youâd rather pick up the book directly, this code takes 50% off:
MLWATTAMWAR50RE
Full disclosure: I work for Manning, and this is a promotional post shared with moderator permission.
Iâll start: which algorithm is far more useful than most programmers realize?
EDIT: The giveaway is now closed. Thanks to everyone who joined the discussion. We announced the winners in the comments.
r/computerscience • u/OtherwisePush6424 • Sep 13 '26
Article How to Implement a Distributed Circuit Breaker
blog.gaborkoos.comr/computerscience • u/medium_wall • Sep 13 '26
Discussion Turning The Frickin' Bits Gay!âCreating non-binary bits with current technology, and the applications it might benefit
reddit.comr/computerscience • u/ShadowGuyinRealLife • Sep 10 '26
General Is the Choice Between an Interpreter or Compiler Defined By the Language?
Compilers take the human readable source code and turn it into a set of instructions the processor can understand. For example, C source code goes through a C compiler which then gives a binary that can be read by computers. This needs to be done for specific hardware. For example, a x86 processor can't read instructions for the RISC-V.
Languages like Java are different. The source code is turned into a bytecode. This byte code is the same no matter the target system. On the target system, the executable is an interpreter. So an interpreter can read the bytecode and then use this to determine what calculations the program wants to do.
I was thinking programing languages are about logic. They define behavior. So is it possible in principle to make a compiler that can turn Java or CLISP source code into a binary that can run on the target system? There wouldn't be a reason to do so, but in principle could it be done?
r/computerscience • u/Similar-Park8496 • Sep 09 '26
Want to Learn About Databases in Depth and understand Underlying Mechanisms
I started learning about SQL few weeks ago. My primary resource is YouTube. I would also like to understand how databases actually work under the hood. Do you guys have any resource that explains the mathematical part of the Database
Or I should Just follow any Discrete Mathematics Course ?
r/computerscience • u/Defiant_Shoe_626 • Sep 10 '26
Computer science and math
Does learning math necessary before beginning with computer science. I has some knowledge on programming and networks, I am now studying linear algebra.
r/computerscience • u/MusikMaking • Sep 09 '26
Discussion How may one create an "air-gapped PC" mostly for engineering work - confidential - when most goftware wants ginternet while installing and most - when - periodically "call home"?
Is it even possible anymore?
r/computerscience • u/neuralbeans • Sep 08 '26
Discussion Looking for a data structure that maps indexes to values (like an array) but that is only populated once and then deletes values by index in sublinear time
reddit.comr/computerscience • u/CyberSecWithHaikuInc • Sep 04 '26
In the beginning, there was SMTP
And finally, I've decided to write about good ole SMTP., also known as Simple Mail Transfer Protocol.
Twas the night before... some night in November 1981 (I couldn't find the exact date), Jonathan Postel published RFC 788 while working at the U niversity of Southern Californiaâs Information Sciences Institute. And what was RFC 788? Titled "Simple Mail Transfer Protocol", it was the first round of rules and specification laid out for computers to follow when sending emails from one mail server to another.
Unlike my dive into FTP, I was able to find a more accurate date for the birth of our modern day SMTP. In August 1982, Jon Postel (again) published a revised and updated Simple Mail Transfer Protocol in the well known RFC 821. So, some could argue that the creation of (our modern day) SMTP was in 1982, though, I would argue that it was in 1981, and was improved upon.
Now, about Mr. Jon Postel... it turns out he was quite influential amoung network researchers and helped develop, define, and document many internet tools and techs. Like enough that I should do a seperate article just about him and his career. (Maybe? let me know) Some of those include: SMTP, TCP/IP, RFCs, IANA, and more. The man was busy.
In regards to SMTP, he was 38/39 years old when he published RFC 788/821 and worked as a research scientist at USC's Information Sciences Institute. He was working on ARPANET/Internet protocols and serving as a central figure in the RFC process. When I was reading about this, I also saw the name Paul Mockapetris, who was also at ISI around this time, and later on developed the first SMTP email server there before going on to invent DNS. (DNS would be a cool one to write about also).
Let's end today by answering the simple question... why was SMTP created? Well, before SMTP, emails already existed. And different systems could already handle the mail in different ways, but there was no standard set of rules. And like literally everything in computer science, things become easier to do when you have a nice tidy set of rules that everyone can follow. And so, in simple terms , Jon gave the computers the following rules:
-Identify who a message is from
-Identify who it is going to
-Transfer the message
-Relay it through other mail servers if needed
-Confirm whether delivery succeeded or failed

I think I'll wrap up here today. Let me know your thoughts and if you have any other suggestions. I'm quite enjoying these historic dives. I kind of want to write about RFCs, Paul, and this guy some more... well, anywyas... Catch ya later!
r/computerscience • u/National-Dragonfly35 • Sep 01 '26
IBM quantum computer solves classically intractable problem in 15 minutes
sciencedaily.com"The researchers showed that their method preserves the same computational hardness criteria associated with RCS, meaning the problem remains extremely difficult for classical computers. At the same time, the added structure allows errors to be detected during the quantum computation."
r/computerscience • u/ShadowGuyinRealLife • Sep 01 '26
General Does Replacing Instructions that Do Nothing with NOPs Change Anything?
Suppose in the executable, instructions N to N+6 do some load instructions from memory, then N+7 to N+30 are some integer operations like add, subtract, multiply, bitwise operations and so on. the results are not stored to memory. Then Instruction N+31 to N+37 loads new values in the registers and none of the results of the previous calculations do anything. A different version of the executable has instructions N to N+30 all be "NOP" and N+31 to N+37 are the same as before. Does anything change? My inspiration for this is the game Mario 64 had been dissected and if you look at the assembly of the NTCS version, there are plenty of instructions that do some calculations that aren't used and some weird things like loading from the same address to the same register when the register's value could not possibly be changed. The extraneous loads always load stuff from cache. At the same time these instructions couldn't outright be removed or the alignment of all the JMPs would be thrown off. My friend said perhaps some NOPs might be done with a lower power consumption than some of the multiplication instructions, but otherwise if the later instructions don't use the results of the extraneous instructions and are unaffected by their flags nothing should change.
r/computerscience • u/BuyerImpressive4325 • Aug 29 '26
Discussion How is program synthesis more convenient?
the idea of program synthesis (like Rosetta) is to reduce a function into its constraints in a spec sheet, and generate the program from those constraints. for example, in order to write something like x = x squared, you would need to write a spec sheet along the lines of âxâZ,f(x)=x2. i am considering building a program synthesizer, but I still havenât figured out why exactly this representation is supposed to be easier than writing the code directly (they look equally complex)
r/computerscience • u/Standard_Ice_3169 • Aug 28 '26
What research areas are you excited about?
reddit.comr/computerscience • u/Dry_Couple8852 • Aug 29 '26
Why is The Hexadecimal System 16-bit? I thought it would be 6-bit because of the prefix, "hexa-".
r/computerscience • u/CyberSecWithHaikuInc • Aug 28 '26
General FTP wont let me be, or let me be me, so let me see (creation of FTP)
I felt clever with that title...
The time has come... WHEN, HOW, WHO... created FTP.
I was surprised to learn that FTP (1971) was created before PING (1983). Though, I think because PING was one of the VERY first commands I learned, I just filed it away mentally as being one of the oldest commands there are. Alas, I was wrong.
File Transfer Protocol, aka FTP, was first introduced in April 1971 by Abhay Bhushan (26yo @ the time) in his RFC 114. Don't know what that means? RFC stands for Request for Comment. 114 means... that it is the RFC that came after 113, I don't know man. Anyways, the RFC 114 was the original proposal titled as " A File Transfer Protocol" and it explained how computers on ARPANET could transfer files between one another in a consistent way, even if the computers were different types.
And what does THAT mean? It means that Abhay laid out rules that different computers could follow if they want to send files to each other. The basic idea was that one computer asks another computer to do something with a file, like retrieve it, store it, rename it, delete it, and so on. Then, the two computers follow an agreed set of commands so they understand each other.
Abhayâs original proposal was revised repeatedly and eventually evolved into the protocol people recognise today. So, I suppose you could argue that FTP was created after April 1971, but it was hard for me to find a specific date in which our glorious modern day FTP came into existence.
Let's wrap this up with a brief tid bit on who Abhay Bhushan is. At the time he published the RFC 114, he was 26 and working at MIT's P roject MAC. His development on the original FTP specifications also lead to contributions to early email protocols (more on this next week). His career continued to flourished through his life and in 2023, at 79 yo, he was inducted into the Internet Hall of Fame for his contributions to FTP, early email standards, and Internet architecture.

While i considered combining this article with SMTP, I actually felt that FTP and SMTP deserved two seperate articles. plus this one is already starting to feel text heavy. Keep your peepers peeped next time to find out about SMTP. I kind of want to do a seperate post deep diving on Abhay's career life, because hot dang, this guy did a lot and it would be pretty interesting to learn more. Anywho, thanks for reading!
r/computerscience • u/-R-I-k- • Aug 28 '26
Discussion how often have your RAG issues actually turned out to be document parsing issues?
Iâve been thinking about this a lot lately.
When a RAG system gives bad answers, the first instinct is usually to look at chunking, embeddings, retrieval, or the model.
But sometimes the problem started earlier.
If the parser already destroyed the table structure, heading hierarchy, or reading order, retrieval is working with bad input from the beginning.
Curious how often others have run into this.
Was the real bottleneck actually the ingestion/parsing layer?
r/computerscience • u/mindxxx • Aug 25 '26
Help where can i learn how the internet physically works?
r/computerscience • u/Extra-Engineering374 • Aug 25 '26
Discussion My self-built tool to learn concurrency
reddit.comr/computerscience • u/ShadowGuyinRealLife • Aug 24 '26
Discussion How Are Split Caches Handled with Thread Coordination?
I read that some processors have each core having its own L1 cache instead of having one for the entire processor. So instead of a 512 Kilobyte shared cache shared by 8 cores, each one would have 64 kilobytes. I guess being closer to the core might speed things up when waiting for data and this is fine if each core is running a different process.
The thing I don't get is what happens if each core has a different version of some data. So say address 1,000 has 5. Maybe it's a global variable or something. Core 1 writes 6 to address 1,000 and this is updated in core 1's cache. This is intended to be read by a different thread. This change might get propagated to RAM. Core 2 runs that other thread and tries to read from address 1,000. Ah, it's already cached with... 5. So do compilers just use memory barriers to avoid this and make the programmer not need to worry about it?
Or maybe it doesn't matter? I read elsewhere it is fine for values in the cache to get a bit stale. What is important is that the writes from all cores are read in the correct order. So if core 1 is running a thread that puts 6 at address 1,000 replacing the value 5, 32 in address 1,001 replacing the value 31, and 9 in address 1,002 replacing the value 8, it is fine if core 2 attempts to read them and gets "5, 31, 8," "6, 31, 8" or "6, 32, 9" even though that last one is the most up to date as long as it doesn't read something like "6, 31, 9."
r/computerscience • u/Negative-Arm-3244 • Aug 22 '26
Advice Operating Systems Research Advice / Recommendations
I have an interest in operating systems, and for a class and personal interest, I want to do research on operating system design. I have been trying to find and read existing research on this topic (experimental design for both for entire kernels or for some subsystem in the kernel). From this, I am hoping to be able to find an area that has not been researched in detail yet, and to do research on this (for example on performance when comparing experimental to other designs used in modern operating systems). The issue is though to find a general topic in operating systems to do this search on, hence this post. Also, I have a bit of experience with basic operating system development and have been working on my own hobby operating system for around a year now, and from this I have what I feel is a basic understanding of the main concepts in operating systems.
The reason I am making this post is to ask whether any of you guys recommend and under researched topics that I could look into, and also inquire if there are any resources I can use to find gaps in research more efficiently.
Many people online have told me I should contact my professor and ask them, so I want to state that I do not have a professor. I am also aware that this is a very broad question, but any input is appreciated.
r/computerscience • u/Noah-999 • Aug 22 '26
Help Favourite yet Easy to read book on operating systems?
reddit.comr/computerscience • u/samarthsinha1 • Aug 21 '26
Help What is the right way to read a white/research paper
What is an efficient way to study and understand a research paper.