r/AskComputerScience • • Feb 27 '20

Why is recursion so praised despite it typically using more memory and not being any faster than iteration?

48 Upvotes

For example, a naive approach to calculating Fibonacci numbers recursively would yield a time complexity of O(2^n) and use up way more memory due to adding calls on the stack vs an iterative approach where the time complexity would be O(n). Even if you use dynamic programming for a recursive solution, you'd get the same time complexity as the iterative solution while using up much more memory. Especially if your iterative solution just uses an array of two elements to calculate the numbers in the sequence.


r/AskComputerScience • • Sep 10 '19

Why have cpu designers not standardized the assembler language so that there is only one (and that it is portable) ?

48 Upvotes

r/AskComputerScience • • Jun 04 '19

What is your favourite (computer science + history) documentary?

48 Upvotes

I'm looking to learn more context about CS by understand its history. Please share your favourite CS + History documentary!


r/AskComputerScience • • Apr 02 '19

Are there any computer science podcasts?

48 Upvotes

Podcasts for software developers / computer science students / hobbyists ?


r/AskComputerScience • • Nov 06 '18

Is there a "Hello world" program for quantum computers?

48 Upvotes

r/AskComputerScience • • May 29 '18

Where and how can I learn good design practices? (design patterns, applying OOP concepts, modular design, etc)

48 Upvotes

Hey, interview season is upon me now. Final year of college. Need to learn how to write better code, learn code refactoring.


r/AskComputerScience • • May 25 '26

In a computer, why is 2 more than 1?

47 Upvotes

Or how does a computer increase a value? How does it "know" which value is higher?

Is there a place I can go to learn this?

I know pretty much nothing about computers and I want to learn about how signals form information.


r/AskComputerScience • • Oct 01 '25

What would it actually take to build a modern OS from the ground up?

47 Upvotes

As far as I'm aware, under the hood of everything that's truly useful is either DOS, or some fork of Unix/Linux

I rarely hear about serious attempts to build something from nothing in that world, and I'm given to understand that it's largely due to the mind boggling scope of the task, but it's hard for me to understand just what that scope is.

So let's take the hypothetical, we can make any chip we make today, ARM, X86, Risc, whatever instruction set you want, if we can physically make it today, it's available as a physical object.

But you get no code. No firmware, no assembly level stuff, certainly no software. What would the process actually look like to get from a pile of hardware to, let's set the goal at having a GUI from which you could launch a browser and type a query into Google.


r/AskComputerScience • • Feb 10 '21

How dangerous is it actually to use public wifi?

47 Upvotes

I’m really sorry if this isn’t the right place to ask. Please point me in the right direction if it isn’t.

But how dangerous is it actually to use wifi at a cafe, hotel, or Airbnb? In other words, wifi that’s not under your control?

On one hand, it could be dangerous because I suppose they could track your activity. On the other hand, apps and websites are encrypted, so even if you go to your banking app or site, they can’t really do anything right? Also, if it was so dangerous, would public wifi be so common?


r/AskComputerScience • • Nov 07 '20

Why is ARM better than Intel? What does ARM actually do? Why doesn't/didn't Intel just do what ARM is doing?

47 Upvotes

Did a search here and there are quite a few interesting discussions, but can't quite find the answer to my questions.

I have a barrage of questions: curious what "Apple silicon" does better than Intel's chips? What part does ARM play in it when they call it "Apple silicon"? Will more PC makers do the same thing too? How has ARM gone from little phone processors to full on desktop processors like this? The announcement sounds like Apple pulling the rug from under Intel, seems like a fairly big client to lose, why doesn't Intel just do what ARM is doing?

As far as I'm aware there's pretty much an ARM chip in almost every piece of tech at this point, but I can't understand what they actually do when you start seeing "Apple silicon" and other brand names being mentioned but not ARM (Like Snapdragon - it's made by Qualcomm, but uses ARM?)

Thanks!

edit: can't respond to everyone but I've read every single comment, thanks a lot! Tons of great info here!


r/AskComputerScience • • Oct 14 '20

Have you ever been bitten by speed of light?

47 Upvotes

I once spent about a half of a day trying to figure out why it was taking so long to get a blob out of an S3 bucket trying to all kinds of things to debug it. It finally occurred to me that the bucket was in Ashburn, VA and I was in San Francisco. Duh.


r/AskComputerScience • • Nov 18 '19

Soon-to-be CS graduate and I need advice on my resume?

Post image
47 Upvotes

r/AskComputerScience • • Apr 20 '19

I'm a freshman in uni studying Comp Sci, what can I do to get the most out of my next four years?

47 Upvotes

My goal for the moment is to have a good knowledge of the basics, and for context I had Computer Science in my A Levels. I want to use the next four years of my life studying computer science as well and as efficiently as I can, but I honestly have no idea where to start when it comes to learning on my own.

I've only just started to learn C++ (required in beginner uni courses), although I have some programming experience in Visual Basic, and have done some stuff in HTML and CSS etc. So I'm basically a beginner.

What are the things I should be teaching myself?

What book do you recommend for learning C++?

What about hobby projects, internships, going to competitions and hackathons etc? Will any of that really help me in getting hired when I get my degree?

While my goal at the moment is to learn the basics well, I obviously want to get a good job after these four years too, so I want to streamline my approach.

