Learning to program....

Discuss stuff not about Indigo.
Nortmobile
Posts: 13
Joined: Wed Jan 31, 2007 9:49 am

Post by Nortmobile » Sat Nov 03, 2007 5:52 am

WytRaven wrote: If you are going to learn to code, learn to code well.

Yes, This.

Learn C and then C++. You will run into pitfalls and you will learn. You will stare at the screen screaming "I've read this FARKING line 300 time THERE IS NO ERROR!" You'll get up grab a snack and come back and realize there's no semicolon in some line above. It will be frustrating but it can be very rewarding. Good luck.
Last edited by Nortmobile on Sat Nov 03, 2007 5:55 am, edited 1 time in total.

IanT
Posts: 153
Joined: Fri Aug 25, 2006 3:13 am

Post by IanT » Sat Nov 03, 2007 5:54 am

Pah, bunch of wimps... :P

Learn assembler first, it's much better for the soul. I think I was 14 when I coded a ray tracer in 6502 assembly language, and C was a piece of cake after that :wink:

Ian.

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Sat Nov 03, 2007 5:58 am

xD

assebled ray tracer? O.o

IanT
Posts: 153
Joined: Fri Aug 25, 2006 3:13 am

Post by IanT » Sat Nov 03, 2007 6:00 am

Hehe yes ... BBC Micro Model B ... 8 hours for a 160x256 scene of a
couple of mirrored spheres over a white/red checkered plane. Great fun :wink:

Ian.

Nortmobile
Posts: 13
Joined: Wed Jan 31, 2007 9:49 am

Post by Nortmobile » Sat Nov 03, 2007 6:16 am

Eww...
Lets see. At 14, I would have sat down all excited, stared at the screen for the next hour or so and then I would have taken a nap.

Today I would still give up but at least there would be more planning involved.

IanT, you're a better man than I. I've never had the drive to figure out any ASM.

User avatar
daniel_nieto
Posts: 173
Joined: Wed Apr 11, 2007 10:45 am
Location: Ciudad Guzman, Jalisco, México
Contact:

Post by daniel_nieto » Sat Nov 03, 2007 6:19 am

como todos te han dicho, yo creo que C++ es el mejor para empezar a programar, además de que, si uno de tus objetivos ( como es el mio ) es hacer un juego, c++ tiene muchas facilidades para manejar OpenGL y DirectX, yo no soy programador, bueno, estoy cursando la Ingeniería en Sistemas Computacionales, pero acá nos enseñan que el lenguaje de programación no es la panacea del ingeniero, bueno, en este caso de cualquier persona, te recomiendo, que, si nunca has programado, es mejor que primero comiences con fundamentos de programación, haciendo algoritmos y pseudocodigos de como sería la resolución de un problema, y ya que aprendas a hacer esto, comenzar a programar, como te digo, C++ yo creo que sería lo mejor,es que, dependiendo del problema es el lenguaje que vas a utilizar, asi que a diferencia de todos que te recomiendan un lenguaje, para comenzar yo te recomiendo que te enseñes a resolver un problema sin programación, y despues tirarle a C++, además de que es de los mejores, es como cuando te enseñas a conducir, es mejor aprender en un auto manual, y despues en uno automatico, por que si no, te acostumbras a las facilidades del automatico, y te es muy dificil aprender el manual, ocurre lo mismo con los lenguajes, si aprendes un lenguaje donde por ejemplo, visual basic, no tienes que declarar las variables, y tiene un recolector de basura automatico, etc, cuando aprendas C++, o quieras aprenderlo, te va a ser muy complicado, pues lo vas a ver muy esctricto... dicho esto, me despido jejeje, nos vemos joe, y suerte en tu travesía a la programación.

--------------------------------------------------------------------------------------
TRANSLATION

As everybody said, i think that C++ is the better for starting, besides, if one of your objectives (as is one of mines) is making a game, c++ has a lot of facilities to interact with OpenGL and DirectX, I’m not a programmer, well, im studying the Computer Systems Engineering, but there they teach us the language is not the panacea of the engineer, well, in this case any person, I recommend you, that, if you’ve never programmed before, you should better start with programming fundaments, making algorithms and pseudocode of how would a solution be, and then you learn how to do this, start to programming, as I said, c++ I think would be the best…( the rest of the text, is just a explanation of why to learn c++ besides visual or some look-like, resuming it, because it’s better to learn from complex to simply, instead simply to complex, as when you learn how to drive)
Image From México, Daniel Nieto .·.

User avatar
joegiampaoli
Posts: 837
Joined: Thu Oct 05, 2006 7:12 am
Location: San Miguel de Allende-MEXICO
Contact:

Post by joegiampaoli » Sat Nov 03, 2007 8:02 am

Wow I got more responses out of this than expected, Daniel Nieto has probably driven the last nail on this, and most of you have recommended C++ so I guess I will go for it then. It's not just for game programming, but for a whole 3D world, I have also been thinking of a good and simple CAD for linux and even a lighting analyis program, I still have to see what will be my first try, I was thinking of a simple game at first for my learning curve, starting with OpenGL to start understanding all of the implementations for 3D.

I am in no particular hurry t do this, I just want to start off in the right path, so that when I am in the middle of something I don't want to discover that maybe in another language it would of been easier or more precise to do what I was doing.

Thanks guys!

Very appreciated!

I'll read a bit about C++ to get my feet wet.
Joe Giampaoli
Never tie a ship to a single anchor, nor life to a single hope
My Indigo Gallery

User avatar
eman7613
Posts: 597
Joined: Sat Sep 16, 2006 2:52 pm

Post by eman7613 » Sat Nov 03, 2007 11:17 am

having leanred java, c++, asp, and vb concurently as my introduction into prgraming, i feel like throwing in my two cents on the merits of each.

ASP, avoid it. half the crap doesn't make sense on its own and is somtimes just plain inconsistent in how things look.

vb, avoid it, hate that thing. its nice, but learning it as a first language (it actualy was my first language for about 3 months before i tried something diffrent) is just bad practice for a first language, i felt it was much harder to learn basic concepts.

The two real options, are java and c++, and it depends on what way you want to learn.

Java, is a "higher level" language then the Cs, meaning that the code is farther from machine code then c and c++ (or as my CS teacher likes to put it, java is closer to "human" language, as illogical as it may be).

You can learn basically all of the concepts of CS in both langauges, the MAJOR difference between the two is this. java has a mostly built in memory management (the garbage colector), making it very difficult to have memory management problems unless your a terribly sloppy programmer. in c++, you have to handle this yourself with things like the delete keyword, in java you would just avoid any future references to the object and call the garbage collector if you wanted it gone asap. Second, Java isnt going to let you fuck with your machine a lot, writing a virus for the must unstable system in the world would be a hard task with java.

BUT, when it comes to it, i would suggest java for this reason. The compile errors are USEFUL! in java, if i forget a ';' at the end of the line, i get one error message b/c i forgot a ';'. In c, i do the same thing and i get several error messages pointing to diffrent lines, and it simply makes life more dificult then i would like when learning. Also, there are very extensive tutorials on java's website (albit sometimes rediculasly confusing for simple things).

for 3D stuff, i really don't like playing with, but java does have the JOGL api, which is just making calls to OpenGl through java.
Yes i know, my spelling sucks

IanT
Posts: 153
Joined: Fri Aug 25, 2006 3:13 am

Post by IanT » Sat Nov 03, 2007 11:24 am

for 3D stuff, i really don't like playing with, but java does have the JOGL api, which is just making calls to OpenGl through java.

.. and don't forget Java3D which has progressed significantly in the past couple of years. It's effing quick too considering that the API is fairly high level.

I remember when I did a Java3D-based preview for Radium and it only took a couple of hours to learn and then a couple more hours to get a working version up and running. I abandoned it in the end because it wasn't yet cross-platform and also a bloody nightmare to deploy ... but it's close to "all platforms" now and I'll think about including it again soon.

Ian.

User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Post by dougal2 » Sat Nov 03, 2007 1:39 pm

Just another thought on the end of this. daniel_nieto touched on this..

programming isn't just or always about learning a particular syntax or API - you will also get to learn good algorithms and ways of doing things in an efficient and logical manner.

It takes time though to develop a sense of how to solve a particular problem. you may even be able to think of two or three different solutions - the best one to pick would then depend on other factors - perhaps user interface, or code efficiency or *coding time* or something else.

You will probably find yourself revisiting chunks of code from time to time and refactoring it into something a bit better once you've learned a new approach. This will probably annoy you a little to start with, but don't worry over it - it shows that you've learned something.

I wish you the best of luck. It's a fantastic feeling when a bunch of code comes together and produces results. I hope you get to experience that soon :)

User avatar
joegiampaoli
Posts: 837
Joined: Thu Oct 05, 2006 7:12 am
Location: San Miguel de Allende-MEXICO
Contact:

Post by joegiampaoli » Sat Nov 03, 2007 1:41 pm

Thx dougal2 :D
Joe Giampaoli
Never tie a ship to a single anchor, nor life to a single hope
My Indigo Gallery

Post Reply
26 posts

Who is online

Users browsing this forum: No registered users and 34 guests