/r/computerscience

Photograph via snooOG

The hot spot for CS on reddit.

Welcome to /r/ComputerScience!

We're glad you're here.

This subreddit is dedicated to discussion of Computer Science topics including algorithms, computation, theory of languages, theory of programming, some software engineering, AI, cryptography, information theory, and computer architecture.

Rules

  1. Content must be on-topic
  2. Be civil
  3. No career, major, or courses advice
  4. No advertising
  5. No joke submissions
  6. No laptop/desktop purchase advice
  7. No tech/programming support
  8. No homework, exams, projects etc.
  9. No asking for ideas

For more detailed descriptions of these rules, please visit the rules page

Related subreddits

Credits

  • Header image is found here.
  • Subreddit logo is under an open source license from lessonhacker.com, found here

NIGHT MODE NORMAL

/r/computerscience

413,788 Subscribers

0

Home office must haves

Sorry if this has been asked before, but I am new to computer science and will be working from home. I was wondering if there was anything that people recommended having in their home office. Whether its decor, cheatsheets, books, etc. Basically, if you have felt that your life as a data analyst has been made easier by a specific thing, I wanna hear about it.

3 Comments
2024/10/31
18:18 UTC

0

digital logic design

new student here, the topic seems to have simple principles but messy over-lapping concepts that are precise and need a lot of contemplation and comprehension if one wishes to get a hold of it entirely, any tips on how to master it?

6 Comments
2024/10/31
14:52 UTC

4

recently finished high school how should I go around learning Discrete Mathematics from little prior math knowledge

info in comments

7 Comments
2024/10/31
10:32 UTC

5

Opinions on Quantum Computing (or other alternate computing paradigms?)

Just wondering since I find the concepts very interesting, but I'm faced with many differing opinions. It's literally an r/AskReddit type question but CS lol

An example of another alternate computing paradigm is neuromimetic computing

14 Comments
2024/10/31
05:08 UTC

4

Operating System Question can someone guide

Hello Folks,
I am in Uni and learning CS. I finished learning and understanding Computer Architecture and Organization (CAO) and now heading to study Operating System.

In learning CAO, there was no usage of any HLL like C, Python etc. Before diving in OS, I have some queries:

  1. Do I need to use HLL while learning OS? Or I just need to focus on concepts and then implement them if needed in each language as per need?

  2. I keep on seeing things like fork(), exec(), - though I don't know what are these now, but are these OS concepts that will remain same always, independent of language (HLL) etc. used? Or is this something specific in one language and alongside I should focus to learn them specific to HLL I'm going to use?

  3. Do different HLL comes with different libraries to implement OS concepts? I mean a library and set of function to implement OS concepts- e.g. C, C++, Python

I hope you're getting gist of my concerns.

Thanks!

6 Comments
2024/10/30
20:02 UTC

9

Does anyone know of a cute book that explains hardware/processors which uses pictures and examples?

My job is willing to provide books for developers, and I want to pick up a good coffee table book which highlights some computing concepts that highlight logic gates, what a processor is actually doing, or other concepts that a CS individual might find intriguing. I'm not looking for something that will take my life to the next level or anything, just something light-hearted - it could even be targeted to children.

9 Comments
2024/10/30
16:54 UTC

0

Ticking our way towards reproducibility ?

Hello there,

I had an idea that I think could be interesting to discuss, and I’d love to get some feedback from the community.

Here’s the idea:

Imagine a compiler (would that be a compiler ? donna, but say a tool then) that identifies a time-constant function at the base level of a program. In this scenario, we’d have access to all source code, and the compiler could define this time constant as a "tick" (similar to the concept of ticks in Minecraft). The compiler would then use this tick to measure performance and profile the application.

This approach could make performance comparisons much easier and more meaningful, especially across different architectures. Instead of dealing with variable timing metrics that don’t always translate well between platforms, we’d have a consistent tick-based measure for more direct comparisons.

Some questions to throw out there:

  • What are your thoughts on using ticks as a standard for profiling across platforms?
  • Have you seen similar approaches in other tools or languages?
  • What potential challenges could arise with this idea, especially when dealing with complex applications?

Looking forward to hearing everyone’s thoughts on this!

20 Comments
2024/10/30
14:29 UTC

75

Does anyone else actually dislike coding?

I do it as part of my job and now I realise that coding really sucks. Just wondered if I was the only CS graduate who found that they actually dislike coding.

151 Comments
2024/10/30
13:36 UTC

1

Extracting sound location

