Yet another personal wordpress blog on programming, books, life, and other weird things

Archive for januar, 2011

Deprecated: preg_replace() [function.preg-replace]: The /e modifier is deprecated, use preg_replace_callback instead in /var/www/serverdude.dk/public_html/wp-includes/kses.php on line 1002

Deprecated: preg_replace() [function.preg-replace]: The /e modifier is deprecated, use preg_replace_callback instead in /var/www/serverdude.dk/public_html/wp-includes/kses.php on line 1003« Older Entries

21 chapters of mathematical recreation. Usually I find the professors books rather entertaining, but I must say I’m feeling a bit disappointed about this volume.

It’s off to a good start with “the Lore and Lure of Dice” - the context specific reflection on the question of probability, and the non-transitive dice. Then quickly passing Piet Hein’s board game Hex.

Why we’re introduced to Tarzan and Jane in the midst of an otherwise interesting subject, “Walking with quadropeds” - the patterns of the gaits of four legged animals, I have no idea.

Chapters 7, 8, and 9 touches upon time travel, which - as I recall it - is much more physics and sci-fi than mathematics. Luckily though chapter 10 serves a nice gem - Cone with a Twist - the sphericon.

Chapter 11 touches upon the shape of a drop, and in chapter 12 we’re back to probability and fallacies in The Interrogator’s Fallacy, where we now use Bayes’ theorem and Mathews’s formula. There’s an error in the formula printed on page 173 at the top though, it should be:
P(A|C) = P(C|A) * P (A)/ P(C)

Then we get to the title chapter: Cows in the Maze. And while it has cows and is kind of a maze - it’s not a standard maze, it’s a maze of logic statements.

Leaving the maze on a Knight’s Tour into Cat’s Cradle over Klein bottles (and MÃ¶bius bands) into VoronoÃ¯ celled craters into knots, which again I found a bit disappointing.

The construction of Most Perfect Squares are matched up with Mathematical impossibilities.

The final chapter of the book regards dancing with strings forming regular solids.

The idea to use game thinking and game mechanics to solve problems of any kind, raise moral and put an incentive in the hearts of players - which is all of us. It’s funny seeing dogs being trained using quite similar methods.

Games work if they are fun and enticing, but they mainly work for the purposes for which they were built: Entertainment. Sometimes, though, they have a positive side effect in that they actually make the players learn something, if not useful, then at least meaningful. That’s the Mary Poppins notion of “a spoonful of sugar makes the medicine go down.”

Games have been used throughout the ages as means to both entertain and educate - and they do that in an abstract world. The main reason for the sudden hype of gamification is that with internet connected devices we do see a much lower barrier to entry, and the possibility to pick up the game anytime anywhere.

Remove barriers to entry. Automate any mechanical tasks

Taking the card shuffle out of Solitaire or Patience games - or Poker for that matter - doesn’t improve on the gameplay as such, but it makes it a lot easier to pick up the game as well as play it.

Games can be anywhere

It doesn’t have to be a game - it could just be playful behavior, e.g. the VW initiative The Fun Theory - I’m thinking about the Piano Staircase, which reminds me of the piano floor in the 1988 movie “Big” starring Tom Hanks.

Many things are possible if the right idea and implementation arises. Be inspired try out some ideas for yourself, test and tweak them. Dive into the psychology behind predictability of people, the choices we make, and what really drives us.

The author team takes their RESTBucks coffee shop application through Richardsonâ€™s Maturity Model explaining the issues at each level. Java (JAX-RS) and .Net implementations.

Then they go on to explain the importance of Hypermedia, and mentions that the hypermedia is a part of the representation. Iâ€™m not quite sure about this.
I tend to disagree with the way they implement this; as a List<Link> member. There are benefits and security issues with this approach. It becomes possible for any client to set a link including overwriting a link. While this can have benefits, the immediate security issues of a client setting e.g. payment links to phishing sites are also present.

They also like to use the Atom and AtomPub envelopes, which I fail to see work on a more common approach, that is, on any other media than formatted text.

The author, Jose Sandoval, goes over the same application for the different frameworks: JAX-RS, Restlet, RESTEasy, and Struts2. Well, the RESTEasy part is quickly skipped as RESTEasy builds on top of JAX-RS.

I tend to disagree with the way the example code is written, but that could just be down to a difference of opinions or different cultures. Itâ€™s important to look at the downloadable example code as the book was written prior to Restlet 2.0 release. The example code covers both versions.

The book has sufficiently many typos and minor flaws that it becomes annoying.

German being my 3rd language, this is not the fastest read, but the book seems thorough in its coverage of the subject. The code used for some of the examples is written in Ruby on Rails but focus is more on XML and HTTP headers - which makes it understandable for most readers.

Stefan Tilkov explains some issues with Atom and AtomPub, and why developers may want to use it even though itâ€™s not the best fit for the current application. The major issue with Atom - as I see it - is that it’s yet another envelope, something we should leave alone.

This book, by Leonard Richardson and Sam Ruby, is prominently called ‘The Bible’ with regards to REST - I think this has more to do with the fact that it’s the first book on the subject than anything else. The “bible” - or should that then be “the word” must be Fielding’s Thesis

Code examples are primarily in Ruby - not that it matters much in the case where the HTTP is more interesting than the underlying code.

As @stilkov mentions: “I agree with at least 80% of it.” - I tend to agree, and I’m hoping that I’m agreeing with Stefan Tilkov in the same 80%

It’s a good book on REST and it leaves open some of the issues still needing closure - if closure is possible.

Deprecated: preg_replace() [function.preg-replace]: The /e modifier is deprecated, use preg_replace_callback instead in /var/www/serverdude.dk/public_html/wp-includes/kses.php on line 1002

Deprecated: preg_replace() [function.preg-replace]: The /e modifier is deprecated, use preg_replace_callback instead in /var/www/serverdude.dk/public_html/wp-includes/kses.php on line 1003« Older Entries