Programming is more than just typing, and takes more than talent. Producing software takes time, dedication, and teamwork. This talk gives guiding points for those learning to program and a demonstration of setting up a Flask web app.
in different languages. – Python vs Haskell – Objected oriented vs Functional programming ▪ Share insights to things I’ve learned – Right-brained, visual approaches – It’s important to publish readable code – It’s possible to code with only text editor – no IDEs!
data science – Web development ▪ NYC Python & NYC PyLadies organizer ▪ Now dabbling in Haskell too! – Functional Programming FTW! Want to learn data science? Take my online course! J https://teamtreehouse.com/signup_code/DrKat
This is noun-orientation, objects are classes that have attributes. – Good when you have a fixed set of operations on things Real World Analogy ▪ Sneaker – Material – Size – Brand – calculatePrice – calculateMileage ▪ Sandal – Material – Size – Brand – calculatePrice – calculateMileage
of OOP: – Adding new operations require editing many classes – Error prone ▪ Advice: write objected oriented code in the style of functions, then compose them As long as your items fit in the bins….
easier to compose – Functions should not have side effects – same output every time – Functions should be limited in scope and functionality – keep it simple ▪ Example: def reversed(numbers): new_list = list(reversed(numbers)) return new_list
teammate or client and no documents ▪ Leaving a project for someone else taking over ▪ Coming back to code you wrote years ago ▪ Do you really want to spend hours figuring out if a bug is just a typo?
guide https://www.python.org/dev/peps/pep-0008/ – Guidelines for indentation, line lengths, commenting ▪ Keep your code simple, consider it poetry ▪ Writing simple functions helps you manage complexity better ▪ Functions should not have side effects – it should give the same output every time ▪ Perform assertions of types
Hard Way http://learnpythonthehardway.org/book/ ▪ Videos – Treehouse http://teamtreehouse.com ▪ Local User Groups – NYC Python Study Groups and Office Hours http://learn.nycpython.org
we don’t worry. • Coding is not the same as regurgitating document specifications. It’s about building something usable. • It’s important to have the ability to reason about types.
Connect the API api = Connection(appid=settings.api_secret, config_file=None) response = api.execute('findItemsAdvanced', {'keywords’: ‘Yeezy’}) items = response.reply.searchResult.item