Saturday, October 25, 2008

Game Design as Programming

What is it about game design that lures software developers? Both are geeks, to be sure, but there seems to be a special draw that somehow grabs hold of both.

Andrew and Kristin Looney are good case studies to start with. Before starting their own company inventing games, they worked as as computer scientists at NASA. The love of computer science is evident in their games, which are rife with simple mechanics that end in beautiful systems of input and output.

Richard Garfield, designer of Magic: The Gathering and other wildly popular thinking games, also began as a Bell Labs scientist. Magic's inventive abstract system of interaction between cards was completely new at the time, but appeals to many - Garfield's game is absurdly popular around the world.

Paul Sottosanti is a php developer-turned Magic-designer turned game-developer. His latest work, Tiny Adventures, builds cleverly on the new paradigm of social networking games.

There are a lot more examples of software devs-turned-board game developers, but take these clever people as examples to start with. Common geek-appeal aside, what is it that draws programmers? The game as a microcosm of reality with its own rules, structures, and beginning and end seem common to all four of our cases. Software is similar in its use of interconnected modular parts. The shared Ludism and limitless exploration potential of programming languages and games is equally likely.

Thoughts?

Labels: ,

Wednesday, October 22, 2008

Things the Collective Should Do: Free Online College

We're talking completely free, accredited, online associate-level college courses.

A free online college offering courses adhering to high levels of quality. The courses are (in US terms) in the 100-300 level range, enough to satisfy general education requirements and demonstrate a student's commitment to an institution of higher education. Courses are accredited by relevant standards bodies, and admission is not restricted in any way. Students' knowledge of the course topic is vetted by open-book online tests, peer reviewed papers, peer-judged class competitions, readings followed by captcha-like comprehension tests, class discussion followed by peer ratings, and/or other scalable systems of measuring comprehension of materials. Courses are copyleft and the subject matter is crowdsourced and peer reviewed.

Cyclical educational disparity exists worldwide. Entirely-online classes are becoming increasingly common but still have costs that preclude the enrollment of the average world citizen . Education is not a zero-sum game, and information is easily recyclable for many minds. Everyone should have a chance at achieving a high level of education, and this idea removes some of the social and economic barriers to this.

Marginalized populations who currently do not have access to high school or college would be able to obtain a higher education, and would be able to apply to other colleges with proof of their academic experience. Existing colleges would have a much wider pool of applicants from more diverse backgrounds. Additionally, seniors and working adults will have the opportunity to engage in life-long learning. Society worldwide will be enriched by a general increase in education.

The first step is the creation of software that would allow people to freely contribute to open sourced course material. The success of Wikipedia is indicative of the willingness of Internet users to contribute information and editing to worthwhile causes. All course content would be reviewed by Professors to ensure that accreditation standards are being met. The software in question would also be usable by students. The college would require marketing designed to appeal to a diverse student body. Peer editing and adherence to high levels of quality will facilitate wide spread accreditation of classes.

If more people obtain free college-level learning, the idea will be a success. The disparity within education can be measured in terms of average levels of learning across overlapping boundaries of gender, income, nationality, and race. The number of person-credit-hours would impart the degree of success of the free online college. A shift in international attitudes toward learning would also indicate improvement. A measurement of the educational divide will be demonstrated in an increased proportion of college students from marginalized backgrounds.

Labels: , ,

Sunday, May 18, 2008

Code as an Emergent Medium

After however many years you'd like to consider computational instruction to have been around, it looks like it is now ready to be taken seriously as a medium of expression meaningful to humans as well as machines. In our plainly mathwise languages, we have always had the means to convey nearly as much as we'd like (convenience aside) but I really think that we're taking advantage of our ability to express ourselves in code beyond what's necessary to use machines as tools.

Poetry
  • high obfuscation
    It is left to the reader to find more examples, but here is one example of a recognized and heady performance in the field of perl poetry. The selection of perl is not a coincidence, but stems from perl developers' frequent concern for taste and desire for elegance.
  • more perl
    An open forum for aspiring perl code-poets. Very open.
  • lisp poetry
    Lisp is a dynamically typed language, meaning its data types are defined sort of transiently. When this page doesn't bother to decide whether it is for poetry about code or code that reads poetically, that's hilarious.
  • redbox.c
    Slightly more esoteric but of great illustrative value is this C program from 2001, heavy with nostalgia even then.

