Author: Matt

  • Slot Machines

    For the last couple of evenings I have been learning about slot machines and how they work.  There is actually quite a bit more to them than first meets the eye.

    I have a side project going to build a slot machine server application that can simulate many kinds of slot machine games.  Given the set of rules and reels it will build a playable demo, as well as produce all of the mathematical model statistics for the particular game such as how much money it will return to the player over time and what the volatility is.

    Designing a game engine that can handle all of the possible variations in slot machine gameplay is not easy.

    Ultimately this game simulator will be used to push different games down to a mobile app, which itself will need to dynamically render the reels, graphics, and animations that were set on the server.

    The complexity of this side project has kind of ballooned a bit.

  • Building Social Services

    Technology is getting more and more personal. As it does such it becomes easier to make things social in a real way.

    Bringing a social experience to your application is more than just slapping a like button somewhere. Social is about making people aware that when they use your application they are entering a social situation.

    A party is a real social situation. We know it’s a social event before we get to it. The host of a party tries to ensure that people engage in social behaviour such as chatting with each other, singing, dancing, and meeting new people by arranging for food, drinks and games to stir conversation.

    Facebook is social in only a narrow sliver of what it means to be social in meatspace.

    Now is the time to take a leap in what it means to create social software.

    Creating software the provides a sense of presence, promotes social engagement, and enables social discovery and self expression is a real challenge from both a software and design perspective.  There will be new innovation required from both disciplines to get it right.

    We are digging into this by experimenting within the scope of mobile games.  Mobile provides an interesting place because it is much more personal than sitting down at a computer in your office.  It allows us to go deeper than Facebook was able to go with their app when it was developed in 2004.

    There is much work to be done yet in this area.  MMOs provide a glimpse at what should be possible to duplicate in mobile.  World of Warcraft and Second-Lift allowed people to meet and form relationships that became more intimate than would have happened outside of the games.  Technology has the potential to make social much more than it is in a physical setting.

  • 1 Thing Programmers Should Do More Often

    one thing programmers should do more oftenThis past week I found myself with a task of creating pages on this site for all the Mobile Apps that have been developed by Halotis Inc. At the same time I wanted to get the marketing material organized for all of those apps in a consistent directory structure.

    Which lead me to something I believe more programmers should do more often. Write Automation Scripts. Rather than manually create the directory structure for 23 different Apps and find all those apps in the App Store to get their descriptions and screenshots. I was able to write a script to create the directory structure, search iTunes, pull out relevant information, and download all the screenshots.

    It’s what I love most about Python. It becomes so easy to find a decent library for any public API, and quickly whip up a command line utility to automate what would otherwise be a tedious task.

    Getting good at writing these sorts of automated scripts is a differentiator. After a while of writing them, you build up a library of neat scripts that can help you day to day to get more done in less time.

    A script, once written, becomes an asset to be possibly used again and again in the future.

  • Life to Old Projects

    Maintenance.  UGH!

    We live in a world where software is part of an every evolving ecosystem of other software.  Everything is constantly changing and everything you do needs to keep up or risk falling into disrepair and creating technical debt.

    The maintenance window is a chance to breath fresh life into an otherwise languishing project.

    A little over a year ago I released FreeSlots, a slot machine game for iPhone. It’s a pretty good game, and I’m still happy with the design although I was cut short on developing it fully. The time has come to refresh it for the upcoming iOS 8 release and that has given me the chance to revisit the code and find some other opportunities to make it  better.

    My original plan was to use FreeSlots as a platform to test some bleeding edge features, and then fork the project into a new game that is better branded, and takes the best lessons I learn from doing FreeSlots, while also spinning off some of the services I create for it so others can take advantage of it.

    It seems that strategy is still a good one.

    So this maintenance tune up, has fired me up to develop some newer, bigger, better things.  YAH for maintenance!

  • White Shoe Syndrome

    You know what you need to do to launch your business, you have the skills, you have the idea, and yet progress is slow. Maybe you have White Shoe Syndrome.

    The problem with white shoes is that they are always dirty and need to be cleaned. When it is time to sit down at your desk to do some work that pair of white tennis shoes is in the corner of your office just screaming at you to clean them. Even in the dead of winter when you are months away from lacing up those white shoes for some reason now is the right time to clean your shoes.

    Of course it doesn’t have to be white shoes. If you are sitting down to do some work and minutes later you find yourself tidying your office, or mowing the lawn, or re-organizing your stamp collection then you are a victim of white shoes syndrome.

    The tricks to overcome this is:

    • Isolation – close the office door, put on some headphones or anything else you can do to physically isolate yourself from visual noise and disruption
    • Minimize clutter – clear your desk, minimize your office, move files off your desktop, run your software full screen
    • Turn off notifications – turn off auto-email checking, disconnect from chat, turn off calendar alerts
    • Turn off the lights – working in the dark can help you focus on what’s on your computer screen
    • Before or after hours – try working early in the morning, or late in the evening when other people are not around.
    • Go somewhere to work – you won’t be inclined to clean the counters at the coffeeshop

    White Shoes can be a real roadblock to your success.  Try to do what you can to avoid it.

  • Adjusting to Fewer Blogs

    A couple weeks ago I drastically downsized my list of subscribed blogs.  Going from skimming 200+ blog posts down to fewer than 10 per day.  It has actually made quite a difference.  The time saved was used to read more books, which I’m happy to say has worked out.

    Being disconnected from the news has left me not being as aware about things going on.  Previously I enjoyed being the first one to hear about interesting things, now I’m finding it better to let others be the filter to bring only the most critical and interesting news to me.

    It’s actually been a bigger change to my daily schedule than I would have expected.  Reading books feels like progress compared to the treadmill of news streams.  I don’t think I will be re-subscribing to anything soon

  • Long Vacation

    For the last 2 1/2 weeks I have been on a long vacation back home to Newfoundland.  This time we seriously lucked out on the weather, getting in two weeks of 25+ degree sunny days.

    We bookended the trip starting with the Tele 10 at the start and the Regatta to finish things off with a couple days before and after for buffer space.

    I do wish I had more time to get some of the things I wanted done while on my days off.  But this vacation has been primarily about getting a break and it definitely has been good for that.  We took full advantage of the willing baby sitters to visit some restaurants, go to a couple pubs and see old friends.

    The mix of amazing weather, family and friends has made this trip a great one.  All good things come to an end at some time, and tomorrow we leave to fly back across the country and get back to work.

  • Free Coding

    Getting into the flow or zone as a coder is when you are your most productive and code spews from your fingers into your favourite text editor as fast as you can type. When in the zone you can seemingly pour out 100’s of lines of code in no time.

    But how do you get into the zone other than by pure happenstance?

    Authors have a technique called free writing which was popularized in Julia Cameron’s The Artist’s Way for which the rules are simple:

    • Select an amount of time: 5, 10, 20 minutes for example
    • Write continuosly and quickly for that amount of time ignoring spelling, grammar, formatting
    • If you can’t think of things to write, write about that or simply scribble. just keep things going from your brain to the page.
    • When your time is up, review what was written and mark anything interesting to explore further in a future free writing session

    The goal of free writing is to build up enough momentum to blast through mental blocks and quickly transition to a state of flow for the real writing process. It is meant to be done daily as part of a morning routine before real work starts.

    I’m curious if a similar technique could be used to get into the zone for coding. A quick Google search revealed no information about anyone exploring this idea so I thought I would.

    Here are the rules I’m using for freecoding:

    1. Pick an amount of time before hand 5, 10, or 20 minutes for example
    2. Use a text editor where I can turn off syntax highlighting (to avoid the impulse to go back and fix typos)
    3. Code in a language that I know well enough to code without referring to documentation
    4. start coding and don’t stop typing. If you can’t think of something to code just code about that. it doesn’t have to run, it doesn’t have to make sense or be correct syntax. Try not to go back to code out of order.
    5. Don’t try to accomplish anything that will require you to stop to think. ie. don’t try to implement your favourite sorting algorithm.
    6. If you code yourself into a spot where you don’t know the API well enough, just fake it out with a call to a magical function that does what you want.

    When time is up, turn on syntax highlighting and read what you wrote. Make notes about anything interesting that you’d like to explore again in the future. Note things that you were hung up on with syntax or APIs that you should brush up on.

    The purpose of freecoding is to limber up your mind before starting real code. The secondary benefit is to identify gaps in your knowledge of a language or library where you might have to stop to look up the documentation.

    Use the momentum built up in the freecoding session to launch into a real project. Try to keep the transition freecoding and real code somewhat smooth

    As an example here’s part of what I did in my first 5 minute freecoding session:

    a = 'hi there'
    
    b = a.replace('hi', 'bye')
    
    a. reverse()
    
    c = fun(a)
    
    def requestA(a):
        return GoogleThis(a)
    
    if requstA(a) == 'no results':
        println("there's nothing in the google machine")
        return tryBingInstead(a)
    
    requestA('matt warren')
    
    b = b.capitalize()
    b = b.reverse()
    b = b.capitalize()
    println(b)
    
    not_sure_what_to_type = b
    
    def star_trek_is_better_than_star_wars():
        return true
    
    if star_trek_is_better_than_star_wars:
        print "hell yeah"
    

    There’s nothing interesting going on here, it’s not complete thoughts and doesn’t accomplish anything nor does it run. the point is to simply start getting a flow of code coming by reducing any blocks that might prevent it (in this case by removing the need to create something that runs or even makes sense).

    Upon reviewing this particular session I might decide that the concept of using bing as a backup for google is interesting, and that I need to increase my vocabulary of string functions to call upon.

    In my limited trials so far it’s clear that there is a bit of a skill to freecoding successfully. For all other coding you do there is a goal to reach, something specific you want to implement. I suspect that after a couple weeks of regularly freecoding the code will start to get more complex, better structured, and longer thought streams of cohesive code segments.

    I am still early on in my experimenting with this concept. However, if it is as effective as free writing is for authors, then perhaps free coding can be a daily ritual more of us can use to boost our productivity. I’d like to encourage every software developer to give it a try and report back (if they like) with how it worked or didn’t work for you.

  • Think Weeks

    One of the things Bill Gates did was to take a semi-annual ‘Think Week’ retreat. During this week he would extract himself from all obligations and hole up in a hotel somewhere with a stack of books to read. To Bill Gates these retreats were critical to his ability to stay ahead of big picture trends in industry that might have otherwise surprised Microsoft. Sometimes these retreats resulted in major strategy shifts for the company.

    The rules for these retreats were simple, he was not to be contacted except for emergencies. And presumably he had amassed a reading list recommended to him by his peers over the previous 6 months.

    Bill Gates is not alone in the practice of going into seclusion to fully focus on important things.

    Religious people have been practising seclusion for centuries as a way to deeply explore their beliefs. Many writers are known to use retreats, or hotel rooms as ways remove distraction and get a burst of productivity.

    I know many software developers that find they get a lot done on long flights, and have heard of more than one developer that swears by trans-atlantic cruises as a way to avoid the numerous distractions and become productive.

    Taking time to really think about a problem deeply can often benefit from some isolation. When you are alone in your thoughts and have the time to fully develop your ideas it puts you in a unique position. There are so few people who think deeply on topics. Most decisions are made by impulse and intuition – which often is good enough – but for difficult problems which require new concepts or unique approaches we need to invest a bit more time to read, learn and think.

    As an employee your ability to take these sorts of retreats is severely restricted. Bosses want to have something to show for the money they pay you to sit and think quietly can be a difficult sell.

    This is just one of the things that makes being a contractor/consultant so appealing. When you can make your own decisions about how to spend your time, then it’s possible to invest in taking a week to isolate yourself and regroup, or produce something.

    A think week is also something that is difficult to justify when you’re living paycheck to paycheck. Using up a week of precious vacation days, or taking unpaid leave presents a risk, especially given that when you come back to work you may not have the time to follow through on what you did during your retreat.

    Based on the effectiveness of a think week, as reported by several high profile people, it’s unfortunate that they can be so difficult to execute on yourself. Time is a tight commodity and obligations can be hard to wiggle out of. However if you can manage to schedule one there can be good payback.

  • Tele 10 Finished

    One more thing to knock off the bucket list.  Yesterday Heather and I finished the Tele 10 race in St. John’s.  My time was good considering zero training runs over the last few months.  I was counting on the adaptation to Calgary altitude to help me power through the race.  That seemed to work.  At no point in the race was I straining for breath and I was able to do the race without stopping to walk.

    The Tele 10 was one of the best runs I’ve done. Having a mostly downhill course was nice and the crowds are huge with cheers coming all along the route.  One thing I wasn’t quite prepared for was the level of humidity. The sweat never seemed to evaporate and as a result it was easy to overheat. At one point near the end some salty sweat dripped into my eye and was quite a distraction until I got a bottle of water to wash it out.

    Final time was 1:47. which could have been improved on with some training but I’m happy with because it didn’t feel difficult.  When I woke up in the morning I was still feeling jet lagged and wasn’t sure I’d be able to finish.