fan_eunice (
fan_eunice) wrote2015-04-10 02:36 pm
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Adventures in Python and Pi(e)
Goal: post daily, even if it's just a 'yup, still here' message.
I warn in advance, the way I am coping with a lot of my brain stuff is super random so if there is subject matter it is likely to be all over the place on any given day. Also, probably boring. Sorry? I plan to (subject to change, because who knows when a long whiny post about being crazy might suddenly seem like a good and cathartic idea) not post about the brain stuff itself, though.
Today it's programming. Specifically that programming has been added to my list of 'stuff I'd like to learn'. That's a long list, which I tend to jump around a lot on, getting obsessive for awhile and then jumping to something else on the list for awhile and then jumping back and ending up with a lot of 'knows a little about a lot' rather than a lot about anything, but anyhoo. I like to learn stuff?
Python is my starting point, and so far I'm having fun even though I have not progressed much beyond "Hello, world!". Current observation on learning materials for beginning programmers: oh my god, y'all, not all of us want to learn programming because we are also math geeks. Some of us enjoy logic and problem solving but loaaaathe math.
So making so many of your beginning examples with the assumption that I either already know how to do shit like calculate the angle of a polygon on paper, or would ever want to is a bit counterproductive. If you're me. Because the actual concept you're trying to teach me has nothing to do with calculating the radius of a circle and everything to do with being able to translate 'thing I know I want the computer to do' into 'the language I use to tell the computer so it understands to do the thing'.
If I don't know how to do or understand the thing you want me to want the computer to do, I'm going to spend half my time trying to figure out what doing that thing looks like so I can then tell the computer to do it, and that leads to me crying into my variables whimpering 'No seriously, I only care about pi when it's being used as a a joke about Dean Winchester and snacks' and then it takes me twice as long to get to the part where I understand how to tell the computer to do a thing. So:
Makes TOTAL sense to me if it was an example (it...actually works when I run it through the interpreter, though I'm sure I did something wrong or I could make it much cooler if I knew more, and as it stands if the hypothetical user typed in 'blueberry pie' instead of just 'pie' at this point Dean would erroneously be hating on them. But you notice how there's NO MATH, and yet I made the computer do a thing? I wish more programming resources embraced this concept. Perhaps with less manpain tears. But definitely more pie.
Anyhoo, this is your random ramble on my adventures in learning to program today.
I warn in advance, the way I am coping with a lot of my brain stuff is super random so if there is subject matter it is likely to be all over the place on any given day. Also, probably boring. Sorry? I plan to (subject to change, because who knows when a long whiny post about being crazy might suddenly seem like a good and cathartic idea) not post about the brain stuff itself, though.
Today it's programming. Specifically that programming has been added to my list of 'stuff I'd like to learn'. That's a long list, which I tend to jump around a lot on, getting obsessive for awhile and then jumping to something else on the list for awhile and then jumping back and ending up with a lot of 'knows a little about a lot' rather than a lot about anything, but anyhoo. I like to learn stuff?
Python is my starting point, and so far I'm having fun even though I have not progressed much beyond "Hello, world!". Current observation on learning materials for beginning programmers: oh my god, y'all, not all of us want to learn programming because we are also math geeks. Some of us enjoy logic and problem solving but loaaaathe math.
So making so many of your beginning examples with the assumption that I either already know how to do shit like calculate the angle of a polygon on paper, or would ever want to is a bit counterproductive. If you're me. Because the actual concept you're trying to teach me has nothing to do with calculating the radius of a circle and everything to do with being able to translate 'thing I know I want the computer to do' into 'the language I use to tell the computer so it understands to do the thing'.
If I don't know how to do or understand the thing you want me to want the computer to do, I'm going to spend half my time trying to figure out what doing that thing looks like so I can then tell the computer to do it, and that leads to me crying into my variables whimpering 'No seriously, I only care about pi when it's being used as a a joke about Dean Winchester and snacks' and then it takes me twice as long to get to the part where I understand how to tell the computer to do a thing. So:
def dean_wants_pie(tasty_treat): if tasty_treat=="pie": print("No more single manpain tears, PIE FIXES EVERYTHING") else: print("Dean hates you now") dean_wants_pie(input("What kind of tasty treat do you have?"))
Makes TOTAL sense to me if it was an example (it...actually works when I run it through the interpreter, though I'm sure I did something wrong or I could make it much cooler if I knew more, and as it stands if the hypothetical user typed in 'blueberry pie' instead of just 'pie' at this point Dean would erroneously be hating on them. But you notice how there's NO MATH, and yet I made the computer do a thing? I wish more programming resources embraced this concept. Perhaps with less manpain tears. But definitely more pie.
Anyhoo, this is your random ramble on my adventures in learning to program today.
no subject
I recently had to learn some python quick-like for my job. I used "python the hard way" which is kinda misnamed; in my opinion it is kinda like the immersion way of learning a foreign language, every lesson just has you doing it, and bit by bit you learn it in pieces. Python is fairly popular lately; personally I find it a bit painful but useful for some things.
no subject
How come you find Python painful? It feels pretty straightforward to me as of now, but I'm also still in the early stages where I'm not trying to make it do anything too complicated.
no subject
Python has a number of features that are... user friendly, I guess. That's the cool new thing. (See also Ruby, the language you can easily mistake for "that thing I wrote out in normal english pseudocode and will actually write in a real language later". (That link goes to a really popular book to learn Ruby; you may like it.))
My biggest annoyance with Python, and an easy example to explain -- in most (nearly all) programming languages, indentation is a human thing, for readability. There's no meaning to the intents; there's plenty of styles (and flame wars) over the 'proper' way to indent things, but mostly it is done solely to make your eyeballs happier. Python, on the other hand, says "screw using {}s for blocks of code, we folks all indent stuff, and often a section of intended lines is a logical grouping, so *POOF* intentation replaces {} for marking sections, tada.
For you, you may never have these issues at all, and in fact value Python precisely for these features. For me, and my daily usage of Perl and history of many other older programming languages, Python hurts me in my hurty place.
no subject
Good luck Becca :)
no subject
no subject