how to learn to code

Anyone have any recommendations for "courses" or such for learning C#? I gave Sololearn a try but my issue with that is that it doesn't actually teach you how to use anything it 'teaches' you, it's literally just copying and pasting code blocks. Goal is to make a game. I've dabbled in code before, so I understand more than a normie how it works, but I've never been able to find some practical way to  learn it.
Go on YouTube, pick whatever genre of game you want to make (platformer, RPG, whatever) and search "X game unity tutorial," preferably a more recent one since Unity sometimes changes stuff with their UI and menus and such. Follow each video, but make sure you go out of your way to tweak things like adding new enemies or areas, and don't be afraid to deviate slightly from the tutorial. That's probably the easiest free way of doing it if you don't want to shell out money for Udemy tutorials (which are usually the same thing, more or less).
 
It really depends what you’re interested in and what sort of learner you are. If you’re more of a visual learner, you’d probably have an easier time with JavaScript because you can see things on a webpage updating every time you save the document. If you’re more logic oriented, you should probably start with Python and look up how to automate something you find tedious at your job (like adding the current date to a bunch of image file names).

I wouldn’t recommend learning anything more low level like a compiled language unless you have a serious attention span. I say that as someone who spent a decade on and off trying and failing to learn to code with Java until I finally tried python and it clicked.
 
Someone please explain to me the rust tranny drama.
Rust developers are very pushy in advocating Rust onto existing projects, and how the project could do better rewritten in Rust, even when it is already working perfectly fine. This is the very tranny behavior that they are hated for, not to mention many of them are actually trannies.

Rust isn't even a stable language long term and they want to push it into the Linux kernel, meaning the language drifts and you are stuck with needing a very specific compiler version to get your code working.

Rust even brought its own package manager called "Cargo" that you run and download binaries for 3rd party libraries for each Rust source code project you do. We already have library name squatting problems NPM/Javascript and now weird binaries with unknown sources. Just trust the tranny amirite?

Here's a joke Rust hello world that takes it to its logical conclusion:
Due to the lightweightness of rust(🚀), unlike node_modules being fairly large for few dependencies, rust(🚀) manages compile caches efficiently and stores them to storage to save compile times! Just 33G target folder, the compile time is only around 2 hours and 30 minutes on my mac on release mode
 
Anyone have any recommendations for "courses" or such for learning C#? I gave Sololearn a try but my issue with that is that it doesn't actually teach you how to use anything it 'teaches' you, it's literally just copying and pasting code blocks. Goal is to make a game. I've dabbled in code before, so I understand more than a normie how it works, but I've never been able to find some practical way to  learn it.


Reading through the thread, I get the impression "start a project and just figure it out" may be the most practical way to actually learn, but I'm open to something more guided if it's out there.
For me it was modding Unity games like Rimworld and Terra Invicta, you can try installing dnspy decompiler and just drop the DLL assemblies in and try reading the code.

You can even edit and save the assemblies in dnspy.
 
Here's a joke Rust hello world that takes it to its logical conclusion:
Fuck, this is just the laugh I needed tonight. I love it :story:
 
For me it was modding Unity games like Rimworld and Terra Invicta, you can try installing dnspy decompiler and just drop the DLL assemblies in and try reading the code.

You can even edit and save the assemblies in dnspy.
While I love dnspy, with the original author abandoning it it has fallen a bit behind decompiling more recent .net assemblies that use fancy features (which then makes it difficult to modify things). There isn't a better alternative, however, and it is a cool way to get insight into how others do things.
 
Automate shit. It's the easiest way to learn.

Code is mostly logic gates and loops. if this or that then this other thing, while this thing is true do this other thing, etc.

The complicated part is figuring out a goal, but once you have that goal you can just start googling specific shit you need, and you put it together. In time you will remember a lot of the shit you googled since you'll use it often.

Courses on freecodecamp's youtube channel are okay to teach you some basics and are good to go through for beginners, then you just work on your goal. You don't need to know anything more complex than their 4-12 hour lessons. You don't even need to know those to start doing shit, but it's best to know some basics.

There's lots of things that need done in the open source community. Check out random projects here https://github.com/awesome-selfhosted/awesome-selfhosted find something you like, e.g TubeArchivist, and help develop it, help implement some feature. These people could really use help, and they're generally more than happy to help you out with understanding their code and making your first contributions.
 
