This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Th3RadMan's profile picture

How Did You Learn How To Code?

Started by Th3RadMan, 18 August 2013 - 01:09 AM
Th3RadMan #1
Posted 18 August 2013 - 03:09 AM
I know the basics of the basics… and I want to learn.

How did you pros do it?
Sora Firestorm #2
Posted 18 August 2013 - 12:30 PM
In my particular case, I asked my dad about learning how and he proceeded to hand me one of his books. I learned from
1. Reading the book / Searching online
2. Asking my dad questions
3. Hacking on code

A few years later, here I am, with knowledge of 3 languages that I've at least written some sort of code for.

Here's my suggestion for you :
1. Read tutorials, books, and other resources for the language (I'm going to assume it's Lua here)
2. Ask other programmers when you get stuck (but don't ask them without trying to solve the problem first!!)
3. Hack on your own projects and read (and maybe modify, too!) other people's code

Following these guidelines are a rough track on what you should do to learn.
Good luck! :)/>

(Disclaimer : This worked for me, but it may not work as well for you. Your mileage may vary.)
theoriginalbit #3
Posted 18 August 2013 - 12:42 PM
I learnt my programming at the start from a very good friend (at that point my boss at work) and I first learnt Objective-C…

I then progressed through school and learnt a few other basic languages there (however none do I remember today).

I've since either taken it upon myself to learn in my own spare time or via requirement at University for a Bachelor of Science majoring in Professional Software Development, to amount to a massive number of languages that I know or have used (>10 languages)

