r/AskComputerScience • • Sep 07 '25

"Accidentally" turing complete?

33 Upvotes

Hey everyone,

I remember seeing a Veritasium video on decidability and what not, and he mentioned a few "surprising" turing-complete systems, like Magic: the Gathering and airline ticketing systems.

For MtG, there was a (i think?) Kyle Hill video on how it works, but my question is about the airline ticketing systems:

If I understand and remember correctly, the reason MtG is TC is that you can set up the game state in a way that results in a potentially infinite loop that allows you to "write" instructions via the actions you can take in the game, and if you were to enter that set of actions/instructions into a turing machine it would be able to execute the program

But how exactly can I imagine this to work in the case of airline ticketing systems? Are the instructions for the turing machine a (potentially infinite) set of destinations you travel to in a row, and depending on some kind of factor the turing machine would execute a particular command for each possible destination, meaning you'd be able to "write code" via "booking specific flights"?

Or is my memory just too clouded and that's what confuses me?


r/AskComputerScience • • Sep 10 '21

Why are so many unrelated things called a heap?

33 Upvotes

As far as I can tell a binary (min/max) heap, an object heap (where objects live in languages like Java) and a database heap (where tables with no clustered index live)

Are all completely unrelated. Is there a connection here I’m missing?


r/AskComputerScience • • Jul 04 '21

How does a computer's software interact with transistors to use them as switches?

33 Upvotes

If I type an A on my computer screen, there's a row of transistors somewhere in my computer's system that represents the binary 01000001. What exactly is switching the state on these transistors?

Every time I Google about this, only explanations on how a transistor works come up.


r/AskComputerScience • • Jun 17 '21

Does time travel into the past imply the Halting Problem is decidable?

33 Upvotes

Rule: Assume that there are unbounded resources including time.

If the message will be sent by ourselves, we will receive the YES instantly. If we do not receive the answer, then the algorithm does not halt.

Basically, if there is no possible future where the algorithm halts, then we will not be able to send a message back in time. And the lack of a message means it will not halt.


r/AskComputerScience • • May 15 '21

Whenever I download a file over HTTP, do the bits come in the correct order? Or are they downloaded in any order and the file assembled on completion.

33 Upvotes

I am trying to understand the difference between downloading a file to disk vs. using a stream in a programming language like C#.

My understanding of a stream is that it opens a connection and begins transferring bytes of data in small chunks into memory.

Q1. When streaming a file like this, do the bytes come in the correct order? I.e. if the bytes were arranged from start to finish on disk, are they streamed in that order?

Q2. Then contrast that with downloading a file over HTTP. Does this basically work the same as streaming except it's streamed straight to disk rather than memory?

What's confusing me is how torrents work. Torrents generate a metadata file (the torrent) that divides the target file into chunks which are downloaded in any order. Once complete, the torrent program arranges them altogether.


r/AskComputerScience • • Feb 26 '21

I always forget the way a piece of code is structured. Is there a graphical way of representing how the functions interact and a software that does that for you?

33 Upvotes

The questions are:

  1. is there a software that can help with visualising how functions interact and what they return and so on? I am aware of UML diagramming software but looking for either something automatic or something more specialised.

  2. Is this a normal way of documenting your code? What I’m doing is something similar to mind mapping or creating a graph where each node is a function. If so what is it called?

  3. Please suggest programming languages specific ones as well. I am curious to see anything that is out there


r/AskComputerScience • • Nov 16 '20

If a person was to go back in time 10 years would their mobile phone still work?

33 Upvotes

Hi all, sorry if this is in the wrong group, this is a completely theoretical question me and my partner have been having. I wondered if a phone made in 2020 was taken back 10 years, would it still work? Obviously you’d have things to consider such as WiFi, cellular towers, iOS updates that wouldn’t have been made yet etc. But it all just goes beyond what I understand, and any help is very much appreciated :)


r/AskComputerScience • • Nov 04 '20

How do you talk the talk?

33 Upvotes