I am looking for a way to seperate the sound coming from a specific location from other sounds. For example, and I know this is a very bold idea to think about, I want to extract the sound of let's say my friend playing in a orchestra. Basically, I'm looking for a way to map out where almost every sound came from a recording. I can't really find any papers that has done an analysis about this problem yet and quite frankly, this problem pique my interest recently and I really want to know how some of you might approach this problem. Any idea or lead is much appreciated.

5 Comments
2024/10/30
13:27 UTC

2

Random connected graph generation in C (and other graph algorithms)

0 Comments
2024/10/30
01:15 UTC

46

How relevant is Pure Mathematics in Computer Science research?

In academic and theoretical computer science research, areas like algorithmic complexity, is a background in pure and discrete mathematics valued and useful? Or is an applied, tool-based background generally preferred? If the answer depends, what factors does it depend on?

I would appreciate your insights.

63 Comments
2024/10/29
21:36 UTC

24

Best place to learn about algorithms and data structures

Hey everybody, I'm currently taking Algorithms and Data Structures in my second year, but so far didn't really have too much time to actually study. Now that I'm over my calc2 midterm I'm looking for the best places to learn about this subject.

Mostly looking for video explanations, maybe youtubers or courses about the topic but if you have a book recommendation or anything else, I would be grateful for that too!

Thank you for reading it!

17 Comments
2024/10/29
09:07 UTC

1

Is Instruction Pipeline mostly Synchronous?

Hi People I’m learning pipelining and after studying Synchronous, my coursework started teaching instruction pipelining. I have a query- is Instruction pipelining synchronous? Or it can be asynchronous

I’m mostly looking for overviews before I jump in studying to know what I’m learning

1 Comment
2024/10/29
01:57 UTC

0

Sorting Question

Hi Computer Science people.

Do you know if there are existing hardware/software implementations that leverage the ordinal positions of the true bits in a byte for sorting optimization?

Since values are represented in binary are already represented in order.

For Example:

https://preview.redd.it/08zx24fhfixd1.png?width=978&format=png&auto=webp&s=312b1660e2dfd2502cf7f4c1885f5f85e468357d

Something like this I'm thinking.

https://preview.redd.it/nkv2owzhdqxd1.png?width=1562&format=png&auto=webp&s=49567577b76ceb21601ee64243a587cbc88d04c9

Step 1, Read in Data

Step 2. Define the ordinal

Step 3. Establish which frame to build in

Step 4. Use ordinal values to build tree

