Thread: Learning Coding

Page 1 of 4
1
2
3
... LastLast
  1. #1
    Elemental Lord Duronos's Avatar
    10+ Year Old Account
    Join Date
    May 2009
    Location
    In the jungle
    Posts
    8,257

    Learning Coding

    I want to start teaching myself how to code but my question is where to start? Which language is good to start on because I need that initial stepping stone so I can move forward.

    Well actually I think I've sort of figured it out, Java sounds like a good place to start.
    Last edited by Duronos; 2013-12-22 at 07:07 AM.
    Hey everyone

  2. #2
    Moderator chazus's Avatar
    10+ Year Old Account
    Join Date
    Nov 2011
    Location
    Las Vegas
    Posts
    17,222
    I hear a lot of people starting with Ruby or Python. Python is often a starter for a lot of people. The only reason I wouldn't recommend Java is that A) It's primarily a web design language, and learning other languages first (Python, C, Ruby) give you a better "understanding of code", and B) If you want to learn Java, you're probably also going to want to learn HTML and CSS to make it useful.

    There are a ton of "which should I start first" guides, and it may well depend on your level of understanding, as well as what you want to do. Website design? Mobile apps? iOS development? High level animation/design?
    Gaming: Dual Intel Pentium III Coppermine @ 1400mhz + Blue Orb | Asus CUV266-D | GeForce 2 Ti + ZF700-Cu | 1024mb Crucial PC-133 | Whistler Build 2267
    Media: Dual Intel Drake Xeon @ 600mhz | Intel Marlinspike MS440GX | Matrox G440 | 1024mb Crucial PC-133 @ 166mhz | Windows 2000 Pro

    IT'S ALWAYS BEEN WANKERSHIM | Did you mean: Fhqwhgads
    "Three days on a tree. Hardly enough time for a prelude. When it came to visiting agony, the Romans were hobbyists." -Mab

  3. #3
    Elemental Lord Duronos's Avatar
    10+ Year Old Account
    Join Date
    May 2009
    Location
    In the jungle
    Posts
    8,257
    Quote Originally Posted by chazus View Post
    I hear a lot of people starting with Ruby or Python. Python is often a starter for a lot of people. The only reason I wouldn't recommend Java is that A) It's primarily a web design language, and learning other languages first (Python, C, Ruby) give you a better "understanding of code", and B) If you want to learn Java, you're probably also going to want to learn HTML and CSS to make it useful.

    There are a ton of "which should I start first" guides, and it may well depend on your level of understanding, as well as what you want to do. Website design? Mobile apps? iOS development? High level animation/design?
    Preferably something that could be made into a little video game over time, I'd assume that's high level animation stuff. I plan to make a video game one day or to work on one I guess.
    Hey everyone

  4. #4
    Quote Originally Posted by chazus View Post
    I hear a lot of people starting with Ruby or Python. Python is often a starter for a lot of people. The only reason I wouldn't recommend Java is that A) It's primarily a web design language, and learning other languages first (Python, C, Ruby) give you a better "understanding of code", and B) If you want to learn Java, you're probably also going to want to learn HTML and CSS to make it useful.

    There are a ton of "which should I start first" guides, and it may well depend on your level of understanding, as well as what you want to do. Website design? Mobile apps? iOS development? High level animation/design?
    Java =/= Javascript

  5. #5
    Deleted
    I confirm Python is one of the easiest to that with, so you can totaly start with it. Once you got the basics (function, if/then/else, loop etc), you could then try either Java or C. Both will allow you to do big, fast, graphical app or games; Java is easier but C is best to really understand how computers are working. For example C will requiere you to learn how memory is organised while Java will do 90% of the job for you.

    As for games dev, Python is more for small stuff (minesweeper ^^) as it is quite slow. But once again it's perfect to start with and have fun.
    With Java you can do stuff like iOS/Android games.
    All the big games on PC and consoles are written in C/C++
    Last edited by mmoc130c3465fa; 2013-12-22 at 08:45 AM.

  6. #6
    Deleted
    Quote Originally Posted by Duronos View Post
    Preferably something that could be made into a little video game over time, I'd assume that's high level animation stuff. I plan to make a video game one day or to work on one I guess.
    A game can be made in pretty much every single language. It depends what kind of game you want to make. Javascript is a simple language in which you can easily make small browser games. But if you want to work on, like, the Witcher 3 or Assassin's Creed, those games are primarily made with low-level languages like C, C++.

    Java is a only a good pick for mobile games. For PC games it's pretty bad-ish.

    Many people recommend Python and other high-level languages as starters. I think it depends on how much in-depth knowledge you want to get eventually. If you want to become a programmer, I'd start with C, and work your way upwards. That will give a really good understand on how computers work, and what really happens when your code is executed, in other languages too. But if you want to just code some stuff in your offtime, then Python or Javascript is a good bet.

  7. #7
    Stood in the Fire Vouksh89's Avatar
    10+ Year Old Account
    Join Date
    Aug 2011
    Location
    Ohio
    Posts
    437
    Personally, I love C#. It's honestly a great language to start out on. TONS of tutorials, the MSDN is a great reference with tons of examples straight from the people that created the language and the framework.

    And it's steadily becoming more and more cross-platform due to the work of the Mono/Xamarin team (.NET libraries for Linux, MacOSX, iOS, and Android). And it's usable for anything that doesn't require extremely precise timing (i.e. low-level drivers/kernels/etc) and even at that, processing power is overcoming even that obstacle.

    Oh, and as for Java, I think you're thinking about JavaScript, which the only thing that Java and JavaScript have in common is name and the fact that they follow a C-style syntax. Java is, in essence, in the same "market" as C#. The biggest problem is that it tends to be rather insecure, and (still) has memory bloat issues.

    A good website to help you get started is CodeProject. They (in my opinion) have the best selection of articles on anything .NET related (such as C#, Visual-C++, and VB.NET).

    As for python/ruby... They have a much smaller range of usage. Sure, you can "do anything" with them, but you have to jump through 20 hoops covered in fire, land on a finger, and tame a lion before you can get them to do certain things that compiled languages can do out of the box.

    Not saying they're bad; they certainly have their place. But a more generalised language is best to start out with before starting in on a specialised one.

  8. #8
    Elemental Lord Duronos's Avatar
    10+ Year Old Account
    Join Date
    May 2009
    Location
    In the jungle
    Posts
    8,257
    Quote Originally Posted by ralh View Post
    A game can be made in pretty much every single language. It depends what kind of game you want to make. Javascript is a simple language in which you can easily make small browser games. But if you want to work on, like, the Witcher 3 or Assassin's Creed, those games are primarily made with low-level languages like C, C++.

    Java is a only a good pick for mobile games. For PC games it's pretty bad-ish.

    Many people recommend Python and other high-level languages as starters. I think it depends on how much in-depth knowledge you want to get eventually. If you want to become a programmer, I'd start with C, and work your way upwards. That will give a really good understand on how computers work, and what really happens when your code is executed, in other languages too. But if you want to just code some stuff in your offtime, then Python or Javascript is a good bet.
    Well you see that's the thing, I want to know everything down to the most basic form and I've heard from others that C is huge for gaming but wasn't fully sure. I want to become a programmer in the future and from what you're saying C is the place to start no matter how hard it is.
    Hey everyone

  9. #9
    codecademy.com - give it a try!
    "Do you have a PUT HANDS ON PEOPLE spec?" - Danny

  10. #10
    Epic! videotape's Avatar
    10+ Year Old Account
    Join Date
    Aug 2009
    Location
    San Francisco, CA
    Posts
    1,625
    Also casting a vote for Python, but you should as early as possible start learning additional languages. Not because Python is bad, but because knowing only one language for too long is bad.

    If you're serious about game development, C++ is still the language real developers use in the majority of cases.

  11. #11
    Deleted
    Quote Originally Posted by Duronos View Post
    Well you see that's the thing, I want to know everything down to the most basic form and I've heard from others that C is huge for gaming but wasn't fully sure. I want to become a programmer in the future and from what you're saying C is the place to start no matter how hard it is.
    Pretty much all AAA game development is done in C++. C is a good starting point though. I would actually try assembly at some point, but that's cos I'm crazy like that and actually like assembly.

    Python has the additional downside that... It's not really used much. Anywhere. It's a cool language to solve simple problems, and fast to learn, but it's not very popular for true applications.

  12. #12
    Epic! videotape's Avatar
    10+ Year Old Account
    Join Date
    Aug 2009
    Location
    San Francisco, CA
    Posts
    1,625
    Python is used all over the place. Including high-end production environments. In the game world you will find it used frequently for tooling, but not much else.

    It's still a fantastic language to start off with.

  13. #13
    Bloodsail Admiral spaace's Avatar
    15+ Year Old Account
    Join Date
    Jan 2009
    Location
    Ontario, Canada
    Posts
    1,150
    Quote Originally Posted by Priestion View Post
    codecademy.com - give it a try!
    thanks for this

  14. #14
    Quote Originally Posted by Duronos View Post
    Well you see that's the thing, I want to know everything down to the most basic form and I've heard from others that C is huge for gaming but wasn't fully sure. I want to become a programmer in the future and from what you're saying C is the place to start no matter how hard it is.
    If you want to learn the most basic form of programming, C is definitely the way to go, as long as you follow it up with C++, as most programming projects are object-oriented, and doing OO without built-in classes is painful at best*. Of course, you could start all the way at the bottom with Assembly and work up from there (fun fact, Roller Coaster Tycoon 1 was written purely in assembly), but that generally isn't recommended.

    Also, C will seem hard when you compare it to high-level languages, because C was invented to be a low-level systems programming language for the Unix OS. But once you can program fluently in C/C++, you'll have a much better time understanding other programming languages (except Functional ones, those are completely different style entirely), because in general, they all took something from C/C++, be it syntax or some other feature.

    * - Don't get me wrong, assembly is fun to learn because you're programming directly on the processor, and you can do a lot of cool stuff with it, but don't start off on it.

  15. #15
    Quote Originally Posted by ralh View Post
    I would actually try assembly at some point, but that's cos I'm crazy like that and actually like assembly
    A buddy of mine at uni spent 2 months writing a program in assembly. What did this program do exactly? Opened a window in windows He was counting cpu cycles or something to make it as efficient as possible and the response from the forum he was part of was "that is like standing on a piece of a4 paper and saying "hey, I am closer to the moon"".

    Sounds like good fun but you have to know everything and takes ages. I think one of the earlier terminator games from Bethesda was coded in assembly, crazy bastards - but it can be done heh.

  16. #16
    Deleted
    Quote Originally Posted by Duronos View Post
    Preferably something that could be made into a little video game over time, I'd assume that's high level animation stuff. I plan to make a video game one day or to work on one I guess.
    I'd suggest picking a game engine (Unity, Unreal SDK, etc..) and going from there instead of learning a language from scratch to create a game and/or your own game engine to produce multiple games. It will take you a long time to create a solid, functional game engine. Perhaps years for someone starting with no language experience. This isn't to deter you, but if your objective is to merely create a game, it seems your best option is to use a preexisting engine and use their tools and scripting language.

    I started with VB years back as it is a very easy language to learn, but I'm no longer pursuing coding so other options today may be much better. My understanding Java is a decent place to start, as others have recommend) as it's universally excepted - cross platform.

  17. #17
    Deleted
    I suggest you c# it's easy and powerful to start with.
    You can also try codeacademy but you will learn Php Html Javascript jQuery.
    Last edited by mmocbc17c7d19e; 2013-12-22 at 11:12 AM.

  18. #18
    Deleted
    Everyone will suggest something different because there are so many developer camps. Be it the python, java or .net guys and gals. Choose whatever appeals to you the most. Each language has its drawbacks and advantages. As for java: not a bad idea. It's very general purpose (web, desktop,game, cross platform Dev) , easy and fast. So a good place to start. It often gets critized for being verbose but that's probably a good thing when starting out. (It's definitely not verbose compared to older langs like c)

  19. #19
    Ultimately, the language you pick does not matter.
    But it will have some serious implications on how you get there.

    Python
    Pros: Very straightforward to learn, clean structure. Fantastic 3rd party support.
    Cons: It's a high level scripted language; don't expect bleeding edge performance.

    Python is a great place to begin. It will offer a sandbox where you can easily master the concepts of variables, arrays, conditionals and loops, functions, classes and all the basics. The interactive mode makes debugging very trivial. The language is generally considered the de-facto training language; it replaced Java at my university. And it's powerful enough to do almost anything. Anything you master in Python is transferrable to any other C-like language.

    Python has some of the best library support out there. There is a library for anything; from game development to advanced sound processing. The hard part is finding which library you want, the sheer range of options is sometimes a bit daunting.

    At the end of the day, it is a high level scripting language. Usually this doesn't matter too much, but at the end of the day every instruction matters if you want bleeding edge performance. This is why C/C++ is still the major game development language. Still, you can get very far with Python, and it's not wasted effort to go there. Quite often you will find AI and tools to be written in high level programming languages like Python, while the main game engine is written in C/C++.

    Learning difficulty: Low(est)
    Setup difficulty: Medium. Need an interpreter.

    Javascript
    Pros: Very slick language.
    Cons: Javascript's browser integration makes grown men cry.

    Let me state the improbable first. Javascript is my ideal programming language. The syntax is c-like, yet it contains all the powerful features you ever wanted. Javascript is a fantastic language, and it runs really fast in all browsers. Unlike Python, you don't need that interpreter to run your game; you have the browser to do this. This means developing javascript programs is incredibly easy. The only setup you need is a very simple web page.

    At least that's the theory. In practice you will be limited to operating in your browser. I don't mind browser games, and the stuff you can do in javascript far exceeds what you can do in adobe flash. But sometimes you want a standalone app, and javascript can't really offer it. Also, each browser is slightly different. And that means your game is slightly different for every browser. You'd imagine this would be a solved problem in 2013, but not so. You still need to relate to the Browser "Document Object Model (DOM)". And that part of javascript sucks donkey, being designed by the same people who thought a TV remote should have 120 buttons and use 14 different standards.

    Learning difficulty: Low, medium for the DOM
    Setup Difficulty: Negligible if you know some HTML, far steeper if you don't.

    C / C++
    Pros: SPEED!
    Cons: With great power comes great responsibility

    If you want total control of your computer, you need to learn assembly. In theory, assembly allows you the maximum performance possible, as you can optimize anything. However, learning assembly is a pain in the ass, and it is such a low level programming language that it's hard to actually do anything; even the simplest operation can take a day to program. Also, compilers are so good today that assembly programming is usually just wasted time. Your compiler can always outdo a human when it comes to writing optimal code.

    This is where C comes in. You write program code that the compiler can easily translate into machine code, almost in a 1:1 fashion, with little to no middle layers. And since C is a higher-than-assembly level language, you can easily do a days worth of assembly code in 5-10 lines of C code. Learning assembly is a great skill to have. But I wouldn't want to code in it. That's why I code in C.

    C is IMO the ultimate programming language. With C you not only have to decide what you want to do; you also have to decide how it is done. If you pick the right "howto", you get code that translates into the fastest machine code equivalent, and that means the fastest possible game. But if you pick a poor algorithm, operation or scheme to do things, you will run slower. C gives you the power to do exactly what you want. If you wanted the power to shoot yourself in the foot; C will happily oblige. To master C, you need to not only consider what you want to do, but also how you want to do it. This is true for most languages, but C in particular. Writing code in C takes a little longer for a beginner as a result.

    C doesn't do anything for you automatically. Higher level code like Python f.ex does garbage collection; whenever you stop using some memory it will be reclaimed and can be reused. In C... that memory is just lost (a memory leak). You need to actively consider when memory is done being used, and actively free it. That's an additional burden on the programmer. But since you can explicitly control where memory is allocated and freed, you can ensure that no unnecessary garbage collection takes place. As a result, C programs just won't have lagspikes where garbage collection occurs as a result. There is never any hidden side effects!

    The biggest problem of C is that the libraries out there are kinda messy. The standard C library sucks, and is widely considered to be misdesigned on many levels.

    C++ seeks to redeem the issues of C. And it is widely considered to have worsened the deal. Mainly it adds additional functionality to C - things like classes, exceptions and inheritance. This makes it easier to do higher level stuff, and it also means more things happen automatically for you, so that you don't have to consider them when coding. However; that directly contradicts the main benefit of C - no hidden side effects. Where in C it is easy to shoot yourself in the foot, C++ offers you easy limb-amputation functionality. It's easy to find an error in C code. It can be a royal PITA to find an error in C++ code. C++ also has some really awkward syntax. I like C. C++ is great if you avoid the murkier parts of it, but I wouldn't want to start there.

    Learning difficulty C: Medium
    Learning difficulty C++: Medium, if you have mastered C. Otherwise hard.
    Setup difficulty: Medium. Need to care about compilers and stuff.

    --

    To the OP: I recommend starting with a simple tutorial in pyhton. Learn what a variable is. Learn what an array is. Learn what an if statement is. Learn what a for and while loop is. Learn what a function is. Learn what a class and object is. Make a very small text based adventure game or something.
    "You are in a room with low light. Go north or west?"

    Then make yourself a pong game in python. It's a great learning experience.

    Once you have that down, try out C. Do the same.
    Non-discipline 2006-2019, not supporting the company any longer. Also: fails.
    MMO Champion Mafia Games - The outlet for Chronic Backstabbing Disorder. [ Join the Fun | Countdown | Rolecard Builder MkII ]

  20. #20
    The Lightbringer Twoddle's Avatar
    10+ Year Old Account
    Join Date
    Feb 2011
    Location
    UK
    Posts
    3,775
    Quote Originally Posted by Danner View Post
    Your compiler can always outdo a human when it comes to writing optimal code.
    This is most definitely not true at all! Assembly language was my language of choice on my previous platform and you can make all sorts of optimizations that a compiler would not make. Just as one single example, when making system calls, a compiler will preserve everything on the stack but when writing hand written optimized code there's no need for this at all, you save on the stack what is needed and nothing more.

    Also if you're writing say a chess engine, a hand written move generator will beat the pants off a compiled one for speed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •