Bay 12 Games Forum

Please login or register.

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

Author Topic: Programmers, Programmers one and all.  (Read 4093 times)

sonerohi

  • Bay Watcher
    • View Profile
Re: Programmers, Programmers one and all.
« Reply #15 on: October 06, 2009, 09:43:10 pm »

I think the main 'debate' that occurs is that Armok has a hard-on for binary and tries to say that everything else isn't programming.
Logged
I picked up the stone and carved my name into the wind.

IndonesiaWarMinister

  • Bay Watcher
    • View Profile
Re: Programmers, Programmers one and all.
« Reply #16 on: October 07, 2009, 06:09:50 am »


I heard that pthon was a scripting type of language to be used with a language such as C/C++.


Well, it can.
But it can be used raw too.

Also, unlike some people say, it does not become THAT slow.
Unless you're writing 10,000 + lines of codes and classes and objects blah blah. Stick to C++ then.
Logged

Starver

  • Bay Watcher
    • View Profile
Re: Programmers, Programmers one and all.
« Reply #17 on: October 07, 2009, 06:57:19 am »

Can I suggest Perl?

You can use it with a pure fucntion-orientation just like a script, but it has an OO structure that you can use to learn what OO is all about.  (It's looser than C++'s and Java's Object Orientation, frexample, but because you're can poke the internals and 'break' classic inheritences you can get to know what works and what doesn't, and learn some of the reasoning behind C++/Java's constraints...  As long as you don't expect to have the same leeway if you move on, of coruse.)

It's also useful as a .cgi language (IMHO better than PHP, except that instead of the "HTML containing code that makes more HTML" idea, it's just "code that you make produce all the HTML").

The flexibility of data structure will mean that you're able to do anything you want[1] once you know how to use it, but you can work your way up to that level in stages, with that time, aptitude and curiosity.

Again, the disadvantage is that when transferring skills to something more tightly typed you're no longer free to store array references in any old static, etc...  (See [2] for one where I did.)  Though you do have the ability to define types that have variable record layouts, so it shouldn't stop you if you're determined enough to continue, and you're not too bothered about readability.  (Noting that I stripped the examples of the comments and excess whitespace, so they're scarier looking than they are in my code. :))

[1]It can look scary, at first sight.
 e.g. "CULL: while ($i < $#{$_[0]}) { if (Feature(${$_[0]}[$i],@{$_[3]})) {$i+=2; next CULL} splice @{$_[0]},$i,2;}", is a slightly obfuscated code from a recent project of mine meant to remove pairs of elements from an array where the first of each pair does not match a criteria.

"sub TakeJob { my $J = (sort {Weighting($b) <=> Weighting($a)} keys %JOBSET)[0]; if (int(@{$JOBSET{$J}})) { return ($J,shift @{$JOBSET{$J}}) } else { return () } }" is part of another conceptual project where I was implementing my own threading model, for 'LOLZ'.

"sub dos { unless (defined wantarray) { map { y/\//\\/ } @_; return } my @r; for my $i (@_) { my $j = $i; $j=~y/\//\\/; wantarray?push @r, $j:return $j } return @r }" is something I bashed up to handle flexible conversion of directory path styles (as unary operator or straight function, for both scalar or array variables).

Yes, I know that there are already modules that give those functionalities, but I like tinkering. :)[/1]

[2] map { $_ = [split("/",$_)]; pop @$_; $_ = join("/",@$_) } @_;
Logged

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: Programmers, Programmers one and all.
« Reply #18 on: October 07, 2009, 07:03:43 am »

Everyone but one person has told me that compared to C or C++ C# is absolutely horrible.

I hate C++ with a passion. but if thats seriously the only god damn fucking language I can learn i'll learn it.
You hate it because you probably never got a chance to learn it from an interesting place... C# is pretty good for certain things. 

Never listen to those kind of absolute statements.  C# is very object oriented and has a lot of features that will make sure you don't screw up  like the trash collector that will prevent memory corruption.

It's very similar to java in many ways.  It is slow like java too... :P

Ok... Armok's posts had finally pissed me off so I wrote a whole post that I realize wont help much.

I'll only say this.

Assembler SHOULD NOT be the first language you learn.  You can learn programming with any language and eventually jump to another but you should start with something simple.  Assembler is clearly NOT the best choice.

ASM will be useful.  You might end up using ASM wrappers within your <insert language here> code but it's not practical by itself to do most things.

PS: I'll buy you an Altair for you birthday...

Regarding Python:
CIV IV, i believe, used a lot of python embedded code with c++
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

Hippoman

  • Bay Watcher
    • View Profile
Re: Programmers, Programmers one and all.
« Reply #19 on: October 07, 2009, 07:19:59 am »