While I love dnspy, with the original author abandoning it it has fallen a bit behind decompiling more recent .net assemblies that use fancy features (which then makes it difficult to modify things). There isn't a better alternative, however, and it is a cool way to get insight into how others do things.
Dnspy under DnspyEx is the new revived version, I saw the last commit was 7 hours ago as of writing. The original can be found https://github.com/dnSpy/dnSpy.
I haven't found any issues with the new version, but that might be due to Unity games dealing with only .net Framework 4.8 and 4.7.2.

My only annoyance with it is not being able to directly edit some mod assemblies that use publicized versions of the game assembly to call private methods directly. There's always Harmony runtime patching for that.
 
@かうぼーい
Whatever you do, just write some code. Make stuff. Plenty of solid advice to get anyone off the ground in this thread so I have nothing new to offer other than reinforcing that to learn, you must do.

Don't worry about reinventing the wheel. As you go you will find areas of interest that you can delve into and then it becomes more tailored and fun.
For me, I was recommended K&R by autists, got a copy and then just started working through it page by page, restricting myself to the book and skipping exercises that stumped me for too long. That's a relatively dry way to go about it but it worked for me and those autists changed my life more than they know.
 
  • Agree
Reactions: Another Char Clone
Random guy writing at a high-school level doesn't need advice on how to become the ultimate greybeard and read about fucking linkers, C, Rust or C++. Try learning python with one of these books:


