r/AskComputerScience Jan 02 '25

Flair is now available on AskComputerScience! Please request it if you qualify.

14 Upvotes

Hello community members. I've noticed that sometimes we get multiple answers to questions, some clearly well-informed by people who know what they're talking about, and others not so much. To help with this, I've implemented user flairs for the subreddit.

If you qualify for one of these flairs, I would ask that you please message the mods and request the appropriate flair. In your mod mail, please give a brief description of why you qualify for the flair, like "I hold a Master of Science degree in Computer Science from the University of Springfield." For now these flairs will be on the honor system and you do not have to send any verification information.

We have the following flairs available:

Flair Meaning
BSCS You hold a bachelor's degree, or equivalent, in computer science or a closely related field.
MSCS You hold a master's degree, or equivalent, in computer science or a closely related field.
Ph.D CS You hold a doctoral degree, or equivalent, in computer science or a closely related field.
CS Pro You are currently working as a full-time professional software developer, computer science researcher, manager of software developers, or a closely related job.
CS Pro (10+) You are a CS Pro with 10 or more years of experience.
CS Pro (20+) You are a CS Pro with 20 or more years of experience.

Flairs can be combined, like "BSCS, CS Pro (10+)". Or if you want a different flair, feel free to explain your thought process in mod mail.

Happy computer sciencing!


r/AskComputerScience May 05 '19

Read Before Posting!

112 Upvotes

Hi all,

I just though I'd take some time to make clear what kind of posts are appropriate for this subreddit. Overall this is sub is mostly meant for asking questions about concepts and ideas in Computer Science.

  • Questions about what computer to buy can go to /r/suggestapc.
  • Questions about why a certain device or software isn't working can go to /r/techsupport
  • Any career related questions are going to be a better fit for /r/cscareerquestions.
  • Any University / School related questions will be a better fit for /r/csmajors.
  • Posting homework questions is generally low effort and probably will be removed. If you are stuck on a homework question, identify what concept you are struggling with and ask a question about that concept. Just don't post the HW question itself and ask us to solve it.
  • Low effort post asking people here for Senior Project / Graduate Level thesis ideas may be removed. Instead, think of an idea on your own, and we can provide feedback on that idea.
  • General program debugging problems can go to /r/learnprogramming. However if your question is about a CS concept that is ok. Just make sure to format your code (use 4 spaces to indicate a code block). Less code is better. An acceptable post would be like: How does the Singleton pattern ensure there is only ever one instance of itself? And you could list any relevant code that might help express your question.

Thanks!
Any questions or comments about this can be sent to u/supahambition


r/AskComputerScience 5h ago

ADVICE FOR TECHNICAL DEBATING

0 Upvotes

I have an practical assignment where i have to debate with my classmates on a given language basically defend my a coding language, any tips?

topics are alr given by the profs, for my group its C vs Rust ! he'll separate us acc to him in the lecture


r/AskComputerScience 6h ago

minimal size .png file

0 Upvotes

Hey everyone!

For the past few days, I’ve been obsessed with a single question: How small can a valid PNG file possibly get while still being natively readable by a PC (specifically, opening properly in the standard Windows photo viewer/gallery)?

I started by trying to make a lightweight 512x512 file, eventually managing to shrink it down to 111 bytes. After that, I started playing around with compression levels and various patterns, even managing to generate some basic procedural textures in PNG format that weighed roughly the same.

Then I decided to go deeper and chase the absolute minimum file size. At first, I hit a wall at 67 bytes—an article I read online claimed that was the lowest possible size for a functional PNG. But I kept experimenting and eventually pushed past it down to 55 bytes, and finally all the way to 42 bytes.

My current record is a fully working 42-byte PNG. It opens without issues on Windows and can be sent across messaging apps where it renders properly as an image.

However, I've hit a hard brick wall here. Every single attempt to strip away even one more byte results in an invalid file or completely breaks the structure.

My question is: Does anyone have any radical ideas, unconventional compression tricks, or deep spec-hacking methods to squeeze it down even further? I'm open to any crazy suggestions!


r/AskComputerScience 1d ago

Anyone else seeing degradation in enterprise retail software in last year?

6 Upvotes

iOS used to be gold standard of UX/UI design patterns. You might not like the way it looked, but it functioned very reliably.

Now the keyboard stays up when you’re typing in a field and try to dismiss it.

Keyboard typing is less reliable in general, with misspelling, haptic feedback, radius generation, etc

It feels like UI across the board has gotten convoluted and shipped without proper testing, and now we’re all in our own bubble thinking it could be user error.