I'm largely self-taught programmer and struggle with the banter I often find myself in the middle of at work or With clients I consider myself a good conversationalist but feel as if I come across as unprofessional because I'm bad at remembering the technical terms. I'm worried that it's hindering my image in the workplace amongst my peers. I can implement what I am saying but struggle to describe it in a way that makes me feel empowered among my peers who have the whole buzzword and business talk down (even when they don't know what they're talking about). Any tips? I've been watching talks and convention presentations which is helping, but I feel like so much of it is buzzwords and fluff. Should I even worry about this?


r/AskComputerScience • • Nov 02 '20

Can anyone trace this c++ program?

Post image
33 Upvotes

r/AskComputerScience • • Sep 13 '20

In a discrete fourier transform, if N is number of x data points, why is it necessary that you also have N number of fourier coefficients? Shouldn't it be possible to approximate the original x[n] with a smaller number of coefficients? Why is it N-1 where I circled and not Infinity

Post image
33 Upvotes

r/AskComputerScience • • Aug 07 '20

Why do we have phone apps while we mostly use web browser for computers?

33 Upvotes

I just realized that mobile versions of websites are frequently uncomfortable to the point that we would rather have an app installed in our phones. I wonder if this is the reason and, it begs the question, would we be able to have a similarly comfortable experience in using a web browser in our phone?


r/AskComputerScience • • Feb 26 '20

Keep feeling as if I'm not smart enough for this major

33 Upvotes

I'm a math major but since middle school I've planned on going into the cs field. I've always just felt slow when it comes to programming and cs. Everyone else seems to just get it or if they don't get it they figure it out after a couple min. It takes me days or even the entire week to figure out the same thing. I'm in a cs class now in my 2nd semester of college and they hand out projects every week. Most other people figure it out within a couple days, even just hours and It takes me an entire week of constant stress and anxiety over the project to figure it out. I always finally figure it out at the last second before the deadline and I just feel stupid. I always feel like I'm not smart enough for cs or I don't have the brain for it. I feel like this mentality just makes me even worse at programming as I just constantly overthink things. Even the most simple problems cause me so much stress.

I really want to be a cs major. Despite dreading every assignment and the constant stress and anxiety I go through because of them, I do enjoy doing them and figuring them out. I just get so mad at myself for taking so long to figure out such seemingly simple problems that other people just work through so fast. Even my friend who was at the same level as me in our AP csa course in high school, can figure out what takes me the whole week to figure out in a few hours and had only taken one extra cs course than me last semester. Now we're in the same course.

I wish he'd help with all the projects but he refuses to tell me anything more than the most vague of hints. Ik he wants me to figure it out on my own so I'll become a better programmer but sometimes the projects are so confusing and hard that I just get so demoralized after working on them for any longer than an hour. I just feel like I can't do them like I'm too stupid to find the answer in a reasonable time.

I struggle a lot with low self esteem and anxiety and feel like that makes it way worse and makes me overthink things. I tell myself that I'm not stupid that I'm just making things harder by overthinking them but even so it still confuses me just as much and still makes me feel stupid.

I guess I'm just making this post to vent but I also would really like some help. All of this just makes me so depressed and makes me feel worthless. Ik this isn't the right sub to post mental health issues/problems but I feel like those are factors of my problems with programming.

If you read all this, thank you at least for hearing how I feel.

edit: Got a lot more help from this than I thought I would. I genuinely feel a lot more confident with cs now because of all your comments. I'm not dreading doing any project now and feel like I can do anything no matter how difficult if I just keep trying. Thanks a lot guys, appreciate it.


r/AskComputerScience • • Feb 09 '20

Let's say I only have $500 and I want to invest that money into buying tools and hardware/software that I can use at home for my home lab that will help me in my career experience. What are some Computer Science essential tools that I should buy? What's the best way to invest my $500?

33 Upvotes

r/AskComputerScience • • Jan 29 '20

I am about to graduate with a degree in CS majoring in AI/Data Science. I intend to work in these fields. Would it be a mistake to initially take a job in web dev and then work my way up to that field? Rather than solely focussing on where I want to end up.

33 Upvotes

I have a few smaller projects around machine learning and computer vision, and this is ultimately where I would love to end up. I'm not sure why, but I almost feel unconfident about finding a job in this field. Perhaps it is because the skills in these fields are more complex.