Every programmer, no matter how high or low level, needs to know python. (Or if they're very talented they can pick it up in a day) It's simple and those books are for beginners.

If you can make it through one of those and don't hate it, come back and ask some more questions. If you can't, become a reddit janny or something.

Knowing and being a bit decent at basic python will be enough to eventually get you a entry level programming job at a boring company that will pay well (i.e. beat working at Walmart) and set you up for the future.
 
Right now, I'm beginning to learn how to code. For me, it's PURE profit incentive. What is concerning for me is that, while learning the languages is fine, I want to be really professional. In computer science they teach you math and other mathematical algorithms to both optimize what you're doing so it takes up the least computer resources and also is useful for encryption. I've heard, for some reason, that programmers who work on games are the lowest level of programmer. It's like being a doctor and then somebody asks you : "OK, do you work at a walk-in clinic or are you a neurosurgeon?"

Nothing wrong with being a doctor at a walk-in clinic or even a game developer, I just want to get really good at coding (for the money) and I don't know how far and how complex it can get. I DON'T know what compilers do. There's gcc and clang and msvc for C++. I don't know what any of them do and which I'll need, but if I stay optimistic and keep working hard I WILL learn how to code.
 
  • Feels
Reactions: SargonF00t
Right now, I'm beginning to learn how to code. For me, it's PURE profit incentive. What is concerning for me is that, while learning the languages is fine, I want to be really professional. In computer science they teach you math and other mathematical algorithms to both optimize what you're doing so it takes up the least computer resources and also is useful for encryption. I've heard, for some reason, that programmers who work on games are the lowest level of programmer. It's like being a doctor and then somebody asks you : "OK, do you work at a walk-in clinic or are you a neurosurgeon?"

Nothing wrong with being a doctor at a walk-in clinic or even a game developer, I just want to get really good at coding (for the money) and I don't know how far and how complex it can get. I DON'T know what compilers do. There's gcc and clang and msvc for C++. I don't know what any of them do and which I'll need, but if I stay optimistic and keep working hard I WILL learn how to code.
learning to code for whatever reason means jack shit, coding is like maths/art, if you don't keep practicing/working on it you'll get rusty and then you might become uninterested granted you don't get the alzheimers, literally pick up projects on bootcamps as well as challenges on stackoverflow, do not pick other people's code for use but whenever given a example try to read the logic of it, game programmers work on a low level because of inhouse engines which usually use C++/C to not make it bloated as fuck like UE/Unity.

a bit of faggotry on my part but many of my programming teachers hammered the learn programming logic talk when teaching programming to my class as well as giving speeches about persistence and repetition being core for any willing programmer, doesn't matter the language, one thing i do not see many people doing when they face a programming issue is READ THE MOTHERFUCKING MANUAL YOU FUCKING NIGGER.
 
Learn how to think before anything else. Consider learning APL, a nice and mathematical kind of language. I wrote some posts about this in the programming thread before I was threadbanned from it.

Anyways, don't get too attached to any language in particular, it's more important that you learn to think like a computer.

To think like a computer is itself a ridiculous thought. There's no such thinking.

Once you think the right way, translating it is the easy part.

Without offense intended, this reads like an opinion from one who knows only one or two kinds of programming languages. I may have misunderstood it, but the preparation of programs in wildly different languages require wildly different modes of thought.
 
To think like a computer is itself a ridiculous thought. There's no such thinking.
Human languages and computer languages operate differently, have you never heard the joke about answering "Yes" to an "or" question? Or tried to teach someone what a variable was?

You can use a different phrase to describe it if you want, but the point is that when the human and computer talk to eachother, the human is going to need to be the flexible one that can put things into terms the computer can work with. And knowing how to do that is a skill.

I may have misunderstood it, but the preparation of programs in wildly different languages require wildly different modes of thought.
Remember, OP is asking how to learn to code at all, not how to master every language in existence. They aren't going to have to deal with language interference from implementing the same thing in multiple languages in quick succession.

Generally speaking for a beginner like OP who is free to quit whenever they want, the goal should be to get them working on something that interests them long enough for them to realize they aren't doing voodoo magic and they really do have the capability to learn. Knowing the strengths and weaknesses and nuance of each language risks scaring them off with information overload this early in the process. At least let them familiarize themself with one language and get some kind of baseline before you spring all that on them.

The extent to which I expect someone who is trying to learn to code to be able to identify and translate a problem is more on the level of recognizing "Hey, these lines look really similar, maybe there is a way to express it in fewer than 24 lines of code". Or recognizing that data type matters and being careless will lead to some kind of error - whether it be at compile time or at run time.

For the purpose of just getting OP to work on something, these things are the same in every language. The exact implementations may differ between languages, but identifying what needs to be done is universal.
 
learning to code for whatever reason means jack shit, coding is like maths/art, if you don't keep practicing/working on it you'll get rusty and then you might become uninterested granted you don't get the alzheimers, literally pick up projects on bootcamps as well as challenges on stackoverflow, do not pick other people's code for use but whenever given a example try to read the logic of it, game programmers work on a low level because of inhouse engines which usually use C++/C to not make it bloated as fuck like UE/Unity.

a bit of faggotry on my part but many of my programming teachers hammered the learn programming logic talk when teaching programming to my class as well as giving speeches about persistence and repetition being core for any willing programmer, doesn't matter the language, one thing i do not see many people doing when they face a programming issue is READ THE MOTHERFUCKING MANUAL YOU FUCKING NIGGER.
How you describe programming is similar to language learning. When you learn a language you need a lot of repetition to drill in certain things. For example, if you're learning Udmurt (just to pick a random language) some words just won't stick and you have to encounter those words repeatedly over weeks for them to stay in your head. In programming I guess what is important is actually programming so you drill programming concepts into your head just through sheer repetition.

Today I learned how to add comments in code by doing "//" or "/**\" and ALSO I think compilers are things that your code into .exe files so you can "execute" them.
I'm making progress
 
How you describe programming is similar to language learning.
In a formal degree program, the similarities between linguistics and computer science appear even stronger. (Linguistics isn't language learning, but it's along the same vein).

The difference between a prefix notation and an infix notation language is about as small as the difference between a head initial and a head final language. (They look very different on the surface, but if you're drawing syntactic trees instead of reading full sentences, it's just one little thing that gets flipped around).

And listening to people from both sides talk about semantics gets really redundant.

I guess what is important is actually programming so you drill programming concepts into your head just through sheer repetition.
To expand on this on the language learning side of things, in college after students had learned the basics of a language, teachers would really emphasize that it's more important to use the language than to use it correctly. Of course, using the language correctly is important to be understood, but the teachers have seen too many people fail because they're scared of looking stupid; it's easier for them to fix mistakes than it is for them to fix silence.

This was not the policy for only one department either. This is the practical non-financial, non-nationalistic reason that study abroad programs are endorsed. And I've heard from students who did those programs, some teachers in the other country recommend drinking small quantities of alcohol before class as the best way to improve fluency, because it helps get people past the silent / embarrassed state. Then once students aren't afraid of looking stupid anymore, they speak (practice) more even when sober.

ALSO I think compilers are things that your code into .exe files so you can "execute" them.
More or less, yes. Compilers take the code that you wrote and translate it into something that the computer can run. I'd just note that the output type can differ based on the machine you want to run the program on.
 
Back