Politics
  • obfuscated voting machine code
    Premise: In a bid to point out the security risks in closed-source voting machines, entrants to this contest devise the most convincingly correct yet reliably 'rigged' code.
  • DeCSS
    Rogue programmers create code that allows people to fetch information from dvds, and wind up in civil and criminal court for copyright infringement. The code is open sourced, enthusiastically disseminated on the Internet, printed on t-shirts.
  • meta
    Said code is transcribed into English in a peculiar way. Just for effect?
  • 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
    Termed 'the illegal number', this blu-ray encryption key was the subject of a similar dispute on a large scale in 2007.


The list of so-far symbolically powerful code continues, but it's as organic as you imagine, and media crosses well - linux/init/main.c and so on.

Labels: ,

Friday, April 18, 2008

Book Review - Wicked Cool PHP

Wicked Cool PHP
William Steinmetz with Brian Ward


One of the best ways to learn a new programming language is to find existing code and modify it - not only do you begin with a working product rather than from scratch, you see standards, shortcuts, and myriad different ways of doing things. The risk run is a lack of reliability - there are few guarantees offered with most code, and there's always the possibility one will learn bad habits. PHP in particular includes plenty of pitfalls for new programmers, and there are plenty of ways for a neophyte to drop the ball with serious consequences if guidelines aren't set from the beginning.

Enter the hybrid introductory lessons/cookbook. Wicked Cool PHP, from No Starch Press, is a fantastic book if you're picking up PHP from a beginning perspective. The programming tasks outlined are fairly common ones, but are solved elegantly and proper information is given along with the examples. The book contains all that a new user needs to know about securing PHP (quite a lot) without departing from its recipe-like model of task, design, and code. The authors begin with sending email and using the session and continue through input sanitation, SOAP, and templating. Implementation-neutral database use is touched on, and the projects begin to get fairly ambitious towards the end.

Again, strongly recommended for new and enthusiastic PHP coders, who might save considerable amounts of time learning by an innovative walkthrough paradigm.

Labels: ,

Sunday, February 10, 2008

Book Review: Best Kept Secrets of Peer Code Review

Best Kept Secrets of Peer Code Review
Jason Cohen, et al


We cannot forever hide the truth about ourselves, from ourselves.
- John McCain
This book was a freebie from Smart Bear Software, which means that if it were presented in terms of utility per dollar, it would be nothing short of infinitely worthy. If you're interested in Software Engineering, the disciplined and systematic development and maintenance of software, I can't recommend highly enough that you go on and get your free copy. It's an insightful and provacative book, and you won't regret your investment of time.
The Best Kept Secrets of Peer Code Review remain secrets because it is manifestly evident to every coder that their code is flawless. This is pretty obvious; nobody ever sits down to add bugs to their code. A bug, logical or syntactical, is largely a matter of perception.

Black box testing for code flaws is a lot like smelling an old milk carton; a tester is here not hunting for actual flaws so much as the implication of flaws, their products, offspring, and output. Code review, as defined here, is the actual human fathoming of pre-production code. This is important, no one will deny, but is it absolutely necessary for proper development? That's the argument made in this book, and it's made with lucidity and care. The reason this book is worth reading is its careful, honest, and meticulous use of statistics to prove that enforced peer code review is a numerically better case for most software teams.

It is true, you know. The books sinews, the very guts of it, the part that will remain in the reader's mind long after all thoughts of what constitutes a code flaw, what part of design is taste and what is doctrine, and what metrics of testing are more important that others, are its brilliant and decisive forays into the metrics of bugfinding. Simply put, the better and harder you look at code - any code - the more bugs you'll find. The sooner you look, the easier they'll be to fix, and the more lines reviewed, the more bugs will be found to exist. This is absolutely, universally, inarguably true of any code that exists, and if as those axioms weren't philosophically fundamental, this book absolutely proves them and more.

The authors of the book reveal these truths so systematically that it's impossible to flinch when, on putting the book down, you will realize that the more bugs that have found per line of code in a piece of software, the less buggy the software can be said to be. An excellent read for anyone who likes to ruminate on the dynamics of group software development. It's convinced me to try out their cross-platform tool, Code Collaborator; here's looking forward to it.

Labels: ,

Sunday, January 27, 2008

Book Review: Beautiful Code

Beautiful Code
Compiled by Andy Oram, Greg Wilson


A diamond is a chunk of coal that is made good under pressure. - Henry Kissinger

Beautiful Code is another non-animal O'Reilly volume, with high aspirations. As the sleeve submits: "How do the experts solve difficult problems in software development?" If this book had been able to answer that question, reading it would be a head-spinning experience indeed.

