Bay 12 Games Forum

Please login or register.

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

Author Topic: The Quest for Might and Knowledge: I have returned to programming  (Read 6223 times)

Rooster

  • Bay Watcher
  • For Chaos!!!
    • View Profile

You see a tome of "think python" pick up? (y/n)
y
You pick up a tome of "think python"
r
a- a tome of think python
a
You learn the spell of print!
Congratulations! You advance to level 1 apprentice!

Mighty wizards:
Alfie
Hippoman
Blacken
Nadaka
qwertyuiopas

Brave helpers:
Deadlycairn
eerr
zchris13
« Last Edit: April 02, 2010, 01:02:45 pm by Rooster »
Logged

deadlycairn

  • Bay Watcher
    • View Profile
Re: The Quest for Might and Knowledge: Rooster the brave and mighty wizards!
« Reply #1 on: December 31, 2009, 03:11:28 pm »

Who's this Alfie people keep mentioning?

And seriously, forum speed is not helpful when you're trying to get something solved fast. Believe me.

I'll happily proof-read code for obvious stuff-ups, though my knowledge doesn't go far beyond that. I'll also happily throw out ideas and encouragement.

Go you! ;)
Logged
Quote from: Ampersand
Also, Xom finds people that chug unidentified fluids pleasing.
Quote from: Servant Corps
Ignorance of magic does not give scientists the power to resist fireballs.

Rooster

  • Bay Watcher
  • For Chaos!!!
    • View Profile
Re: The Quest for Might and Knowledge: Rooster the brave and mighty wizards!
« Reply #2 on: December 31, 2009, 03:24:20 pm »

I don't want to get anywhere fast. I want to get somewhere in a steady pace.
Afie posted in Hippoman topic
Logged

Blacken

  • Bay Watcher
  • Orange Polar Bear
    • View Profile
Re: The Quest for Might and Knowledge: Rooster the brave and mighty wizards!
« Reply #3 on: December 31, 2009, 03:57:16 pm »

As discussed (repeatedly) in the other thread, you're probably better off not starting with C++. There's nothing special about the language that makes it better except for in a rather small niche, and there is a lot about it that makes it much more difficult to learn and learn to use effectively. There is certainly a correct time to use C++, but I would very strongly suggest it's not "when you're learning."

My best advice would be to start with Python, as it's semantically simpler and generally easier to use. This book is free and is the best starting tutorial on how to program, and how to think like a programmer, that I know of.

EDIT: And I would (politely) suggest that Hippoman should not be someone you pattern your behavior after. Announcing your intention to be an ungrateful asshole is unlikely to be a good way to elicit quality help.
« Last Edit: December 31, 2009, 04:21:14 pm by Blacken »
Logged
"There's vermin fish, which fisherdwarves catch, and animal fish, which catch fisherdwarves." - Flame11235

Rooster

  • Bay Watcher
  • For Chaos!!!
    • View Profile
Re: The Quest for Might and Knowledge: Rooster the brave and mighty wizards!
« Reply #4 on: December 31, 2009, 05:15:26 pm »

haha! That's why (probably) mighty wizards in plural!

Ok, makes sense. Many roguelikes are made in python so I'll give it a go. Thank you for that because I wouldn't have thought of that. The only book I have about programming is in Turbo Pascal, so I'd like to learn that in future too.

You're added to wizards section which will now serve also as credits.

Okay, so you've given a link to a book, but does it include which compilator to choose?
EDIT: Actually if this book is free then why does it look like they want to sell it to me? Oh boy
EDIT2: I want to program a roguelike. Of course I'll start first with easy programs, but then eventually I'll need advice on roguelike making
« Last Edit: December 31, 2009, 05:21:35 pm by Rooster »
Logged

Blacken

  • Bay Watcher
  • Orange Polar Bear
    • View Profile
Re: The Quest for Might and Knowledge: Rooster the brave and mighty wizards!
« Reply #5 on: December 31, 2009, 05:33:37 pm »

Expect a roguelike to take at least three or four months of fairly steady study before you're likely to be able to even know how to start one. Not intended to be discouraging, but it's not for the faint of heart. Almost all of them are more difficult to write than they'd seem, but they are doable, if daunting, even for a beginner so long as you put in the work.

