Jump to content


Best Starting Language


34 replies to this topic

#1 Subzidion

    New Member

  • Members
  • Pip
  • 1 posts

Posted 09 October 2009 - 02:15 AM

Hello, I'm very interested in Coding. What easy language can I learn that can help me learn the general overview of how coding works?

Thanks for the Help!

- Subzidion.

#2 alphadog

    DevMaster Staff

  • Moderators
  • 1643 posts

Posted 09 October 2009 - 02:38 AM

Python or C#. Pick your poison. Both are present in the game dev industry, but more accessible than C++. Plenty of resources, tutorials, IDEs, etc.

If you want to be a general dev, I'd suggest C#. But, if you want to actually become a game dev, you'll have to pick up one of those two, then C++, and circle back to the third over your next years. Then, fit in C, then assembly, time permitting (which it never does!).
Hyperbole is, like, the absolute best, most wonderful thing ever! However, you'd be an idiot to not think dogmatism is always bad.

#3 fireside

    Senior Member

  • Members
  • PipPipPipPip
  • 1271 posts

Posted 09 October 2009 - 03:00 AM

I used to recommend python, but I just downloaded c# express with XNA and I think it's a great way to get going with game development. You can do both 2d and 3d games with it. There are quite a few tutorials around. A large number of computers already have .net installed, and you can compile your game for the xbox and put it on Microsoft's network even possibly selling it if you make something worthy.

I think the only downside is that it's all Microsoft, so not really cross platform.

Quote

then assembly, time permitting (which it never does!).

Is anyone still using assembly?
Currently using Blender 2.5, FlashPunk, and Unity.

#4 SyntaxError

    Valued Member

  • Members
  • PipPipPip
  • 139 posts

Posted 09 October 2009 - 04:19 AM

Subzidion said:

Hello, I'm very interested in Coding. What easy language can I learn that can help me learn the general overview of how coding works?

Thanks for the Help!

- Subzidion.

I guess it depends on how seriously you want to get into it. If you want to be a professional programmer I think C is a good place to start. It's not as hard as C++ but by learning it forces you to learn a bit more about the underlying architecture of computers in general. Also everything you learn in C you can apply to C++ when you want to get more advanced. C is really a subset of C++. In fact C++ was built on existing C and the first C++ compilers were C pre-processors.

This question gets asked a lot and as you can see there are (at least) two schools of thought.

#5 SyntaxError

    Valued Member

  • Members
  • PipPipPip
  • 139 posts

Posted 09 October 2009 - 04:21 AM

fireside said:

Is anyone still using assembly?

It still comes in handy from time to time for optimizing small pieces of code. I seriously doubt you will find people writing whole applications in it.

#6 starstutter

    Senior Member

  • Members
  • PipPipPipPip
  • 1039 posts

Posted 09 October 2009 - 04:25 AM

fireside said:

Is anyone still using assembly?
Its good to be able to read (or write) assembly for shader optimization.
(\__/)
(='.'=)
This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
bunny also wants to fight spam: Click Here Bots!

#7 fireside

    Senior Member

  • Members
  • PipPipPipPip
  • 1271 posts

Posted 09 October 2009 - 05:32 AM

Quote

If you want to be a professional programmer I think C is a good place to start.

Well, I think there are a large number of professional programmers that don't know c, or at least aren't using it on their jobs. Even if you add professional "game" programmer it wouldn't totally apply since there are a lot of professional programmers writing AS3/Flash games right now. I think it depends on the college on how you get started. I know the programming college near where I live starts python as the beginning language. Since this is a game site, he was probably referring to game programming so c or c++ is going to be necessary eventually. It might be just as good to start with c. I don't know really. If it's someone young and impatient to start writing games, I think c# would be better to start. The one thing I've noticed about people who start with c is they never use much other than that except c++, which may be good or bad, depending. Notice the question though. "What easy language can I learn..." I think c doesn't really qualify.
Just for myself though, I have to say I got started on easier languages and I still hate c++ and I wouldn't even consider using c. But I know this other guy that used to use c++ all the time and then started using python and he can't stand c++ anymore either. I think it's a personality thing.
Currently using Blender 2.5, FlashPunk, and Unity.

#8 Sol_HSA

    Senior Member

  • Members
  • PipPipPipPip
  • 482 posts
  • LocationNowhere whenever

Posted 09 October 2009 - 07:48 AM

Assembly is good to know just to understand what, deep down, the computer is doing. Even if you rarely, if ever, actually write any assembly.

