r/AskComputerScience • • Jul 21 '19

What percent of 10kb files are valid JPEGs?

31 Upvotes

Sorry if this is the wrong sub, since it's a math-heavy question, but I couldn't find a sub that I thought was better suited.

My question is this: if I had every possible 10kb file, whose binary encodings range from all-0s to all-1s, what percent of them could be opened by a JPEG algorithm, and would not be rejected as a "corrupted" file?

I know a bit about the process of JPEG encoding process, but couldn't figure a way to even ballpark the number.

Edit: I figure the answer will be a very small percentage. Let's say that, for sake of argument, we concatenate onto the start and end of every file the appropriate header and footer signatures, but don't count them in the length of the file.


r/AskComputerScience • • Feb 18 '19

Why does O(n) is equivalent to O(100000000000n) this is counterintuitive for me.

31 Upvotes

r/AskComputerScience • • Jan 08 '19

What specific concepts in CompSci will most people believe aren't true?

31 Upvotes

Hi, I am starting to write a non-fiction book, whereby I attempt to provide convincing rebuttal to 100 science and engineering concepts which almost everybody will initially not believe. That is, I want to get the reader to change their mind 100 times in one book. Some of this will be via reviewing the most popular misconceptions. And some of it will be new knowledge that people will initially think "that can't be true".

Can you think of any theories, concepts, laws which people wont believe upon hearing, or are already 'ubiquitous misconceptions'? Here's the physics thread. Again, not just looking for interesting facts; looking for true things in Computer Science that most regular people will first believe aren't true.

Here are a few ideas for example related to engineering:

To catch up with a space station in orbit, a satellite firing rockets prograde will move further away. It will initially have to fire its engines retrograde to drop to a lower orbit.

It takes more specific energy to get to the sun than to the far planets. You do not 'fall in' at all like one would expect.

Supersonic diverging nozzles make flow go faster.

Subsonic pipe restrictions make velocity go up but pressure go down.

If you had a house with freezing outside air temperature, and access to a big hot rock, in principle you would be better off using the rock to run a heat pump to move heat from the outside cold air to the warm inside of the house.

An open fridge will make a room hotter.

A helicopter pitching forward will have to increase its relative lift to the side, not at the back of the rotor. The FAA says it's at 90 degrees as one would expect from dynamics (but there is some debate about whether it is less than 90).

If you could shrink to the scale of a bacterium and physically be fine, you wouldn't be able to swim in water. It'll be like super thick honey.

An ant scaled to a human would be not be able to carry any weight (let alone 50 times). It would collapse and die, as stresses are carried through an area, and volume grows faster than area.

You can accurately measure altitude with a couple of clocks (due to General Relativity).


r/AskComputerScience • • Aug 13 '18

What's the point of MAC addresses when devices have a private IP address

31 Upvotes

You can also change both your IP and MAC address, right? It seems like 2 things that have the same purpose.


r/AskComputerScience • • May 23 '18

How are services that consolidate all of your passwords not a HUGE security red flag?

31 Upvotes

I understand the basic value proposition of convenience but don't understand the implementation. It seems like these companies are basically inviting blackhat hackers who are after specific individual identities.


r/AskComputerScience • • Feb 01 '18

What are some ethical issues/dilemmas in computer science?

31 Upvotes

I’m trying real hard to find a topic for a paper I have to write for an International Baccalaureate (IB) class. The topic has to be about an ethical issue or dilemma that is occurring in computer science.

Two topics I’ve found so far are ‘How much protection is enough for web users’ and ‘Are victimless crime better received than crime with human victims’ (for example is hacking someone as bad as physical assaulting them).

Thank you to anyone who helps!


r/AskComputerScience • • Sep 16 '17

I'm not sure this question actually has a correct answer (Microsoft Intro to Java MOOC from EdX) - fencepost error

Post image
31 Upvotes

r/AskComputerScience • • Jan 06 '17

Programmers of Reddit. Have you ever used an algorithm you've learned to efficiently do something by hand? E.g. Sorting groceries or shoveling snow?

31 Upvotes

r/AskComputerScience • • Nov 24 '16

Is C# really that much better than Java?

31 Upvotes

Hi reddit,

I am a CS student and one of my fellow students always keeps saying how much better C# is than Java and what a bad language Java is overall.

Is he right? Are there any objective arguments/proofs that show that C# is superior to Java? What is your opinion?


r/AskComputerScience • • Jan 11 '16

Why is it that you can stream >1080p HD quality video with surround sound, but video calls like Hangouts looks like you are communicating via potatoes?

31 Upvotes

I get that it is using UDP and that packets are not guaranteed. I also get that you are uploading as well as downloading and are at the mercy of the upload speed of both sides. But those reasons do not sit well with me given that when I try to call my dad who a) is in the same city and ISP and b) we both have sufficient upload speed (enough to stream HD videos from home, ie via plex).


r/AskComputerScience • • Jul 30 '26

Predictions about computer science

30 Upvotes

Look ahead 20 years.

Outside of AI/ML:

* what of today’s research computer science do you expect will be industry standard?

* what frontiers do you expect we will have opened up in research?


r/AskComputerScience • • Oct 14 '25

Is there a term for "almost pure" functions?

30 Upvotes

For example, a function that reads an external file is not pure, but if the file contents is constant, we can pretend it's pure. Or, a function that modifies an external lookup table has a side effect and is not pure, but if the lookup table is only used to cache the results of that function, then it behaves as if it's pure.


r/AskComputerScience • • Nov 21 '22