ThinkPython is incredibly well-written and very, very structured in how it presents information. Don't skip anything, even if it doesn't seem germane right away, I promise you that it's relevant down the line. I might even suggest taking a notepad and jotting down notes on paper as you go through the book to help retention--not something that's required, but it might help you out a little. It's what I do on my first trip through any new language, and I still do it despite knowing about twenty different ones.

ThinkPython is sold as a dead-tree book, but you can read the entire thing online or download a PDF.



Python isn't compiled (well, it can be, but for your purposes it's not). You'll use an interpreter, at least at the start. ThinkPython will explain it to you in the first chapter, but it never gives you a link. This is the official Windows Python package, and it includes IDLE, which is what ThinkPython assumes you're using. You won't want to use IDLE later when you're making a real program, but for learning it'll do you just fine.

If you have a technical issue with Python, try using the Python Beginner's Guide before asking questions here; in all likelihood that's where I or anyone else offering help would go to answer your question, so you might be able to easily save a step.
« Last Edit: December 31, 2009, 05:37:07 pm by Blacken »
Logged
"There's vermin fish, which fisherdwarves catch, and animal fish, which catch fisherdwarves." - Flame11235

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: The Quest for Might and Knowledge: Rooster the brave and mighty wizards!
« Reply #6 on: December 31, 2009, 05:36:03 pm »

Blacken: on the other hand, while I was in school c++ was the preferred first teaching language because it was so unforgiving. The idea was to separate the wheat from the chaff, and get people to drop out of the program early before they figure out that it is hard with the higher level courses.

Really though, most languages are viable options. C++, python, java, etc.

I am an expert in java, I was once one in C++ but I have not really touched it in 5 years. I've never used python but have at least looked at it.

I am going to copy a bit from Hippomans other thread where he ignored a lot of good advice...
Quote from: things you should know
Basic programming knowledge:
understanding I/O.
understanding order of operations.
understanding types, classes, objects, collections(usually, most programming languages are class based object oriented)

These are the absolute minimum requirements to be a code monkey. After these are known, only then can he become a programmer.

A programmer knows how to solve problems.
A programmer knows how to follow the rules.
A programmer knows how to get work done.
A programmer understands how a CPU works.
A programmer understands how memory works.
A programmer understands how a program works under the hood, program control, stack, heap etc.

After the basics of programming are known, only then can he become a computer scientist.

A computer scientist understands theta and omega.
A computer scientist understands advanced math and algorithmic problem solving.
A computer scientist can provide proof that problems are solved, rather than demonstration and evidence.

Before you run off and try to make a video game, get through the "code monkey section" and try at least the half of the "programmer section".

I recall from the other thread that you are on a linux machine? If you decide to stay with c++ then gcc is probably one of the best compilers around. When I was on c++ we edited our files in vi, but it would be much better if you found a more conventional text editor with syntax highlighting at the very least.

If you go with java, eclipse is one of the best IDE's available. There is also a c++ version of eclipse, but I have not really used it at all.

I don't really do python, so I'll leave Blacken as its proponent.
« Last Edit: December 31, 2009, 05:38:47 pm by Nadaka »
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.

Blacken

  • Bay Watcher
  • Orange Polar Bear
    • View Profile
Re: The Quest for Might and Knowledge: Rooster the brave and mighty wizards!
« Reply #7 on: December 31, 2009, 05:45:34 pm »

Blacken: on the other hand, while I was in school c++ was the preferred first teaching language because it was so unforgiving. The idea was to separate the wheat from the chaff, and get people to drop out of the program early before they figure out that it is hard with the higher level courses.
Yep. The prevailing wisdom these days seems to be that your department needs more money, so don't chase them off early. I'm not sure whether or not that's better. In this case, I don't care about running him off or taking his money - I'm making a suggestion that will be easier so he doesn't get easily discouraged and quit. Java would be fine too, although it's a little more clunky and I still think having REPL, like in DrJava (though I'd never recommend DrJava for anything else, ever) is a nice thing when starting out.