Step 5. On ordinal value=Byte Size (Land Binary into bucket using previous (n-1) frame info and ordinal.

Step 6. Store current (n-1) frame info and ordinal

Step 7. Destroy tree frame.

Step 8. Repeat till data feed stops

13 Comments
2024/10/28
14:50 UTC

0

ML Question: Features to extract for classification

Hey guys, I already asked this question in r/MLQuestions but I figured I'd try fellow compsci colleagues here as well. Hope I'm not breaking rule number 9, but I think it's interesting enough to be asked here too.

I'm working on a classifier for detecting the topic or a category of a web page based on analysis of its source and possibly URL. Practically it means I have an anotated dataset containing the URL, scraped source code and the category of the web. Probably going with XGBoost, Random Forest and similar methods and comparing the results later to evaluate accuracy.

Which features do you think I could extract and would actually be good for classification of the website into a predefined category?

Some good recommendations I got was using bag of words or more complicated methods like TD-IDF or even BERT, but perhaps you guys here would have more ideas what could be good, I thought utilizing tags, styles or scripts on the site could be interesting, but I can't really figure out how exactly, perhaps someone here would have an idea.

Thanks a lot and have a nice start into the week.

3 Comments
2024/10/27
22:53 UTC

6

Is there a set of machine language instructions that is valid for all architectures?

And if so, what kinds of programs could it implement?

63 Comments
2024/10/27
21:41 UTC

0

Question on Neural Networks and Energy Use

In Neural Networks. A neuron typically holds a value between 0 and 1, especially in layers where activation functions like the sigmoid function are used. This range allows the neural network to model probabilities or degrees of confidence in binary classifications.

A value between 0 and 1 is a float. A percent/ratio/probability can be stored as an integer in a range of 0 to 100. Although both usually take 4 bytes, Integers are generally more space-efficient and faster to process, as they require less storage and computational overhead.

Do you think changing the representation of this could give any significant performance? I see companies like google using nuclear power plants to power their server for these transformers. What are your thoughts

11 Comments
2024/10/27
17:49 UTC

4

Computer Query: MISD vs SISD

MISD (Multiple Instruction streams Single Data stream)

SISD (Single Instruction stream Single Data stream)

I understand SISD: Fetch one instruction->decode->fetch data for it->execute

But when I read MISD, it says, fetch multiple instruction->decode them->fetch data (same data for all instructions)-> instead of executing all instructions in parallel, execute them sequentially one by one

So, isn't MISD something similar to SISD since at the end it executes sequentially, correct me if I am wrong

I am confused with these naming

4 Comments
2024/10/27
12:54 UTC

2

Where can I learn with some help how to apply divide and conquer and graphs to solve problems?

I have the bases of them, but as I never went to uni I never practiced this well enough.

2 Comments
2024/10/27
10:21 UTC

57

What is the best book on computer networking?

I never really understood it really well, so i want to start from scratch. Is there a really good book with very good examples that will teach me all of computer networks? I want to understand it top to bottom.

Thanks in advance!

19 Comments
2024/10/27
10:08 UTC

11

Is a filter linear in image processing

how would you understand (mathematically) a filter is linear or not. For example

h(x, y) = 5f(x, y)- 1f(x−1, y)+ 2f(x+ 1, y)+ 8f(x, y−1)- 2f(x, y+ 1)

is h linear in this case?

Actually what I know is that to call a function linear, we should show it's homogeneous and additive.

So I tried to show it's homogeneous with following: for some constants a and k, if h(ax,ay) = a^k h(x,y) , then it's homogeneous. But I stuck on h(ax, ay) = 5f(ax, ay)- 1f(ax−1, ay)+ 2f(ax+ 1, ay)+ 8f(ax, ay−1)- 2f(ax, ay+ 1) and I don't actually know how to remain.

1 Comment
2024/10/27
09:26 UTC

5

global and local functions

is main () a global or local function ?

5 Comments
2024/10/27
08:51 UTC

31

Resources for studying CS Core Topics

Suggest me resources for studying CS Core Topics and C++ in-depth!

Hi! So my interviews are up quite soon and I really want to revise the CS Core topics in and out. Kindly suggest me resources to study the topics (OS, DBMS, CN, OOPS majorly), as well as C++ in depth (I know C++ syntactically well enough to practise DSA and CP).

10 Comments
2024/10/26
17:04 UTC

0

It is really hard

I’m first year bachelor student in cs, it is really tough for me right now,I feel like I’m lost in discrete math. Does anyone know a way to get better in that course

36 Comments
2024/10/25
18:03 UTC

28

[algorithms and data structures 1] How to learn implementation of algorithms?

As it is now, I have no idea how to program, and I do not understand the java programming language enough to do anything on my own beyond trivial objects with print statements and if statements.

I had trouble coming to this conclusion prior because I had made an effort to try and learn to program prior through the typical 'intro to java' courses, and find tutorials such as 'learning godot engine' Even though it felt as though I was just copying code with no explanation.

I think I am relatively ok at looking at language exempt/language independent descriptions of algorithms and their exercises through videos and on paper, when I ask certain questions about the algorithm eventually the answer is that it will make sense once I actually code, which is when things go south.

21 Comments
2024/10/25
16:10 UTC

0

CSAPP: 3e vs 3ge

Hey guys

Searched a lot but couldn't find an answer to what's the difference between CSAPP 3rd edition and 3rd global edition.

Thanks in advance!

3 Comments
2024/10/25
15:26 UTC

8

Direction of Arrows in Documentation

Hello all,

Okay, this will sound like an incredibly dumb question. In my almost 2 decades (context) of software engineering, there is one thing I have long struggled with: which direction to make an arrow point in my notes, impromptu explanatory diagrams, and formal documentation.

There are cases where this is obvious: diagrams that show the flow of information, including classic flow charts (does anyone use these though?) or network diagrams where directionality has a clearly defined meaning.

However, if you say "A abstracts B" you might just as well say "B refines A". Same as "A depends on B" or "B is referenced by A".

Or even more abstractly, when you are relating concepts, each of those relations may be different within a single diagram! This more happens in personal notes and mind mapping.

I'm wondering if there's a general, perhaps obnoxiously/delightfully abstract, answer to this dilemma.

Thank you!
Bestieboots.

6 Comments
2024/10/25
14:48 UTC

8

Debate with roomate

If making an algorithm to beat humans at 4x games (like civ 6) was as big of a deal as making a chess engine to beat humans was in the 1900's, could it be done? The disagreement is: making an algorithm of that complexity could be done if it had the significance that the chess algo did in the 60-90's despite the difference in complexity vs it simply not being feasible? The reasoning as to why an algorithm like this hasn't been made yet is because the problem is not significant enough to receive the resources needed to be "solved," whereas a machine beating a grandmaster in the 90's was a big enough deal to receive said resources vs it being too complex of a problem to compute.

13 Comments
2024/10/25
04:29 UTC

Back To Top