r/AskComputerScience • • Dec 02 '21

Why isn't there a CS discipline that goes deeper into SQL, databases, and relational algebra?

29 Upvotes

Most CS programs I see focus on the same things: AI/ML, SWE, systems, networking, theory, etc. But isn't data management, relational algebra, theory of information, almost just as important as some of these other areas?


r/AskComputerScience • • Nov 25 '21

Why don't we use the computer resources for mining cryptocurrencies on useful tasks, instead of hashing

29 Upvotes

In cryptocurrencies such as Bitcoin a Block is created by "proof of work", meaning millions(perhaps more) of servers are wasting their resources on solving hashes. What if a Block was instead created by utilizing these resources to do tasks, such as Grid jobs in grid computing, or how we use cloud computing. One example is to use these resources to do protein folding for cancer research. Im not sure what metric would decide when a Block has been mined, but I just thought this might be an interesting concept, if at all even possible.


r/AskComputerScience • • Oct 01 '21

What do computer science students learn that electrical/computer engineering students don't?

29 Upvotes

I have worked for several years as an electrical engineer, dealing with circuits and hardware as well as performing a fair amount of software design (embedded system firmware, Python scripting, LabVIEW, etc). But I'm considering possibilities for finding more software-oriented jobs in the future, and I'm wondering what it is that CS students learned that I never touched.

My EE curriculum included a hefty dose of mathematics (calculus, linear algebra, statistical analysis and the like), plus a decent chunk of programming coursework. I learned how to program in C and C++, and between my study of digital hardware design, embedded system design, and computer architecture, I think I have a pretty comprehensive grasp of how computers work and what they can do.

My counterparts on the computer engineering side would have swapped out a couple of niche EE courses for some software-focused classes, but are otherwise not too much more exposed to software design than I am.

So what did CS students learn that I didn't? Does that consist of a deep study of algorithms? Particular fields of mathematics? Advanced software design practices and paradigms? If I want to be a competitive applicant for a software job (at, for the sake of argument, Microsoft or Google), what topics might I want to specifically target for self-study?


r/AskComputerScience • • Sep 19 '21

What caused the huge improvement in game/computer graphics in just 20 years?

29 Upvotes

If you look at games we played in the beginning of the century on consoles or PCs, and look at new games, the difference is stunning. What actual piece of technology is the main responsible of this? I am interested in particular on the "graphic" aspect, like what do modern graphic cards have that old ones didn't? Is it just "more memory"?


r/AskComputerScience • • Jul 12 '21

What is actual the difference between programming languages?

29 Upvotes

Maybe it's a very noob question, but in 5y i've never had a good answer. I only really developed for C# and 6502 assembly, those languages I clearly understand the difference, but to me all high level languages appear the same just with different syntax when you strip them of the frameworks and stuff (and I imagine probably isn't the case), but I see some people with very strong opinions about some languages, and doesn't make sense to me, people say "you can do anything with Python", "c++ is messy" and I really don't understand what they are refering to, anything in the same layer of abstraction looks the same to me


r/AskComputerScience • • Apr 12 '21

How is CPU scheduling non-deterministic?

29 Upvotes

So my understanding of non-deterministic is that you can't really predict the output of a system given an input. But I was wondering how is the CPU's scheduling algorithmic non-deterministic? I feel like it should be able to be predicted given that it simply follows a logical pattern. Or is my understanding of non-determinism wrong?


r/AskComputerScience • • Mar 14 '21

Is this problem intractable?

29 Upvotes

So some background, there's a game called Loop Hero. We don't need to get too into the details of it, but there's an optimization problem in the game that basically works as follows:

  • Given an m x n region, place "thickets" and "rivers" to generate the highest possible score.

  • A thicket which has no rivers above, below, left, or right of it, is worth 2 points.

  • A thicket with 1 adjacency is worth 4 points.

  • A thicket with 2 adjacency is worth 8 points.

  • A thicket with 3 adjacency is worth 12 points.

  • A thicket with full (4) adjacency is worth 16 points.

  • A river must begin on the border of a region and it cannot branch, in other words, you can't ever backtrack on a river.