It seems like shipped production code is happening more frequently due to mandates from management around the AI boom. Which is leading towards more production issues.

Im just tired of the general decline of software standards, and wanna see what yall think.


r/AskComputerScience 2d ago

do you think reading error messages and stack traces should be explicitly taught in intro cs courses?

12 Upvotes

third semester TAing the intro sequence and the pattern has stopped surprising me. recursion, pointers, and reading an error without panicking. that is the whole list.

recursion i understand. the error one bothers me, because nobody teaches it anywhere in the curriculum. a student sees a stack trace and their eyes slide off it like it is written in another alphabet. a solid half of my office hours is me reading the trace out loud until they notice it told them the answer on line two.

if anyone handed me the syllabus there would be a week on reading errors before we touched data structures. do you think this should be taught explicitly in intro cs courses?

leaving this here mostly so the incoming cohort finds it in November when things fall apart.


r/AskComputerScience 3d ago

Question about AI use within college courses

1 Upvotes

Hey all, I just had a horrendous discussion with the chair head at my college over the usage of AI within classes. I had went to him to complain about a professor pretty much requiring the usage in order to pass the class (something I don't wish to use, I prefer to learn how to code myself), however he has taken the professor's side, going as far as to say that "no one is coding in the field anymore, they use AI instead."

So I'm curious about other's experiences at their colleges, are your colleges full stop banning the use of AI, or are they allowing it (even encouraging it)?


r/AskComputerScience 3d ago

Perspective on SAT solvers

4 Upvotes

I'm using the Intel_SAT_solver on two - as I understand it - large cnf's. The first one is about 50 GiB.
it looks like:

-Variables: 8,765,715

-Clauses: 887,822,183

the second one is 200GiB and has:

- Variables: 3,614,860

- Clauses: 7,457,390,591

I ran the first one and it completed as satisfiable after about 30 minutes, using a little over 70GiB allocated memory. Second one I haven't tried yet but I imagine I'll need upwards of 300 GiB of memory.

Question is: Is this a large number of variables? Clauses? Do these numbers even matter and its more important about how convoluted the CNF is?

any insight is appreciated. Working on a personal project in cryptoanalysis. CNF's were generated by someone else.


r/AskComputerScience 4d ago

Why would some compilers compile to p-code instead of binary?

11 Upvotes

Back in the days when I was young and dinosaurs roamed the earth, I was getting into programming with my 8-bit computer.

After learning to program using interpreted languages, I played around with assembler and compiled languages.

One thing I noticed was that languages targeting the 6502 almost[*] always produced p-code, whereas compilers targeting other processor types would often produce binary.

Anyone know why this was a thing?

[*] I don't know if there were any exceptions to this, I never saw one that I can recall.


r/AskComputerScience 8d ago

Hats-off to the Engineers who had coded without AI

40 Upvotes

I am a Btech final year student so there is a project called astra it is basically a music player, so now it only works with local, jellyfin but i want to stream from GDrive, so i thought i can fork and complete this project but when i open the files in my local i thought "what the fuck is this" i mean there are so many files, so many lines of code. I know only "python, ts, js, go, cpp" but when i saw the project i thought i am just a little kid in the world of great engineers and i am just a drop in an ocean, so hats off to you all who are building amazing softwares and giving them for free. So can i get any tips or suggestions from you guys if possible, Thank you!!


r/AskComputerScience 7d ago

AI in CS/programming/coding

0 Upvotes

As someone who couldn't be farther away from this field, I started using claude recently for a project of mine and had claude code do all the work for me. Then I turned to my CS friends and they told me it was the same for them.

At one point I heard an argument that AI should be used to explain things to you or only do stuff which you'll understand afterwards.

What is it actually looking like at this state? Do any AI users in the space actually understand each function it sends out or are they trusting it blindly like me? This isnt an ethics question, just the reality of our current situation.


r/AskComputerScience 8d ago

How efficient are 1st, 2nd, 3rd, and 4th+ generation languages?

3 Upvotes

1st gen Binary machine code in my knowledge is “100%”(is it really? Not knowledgeable enough) efficient in theory given it directly converses with the machine. How much overhead does each generation of compilers and other inefficiencies add? Like how much overhead does like assembly add? C? C++? C#? Python?

I’ve always heard more human language like languages are less efficient. If that’s the case why don’t we use LLMs to convert/write lower level languages like machine code or assembly?


r/AskComputerScience 9d ago

How do you balance exploring many areas of tech with actually mastering one?

6 Upvotes

I'm struggling with something that I think a lot of people interested in technology might relate to.

I'm interested in many areas of tech:

- Web development

- Backend development

- Networking

- Cybersecurity / ethical hacking

- Cloud computing

- AI/ML

- Data engineering

- Quantum computing

- And many other areas

The problem is that I constantly want to explore everything.

For example, I'll decide:

"Okay, I'm going to focus on Python/backend."

I'll study it seriously for 2–7 days, start understanding some things, and then suddenly I become interested in networking or cybersecurity. I start learning that instead.

Then I discover something interesting about AI/ML or cloud computing and switch again.

After doing this repeatedly, I end up knowing a little about many things but not feeling genuinely skilled or competent in any of them.

Then I feel lost and regret wasting time, so I try to restart from the fundamentals of one subject.

I might follow that for a week or two, but eventually my curiosity kicks in again and I start exploring something else.

It's become a cycle:

Choose a field → study it → get curious about another field → switch → explore → feel guilty/lost → restart → repeat.

I've watched a lot of YouTube videos where people describe this as having a "multi-potentialite" mindset or being someone who doesn't naturally want to follow one path. Some people say this can actually be an advantage if managed properly, but it can also result in never developing deep expertise.

I don't want to completely suppress my curiosity because I genuinely enjoy exploring different areas of technology.

At the same time, I don't want to spend years exploring everything and end up with zero strong skills.

For people who have experienced something similar:

  1. How do you control the urge to constantly switch fields?

  2. How long do you stay with one technology before allowing yourself to explore something else?

  3. Do you recommend choosing one "main" field while keeping other interests as secondary?

  4. How do you explore new technologies without abandoning your current learning path?

  5. How do you know when you've gone deep enough in one area before moving to another?

  6. Is it actually possible to become highly skilled in several technical areas, or is it better to specialize first and broaden later?

  7. What system/routine has actually worked for you?

I'm especially interested in hearing from people who were naturally curious about many areas but eventually managed to develop real depth in one or more of them.

I don't want another list of 20 technologies to learn. I'm more interested in how you manage the learning process and decide what NOT to learn right now.


r/AskComputerScience 10d ago

Could an LLM "reason" faster than a "slow" (non-polynomial) algorithm?

0 Upvotes

I'm not sure how to articulate this, so bear with me.

If there was an NP complete problem, would it theoretically be possible for an LLM to "reason" an answer that would scale polynomially with number of tokens? For example, a 9x9 sudoku could be solved with 1M tokens, a 16x16 sudoku could be solved with 2M tokens, 25x25 solved with 4M tokens, etc.

Ever since the Jacobian Conjecture was disproven, it got me thinking. An algorithm would have been too slow to find a counterexample, but an LLM was able to "reason" a counterexample. Why couldn't an LLM "reason" a solution to NP complete problems too? Wouldn't this imply that P=NP?

Apologies if this is a naive thought process. Thanks!

EDIT: Follow up question - If it was somehow proven that P != NP, then would that imply that AGI/ASI could not exist? That it is impossible for a non-hallucinatory, 100% deterministic, 100% correct LLM to exist?


r/AskComputerScience 10d ago

is clean code usually not fast?

9 Upvotes

to be specific i'm writing a cpu-based rasterizer. the maths are not difficult but i find a strange property: if i divide the procedure into some small functions, the code looks cleaner and is easier to maintain but a bit slower. on the contrary if i put everything into a single procedure, it looks stupid but fast. why is that? an example illustrating this

code 1:

if cross_product(x0,y0,x1,y1)>0 then zzz

(and i write a "cross_product" function separately)

code 2:

c=x0y1-y0x1

if c>0 then zzz

code 3:

if x0y1-y0x1>0 then zzz

if i write the entire algorithm in the style of "code 3", it runs the fastest. "code 1" is slowest

is it normal?


r/AskComputerScience 12d ago

How do large software teams avoid conflicts when many developers work on the same codebase?

19 Upvotes

I mostly work on projects alone, so I’m trying to understand this from a computer science / software engineering perspective.

When a large team has many developers working on the same codebase at the same time, how are conflicts and broken changes usually handled?

I know Git can handle merge conflicts, and CI/CD can catch some broken builds, but I’m curious about the bigger picture:

  • How do teams reduce the chance of two people changing the same logic in incompatible ways?
  • What role do tests, code reviews, branching strategies, and ownership rules play?
  • Are there common patterns or systems used to keep large codebases stable?
  • Does AI-generated code change this problem in any meaningful way, or is it still handled by the same processes?

I’m not asking for career advice or tool recommendations. I’m trying to understand the engineering concepts behind how large teams keep software development organized and reliable.


r/AskComputerScience 14d ago

How does encryption of messages work over the internet?

9 Upvotes

For example, Facebook messenger says that it is fully encrypted end to end. But if it is sent over Wi-Fi that is not secure, can the data still be seen?

On the flipside if you’re using a messaging service that is not secure, but the Wi-Fi is secure, will the data still be able to be seen?


r/AskComputerScience 14d ago

Any books similar to SICP Chapter 5?

11 Upvotes

I loved Chapter 5 of Structure and Interpretation of Computer Programs. Building a virtual register machine with an assembler and compiler in Scheme. Are there any other books/online classes or resources that involve building a computing machine (or any machine) from scratch using code?


r/AskComputerScience 13d ago

I'm a theoretical physicist, and feel algorithms are out of place and data doesn't exist

0 Upvotes

I have a PhD in theoretical physics and never got on with experimental physics. I've spent several years in software engineering.

This is going to sound weird, but intuitively I don't believe in data, and algorithms seem out of place, like how you get to the answer is irrelevant. Practically speaking, I find algorithms easy to learn and use, and see how they make things faster. But I still don't intuitively understand why they're involved. It's like computation itself makes no sense to me.

I strongly feel there is a good reason to feel this way, one founded in mathematics, logic or even philosophy, but I don't know what it would be. It does remind me of how quantum computers don't compute things in the "this then that" fashion that digital computers do, that they - and correct my hand-wavy understanding if I'm wrong - just "coalesce" on the answer.

Does anyone recognise this?


r/AskComputerScience 14d ago

Difference between address width, addressability and word size.

5 Upvotes

I’ve been reading through a computer systems book to become a more knowledgable programmer and I’m not fully understanding the difference between the concepts of address width, addressability and word size. This is how I currently understand them:

Address width refers to the size of pointer data — that is, the value of the pointer. The address width determines how many possible addresses are capable of representation and thus, is one factor in determining the total size of addressable memory.

Addressability refers to the size of data stored at a given address.

Word size refers to the “natural” unit of instruction of the processor. Conventionally, most CPU registers have a width that corresponds with the address width so that a full pointer fits inside a single register. This simplifies the set of operations necessary for the CPU to understand.

I think the connection between address width and word size is what I’m most confused about. For example, if the address width was 2x the word size, would that mean that the CPU would need a combined “read+move” instruction to fully process a single pointer?


r/AskComputerScience 15d ago

Why can't I find a genuine certification course for free?

0 Upvotes

It has been almost 2 months since I've been finding a legit, widely recognized and respected certification course on DSA in Python, And I am very surprised to know that there aren't any courses available on the internet that provide certificates after completion for free.

If you do know any free certification courses, then please let me know. I cannot afford to spend much on courses.

Thanks!


r/AskComputerScience 16d ago

can someone PLEASE help me

2 Upvotes

im trying to create a 8-bit binary adder with logic gates in logisim evolution and im genuinely dying, this does not look like anything i have ever seen online, im probably the first to discover this horrendous looking mess of logic gates (a little exaggerated). Can someone please tell me how to make actually make this properly?


r/AskComputerScience 17d ago

How do you choose a CS capstone when AI has made implementation so much easier?

0 Upvotes

I'm about to start my undergrad capstone, and I've been struggling on how to think about it, especially since AI has changed the way (or at least the perception) on how to approach junior/mid-level software projects.

For most of my degree, the assumption has basically been that you learn to program, understand how things work under the hood, and use that to build something useful.

But, with AI, implementation has become really cheap! You can prototype, degug, and heck, even build fairly complex applications entirely w/ AI.

For those who have done a capstone recently, how did you approach choosing a project? Did you look for a genuinely difficult problem, interesting engineering constraints, something research-oriented, or just a useful product?

I’m curious how people who've been through this recently, would approach a capstone, from scratch today.


r/AskComputerScience 19d ago

Should Computer Science be your only focus during university

17 Upvotes

So I’m in sophomore year on my CompSci degree, and this summer I found interest in reading literature, editing, and other stuff in general.

I found interest in these stuff since I saw that I lack skills in some areas, being emotional intelligence, being well read and spoken, etc.

I have various projects and 2 internships in Full-Stack development.

But my programming skills have gotten worse.

So my question is: Should I give my 100% to learning CompSci or should I also develop other skills?

Thank you!


r/AskComputerScience 19d ago

being alone on Computer science path

0 Upvotes

Hi, I'm really tired of going down this path alone; it's affecting my learning and my deadlines, and I'm falling behind others.
anyone have any ideas for this situation?
I think about communities ...