Learning to code

Have something to say or share? Everything else comes here!
User avatar
Segolia
Djinn
541 | 38
Great Popularity Badge
Has a thread with over 50.000 views
Common Love Badge
Earned over 20 cookies
Common Guide Badge
Created a complete character guide
Something I've never quite tackled, and for some reason scared of. Next semester I'm taking 2D and 3D game design courses, which involves Unity and using C Sharp. Now granted,, I do know how to work with html, but that is baby steps when it comes to coding. It's so easy to just look at a web page source and infer how things work. Last time I tried learning how to code was in High School, it was an AP course in Java; "Computer Science". I was doing an uncomfortable job at it, but before I could even have a shot learning more about it, the teacher literally just left the class. We suddenly had no material, and I left the class because of how much of a blatant waste of time (and money for the final) it was. Ever since then I've been uncomfortable trying to learn it.

The problem I anticipate from these courses is the fact that I'm not sure how much direct learning we'll get from C Sharp. I imagine it's just going to be "make this" and we figure out how to in unity, and thats like jumping into a pool without knowing how to swim. Obviously I gotta self-learn now how to code, but I'm awful at comprehending the functions of each snippet of code. Html it's obvious, it literally tells you what each one is or you can infer it. C or Java? It's like someone wrote a book telling a story about what the void is, and the severe obsession of semi-colons.

Now I'm not asking for direct help at all. I'm just curious about you guys and your learning experience with coding languages such as C or Java, or ruby even, and how it was like learning it for the first time. Any struggle in it, ezpz, fun? Have you made anything with it knowing the knowledge? Also hows Diablo coding work? I'll probably get into learning that in the future.
User avatar
iwansquall
Harpylisk
1492 | 71
Common Posting Badge
Posted over 1.000 messages
Legendary Popularity Badge
Has a thread with over 250.000 views
Common Love Badge
Earned over 20 cookies
Common Supporter Badge
Donated 1 time
I have zero experience on coding when I work my first job in game company.
I joined because I have experience in 3d assets, but then I took a jump to programming (more like scripting i think)
Managed to create multiple simple games commercially (although I doubt it covered the cost)

Here are my tips:
1. Logic thinking is a must, basically if you understand how game mechanic works, then it is fine already.
2. Have a mentor, Im lazy person myself, my senior programmer in my 2nd job helped tremendously although I have 0 knowledge in unity (i was using other game engine before that)
3. Rather than problem solving on bigger project, you can start on smaller game first (flappy bird clone, first person shooter clone, angry bird etc)
4. Keep creating prototype while learning new stuff, at early stage, I create couple of games that used a lot of CPU since it wasnt optimized. Then I took to learn tricks to optimized of game so you could port the game to android / ios.
5. Practice practice practice, as I said, Im lazy person myself. I agreed that what you do during your free time will determine the speed of progress on your learning. If less watching anime and playing games, probably I already in big companies lol :P