This app (which doesn't enforce the river placement rules) will give you a very intuitive feel for the problem: https://loopherolayout.xyz/#

I wrote an algorithm to attempt to solve this problem via brute force, but I believe the time-complexity of my solution is O(n!) and so solving the problem for even a 5x12 region seems intractable (I've been searching on 8 threads for 6+ hours and no threads have finished a full search from their starting point). The code can be found here: https://github.com/Lutzy/LoopHeroThicketSolver/blob/master/src/com/lutzy/loophero/solver/Solver.java

The best my algorithm has found so far yielded 224 points: https://loopherolayout.xyz/?c=111221211211211211212211211212212112112122121211212121121112 but then someone was able to modify that solution by hand to come up with a 234 point solution, but we've still no idea if that's optimal: https://loopherolayout.xyz/?c=111221211211211211211211211211211212212121121112111211211122

(Notice what a valid river looks like, you can't simply create a checkerboard, it must begin on one edge of the region and be contiguous with no backtracking.)

Does anyone have any ideas on if there are possible improvements to this algorithm? I attempted to memoize it by storing the score of the board in a ConcurrentHashMap, but very quickly had a 30 GB+ Map and even for much smaller areas where the non-memoized implementation sped through them, the memoized version struggled.

The only optimization I could think of was that in the case of the 5x14 problem, we only need to exhaustively search 8 unique starting positions, as everything else should be a mirror of these 8 marked positions: https://loopherolayout.xyz?c=111001000010000100001000010000000000000000000000000000000000

I've sort of got a feeling there is no good known algorithm for something like this, but I found the problem interesting enough from a computer science perspective that I wanted to get other peoples' thoughts. Thanks!


r/AskComputerScience • • Feb 04 '21

How do the best programmers learn their craft?

29 Upvotes

r/AskComputerScience • • Dec 27 '20

Are cars built with computer controls?

29 Upvotes

I got into an argument with my dad about whether or not you could hack into a cars breaks. Do cars really have computers that operate the controls based on user input? Also if so, would it be possible to hack said controls?


r/AskComputerScience • • Nov 26 '20

Algorithms practice

29 Upvotes

Hi there, so I’m trying to figure out if solving coding problems on hackerank or algoexpert will improve solving speed in the actual job exams. In your experience(if you practiced for coding interviews) was it worth it ? What did it improve?


r/AskComputerScience • • Nov 11 '20

What role does automata theory play in computer science?

29 Upvotes

How does it relate to computer science in a general and day to day sense? I don’t understand what it does.

Thank you.


r/AskComputerScience • • Oct 31 '20

Do online multiplayer games use both TCP and UDP?

29 Upvotes

TL;DR

  • Shooting game example

  • Bullet hit data over TCP ( has to be right )

  • Player locations data over UDP (has to be latest)

To take a shooting game for an example you can't lose data like who shot whom. Therefore my guess is data related to shooting and hitting other players are transmitted over TCP.

But when it comes to where each player is, it doesn't matter where the player was some few seconds ago. What's important is a player's latest location even if it meant that the player looks like suddenly teleported a few meters. So my guess is players' location details are transmitted over UDP.

Is my guess correct? Or is this game specific? Someone experienced in game development please explain these

Thanks


r/AskComputerScience • • Sep 04 '20

What are the core principles a computer science graduate should keep reminding himself while working as software developer to produce good quality code?

29 Upvotes

r/AskComputerScience • • Aug 27 '20

Came across this XKCD. Can somebody explain how the first is easier for a machine? Why does the second one have that entropy? Is it just the length?

Thumbnail
xkcd.com
29 Upvotes

r/AskComputerScience • • Aug 17 '20

Is brute force really the most efficient way to crack SHA256?

29 Upvotes

r/AskComputerScience • • Mar 26 '20

Do you study one topic/tech at a time or do you switch it when bored?

29 Upvotes

I'm on the situation now of having to learn multiple technologies at the same time (Node.js+Express, Angular, MySQL for the internship and college-related stuff). So I was wondering what is the most productive approach to get the most of my time:

  • Study one topic/technology exhaustively even when bored, or

  • Switch immediately the topic when the boredom arrives

What do you guys personally do?


r/AskComputerScience • • Feb 23 '20

What to read to start making robots?

29 Upvotes

Hi reddit, Phrased overly simplistically, I am looking to make a robotics start-up and want to build a few prototypes by myself before going to crowdfunding. I work as a game developer so hope this gives you my starting point in software engineering. Recommend me which books to read to get into software engineering, maybe physics or electronics, low level programming, no idea what I need.


r/AskComputerScience • • Nov 28 '19

Please help! idk where to begin

Post image
29 Upvotes

r/AskComputerScience • • Sep 01 '19

Why do people still prefer Java?

29 Upvotes

So, I had to learn Java for School a few years ago. Back then I thought "okay, I can see why people use Java", as I only used C and C++ before that. But now I had to learn C# for my job and for a little side-/learning-project I tried to use Java in my free time. Tried, because freaking hell did I feel limited using java. I noticed C# can do EVERYTHING that java does....often better, too. And for some stuff, there are dedicated languages or other languages that can do all that better than Java and better than C#.

Some people even go as far as saying "Java is far better than C#", but I myself can't find an objective reason for that. I can't find anything C# is worse at other than maybe XPlatform GUI programming, which isn't a big deal in Java anyway and became very rare, but I found a lot in C# that made my life as a programmer a lot simpler and just worked better or faster with C#.

So...is this all just this kindergarden "I prefer this language because I prefer this language! and that's why your language sucks!" nonesense or do I miss something very important? Why do people prefer Java almost everywhere instead of a dedicated language that is focused on helping with their problem or even just C#, as even if it is "just as good" for the job, the chances are high that the program turns out faster


r/AskComputerScience • • Aug 31 '19

I feel like most of the people around me are better or smarter than me

29 Upvotes

I‘m at the end of the second semester of my computer science Bachelor‘s degree and after almost one year, I more and more have the feeling that I‘m surrounded by people that are smarter, or at least better at logic/ maths, than me. My grades are pretty weak, average at best, and I feel like most of the people who I talk to or study with are faster at understanding and applying new concepts. It bums me out, and most of the time I feel like I‘m just struggling to keep my head above water, not actually having the possibility to have fun learning.

Have some of you been in a similar situation and have advice on what to do, how to improve or how to keep up with people smarter than you?


r/AskComputerScience • • May 05 '19

What should I do in summer break?

29 Upvotes

I have finished my first year in college. We did some basic C, but I know C and C++ and have a basic Idea about Data Structures. I would like to do something related to Computer Science in the summers.Should I start with things like Machine Learning or Web Development or should I further strengthen concepts such as OOP or Data structures?. Any suggestions should be welcome.

Thanks.


r/AskComputerScience • • Apr 24 '19

Would You Like Help Learning Programming?

29 Upvotes

Hey! Are you, like me a year ago, looking for that one person whom you could rely on and ask for an advice in programming?

We are here for you- for someone who simply wants to write cool software! We want to support you when you are stuck, pull you from the ground when you fall and let you find others like yourself 🙂

Our goal is to form a sanctuary where programmers simply discuss what they love- programming! No judgement, no looking down in less experienced people- we dispise that! We want a big family-like community, where we help each other out! 😊

We're a discord based community, mainly focused on C# (there are other languages too, but our forte is C#) . We're almost one year old (still a baby 👶) but we're growing fast. Right now we have over 2.2k members. We offer help through help chats (if you want for public help) and mentors (if you prefer to keep it private). There are also weekly lessons on various topics (right now on going series for Clean Code). Also, we do code reviews, both live on voice via Twitch and in chat.

We want to help you grow as a programmer! If you would like to become a part of our family, here is an invitation link!

https://discord.gg/Bfme3PD

If you have any questions, please let me know in the comments! Thank you for reading this and I hope to see some of you in C# Inn 🙂


r/AskComputerScience • • Mar 04 '19

How old were when you started programming?

29 Upvotes

r/AskComputerScience • • Jun 07 '18

Why does a 3rd party search find files exponentially faster than Windows 10 built in search?

29 Upvotes

When searching across multiple drives Windows 10 took multiple minutes to do what a program like Everything does nearly instantly. What is the underlying difference in methodology and why would Windows not adopt such a methodology to power their internal search feature?