Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411594 Posts in 69387 Topics- by 58444 Members - Latest Member: YomiKu_0

May 08, 2024, 01:36:36 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Peevish Peruses Python
Pages: [1] 2
Print
Author Topic: Peevish Peruses Python  (Read 5201 times)
Peevish
Level 4
****



View Profile WWW
« on: February 18, 2009, 07:30:47 PM »

Starting In -3 Days:

Peevish Peruses Python.

Following: Peevish Placates Ponies.

Double Encore: Peevish Picks Pack of Pickled Peppers.

Story follows:

With no coding experience save rudimentary HTML and some yelling at the AGS scripting language, Peevish accepts that no game maker will ever come out for the Mac within his price range (~$0). Peevish decides to learn Python.

Using a tutorial (see also: tuttoreal, totoreuhl, http://www.swaroopch.com/notes/Python), Peevish embarks on the dark forest of Pythonic Whimsy.

Sunday: Hello World. Tutorial has notes for Linux and Windows, none for Mac; program works but does it work the way they say it should work? Peevish goes to bed after a helping of ANGST.

Monday: Peevish reassures himself, "yes yes, sweetheart, it's working properly, you're computer just said hello."

Tuesday: Peevish writes a program that asks the user "how much bread?" And when the user enters 7 (as users invariably do), it tells the user "you have 7 bread."
---IMPORTANT NOTE: Peevish had recently watched the most recent, Gondry-directed episode of Flight Of The Conchords, and had "Too Many Dicks On The Dancefloor" booming in his recently-Pythonic brain; program may have, in fact, asked "how many dicks" and responded with "you have 7 dicks." In Peevish's defense, this made him giggle. And that was very very important in this early stage.

In no time Peevish will have torn his way onto the indie gaming scene with a fucking axe!

Story continues at some point...
« Last Edit: March 19, 2009, 09:13:19 PM by Derek » Logged
george
Level 7
**



View Profile
« Reply #1 on: February 18, 2009, 07:38:36 PM »

Props Peevish! Possibly post-perusal of Python pick up pyglet, a package for presenting your programming.
Logged
Peevish
Level 4
****



View Profile WWW
« Reply #2 on: February 18, 2009, 09:28:57 PM »

Peevish 'preciates prospect of Pyglet, professes preference for Pygame, but pronounces no presuppositions!
Logged
Peevish
Level 4
****



View Profile WWW
« Reply #3 on: February 18, 2009, 10:24:16 PM »

Wednesday (technically Thursday but to HELL with technically): Peevish discovers how to use Python to calculate both the area and perimeter of a 2x5 rectangle, HE IS SURELY FROM THE PLANET KRYPTON! Understands notions of "if", "elif", and "else", but is now getting ahead of tutorial, cannot seem to implement them properly. Peevish is not Einstein but might be Eisenstein. He does look slightly Slavic in this light.

Unrelated: Peevish finds single grain of cooked rice stuck to neck, is confused.
Logged
bateleur
Level 10
*****



View Profile
« Reply #4 on: February 18, 2009, 11:30:41 PM »

Unrelated: Peevish finds single grain of cooked rice stuck to neck, is confused.

I dunno, are you sure that's not a Python bug?
Logged

TheBlackMask
Level 2
**


View Profile
« Reply #5 on: February 19, 2009, 12:16:02 AM »

Quote
With no coding experience save rudimentary HTML and some yelling at the AGS scripting language, Peevish accepts that no game maker will ever come out for the Mac within his price range (~$0). Peevish decides to learn Python.

Game Maker is due out for the Mac this year.  I have the beta and can prove it's existence, even.
Logged
Peevish
Level 4
****



View Profile WWW
« Reply #6 on: February 19, 2009, 08:36:38 AM »

Game Maker will cost some amount of money; I have no amount of money. I was using MMF2 for a little while but the game I want to make involves one or two mechanics that I simply couldn't get to work with a game maker, and I think I'll open up my options a lot more working from the ground up.

So far coding is actually kinda fun.
Logged
Peevish
Level 4
****



View Profile WWW
« Reply #7 on: February 19, 2009, 06:34:56 PM »

Thursday: Aha! Colons. THAT'S what was missing. "if-elif-else" mastered, Peevish can conceivably write a Choose Your Own Adventure now. Also manipulated "while" to do his bidding. Piecing together information from this and another tutorial, wrote a program that actually asks for an amount of bread and then critiques the quantity ("you have too much bread!"; ""that's some good bread!"). This time no crudity.

notes: Peevish ponders propensity to call user "dillhole." Decides it's okay since the user is himself.

cheekiness = False
Hey, coders: the tutorial says, when prompting the user to input a number, to use int(raw_input("Input a number, dillhole: ")) Another tutorial only mentioned input("Input a number, dillhole: ")

I get that using int() will convert a string into an integer, but I'm in a grey area on what the difference is between input() and raw_input(). Thoughts?

cheekiness = True
Peevish tends to end programs with "the program is Finnish'd."
Logged
george
Level 7
**



View Profile
« Reply #8 on: February 19, 2009, 06:44:49 PM »

For your purposes it probably doesn't matter, but raw_input passes exactly what's entered (the raw data) while input conceivably could execute some code before passing it.
Logged
Peevish
Level 4
****



View Profile WWW
« Reply #9 on: February 20, 2009, 11:03:02 PM »

Pupdate:

later Thursday: for, in, and range: dabbling. Peevish feels he should perhaps speed this process along; these functions are surely useful, but their use is so abstract right now. If he doesn't use them in something meaningful soon, he's likely to forget them. Also: notices tendency to type "pring" when he means to type "print." Why? Submit your vote (polls are persistently prudent), maybe.

Friday: baking vegan cookies; number of dark chocolate chips eaten by the handful far exceeds Peevish's intake of any other food, coding sesh is a short'n. break, continue, len(s), ready to barf in a toilet. New Judd Apatow movie looks kinda bad but maybe it's just the trailer, old floormate's band played tonight and they were pretty okay, Peevish should probably clean his room. Oh look, a proper use for raw_input() where input() would not suffice. Useful!

(thanks, george, for the input on input())

The guy that wrote this tutorial keeps talking about "the later chapters" but Peevish is already through more than 1/3 of this thing and there's only been one chapter so far...
Logged
BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #10 on: February 21, 2009, 02:47:17 AM »

I just wanted to say, though I'd have given advice on starting python, your tendency to refer to yourself in third person, and your verbose and irrelevant writing style, have put me off completely. What do you think you're gaining by affecting such mannerisms (fun jousting critics such as myself, I suppose)?
Logged
Peevish
Level 4
****



View Profile WWW
« Reply #11 on: February 21, 2009, 10:52:17 AM »

I see, instead of providing advice you've provided the opposite.

Writing Python is fun by design. Writing about Python can also be fun. If reading about it is not fun, don't do it. You're comments have been acknowledged and disregarded.
Logged
BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #12 on: February 21, 2009, 12:32:00 PM »

I haven't given any advice along with my snarky comments (as I would usually), because I DIDN'T READ what you had to say, it was just too painful. I don't think I'm alone in this. Considering you are posting on a forum, it seems a fair assumption that you are posting in the hope that people will read your posts and reply, and you are therefore working counter to your own purposes. I might be wrong, as the whole thing reads more like a monologue with occasional questions rather than the initiation of a conversation. Perhaps the blog format would suit you better?

Anyway, you are evidently not keen to listen, so feel free to ignore this post entirely, and I shall leave you alone.
Logged
J.G. Martins
Level 2
**


AKA anvilfolk


View Profile WWW
« Reply #13 on: February 22, 2009, 08:16:52 AM »

No offence to Boris, I've actually been having some fun reading this. It's nice to see someone making progress in learning a programming language, and reporting it in an unusual way. I'm sure if he has some more technical questions, he won't mind putting them here, like he has done with input and raw_input.
Logged

Gold is for the mistress -- silver for the maid --
Copper for the craftsman cunning at his trade.
"Good!" cried the Baron, sitting in his hall,
"But iron, cold iron, is the master of them all."
--- Rudyard Kipling
ElTipejoLoco
Level 2
**

You can call me Edua.


View Profile WWW
« Reply #14 on: February 22, 2009, 08:28:21 AM »

Boris needs to read John Dies at The End, and if he ends up disliking it, then he can continue down his surly road of... surliness.

Peevish should make a "Choose your own adventure, dillhole" adventure game. Perhaps, in it, the player character should at one moment be encouraged to examine his neck, only to find a vital tool for an extremely obscure puzzle. Puzzle may or may not involve dicks or starving chinese orphans.

Peevish may disregard this suggestion as 'much too silly and self-referential even by his own standards'.
Logged


Currently brainstorming for a project
Peevish
Level 4
****



View Profile WWW
« Reply #15 on: February 22, 2009, 04:13:09 PM »

Sunday:

name = raw_input("Enter your name: ")

if name != "Boris":
    print "Pleasure to meet you,", name
else:
    print "Go fuck yourself."


(Peevish takes it a step too far)
Logged
J.G. Martins
Level 2
**


AKA anvilfolk


View Profile WWW
« Reply #16 on: February 22, 2009, 06:09:01 PM »

Yeah, that was a step too far. I'd recommend you edit it.
Logged

Gold is for the mistress -- silver for the maid --
Copper for the craftsman cunning at his trade.
"Good!" cried the Baron, sitting in his hall,
"But iron, cold iron, is the master of them all."
--- Rudyard Kipling
Peevish
Level 4
****



View Profile WWW
« Reply #17 on: February 22, 2009, 10:50:47 PM »

You're right, I should probably be using a ==
Logged
gnat
Level 1
*



View Profile WWW
« Reply #18 on: February 24, 2009, 11:46:52 AM »

Peevish, do continue.   Gentleman
Logged

LAN Party List - The definitive LAN party list. Also Game Jams, etc.
GitHub
Peevish
Level 4
****



View Profile WWW
« Reply #19 on: February 24, 2009, 07:59:50 PM »

Sunday: Peevish crossed the bar, placed his hand lightly on Boris's shoulder, and asked if he wanted to step outside and settle this as adults. Differences have been settled. Peevish admits his reaction was excessive, conceding that it made him feel lot better.
-also: all this use of def and func make Peevish feel he's at the poetry slam.

Monday: Peevish got a job in a bank through a new temp agency. This is not related to Python as far as can be known.

Tuesday: Holy hell, pack on PYTHON! Peevish feels like a snowball ready to start an avalanche, but not there yet; surely one of these days he will simply let loose and finish the entire tutorial in one go, and it will be AWESOME. Meantime, Peevish feels at best tourist-level conversational in Python, understanding its general rules but having trouble writing original code. Doing a few pages of tutorial a night leaves facts disjointed, will likely have to skim this Tutorial again once it's finished. Learned keyword arguments and literal statements.

Realizes life is considerably less interesting than a Jason Statham movie.

cheekiness = False
Like, seriously, if anyone knows a good glossary of Python terms, I will not yell at you for sharing. Having trouble keeping straight what's an argument, string, function, etc. Remembering when I was learning guitar and I heard the word "arpeggio" maybe three times a night, vaguely remembering that I knew what it meant once. And when I was reminded by a musician years of lessons suddenly made sense.

going to bed = True
Logged
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic