Quick Programming question

It’s an algorithm.

So yeah, it could have been written in any language, but I can guess that this game is made in some form of C (possibly C#).

The dev talks I’ve watched, spoke of ActionScript and Lua. Same stuff different pile.

Probably - but so what? Any real coder knows programming gold is language agnostic. It’s not about whether the syntax is in Python or C# or Haskell for that matter (best language btw). You need an O(logN) alg to knapsack a sparse ladder under 2-moment epsilon-distribution models (mu, sigma) and aren’t doing it properly. Psimple imo. Language < complexity(algs/structs).

written in cobol and it runs directly on their mainframe.

just kidding. The core-system is probably written in C++ and it would run on their servers, yes.

In theory, you could use a number of programming languages for this use case.
Whatever the case, it must run on the company’s own servers.
However, your question becomes more interesting / more difficult if you have an application that works under heavy load and needs to work with a lot of data.
Then it pays off to have an optimized C++ application in production.

The Matchmaker is more than a single algorithm and I suspect that it consists of different components based on different technologies.

C# is a very nice and beginner-friendly programming language, GL_HF.

I lost you here.

Yeah, I decided to not overthink stuff and just finish the course.

“Whatever happens, happens.” - Spike Spiegel, Cowboy Bebop, Session 26

1 Like

Basically; you have to focus more on how you code and how fast / memory intensive are your programs (functions/algorithms); because every language mentioned so far have the same capabilities.

Scientifically speaking, they are all Turing-complete, meaning whatever problem can be solved in one, can be done in the other as well.

You can write pretty slow and inefficient code in C++ while fast and effective in Python.

As someone who teaches programming languages at a University (C, C++, Java mostly), I always say to my students, we should pick the language based on the task, and not stick to one and try to solve everything in it.

You usually don’t write your GPU drivers in script languages, neither do you create a web framework in Assembly.

If you’re new, don’t focus so hard on the language itself, because in the end if you wanna measure the speed/memory usage of your programs; 80% of the result is based on how you code (ie. do you reinvent the wheel every time or do you use functions / classes, and the predefined headers / packages / modules / whatevers, to be more effective), and only 20% is based on the language capabilities.

Short example:
You have basically full control over your memory in C++, meaning you can allocate the exact amount you need, and never more, and once you don’t need it you can release it.
This is hidden from you in Java, the management is automated by the JVM’s Garbage Collection, which can lead to a bit slower/longer execution time.

However, if you heavily leak your memory (forgot to free and can’t do it later) in C++, it’s memory usage will be way higher than the one you write in Java, and there’s no guarantee that any of that memory will be freed (of course modern OSs will handle this and realize once your app terminates that their memory allocations are no longer valid and will clean it up).

This can mean you’ll have a very fast code in C++ which leaks its memory like crazy, and the same thing written in Java, which can be a bit slower but will not leak. Which one is better? (I don’t know, if you’ve got 64GBs of RAM and you leak a few kBs it doesn’t really matter, but this might not be the case).

TL;DR:
Just focus on being precise and to use the features (right) given by the language and you’ll be fine. After a while you’ll realize what kind of problem do you wanna solve and you’ll pick the right language for it.

1 Like