oh GOD!! This same EXACT Battle in every thread??!!

Learn a language you enjoy... the end...

try them all... pick one... whatever...

Think about what you want to do and investigate wich can better suit your needs...

If you need C++ tutorials...

ask me...
http://www.learncpp.com/
http://www.mikeware.us/cpp/
http://www.dev-spot.com/forums
http://winprog.org/tutorial/ (win32 api)

I have a LOT more...


Impossible for me to learn from reading online textbooks.

Yes Civ 4 was 1/3rd Python. 1/3rd directx and 1/3 its own.
Logged
THPÆCROSSISM
ΘπÆ┼ - Rise up against our superiors! Let all dwarves be equal!
KHDownloads

Starver

  • Bay Watcher
    • View Profile
Re: Programmers, Programmers one and all.
« Reply #20 on: October 07, 2009, 07:24:12 am »

Assembler SHOULD NOT be the first language you learn.  You can learn programming with any language and eventually jump to another but you should start with something simple.  Assembler is clearly NOT the best choice.

Can I just add a qualifier that Assembler is simple.  It's simple because it's (NAMND) exactly what the computer does.  And as such you can know exactly what's happening where.  But for anything more complex than a Hello World, you of course want Complicated Things to happen, and Complicated Things need a lot of low-level code to produce.

At the other end of the spectrum are DWIM-type languages that Do What You Mean, giving you a 'simple' command to do a lot of complicated things, by arcane methods deeply embedded within the programming environment.  But you have no idea how it accomplishes those things, so have to trust yourself to trust it to actually Do What You Mean, rather than Doing What You Didn't Really Mean.  Also, you have less ability to optimise and optimally break out of some complex tasks if things are plainly going out of scope (by your measure, not the function) early on in the complexity of operation, but I suppose that's a masterclass.

Soo... I would say avoid learning Assembler as a first language because it is too simple, and doesn't have enough abstractions to give you a running start.  Come back to it (perhaps via embedding assembler code in select parts of your high-level language code, as fine-tuning of some in-built function that you want to optimise or improve for your purposes in some way) when you have a handle on what you might need to do regarding buffering IO, handling exceptions, etc with the various keywords and pragma you get provided in the HLL, and once you think you understand the whys and wherefors behind them.


I know, it's all a matter of perspective.  You ought to see my homegrown programming language that has just four instructions, roughly analagous to: ++, --, := and =?.  If it weren't abstracted by being interpretted/run as a virtual machine written in whatever HLL is my flavour-of-the-month, I'd consider it 'simple'.  If I was better with electonics I could probably implement it directly in hardware.  But to get anything done you need to wrap up the code into 'functional blocks' (I do it by a GOSUB-like structure, if that means anything to you) so you don't have to reinvent the wheel every time you need to do a simple division, etc.
Logged

Dasleah

  • Bay Watcher
    • View Profile
Re: Programmers, Programmers one and all.
« Reply #21 on: October 07, 2009, 07:31:03 am »

I myself am a Python man, but I've started to pick up a bit of C#.

At the end of the day, the language you want to use is the one that makes you feel the most comfortable using and satisfies the list of requirements needed for the project at hand. If you love C, find a way to make it work for you. If you love Java, ignore the haters, and just use it. Find something that you not only can program in, but want to program in. These days, nearly every language available has all the libraries ported that you'd ever want to use, anyway. So just go out there and start with a few Hello Worlds. Whatever one makes you want to write more in, that's the language you choose.

Compiled, interpreted, JIT, high-level, low-level, whatever. The secret is, at the end of the day, it doesn't matter one fucking bit what the hell you program in. The end-user doesn't give two shits about what work went into the program, only that it works full stop. So just code.
Logged
Pokethulhu Orange: UPDATE 25
The Roguelike Development Megathread.

As well, all the posts i've seen you make are flame posts, barely if at all constructive.

Neruz

  • Bay Watcher
  • I see you...
    • View Profile
Re: Programmers, Programmers one and all.
« Reply #22 on: October 07, 2009, 07:39:28 am »

Ultimately you'll learn much better if you have somone instruct you. I highly reccomend looking at taking a short course or two at your local University (they usually run 'short courses' that last for a couple of weeks every now and then, programming language courses are quite common, at least down undah they are.)

If you're dead set on learning by yourself though, then i'd actually reccomend you start by modding established games, rather than trying to dive head-first into a coding language from the ground up. If you play around with some mods for (for example) Supreme Commander you'll get a very basic understanding of Lua and the kind of way programming languages work much more quickly than if you try and start from scratch. Once you've got that basic understanding then it's time to go learn a language from scratch, but trying to do something without that knowledge is unbelievably difficult. I spent well over a year trying to learn programming languages before i finally gave up, spent about 6 months modding Warcraft III and then when i did IT in year 11 it all suddenly made sense to me; we did Java and sure alot of things were different from WCIII's JASS script, but because i was familiar with the higher level functions and the basic structure and logic that all coding languages tend to share it was much easier to learn the lower level stuff.