I definitely agree with these three points
1. Read tutorials, books, and other resources for the language (I'm going to assume it's Lua here)
2. Ask other programmers when you get stuck (but don't ask them without trying to solve the problem first!!)
3. Hack on your own projects and read (and maybe modify, too!) other people's code
— Reading the PIL for Lua is one of the best ways to learn Lua.
— Never be afraid to ask for help, but try to figure it out first, solving problems yourself gives a greater sense of pride and accomplishment in projects (also it can help you avoid the problem next time as you've learnt it better)
— This third one I agree with the most, hacking away at your own programs, and reading/interpreting other peoples code will help most of all!
Tha70neguy #4
Posted 18 August 2013 - 05:16 PM
I have taught myself code on a TI-84 calculator in 7th grade and have been enveloped by it since. Never got into anything big since the calculator is quite limited on Lua, very very basic Lua. You can do a lot with it, but it is very limited.

So about 5-6 years since then, I now understand and can write in C++ and Java but I prefer to script in Lua.

Yes I agree with posts above mine as well, reading books, wikis, other peoples code and interpreting it (Never steal someone elses code) can be very beneficial
brett122798 #5
Posted 18 August 2013 - 06:38 PM
It's not going to be a short process, let me tell you that. But Lua is extremely easy to learn. You can probably start making very basic programs the first day and somewhat understand them. I started programming for real about 1 1/2 years ago and I had gotten pretty far into my Lua knowledge just by searching and asking. However, in May, I was getting sick of the limitations of Lua and moved on to Java development. I bought the book Java For Dummies and learned Java way smoother than tutorials on the internet would have. Learning Java was also smoother because of my knowledge in Lua programming. I transferred almost all my knowledge from Lua into Java. It's pretty much the same thing, just have to get used to the different syntax. After that, I learned the wonders of Object-Oriented Programming and now cannot live without it. :P/>

But do not start with Java, my brain would've fried if I had started at that language. Lua is a very nice language and CC provides a very helpful API to help you code. But after you get most of the things about programming(if statements, functions, variables, etc..), I suggest moving on to a language that has more to offer, and it will be easier with the knowledge you'll previously have had.
ZagKalidor #6
Posted 18 August 2013 - 06:39 PM
first, I'm the most distant away from beeing a pro (as my son thinks) but it worked with me as follows:

best way to learn is by doing. The most important thing you need, is a Task or a Project.
Give yourself a goal that you want to be done and than put yourself onto that way to solve it.
I wished i had internet when i learned BASIC, 25 Years ago. Use the gift, it knows it all.
albrat #7
Posted 18 August 2013 - 07:49 PM
Google is your friend. If you need to do something and have no idea how to do it… Type in your laanguage name, what you want to do. 9/10 times you will get an example that almost does what you want. Try the code examples, change them and modify them to do what you want to do…

Always have a Developers manual for the language you wish to code in… eg Lua - http://www.lua.org/pil/contents.html - This is the online reference manual.

If you are using a custom coding language - eg. ComputerCraft. Then I suggest finding a list of commands and functions that you can use in the program code. (having a list of possible additional commands makes programming in the language easier.) As you use more and more of the available commands you will find that you know what to use more and more as you are writing your programs… By the time you realise it you are writing programs without thinking about how to write them.

(I consider myself a learner, With Lua I have found that you can never be a pro… Because of the way you can expand Lua as you write with lua.)
theoriginalbit #8
Posted 18 August 2013 - 08:06 PM
I transferred almost all my knowledge from Lua into Java.
This can be said of ALL programming languages, once you know and understand the concepts, they can be easily applied to other languages. The main difference between languages is syntax and OO vs. Procedural structure.


With Lua I have found that you can never be a pro… Because of the way you can expand Lua as you write with lua.
Not really true, there is only a finite number of constructs, concepts, and design patterns you can use in Lua. So eventually, once you've learnt them all, can use them well, and have an understanding of what they do and how they do it, you could consider yourself a "pro"…
M4sh3dP0t4t03 #9
Posted 19 August 2013 - 10:40 AM
I learned programming with the tutorials in the Cc wiki and reading the code of some programs in this forum. After I learned C++ with http://www.cprogramming.com/ and Java with thenewbostons tutorials(just search for him on YouTube).

I highly suggest reading either the tutorial in the wiki or one of the tutorials in the tutorial forum and reading the code of other people's programs. If you don't understand something try to look it up in the wiki, the official Lua reference and/or google.
brett122798 #10
Posted 21 August 2013 - 10:12 PM
This can be said of ALL programming languages, once you know and understand the concepts, they can be easily applied to other languages. The main difference between languages is syntax and OO vs. Procedural structure.

Yes, what I meant by "transfer" was using a new syntax, but still performing the same logic.
Dave-ee Jones #11
Posted 22 August 2013 - 03:13 AM
I started learning maybe just over a year ago. The first language I ever learnt was GameMaker language.
I've made some pretty cool games.

I can code in a few languages:

Lua
GameMaker
Batch
Some java

I probably get it from my dad, seeing as he's a very technical guy. He's programmed a few games, and made his own programs and some other things like that.
Me and him now use Codea for iOS. It is probably the most useful application for coding and probably the only decent one that uses Lua.

I also want to get a Raspberry Pi, it's a small computer that you can program to control robots, run OS's and games. You plug it into a monitor with a keyboard and mouse. You should take a look at it if you don't know what it is. It's like $40.
Zudo #12
Posted 22 August 2013 - 03:30 AM
My first program was "Hello World" in scratch when I was 6!
Scratch is fun :)/>
albrat #13
Posted 22 August 2013 - 07:17 AM
My first program was "Hello World" in scratch when I was 6!
Scratch is fun :)/>
My first program was on a ZX Spectrum… (age 5) I had the computer output the factors of 2… 2,4,8,16,32,64,128,256,512…..
I then translated that program to the old BBC computers we had at school. ( and into commodore language for the C64 )
the days of basic … lol. (The memory limits of 64kb too. ) I made a program back then that tried to use a tape to store a entire screen of text… (wrote a story in a game). I ran out of space on the tape before finishing the program and gave up in the end. hehe. (the 5 1/4 inch disks did not help either I filled one trying to convert the game to disk.) ** it was an adventure book where you were hunting ghosts, every choice you made changed the outcome. Opening and closing some options if you took a train or just waited where you were… for example. (for a 8 year old at that time it was a little much to try and achieve. lol )

I never actually made a "Hello World!" program, this is a little strange really as all tutorials start with this. ( java, C, c++ ) Including Lua. lol… http://www.lua.org/pil/1.html ( and the second part of the first tutorial is basically part of my first ever program. lol )
1lann #14
Posted 22 August 2013 - 10:24 AM
I learnt how to code by probably just reading simple explanation of basic functions, then I keep on creating programs that practice the use of them, and once I'm confident I move on. I also frequently make parts of my program, or find out how to make a part of my program by googling, then put it together.
albrat #15
Posted 22 August 2013 - 12:29 PM
I learnt how to code by probably just reading simple explanation of basic functions, then I keep on creating programs that practice the use of them, and once I'm confident I move on. I also frequently make parts of my program, or find out how to make a part of my program by googling, then put it together.
This is basically the approach I took with Lua, plus reading the PiL book.
Lyqyd #16
Posted 22 August 2013 - 07:55 PM
Moved to General.
nutcase84 #17
Posted 22 August 2013 - 08:05 PM
I started… a long long time ago, with my old Apple IIGS. It's awesome for programming with Applesoft Basic. After awhile, I got into new computer stuff, and found Computercraft. I don't remember really how, but whatever. That was over 2 years ago I think. Now I'm here today, having learned Lua, some Python, some HTML, and working on Javascript. I really, really do love coding. :D/>
IHHI #18
Posted 22 August 2013 - 08:52 PM
You can check for simple programs already made, give a try to the prompt Lua and try some API on the wiki. You can also read about general programming for the things that are common in most language. If you have questions, you can pm me and I will do my best to help you.
blipman17 #19
Posted 23 August 2013 - 08:24 AM
one tip i could give you maybe, if you eventually plan to do something largely, put down on paper wat you want.

