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 6221 times)

Rooster

  • Bay Watcher
  • For Chaos!!!
    • View Profile
Re: The Quest for Might and Knowledge: Rooster the brave and mighty wizards!
« Reply #30 on: January 04, 2010, 08:09:37 am »

I don't think using s.rjust is a good option because I really don't know it's function.
I'll do only things described in the book for now
Logged

Rooster

  • Bay Watcher
  • For Chaos!!!
    • View Profile
Re: The Quest for Might and Knowledge: Rooster the brave and mighty wizards!
« Reply #31 on: January 04, 2010, 03:57:58 pm »

I have so much to do this week that I can't even touch the book for an hour :(

Hopefully I'll get some time on weekend
Logged

Rooster

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

Good god, was I procrastinating :(
It's like a plague.
At least I got better. I have to fight procrastination, and so I'm reviving this thread, and I return to python.
Wish me luck for I have ran out of it, when I was fighting my bad habits last time.
I'll pick off where I left, and look through everything I have done so far.
Logged

eerr

  • Bay Watcher
    • View Profile
Re: The Quest for Might and Knowledge: I have returned to programming
« Reply #33 on: April 03, 2010, 01:26:46 pm »

Whats up now.
Logged

Rooster

  • Bay Watcher
  • For Chaos!!!
    • View Profile
Re: The Quest for Might and Knowledge: I have returned to programming
« Reply #34 on: April 03, 2010, 01:36:16 pm »

Not much.
Going through it slowly.
I hope my poor math skills won't interfere with learning
Logged

eerr

  • Bay Watcher
    • View Profile
Re: The Quest for Might and Knowledge: I have returned to programming
« Reply #35 on: April 03, 2010, 08:04:58 pm »

There really isn't serious math in making personal programs work, usually.

Now making stuff super efficient, is another matter.

I'm sure you'll do fine.
Logged

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: I have returned to programming
« Reply #36 on: April 03, 2010, 08:33:30 pm »

Similarily, a regex is a very powerful tool, but you shouldn't need to use any for a very long time. If you already know them, they are easy and useful, but since one could easily look like this...
Spoiler (click to show/hide)
If you know perl or use grep, you should have a decent grasp of them already, otherwise it is best to wait a while. A Long while.
Logged
Eh?
Eh!

Rooster

  • Bay Watcher
  • For Chaos!!!
    • View Profile
Re: The Quest for Might and Knowledge: I have returned to programming
« Reply #37 on: April 04, 2010, 04:36:00 am »

I have seen 1 kilo bytes rogue likes look like that.
I couldn't decipher anything.
Looks like programming is problem solving.
Since school isn't about that, looks like I'll be learning something usefull.
But those exercises get complex real fast.
That really bothers me.
Logged

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: I have returned to programming
« Reply #38 on: April 05, 2010, 06:39:24 am »

The diffrence, I guess, is that a regex, in python at least, is in quotes
Code: [Select]
R"<expression>"While very compact coding is even harder to understand. That particular example I gave looks for a wide variety of  text-faces, so naturally it must contain many odd characters. Further, many of those are preceeded by a \ because otherwise they would be considered contol characters.
Logged
Eh?
Eh!

Googolplexed

  • Bay Watcher
  • My avatar is of whitespace, Not the firefox logo
    • View Profile
Re: The Quest for Might and Knowledge: I have returned to programming
« Reply #39 on: April 05, 2010, 08:01:10 pm »

Is it just me, or is this topic a mess when it comes to teaching someone to program.
*Compiler optimistion.
*regex
Both very useful to know.. LATER

For now lets concentrate on the basics instead of arguing over sematics that Rooster can't comprehend yet.

As for the exercises, going through them one after the other is never really the best way to learn to program. You know simple I/O(Displaying text and inputing text) and basic control structures(IF, various loops) Then go and try to make something.
IMO I would suggest maybe making a simple text adventure

Learning to program by doing the simple exercices in a book will get you no-where. Learning string manipulation is useless unless you know when to apply it, 90% of programing books forget this.

The best way to learn programming is by trying to solve your own problems, take an easy task, like a text adventure and you will be surprised how many problems you encounter and how much you learn
Logged

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: I have returned to programming
« Reply #40 on: April 05, 2010, 09:37:09 pm »

Try this, then:

Try to make a program that does simple rot13. At a bare minimum, it takes a series of capital letters from the user, and gives the rot13 result. Above that, try to allow spaces(wouldn't be affected) and preserve capitalization.
Logged
Eh?
Eh!

Rooster

  • Bay Watcher
  • For Chaos!!!
    • View Profile
Re: The Quest for Might and Knowledge: I have returned to programming
« Reply #41 on: April 09, 2010, 11:57:55 am »

Googolplexed: Well, thank you. I was actually trying to complete those exercises, but I've met only with failure. I think I'll do just what you recomened and just omit them.

I wonder If moding DF will give me any programing experience?  ;)
Oh well, at least I should make a star craft mod like I promised.
Logged

eerr

  • Bay Watcher
    • View Profile
Re: The Quest for Might and Knowledge: I have returned to programming
« Reply #42 on: April 09, 2010, 04:27:43 pm »

Edit 2:
Going by what you have on the previous page, how is the roguelike going now?

Just curious iabout anything slowing you down.


Also, I totally finished a program for printing a right-aligned table of powers yesterday.(in C)
Managed to fix a problem where I constantly caused segmentation faults >.<.
Spoiler (click to show/hide)
« Last Edit: April 09, 2010, 05:32:10 pm by eerr »
Logged

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: I have returned to programming
« Reply #43 on: April 09, 2010, 09:04:16 pm »

In C, I find a reasonable way to get a string version of a number is

Edit:
Spoiler (click to show/hide)

If that is a copy of the actual code, not initializing power can cause a hidden bug, that varies based on the whims of the stack...
« Last Edit: April 09, 2010, 09:06:18 pm by qwertyuiopas »
Logged
Eh?
Eh!

Googolplexed

  • Bay Watcher
  • My avatar is of whitespace, Not the firefox logo
    • View Profile
Re: The Quest for Might and Knowledge: I have returned to programming
« Reply #44 on: April 10, 2010, 08:04:55 am »

Googolplexed: Well, thank you. I was actually trying to complete those exercises, but I've met only with failure. I think I'll do just what you recomened and just omit them.

I wonder If moding DF will give me any programing experience?  ;)
Oh well, at least I should make a star craft mod like I promised.
Don't treat it as an excuse to do nothing :D
As I said, make a text-adventure, or do what qwerty said, a rot-13 encoder. Either one is a good learning experience.

And I'm afraid that unless there is proper scripting (Not triggers AKA starcraft map editor) and not config editing(DF) that it won't help
Logged
Pages: 1 2 [3] 4