# Learning to code python 3..what next



## Len Phelbs (Jan 21, 2014)

Hey, I'm learning to code in python 3 pretty much out of boredom. I've got friends into bitcoin and have vague interest in building apps so I figured I'd start here and learn coding maybe get my math skills back. I know object-c is the basic language of Iphone but I'm into gaming also (built a contra type game at a summer camp way back) and just starting out on this.

I've heard starting on one helps anyways and I'm looking to get some insight into how coding works to learn about bitcoin operation (and the mtgox melt down, eesh maybe I'm that lazy too codings a goddam effort even after a pot of coffee on a sunday)

let me know if you learned somewhere else or what you'd work on after getting some basics


----------



## arnie (Jan 24, 2012)

Len Phelbs said:


> I've heard starting on one helps anyways and I'm looking to get some insight into how coding works to learn about bitcoin operation (and the mtgox melt down, eesh maybe I'm that lazy too codings a goddam while even after a pot of coffee on a sunday)
> 
> let me know if you learned somewhere else or what you'd work on after getting some basics


Why do you want to learn about bitcoin?


----------



## Len Phelbs (Jan 21, 2014)

Its an interesting type of currency with low fees and maybe investment value depending on the outcome of mtgox's security cock up. The basic idea and code standard are pretty good (supposed to be self policing) though Im still learning and have quetions.

The Mtgox problems are huge (millions of dollars) but seem to either be fixable or at least exist because of human error instead of faulty standards. Look up andreas antonopolous interviews if you want to learn yourself. 

Novel services especially on the internet are a sort of frontier where there's some profit and some freedom


----------



## Missing Link (Jan 20, 2014)

Len, I'm not sure what you're asking about Python. Are you starting out learning programming with Python or do you want suggestions for a project to do in Python?


----------



## Len Phelbs (Jan 21, 2014)

Missing Link said:


> Len, I'm not sure what you're asking about Python. Are you starting out learning programming with Python or do you want suggestions for a project to do in Python?


either one I guess, I'm starting out so i'm interested in what other people do in python or what a good starter project is. From what I understand its used in gaming and getting used more in other areas.

So far I've programmed an international time clock with some help from a guide


----------



## krites (Nov 12, 2013)

Len Phelbs said:


> I figured I'd start here and learn coding maybe get my math skills back.


If you're looking for small exercises to help with combining math and programming logic I'd suggest project euler


----------



## LeeMann (Nov 29, 2012)

Try writing a program that you yourself can use. 

My first python program was a simple exe files' re-namer. It just converts extension of executable files (.exe) in a given directory, to protect them from trojans. It can also restore their extensions when told to do so.

My point is try something that would be fun/useful for yourself. Input Method utility, a simple game, calculator, file/folder locker, etc.


----------



## nullptr (Sep 21, 2012)

Google apparently has a good python reference https://developers.google.com/edu/python/


----------



## Len Phelbs (Jan 21, 2014)

Lee mann - know anywhere that has coding assistance or python guides for those? coursera is good for basics but the projects are pretty token

Krites- thanks what part have you used?


----------



## LeeMann (Nov 29, 2012)

Len Phelbs said:


> Lee mann - know anywhere that has coding assistance or python guides for those? coursera is good for basics but the projects are pretty token


If what you want is to learn the basics, the good old "The Python Tutorial" is good enough for quick start.

If you want to have a reference manual, you can download the whole documentation or view it online in the python.org site. If you want to learn by reading a book and have fun at the same time you can have the Head First Python. You won't be disappointed.

But the thing is if you have some project in mind that you want to do using Python, just know the basics and jump start. You will learn a lot by searching for solutions for the problems you will face as you write more and more code. If you are like me, you could easily be distracted and bored by the details and tech mumbo jumbo in manuals and books.


----------



## NeuromorPhish (Oct 11, 2012)

If you want to learn python for the sake of game development, i'd recommend checking out the pygame tutorials by thenewboston on youtube. 




Good as practice or references i guess, but there are probably lots of other types of games you could make provided more extensive knowledge of the language.

I'd also recommend this online book for more details and (at least for me) a sort of reality check slap-in-the-face-reminder of how much persistence and effort it takes to learn...http://learnpythonthehardway.org/book/.


----------



## Len Phelbs (Jan 21, 2014)

NeuromorPhish said:


> If you want to learn python for the sake of game development, i'd recommend checking out the pygame tutorials by thenewboston on youtube.
> 
> 
> 
> ...


Thanks NeuromorPhish. I'm leaning towards gaming for a bigger project after I take a couple months to get basics. guess Id be at 7/50 comparatively .


----------



## MrKappa (Mar 18, 2013)

Len the best thing about scripting languages, is they are all essentially the same, with slight differences in syntax and features.

If it helps. I started with PHP, AppleScript and JavaScript. JavaScript was the first I learned.

I had to scrap several projects while I was learning.

This was the project that gave me an inside look into how compiled languages such as C or C++ make use of scripting languages, which are sometimes called interpreted code.

http://www.daimonin.org/

It's open source, and makes use of a scripting language called Lua.

Things that helped me learn, were translating physics math notations into functions, and working with solid math, stuff along the lines of what this person has.

http://www.garybeene.com/3d/3d-math.htm

I hope that is at least partially useful information.

I have never used Python myself, but yeah, once you know a small handful of scripting languages, they all begin looking the same.

My favorite though, is AppleScript. Simply because it is so verbose and oddly unique it made learning the basics that much more obvious. You can do very bizarre things with it as well, as many programs such as photoshop and illustrator and others will interface with it. Not incredibly practical, but fun to some degree. I believe microsofts equivalent is VBscript. Unsure.

Lua is really interesting as well.

Php, has one of the best online manuals I've ever seen. Javascript is a big pain the in butt because it is so flexible in ways that people customize libraries to work in very odd and complicated ways. There is never any good manuals either. Or if there is, its there one day and gone the next. So... whatever...

Wish I could say more about Python, the only thing I have heard is that it has strict whitespacing rules or something. It's the preffered server side scripting language of the googleplex, to my understanding as well. Don't quote me on that though, because I don't know that as a fact.


----------



## DeeperUnderstanding (May 19, 2007)

I'm interested in learning Python, on my own. Where do I start? It's not part of my curriculum.


----------



## Len Phelbs (Jan 21, 2014)

I'm liking this coursera intro with video lectures and auto graded assignments. https://www.coursera.org/course/programming1

it's not in session but you can do the course without whatever online cert they offer


----------



## Missing Link (Jan 20, 2014)

DeeperUnderstanding said:


> I'm interested in learning Python, on my own. Where do I start? It's not part of my curriculum.


Try this:
http://www.codecademy.com/tracks/python


----------



## bobby. (Mar 29, 2011)

Python is weird and confusing. Start with C and assembly, then C++. That's how you become a pro.


----------



## Len Phelbs (Jan 21, 2014)

Oob said:


> Python is weird and confusing. Start with C and assembly, then C++. That's how you become a pro.


That would be my other option, what do you find confusing about python?


----------



## bobby. (Mar 29, 2011)

Len Phelbs said:


> That would be my other option, what do you find confusing about python?


It's very high-level, meaning many of its abstractions/features seem arbitrary and don't correspond well to the underlying system. It makes it difficult to reason about efficiency as you don't really know what's going on under the hood. Starting with Python will leave you with a hazy feeling of not really understanding how your program is working on a deep level.

C, on the other hand, is a very simple, compiled language. It's easy to visualise what is 'really' going on as the program is running, and you'll understand computers a lot better after playing around with it.

C++ is probably the most complex language there is, but you don't have to use all of its features. Once you've become proficient in C++, learning any other imperative, object-oriented language will be a breeze. I once completed a Java assignment in an afternoon having never previously written a single line of Java. I did the same for Haskell and Javascript - not because I'm smart, but because most other languages are essentially C++ minus a bunch of features, and different syntax.


----------



## Len Phelbs (Jan 21, 2014)

Oob said:


> It's very high-level, meaning many of its abstractions/features seem arbitrary and don't correspond well to the underlying system. It makes it difficult to reason about efficiency as you don't really know what's going on under the hood. Starting with Python will leave you with a hazy feeling of not really understanding how your program is working on a deep level.
> 
> C, on the other hand, is a very simple, compiled language. It's easy to visualise what is 'really' going on as the program is running, and you'll understand computers a lot better after playing around with it.
> 
> C++ is probably the most complex language there is, but you don't have to use all of its features. Once you've become proficient in C++, learning any other imperative, object-oriented language will be a breeze. I once completed a Java assignment in an afternoon having never previously written a single line of Java. I did the same for Haskell and Javascript - not because I'm smart, but because most other languages are essentially C++ minus a bunch of features, and different syntax.


Interesting, what would you recommend for a C or C++ basics program?


----------



## bobby. (Mar 29, 2011)

Len Phelbs said:


> Interesting, what would you recommend for a C or C++ basics program?


Start with these:

1) A program that prints the words "Hello World!" to the console.
2) A program that calculates the prime factors of a number. E.g. input: 2457, output: 3 3 3 7 13.
3) A game of hangman that loads a list of words from a text file.


