Bay 12 Games Forum

Please login or register.

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

Author Topic: Getting Into Coding  (Read 7761 times)

Blank Expression

  • Bay Watcher
    • View Profile
Re: Getting Into Coding
« Reply #45 on: March 02, 2011, 03:27:38 pm »

@ Virex
True, Python is removed from hardware.  But my primary complaint about Java/.NET is that they reinforce implementing someone else's solution instead of creating your own.  Python gives you access to high level concepts, but you still have to do your own problem solving.  Training wheels included.  Libraries exist, but are mostly external to the base language.
Er...no. Much the opposite - Python's libraries, which are packaged with almost any distribution of Python you'll find, essentially _do_ do everything for you, once you know the magic words to say to them. They're just vastly less discoverable than their equivalents in .NET and Java, which fuels the appearance that they don't exist.

Much of the Java and .NET library bulk is in the forms of "things Python does as part of the core language". (Often poorly, but that's a different topic.) Yes, there are libraries in Java/.NET for fairly esoteric stuff that you need to track down Python extensions for, but you aren't exactly writing web services as part of "hello world."
Logged

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: Getting Into Coding
« Reply #46 on: March 02, 2011, 03:41:32 pm »

If you want your student to be a good programmer, you don't teach people to use the huge standard libraries in any language until after they have learned at least the beginning bits of data structures and algorithmic complexity.

On the other hand, if you need to teach the necessary core of what a computer actually does (and you do if you want them to be a good programmer), they have to learn an old fashioned non-garbage collection language like assembly, c, c++, fortran, etc anyway.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Getting Into Coding
« Reply #47 on: March 02, 2011, 04:14:33 pm »

If you want your student to be a good programmer, you don't teach people to use the huge standard libraries in any language until after they have learned at least the beginning bits of data structures and algorithmic complexity.

On the other hand, if you need to teach the necessary core of what a computer actually does (and you do if you want them to be a good programmer), they have to learn an old fashioned non-garbage collection language like assembly, c, c++, fortran, etc anyway.
Well, yeah it does introduce you to the basics of memory management, but it'll never tell you anything about registers, the stack, the program status word, interrupts or what actually happens when you call a function. C/C++/Fortran will teach people how to work with pointers and how to manage memory manually, but it doesn't teach anyone anything about computer architecture or why on some architectures unsigned multiplication is much faster then singed multiplication. To make things worse, those languages generally hinge on some implementation details, but they don't make that apparent. For example, the size of an integer is equal to the size of a word, but it never tells you that, meaning that code that works on one processor may cause overflow on another processor.
I'm not saying that learning C is bad per definition. What is bad is giving people the impression that if you know C you know how a computer works.
« Last Edit: March 02, 2011, 04:18:09 pm by Virex »
Logged

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: Getting Into Coding
« Reply #48 on: March 02, 2011, 04:24:26 pm »

You do make a point.But I think the point that I am making is that C++ can cover more of the ground that you need to cover than just about any other language.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

zilpin

  • Bay Watcher
  • 437 forever!
    • View Profile
Re: Getting Into Coding
« Reply #49 on: March 03, 2011, 04:17:25 pm »

Er...no. Much the opposite - Python's libraries, which are packaged with almost any distribution of Python you'll find, essentially _do_ do everything for you, once you know the magic words to say to them. They're just vastly less discoverable than their equivalents in .NET and Java, which fuels the appearance that they don't exist.
Much of the Java and .NET library bulk is in the forms of "things Python does as part of the core language". (Often poorly, but that's a different topic.) Yes, there are libraries in Java/.NET for fairly esoteric stuff that you need to track down Python extensions for, but you aren't exactly writing web services as part of "hello world."

I know very well that Python has huge libraries.  I didn't say they didn't exist.  What I said was...
...Python gives you access to high level concepts, but you still have to do your own problem solving.  Training wheels included.
Python, by it's nature, encourages you to figure it out, and introduce libraries later after you understand the concept.
Java/DotNet have a culture of library use.  Solving your own problem is discouraged.  Library re-use is encouraged.  Good for professional work, bad for learning.
Put briefly, Python has the natural feel of incremental learning, whereas Java/DotNet have a feel (and culture) of re-implementing without understanding.



You do make a point.But I think the point that I am making is that C++ can cover more of the ground that you need to cover than just about any other language.
This is valid.  C++ should, in my opinion, be in every college CS curriculum.
But it is a very poor place to begin, due to it's legendary complexity.
And, Python as a learning language covers more ground, and lets you grow into it.

I'm only speaking about Blank Expression's first language here.
Python classes should only be Freshman level.  After that, move on and don't look back.

Cheers.
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Getting Into Coding
« Reply #50 on: March 03, 2011, 07:57:44 pm »

Why would one want to ignore python forever? It makes no sense to dismiss a language only because it "has steering wheels". After all it might just provide everything you need in a neat package. For example, Python could be used for scripting, modding (easy to learn!) or high-level logic where ease of programming matters more then the speed of your code. If after evaluating your project goals you find using python makes no sense, then don't use it. But I'd at least take the option into account.
Logged

Blank Expression

  • Bay Watcher
    • View Profile
Re: Getting Into Coding
« Reply #51 on: March 04, 2011, 01:02:05 am »

Why would one want to ignore python forever? It makes no sense to dismiss a language only because it "has steering wheels". After all it might just provide everything you need in a neat package. For example, Python could be used for scripting, modding (easy to learn!) or high-level logic where ease of programming matters more then the speed of your code. If after evaluating your project goals you find using python makes no sense, then don't use it. But I'd at least take the option into account.
Doubly so given that if you're fucking about with C all the time in a computer science curriculum, you're wasting everyone's time--yourself included.

If anything, C (and its mentally defective cousin) should be consigned to the trash can as quickly as reasonably possible. Computer science isn't about masturbating to auto_ptr.
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Getting Into Coding
« Reply #52 on: March 04, 2011, 12:01:59 pm »

I am wondering though, if it might not be a better idea to learn manual memory management on Pascal instead of C, due to Pascal's more rigid structure which reduce the chance of generating weird, untraceable bugs.
Logged

zilpin

  • Bay Watcher
  • 437 forever!
    • View Profile
Re: Getting Into Coding
« Reply #53 on: March 04, 2011, 02:23:18 pm »

...For example, Python could be used for scripting...
Python is very heavy weight.  Scripting is usually best handled in a domain specific manner.
...modding (easy to learn!)...
See Lua.  Most of the benefits, few of the drawbacks, easy to learn, read, write, and (most importantly) integrate with a larger project.
...or high-level logic where ease of programming matters more then the speed of your code.
  Again, Lua.  You can have high-level ease of programming and performance.  Lua has better meta-programming than Python.
If after evaluating your project goals you find using python makes no sense, then don't use it. But I'd at least take the option into account.
Fair statement.  Always evaluate all options.
I say «never look back» because people who learn Python often are too scared to consider any other option.  After all, Python can do [insert project here].  At some point it is time to leave the cradle.


If anything, C (and its mentally defective cousin) should be consigned to the trash can as quickly as reasonably possible. Computer science isn't about masturbating to auto_ptr.
C is worth learning, for the lessons it teaches about language design.
But given your strong stance, perhaps you would consider Walter Bright's D?
Here's a good read about its potential, though I have my doubts it will gain favor.


I am wondering though, if it might not be a better idea to learn manual memory management on Pascal instead of C, due to Pascal's more rigid structure which reduce the chance of generating weird, untraceable bugs.
I can't agree more.  Pascal is a wonderful teaching language, and a capable practical language.  Unfortunately, it has fallen out of use.


Cheers.
Logged

Detrevni|inverteD

  • Bay Watcher
  • Sometimes you have to step back to appreciate art.
    • View Profile
Re: Getting Into Coding
« Reply #54 on: March 06, 2011, 04:20:19 pm »

I didn't read every post in this thread, but as a direct response to the OP and if you're a newbie, I'd simply suggest grabbing Visual Studio C# (The free one) because it comes with a tonne of video tutorials that cover different levels of expertise and has some really nice features that make programming a lot easier.
Make some basic programs, and then see where it goes once you have a basic understanding down. Programming languages are just that, languages, and you have to start small and build up your "vocabulary", as it were, to be able to do more advanced things.
There are a lot of different languages out there, and everyone has their favourites, but when you're a total newbie and have no idea how to program it's probably best to go for the standard fare and do something like C# until you understand it to a degree where you can do most simple to moderate tasks.
Logged

Maninblack144

  • Bay Watcher
    • View Profile
Re: Getting Into Coding
« Reply #55 on: March 09, 2011, 06:50:02 pm »

I'm currently midway through the second year of a Computer Science education, and thus far they've made us work with C, Java and Clean. Clean is a Functional Programming language, and coincidentally (or not) largely developed by my tutors.

C is pretty useful for getting used to the utter basics, like functions and pointers and stuff like that, and it's pretty handy for quickly whipping up a small program to solve a small problem, but it always struck me as very strict.

I'd say Java is very easy to work with, but there are small nuances that can screw you over big time. If you get over that, though, it's very flexible and nice. Still a bit slow occasionally, though.

Clean, or Functional Programming languages in general I guess, will pretty much require you to use recursion like your life depends on it. My tutors made pretty clear it's very easy to prove aspects of your code using it, but it's slower than C and more annoying to use than Java (their exact words, pretty much). Also, if you insist on using a Functional language, be sure you don't use Clean, because it's compiler is the biggest pile of trash I've ever seen.
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Getting Into Coding
« Reply #56 on: March 10, 2011, 10:45:43 am »

If you're looking for a pure (as far as that's possible) functional language, you're probably best off with Haskell or Erlang. This could be useful for learning to think functionally, but I am not convinced that a "pure" functional language is inherently better then a mixed language like Lisp or Ocaml. (Python, C# and D, amongst others, also provide facilities for programming functionally, but they might be lacking some things the former two have. Though I must say the lazy functions of D look like they'd be pure awesomesauce to use)
« Last Edit: March 10, 2011, 10:50:16 am by Virex »
Logged

