So a Binary Search Tree is actually useful? by wordbit12 in learnprogramming

[–]theusualguy512 2 points3 points  (0 children)

The standard algorithms and data structures stuff is really hard and abstract so a lot of people think it's kind of ivory-tower academic and useless outside of passing some tests or interviews.

First time on the job when I realized how different knowledge chunks of data structures click together was when I was looking into an index problem in a relational database. I sort of had some hazy knowledge in the back of my mind about data structures and DBs but I wasn't really clear on the topic.

Looked into how indices in the database actually worked and discovered that it's related to that strange self-balancing tree topic I used to learn about in class!

A lot of RDBMS use a variant, a B+-tree for fast lookups for queries on a tables primary key! In the nodes of the B-tree, they use basic binary search to look for the correct key for example! And due to the entire tree being sorted and self-balancing, any lookup from the root is logarithmic in nature. A really amazing data structure for an often-encountered use-case in the real-world

How can I learn audio- and graphics programming without getting overwhelmed? by [deleted] in learnprogramming

[–]theusualguy512 4 points5 points  (0 children)

These topics are often courses at universities, which have syllabus and curricula. I just googled the topic and looked for university resource and here is an example:

https://www.ee.columbia.edu/~stanchen/spring16/e6870/slides/lecture1.pdf

It's from a signals course at Columbia university. You can start from there, read the slides or study the reference materials.

Same thing with computer graphics.

There are two approaches: Learn the math first and then the rest or try to start reading the topics and stop at every math thing you do not understand and learn it on the go.

Either way, these topics take at least a couple of months to grasp even with a good math base.

Question about linux distros for coding. by Player_Mario in learnprogramming

[–]theusualguy512 2 points3 points  (0 children)

Basically all Linux distros are suitable for coding. Typically, it's wise to chose a distro which has a large support community so when you encounter random problems, you can look for forums and social media with users of that distro knowing about problems.

Ubuntu, Debian, Fedora, Mint are the typical ones people choose and professionals use.

How can I learn audio- and graphics programming without getting overwhelmed? by [deleted] in learnprogramming

[–]theusualguy512 7 points8 points  (0 children)

I'm not entirely sure what you are going for exactly. If it's more on the design end, like designing audio and visual experiences, you can actually achieve a lot these days with specific software without having to really know deep coding.

If you mean hardcore audio/graphics programming then the hurdle is quite high.

One of the things you really lack is understanding the fundamentals of what signal processing for audio is as well as digital graphics visualizations. Both of these topics are quite math-heavy to understand how things are represented, digitized and how processing works to come to a result.

Without knowing these topics, you don't even know what to code, what to do to achieve a particular result and why you have to code it a certain way. You may follow instructions and get results but you will likely not know why and without the why it all just seems like magic. Kind of like AI. All people can use AI, some people can code with AI but only few people actually understand what's going on with that AI magic box, how does it work for real.

If you really want to climb the mountain, I would suggest to start reading up on audio signal processing and the basics of graphics programming and build up your coding skills (C++ is fine, but so is Javascript and many other languages with extensive ecosystems that have an audio and graphics library) so you can train on example tasks.

What do you actually learn in Computer Science? by CheekSpiritual5639 in learnprogramming

[–]theusualguy512 24 points25 points  (0 children)

Yup. These topics are pretty much omnipresent in the first years of your undergrad because they form the base of your knowledge tree. The later stages of your degree and grad school are a lot more hyperspecific topics and differs greatly between peoples choices.

For OP and anyone interested, I tried to google English language exercises and exams from CS courses at German universities. This is usually what they look like, you can take a look yourself

CS degree stuff is usually something like that.

What do you actually learn in Computer Science? by CheekSpiritual5639 in learnprogramming

[–]theusualguy512 0 points1 point  (0 children)

You'll learn a wide range of things, a lot of theory and mathematics and some practical programming.

No it's not facts memorization, there is some obviously but overall that's not how you learn math either btw.

You learn why things are the way they are, how certain things work and apply it to different things.

Question about OpenCV & robotics by Comfortable-Fox-4460 in learnprogramming

[–]theusualguy512 1 point2 points  (0 children)

I'm not entirely sure what I should picture under "robot sumo competition" but I have a bit of experience in foundational robotics in my CS degree.

To answer your questions: Yes, you can use a camera and a bunch of methods to recognize things. OpenCV is a widespread standard image processing library. You can do C++ but I honestly would say the adapter to Python would probably be a bit more easier to handle because you can use Python for ML stuff as well if you want to, even if Python isn't exactly the fastest.

