Author Archives: Tom

Blog Spring Cleaning, 2017 edition

This site has sat dormant for a year or two, but the intention to write has never died.

I’m going to try building new connections through the web to this blog, and unpublish some old posts that are not meaningful to current interests. Trim the fat. Clean and oil the engine.

TIME FOR SPRING CLEANING!

In the last year I’ve built a small collection of systems, and contributed to some others. I want to try and get more active on GitHub, fixing bugs in projects I’ve discovered.

A lot of ideas.

It’s 4:50 AM, and I’ve been up for 90 minutes, getting work done. Time for more work.

Posted in Technology, Thoughts | Leave a comment

Fun with game character movement (1920s automobile)

Screen Shot 2015-05-23 at 9.26.38 AMThis is my first blog post in almost a year!  Let me introduce, very briefly the current experimental game I’m working on. This is a card+board+actionfigure game, themed on the italian mafia of the 1920s.  I will remove this paragraph here, when I’ve got a better introductory blog post written.

Last night the cars were functioning like busses or taxis. Public transit, anyway.

The valuable point and planned mechanic is to prevent a game player from attacking too early. In Risk, a player can attack quickly by adding all his/her new bonus armies to a single space and attack during round 2. That often fails so people often bulk up an offensive force, but neighbouring opponents always see that and bulk up their defence of adjacent regions with their own bonus armies.

Screen Shot 2015-05-23 at 9.26.27 AMLikewise in this game, attacking could possibly take place early, but the following idea came up in brainstorming: let’s prevent early attacks by limiting the access to vulnerable opponents too early, by requiring a car for one-or-more associates to travel together, and form a decent attack force.  Thus, is the inclusion of stylish 1920s automobiles. Currently 3D modelled is the Studebaker Erskine.  This restriction of attack rule is applied even if the target location is just across the street, or against a next-door neighbour (same side of street).

The development of the cars was a challenge at first, because of the conditions to check for the appropriateness of the game space it was traveling to. Actually, that’s because of the placement of playable characters was done earlier, and I was using the same logic and UI control for drag-drop, and so I copy-pasted the if-statement conditions.  All conditions for if a character (and/or car) should be put onto a game space were amalgamated into a single gigantic, horrible, unreadable condition:

        if (gamespace.iscontrollable == true &&
            (
            (gamespace.playerturf == this.currentplayer && (gamespace.playerowner == -1 
||gamespace.playerowner == this.currentplayer))
            || (gamespace.buildingtype == building.buildingtype.park && 
(gamespace.playerowner == -1 
|| gamespace.playerowner == this.currentplayer))
            ) &&
    gamespace.associatescount <gamespace.associatesmax
            ) {
             // gamespace is accessible and isn't overloaded and can receive new playable character so do that here
}

I broke up the multi-level nested if-statements early in the car development, to make progress easy and rateable.

During development I’ve disabled the maximum-per-space limit on cars and playable characters, so the following is missing that point.  It eventually came down to this:

 

  1. Is the space controllable? (any home-turf buildings , and parks)
    1. Is this a car being moved?
      1. is this game space within the current player’s home turf?
        1. is this game space owned by no one?
          1. ALL GOOD, not owned by anyone, move the car
        2. is this game space owned by the current player?
          1. ALL GOOD, move the car
        3. is this game space owned by some other player?
          1. BATTLE MODE
      2. is this game space within any other player’s home turf?
        1. is this game space owned by no one?
          1. ALL GOOD, not owned by anyone, move the car
        2. is this game space owned by the current player?
          1. ALL GOOD, move the car
        3. is this game space owned by some other player?
          1. BATTLE MODE
      3. is this a neutral area like a park (the only alternate to home turf regions)?
        1. is this game space owned by no one?
          1. ALL GOOD, not owned by anyone, move the car
        2. is this game space owned by the current player?
          1. ALL GOOD, move the car
        3. is this game space owned by some other player?
          1. BATTLE MODE

The separation of conditions made this so easy to manage, I immediately migrated the code back into the character-movement decision making, to replace the single gigantic, horrible, unreadable condition previously above, but changing the ALL GOOD bits according to the rule restricting game players to move single characters into opponent turf or any other area occupied by an opponent.

All-in-all, it worked out very well.  During construction, it was fun to break rules, find myself driving a car to an opponent game space where an opponent character was standing, and loading that enemy into the car and driving it back to my own home turf, just because the code allowed for it.  Like a taxi rather than a practical game element, it was just a bit of fun messing around with rules during development.

 

Posted in Uncategorized | Leave a comment

Morning statistics – Coffee beans & grounds, weight and servings

Morning Coffee statisticsThis morning, coffee was on the menu.

While preparing the french press and noticing my tiny air-tight jar was empty, wherein I store a few cups-worth of fresh grounds, I also glanced at my digital kitchen food scale.  Hmm.

