behavior of a machine (o6en a computer). Like natural languages, programming languages conform to rules for syntax and seman?cs. Objec?ve C, Ruby, Python, PHP, C#, Go, Java, C, C++ Many, many, MANY others.
vs PHP • Choosing a Programming Language: So easy, a caveman can do it • Programming Language Comparison • How to Pick the Right Programming Language • Choosing a Programming Language • How do you choose to use a specific programming language?
important to focus on some “non-‐func?onal requirements.” A requirement that specifies criteria that can be used to judge the opera?on of a system, rather than specific behaviors. Scalability, Maintainability, Reliability, Availability, Extensibility, Performance, Manageability, Security
ideas differently. Mamihlapinatapei: Yagan (indigenous language of Tierra del Fuego) – “the wordless, yet meaningful look shared by two people who both desire to ini?ate something but are both reluctant to start.” But languages share many commonali?es. Same goes for programming languages. E.g. if you know the generali?es of noun/verb interac?ons, it’s easier to learn a new language.
the procedure call. Procedures, also known as rou?nes, subrou?nes, methods, or func?ons simply contain a series of computa?onal steps to be carried out. Any given procedure might be called at any point during a program's execu?on, including by other procedures or itself.
a list of instruc?ons telling a computer, step-‐by-‐step, what to do and usually having a linear order of execu?on from the first statement to the second and so forth with occasional loops and branches. Modularity is generally desirable, especially in large, complicated programs. Inputs are usually specified syntac?cally in the form of arguments and the outputs delivered as return values.
emphasizes separa?ng the func?onality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect of the desired func?onality. Scoping is another technique that helps keep procedures strongly modular. It prevents the procedure from accessing the variables of other procedures (and vice-‐versa), including previous instances of itself, without explicit authoriza?on.
is where you start with a problem (procedure) and then systema?cally break the problem down into sub problems (sub procedures). This is called func?onal decomposi?on, which con?nues un?l a sub problem is straigh^orward enough to be solved by the corresponding sub procedure.
is that so6ware maintenance can be difficult and ?me consuming. When changes are made to the main procedure (top), those changes can cascade to the sub procedures of main, and the sub-‐sub procedures and so on, where the change may impact all procedures in the pyramid.
over ?me communi?es can become segregated based on various prejudices. 1. Break the problem down into one dimension; a street ini?ally populated with equal probability either black ‘B’, white ‘W’ or empty ‘ ‘ houses. 2. We then allow the system to evolve by randomly selec?ng houses and applying a simple condi?on: If the house is surrounded on both sides by a house different to itself, it will decide to move to an empty loca?on in the street where this condi?on is not sa?sfied. In the unlikely event that a suitable loca?on cannot be found a6er a designated number of aeempts, the house will leave the street.
type of house that plays by different rules, then see how the simulaGon differs? Consider a nomad type house (label ‘N’) which does not care about its neighbors. However, it remembers how long it has been in one locaGon, and if longer than a specified threshold it moves to a new locaGon. How must we modify the original program in order to account for these new rules?