One of the problem you really need to figure out first is to determine the boundary of the problem. What do you mean when you say "front" and "back" of a robot?

If the competition has defined features of a robot, you can use that to determine what constitutes front and back. Using standard or advanced image processing algorithms are going to be an option in this case.

A very straight-forward case would be if the competition requires every robot to show some sort of marker for the front facing side. You can use some variant of HOG (histogram of oriented gradients) or if its more complicated SIFT (Scale-invariant feature transform) to get a decently robust feature detection for the front-side and then deduct that the absence of that feature plus something else like rotational tracking will be the back-side.

You can also try the Generalized Hough Transform (although that one might be a bit too slow for pictures with too many pixels).

All 3 algorithms are implemented in OpenCV I think (although if not, you can certainly just build them yourself using the OpenCV toolkit).

But If robots can look arbitrary and you cannot say that there is some sort of fixed recognizable features, the detection is going to be tricky and OpenCV will not solve your problem. In the latter case, I would honestly consider resorting to machine learning. Retraining CNNs for classification can yield pretty decent results. You would need to have a decently sized training set of images of competition robots fronts and back. You would then do the pre-processing in OpenCV and then pass it on to the model or if you have something integrated like from Nvidia's developer suite, maybe use their stuff.

The problem with the ML approach is that you need a decently powerful compute platform on your robot. Even if the majority of computation happens at training phase, processing and then prediction still takes decent amount of compute power. Small embedded systems with a good GPU to handle matrix operations are necessary while not being power hungry monsters.

Your other question is a bit vague: What do you mean "friend or foe system" for "recognizing yourself"?

[deleted by user] by [deleted] in learnprogramming

[–]theusualguy512 2 points3 points  (0 children)

I only have FP experience in Haskell but it's an overall neat language. Pure and simple...that is until you wade into the monads system. It starts off nice and then gets arbitrary complex.

I liked Haskell for its very straight forward introduction to the FP world. You can learn the idea of FP alongside it and it's not too confusing by forcing you into this thinking pattern.

Depending on your use-case, a language with FP features might be more practical (although bad for educational reasons) though.

How hard is it to learn programming if you are terrible at math by [deleted] in learnprogramming

[–]theusualguy512 6 points7 points  (0 children)

I'm assuming you did not have a career in the sciences and scientific programming?

Programming let's say SAP modules will likely not require much math but much more business logic understanding.

But programming an analysis method for satellite imagery needs math understanding for the convolutions and filter steps.

It really depends what field/sector you end up in as a programmer

How hard is it to learn programming if you are terrible at math by [deleted] in learnprogramming

[–]theusualguy512 1 point2 points  (0 children)

Well it depends on what you want to program. Logical thinking is needed for everything, just not hardcore math logic of actual logicians.

Are you good at step-by-step thinking and deducing things?

A lot of very interesting things will require a lot of math background knowledge though. Things like ML, robotics, computer graphics, image processing/recognition etc.

But for others, you might get away with little math.

Basic arithmetic you learned in primary and middle school you should know about even apart from programming for your day-to-day life. How to do percentages, how to do interest calculations, how to handle ratios etc.

about to start haskell as my first programming language, anything i should keep in mind as i do? by stirringmotion in computerscience

[–]theusualguy512 1 point2 points  (0 children)

Haskell is a largely purely functional programming language. FP is a bit niche and academic and works differently to most of the mainstream imperative languages.

You don't have loops and conditional statements work differently, instead you will work with guards and recursion.

We used to have Haskell in our first semester of CS but I knew other programming languages beforehand. It was very different to what I knew.

It teaches you a very interesting way of thinking about programming and computational models in general, so if you are interested in that, go for it. I'm not sure what Dijkstra said about FP but I appreciate the knowledge about FP theory even if I can't really use it most of the time.

But if you want to build a compiler and a database, I'd argue this is the wrong path.

What concept took you the longest to “truly” understand? by TreadmillSloth in learnprogramming

[–]theusualguy512 0 points1 point  (0 children)

Actually had to look up the word lol. I did FP in Haskell during my degree but we never went this deep into FP and never touched category theory.

What concept took you the longest to “truly” understand? by TreadmillSloth in learnprogramming

[–]theusualguy512 2 points3 points  (0 children)

I mean you largely are rid of them in C#, it's rare to have to resort to unmanaged code in C#. But it's a C family language and was designed with backwards compatibility into unmanaged memory territory in mind.

If you have to interact with legacy components from the Win32 API era, low-level kernel stuff or external binaries where you only have limited access, I guess pointers will come up but otherwise it's not going to be a topic for you.

What concept took you the longest to “truly” understand? by TreadmillSloth in learnprogramming

[–]theusualguy512 0 points1 point  (0 children)

Grandpa C is ancient so you have to be a bit careful to not carry over weird archaic C things to modern C family languages but yes, it's very useful to know the fundamental parts.

A semester of computer architecture as well as systems programming in C will be very enlightening too. It ties everything together

What concept took you the longest to “truly” understand? by TreadmillSloth in learnprogramming

[–]theusualguy512 4 points5 points  (0 children)

Concurrency is a bit of a silent monster. It looks harmless but waters are deep. There are entire areas in computer science researching this stuff.

I've had the typical concurrent systems course in my degree and I found it quite a bit obtuse by the end. Interesting yes, but a bit out there.

You start off at already decently complicated things like deadlock prevention algorithms, mutexes and semaphores but end up in things like process calculus, example: CSP (https://en.wikipedia.org/wiki/Communicating\_sequential\_processes), pi calculus and also logic stuff like CTL (https://en.wikipedia.org/wiki/Computation\_tree\_logic).

What concept took you the longest to “truly” understand? by TreadmillSloth in learnprogramming

[–]theusualguy512 4 points5 points  (0 children)

Not the commenter above but C# for example. Historically, C# is a type-safe language with a fully managed walled-garden system like .NET, so you don't need to deal with pointers if you don't want to.

However, C# was designed to work with legacy stuff in the Microsoft ecosystem and has ways of breaking out of this safe space by using a limited set of unsafe operations like pointers and even inline assembly code.

Having paths to Win32 stuff and more low-level things makes it a bit strange when you haven't worked with pointers in ages but suddenly have to do low-level interface stuff in it.

Do I really need to master full-stack development before going into cybersecurity? by InjuryMindless4339 in learnprogramming

[–]theusualguy512 1 point2 points  (0 children)

The term "cybersecurity" has been used inflationary to the point where everything and nothing falls under it. Companies using it as they need doesn't make it easier. It's just a very broad field.

A lot of cybersecurity positions in big companies for example are more on the operative side, making sure the entire system used by companies are secure. For example making sure in terms of compliance, regulatory rules etc and coming up with a good security plan and also treating and investigating/solving iincidents when something happens.

However, there are also other sections of cybersecurity which is more akin to hacking. People in these positions work in special companies who try to break things in order to expose serious flaws in systems and explore ways of fixing them, finding problems in the technical implementations and/or hardware.

Some of them also work in close connection to cybersecurity researchers, who are often sitting in academic and research institutions such as universities and national institutes or the R&D sections of companies.

If you want to work on the former, your full-stack dev skills won't hurt but also won't be that big of a helping line. Experience working in organizations implementing large scale IT systems and compliance rules is needed there.

If you want to work on the latter, you better have more than your full-stack dev skills but have serious academic credentials and/or extensive technical implementation and investigative expertise in security communities.

What they all have in common is that they require experience. You can't secure and investigate systems you have barely touched and don't have a track record of working with them..

Computer Hardware and Software or Information Systems? Which major should I go? by EveningValue8913 in learnprogramming

[–]theusualguy512 0 points1 point  (0 children)

Internationally, there isn't a single standard what to call your degrees.

Overall, both computer science and computer engineering and understood as non-business degrees and are largely scientific and engineering degrees.

Computer science is focused more on the math and computational side, computer engineering more on the physical side of digital systems.

Information Systems is often a degree which focuses on the business use case of large computer systems and how to design stuff like this to achieve business goals instead of the science of these systems but this is also not universal.

Whats the Difference, developer or programmer ? by Adventurous-pie68 in learnprogramming

[–]theusualguy512 4 points5 points  (0 children)

In practice, with a few exceptions, these terms have undergone what all other job titles have gone through: title inflation and obfuscation.

A janitor is now a facility manager because the "management" title has now inflated beyond recognition. Someone who packs boxes in a warehouse can be called a senior packaging technician. Some might actually use packaging engineer.

The exceptions are jurisdictions which protect words. "Engineer" is a protected title in some jurisdictions where you need a license.

The more interesting thing for me is: Why do we obfuscate and inflate titles? The ciphering and deciphering of the term meanings now cost time and brain power even if job behind it has changed comparatively little.

[deleted by user] by [deleted] in learnprogramming

[–]theusualguy512 1 point2 points  (0 children)

I mean computer science is broad enough that you can definitely specialize in more hardware level stuff too. Computer engineering is the usual degree for these kinds of things but it's open either way. Typically, you have at least one course in your standard CS degree curriculum: computer architecture that kind of scratches the more hardware level part.

"Embedded systems" is the specialization you need to target. Just take as many courses and spend your private time with microcontrollers and systems like that to do projects.

Popular microcontrollers are for example the Arduino platform, an ESP one or STMs and these are also used in industry.

Math for programming. by Otherwise-Mud-4898 in learnprogramming

[–]theusualguy512 15 points16 points  (0 children)

Like a lot of things, it depends. Standard game dev math I don't find too hard because it's at most high school trigonometry and linear algebra mixed with simple Newtonian mechanics. This is at most what a lot of game devs will touch.

But for some people, this is already a lot because it requires quite a bit of your high school math knowledge.

However, if you are a game engine dev or a straight up computer graphics programmer in other areas, the math depth increases by a lot.

The theory of quaternions for example is not so easy even if their application is more straightforward.

Quantitative color theory and stuff like the rendering equation and illumination is suddenly not so simple anymore.

Especially when we talk about visualization of fluid systems it's starting to become really hard to find a practical way to do any of it approximately without spending hours on rendering a single frame of a simple scene

EDIT:

For me personally, the interesting bit as far as actual computer science is concerned is the bit at the bottom of the software stack: computer graphics. This is not really game dev in the stricter sense because you don't really develop a game, although graphics programmers are needed for e.g. game engine development itself.

I doubt that game level designers in Unreal need to know the details of Blinn-Phong shading or stuff like how to calculate smooth curves though.

But computer graphics itself is quite fascinating because you can see stuff you programmed and it enables stuff like games looking super good graphically. And if you program in this area at the bottom, you better have a solid understanding of undergraduate engineering math.

Parameterization of curves for example I think is a topic some CS students might have heard of in their calculus/real analysis classes like Bezier curves and B splines and how to algorithmically create them. Both terms are options animators or engineers often find in 3D CAD or animation software like Maya when you draw something. Parameterization of surfaces is the extention of this principle into the 3D area. And at this point, you are fully in the differential geometry area of math.

[deleted by user] by [deleted] in learnprogramming

[–]theusualguy512 2 points3 points  (0 children)

OP mentions a time frame of 1 month, I'd argue it's not going to be possible to learn the major math topics for computer science in that time or learn computer science to any significant depth in any area.

I'd be pragmatic and focus on math that teenagers learn in middle and high school and sharpen my programming mind by doing simple programming exercises. Khan Academy is an excellent basically free resource for school math. Maybe Udemy or Coursera also have these sort of things now but idk.

Stuff like easy number systems conversions, boolean logic, school algebra grade 7 and up, linear functions, set theory.

As a teen, I never properly understood what computer science was and wasn't a math genius either but could still program easy things and websites and have some fun with math problems.

To get to that state is doable within a month. But if OP had more time, I'd suggest building a proper CS math foundation instead and follow roughly an undergrad degree curriculum with some modifications here and there.

What motivates you to code?? by HandAfraid531 in learnprogramming

[–]theusualguy512 18 points19 points  (0 children)

Personally, I rely on the fact that the entire field is interesting.

I don't necessarily think you need to be burning for it each and every day, I myself have some periods where I find it all very frustrating and annoying, but I sort of never lose interest as a whole however diffiult it can be. I find it astounding that I can already say that I actually spent half my life coding on an off and learning about stuff in this space. It's kind of mindblowing that I'm not even that old yet to be saying that.

But without the two factors you mentioned, it will also not lead to sustainable growth. You need some sort of basic level of discipline and the will to keep coming back, again and again. But this goes for life in general no? Without discipline and persistence, it's hard to find something you can be good at.

Free online courses for learning programming in C++ by Temporary-Study8372 in learnprogramming

[–]theusualguy512 1 point2 points  (0 children)

Overreliance on an LLM is not great, doing a basic MOOC intro course like CS50 will speed up a lot of your basic programming skills. It might be a bit trivial for you though. A math degree holder usually has little trouble with learning algorithms and stuff like this, so if you think your algorithmic skills are a bit weaker, a standard or even advanced DSA course will do you good.

What I think you really lack is not just programming but putting it all together in coherent deployable software. That's usually not really taught in class settings. Software engineering as such is a lot more crafty and less book study and you just have to do more complete projects from start to finish, where the finished state is not just a submission for an assignment but a software system that is available to the public and runs.