The book's chapters are each the domain of a different prominent software developer or writer, and several are elegant outlines of what is unarguably some of the best code out there - Apache Webserver, Quicksort, and the Python interpreter. Ostensibly, the authors are talented beyond measure; with a lack of a cohesive theme, a unified structure, or an overall purpose the book quickly becomes a showcase of beautiful code-essays submitted by thirty-couple completely dissonant geniuses. The fact that the book still contains not much other than what it claims is no invitation for criticism. If you want to see real kung fu code, this is your book.

The potential disparities hide in between the lines, where compilers do not tarry. Few of the essays touch on why the code is elegant, or how it got to be the way it was. Most of them wander around what problem is solved by the code, some delve deep into the minutiae of the problem, and a few contain no code at all. This last set could have been chosen to present a semblance of organization, could have pulled loose ends together and formed some conceptual continuity among a wide variety of articles, but in their current states and places even these well-intended 'theories of code beauty' ruminations are ineffectual.

If a computer scientist was so riveted by unpolished essays surrounding the world's best algorithmic hacks that they failed to notice that no new information was gained, no statements beyond the cold, functional truth were made, no concessions given to that imaginative side of the brain that, when it is given the occasional chance to influence the gnarled digits of a perl hacker, results in that big win - the one sought after in wake and sleep for a week - and doubles the maintainability and efficiency of some project, then that reader will be satisfied to the fullest extent.

For the rest of us, this book was no great failure but no revelation, and is deserving of its place on the shelf. And the geeks among geeks, the hackers who would have found a book closer to Hackers and Painters, held it and shook it until C code fell out, will no doubt appreciate this book.

Labels: ,

Sunday, January 6, 2008

Mathematical Symbols

Mathematics, the study of totally constructed concepts like numbers, time, logic and all that, is the closest thing we've got to a universal language. Highly intuitive symbols are included, if not universal, and let me point out a few and critique them:
  • 'Square foot', exactly like it says on the box. Not that a foot is a good unit of measurement - a human foot is of course not a standard base for a system the way the size of our watery Earth is - but this symbol is excellent in its simplicity and expressiveness anyway.
  • An 'angle'! Very nice. Just a drawing of the referenced thing. Conveniently, this one is extensible - you can mark it up to show that you mean the measure or that your angle bisects another one, or what three points describe it.
  • ƒ 'Function of', pretty daft as it's just an initialization. At least it's scripted, so you can tell it's not just an F, I guess. This is precisely the kind of thing we should stay away from. A better symbol? ☡ would at least show the process of something undergoing a path, shows a thing passing a threshold.
  • 'Infinity'. Well, I guess this one works. I've never been a huge fan of the 'lazy eight', as it in no way indicates to me an unlimited amount of anything. But as an enormously abstract concept, it's not easy to symbolize without encoding, so this arbitrary, somewhat rationalizable symbol (it keeps going!) works well enough.
  • Δ 'Delta', commonly indicating a change in something over time. Pragmatically, an arrow describing the path of the sun, phases of the moon, tides, plants, something like that would be better. However, I do think it's great that, in English, a delta is a change in a river over time. A triangle shaped change. Is this intuitive? No. But for being referential in form, it's way better than 'Function of'.
  • ¬ 'Not'. One of the absolute simplest, and best. One has taken the straight tally representing 'a thing', and broken it in just such a way that negates it in form, function, and concept. One of the most intuitive, least encoded symbols we have.
  • 'And' shows the logical joining of two concepts into a higher, compound version. + is still useful as it shows two tallies in combination, but rather than depicting them together, a∧b is clearly the union between. while it's not as intuitive as +, we at least have a demonstrative picture of a joining, more indicative of the idea that 'both of these are required'.
  • 'Or' is another logical operator, used as a∨b. The deficit of this and ∧ is that, while they're wonderful in their logical inversion of one another, they are not referential of anything, and require some prior knowledge of their meaning. Good, but not perfect.
  • 'Null', a very difficult concept to represent in mathematics: a group of nothing. I'm very pleased with this one, which is so intuitive that it's more often reddened and superimposed on another symbol to show that it is not allowed. What a fantastic and practical use! Another, even more definite success where symbols are concerned.
  • Here's another terrific one. While not immediately intuitive, 'therefore' is an abstract concept. But if abstract concepts were shaped like dots, this symbol would show two of them with a third built on top, perfect units of reasoning being built on one another. Genius.

- ∧∨

Labels: ,