So following is some statistics I did over about 5 minutes, useful for anyone, anywhere, who is interested in figuring out their coffee consumption. Happy caffeinating!

4 tbsp unground coffee beans (aggregated)
= 28 g
1 tbsp unground coffee beans
= 7 g
4 tbsp unground = 5.5 tbsp ground coffee powder
2.5 tbsp ground = 16 oz coffee drink (medium @ Tim Hortons or many other coffee shops) at a good strong strength
2.5 tbsp ground = 12.7 g

Now my own specific use case:
coffee bag ($10 “le Caffe Metropolitan, 100% arabica medium roast” from Metro) ~= 680g
680 / 12.7 g = 53.5 portions of 2.5 tbsp coffee grounds
$10 / 53.5 =  $0.19 per 16 oz coffee serving.
750 mL Torani coffee flavouring syrup ($12)
15 mL flavour serving = 16 oz coffee (my particular average flavouring strength, sometimes less, sometimes more)
750 / 15 = 50 servings
$12 syrup / 50 servings = $0.25 per flavour serving
Approximate grand totals:
$22 for coffee beans and 1 flavour syrup bottle = 53 servings
22 / 53 = $0.40 per 16 oz.

Posted in Activities & Adventures, Technology | Leave a comment

The Importance of Design (Work SMARTER, not HARDER!)

Today is a great day! It’s one of many that have been inspiring toward planning things.

In the last year, I’ve completed a number of projects, and returned to development of some long-delayed projects.

Through the course of 2013, plus the end of 2012, I’ve developed a new perspective. It’s a perspective, and a respect, for design and planning. These concepts have become so valuable to me now, to the point I am prioritizing them above action/execution.  That’s a challenge, because I’m obsessively action-oriented. In October 2013, I wrote on my giant whiteboard a new mantra, one I like to repeat everyday, in large blue letters: “Work SMARTER, not HARDER”.

The above 3 paragraphs were typed without planning the subject of each. The remainder is going to be planned! hahaha…

Continue reading

Posted in Design, Thoughts | Leave a comment

New author, plus testing WordPress iPhone app

Tonight (in eastern timezone) my sister has asked about setting up a blog and slideshow.  She’s on a working holiday in Australia.  So in an attempt to learn more myself and give her a solution, I’ve created a user for her and category for blog posts, added to the site main menu.

While doing so, she and I discussed posting from the iPhone.  I explained about the last experience I had with the iPhone app, that it was very simplistic, not full-featured like the web site.  And so she got the app, and I updated (first time using the app in over a year).

Continue reading

Posted in Technology | Tagged , , , , | Leave a comment

How to feel when fixing a minor but insanely difficult bug

“Don’t take it so hard, you work effectively in this ultra-specific area of technology than. You made a simple mistake.  You’ve admitted and acknowledged it, and you’ve learned from it. And it had no identified impact on customers.  Good!”

Continue reading

Posted in Technology | Tagged , | Leave a comment

Canada Revenue Agency Katamari-style

Today, there was a need to contact the Canada Revenue Agency.  So I visited the website.
Coincidently, today, I also discovered an awesome bookmarklet, to convert any site into a world of objects to be built up on a katamari ball.

So here’s the CRA’s web site, mostly rolled up.  Also this screen capture includes a fun picture sort of abstract and colourful, that reminds me of a katamari ball itself.

Visit this page to get a Katamari Damachi website bookmarklet:

http://kathack.com/

 

Posted in Technology | Tagged , | Leave a comment

Exhausted from crashes (Facebook documentation flaw)

Sometimes development bugs seem to never end.  Sometimes more come to light, immediately after fixing those we can already see. Bugs can come from one’s own mistakes, but this time it’s all Facebook’s fault.

Continue reading

Posted in Technology | Leave a comment

Development-time app distribution

So you want to know how to distribute your native iPhone test app? It’s much easier than emailing updated versions to testers, if you can simply have the app online all the time. And having newer versions published when they become built is an added convenience.

First, it does not require an enterprise developer account with apple.

Second, it does require having an active web server somewhere, or at minimal a hosting account.

Continue reading

Posted in Technology | Tagged , , , | Leave a comment

Towers of Hanoi puzzle game applied to real-life and work

The Towers of Hanoi game is a very clean, effective puzzle to learn problem solving, and also learn problem analysis. It’s easy to play with 2-3 discs, and becomes more challenging for inexperienced people with more discs.

After learning the method to solving, it becomes easy, where each additional disc simply doubles the time it takes to solve the puzzle. The real challenge then becomes keeping track of which level within which stack you need to move.

I often refer to this puzzle in conversation, when doing things in life that require moving lots of stuff, physically, mentally, emotionally. It’s come up in my facebook status messages.

Continue reading

Posted in Technology, Thoughts | Tagged , , , | Leave a comment