background preloader

Learn Python The Hard Way

Learn Python The Hard Way
This exercise has no code. It is simply the exercise you complete to get your computer to run Python. You should follow these instructions as exactly as possible. For example, Mac OS X computers already have Python 2, so do not install Python 3 (or any Python). Go to with your browser, get the Notepad++ text editor, and install it. From now on, when I say "Terminal" or "shell" I mean PowerShell and that's what you should use. Warning Sometimes you install Python on Windows and it doesn't configure the path correctly. > python ActivePython 2.6.5.12 (ActiveState Software Inc.) based on Python 2.6.5 (r265:79063, Mar 20 2010, 14:22:52) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> quit()> mkdir mystuff > cd mystuff ... It is still correct if you see different information than mine, but yours should be similar. A major part of this book is learning to research programming topics online.

Quick Tip: The OOP Principle of Coupling So far in this series, we've discussed object-oriented programming in general, and the OOP principle of cohesion. In this article, we'll look at the principle of coupling and how it helps in game development. Note: Although this tutorial is written using Java, you should be able to use the same techniques and concepts in almost any game development environment. Coupling looks at the relationship between objects and how closely connected they are. A Relations Diagram is a great way to visualise the connections between objects. A relations diagram A good example of coupling is HTML and CSS. Objects that are independent from one another and do not directly modify the state of other objects are said to be loosely coupled. A loosely coupled system Objects that rely on other objects and can modify the states of other objects are said to be tightly coupled. A tightly coupled system A common phrase you'll hear is "strive for low coupling and high cohesion".

RegexOne - Learn regular expressions with interactive examples Introduction: Giants In Tiny Pants Do you like word problems? You know those annoying "math" questions you had to study in class simply because the SAT used them. They went something like this: "A train leaving a station at 10:50pm from San Francisco is travelling at 40MPH. Another train leaving Chicago at 12:00pm is going 60MPH. Even today, after studying years of advanced mathematics, statistics, and computer science, I still can't solve these things. Imagine if all mathematics was like this where every single problem you encountered, no matter how simple or complex, was only written as English because nobody understood the symbols. Thankfully, humans invented symbols to succinctly describe the things that symbols are best at describing, and left human languages to describe the rest.footnote{Thankfully, the things that can be described with symbols is pretty small or else nobody would be able to read.} Effectively a regular expression is the algebra equation to a programming language's word problem. (?

How to be a Programmer: A Short, Comprehensive, and Personal Summary Debugging is the cornerstone of being a programmer. The first meaning of the verb to debug is to remove errors, but the meaning that really matters is to see into the execution of a program by examining it. A programmer that cannot debug effectively is blind. Idealists that think design, or analysis, or complexity theory, or whatnot, are more fundamental are not working programmers. Debugging is about the running of programs, not programs themselves. To get visibility into the execution of a program you must be able to execute the code and observe something about it. The common ways of looking into the ‘innards’ of an executing program can be categorized as: Using a debugging tool, Printlining --- Making a temporary modification to the program, typically adding lines that print information out, and Logging --- Creating a permanent window into the programs execution in the form of a log. Some beginners fear debugging when it requires modifying code. How to Understand Performance Problems

Flatiron School Prework

Related: