r/computerscience

I know how to build simple CRUD APP in c#.  Would "Introduct of the theory of computation" help people like me to become better coder?

I know how to build simple CRUD APP in c#. Would "Introduct of the theory of computation" help people like me to become better coder?

As the title says

u/Wasabi-spicy00 — 2 days ago
▲ 109 r/computerscience+1 crossposts

Does software / coding still makes you happy?

I’ve had interviews with Google and Amazon (two companies I used to dream of working for). They still use the traditional process of LeetCode, algorithms, and so on, without any AI assistance. Back in the golden age (before AI), I used to practice and solve a lot of questions. It was fun because you knew you needed that knowledge to build things successfully in your own projects. Nowadays, all the code in companies is generated by Claude Code, and software engineers just review the output to make sure it's correct, and that's it. 

To be honest, during those interviews, I didn’t care about practicing. I didn’t want to waste my time when I knew I wasn't going to solve a LeetCode Hard anyway, since I'm not that good at those types of questions. I guess I didn't care about getting into Google or Amazon anymore because I knew how high their bar is, and I just didn't have the energy to grind algorithms while having a stable job. 

I don't know, this AI era has made me want to do something else. The job has become boring; I just use prompts now, because there’s no reason to do something by hand when AI does it better and faster than you. I feel like I've lost that passion for coding. Has anyone else gone through this? What roles can you transition into that aren’t about coding and are more fun? 

reddit.com
u/Legal-Bat6543 — 2 days ago
▲ 32 r/computerscience+9 crossposts

Beginner-friendly Python walkthrough: solving a binary quadratic problem with gurobipy

I created a practical Python walkthrough for programmers interested in mathematical optimization with gurobipy.

The example formulates Max-Cut as a quadratic binary optimization problem and covers:

- creating a Gurobi model;

- adding binary decision variables;

- constructing a quadratic objective from a matrix;

- calling optimize();

- extracting the binary solution and objective value;

- benchmarking randomly generated problem instances;

- and understanding how MIPGap affects runtime.

It assumes familiarity with Python, and Jupyter notebooks, but no previous optimization experience.

Video: https://youtu.be/TB1ny8o4ImQ

Code: https://github.com/supreethmv/Quantum-Algorithms-and-Applications

I’d particularly appreciate feedback on whether the gurobipy implementation and explanation are approachable for Python developers encountering quadratic optimization for the first time.

u/Future_Ad7567 — 3 days ago

Libros de Teoria de la Computación

Buenas! soy estudiante de matemática, quería preguntar si alguien conoce buenos libros de teoría de computación, pero más orientado a fundamentos de las matemáticas que a aplicaciones como tal. Maquinas de Turing, autómatas, todo eso.

Gracias!

reddit.com
u/r-Aliosha — 3 days ago

Struggling with Formal language automata theory

My teacher isn't the best for this course and no one in my class is able to understand anything

What resources are available because youtube isn't really helping me

I’m currently on a Theory of Computation with questions on DFAs, NFAs, regular expressions, language operations, and Kleene star. I’m mainly struggling with tracing the automata and understanding how to derive the answers rather than just selecting the options. Could someone help explain the approach to solving these questions and where can I learn better about them

reddit.com
u/Redleafdabs — 5 days ago
▲ 101 r/computerscience+1 crossposts

Stable sorting algorithm that outperforms OrderBy() in nearly all scenarios and Array.Sort() in scenarios with sorted data

Hello, I've created a sorting algorithm in C# that is:

  • Stable
  • O(n log n) average and worst case
  • More performant than OrderBy() is almost all cases (sometimes quite substantially)
  • More performant that Array.Sort() in most cases where the data is at least somewhat sorted, and typically within about 20% when sorting mid to large-sized random data sets
  • A merge sort variant that uses a buffered reverse merge for the merging process and insertion sort to process small sub-arrays
  • Uses a (as far as I can tell) novel approach to detecting and optimizing for data that is already sorted

I created this just as a personal challenge, so if even one person finds it useful, I'll consider that a success! :)

It's published it on both Github and NuGet, and I've posted full details on the algorithm with tons of benchmarks on my blog. I welcome any feedback or suggestions.

Here are a few benchmark highlights:

1,000,000 Sequential Integers:
YamSort   |   .66 ms
ArraySort |  4.79 ms
OrderBy   | 11.62 ms

1,000,000 Random Integers:
YamSort   | 58.08 ms
ArraySort | 47.24 ms
OrderBy   | 75.97 ms

1,000,000 Near-Sequential Integers:
YamSort   | 13.73 ms
ArraySort | 20.62 ms
OrderBy   | 40.03 ms

Real-World Windows Log File With 109,546 Lines:
YamSort   | 38.63 ms
ArraySort | 66.98 ms
OrderBy   | 59.79 ms

No AI was used in typing any of this post or in typing any of my blog post. AI assistance was used for some parts of the algorithm, as noted in the Acknowledgements portion of my blog post.

Edit: Fixed markdown formatting

u/ggende — 6 days ago