But I feel a lot more confident about web development, specifically React, React Native, Node, Angular etc. And I have a couple of personal projects and I am doing some part time work at a company using these skills. (But there is a low ceiling here, I can't proceed at this current job).

So my question is, would there be any disadvantages to taking a web dev position straight after graduating, and then on the side, focus on improving my portfolio/skills and trying to transition that way? I'm just worried that "jumping at the money" straight away could be a bad career move, and I should instead focus solely on getting a career in an industry I am passionate about?


r/AskComputerScience • • Nov 08 '19

Developer to Ethical Hacker?

33 Upvotes

Hey friends,

Random question: I’m a FE-developer. I mainly use JavaScript but I know Python as well. I’m very comfortable building UIs, validation, using REST APIs, etc. I’ve also done full stack, so I know Mongo and SQL. Have done Java in the past but not extensively.

I am kind of considering getting into pentesting/ ethical hacking. Always thought it was super interesting.

As a fairly seasoned developer, how difficult is the transition?


r/AskComputerScience • • Sep 24 '19

What is the point of pointers in C++?

33 Upvotes

Sorry if this belongs in a programming based sub- I couldn't find one that was Q&A specific that was super active.

Right now we're learning about pointers in my C++ class. I don't understand why. What's the "point" of using a pointer? Why don't we just continue to use variables/access variables(or arrays, structs, etc) directly?

I know this is probably a little basic, but my teacher has dodged the question (a little out of scope for the class apparently).


r/AskComputerScience • • Sep 11 '19

How can tables with millions of entries still perform well in a database?

33 Upvotes

Hey everyone! I hope this fits here.So, I've been getting into databases, and I constantly have to stop myself from doing strange things in order to avoid having to select from large tables all the time. But a friend, who knows infinitely more about CS and SQL than I do, told me not to worry, that large tables were not a problem. How does this work?

Thanks a lot in advance!


r/AskComputerScience • • Sep 08 '19

What is the best way to learn C?

33 Upvotes

Experienced C programmers: what is the best way to learn C? Are there any good books that you would suggest?

I would like to learn C programming and would like to teach it to myself before university starts. Do you have any recommendations?


r/AskComputerScience • • Jul 28 '19

Considering all the data per minute social medias (and internet in general) generates, aren't we gonna run out of physical space?

33 Upvotes

I have read that facebook generates like 4 petabytes per day (roughly 3 terabytes per minute). And this is only facebook, consider youtube, instagram, whatsapp, telegram... etc.

At this rate, aren't we gonna run out of physical space to store all of this stuff on planet earth? Are we already studying ways to tackle this or is there more space than I think?


r/AskComputerScience • • Jun 09 '19

Is there any website that allows you to map out your program before you start?

33 Upvotes

Hi all,

I'm currently coming up with a summer project to work on and keep my coding up to date. Typically I'll just write down what my program needs and what I need to implement on a sheet of paper, but this is the biggest project I've coded to date and I don't want to lose any of it.

Is there a website that exists where you can kind of ''Mock up'' your program before you actually start coding? ie. being able to add pages for how many files the program will need, adding methods that you think you might need to those pages, etc.?

Any suggestions are welcome! Thanks in advance!


r/AskComputerScience • • Feb 19 '19

Where is the industry going in 10+ years?

33 Upvotes

Im a college freshman, so what should i focus on that'll benefit me the most later?


r/AskComputerScience • • Jan 14 '18

Is Conway's Game of Life (and other rules for cellular automata) still an area of active research?

33 Upvotes

See title. I'm taking a modeling course right now, and I'm curious about the extent to which researchers still take interest in cellular automaton. Perhaps the field is relatively "solved," and CA is used more as a tool in other fields?

Secondary Question If CA is still an active area of research, what are the unsolved problems or frontiers of research?


r/AskComputerScience • • Dec 13 '16

Is this example interview from Google an accurate representation of format and difficulty?

Thumbnail
youtube.com
33 Upvotes

r/AskComputerScience • • Dec 05 '15

[tor] How did Facebook get a fifteen-character vanity .onion address?

33 Upvotes

Facebook has a .onion site where 15 of the 16 charaters are human-meaningful: facebookcorewwwi.onion

Looking at shallot, this should take somewhere on the order of 400 million years.

I know .onion addresses are based on SHA1, which is attackable. Does this suggest that there's an even cheaper attack now than there was when shallot, et al., was created?