(Tangent: in Java I actually really prefer NetBeans, as Eclipse is more of an IDE framework than an IDE and it kind of shows, but I'm definitely in the minority on that one.)

I actually don't personally use Python very much. I grok the language and have written some code with it, but I don't profess to be an expert. I haven't spent the time. The only languages I think I'd call myself an expert in are C#, PHP, and maybe-Java. (I've used C++ quite a lot, but I'd never claim to be an expert until I could understand Boost front-and-back.)
Logged
"There's vermin fish, which fisherdwarves catch, and animal fish, which catch fisherdwarves." - Flame11235

eerr

  • Bay Watcher
    • View Profile
Re: The Quest for Might and Knowledge: Rooster the brave and mighty wizards!
« Reply #8 on: December 31, 2009, 06:19:10 pm »

Don't forget to have a primary goal on your quest for knowledge.

Otherwise you are just practicing. And people don't practice hard, intricately, and long merely for the sake of knowing.
Logged

zchris13

  • Bay Watcher
  • YOU SPIN ME RIGHT ROUND~
    • View Profile
Re: The Quest for Might and Knowledge: Rooster the brave and mighty wizards!
« Reply #9 on: December 31, 2009, 06:29:21 pm »

If you go with java, eclipse is one of the best IDE's available. There is also a c++ version of eclipse, but I have not really used it at all.
I just checked out Eclipse for C++ and it's not bad.  Too many buttons sometimes, but whatever.  I'm no programmer.
Logged
this sigtext was furiously out-of-date and has been jettisoned

Blacken

  • Bay Watcher
  • Orange Polar Bear
    • View Profile
Re: The Quest for Might and Knowledge: Rooster the brave and mighty wizards!
« Reply #10 on: December 31, 2009, 07:14:46 pm »

If you go with java, eclipse is one of the best IDE's available. There is also a c++ version of eclipse, but I have not really used it at all.
I just checked out Eclipse for C++ and it's not bad.  Too many buttons sometimes, but whatever.  I'm no programmer.
It works, but the normal benefits of Eclipse (really good refactoring support, basically) don't work so hot in C++. Probably better off with an IDE designed for it. The newest KDevelop is supposedly really good; I don't use Linux on the desktop so I wouldn't know. I generally use Visual Studio with Intel's compiler.
Logged
"There's vermin fish, which fisherdwarves catch, and animal fish, which catch fisherdwarves." - Flame11235

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: The Quest for Might and Knowledge: Rooster the brave and mighty wizards!
« Reply #11 on: January 01, 2010, 02:31:29 am »

GCC? Dousn't it also do C and java?

With C/C++, consider looking into some of the somewhat more advanced compiling commands (I use MinGW, and MinGW is just GCC for windows). One thing to note, is that it doesn't optimize by default, so that debugging is easier. Look up an online refrence to find how to enable optimization when you want speed. (I think -O3 does it)
Logged
Eh?
Eh!

Blacken

  • Bay Watcher
  • Orange Polar Bear
    • View Profile
Re: The Quest for Might and Knowledge: Rooster the brave and mighty wizards!
« Reply #12 on: January 01, 2010, 10:44:44 am »

GCC? Dousn't it also do C and java?

With C/C++, consider looking into some of the somewhat more advanced compiling commands (I use MinGW, and MinGW is just GCC for windows). One thing to note, is that it doesn't optimize by default, so that debugging is easier. Look up an online refrence to find how to enable optimization when you want speed. (I think -O3 does it)
Why would you do any of this when you are learning?

Learn the language. Learn how to program. Then tweak.
Logged
"There's vermin fish, which fisherdwarves catch, and animal fish, which catch fisherdwarves." - Flame11235

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: The Quest for Might and Knowledge: Rooster the brave and mighty wizards!
« Reply #13 on: January 01, 2010, 11:11:45 am »

Right: now is not the time to worry about performance. We have not heard from rooster recently? Making progress I hope? If you do get stuck somewhere and google doesn't help, please let us know.
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.

Rooster

  • Bay Watcher
  • For Chaos!!!
    • View Profile
Re: The Quest for Might and Knowledge: Rooster the brave and mighty wizards!
« Reply #14 on: January 01, 2010, 01:43:56 pm »

Oh. No, I'm still here, just reading the book slowly.

I suppose I should learn a couple of commands first and then see how they work?

Edit:I think I'll be fine If I read 30 pages every day, and do the exercises

Edit2:
Exercise 1.1 Write a well-structured English sentence with invalid tokens in it. Then write another sentence with all valid tokens but with invalid structure

a) House M.D. is puzzlelicious (that's not a word)
b) Murderous genocidal Richard is. (that's LFG. But I assume the exercise wanted me to do that)
« Last Edit: January 01, 2010, 02:58:08 pm by Rooster »
Logged
Pages: [1] 2 3 4