Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Coding Stuff  (Read 2149 times)

Dr. Johbson

  • Bay Watcher
    • View Profile
Coding Stuff
« on: October 03, 2009, 05:42:02 am »

I wanna be a pirate coder. As in, I want to learn C or Python or whatever the hell is 'in' nowadays, I can never follow that stuff.

I don't know where to start. Do I go read a book? What would you recommend? Or are there amazing guides online, that would save me ten bucks?
Logged

IndonesiaWarMinister

  • Bay Watcher
    • View Profile
Re: Coding Stuff
« Reply #1 on: October 03, 2009, 06:34:08 am »

Python.

use the 2.x version.
http://docs.python.org/

See the complete newb tutorials there.

Logged

sonerohi

  • Bay Watcher
    • View Profile
Re: Coding Stuff
« Reply #2 on: October 03, 2009, 10:00:08 am »

Or C++ here http://www.cprogramming.com/tutorial/lesson1.html. Python is for geeky programmers, C++ is for the programmers who down vodka like water and ride exploding motorcycles.
Logged
I picked up the stone and carved my name into the wind.

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Coding Stuff
« Reply #3 on: October 03, 2009, 10:29:51 am »

No. Python is for programmers who want to get something done, C++ is for programers who want to pay the rent, Assembly is for Real Programers (Wich are the kind that crack goverment compures, down vodka like water and ride exploding motorcycles, and get laid).
Python.

use the 2.x version.
http://docs.python.org/

See the complete newb tutorials there.
I second this advice.
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Angellus

  • Guest
Re: Coding Stuff
« Reply #4 on: October 03, 2009, 02:04:40 pm »

Wasn't C++ the best and most used language out there?
Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Coding Stuff
« Reply #5 on: October 03, 2009, 02:40:51 pm »

most used; yes. Best; absolutely not. There are no such thing as a "best" language, and if there was it wouldn't be C++.
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

G-Flex

  • Bay Watcher
    • View Profile
Re: Coding Stuff
« Reply #6 on: October 03, 2009, 02:45:56 pm »

C++ is a good all-purpose sort of language. It's been around forever and lets you mess with low-level concepts as well as fairly high-level ones. I think it's a great language to start with.

Python, I just hated the structure. Didn't even really feel like programming to me, and I've heard other complaints about it but I don't really remember the specifics.

A lot of people would probably bite my head off for recommending C++, but it's still relevant and will teach you a hell of a lot. For instance, even if you don't WANT to use a language with strong variable typing, it's still the sort of thing you should know about. Plus I think it's well-structured, compared to something like Python, but that's just me talking.


And regardless of the language you choose, what you should really focus on at first is basic programming concepts, like logic and program flow and that sort of thing.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

DJ

  • Bay Watcher
    • View Profile
Re: Coding Stuff
« Reply #7 on: October 03, 2009, 02:50:20 pm »

I recommend C++ because it's easiest to find learning material for.
Logged
Urist, President has immigrated to your fortress!
Urist, President mandates the Dwarven Bill of Rights.

Cue magma.
Ah, the Magma Carta...

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: Coding Stuff
« Reply #8 on: October 03, 2009, 03:03:04 pm »

C and C++ are quite similar. I reccomend either. Mostly because you would learn more about the internal structure of the computer than with most other compiled languages, and, with the use of some ASM, nothing is possible, and even without it, almost anything is possible.

Remember, object oriented practices are bad when you split a logical piece of code into half a dozen object functions just because that is how it's done. If the split has no purpose, does not speed up the code, and does not make it easier to understand, then why do it? (Future modular compatibility IS a purpose, "becuz it be OOP gud practize" is not. Every coding practice has a reason behind it, and should only be used where that reason actually applies. GOTO is not evil, but 99% of the time, the same functionality(and same output code) comes from an if, a while, a break, a continue..., but that doesn't mean that a GOTO must NOT be used, just that it should only be used by people who fully understand how they could damage the stack with it, and only where it's use would actually be CLEARER. Maybe it would work in a complex switch() for movement between cases where fall-through alone isn't enough, but such cases are rare...)