What really happens when you set a game or program to be "fullscreen"? Why is there a noticeable performance difference, and why does this difference vary across systems and programs?

30 Upvotes

r/AskComputerScience • • Apr 24 '22

Suggestions: How to learn Computer Science if you don't have a degree?

30 Upvotes

What is the best way to learn Computer Science if you haven't gotten any formal CS education? I've been working in software development for a few years (self-taught) and want to broaden my knowledge and get a better understanding of computers and learn some low-level programming languages.

Any suggestions on where to start (books, courses, approaches, etc...)?

EDIT: Awesome, thanks for the replies everyone. Will probably spend the next few months on this starting from all your suggestions. Much appreciated! Just some context, I don't really have any expectations beyond learning and exploring at this stage. Just want to learn for my own interest's sake without financial or time pressure, or for a career move. Should this lead me to want a career change later on I'll definitely refer again to some of these comments.


r/AskComputerScience • • Oct 27 '21

What made computer scientists and engineers land on the byte per memory address?

30 Upvotes

It's extremely convenient and reliable for computer memory to be broken down into bytes in such a consistent way, but I have always wondered why the byte became such a standard in the first place. Was it just the best balance for a byte being complex enough to be split apart and not too big to handle primitive types like booleans without sacrificing too much memory? I know that a number eventually needed to be landed on for each memory cell, but I'm wondering if there was some kind of debate or something that went down where this was decided.


r/AskComputerScience • • Aug 01 '21

Should I take the time to learn hexadecimal and binary, and if so are there any good websites that have good interactive practice problems to drill it in?

30 Upvotes

I'm doing the free Harvard CS50 class on Edx. I'm on the lesson about memory management using C and we are being introduced to hexadecimal. Honestly, it's hard for me to wrap my head around it and quickly know what colors are represented by hex or how far away something is in memory just by looking at the address. I've seen some videos where engineers can quickly do mental math for hexadecimal or binary and I'm wondering if this is something I should prioritize learning? If so, does anyone know of any good websites that have interactive learning/practice with it? I learn best by doing but I can force drilling if that's the only way to learn it.


r/AskComputerScience • • Apr 09 '21

Hey guys! Hope this is right place! I am drawing logic gates.. Is this correct for (AB + C)D?

Post image
30 Upvotes

r/AskComputerScience • • Feb 22 '21

Any other weird typing habits picked up from programming?

30 Upvotes

Fair warning, this is a general curiosity question, rather than anything that could be considered practical. Pretty much as soon as I started my first computer science courses, I seem to have lost my ability to type "in the" instead of "int he". Additionally, sometimes I just capitalize important words in the middle of a sentence, but I'm not sure if that habit came from programming specifically, or just happened to pop up around the same time.

I'm curious if anyone has any other weird typing habits that they picked up from programming?


r/AskComputerScience • • Dec 04 '20

What do you find inadequate about interacting remotely at work?

30 Upvotes

I wrote this blog post a while back detailing some of things that are bad or inadequate about working remotely, but I know my list is far from exhaustive so I'm curious what problems you've had with the current state of remote work technology too. bonus for the most serious one in your opinion.

https://rip-van-webble.blogspot.com/2020/05/the-water-cooler-problem.html


r/AskComputerScience • • Nov 09 '20

Could a Song be described as a single Wave function ?

30 Upvotes

Ok so i study CS myself but i am still at the beginning. Thus i recently took a look into Audio and FLAC. I got a Software that showed me the Wavefunction of the currently playing song and couldnt help but ask, can you create a single Function that discribes the entire song ?

From what i understand, the oscilloscope dosnt show any Function at all. It just shows you the current power levels which just look like sin Waves. And behaive like them.

My guess is that you could do that, so having a single sin Function that is just the song, but it would be way to complex to actually use.


r/AskComputerScience • • Jul 05 '20

How do you improve touchtyping when it comes to programming?

30 Upvotes

Hey guys, I recently came across William Lin on YouTube doing competitive programming. I got really obsessed about how fast he can touchtype when it comes to programming. Here is a pretty good example. Does anyone know what kind of keyboard layout does he use? I learned touchtyping at a website called keybr.com which I would strongly recommend for anyone new. I am used to standard qwerty layout, but not able to get the hang of all the different types of brackets. How could I improve? Would I have to switch to a different layout? Or does it come naturally after spending hundreds of hours programming with proper finger placement? Thank you for reading.


r/AskComputerScience • • May 11 '20

I finished my BSc in Computer Science (Software Engineering) and I really don't want to ever touch coding ever again, what are my job prospects?

30 Upvotes

I came to this decision after realising I really can't stand coding it's interesting but I'm dyslexic and english is my 4th language and I find it difficult code efficiently. I can't stand being at a computer all day coding I prefer to be talking to clients and being active within a business.

Any suggestions as to what I could go into? It should relate to IT. I did look at project managing or UX design.

I've actively not looked for coding jobs as I know if I was ever put in that position I would be a detriment, even on my resume apart from my degree I've been hesitant to put it down as a key skill. I know I want to go into IT or Tech though.

EDIT: Thank you all for the suggestions they helped greatly.


r/AskComputerScience • • Apr 24 '20

A student here. Can you help me to solve this as I'm very confused. Spoiler

Post image
30 Upvotes

r/AskComputerScience • • Apr 19 '20

What is the difference between a text file and a binary file? I would assume both will be read the computer eventually as 1's and 0's. How the computer handle them differently?

30 Upvotes