repeat
splitLargeParts()
until code=="easy to code"
and then build the difficult parts. then you can easy oversee evereything.
ETHANATOR360 #20
Posted 23 August 2013 - 10:13 PM
i started about a year and a half ago when i found computercraft on youtube i then installed the mod and started to code with the help of this great community
billysback #21
Posted 26 August 2013 - 03:15 PM
I started a few years ago… 4 years ago, I think.
I started with VB for the very basic concepts of programming, learning this basically involved sitting there asking my dad how to do everything.
Then I started to take up Java to make plugins for hMod, I learned Java initially by helping others who were just as bad as me, I looked up their questions online and tried to figure it out with them, this way I learned the basics of Java plugin making, though I still didn't really understand Java.
I then moved away from the community and worked by myself, just using Google to make my own games and plugins.
If I ever made anything I was proud of, I would release it, but behind each project I was proud of was 10 that most likely failed miserably. But I learned the most from them.
That's pretty much it, google from then on outwards…
rhyleymaster #22
Posted 30 August 2013 - 04:56 PM
If your asking from like the beggining…

Well I started when I got my first computer, a Commodore 64 (Old school, I know) and I was looking at all the things I could do (mostly really crappy games). I had bought a bunch of books on customizing your PC (hardware, mostly). I toyed around with the little things for months, when my brother came over and dumped a bunch of books off. They were mostly coding books for C-64 Basic. A couple years later, my parents bought me a windows 98 and a copy of Doom and Quake. I began playing the crap outta the games, then i decided I was going to modify the games. I realized that you could change most of the programming in games and add your own content. The years went by, I began to learn C++ and BOO, about 2009, I started making a game in Gamemaker, which was originally supposed to be a competitive MMOFPS as a clone of Quake 3, which used the U3D extension for Full 3D compatibility. 2010 rolled along and I found a game callled Garry's mod. I read that the game allowed players to make addons using Lua and source SDK. I began to learn Lua so I could create awesome DarkRP servers and Clockwork HL2RP servers (Which I still do). And then I got hired by HellZone RP to help code there HL2RP. Time kept going and a few months later, I found Computer Craft, when i started trying at Lua A LOT more then I had previously. And here I am now. I dont claim to be a pro either, considering I haven't done much lua for a while now (+ my major disappearance from the fourms). I was actually during my time of offline for about a year, was busy with post-secondary schooling, and work etc.

Also, nobody is a pro at coding. The learning never stops. You will never know everything about Lua!
ETHANATOR360 #23
Posted 30 August 2013 - 11:27 PM
How do I learn how to code? Because I am always searching for some Coding Languages like Assembly, C, C++, Python, Ruby, Pascal, Lua.

When I do start?:
I started programming since I was 8 years old, My First Programming Language that I used is Visual Basics 2008
I started my VB OS called Atom OS. Basic is the awesome programming language for Beginners. When I was 11
I saw ComputerCraft I am just typing Computers for Minecraft then I saw Computercraft.. Then I am studying all Programming Languages besides VB. now when I am 12 years old. I have created Armian OS version 5.4 (old version of Armian OS) then I downloaded the CCEmu.
now I am creating Programs for Armian OS, And I am creating an OS for Computercraft was called by Armian OS Lua Edition version 7.1
Canonical and Armian was been joined together to make new Softwares :D/>

Canonical.inc is the creator of Ubuntu

Ian Sapelino is the creator of Armian OS

I am just studying by myself though. I am only a 12 years old kid :D/> but I know programming since I was 8 years old..
God gave me the gift of knowledge so Pray Always and maybe someday you will have the gift like me :D/>

I created Armian OS it was a linux distro you can download it in:
http://www.armianos.webs.com/