Kind of like how when you're learning to fly a plane you don't just jump in and fly off, you have somone who knows what he's doing control the aircraft and slowly let you use little bits and pieces for short periods of time, letting you gradually get used to the basic ideas before you get into the nitty-gritty details.




The above may not be relevant to the OP however, since he seems to know the basics already. In which case this part will be;

Go with whatever language you like. I've seen unbelievably good and quality games written in Actionscript2 (a horrible horrible plague upon the world). If you're comfortable with the language, use it. Unless you're looking for a job as a programmer there's absolutely no need to learn multiple languages; there's no such thing as 'the best' programming language. Everyone will tell you theirs is the best, but it's bullshit. You can generally do anything you want with anything you want, so long as you're comfortable with the language and you know enough to make it as streamlined as reasonably possible, work with it.
« Last Edit: October 07, 2009, 07:42:41 am by Neruz »
Logged

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: Programmers, Programmers one and all.
« Reply #23 on: October 07, 2009, 07:55:35 am »

Quote from: Hippo

Impossible for me to learn from reading online textbooks.
why?  O_o

Then you should buy a book :P  Getting classes is also good but ultimately you'll want to investigate and practice a lot because lessons will always seem to fall short.

Regarding scripts:  I started coding in a simil-c++ code from AGS (Adventure Game Studio) wich was pretty good to learn but then I had to remove a lot of failed concepts I had when I finally learned real c++.

I Love and Totally Support Dashlea's post.
« Last Edit: October 07, 2009, 10:28:44 am by Alexhans »
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

Neruz

  • Bay Watcher
  • I see you...
    • View Profile
Re: Programmers, Programmers one and all.
« Reply #24 on: October 07, 2009, 07:57:44 am »

No book even comes close to the ability to ask somone questions and have them demonstrate the answer.

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: Programmers, Programmers one and all.
« Reply #25 on: October 07, 2009, 07:59:41 am »

No book even comes close to the ability to ask somone questions and have them demonstrate the answer.
Yes, but it all depends on the teacher... Teachers have limited time.  You have all the time you want with your textbook and your computer.  Research always grants you knowledge.
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

Neruz

  • Bay Watcher
  • I see you...
    • View Profile
Re: Programmers, Programmers one and all.
« Reply #26 on: October 07, 2009, 08:07:47 am »

*Shrug* I can't speak for any teachers i don't know, but in my personal experience most of them do it because they want to actually teach, so they tend to greet students who ask questions and interact (as opposed to just being a brick wall at the back of the room) with open arms.

Dasleah

  • Bay Watcher
    • View Profile
Re: Programmers, Programmers one and all.
« Reply #27 on: October 07, 2009, 08:11:27 am »

I believe one of the greatest reasons why it's hard to learn and read off a computer screen is that the standard 60hz refresh rate of most monitors simply makes one's pupils spew blood after a while. Seriously, for those of you that can, bump it up and see the difference it makes.

That, and even in today's world, most books don't have Firefox built into them. Distraction is everything in learning. You can easily distract yourself with any of the thousands of things possible on a desktop, but with a book, you just read words off a page.

Commitment, of course, is an issue that effects both of them.
Logged
Pokethulhu Orange: UPDATE 25
The Roguelike Development Megathread.

As well, all the posts i've seen you make are flame posts, barely if at all constructive.

Neruz

  • Bay Watcher
  • I see you...
    • View Profile
Re: Programmers, Programmers one and all.
« Reply #28 on: October 07, 2009, 08:13:22 am »

Ultimately though, you can't ask a book questions.

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: Programmers, Programmers one and all.
« Reply #29 on: October 07, 2009, 08:24:35 am »

Ultimately though, you can't ask a book questions.
oh... You totally can...

Spoiler (click to show/hide)
I believe one of the greatest reasons why it's hard to learn and read off a computer screen is that the standard 60hz refresh rate of most monitors simply makes one's pupils spew blood after a while. Seriously, for those of you that can, bump it up and see the difference it makes.

That, and even in today's world, most books don't have Firefox built into them. Distraction is everything in learning. You can easily distract yourself with any of the thousands of things possible on a desktop, but with a book, you just read words off a page.

Commitment, of course, is an issue that effects both of them.
Well... What I love about a good book is that I can read it wherever I want (train, class, etc). 

Good books are usually heavy though... :P
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.
Pages: 1 [2] 3 4