The creation of TRACEROUTE

The creation of TRACEROUTE

After hopscotching my way down the rabbit hole on ping last week, I started looking at another command I’ve used approximately a gagillion-bajillion times without ever wondering where it came from:

traceroute

Turns out Van Jacobson developed it at Lawrence Berkeley Lab in 1988, based on an idea suggested by Steve Deering at an end-to-end task force meeting.

(-Great things happen when great minds kick it!)

And apparently, sleep was optional—even in the days before energy drinks were packed into every vending machine and corner store.

In comments attached to the original source code, Jacobson wrote:

“...this code sort-of popped out after 48 hours without sleep. I was amazed it ever compiled, much less ran.”

Geez Louise!! Talk about surfin’ those theta waves...lol

But check this out—the clever part is how traceroute works.

It didn’t require some special “please tell me where my packet went” feature to be added to the Internet.

It took advantage of behavior that already existed! Brilliant, IMO.

In IPv4, packets carry a TTL—Time to Live—value. Each router reduces it by one. When it hits zero, that router drops the packet and normally sends back an ICMP Time Exceeded message.

traceroute sends probes with progressively larger TTL values—1, then 2, then 3—and uses those complaints to reveal the route...one hippitty-hop at a time.

So, basicallyyy:

“I’m going to keep sending packets farther n’ farther n’ farther until somebody complains.”

Networking!

Huge hat nod to Jacobson and Deering. It must feel amazing to develop something that people are still using, decades down the road!!!

So...now I’m curious:

What command should I rabbit-hole next?

u/CyberSecWithHaikuInc — 7 days ago
▲ 5 r/computerscience+2 crossposts

Concept de cyberdeck modulaire "Deck & Dock" - Pi 4

Je bosse sur un projet de cyberdeck et je suis encore en phase de réflexion. Pour l'instant j'ai un Pi 4 4 Go, un écran tactile 11 pouces, un clavier Bluetooth, une carte micro SD, et c'est à peu près tout ce que j'ai en main. J'ai aussi une liste d'achats en attente avec un SSD 500 Go, une batterie Baseus 145W 25000 mAh, un RTL-SDR, une Alfa AWUS036ACS, un Ubertooth avec boîtier EMI, un écran E-Paper 2.13 pouces, des antennes, des interrupteurs à bascule, un testeur USB-C et des hubs USB.

L'idée de base serait de faire un système en deux parties. Un deck portable pour de la bureautique et du code au quotidien, et une mallette qui servirait de station d'accueil avec tous les modules radio et pentest dedans. Le deck viendrait se glisser dans la mallette quand j'ai besoin de la config complète. Mais rien n'est encore décidé. Je ne sais pas encore comment construire le boîtier du deck, comment gérer la connexion entre les deux, ni même si ce concept est le bon choix par rapport à tout mettre directement dans la mallette. Le matériel de la liste n'est pas encore commandé non plus.

Si quelqu'un a déjà fait un truc similaire ou a des conseils sur ce genre d'architecture modulaire, je suis preneur. Je posterai les avancées quand ça commencera à avancer concrètement.

reddit.com
u/WaterFragrant1775 — 6 days ago

Is turing award 2012 the most important turing award and the most important work of the last 40 years?

This is what allowed the Internet to be secure and to actually scale and be functional, it’s what allowed governments to be secure so basically the entire Internet and every single government and military runs on this. Also it created cryptography as an actual science and defined all of its actual principles so everything from bitcoin to post quantum security completely relies solely on this award.

reddit.com
u/Fit-Blood-5296 — 9 days ago
▲ 26 r/computerscience+1 crossposts

I've created TrackLog: a collection of Prolog libraries, examples, and guidelines for building a personal knowledge base in pure logic

  1. TrackLog blurs the boundaries between database administration and programming
  2. TrackLog is based on Formal Grammar (DCG): you will develop your own grammar to accomodate your language needs
  3. TrackLog will help you to create extremely precise and relevant data fuel to feed it to LLMs
  4. TrackLog stands for "Tracking in Logic"
  5. TrackLog libraries are 100% compatible with SWI Prolog dialect and 99% ISO-compatible, so you can port them to another dialect if you need it
  6. My original goal was to create a medical tracker to help people to manage complex illnesses and chronic disorders
  7. Logical Programming is a generalization of functional programming and also a generalization of relational databases. You can see logical programming as a missing glue layer between a database and a program
  8. You can see TrackLog as a second brain to help you capture and analyze data and aid in pure logical decision-making which is free of 100+ cognitive distortions and biases, completely traceable and based on formal logic

Please, use examples.pl as a main guide. I've provided several practical use-cases: Learning Tracker, Item Tracker, Exercise Tracker and Programming Tracker.

Repo: https://github.com/kciray8/tracklog

I'm glad to hear any feedback!

u/Iaroslav-Baranov — 10 days ago
▲ 84 r/computerscience+1 crossposts

The creation of PING

The other day I was thinking of firsts in the history of cybersec, and I started thinking about the first few commands/tools I learned. One of them was ping. And then I was struck with the thought, "When was ping created? When was the first time it was ever used?" Cue my deep dive into ping aaaaaand... Violà

