financial opportunity, tremendous need\nmoral pressure, those that can do this now can achieve a lot and should do so\nto be aware about what is happening around you and what is possible\n
al-Kwharizmi\n
Recipe, if you can cook, you can program. Kids can do it and with practice you may become a master chef.\n\nhttp://www.flickr.com/photos/cproppe/4339535475/\n\nYou may burn something, or produce something inedible. But everything if you do it reflexively, you will probably learn something and do it better the next time.\n\nTo extend this analogy further: you can copy paste program just like you can cook, with ready made ingredients.\n
\n
The most basic construct.\n\nYou put a value somewhere where you can do something more with it.\n
All programming is built from these three. This is what we started with.\n\nIf you know how to do these in one language, it’s pretty easy to do it in another. Difference between Spanish and Italian.\n
In computer jargon this is called a branch, because every choice spreads out the possibilities like a tree\n\nhttp://www.flickr.com/photos/squirmelia/3644609288/\n
\n
\n
\n
\n
\n
\n
\n
This is how we used to do stuff. If you only have loops and branches, this is what you get.\n\nPeople would read printouts of machine language. We made things a bit more friendly.\n
If you combine loops and choices then things start to get rather complicated rather quickly.\n\nComes down to delegate. You tell somebody what to do and you don’t care how they do it, you just care about the result.\n\nDit gaan we even allemaal in Python doen. Met Ruby ben ik niet bekend genoeg, en Javascript heeft wat rare dingen hierin zitten.\n
What’s in the function does not matter for who’s outside of it. You the caller just put something in and you get something out of it according to the definition of the contract or the API.\n\nAll kinds of magic could be going on inside the function, assumptions or bugs. They are not your problem (until they are).\n\nhttp://www.flickr.com/photos/nickharris1/4529228162\n
A bit more complicated than funtions, but a natural evolution onwards. Classes are collections of functions (behaviour) that have internal state.\n\nA basic economic model.\n
I’m going on holiday to greece next week, so this was top of mind for me.\n\nOf course this is ridiculously simplistic. But with another couple of classes and methods, you would be well on your way to simulating the European currency market.\n\nClass ESFM with functions. That is the power of classes. They not only hide away even more complexity, you can use them to model things.\n\nAnother bunch of lines, and you will be writing a HFT trading bot.\n
ruby/javascript: array\n\none of a standard object that most languages have, because they are so useful\nused when the order is important\n
map, hash, associative array\n\nanother thing that is always there\nused when the order is not important, but you quickly need to find things\n
http://docs.python.org/library/functions.html\nhttp://docs.python.org/py-modindex.html\n\nMost of these have example code. Are usually a lot packaged with your language. Many you can also download.\n\nThat is all configuration and can be annoying, but is not treated during the course of this 45 minutes.\n