Greep

  • Bay Watcher
    • View Profile
Re: Getting Into Coding
« Reply #57 on: March 10, 2011, 11:38:55 pm »

Personally, I would start with something very simple.  My first programming language learned was "Game maker."  It's a free video game maker.  It's so easy, you have 13 year olds making fairly complex games, and you can get stuff done on day one.  Not to mention it finally has some decent tutorials and a friendly (by programming standards) forum.  And while it's easy to learn, you can start branching into very complicated code if you want to before moving on to c++.

However, if you want to try that out, I would say do NOT start with drag and drop.  You say you know rudimentary code, so I'm assuming you know stuff like while loops and if statements.  If that's true it's actually easier in the long run both for GML and future code learning to do every event with "execute code" and write it out.
« Last Edit: March 10, 2011, 11:42:35 pm by Greep »
Logged

Tilla

  • Bay Watcher
  • Slam with the best or jam with the rest
    • View Profile
Re: Getting Into Coding
« Reply #58 on: March 11, 2011, 12:14:43 am »

Programming never gets far when I occasionally get the urge to try it, sadly. I usually lose my way and get completely confused around day 2. I've tried a variety of languages and none have really stuck, sadly. I get the syntax and all that like a savant but when it comes to actually making a program that actually does something I get nowhere fast.
Logged

Greep

  • Bay Watcher
    • View Profile
Re: Getting Into Coding
« Reply #59 on: March 11, 2011, 01:06:15 am »

yeah that's why c++ isn't really the best language to start out with TBH.  Powerful, but you don't get results quickly.
Logged
Pages: 1 2 3 [4] 5