Above all, in any language, understand the why behind the coding practice so that you know when NOT to follow it.
Logged
Eh?
Eh!

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: Coding Stuff
« Reply #9 on: October 04, 2009, 11:13:31 pm »

check my sig for one of the best c++ tutorials I've seen so far...

Also... Ignore this kind of comments:
No. Python is for programmers who want to get something done, C++ is for programers who want to pay the rent, Assembly is for Real Programers (Wich are the kind that crack goverment compures, down vodka like water and ride exploding motorcycles, and get laid).
Use what suits you.
Wasn't C++ the best and most used language out there?
most used; yes. Best; absolutely not. There are no such thing as a "best" language, and if there was it wouldn't be C++.
There's no best language all right.  If it gets the job done it is the right tool.  If not, go find some other tool.  I don't get why you hate C++ so much though.  Are you just a rebel?
I recommend C++ because it's easiest to find learning material for.
This is a good point. 

qwerty goto's are like ellipses and other stuff that's dangerous... They're demonized so that newbies wont use them.  Later, they can learn if there's an exception where they can be implemented.

For now:


« Last Edit: October 04, 2009, 11:19:08 pm by Alexhans »
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

G-Flex

  • Bay Watcher
    • View Profile
Re: Coding Stuff
« Reply #10 on: October 05, 2009, 12:17:53 am »

The thing about stuff like goto, continue, break, etc. is that they get you thinking in the wrong mindset if you use them when you start out. They're basically designed to break the flow of your program, which is usually a rather nasty practice unless there's a damn good reason to do it. Exception-handling is one such case in, say, C++; it's designed to handle situations where breaking the flow actually makes sense, usually error conditions where you might as well not even continue what you're doing. And even that is fairly structured, in its own way.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Dr. Johbson

  • Bay Watcher
    • View Profile
Re: Coding Stuff
« Reply #11 on: October 05, 2009, 01:24:04 am »

Damn, I completely forgot I made this thread. Right, thanks guys.  :P
Logged

IndonesiaWarMinister

  • Bay Watcher
    • View Profile
Re: Coding Stuff
« Reply #12 on: October 05, 2009, 04:25:39 am »

Damn, I completely forgot I made this thread. Right, thanks guys.  :P
Oh, also, if you go python, check what would you want.

Compability with C/C++ libs? CPython, check (learning this).
Compability with Java? EWW, but JPython, check.

Also, there is stacklessPython, but I don't know what it is...
Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: Coding Stuff
« Reply #13 on: October 05, 2009, 05:37:04 am »

There's no best language all right.  If it gets the job done it is the right tool.  If not, go find some other tool.  I don't get why you hate C++ so much though.  Are you just a rebel?
I don't hate C++, it is a good language with several advantages, but the fact is that the main one by far is in it's popularity, the reason peaple use it is not because of it's merits as a programing language, but simply because every existing project uses it. I think that kind of behaviour results in stagnation, it is an fairly old language, and the field of computer science is always moving at an ever acselerating pace, meaning that by now there are languages that are much better than anything that was around when C/C++ first started to become popular. Also, even ignoring that there's simple statistics, i'm quite certain more new languages have come out until C++ reached that critical mass than there existed before, and thus it is very likely one of those languages are better.
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: Coding Stuff
« Reply #14 on: October 05, 2009, 06:10:15 am »

ok... so C++ is really used becaused it's trendy... first time I hear that...

C++ is SO old and outdated, let's move to other languages... no, wait...

better... That word does not compile.  Better FOR WHAT?

Anyway... We won't make this a language fight... we posted our throughts and we will let the guy choose whatever fits him.  My point still stands.  Find the right tool for the right job.

I haven't used python just yet because I'd rather become fairly good with one language before journeying throught the hard process of learning another one.  But someday I'll check out why is it so popuplar.  Examples like Civilization IV don't go unnoticed to me.
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.
Pages: [1] 2