----------



## nullptr (Sep 21, 2012)

Oob said:


> Python is weird and confusing. Start with C and assembly, then C++. That's how you become a pro.


Though i agree with C++. Dont C and assembly seem a bit outdated, most people want some sort of visual result and a program like that would take forever with just those.


----------



## Len Phelbs (Jan 21, 2014)

Oob said:


> Start with these:
> 
> 1) A program that prints the words "Hello World!" to the console.
> 2) A program that calculates the prime factors of a number. E.g. input: 2457, output: 3 3 3 7 13.
> 3) A game of hangman that loads a list of words from a text file.


I'm mostly wonder where you would go to learn C and C++, is there an online course to take you'd perfer ?


----------



## forex (Dec 29, 2010)

coding is not that easy. it needs "time" and a relaxed enviourment a clear head. 
do you have that ?


----------



## Len Phelbs (Jan 21, 2014)

yeah, i can find 5 hours a week to learn code. I'm keeping up with the weekly course work that gets you through this http://learnpythonthehardway.org/book/ or this https://www.coursera.org/course/programming1 in about 2 months.

I agree it's a lot of work/focus


----------



## forex (Dec 29, 2010)

TITLE: LEARN PYTHON THE HARD WAY: A VERY SIMPLE INTRODUCTION 
TO THE TERRIFYINGLY BEAUTIFUL WORLD OF COMPUTERS AND 
CODE, 3RD EDITION