*Dramatic flair in narration* Picture this- it's December - 1983 (later than I had expected, but then again i had NO real idea)

It's late at night, and a young man notices a strange behavior coming from the IP Network at the US Army’s Ballistic Research Laboratory.

Needing something more than ICMP Echo Request and Echo Reply messages, this young man gets to work and designs, codes, implements, and provides operational support for a brand new tool, known as... ping *background instrumental flair*

And the time it took?... *dramatic pause building the suspense and preparing for an epic montage of late nights and beard growing*...

One Night. (say whaaaaaaat)

That's right. At 25 years old, Mike Muuss was working as a computer scientist, and in the span of one night, he wrote one of the most used tools known today. ping is a simple Unix command useful for everyday network troubleshooting. While doing my dive, I was a little confused at the difference between ICMP Echo Request/Echo Reply and ping, so here's a helpful tid bit:

  • ICMP Echo Request = “Hello, are you there?”
  • ICMP Echo Reply = “Yep, I’m here.”
  • ping = the little program that asks the question, waits for the answer, and tells you how long it took.

Interestingly, and kind of not suprising now that I have learned it, ping was named after the sonar sound and NOT as an acronym. Packet InterNet Groper was attached later on (this is the interesting part in my opinion).

So, to answer my own question and deep dive. 1983, that's when ping was first created. And in the span of one night. Very cool. Thanks Mr. Mike Muuss!

https://preview.redd.it/6l2bep1vnuhh1.jpg?width=250&format=pjpg&auto=webp&s=8f24754be46538de04f3b54307a12cf2527c5307

( I believe a dedicated article of Mr. Muuss should be added to the Cyber Security Archives, so tune in for that!)

reddit.com
u/CyberSecWithHaikuInc — 12 days ago

Anyone else underwhelmed by Prompt Engineering/ VibeCoding

Am I the only one? I feel like everyday I hear how it will replace everyone or how it’s becoming so amazing yet it never seems to go anywhere.

I’ve had success prompting on projects before, even over a decent timeframe, but nothing I couldn’t do myself, and only with great handholding. I’ve had it fail miserably as well in equal measure. Admittedly I’ve never created RAG pipelines or loop engineered or used agents or whatever, but I still just don’t see the hype. I really don't see how from any conceptual standpoint asking an agent to work on the exact same problem repeatedly would somehow fix it, if you had a junior who was incapable of learning, why would you make him do something he had already failed at?

I can see the benefits for speed, definitely is amazing on that front, if you know what you want and don’t need to maintain it, and if your goal was merely to get a product out I can see the reasoning, I can fully see why you would like it. However, If you had something like a banking application, a pacemaker, or a competitive game engine, how could any form of this engineering style work.

reddit.com
u/Aggressive-Force3297 — 9 days ago
▲ 27 r/computerscience+1 crossposts

How to fix this in logisim evolution?

My both flip-flop(J-K) are repeating or high in the output(Logic high) but it should not have happen.Any solution?I am starter

u/Sad_Attempt_8467 — 11 days ago

Learning C language still fundamental?

In this day and age of LLM that can do most of coding in one shot. do we still have any value if we learn C like good programmers did back in the day ?

With the advent of models like Fable and its unstoppable hunger to one shot small projects. Is there an edge in understanding low level languages like C C++ like good programmers did back in the day.

reddit.com
u/EnvironmentalRun4163 — 13 days ago

Why Did Computers Settle on 8-Bit Bytes?

We usually learn that 1 byte = 8 bits as if it has always been that way.

But early computers didn't all use 8-bit bytes. Different systems experimented with different sizes, including 5, 6, 7, 8, and even other configurations.

So how did 8 bits become the standard?

One obvious advantage is that 8 bits can represent 256 different values (0–255). That makes an 8-bit unit useful for storing small integers, characters, and other data.

Character encoding was another factor. ASCII uses 7 bits, and 8-bit systems provided an additional bit that could be used for parity or other purposes. Later, many systems adopted 8-bit character encodings.

There was also a hardware advantage: 8 is a power of two, which fits naturally with binary computer architecture.

But perhaps the biggest factor was standardization and compatibility. As more hardware and software adopted 8-bit bytes, it became increasingly useful for other systems to follow the same convention.

What's interesting is that “byte” originally didn't universally mean 8 bits. The term could refer to a small group of bits used by a particular computer.

What do you think?

If early computer manufacturers had converged on 16-bit bytes instead, how different do you think modern computing would be?

I'm curious to hear perspectives from people interested in computer architecture and computing history.

reddit.com
u/Special-Sprinkles455 — 12 days ago

Getting ready for AP class?

Hello everyone, in a few weeks I will be starting as a 9th grader in an AP computer science class. Are there any pointers I should know of what I should freshen up on? I like computers and I feel I have a decent understanding of them but any advice would be greatly appreciated. Thanks!

reddit.com
u/laptopRTXuser — 13 days ago