Discussion: When and where did you learn to code?

We all do things for different reasons and we might do them differently than eachother.
I’m curious to know what were your motives when you decided to learn how to code.
Where did you begin? When did you begin? What was the first thing you made? How did it go?

The reason I ask this is because I’m starting to learn how to code and I feel like I get stuck more often than anything else. I wanna see how people were able to look past this and better themselves so I can do the same. I want some inspiration.

Thanks mates :slight_smile:

I actually began back in 2009 with Wiremod, specifically Expression 2.
It’s a simple language for scripting everything from simple contraptions to advanced things like mechs (which I have done several times, one of which was a recreation for a friend of mine, shamless self-promotion)
I sat in a spacebuild server for what became several years of my life, I climbed up to admin status with 2000+ hours, and we had a small community of E2 scripters which became the friends that I talk to about every day on steam.
We coded spaceships with massive guns that shot giant lasers, all with E2 and a couple of custom E2 functions that let us use effects (fx() function for those interested). We even made drones with advanced movement systems and many space related systems for our ships to make it as realistic as possible.
It was pretty fun, as the combat in that spacebuild server didn’t depend on how advanced your E2 was, because everyone pretty much did the same amount of damage.
We had lots of epic fights, sadly the server was rather slow at times and we had to endure lots of lag occasionally, but it was fun to just hang out regardless.

The server went on to have a second, naval server which we also spent a lot of time on creating boats instead.
After the server was shut down, I went on to Lua where I remained for quite a while until I started with proper languages like C#, Java, PHP and some other languages like HTML, JavaScript and Kotlin. I even ventured into the depths of C++ quite a bit, but didn’t enjoy it as much as other languages.
Today I mostly code in Java and am currently making my own 3D game engine, but I do quite a bit of Lua for gmod still.

TLDR;
Started out with a simple scripting language in Wiremod called Expression 2.
Found a nice group of friends, went on to the real programming languages and then settled on Java and Lua.
The most important part of this is that I got to know a lot of new friends from all around the globe which I talk to every day.
It was a fun journey! :slight_smile:

made some shitty cheat, ONLY clientside code; didn’t know what serverside even was
thought I was a 1337 haxor
but then suddenly QAC was made

I started out because constantly when I would see a great script I would also think a human was behind this, somebody made it. This led me to try and dig deeper into how people made these things and I began to learn little things like GMOD uses Lua and that I would need to learn Lua. To be fair I started off in quite a bad way and pestered people for information and then I realised that Google searches were all I need people coding wasn’t as uncommon as I thought. I think when I stopped outsourcing my Googling to other people and realised how to use the Wiki and Google more efficiently I started to learn faster. Don’t get me wrong I ask people questions quite a bit - there is nothing wrong with that thought you’ve got to try yourself too else there is no challenge; programming is problem solving after all.

Now regarding you saying you feel stuck all the time, are we twins? I’m pretty sure it’s a common thing I constantly feel stuck and I’ve been coding in Lua for 6 months, not exactly a long time when it comes to programming though I have progressed a lot. You really won’t realise it until you look at your old work and cringe at your old code which brings me to something I wish I did more of initially but i’ve started doing now KEEP YOUR OLD CODE. I think it’s a good thing to look back at when you’re feeling shitty about your abilities as you really can see code that you’ll question ownership of, I’m bad but not that bad is how I feel when looking at old code xD.

I also felt that looking at programming in a broader way helped me, a bad misconception people have is they need to learn how to do things in a language too specifically, you need to **LEARN TO PROGRAM ** this is what will allow you to dive into new concepts languages and even have a better thought process as a programmer. I like to conceptualise it as languages being your tools and your way of thinking as how you control those tools. Another concept is that don’t just learn how to use a saw or a hammer BUILD A HOUSE what I mean by this is using your knowledge and skills in conjunction to produce projects, this can help you learn a lot especially if it’s a project your passionate and eager to work on.

Overall I’m sorry for the incredibly long response I just felt obliged to respond given my insecurities I always run into and you’re not alone

TLDR;
The key is to not compare yourself to other people and complain about where you should be at instead use the time to get better complaining you suck isn’t beneficial. Build projects when you have some knowledge that you would need for a given project and collaborate and speak to other coders. Challenge yourself with new problems and concepts and most importantly have fun !

Stole some scripts from garrysmod.org, used gmodwiki and then created my own scripts

This guy: https://www.youtube.com/channel/UCFpuE-Qjn4EWqX-VJ_l7pbw

If you were to create a “to do” list for a beginner, what would you suggest they create?
Get more specific other than “create own gamemode” and “HUD”
ex. create an “ESP like script for admins” or some bs.

[editline]27th April 2016[/editline]