God Bless..
basic is fun to use for beginners but it can form some bad habits like spaghetti code with GOTO and GOSUB
BigTwisty #24
Posted 31 August 2013 - 04:01 AM
My uncle bought me a copy of Turbo C++ for my 10th birthday. I spent my evenings tearing apart the example code and reading the docs. Of course this was on my old 8086 with a monochrome monitor!
ETHANATOR360 #25
Posted 31 August 2013 - 12:15 PM
the best way to learn: code,ask questions, read books and other info and you will be good no time
WhiteFusion #26
Posted 01 September 2013 - 05:53 AM
With Lua, I've just look at some code and try to get a sense of what's it doing. Sometimes I consult Google or just fiddle with it until I figure it out.
Here I am with some knowledge of Lua and currently working on my project to make a client/server program.
Mitchfizz05 #27
Posted 02 September 2013 - 12:40 PM
I wanted to make a game when I was about 10 or 11 (I'm 13 now), so I Googled around for a game maker. I found myself on a cartoon network Ben 10 game creator, a bit like this. I eventually wanted to expand and looked for a better one, and found Sploder, which I loved! Then I wanted to make my game into an EXE like other games did, then I found myself with Visual Basic, then HTML, then a bit of Java, then advanced HTML and CSS, then LUA and finally PHP.
That's my story.

I improved on my skills by reading online and a few books (there wasn't many programming books at my local library).
Mitchfizz05 #28
Posted 02 September 2013 - 12:43 PM
I started learning maybe just over a year ago. The first language I ever learnt was GameMaker language.
I've made some pretty cool games.

I can code in a few languages:

Lua
GameMaker
Batch
Some java

I probably get it from my dad, seeing as he's a very technical guy. He's programmed a few games, and made his own programs and some other things like that.
Me and him now use Codea for iOS. It is probably the most useful application for coding and probably the only decent one that uses Lua.

I also want to get a Raspberry Pi, it's a small computer that you can program to control robots, run OS's and games. You plug it into a monitor with a keyboard and mouse. You should take a look at it if you don't know what it is. It's like $40.
I bet it would be cool coding with your dad. My dad is interesting in surviving in the wilderness and lighting fires with sticks - he's still pretty cool though. :)/>

Edit: Opps, sorry, probably should've used edit shouldn't of I. Sorry. :(/>
KillaVanilla #29
Posted 02 September 2013 - 04:30 PM
I first learned programming by reading (and coding) through the first C++ tutorial I found, which was on cplusplus.com. This was about 5 years ago. I kinda "floated" between programming languages for the next few years or so, then I found ComputerCraft. I started reading through the wiki, reading some programs, and writing a few programs myself. My knowledge of C++ helped a lot in this aspect. Fast-forward a couple of months and here I am!
Buho #30
Posted 09 September 2013 - 09:18 AM
My first language was a very simple language that you could do fun things with. In my case, BASIC, but Lua on ComputerCraft is even better, I think.

In college I learned 20+ languages, most of them obsolete, which taught me how to pick up new languages.
  • Look at examples.
  • Read docs.
  • Read tutorials.
  • Have a friend who knows more than you (or if a flesh-and-blood programmer friend isn't available, get friendly on a forum).
  • Challenge yourself.
  • Have fun.
Lua on ComputerCraft is a great way to learn the basics of programming because it's fun.
Zee #31
Posted 16 September 2013 - 02:09 PM
I started a while ago with Logo (when I was like 7). When I was ~8 I tried to learn VB, but I never *really* understood it. In 2012 I learned a little Python. In January of this year (2013 for time travelers) I started programming in ComputerCraft. I now use LÖVE and Garry's Mod Lua in addition to ComputerCraft. I'm also trying to learn Java. At some point I learnt a bit of C++.
Alice #32
Posted 18 September 2013 - 08:33 PM
Roblox. I could breathe code on there XD
Kezaraux #33
Posted 21 September 2013 - 10:51 AM
I started teaching myself a little bit a few years ago when I played a game called Roblox and they used LUA scripts in their game. Then I took an Introduction to Computer science class at my high school and there I learned Python which I could easily translate those skills into LUA. That's how I learned. Still really horrible though.
Th3RadMan #34
Posted 30 September 2013 - 04:58 PM
wooo, just checked back with a ton of answers. thanks for all the ideas, i have read a bit although it is a lot easier i bet having someone personally help you… to bad my contractor dad doesnt even know how to download apps on his smartphone (and he gets mad if i say i'll teach him how to instead of me doing it all…)

but i'm just going to keep learning by asking questions, plus i think i'm going to most likely take a class or 2 in college in just over a year 0.0 college… sounds scary hahaha