http://uploaded.net/file/yc8gsku1

---------------------------------------

Beginning C, 5th Edition By Ivor Horton 
2013 | 688 Pages | ISBN: 1430248815 | EPUB + PDF | 5 MB + 5 MB

http://depositfiles.com/files/h1q9fki7m


----------



## Len Phelbs (Jan 21, 2014)

thanks forex. When I think about it I'm realizing this is a weird place to ask about coding since it's not getting me out or working on SA. I'm mostly getting bored with what I'm doing and getting back to learning seems right. Will see how it goes and where I'm at on the other side of 5 more weeks.


----------



## Len Phelbs (Jan 21, 2014)

also new language announced from Wolfram, linked to the engine that drives Siri

http://venturebeat.com/2013/11/29/s...ew-insanely-ambitious-computational-paradigm/


----------



## mike91 (Sep 23, 2012)

I tried to learn java I can read it but not write unless basic and that was after a year of reading ebooks and watching YouTube videos im dumb when it comes to words or even engish I say a year 3 student is smarter than me


----------



## nullptr (Sep 21, 2012)

mike91 said:


> I tried to learn java I can read it but not write unless basic and that was after a year of reading ebooks and watching YouTube videos im dumb when it comes to words or even engish I say a year 3 student is smarter than me


I actually have trouble reading code not writing, so it's the other way around for me .

Actually i've been thinking about it, and to someone new to software development frontend web programming as horrendous as that may sound to some seems like a good starting point. 
My points

Easily Accessible (Only needs a text editor and browser)
No need to compile or build a project
Dynamic and can see graphic results of code easily
Not much boilerplate code to do graphical tasks


----------



## Len Phelbs (Jan 21, 2014)

Anyone have a pretty basic project they want to share code from? i guess this is what Github is for, but I'm looking for a practical application to get motivated, Will spend a couple hours looking and giving feedback if you want it or try to help.

Still learning and not looking to build a text based game that my skills allow.


----------



## bobby. (Mar 29, 2011)

Len Phelbs said:


> Anyone have a pretty basic project they want to share code from? i guess this is what Github is for, but I'm looking for a practical application to get motivated, Will spend a couple hours looking and giving feedback if you want it or try to help.
> 
> Still learning and not looking to build a text based game that my skills allow.


Here's a game of hangman I made in C++. As a beginner, you'll likely find it hard to understand, but you might be able to glean something from it, such as how a project should be laid out and structured into various modules. In particular, look at the header files (with .hpp extension).

Here is another short project I built over a couple of days. It's an assembler for the Hack computer described in the book The Elements of Computing Systems, which I'm currently working my way though - and which I highly recommend by the way.

Sorry if these seem off-puttingly complex. Bear in mind they're both slightly over-engineered, and could be made much simpler if certain sacrifices are made.


----------



## Len Phelbs (Jan 21, 2014)

Oob said:


> Here's a game of hangman I made in C++. As a beginner, you'll likely find it hard to understand, but you might be able to glean something from it, such as how a project should be laid out and structured into various modules. In particular, look at the header files (with .hpp extension).
> 
> Here is another short project I built over a couple of days. It's an assembler for the Hack computer described in the book The Elements of Computing Systems, which I'm currently working my way though - and which I highly recommend by the way.
> 
> Sorry if these seem off-puttingly complex. Bear in mind they're both slightly over-engineered, and could be made much simpler if certain sacrifices are made.


thanks, I'm going to start the crossword on the weekend so I'll look at your hangman game. what is a hack computer, a set of hacking tools?

after some more time on python, Ojective C or C+ is the next course I need to take


----------



## bobby. (Mar 29, 2011)

Len Phelbs said:


> thanks, I'm going to start the crossword on the weekend so I'll look at your hangman game. what is a hack computer, a set of hacking tools?
> 
> after some more time on python, Ojective C or C+ is the next course I need to take


Hack is just the name of the computer they teach you how to build in the book. You have to build it from scratch starting with just NAND gates.


----------



## Len Phelbs (Jan 21, 2014)

Oob- interesting, that is meant to give you ideas on software building/a functional computer or is mainly an exercise?


----------



## Len Phelbs (Jan 21, 2014)

found a course on mobile apps and api usage.

https://www.coursera.org/course/digitalmedia

the MO course starts in June. will probably at least watch the course lectures


----------