Also thank you for all your responses, they do shed some light on what I should do to improve. :slight_smile:

  1. Learn from others code. What happens if you change this line? What makes them tick? Learn tricks around problems.
  2. Start off with something easy, and something you’re interested in. (You don’t want to burn out before you start). A HUD, cheat or a funny entity/weapon.
  3. Don’t start on a gamemode. It requires mastering entities, SWEPs, client/server-side scripts. And you usually have to start from scratch.
  4. Don’t ask for help immediately. Try to find a script online that does it and learn from it.
  5. Use others solutions as much you like. Just don’t release anything that contains their code without asking them first.
  6. Don’t be scared to show off your work. We all started somewhere and it gives a boost to get feedback on a project.

In no order.
It is hard to get more specific. You’re the only one who know what project, you are most interested in.

To add to point 2 above:

“Start off with something easy, and something you’re interested in”

Create something small, something that barely does anything, and then just keep expanding. It will be messy, it will not make sense, but it will teach you more and more about how to use Lua to achieve your goal. I made a perma weapon addon first and I think it turned into a really bad way to give people weapons on spawn for a Dark RP event or something, with timers, file storage etc.

Then - and this I think helps however good you get - go back, re-look over your code, and re-write it ( good for beginners to do ). You’ll find that even after writing a small addon, you’ll start to see new ways to do functions, or how to handle parts of the addon.

I’m writing a Gamemode at the moment, and I keep looking back at the code I did at the beggining and seeing better ways to do it. At one point, I complete scrapped a whole part of it that broke the whole thing just to re-write it, but now I feel much happier with what i’ve got.

I recommend starting with weapons. I started with those. It’s fun as hell, and it’s pretty simple. Go here:

Extract that and work with his base. It’s one of the best bases that balance simplicity with performance.

I’ve been working with weapons for over a year and a half. It’s still the funnest thing to do in my opinion.

Quake III was the start of my (limited) programming knowledge. There was this iOS game called Eliminate Pro, and I ported it into Quake III because they ran on the same engine. I never finished, however, because transferring game assets from a second gen iPod Touch onto a computer is very unstable and usually ends up with problems. Since then I’ve learned some C#, JavaScript, and believe it or not, TI-BASIC.

Where did you guys find all this information to actually learn and understand these languages and programming? I know there’s books, but they can be a bit hard to understand at times.

It’s going to take time, and patience. It doesn’t matter how you learn.

I’m telling you; try this guy:

I can’t learn from anyone else. I learned from him so well.

I learned by stealing other’s hacks from mpgh and modifying them a bit and rereleasing them :v

Wiremod was the thing that really got me going. I had “dabbled” and done some visual trigger editing in WarCraft 3 but that was really just learning how flow of logic worked. Then when I found Wiremod I started playing around with gates, still flow of logic, but a little closer to programming. Then I took the leap and learned Expression 2, made a few things, and then started trying to make things that pushed the limits of Expression 2.

Which led me to then try and learn Lua. I struggled for a long time learning Lua, I started with weapons, then tried to do some gamemode stuff and failed. It was a lot of looking at other peoples code, learning how it worked, and modifying it, just not always in that order. The summer I got serious with Lua I also took a summer camp-workshop-thing that taught C#. I picked up C# in about a week, having someone to teach you, or atleast answer questions, is incredibly helpful. I took what I learned in C# and brought it over to Lua, but really I just had learned how to be a “Software Engineer” which really helps no matter what language you’re using.

That was over 5 years ago and since then I’ve grown incredibly. I laughed at John Reese’s post about keeping your old code, and he’s right, you should. The code you write when you first learn how to program is going to be incredible garbage, I still have some of mine and it’s a real treat when I look at the code I write now and the god-forsaken-crap I used to write. Code from 6 years ago, code snipped that’s from a few months ago.

TL;DR:

  • Learned flow of logic in WarCraft 3 and Wiremod Gates
  • Expression 2 was the gateway
  • Learned Lua from examples and garrysmod.org
  • Learned Software Engineering at a summer campy thing that taught C#
  • ???
  • Profit

Very similar to me. I started programming with expression 2 in a spacebuild server called, “Jolly and Friends.” I became admin on there after playing for like 300 hrs on just that server. (Nothing compared to you though. Now, I am doing Lua stuff and have about 1760 hrs on GMOD in total.

My first real experience with programming was in highschool - for FRC using LabVIEW, although it’s worth noting that I had a big interest and a bunch of random knowledge in the theoretical aspects of programming long before that. I just read about this stuff without knowing a single language :pudge:

So yeah, I slowly but surely got good with LabVIEW, and at some point also fiddled with wiremod - that’s the classic wiremod, with actual wires and each “chip” having a single operation. Turns out, wiremod works almost exactly the same as LabVIEW. I loved wiremod.

A few years later I started messing with GLua.

My first Lua project was a gamemode… ever since, I’ve just been making gamemodes. (at first the real reason was because I can’t make models or sounds and stuff like that bugged me)

I took Java in highschool and never used it again, then kinda transitioned into doing Garry’s Mod stuff

Of course I’d been into stuff like HTML/CSS before that but people get triggered if you mention HTML when you’re discussing coding :v:

Started with E2 6 years ago, then took all the programming classes available at my high-school, which taught me how to organise my code, and a lot of conventions for proper programming. About a year and a half ago I really started messing with Glua by modifying TTT weapons