Knowing some dialect of c-ish is pretty much essential (c, c++, c#, obj-c, activescript, java, ecmascript.. heck - php, angelscript, quakec..). Knowing the base c syntax lets you relatively easily to hop between the languages.

Knowing one language very well is also useful, and c is one that "can" be understood. c# probably lets you play with fun things faster, though. Doesn't mean you don't need to learn the "difficult" stuff eventually, if you're serious about it.
http://iki.fi/sol - my schtuphh

#9 v71

    Valued Member

  • Members
  • PipPipPip
  • 289 posts

Posted 09 October 2009 - 11:01 AM

I stopped writing in assembly in 1994 and i never felt the need to use it again
i agree with the one who said that this gives you deepest understanding but i would never program again in assembler

#10 alphadog

    DevMaster Staff

  • Moderators
  • 1643 posts

Posted 09 October 2009 - 11:29 AM

fireside said:

Is anyone still using assembly?

Yes. But, I meant eventually getting to it, not starting with it.

As for C, it's pretty much like assembly. It's a good, low-level way to see how code works, but this is really for the "master crafstman" coder. You should otherwise start with a language that has an approachable syntax and a big community.

I'm really starting to think C# is the best general-use language going right now for all the reasons fireside stated. Python is likewise great for very similar reasons, but for game devs it's limited circulation is the only hit relative to c#.
Hyperbole is, like, the absolute best, most wonderful thing ever! However, you'd be an idiot to not think dogmatism is always bad.

#11 poita

    Senior Member

  • Members
  • PipPipPipPip
  • 322 posts

Posted 09 October 2009 - 01:00 PM

I would recommend against heavy OOP languages like Java and C# as a first language. I think it's absurd that your first program (Hello, World) should involve a static class, a static method, and object method calls.

I have noticed that people that do start with these languages have a very odd perception of what an object is, and I think it's because of the way they are introduced to them. In C/C++ an object is something you use to chunk together related information and that's how it is introduced, whereas in C# or Java it would seem that a class is just something that you have to wrap around your program to get it to work :P

I would recommend Python or C. C may be low level, but it is simple.

#12 SyntaxError

    Valued Member

  • Members
  • PipPipPip
  • 139 posts

Posted 09 October 2009 - 01:03 PM

fireside said:

Well, I think there are a large number of professional programmers that don't know c, or at least aren't using it on their jobs.

That may be. On the other hand most people with a CS degree probably have been taught to program in old style compiled languages at some point. If you want to be an all around programmer it should be in your skill set.

Here's where I'm coming from. I worked in as a programmer at a large semi-conductor manufacture for years writing CAD tools. These tools had to be compiled as they were CPU intensive. Some jobs ran for days. We used to hire a lot PhDs mostly for their math and science skills as opposed to their programming skills. On numerous occasions I was called in to help debug code that had memory errors and leaks. These were mostly due to the fact that some of these guys really never really got much experience dealing with memory management. A lot of them had started in Java only had a cursory understanding of C or C++ because they had simply learned it to pass a class. It's a lot harder to find a memory issue later then to code correctly up front. It often took me days to find bugs in programs that were hundreds of thousands so lines long. Most of this effort could have been avoided if the coder had been reasonably careful in the first place. In addition I'm sure there are plenty of jobs where you can't just call in the memory debugger guy to fix your problems.

I don't really want to get in a huge argument over it. I just want to throw my view out there with the rest. If the OP decides C#, Python or Java is the way it isn't going to bother me. Every person and situation is different. I'm just speaking generally from my point of view.

#13 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2327 posts

Posted 09 October 2009 - 01:14 PM

I code using c, I use c++ files but thats mostly because i like the small syntax improvements it gives you, not really for all the classes and oo support. But if I really had to I could use a c++ interface, id just have to ponder over it a little longer before I got started. I do code for code reuse and extendability, Im of the opinion you dont need it all handcrafted for you in c++ to get those 2 qualities.

Things get tricky when im allocating large amounts of memory (for doing things like radiosity rendering, spew...), but wouldnt it be equally difficult in any language? Waiting for allocation times is the biggest problem, and in straight c it would be the quickest wouldnt it?
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#14 alphadog

    DevMaster Staff

  • Moderators
  • 1643 posts

Posted 09 October 2009 - 01:45 PM

First, I'll say that I don't think that devs, and more specifically game devs, shouldn't learn C, I just think people shouldn't learn C first these days.

poita said:

I think it's absurd that your first program (Hello, World) should involve a static class, a static method, and object method calls.

But, you have no problem with includes, function calls, etc? Isn't that overly selective?

I'm sorry, but that's a silly way to argue for a low-level language over C#/Python. The typical "Hello World" example is usually a couple of lines in any language. However, it doesn't serve to illustrate the overall TCO, if you will, of learning a whole language, its available concepts and techniques.

Simplest workable "Hello, World" in Python:
#!/usr/bin/python
print "Hello World!";

In C#:
using System;
public class Hello
{
   public static void Main()
   {
      System.Console.WriteLine("Hello, World!");
   }
}

in C++:
#include <iostream.h>

int main()
{
cout<<"Hello World"<<endl;
return 0;
}

in C:
#include <stdio.h>
int main(void)
{
    printf("Hello World!\n");
    return 0;
}

Looks like Python wins in terms of simplicity!

In any language, much like in C, you'd slowly introduce structures, functions/methods and more complex ideas like algorithms and best-practices on structuring code. In the long-run, there's some stuff in higher languages you don't worry about that you still have to teach in C. Thus, you get more productive faster with C# or Python.

SyntaxError said:

These were mostly due to the fact that some of these guys really never really got much experience dealing with memory management. A lot of them had started in Java only had a cursory understanding of C or C++

OTOH, you hire the C student who can't conceptualize the larger picture because they spent too much time learning how to get their pointer pointing on point and their buffers to not overrun. :D Lots of them learn how to "architect" code after they have left school and give you spagetti code to deal with, like a cat leaving you a dead bird as a pleased gift.

So, while I understand (and totally empathize with) your frustrations, that still doesn't point(er?) to learning C first. What you have in your scenario is a dev trained in a high-level language suddenly being put in front of a language that doesn't do certain things automatically that they are expecting, thus they do it themselves wrong the first time around. The problem is not that they don't know C, but that your hirng process was f'ed up. :blush:
Hyperbole is, like, the absolute best, most wonderful thing ever! However, you'd be an idiot to not think dogmatism is always bad.

#15 fireside

    Senior Member

  • Members
  • PipPipPipPip
  • 1271 posts

Posted 09 October 2009 - 01:48 PM

Quote

I have noticed that people that do start with these languages have a very odd perception of what an object is, and I think it's because of the way they are introduced to them. In C/C++ an object is something you use to chunk together related information and that's how it is introduced, whereas in C# or Java it would seem that a class is just something that you have to wrap around your program to get it to work

I would disagree with that one. An object really can be anything, and I think forcing someone to think in terms of objects can do a lot to structure a program. I started with python, I think, but I never really got into object oriented programming until I tried java and then it was because I was forced to think that way. There weren't any alternatives. I still think it's the very best way to structure software. I went from sprawling ugly code to nice looking code that was easy to add and change just because I switched to a full OO language. I think it should go the other way so you use that messy stuff as little as possible, or better yet, never. There's also nothing wrong with a static method. It's one more way of identifying and separating code.
Currently using Blender 2.5, FlashPunk, and Unity.

#16 poita

    Senior Member

  • Members
  • PipPipPipPip
  • 322 posts

Posted 09 October 2009 - 02:22 PM

alphadog, you might want to read what I said. I was arguing in favour of Python (and C).

Quote

But, you have no problem with includes, function calls, etc? Isn't that overly selective?

I don't think so.

I think it's much easier for someone that's completely new to programming to appreciate the purpose of an include and function call, than it is to understand what a "public class" is, or what "public static void" means.

That being said, ideally you wouldn't need to create a function and include a header file for Hello Word in C/C++, but I think it's still asking much less than C#/Java do. Again, as you said, Python is definitely the simplest here.

Quote

In any language, much like in C, you'd slowly introduce structures, functions/methods and more complex ideas like algorithms. In the long-run, there's some stuff in higher languages you don't worry about that you still have to teach in C. Thus, you get more productive faster with C# or Python.

Well this is exactly what I'm getting at. You should slowly introduces structures, methods, and access rights into programs, but C# asks you to use them in Hello World!

Of course, you don't have to understand them then, but I don't think it does any good to be forced to write things that you don't understand as it takes the focus away from trying to learn simple concepts such as what a variable is.

Also, I would argue that the purpose of a first language is to learn fundamental programming concepts, not to get "productive". I think that's an orthogonal issue when considering what language to learn first.

Quote

I would disagree with that one. An object really can be anything, and I think forcing someone to think in terms of objects can do a lot to structure a program. I started with python, I think, but I never really got into object oriented programming until I tried java and then it was because I was forced to think that way. There weren't any alternatives. I still think it's the very best way to structure software. I went from sprawling ugly code to nice looking code that was easy to add and change just because I switched to a full OO language. I think it should go the other way so you use that messy stuff as little as possible, or better yet, never.

I don't disagree that thinking in objects helps, but I think that they are something that should be introduced after you've learned what variables, control structures, and regular function calls are. To me, starting by teaching objects is like trying to teach linear algebra to people that haven't yet mastered basic arithmetic. I think a lot of programmers forget when suggesting starting languages that non-programmers don't know what a variable is. Objects are actually very high level concepts.

#17 Sol_HSA

    Senior Member

  • Members
  • PipPipPipPip
  • 482 posts
  • LocationNowhere whenever

Posted 09 October 2009 - 03:18 PM

poita said:

I have noticed that people that do start with these languages have a very odd perception of what an object is, and I think it's because of the way they are introduced to them.

If OOP is all you want to get into, I prefer inform6. In what other language can you create the object 'chair' of the class 'furniture', and then sit on it? :lol:
http://iki.fi/sol - my schtuphh

#18 SyntaxError

    Valued Member

  • Members
  • PipPipPip
  • 139 posts

Posted 09 October 2009 - 04:34 PM

alphadog said:

In the long-run, there's some stuff in higher languages you don't worry about that you still have to teach in C.

I would change this statement slightly. I would say in the long-run there's some stuff in higher languages you don't worry about that you still have to teach in C.........until you again have to worry about it in those higher languages!

C# and Java mask a lot of stuff. You may be more productive up front but then when your program gets more complex you may find you don't understand what's really happening underneath and this leads to unexpected behavior and or performance problems. Even if you program in those "higher languages" having a foundation in C and C++ is going to help you immensely, when you start doing large scale applications.

alphadog said:

OTOH, you hire the C student who can't conceptualize the larger picture because they spent too much time learning how to get their pointer pointing on point and their buffers to not overrun. :) Lots of them learn how to "architect" code after they have left school and give you spagetti code to deal with, like a cat leaving you a dead bird as a pleased gift.

However I have never noticed a specific correlation to bad coding and language. In my experience bad coders code poorly in any language and good coders code well in any language.

alphadog said:

The problem is not that they don't know C, but that your hirng process was f'ed up. :blush:

That may be, however it's not easy finding a top notch physics PhD that is also a top notch programmer. Of course you can hire two separate people but then you are paying two people. Everything is a compromise.

On the other hand on several occasions we hired a few bad C++ programmers that were actual computer science grads. In those cases I would agree that hiring process may have been f'ed up. These guys had evidently impressed the managers with a lot of OO wankery in their resume. Too bad they didn't also have a better low level foundation. They might have been able to hold their jobs longer.

#19 alphadog

    DevMaster Staff

  • Moderators
  • 1643 posts

Posted 09 October 2009 - 05:07 PM

SyntaxError said:

You may be more productive up front but then when your program gets more complex you may find you don't understand what's really happening underneath and this leads to unexpected behavior and or performance problems.

Totally agreed. C is a very useful for a game developer... eventually. But, deferring those "innards"-type issues to when one has begun to master syntax, algos, best practices and other basic development concepts is a good thing.

I guess, to use a swimming analogy, I think the ideal learning approach is one that lets a student start at the shallow end and work his/her way to the deep end, rather than throing them into the deep, shark and piranha-infested C/assembly end of the language pool. :D
Hyperbole is, like, the absolute best, most wonderful thing ever! However, you'd be an idiot to not think dogmatism is always bad.

#20 SyntaxError

    Valued Member

  • Members
  • PipPipPip
  • 139 posts

Posted 09 October 2009 - 05:39 PM

alphadog said:

Totally agreed. C is a very useful for a game developer... eventually. But, deferring those "innards"-type issues to when one has begun to master syntax, algos, best practices and other basic development concepts is a good thing.

I guess, to use a swimming analogy, I think the ideal learning approach is one that lets a student start at the shallow end and work his/her way to the deep end, rather than throing them into the deep, shark and piranha-infested C/assembly end of the language pool. :)

LOL! I typed in a similar (but inverse) analogy but decided not to post it and deleted it. I'll post it now since you posted your swimming thing.

I learned to scuba dive in Monterey's cold water so I had a bulky wet suit and heavy weights to deal with. When I went to the Caribbean and Hawaii, it seemed like I was in easy mode. Later I had the opportunity to view a group of divers trained in warm water try to handle diving in Monterey. Let's just say they weren't having a good time.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users