Difference between revisions of "User:Regulus bloodmoon/Programming for Capsuleers"
(5 intermediate revisions by the same user not shown) | |||
Line 63: | Line 63: | ||
===Useful libraries and techniques=== | ===Useful libraries and techniques=== | ||
+ | Here's where second-year CS majors can start to follow the course if they haven't been following yet. | ||
+ | |||
+ | Outline: | ||
+ | |||
+ | * Structured data storage, structured data querying. The SQLite database engine: storing and retrieving tabular data. | ||
+ | * XML parsing. | ||
+ | * Additional topics TBD. | ||
+ | |||
+ | GUI programming is not on this list because that's an entire course in itself, but ''basics'' could be covered if sufficient demand. | ||
===EVE-specific stuff=== | ===EVE-specific stuff=== | ||
+ | Here's where experienced programmers can listen in. | ||
+ | |||
+ | Outline: | ||
+ | |||
+ | * The EVE API. API keys. Connecting to the API, getting useful information, making sense of it all. | ||
+ | ** Practice: collating all assets owned everywhere. | ||
+ | * The Reverence cache library. What's in the cache? ZOMG so much stuff; discovering what's there, making sense of it all. | ||
+ | ** Practice: collating all the cached market data from Jita 4-4. | ||
+ | * The EVE-Central API. | ||
+ | ** Practice: calculating a character's total net worth. | ||
+ | ** Practice: using data from EVE-Central and the cache, put together an accurate picture of mineral prices in major trade hubs. | ||
+ | * The static data dump. Getting the static data dump. What's in the static data dump? ZOMG so much stuff; making sense of it all. | ||
+ | ** Practice: calculating the shortest route from Jita to Aldrat. | ||
+ | ** Practice: calculating a bill of materials for T1 and T2 items; there are subtleties particularly in the T2 calculation that will become important. | ||
===Software engineering: design and implementation=== | ===Software engineering: design and implementation=== | ||
+ | Outline: | ||
+ | * It all starts with an idea. Putting together a design document, functional specification from the requirements. | ||
+ | * Outlining the code. Iterating on the outline. Details are good; the objective is to break the project into pieces smaller than your own head. | ||
+ | * Implementation. Writing up and documenting code. Coding style, documentation style. | ||
+ | * Testing. Testing. More testing. Debugging: one of those things that's so hard to teach, but that doesn't mean we can't try. | ||
+ | * Code reusability; a.k.a. "Why spend all this effort on writing 'good' code anyway?" | ||
===Putting it all together: problem solving=== | ===Putting it all together: problem solving=== | ||
+ | Largely a worked example. | ||
+ | |||
+ | Problem: I used to be a T2 industrialist. One of a T2 industrialist's worst nightmares is putting together a shopping list. T2 invention is inherently chance-based, so you never know how many of what types of product you'll need to order reagents for in advance. With the large variety of T2 item types and T2 reagent types, putting together a spreadsheet would be largely impractical and inflexible. We would like a program that takes designated T2 item types and quantities of each type and outputs a full shopping list. Extra features, like price calculation and subtracting off items I already have, would be nice too. To make this example simpler, I'll make certain assumptions about my supply chain locations and purchasing decisions: I'll assume I'm purchasing everything from Jita 4-4 and storing reagents in my personal hangar in [insert station in convenient 0.5 system here]. |
Latest revision as of 08:34, 25 April 2012
Course information
General information
This is a complete course for students seeking to learn computer programming in the context of EVE Online. The first half of the course is aimed toward capsuleers with no prior programming experience and is intended to bring them up to speed. The second half of the course covers tools useful for developing EVE-related applications and demonstrates examples of applications that use available tools to solve common EVE-related problems.
Optional homework assignments are provided after every lecture and may be submitted for grading and comments. The homework is recommended to solidify student understanding of the material, but is not required, as there is currently no way to 'pass' an E-UNI course.
- Duration: ??????
- Topics covered:
- to be summarised
- Student requirements:
- to be determined.
Notes for the teacher
To be compiled.
Course contents
Introduction
To be written. Explain why computer programming is a useful skill, particularly in the context of EVE Online. Automating repetitive tasks is nice, but with the right tools and enough patience we can do anything the hell we want to: solve the T2 market, write an API-based character checker (for detecting spies), calculate trade routes, ...
Setup
To be written. Planned content:
- Setting up a sane Python 2.7 programming environment on Windows. Python 2.7 is stable and has more available libraries than Python 3.2. Mac OS X and most Linux distributions have Python built in.
- Running the Python interpreter on Windows. Basic interactive interpreter usage.
- Basic usage of the IDLE Python IDE. Running a Python script using IDLE, and using the Python interpreter from the command line.
Programming basics
Inherently multi-session.
To be written. Outline:
- Basic input/output, variables, and basic arithmetic.
- Types in Python: int, float, long, string. What to do when types matter (typecasting between primitives).
- Boolean expressions; the boolean type. Control flow: if/elif/else, while loops.
- Sequence types: list, tuple. Control flow: for loops (pythonic sequence iteration).
- Mapping types: dict. Iterating over dictionaries properly.
- Function definitions, the def statement, using function arguments, calling custom functions, specifying values of named arguments.
- Class definitions, the object-oriented model, the meaning of 'self'.
- File input and output. Parsing command-line arguments. String formatting.
- Regular expressions, basic text processing.
- Additional topics TBD.
- Putting it all together: project TBD.
Programming methods
Inherently multi-session.
Outline:
- Fundamental data structures: lists (vectors), deques (linked lists), dicts (hash tables), trees.
- Discussion of algorithmic complexity (time and space). Asymptotic complexity, O-notation.
- Recursive algorithms: binary search, Towers of Hanoi.
- Dynamic programming: Fibonacci sequence, knapsack problem, seam carving.
- Graphs. Graph algorithms: BFS, DFS, minimum spanning tree (Prim, Kruskal), Dijkstra's algorithm, Floyd-Warshall, A-star.
Advanced topics of interest:
These topics largely have no connection to EVE Online, but would be taught in a full-length version of the course (not necessarily in this order).
- Numerics: floating-point arithmetic and how it WILL kill you. Fast Fourier transforms. Introduction to digital signal processing.
- Parallel programming: multithreading and how it can turn long problems into short ones (apart from annoying P-complete problems). Inter-process communication.
- Network programming: sockets, client-server model, sending and receiving messages over teh Internetz.
Useful libraries and techniques
Here's where second-year CS majors can start to follow the course if they haven't been following yet.
Outline:
- Structured data storage, structured data querying. The SQLite database engine: storing and retrieving tabular data.
- XML parsing.
- Additional topics TBD.
GUI programming is not on this list because that's an entire course in itself, but basics could be covered if sufficient demand.
EVE-specific stuff
Here's where experienced programmers can listen in.
Outline:
- The EVE API. API keys. Connecting to the API, getting useful information, making sense of it all.
- Practice: collating all assets owned everywhere.
- The Reverence cache library. What's in the cache? ZOMG so much stuff; discovering what's there, making sense of it all.
- Practice: collating all the cached market data from Jita 4-4.
- The EVE-Central API.
- Practice: calculating a character's total net worth.
- Practice: using data from EVE-Central and the cache, put together an accurate picture of mineral prices in major trade hubs.
- The static data dump. Getting the static data dump. What's in the static data dump? ZOMG so much stuff; making sense of it all.
- Practice: calculating the shortest route from Jita to Aldrat.
- Practice: calculating a bill of materials for T1 and T2 items; there are subtleties particularly in the T2 calculation that will become important.
Software engineering: design and implementation
Outline:
- It all starts with an idea. Putting together a design document, functional specification from the requirements.
- Outlining the code. Iterating on the outline. Details are good; the objective is to break the project into pieces smaller than your own head.
- Implementation. Writing up and documenting code. Coding style, documentation style.
- Testing. Testing. More testing. Debugging: one of those things that's so hard to teach, but that doesn't mean we can't try.
- Code reusability; a.k.a. "Why spend all this effort on writing 'good' code anyway?"
Putting it all together: problem solving
Largely a worked example.
Problem: I used to be a T2 industrialist. One of a T2 industrialist's worst nightmares is putting together a shopping list. T2 invention is inherently chance-based, so you never know how many of what types of product you'll need to order reagents for in advance. With the large variety of T2 item types and T2 reagent types, putting together a spreadsheet would be largely impractical and inflexible. We would like a program that takes designated T2 item types and quantities of each type and outputs a full shopping list. Extra features, like price calculation and subtracting off items I already have, would be nice too. To make this example simpler, I'll make certain assumptions about my supply chain locations and purchasing decisions: I'll assume I'm purchasing everything from Jita 4-4 and storing reagents in my personal hangar in [insert station in convenient 0.5 system here].