Author: Matt

  • Api First Web Development

    The web is still suffering through a page refresh disaster. HTTP started with simple pages where full page reloads when navigating wasn’t so bad. Modern sites have boatloads of images, css, js and html files on each page that need to be requested each time a page loads and checked to see if the file has changed to re-download it.

    It’s wasteful and slows down everyone’s experience with browsing.

    There are various approaches to overcoming these shortfalls: gzip everything, image atlas files, concat and uglify javascript etc. These lead to further technical complexity on the server side and nuances that make web development more difficult to get right.

    The rise of client side MVC frameworks is a breath of fresh air in web development.

    Ajax was just a stepping stone to this new web development paradigm.

    There are many competing frameworks right now: Ember.js, Backbone.js, Angular.js, and Meteor.js to name a few.  They provide several big wins for web developers: simplification on the server side (by removing the need for template engines, asset management, and a multitude of views)  This also allows for greater performance on the server side since template rendering is generally slow and rendering a full page is no longer required.  Web backends can be lean and optimized much more easily.  It lowers the bar to get other more performant languages like Go to compete with Django and Ruby on Rails.

    With an API first approach the front-end web development can be completely isolated.  All front end files can reside on high performance, highly available and cheap hosting like Amazon S3 and CDNed around the world.

    Done smartly the backend can be used against multiple front-end technologies: iOS, Android,  Windows Phone, and desktop apps can all use the same API.  It’s the best of both worlds. You get the superior feel of a native app while maintaining much of the code savings of consolidating business logic on the server.

    For the past few years we’ve been living in a web development world where there is a tug of war to decide what pages, or parts of pages should be rendered on the server side and what should be done with javascript and DOM manipulation.  It’s a design decision that has to be thought about consistently when working on complex web sites and generally creates a messy code base with javascript scattered around everywhere.  The future of API first web design makes it very clear. The server provides JSON, and javascript on the client side does the rest.

    From a testing perspective the backend becomes easier to unit test. CRUD interfaces and validations are simple to assert.

    The messiness of testing the UI now falls entirely on the javascript application where they can be safely written without needing a complete web stack of infrastructure. The MVC frameworks nudge you towards more organized and easier to test javascript code.

    For your next web development project consider taking this new approach to the web.  Simplify your backend by doing a RESTful JSON API only, and simplify your front-end by using one of the Javascript MVC frameworks.

  • Distraction Free Writing

    I have just discovered a feature in wordpress to do full-screen distraction free writing. The idea is to remove all visual distractions from the computer so that the only thing you can focus on is your writing.

    Managing distractions is something that I have always done at work. I turn of notifications for emails and twitter, and I work with a minimal text editor when coding.  When possible I avoid using the mouse because even the 1 second that it takes to remove your hand from the keyboard is enough to derail a train of thought.

     

    Screen Shot 2013-12-21 at 7.35.05 AM

    I hope to write more often next year. and this distraction free writing concept will help make my writing time more focused and productive.

     

  • How to find time

    One of the hardest things in getting productive work done has always been finding time to get focused work done.  There are so many demands on our time that what we want to accomplish gets pushed out in favour of other more immediate or more pleasurable things.

    Back in the day when Ben Franklin, Albert Einstein, Nikola Tesla, and Alexander Graham Bell were alive the mind numbing effects of TV were not yet felt.  These great thinkers could devote an extra lifetime to their pursuits. The average Canadian watches 30 hours of TV per week! The loss of productivity to TV is astounding.  Taking that TV time and instead using it to learn, experiment and pursue goals would change the entire country.  If people took back their evenings to tinker with robots, or learn an instrument we would be in a very different planet right now.

    Reducing or eliminating TV is the low hanging fruit for finding more time in the day.

    For Ben Franklin not watching TV didn’t provide any competitive advantage over other people of his time (no body else had TV either). Franklin found his extra time in the mornings. By waking up before the demands of everyone else could direct his day he was able to get an astounding amount of work done. The quiet solitude you can find in the early morning hours can be more focused and productive than the rest of your day.  It is the perfect time to exercise, plan the day, or study something new.

    Converting to a morning person takes dedication and planning. But it will give you a couple more hours in your day to devote to your pursuits. (How to do this is worthy of another post)

    People today, have the additional benefit of the tools of automation and convenience. Microwave ovens, coffeemakers and dishwashers can each contribute small amounts of time back to our day if used. By brewing your own coffee in the morning you save both time and money over waiting in line at starbucks.  Technology is here to serve us and make our lives more convenient so that we may devote less time to chores, and more to what we want.

    Technology and automation is the 3rd leg in our pursuit of finding more time.

    Finally, with so many things demanding our time, finding focus and eliminating distraction will make the time we do get more productive. As a software programmer I am acutely aware of the pitfalls of multi-tasking. The human brain just isn’t very good at actively working on multiple things at once.  It takes time to really focus our attention on a task and get into a mental state where we can accomplish significantly more. Whether through physical isolation or by using tools to reduce chatter or developing a pattern of work that provides time to focus you can get more done with the time you have.

    Of course you need the motivation and ambition to direct the time you do have to productive means.

  • App Kontrol

    My next project has got underway and it will be launching as App Kontrol sometime in the next month.  This app will be a business dashboard that can be used to pull together download and advertising revenue numbers from various mobile services into one place.  With this information gathered we can produce metrics to help mobile business owners determine their profitability.
    There are plenty of other services that track app events, such as flurry and mixpanel but they don’t help with the financial side of running a business. App kontrol will help you determine your ROI and therefore allow you to figure out how much you can spend on advertising.
    It will save you time from having to jump from site to site as and compile spreadsheets for your business

  • Announcing AffiliTunes

    I’m happy to say that the first service under the new Halotis.com is open now for it’s first users. Affilitunes is a simple service to geo-target iTunes affiliate links. You provide your affiliate keys for PHG and Trade Doubler and AffiliTunes will redirect clicks to the correct affiliate program depending on where the click came from.

    It does one thing, and is trivial to use.

    The service is 100% free, and I use it myself so you can count on it sticking around for a long time.

    What you might not know is that iTunes Affiliates are currently run through two different affiliate tracking networks that operate in different global regions. Trade Doubler handles the European iTunes stores and PHG handles most of the rest.  To get the most revenue from your iTunes referrals you need to have your clicks tracked by the appropriate company.

    AffiliTunes redirects your links to the appropriate tracking agency so that you can get the most from your referrals.

    Curious? Sign up and try it out.

  • Taking Rails Lessons to Django

    For the past couple of months I’ve been working on a number of Ruby on Rails projects with some talented and experienced developers.  After years of working in the Django world on various projects, Rails is an interesting contrast.

    My perspective on developing webapps has changed greatly since working with Rails. This is both due to technical differences as well as differences in the business goals of the projects I’ve worked on.

    The rails community has embraced speed of delivering finished apps to an unprecedented level. Using the Heroku stack and add-on services it’s easy to build a fairly complete application by selecting a series of services you need and installing some carefully selected ruby gems. That gets you 90% to a workable project in a lot of cases. The last 10% is adding in the business logic and custom models and views.  Seeing this app development though the selection and configuration of 3rd party services and software was eye opening.

    By embracing 3rd party services for things like logging, errors, email sending, and databases you are relieved of a significant amount of infrastructure and configuration setup time. Having a deployment process that ‘just works’ with a git push removes the need for writing custom scripts in Fabric, and Chef/Puppet recipes – so long as you’re willing to accept the higher costs for hosting.

    The Python community, even though it’s supported on Heroku seems to have missed the boat on this a little.

    I wanted to see how the speed of development could be tweaked for Django projects by making a couple changes especially on the early setup and bootstraping of new projects.

    The Python community actually has some tools that make creating projects from scratch even better than I expected.

    Cookie Cutter is an awesome tool for development teams that are creating new projects. You get to define a starting point that includes your favorite libraries and is organized the way you like. If you create lots of new projects from scratch then cookie cutter will save you a bunch of time. Rails bootstraps you with their preferred gems which gives developers a good starting point though it also includes things you might not like. Django developers need to invest in a bit of time to develop their own templates 

    Embracing class based views – For a long time I was a hold out. Functional views are easy to understand and require less looking up of documentation to see what things need to be called or overridden in order to do what you want.  Class based views however eliminate a lot of the common patterns you would be writing over and over again in a common app. Using the class based views in Django feels a lot more like rails to me, and once you grasp it they will save you development time.

    Use and love libraries. The variety of Ruby gems available is shocking. Even things like collecting in static files for something like jquery can save you some time. In Rails you can include jquery-rails gem and then include the js file in your template. two lines added to your project and everything is hooked up. The Django community hasn’t taken the same approach – adding jquery to a django project requires downloading the files from jquery.com yourself and putting them in the right folder before adding it to your template.  It may not seem like much but it makes a difference.

    Rails and Django are interesting to contrast. They’re similar enough and yet have taken different approaches to solve the same problems. Beyond the technical differences the community differences are fascinating.

  • Minimum Viable Sale (MVS)

    One of the big things about running a business is managing risk.  As an entrepreneur I know that 25% of businesses fail within the first year, 60% have failed by year 4 and 71% have failed or closed by year 10. Given that most businesses are started with the best of intentions and usually with all the time and equity the business owners can provide these failure rates are indicative of the tremendous amount of risk.

    One of the most effective ways to combat the risk and reduce the chance of your own business failing is to seek validation of your business idea early.  Very early.

    Lets say you have a great innovative idea for a business. To start with you’d probably ask around to your friends to see if they think it’s a good idea or not. Chances are your friends, not wanting to hurt your feelings, will agree.  “That’s an amazing idea” they’ll say.  With the positive feedback, you’ll probably feel pretty confident about starting to build your business right away.

    Unfortunately that is a false sense of validation.  Your friends are probably not your target market, they are motivated to maintain friendship rather than stomp on your dreams, and they didn’t have to put money where their mouth was.

    To really get a sense of whether or not your business has legs start with getting some commitments on sales from real customers, if possible negotiate full or partial upfront payment. This happens before you’ve built anything, before a line of code has been written, before prototypes have been developed. Validate that the idea has merit from actual customers and confirm that they’re willing to put real money on the table for your solution.

    Only after having made your sales and having financed the bootstrapping of your business do you actually go ahead and create what you’ve promised. With customers in place you have eliminated one of the biggest and most stressful risks in business  – the struggle to find new customers.  The remaining risk is to actually deliver what you promised below cost.

    Making that initial sale is almost never easy, and getting the marketing message correct from the start is nearly impossible.  Investing the minimum possible money and time into an idea so that you can market test it can be critical.

    So here’s a new acronym for you: MVS (Minimum Viable Sale). MVS refers to the absolute minimum amount of effort and money required to craft a compelling enough marketing message to land your first sale.

    The MVS probably includes a presentation (Keynote/PowerPoint), perhaps a website, it might require a business plan, some mockups or even a faked version of your product. For example: a mobile app could be convincingly created in something like Fluid UI without writing a line of code that could be used as a demo in a sales meeting.

    Even for a free service, the MVS is worth creating.  In some cases the MVS for this could be simply posting on reddit if people would be interested in it, or linking to an opt-in form on a website to build an initial customer list.

    In other cases the Minimum Viable Sale might be a production run of 100,000 widgets in which case something like a kickstarter campaign might be a good option to reach as many people as possible.

    The concept for creating that MVS is to do the absolute minimum amount of work before getting paid to actually work  on your idea. By making that first sale you’ve validated your marketing message, you’ve identified your customer base, and confirmed that your idea meets a need that someone is willing to pay for.

    I’ve worked in places where the business had a good idea, identified an underserved market and put heads down for 4-5 months working on building a product only to find out after the fact that the potential customers were happy with their existing system, or the cost to change their current system was more work than it was worth.  Month’s of wasted effort and tens of thousands of dollars in development costs down the drain. Alternatively they could have started by trying to sell the solution they had in mind with the intent of getting enough cash commitments to pay for the 4-5 months work upfront.  The added benefit of getting customers before development starts is that they can help refine the features required for it to meet the needs of the market. Win-Win.

    Starting a business with an MVS before you develop your MVP (Minimum Viable Product) is a simple way to get off to a lower risk start and help ensure that there is a market for your MVP when it’s finished.

  • New Site New Direction

    With the launch of the new design for this site we have also taken a new tack on the strategy going forward for future development of products and features.  The backend services that currently have been built for Halotis iOS Apps will be re-built so that others can benefit from the work done.  Where appropriate the source code will be open sourced and in other cases Halotis will launch and run some web services so that you don’t have to deal with the servers and infrastructure required to run them yourself.

    The new direction will aim us at creating services that enable real social integration for mobile games. Creating a social game requires more than just slapping a share my score button, it needs to be tightly integrated into the core experience.  This is achieved through team building, communication tools, interactions that players can have on each others’ game state. Halotis will be creating a series of simple to integrate services to power this kind of social gameplay.  We want all games to be better.

  • Building something bigger

    Halotis is in the process of a pivot. We’re re-writing all of the software developed for the backend of our mobile apps so that they can be opened up for anyone to use. We will be offering a host of BaaS style applications to make mobile development easier, more social and hopefully raise the bar for what individual developers can accomplish.

    Imagine individual developers able to launch in game chat features like that in Clash of Clans. Or provide social networks to tie players together.  We have tools for monitoring analytics, and providing game config files dynamically, for pushing ads and sending notifications.

    It will take some time, but progress is being made to launch a host of services.

    We’re excited for this change and to see where things go in the future.

  • Playing with Docker, Vagrant, Dokku for deployment

    homepage-docker-logoI’m looking at launching a series of new web services in the future and that got me thinking about finding ways to improve my development and deployment workflow to make it super trivial to launch new services and APIs.

    Recent experience with Heroku’s PaaS got me looking in that direction. Pushing a git repository to kick off a server build is an eloquently simple approach that makes spinning up new services a snap.

    However Heroku costs can quickly spiral up and out of control. Running it myself on raw Amazon EC2 or a local dev server would be ideal.

    Thanks to several new projects it’s possible to create an easy to use mini-heroku on your own server.

    Docker is a brilliantly simple idea that has sparked a huge following in the last few months.  It is one of the most exciting developments in Open Source at the moment.  Basically Docker lets you run an extremely lightweight virtual machine on top of Linux.  You can spin up and down services in 1-2 seconds that are isolated from the host server which allows you to play with various server configurations quickly, easily, and without touching the core system.

    Docker allows you to specify your entire server configuration in a Dockerfile of which there are already thousands defined and shared and searchable at http://index.docker.io.  Need a WordPress server? Redis? Memcached? you can now get them up and running in a virtualized environment extremely easily.

    Dokku, builds on top of Docker with the ability to replicate the most impressive feature of Heroku: git push to deploy.  Once set up you can configure a git push remote and have Dokku automatically build and run a Docker for your app and host it on a subdomain.  Brilliant.

    Managing all these Docker services can be done with another awesome tool called shipyard. Bring your virtualized multi-host environment under control.  It even supports automatic restarts of crashed services.

    Getting it all up and running has been fairly straight forward. Once in place, it will make managing my own cloud of services much more robust.