Jump to content




How Did You Learn How To Code?



33 replies to this topic

#1 Th3RadMan

  • Members
  • 28 posts

Posted 18 August 2013 - 02:09 AM

I know the basics of the basics... and I want to learn.

How did you pros do it?

#2 Sora Firestorm

  • Members
  • 89 posts

Posted 18 August 2013 - 11:30 AM

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.)

#3 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 18 August 2013 - 11:42 AM

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

View PostSora the Hedgehog, on 18 August 2013 - 11:30 AM, said:

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!

#4 Tha70neguy

  • Members
  • 3 posts

Posted 18 August 2013 - 04: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

#5 brett122798

  • Members
  • 298 posts
  • LocationIn the TARDIS at an unknown place in time.

Posted 18 August 2013 - 05: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.

#6 ZagKalidor

  • Members
  • 111 posts

Posted 18 August 2013 - 05: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.

#7 albrat

  • Members
  • 162 posts
  • LocationA Chair

Posted 18 August 2013 - 06: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.)

#8 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 18 August 2013 - 07:06 PM

View Postbrett122798, on 18 August 2013 - 05:38 PM, said:

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.


View Postalbrat, on 18 August 2013 - 06:49 PM, said:

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"...

#9 M4sh3dP0t4t03

  • Members
  • 255 posts
  • LocationGermany

Posted 19 August 2013 - 09: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.

#10 brett122798

  • Members
  • 298 posts
  • LocationIn the TARDIS at an unknown place in time.

Posted 21 August 2013 - 09:12 PM

View Posttheoriginalbit, on 18 August 2013 - 07:06 PM, said:

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.

#11 Dave-ee Jones

  • Members
  • 456 posts
  • LocationVan Diemen's Land

Posted 22 August 2013 - 02: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.

#12 Zudo

  • Members
  • 800 posts
  • LocationUK

Posted 22 August 2013 - 02:30 AM

My first program was "Hello World" in scratch when I was 6!
Scratch is fun :)

#13 albrat

  • Members
  • 162 posts
  • LocationA Chair

Posted 22 August 2013 - 06:17 AM

View PostZudoHackz, on 22 August 2013 - 02:30 AM, said:

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 )

#14 1lann

  • Members
  • 516 posts
  • LocationAustralia

Posted 22 August 2013 - 09: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.

#15 albrat

  • Members
  • 162 posts
  • LocationA Chair

Posted 22 August 2013 - 11:29 AM

View Post1lann, on 22 August 2013 - 09:24 AM, said:

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.

#16 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,464 posts

Posted 22 August 2013 - 06:55 PM

Moved to General.

#17 nutcase84

  • Members
  • 711 posts
  • LocationIn My Lonely Little Computer Corner

Posted 22 August 2013 - 07: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

#18 IHHI

  • Members
  • 9 posts

Posted 22 August 2013 - 07: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.

#19 blipman17

  • Members
  • 92 posts

Posted 23 August 2013 - 07: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.

#20 ETHANATOR360

  • Members
  • 423 posts
  • Locationyour hardrive

Posted 23 August 2013 - 09: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





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users