Category: Software Engineering

Coding, Python, web development, architecture, and deployment

  • Overbuilding From the Start

    A project I have been working on for the past couple of months has suffered from a critical planning error that early on has resulted in time and budget overruns as well as a product that has performance and stability issues.  It’s all because the decision makers at the top decided to take on risky technology and design choices anticipating scalability problems before they even have scale.

    One thing that I have learned over the years is that you can go a long way on the basics.  MySQL or PostgreSQL will scale very well for almost all use cases you are likely to be developing for.  In very few cases is the horizontal scalability of NoSQL options worth the complexity it brings.  Building out a distributed clustered environment from the start is a sure way to add unnecessary complexity to every subsequent technical decision.

    Now the project is over budget and behind schedule.  Any work that needs to be done has to deal with an architecture that adds complexity to every software decision and makes deployments more error prone and time consuming.

    Lesson learned I guess..  An MVP release should really focus on the keeping things as simple as possible for as long as possible.  For a $1M project, a 50% cost/time overrun is a lot of money.  Especially when a simpler architecture might have been 50% below the initial budgeted amount.

  • Success and Confidence: The Trump Effect

    With election activity heating up in the USA, and the prominent Donald Trump attracting a lot of media attention as well as leading positions in the polls it is interesting to think about what a crazy world we live in that someone like him has accumulated so much wealth and power.  It begs the question, why is he a billionaire and not me?

    The one thing that stands out about Donald Trump’s character which likely has much to do with his success is the unflappable confidence he has in his own opinions.  It takes a certain type of person to be able to double down from a personal debt of $900M and get back to billionaire status.  It says something about the amount of risk he’s willing to take on, as well as the amount of assets he has been able to leverage.

    His confidence is further evidenced by the way he talks about crazy ideas like building a wall on the Mexican border – with absolute conviction.

    Confidence is a trait that on it’s own convinces us of an underlying intelligence even when it doesn’t exist.

    When you need to get buy-in from others, confidence is an important part of gaining support.  It’s no doubt that Trump’s confidence allowed him to negotiate tremendous deals that allowed him to build his empire.

     

  • Github Streak is Over

    Vacation broke my Github streak of consecutive days for coding and contributing code openly.

    It started out as a way to get me back into programming Python code and trying to test a theory I had about how to become a top 1% software developer by doing “Freecoding”  – a method based on what authors use to overcome writers block and become faster at writing.

    There were several key lessons I got while doing this:

    • It can be difficult to think of original things to program every day
    • I had the opportunity to find a lot of gems in the Python standard library and practice using them
    • My knowledge of the language is significantly deeper than it would be had I just been programming professionally
    • It gave me time to explore some of the other sub-communities within Python – example: Mathematics, plotting, and  machine learning

    One thing I was hoping this would be more effective with was getting fast at developing with a web framework.  Over the course of 250+ days of coding I wrote nearly 25 web applications with Flask. I wanted to get to the point where I could type a new web application as fast as my typing speed allowed and that recalling names of packages and how to bootstrap a new application would come so quickly that there would be no cognitive load at all.  It turns out that it’s hard to do.for a couple of reasons.  First, If I don’t know what the application is going to do (within the scope of something that can be finished in < 30mins) then I get bogged down with figuring out something to do.  When I tried implementing the same application everyday it became a memorization exercise and didn’t help with the understanding of what I was typing.

    Additionally it was interesting to experience how my short term memory dropped off over time. After several consecutive days of practice I could perfectly recall a 100+ line program (and type it in 15 minuts), but a break from that practice for a couple days and I’d encounter blocks in my recall.  A month long break and most of my memory was missing too many specifics to completely recall it.

    Now that the streak is broken I’m calling it quits and re-allocating that time for something else.  I have some non open-source code that I’m trying to work on, and I’m falling behind on my reading goal for the year.

  • Lessons From 253 Days of Consecutive Freecoding

    My recent camping vacation is what broke an epic 253 day streak of github commits.  Overwhelmingly this activity was a daily practice of freecoding to see first hand just how effective it could be at getting better at programming.

    Freecoding is based on a writing technique called free-writing which is supposed to get the juices flowing and eventually lead to you developing a faster thought to fingers connection for getting your ideas out.  It is a popular practice for authors, but has never become something that programmers took up.

    With a bit more extensive experience now with the process and it’s effectiveness I can draw some conclusions about how it works and where the difficulties are.

    By far the biggest difficulty is trying to think of something original to write every day.  Unlike story writing where you can ramble out words with markov chain like inspiration, the strict syntax of programming forces you to think ahead about what you want the program to do.  I also found it psychologically difficult to finish a program that had syntax errors.  Finally, writing a script is not always easy to to linearly and jumping around the code provides an interruption that can stop the flow of thoughts.

    There were a lot of positives though.

    • Finding interesting things to program everyday inspired me to keep a list of interesting projects and try them out
    • It gave me an excuse to test out things like how threading is limited by the GIL in python which I hadn’t run into with my job
    • was able to scour through the standard library and uncover some features that I now incorporate often into my code.
    • got a much better handle on parts of the language that I didn’t use often such as functional programming
    • took time to try some popular libraries in areas I don’t usually get to deal with (mathematics, graphing, and machine learning)

    Through this practice I feel like my knowledge of Python was able to reach a new plateau.  Learning by doing and practising everyday is a tremendously good way to improve.

    if you are curious what kind of code I wrote everyday for 253 consecutive days it’s all on my github account.

  • More Swift

    Since Apple announced Swift was going open source and coming to Linux by the end of the year, my interest was peeked again to dive in and start learning it.

    With Swift running on Linux servers the race is on to create a compelling web framework so that it will be possible to write iOS apps and server applications with the same language.  A modern type safe systems language that’s still fast and easy to write is pretty appealing.

    Working through the Swift book and code examples, I’m finding it to be quite a nice language – especially with the new Swift 2.0 improvements.

    Unlike other modern languages Swift still has some short comings:

    • lack of a first class package manager (like pip for python, go get for golang, gems for ruby etc)
    • a comprehensive standard library (Python and Go have tremendous built-ins)

    Swift feels quite new and the team at Apple is still making breaking changes to the language syntax.  I’m hopeful that open sourcing the language and bringing it to Linux will open the door to allow other developers outside of Apple’s ecosystem to start learning it.

  • House work

    This past weekend started with the goal of painting the fence with a fresh coat of paint.  To make it a bit less manual I got a pressure washer to help with scraping off the old paint.

    Things went sideways when we realized that one of the fence posts was rotted and cracked and would need to be pulled out.

    So the entire 30 degree weekend was spent doing exhausting work trying to dig and pull out a pillar of concrete in a 3.5 foot deep hole.

    Having grown up in newfoundland the ability to hand shovel a hole that was nearly 4ft deep without finding any rocks what-so-ever was something of a revelation.  This is what using a shovel is supposed to be like.

    The fence post shenanigans have pushed out the painting work. It’s only 1/2 done now and the back side of the fence looks like a scrapped up mess.  So it’ll be another few hours of work before everything is complete.

  • Have a Lab Instead of an Office

    The space to create new innovation is dearly missing from today’s work environments.  Creating a space to really encourage great leaps in innovation requires a few things:

    1. Space and time to think.
    2. Freedom to implement or test an idea quickly
    3. Collaboration to help get over hurdles

    Recently I had the opportunity to work in a lab.  It was a bit of a mess – wires strewn everywhere, breadboards, toolboxes, soldering stations all around and within reach.  The mess actually encourages quick testing of crazy ideas. It creates an environment where there’s no limits and its easy to bend the rules to get something working.  If you want to drill a hole in your desk to attach something, go ahead. Run a wire into the next room – poke a hole in the wall.

    This lab was in stark contrast to the IT management in which PCs were locked down. In the software world computers are our entire space in which to invent and create. Yet within the constraints of corporate IT the freedom to innovate can be severely restricted.  Without the ability to install software, tweak settings, plug in new devices our hands can be tied. Rather than call and IT admin to get a password to install something we avoid the confrontation and continue on with the status quo.

    In many ways the modern office is too restrictive to create truly game changing innovation.

    I encourage everyone to strive to turn their office into a lab. Create a space where anything is possible!

     

  • Fill your mind with good things

    As the father of a 18 month old, it’s been fascinating to try and understand how her little mind works.  Currently she is getting quite good at classification: car, cheese, door, dog. Everything she sees is echoed back.

    At this early stage in development it’s easy to see that what you say and do have immediate impacts with what she learns and how she behaves.

    This doesn’t stop just because we get older and become adults.  Our minds are flexible and always changing – forming new memories, changing opinions, learning new things.  All these new growths in the mind are a result of the external and internal stimulus we give it.

    It has been said that reading is the most effective form of mind control.  When you read, the words on the pages leave an impression. The concepts give your mind something to spin on until the books ideas merge with your own.

    On the other hand. Feeding your mind with the wrong stuff can have unfortunate consequences. In an effort to teach Watson (IBMs Jeopardy winning AI) pop culture and slang, they fed it with the content from urbandictionary.com.  Unfortunately it had the effect of turning Watson into a potty mouth.  With an AI they were able to simply undo that.  Human minds don’t have an undo function.

    Do yourself a favour and be picky about the information and ideas that you feed your mind. Be mindful of the internal thought processes that develop your opinions. It will dramatically impact your future.

  • Personal Key Performance Indicator Dashboard

    There are many things that make corporations work well (in well run businesses) that can be applied to a personal level. KPIs (Key Performance Indicators) are something that I’ve been fascinated by for quite a few years now.

    Building dashboards full of statistics has been a part of every one of my personal projects.  The back-end for all my mobile apps/games was focused mostly on collecting and displaying all the various income sources and plotting revenue per day per app so that I could see the trends and identify spikes.

    My most recent app (Persistence) is, in essence, a KPI system for yourself.

    Exploring this idea further I worked on an application for my Raspberry Pi and am using an old monitor to have an always-on dashboard to display my activity against the goals I have.  When falling behind on my reading goal I’ll see a red box highlighting the overdue situation.  If I haven’t written enough code for the day I get an alert box.

    This is what it looks like so far:

    Screenshot from 2015-05-03 21:26:29

    I’ll continue to build it out and try different indicators that I’m interested in tracking and figure out what will provide the best motivation to keep focus on my longer term goals.

    I’m 1 week away from a 200 day streak on Github activity.  Maintaining this streak through the year is one of my New Years resolutions.  I’m also attempting to read one book every 10 days (which is proving difficult), and I have my financial goals for the year.  I’m hoping that having this always on dashboard will keep me focused on the right things, and not on spending too many nights watching TV.

  • Re-invigorating Old Products

    Sometimes you need to go back and look at the things you’ve done in the past to see if anything is due for an update or refresh.  Leaving old products to go stale is a sure way to let your customers know that you don’t care and don’t provide good customer service.

    With that in mind we’re going back through our catalogue of products – stuff that we have spent thousands of hours developing – and seeing if we can apply what we know now to those products to breath new life into them.

    Beyond the easy stuff like bug fixing, graphics tweaks and updating and modernizing the projects it’s a chance to apply entirely new concepts.

    One that I’m particularly keen to experiment further with is Behavioural Dynamic Response.  The idea is to trigger context correct information to users to help push them through the key response indicators.  It may be a notification to get the user to finish the particular level they were on, or to come back to beat their friends score.  When you have sequences defined that you know you want your users to go through you can do whatever is within your power to get them to keep taking that next step.

    Behavioural Dynamic Response is a super powerful technique that is not yet being widely used and shows a lot of potential for improving the user engagement with your products.

    Even without the major overhaul and completely new features.  Just the occasional touchup to your products shows that they are still active and more worth checking out.