Many thanks.


r/AskComputerScience • • Jun 25 '18

Do elite programmers still get the 'I have no idea what I'm doing, but I hope it will work" moments?

47 Upvotes

r/AskComputerScience • • Aug 22 '25

how does the computer know to ignore the # for comments...

46 Upvotes

hi so i am very uneducated in CS, major english person, this is a terrifying experience for me (taking a mandatory intro to CS class), and finally got myself to start the content for it this morning. watching the prof's videos, and am wondering how the computer knows to ignore the lines with # at the start. did someone code it to do that too.. what came first.. the computer or the code...


r/AskComputerScience • • Aug 06 '25

How much of a computer’s work is handled based on “simple” physics?

46 Upvotes

So I understand that computers are comprised of billions of tiny transistors and with logic gates can complete several million/billion of computations a second.

Each request or instruction given by the OS can have millions of additional steps, but I know it’s not actually sending nearly as many requests as computations are being done.

Once a command or instruction is issued, does the computer automatically or “naturally” do the rest of what it’s supposed to do purely based on what the initial input was and the architecture of the computer itself?

I’m losing myself a bit on trying to explain what I’m asking, but what I mean is if the initial conditions that produce the instruction naturally occur in X switches flipping, which then naturally cause Y switches to flip on and Z switches to turn off and so on and so forth. Like a domino or Rube Goldberg machine?


r/AskComputerScience • • Jun 23 '21

Why do people like java? It just feels so en cumbersome to use, or am i just doing it wrong?

46 Upvotes

Just started learning java coming from python.

What is the best IDE for java?


r/AskComputerScience • • May 23 '21

How vital is knowing command line to succeeding as a programmer?

46 Upvotes

I enjoy programming, but the unfortunate truth of the matter is that my memory is awful. This is especially problematic when command line comes into play. It takes me probably 5 minutes to figure out even the most basic commands, and it takes half as long to forget them again. I don't know why this is such an issue with the command line when I don't have any such issue learning programming languages, but I do. Is not knowing how to use the command line going to be a significant handicap when it comes to succeeding as a programmer? I've never really understood why some of my old professors would always use the command line to run programs when they have an IDE that could do the same thing with the press of a button. Is there some additional advantage that I'm not seeing?


r/AskComputerScience • • Nov 25 '20

How do people come up with novel algorithms?

46 Upvotes

Hi,

So I'm not sure I'm phrasing this right but here goes. I'm curious to know how people come up with new, sometimes heuristic algorithms that are fairly game-changing. From what I've seen, what they teach you in algorithms and data structures (both linear and not) is strictly on what makes an algorithm efficient, complexity etc etc but never really how you'd conceptualize a novel one.

It seems to me that most of these algorithms are mathematically rigorous. To use the same example from above, Page's PageRank used queuing theory, which is what gave Google the advantage over other competing search engines and browsers at the time. What I'm curious about, is it the case that you need a very solid foundation in mathematics as well as programming to develop something that hasn't been done before?


r/AskComputerScience • • Dec 22 '19

When an annoying software asks you to “please restart your computer to finish uninstalling” are they just bullshitting or is it a necessary step for them to reboot and permanently remove the software?

46 Upvotes

r/AskComputerScience • • Dec 11 '19

Awesome free online courses

46 Upvotes

Anyone have any amazing free online courses they'd like to share?

A few I know are:

  • AI - Andrew Ng

  • Computer Networks - David Wetherall

  • Intro to Computer Science - David Evans


r/AskComputerScience • • Sep 14 '19

Is AI really just a bunch of if else statements?

46 Upvotes

r/AskComputerScience • • Dec 30 '18

Why do alot of people hate OOP ?

46 Upvotes

In University and Business places you're taught to like oop and for the most part , I've actually really liked oop because of the mindset and how you approach problems . It makes things easy for me to imagine problems as black box components that do things and they connect to each other.

I see alot of people that really hate it . I've programmed in lots of languages , but haven't had pleasure to dabble with c. I started out with Java then to c# , Php , c++, JavaScript ( I regret it) , and python . With all of those languages I've always made OOP work for me and never had a problem , except when it gets a little verbose.

someone kindly explain why you hate it or why do you think people hate OOP.


r/AskComputerScience • • Sep 23 '15

How do databases work with things like Youtube comments and Facebook likes?

46 Upvotes

I just started reading about Brewer's Cap Theorem and it made me realized how much I didn't know about databases. There's so much new terms I need to look at like ACID and BASE. My question is about the "setup" of databases here. How do the databases work here? Is the database duplicated across all connected computers or is there a powerful constantly-monitored computer that holds the database and the server/nodes read from/write to that database?

My question for now is when I make a comment in a youtube video, how is it stored? Obviously a host/computer in the youtube network is going to receive it and insert it into a database. However, is this a database that's part of a "local" enormous database that's going to be copied to other regions of the world?

For example if I was in New York and I made a comment to video1, does it go to the eastern USA "local" youtube database that's going to be copied over to the midwest + west database in a few minutes and then to the other "large" database youtube nodes across the world?

I'm trying to understand what it means to be consistent in the Brewer's Cap Theorem. How are nodes making sure they have the most updated version? One large database or each computer have its own database?

Thanks!