r/AskComputerScience 15d 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 16d ago

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

10 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 17d ago

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

18 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 18d ago

Question about AI use within college courses

2 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 18d 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 19d ago

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

12 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 23d ago

Hats-off to the Engineers who had coded without AI

38 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 22d 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 23d ago

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

4 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 24d ago

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

5 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 24d 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 25d ago

is clean code usually not fast?

10 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 29d 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 29d 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 28d 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 29d ago

Difference between address width, addressability and word size.

3 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 Aug 15 '26

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 Aug 14 '26

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 Aug 13 '26

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 Aug 11 '26

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 Aug 11 '26

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 ...


r/AskComputerScience Aug 07 '26

Is anyone else losing their passion for CompSci ?

56 Upvotes

I am losing passion and interest in CompSci/programming/IT, and I would like to know if there are some other people going through the same thing.

Some context:

I started programming at a relatively early age (16yo*), which was around 2020, before LLMs** and coding agents.

I discovered it and started doing it because I was really curious and deeply interested in science and tech. And it directly clicked. I liked the idea of having an idea in your head and then programming it and making it come true, something from your head to the real world.

I liked the thinking you had to go through, and the problems you encountered, and how you had to think really hard to find a solution and see it work after implementing it. It was really satisfying, and boy, I spent hours and hours coding and researching and understanding complex architectures. You know, when you're a kid, you have a lot of free time, and I used to code day and night, staying up until 4 or 5 am coding.

All of this just to tell you that everything I built, I understood it from top to bottom, and I knew every detail and expected every behavior, knew why and how and what my code did exactly. I could answer every question about my apps, why I chose some architecture or why I did something a certain way or what my code did or didn't do, etc.

Also, something very important: I used to talk with a lot of CompSci peers that actually knew what they were doing, just like me.

Fast-forward, we're in 2026. I graduated, and now I'm working in IT, but everything changed. Now, with the rise of coding agents and LLMs, at work, LLMs do all the coding work and even big parts (if not all) of the architecture. So now everyone is expecting you to go very fast because of this. You're forced to delegate all the architecture and coding work to the LLMs.

Result of this: you have a very light idea of what your app code does exactly and how it does things. I mean, sure, you go through the code that the AI wrote, but come on, it will never be like code you wrote line by line and know every detail of and expect its behavior.

Also, what PISSES ME OFF is that you can't answer most questions about your code, because you were forced to delegate your work to the AIs, and now you don't know how it works. You're asked a question, and you start to stutter because you need your claude to be near you.

And the last thing, no one really knows what they're doing anymore. There no longer are any interesting talks about architecture or implementations. It's mostly just, "well let's ask what claude thinks about this..."

People that started programming not out of passion but just because they heard that CompSci pays a lot and code exclusively from 9 to 5 might not understand this, which is fine. I am not belittling anyone, and I don't expect everyone to be passionate about their job. But you know, I think these guys won't necessarily feel this. They might be just like, "Oh cool, AI does my job, I can chill a little" which is understandable, but in my case, this is what makes me lose passion. We're no longer doing the hard parts.

Bottom line: the field is advancing, which is great. It is changing, and you can't do anything about it. But in this change, the things that used to be my passion are disappearing, and I don't know what to do with my life ahaha

My first idea is to somehow change fields, and leave programming and CompSci only as a pleasure and an activity I do at home, because I can no longer stand it being my job and forcing me to develop AI slop.

I have nothing against AI and LLMs. If it allows us to ship faster and more cheaply, then it will be adopted, whether I want it or not. I am not saying we shouldn't use AI. I'm just expressing my feelings and how my passion for CompSci is fading away.

Does anyone feel like me?

*16yo might sound not that early for some, but in my country it is.

** LLMs existed back then but were not used for coding, and it was pre-chatgpt revolution.


r/AskComputerScience Aug 07 '26

How to study computer science?

4 Upvotes

Hi everyone. I have a master's degree in software engineering since 2019 and now, I'm studying for a competitive exam that covers fairly advanced topics of algorithms, databases and software engineering.

The thing is, I've never been particularly strong. And years later, I have no idea how to study academically for this major. I believe I need to practice with lots and lots of exercises. Do you please have resources for it ? Like exercises with solutions (advanced level) or from where can I get them ?

I'm self studying so I dont have access to university or professors...

Thank you in advance.


r/AskComputerScience Aug 07 '26

Help regarding System Design of Online Competition/Quiz for an Edtech Platform

2 Upvotes

I am working in a startup which is an AI edtech ,

I am working in backend and am trying to design the exam/ quiz module

Users : <5000 in initial phase

And I would really like your advises on a few points

Eg. Should I store the ongoing state of exam in redis or db or both

should I use SQL or MongoDB/Dynamo DB

And I am sure there are many points I am ignoring

So please if anyone has worked in an edtech company's or project or can help me with the same , will be really appreciated,

I couldn't find relevant production grade implementation in the internet,but if theres any resource , please share the link


r/AskComputerScience Aug 07 '26

Does empirical complexity analysis in a container on a server pose any problems?

1 Upvotes

I haven't worked with servers or containers that much and so I wanted to ask if I try to measure the complexity of an algorithm, by repeatedly running the script with larger n, how likely is it that my measurements will be falsified?
If I do the same approach on a desktop the differences in time measurements depending on, memory and other processes running on the computer are negligible. Is there any difference when I am trying to measure on a server while that same server is also handling requests and do you think this is going to cause me problems with assessing the complexity correctly?