Adam Bright

Christian, husband, dad, software developer, aspiring entrepreneur

Page 2


Subtle principles of life

With two young sons I’ve been thinking a lot about the values I’d like to impress upon them to prepare them for the world they are learning to navigate. The following are principles that I have lived by for a long time now and have recently heard other people talk about or I’ve observed how not following these ideas can lead to negative or at least, less than ideal consequences. That’s not to say that your life will be bad if you don’t follow these but I think they can pretty universally put the cream on the cake of life.

Care about what matters, otherwise, let it go.
If you took anything away from this post then this should be it. If you really think about it, the things that really matter in life could probably be counted on one hand. The first step in following this principle is to determine what are the non-negotiable opinions that truly matter to you. For example, I am a...

Continue reading →


Relational Documentation

Think of something, any thing/idea/process you want, it doesn’t really matter. Now tell me, does the thing you are thinking of exist in complete isolation? Can you fully understand it without understanding at least a little bit about how it is composed or what it’s purpose is? Understanding anything isn’t possible without some context. Why does this thing exist? What other things work with this thing to accomplish the previous question? How is the thing composed?

Let’s say you were thinking of a car. What would you write in a user manual for a car? Why does the car exist? To quickly and efficiently transport humans and cargo over wide range of distances. How does a car do this? By combining (usually, for now) an internal combustion engine with a sturdy frame on four wheels. This is good documentation for a car, we have answered the big why and how questions surrounding a...

Continue reading →


An ode to C#

When I first met you, you seemed awkward and cumbersome with your strict rules on types. My first love was Python which seemed much more approachable with its duck typing and care-free way of solving problems. Then as I got to know you better I began to discover the joys of avoiding many headache inducing bugs with your wonderful type system. Even more to your credit you make your types even more explicit than your older brother Java with the ? suffix on your types to quickly let me know if a variable can be null or not (yes, if the type starts with a capital letter in Java it can be null but C gives you the option).

Now that I am devoted nearly full-time to Java (Android) development I long for your company even more. Simple things like joining a list of strings are not possible without downloading external code which means messing with one of Java’s hellish package management...

Continue reading →


Go with the flow

FluxCapacitor.jpg
I recently completed the major components of a large project at work where I was refactoring an internal messaging system. Being a typical business-driven software shop (yes I know every software shop is business driven but I may go into that in another post) our code is a bit of a mess and there is a large mixture of architectures and styles present within various features of our relatively large web application. Currently, most pages are written using ASP.NET Web Forms which I have come to despise greatly due to the extreme reliance on postbacks to the page. For the refactor I was involved in I was given the green light to try and bring our development practices into the 2010’s. This meant a host of new JSON services written with MVC since we don’t currently use Web API which depresses me a bit but it’s not the end of the world it just takes a bit longer to develop. The exciting...

Continue reading →


I, programmer

I, Robot
I, Robot - Digital Domain

Today my brother-in-law asked for advice on whether he should fill a general elective with an introduction to computer programming course. I admit, I’m a bit biased towards the subject considering that I spend around 45 hours a week programming professionally in addition to another 5-10 hours on my own personal programming projects. But, I wouldn’t spend this much of my time on something I didn’t think was worthwhile. Why do I devote so much of my time staring at a computer making pixels dance how I want them to?

Computer Problems
Computer Problems - XKCD

I love to solve problems, and programming is all about solving problems. Little problems, big problems, weird problems, ordinary problems I love them all. Why do I love problems? Because every problem is an opportunity, an invitation to learn, to conquer, and to make the world a better place. The transition between...

Continue reading →


Threes!

Threes!

I just spent a good chunk of the day playing a browser port of the iOS exclusive game Threes! (port that I’ve been playing).

The concept is familiar and the execution is excellent. At first everything seems easy enough. Put 1’s and 2’s and matching multiples of threes together to create larger numbers. With every shift of the board a new number gets pushed onto the board and any pairs that are lined up in the direction of the shift merge to a single tile of their sum. With every shift you see the next number that is queued up to move onto the board with the next shift.

So simple and yet so addictive. It’s easy to pick up, but difficult to master. All with the clean Apple-esque aesthetic. I love it.

There is only one problem, it’s not available for Android. This may or may not be a good thing considering how much time I have already burned on the browser version in just...

Continue reading →


Interfaces in Python

In the middle of building a web app template with the Tornado web framework I started thinking about how I was including a lot of code dealing with database access in my controller classes. The code is still in a prototype/proof of concept phase but I don’t like egregious cases of mixing concerns so I started thinking about how I could easily swap out providers for my persistence needs.

Now I’m sure I’m not the first person to think of this but I realized that Python makes it really easy to create classes that act like interfaces.

First we will create our class to be used as an interface.

class IPerson:
    def __init__(self, provider_instance):
        self.provider = provider_instance
        self.say_hello = self.provider.say_hello
        self.say_goodbye = self.provider.say_goodbye

We route everything through the provider instance so that the provider can implement helper...

Continue reading →