I can help a bit probably if you need help in Unity. I might help abit although Im not exactly expert.
User avatar
Taem
Necrobot
2471 | 150
Common Posting Badge
Posted over 1.000 messages
Legendary Popularity Badge
Has a thread with over 250.000 views
Great Love Badge
Earned over 100 cookies
Great Supporter Badge
Donated 5 times
Honestly, you won't know what it's like until you give it a try. Are you planning on taking the course at a local college or online? I self-learned BASIC from one of those LEARN BASIC IN 24 HOURS books. They teach you the very basics, and the only way to learn more is to ask on coding websites (ton of them; register to a few with many active users and you won't be disappointed). The more you do it, the better you get and the more intuitive coding becomes. I self-taught HTML and CSS in about a month when I broke my arm and couldn't work... easiest coding language I've ever used, and there are so many programs, such as Bootstrap, that makes your HTML look like a pro. I took C at my local college and, admittedly, it's very similar to BASIC, but tough as fuck to get some simple things done, however C is compatible with every electronic device on the planet so, it is a must learn language. Like BASIC and the PASCAL class I took in college, you are only taught the basics and there aren't any advanced classes so, once you learn the basics, getting good requires self discipline because you will have to learn advanced coding on your own by asking on websites. C++ is basically C with built in functions that save you a shitload of time having to code. I'd recommend learning C first at college, then C++. You can take Game Design at the same time, but ultimately you are restricted by the engine you use, rather it's UNITY or UNREAL or whatever, whereas with some knowledge in C, you can break out of that mold and do some pretty cool things.
User avatar
Marco
Team Member
1952 | 1347
Common Posting Badge
Posted over 1.000 messages
Legendary Popularity Badge
Has a thread with over 250.000 views
Legendary Love Badge
Earned over 500 cookies
Common Supporter Badge
Donated 1 time
Common Multiplayer Badge
Has won a multiplayer contest
Legendary Contribution Badge
Median XL Team Member
Common Auction Badge
Won 50 auctions
First things first, HTML isn't coding, it's markup. That's very different. There's no logical flow in it.

Second, google is your friend. And stackoverflow your wife. Just keep it in mind.

Third, I would recommend you start with a scripting language. A script is basically a piece of code that doesn't get compiled - this usually means that this code is much easier to read and it's more abstract, so you don't deal with weird stuff such as allocating/deallocating data in memory and other painful things. Some examples are javascript and PHP.

Javascript is nice to start because it's not a strict language (unlike Java) - which means stuff is more likely to work even if you don't know what you're doing. That's not necessarily a good thing in the long run (as you will get annoyed/confused when moving to a strict language) but it's good to start - and you can run javascript on any browser's console by pressing F12, so you don't even need some really complex setup or IDE to start playing with some code.

Find some tutorial to get you started on basic things such as data types, conditions, loops and syntax. There's plenty of stuff on the web. When doing these tutorials, you really should code what the tutorial tells you to, it's not enough to "understand" it, you will forget it a couple of hours later. Especially when you start coding its really important to keep all your coding work saved because it's an asset.

As for unity itself, there's a lot you can do with the interface and simply using code from some tutorial and stuff. I remember when I was a little kid and had GTA San Andreas servers, I had a lot of scripts going on but I really didn't know how it worked. Sometimes that's enough. But it might be what you are looking for. It won't really make you a coder, but at least you will be able to make some basic scripts for your games.
User avatar
Segolia
Djinn
541 | 38
Great Popularity Badge
Has a thread with over 50.000 views
Common Love Badge
Earned over 20 cookies
Common Guide Badge
Created a complete character guide
Heh, got help anyway even though I didn't directly ask. Danke guys :P

First things first, HTML isn't coding, it's markup. That's very different. There's no logical flow in it.


Right, forgot about that. I still don't quite understand what that means though - Is it because html doesn't necessarily care how many spaces or tabs you input into a line?

---

One problem I'mm going to have though is that I only have real access to 3D Unity game making at school. This laptop cannot handle any 3d games, and I won't be getting another computer for at least another year, saving up to move to Texas later next year(family sux), maybe later if funds don't quite go my way. I'm pushing this old thing way too far trying to stream too. So I'm gonna have to work on basic 2d games or utilities while I learn, not so much for any triple dimensions :(

---

Are you planning on taking the course at a local college or online?


Technically both, a hybrid course. Going to AACC. The computers at my school are ridiculous. They have Wacom monitors that let you draw on them, and even a couple of them have good graphics cards and are VR ready. Makes me drool ;-;

It was the first time I saw monitors like that and I never knew they even existed until I started this semester. I got my mind blown realizing they could even use eraser too. It's how a lot of my stuff that I posted on the drawing thread was made, and I plan on getting a drawing tablet on xmas.
User avatar
Inertia
Abomination
141 | 72
Common Popularity Badge
Has a thread with over 10.000 views
Common Love Badge
Earned over 20 cookies
Common Supporter Badge
Donated 1 time
Great Contribution Badge
Is an active collaborator / developer
Nice, I actually just started reading an e-book that's for beginners in C sharp.I don't have much time to start actually following along with the examples, but I think following a book and coding along with it is the way to go. My college semester is almost over so I'll have a few weeks to go ham on learning this. :D

Segolia wrote:The computers at my school are ridiculous. They have Wacom monitors that let you draw on them, and even a couple of them have good graphics cards and are VR ready. Makes me drool ;-;


Yeah man wacom tablets are amazing (and expensive). I have one without a touchscreen (you have to look at your monitor while you draw on the pad) and I really would love to have a touchscreen one instead. Once you get used to it it's not so bad though.
User avatar
Marco
Team Member
1952 | 1347
Common Posting Badge
Posted over 1.000 messages
Legendary Popularity Badge
Has a thread with over 250.000 views
Legendary Love Badge
Earned over 500 cookies
Common Supporter Badge
Donated 1 time
Common Multiplayer Badge
Has won a multiplayer contest
Legendary Contribution Badge
Median XL Team Member
Common Auction Badge
Won 50 auctions
Segolia wrote:Right, forgot about that. I still don't quite understand what that means though - Is it because html doesn't necessarily care how many spaces or tabs you input into a line?


Well most programming languages don't really care about whitespace either :P The reason HTML is not coding is the same reason an excel workbook is not coding: there's no code in it. A piece of code is basically a set of instructions: do this or do that. HTML is basically like text, with markup tags in brackets telling the program what to expect and how to handle the content - but it's not the code itself.
User avatar
Quirinus
Team Member
1510 | 184
Common Posting Badge
Posted over 1.000 messages
Legendary Popularity Badge
Has a thread with over 250.000 views
Great Love Badge
Earned over 100 cookies
Common Supporter Badge
Donated 1 time
Legendary Contribution Badge
Median XL Team Member
If you say html is code, then tags on this forum are also code, and we are all programmers. :mrgreen:

I learnt the basics of html/css/javascript/sql/php from w3schools in like 1-2 days (I had some prior knowledge). the tutorials are short, easy and free. once you start doing some small project or stuff out of the scope of those tutorials, you'll just google things, and in most cases, stackoverflow will pop out, as marco said. for php, the official documentation is amazing, I learnt almost everything from there, and bits from stackoverflow. for css/js, like marco said, you can mess around with the console, or make an userscript that changes a page (changing the way the page looks, or what some buttons/links do).

it's always easier to learn if you have some small project/goal in mind, then you can work towards your goal, and go step by step, figuring things out. for example, I learnt those languages by making a userscript that upgrades various pages of a web game, and a page that collects and organizes data for that game, so the players on my team had an easier time playing and thus increasing our chance of winning. it was the game utopia http://utopia-game.com/ ; it used to be very popular like 14 years ago (literally like 100-200k people playing, at that point of time on the internet that was amazing)

as for real programming languages (not the web ones), they are usually a bit harder (especially C and C++). you might want to start with something like python, it's probably more friendly towards beginners.
"but if it's simple it's not that hard" - Quirinus 2017
"small things like this are not a big deal" - Quirinus 2017
User avatar
iwansquall
Harpylisk
1492 | 71
Common Posting Badge
Posted over 1.000 messages
Legendary Popularity Badge
Has a thread with over 250.000 views
Common Love Badge
Earned over 20 cookies
Common Supporter Badge
Donated 1 time
I forgot about this website, we used online tutorial to teach basic coding to school children last time.
https://code.org/

Probably a bit too basic, since there arent any typing involved, only drag function and variable around.
Go try flappy bird, minecraft or angry bird (it is not physic based though)
https://code.org/learn

Should be useful for anyone without prior knowledge of coding.
User avatar
void
Shadowgate Totem
1771 | 97
Common Posting Badge
Posted over 1.000 messages
Great Popularity Badge
Has a thread with over 50.000 views
Common Love Badge
Earned over 20 cookies
Common Guide Badge
Created a complete character guide
I learned basic coding and programming paradigms in high school and some in university, but I was mostly only interested in it because I wanted to make my Diablo 2 bot more efficient. :D
But later it turned into a thing that I did for it's own sake.

It's important to understand that what you're studying doesn't focus on making you the 1337 haxx0r, but being able to work with it as required by your later job makes it still somewhat important to be good at.

For my studies it was more important to have extra knowledge, but some things that helped me learn and might help you too:

If you can imagine a program that could help you somehow, no matter how small that program will be in the end or if you're unsure whether or not it will work out in the end, try writing it. For example some things that I've written are: Text-to-Rainbow-HTML-Text tool, Emulator-Window-Magnification tool, Autoclicker, Japanese-Alphabet-Learning tool, Match-Two game.

I can assure you most of that stuff is less than 50 lines of code (aka simple), but it's great practice and some of these programs are useful to me even today.

Another thing that's very helpful is looking at prewritten code and finding out what it does by changing some values and observing the effects on the program's behavior. It's also useful for finding out what properly written code looks like. Being tidy is pretty much essential everywhere professional.

Also make sure that you understand what you are learning as you go. Not every bit of a whole example code, but what a lesson is about, because programming depends on "concepts" and people who don't understand the "parts" of those "concepts" get their ass kicked in later lessons. You have been warned. :P Better to make an ass out of yourself occasionally for asking stupid questions than not admitting that you don't understand something. I've come to notice that what sets good programming students apart is that they ask a lot of questions.

For resources, I've learned some C++ on youtube from "Bucky" and on codeacademy. Was pretty good, can recommend those to you. Learning by doing as you follow along is really good.

The learning experience for me was divided, programming is not hard. It's actually very very simple, the catch is that you need to be able to understand what the code does when you read and write it. :P But I generally am not interested to learn things that don't bring me immediate reward, because I get bored of it. So learning at school and university and doing exercises (although it was fun sometimes, and I did still learn a lot) just isn't my thing. Doesn't excite me much. I don't touch code anymore unless it's somebody else's and I want to know what it does for some reason, or if I need a quick program. In those cases I'm totally with it. Everyone learns differently. You're Segolia, your experience may differ, not only because you learn differently but because you will have different teachers, different priorities and a different learning atmosphere. IDK what else to say. gl