RSSAmplifier

Blog

Ukiah Smith

Recent content on Ukiah Smith

ukiahsmith.comRSS feed ↗106 posts

Latest posts

Improved Golang JSON unmarshaling with time and URL

Often times we need to unmarshal upstream data with unique constraints. Such as custom data types, or custom parsing of specific formats. Using the standard library could be impractical, and handling long structs manually can be tedious; however there is an alternative.

Which Compression Format to Use for Archiving

As my digital documents grows and expands I want to ensure that my documents and data will be available to me far into the future. One of the challenges of managing all my data is organizing and backing up the many many files I have. I want to save almost all of my files and documents, but A lot of them I suspect I will rarely access in the future. Or maybe I will never access them. In order to…

Golang Try() and Programming in the Large

The new try() proposal is counter to the core principles of the Go language, specifically software engineering in the large. The proposal’s stated goal is to reduce the tediousness around handling errors. I believe, that in actuality, it would reduce explicitness, increase complexity, and hinder large teams on large code bases. try() removes the shape of current error handling, the if != nil…

Bash: Check for Duplicates

I often find myself wanting to do a series of repetitive tasks for a small set of data. XKCD has a nice guide for when to write a script for repetitive tasks. Unfortunately I find myself with one off tasks that I would never use a script for again. Still I will write a script to automate my task. Part of me thinks I am saving time, but I’m probably not.

Tmux: custom project workspace

Tmux is a wonderful tool to increase my productivity by multiplexing windows and apps to a single terminal. I use it all the time when working on a project to organize my tools, and quickly switch between them. One things I do these days is create a shell script to launch, and customize, my tmux session for the specific project that I am working on. This give me quick access to a complex setup,…

A gentle introduction to Golang Modules

Go 1.11 introduced a new concept of Modules which brings first class support for managing dependency versions and enabling reproducible builds. Go previously had no notion of dependency versions, and it has been a long and arduous road to get where we are now . Modules do not just copy the style of other programming language’s dependency tools, rather it introduces a few slightly different…

TDD: Red Red Green

Testing gets easier the more you do it. I guess it’s like most things in that regard. For me my comfort level has risen as I have forced myself to practice the small steps that make up Test Driven Development. That was the next step in my TDD journey. If you recall from my previous TDD blog post I was starting from nothing. No experience dong TDD or testing. My uncomfortableness was…

DockerCon 2018

This post was originally published here . You would think the world is falling apart; or rather it seems that way, and I’m only really talking about the world of software. I’ll leave politics out of this. It’s not that the world of software is falling apart; or rather our applications are. What once were gleaming monoliths, monuments to our own achievement are now being hacked and splintered into…

Journey Into TDD: I have no idea what I'm doing

There is something small and tiny that I feel I am missing about Test Driven Development. I understand the basic principle of the matter; write a test that fails, then write the code to make it pass, rinse and repeat; red, green, then refactor. Knowing that basic truth of what TDD is has not translated into actually being able to use it as a practice in my day to day coding.

How to Read 12 Books in a Year

Yikes, I am behind in my reading goal. It is lat in the month of January and I am not far enough along in my reading to hit my goal. I am reading the first book to reach my goal that is my New Year’s resolution to read twelve books this year. It is a small step up from the seven books I read last year. The challenge though is that I am already behind.

Hugo: Improved static asset cache busting

Previously I was using a quick fix solution to bust cache on my static css files . Briefly, cache busting is a strategy of uniquely naming CSS and Javascript assets to improve page loads, and speed up propagation of changes when updates to the layout are made. More on cache busting. My previous technique worked as needed but suffered from a couple limitation. I was using random numbers appended to…

Semantic Class Naming

How we name html class names is important. Naming in general is important. A class name is a little story we can tell ourselves. Later in the development process we can quickly and easily know what an element is for based on the name. We learn from a class name what something is, and what we can expect from it. Semantic class naming is a style in which we use class names that describe what an…

Hugo static asset cache busting

Hugo is a great static site generator. It is crazy fast and has tons of options, but one thing I had not been able to discover was how to use variable data in make , my build tool, and pass it to a Hugo template. I wanted a way to create unique CSS filenames, and use those filenames in my Hugo templates.

books to read

The following list of books I have read and found informational and inspirational. They span a broad range of subjects, but offer something for everyone. Should you find yourself without something to read I highly reccomend these. Design for Community Derek Powazek Toyota Production System Beyond Large-Scale Production Taiichi Ohno Play Money Or, How I Quit My Day Job and Made Millions Trading…

Go: Marshal and Unmarshal JSON with time and URL data

Go has a robust JSON library for consuming and outputting JSON. The standard json.Marshal() and json.Unmarshal() functions do a great job of aligning primitive types and converting them from Go into JSON, and vise versa. Beyond the basic types you will have to create custom marshaling methods on your types and write some logic to handle the conversion process. We will go over writing these custom…

Blog Archive

Peak Design Everyday Messenger Review

The most frustrating part of the Everyday Messenger is that it is damn near perfect; not quite, but almost. The unique locking latch, a thoughtful strap, and quality construction make this bag a great everyday carry. The Everyday Messenger is intended to be a photographers bag; with the main compartment set to house a camera and extra lenses. The bag is intended for carrying camera gear, but…

Quick and easy web server for local development

Sometimes I want a quick way to build some web pages. A way that does not require installing a lot of servers locally, but is still better than opening the file directly in my web browser. When I start a new web project I break it up into small steps. These steps form a natural set of milestones, and helps me to reason about the project as a whole. Focusing on each step helps me make progress on…

Initializing channels in Go

With most variables in Go we can declared them in a couple of different ways. Using the var keyword, initialize them as we declare them with the := operator; or using the new or make keywords. Most variables can be declared with var , which only reserves storage for a named variable. If no assignment accompanies the statement, the variable is set to it’s zero value. Using var to declare a…

fmt.Scanf Introduction

From the fmt package; the Scanf function is used to read input from stdin. When you run this snippet of code the main() function will wait for user input a string, a number, and a second string. Which it puts into variables, and then uses to print some information. Scanf woul be used when you want to write a command line program that requires user input during the running process.

Firefox to integrate Pocket

I was shocked when I saw news of Mozilla’s Firefox native integration with Pocket ; the popular read-it-later bookmarking service. This is the first time I can remember when Mozilla has integrated a commercial third-party service. It feels a little odd. I understand why they might have done this. My guess is that Pocket is another revenue stream for Mozilla. I can appreciate the need for…

Building Go projects with gb

gb is a new build tool for Go created by Dave Cheney . It address the problem of reproducible builds. Building the same functional binary anywhere at any time is a problem of dependency management. Of knowing exactly which library version to use, and having it at hand. gb is a radical tool compared to current dependency solutions, which work with the existing Go toolchain and idioms. gb takes a…

Understanding Go Dependency Management

Right now there is a discussion thread on the golang-dev mailing list about formalizing how Go manages dependencies. The Go Team is putting forward that Go use vendoring to manage dependencies, and asked the community to formalize a configuration format that tools can use to manage vendored code. For sometime the Go team has been very passive in directing how Go manages dependencies. When Go was…

Galaxy Tab Pro 8.4 Review

Reading on mobile devices is something I have done for a long time. I have read novels on some low quality screens; such as the Palm III, with it’s spinach green tint. Recently I’ve been looking at trading up from my Kindle Keyboard to a device with a better reading experience. I wanted something that was comfortable while reading for long periods of time, had a better screen, and access to more…

Garny leather notebook cover

Field Notes makes a quality notebook, but it’s still paper and card stock. Given enough use it will become ragged, making it frail and eventually unusable. The solution is to write more often so that I use up a notebook before it starts to fall apart. While appealing, I do not want to be rushed with my words. So I found another solution, use a leather notebook cover.

Go frameworks and libraries

Go makes it easy to not use frameworks. Instead, small tool libraries used together achieve the same utility. The resulting applications are less complex, easier to reason about, and nimble in their modularity. Frameworks are themselves collections of libraries. How do they differ from discrete libraries that have only one functional use, and how does using one or the other affect application…

T-Mobile Note 4 unboxing

Programming is terrible so learn to enjoy it

I ran across an anonymous opinion piece on how programming is terrible . It was posted a while ago, but it resonated with my own journey through programming. From when I was young and nothing was impossible and everything was magical, through disenchantment once in the real world , and through finding joy and solace in my craft. But what I learned through my journey has helped me find the joy…

Staying focused

Staying focused on a project is one of the best ways to complete a project. Regardless of other factors, you need time to complete a project. If you don’t put in the time then the project has already failed. Projects need time to grow, time to be worked on. A project not being worked on is a daydream. Without being worked on it will never be built. Staying focused on your project is the…

Vote with your dollars

The free Internet isn’t free. And the rise of ad blockers is slowly choking off what little revenue online publishers do earn while visitors bemoan privacy concerns and boring content. Talking about using the web as a book publishing platform; Matthew Butterick touches on the economic realities of supply and demand related to online publishing.

Trusting third party apps

Looking for a secure private messaging client is easy. There are a lot to be found in the app store of your choice. Though the harder question is how do you know they can they be trusted. There are closed source messaging apps and open source apps. Some are owned by large corporations, other fledgling startups; some are run by open source groups. App authors come from all over the globe. The…

Startup Louisville Forum, the community that never was

We wanted a place of our own, longer than what twitter offers us; where we could keep the longer conversation going. A place us poor bastards could call our own. This is the story of the form at Startup Louisville ; a story of software, expectations, and how the forum didn’t magically turn into a thriving community beyond my wildest dreams. Life is hard, online communities are harder. Zach,…

Contact

Send me a message: Send

Privacy

Information we collect and use Basic account information Basic usage information Location information Link usage information Cookie usage information Log data How we collect information This information is collected in whole or in part using Google Analytics. What we share We share limited information with third party services, not limited to Google Analytics, advertising platforms, advisors, and…

Terms of Service

These Terms of Service (“Terms”) govern your access to and use of the services, including web forums, web blogs, et al (the “Services”) and any information, text, images, or other materials appearing on the Service (the “Content**”). Your access to and use of the Service is conditioned on your acceptance of and compliance with these Terms. By accessing or using…

Golang Hosting

Hosting Go web applications and APIs are a bit different than hosting PHP applications. Where a PHP file can be uploaded to a server, anywhere in the web root, and it will be interpreted and executed by the web server. Go is different. A Go application normally is a long running process, waiting for connections when it’s not processing requests. The apps need to listen on port 80, or…

The process of destinations

The journey is the destination; a saying that means that how we get to the end goal is just as important, or more, than the end goal itself. Consider the time spent working on a project is disproportionately larger than the time spent with the finished product. Then it makes sense that we should optimize for the journey. The journey is how we work, how we create; the journey is our process.…

How we spend our days

When I was young I used to take things apart. Around the house I would find radios, clocks and gadgets. I would stash them away in my bedroom, and when I had time I would tinker. Which basically meant I would tear them apart. I would, with great care, unscrew each screw, and pry apart each piece. I pulled everything apart without care and divided them in separate little piles, organized by type or…

First impressions and setting the tone with clients

Image courtesy of gbaku We really only have once chance to make a first impression. Whether it’s a new friend, a potential collaborator, or a new client. The first impression sets the tone for all other interactions that come after it. Which is why it’s important to be aware of how we present ourselves, what does one say, and how do we say it.

Technology agnostic

Image courtesy of crabchick When I discovered the Go programming language it just felt right to me. I felt like I had come home after a lifetime in the desert. I used Go to rewrite my blog engine. I use it to test new ideas, and to learn new techniques. When working with WordPress I would mistakenly write Go syntax. I want every new project I start to be in Go, and every project I maintain to be…

Golang: Crypto sign cookies for security

You can improve the security of your Go web application by cryptographically signing cookies using sugarcookie . A small library used to for signing cookie values that you can verify and trust on a user's return visit. This gives you strong trust and allows you to decouple the cookie from a session on a specific server. The signed cookie consists of a a secret value, a timestamp, and a unique…

Quitting Feedly, One cut too many

Death of a thousand cuts, simple and deadly. The victim is bound and cut slowly, with small cuts. It's excruciatingly painful and takes a long time for the victim to die. The torture is far removed from our civil society, and it maybe crass to use to describe such, but it fits. Using tools and services we make decisions about what to use and when. It's a balancing act between the service provider…

Go Workflow

My web development workflow in Go is not much different than how I used to work with PHP , but it is slowly shifting in subtle ways. When I first started learning how to program, using PHP years ago, I would work in short feedback loops. I would hit F5 to refresh my work all the time. Often with the smallest change I would refresh just to see what would happen. Such a short feedback loop helped me…

Switching from MySQL to Postgres

I have just recently switched my backend database from MySQL to Postgres. I switched for political and technical reason. Oracle now owns MySQL. They acquired it as part of their purchase of Sun Microsystems. Which bought it outright when it acquired MySQL AB. Oracle owning MySQL is a bad thing. It is in Oracle's best interest of it keeps MySQL from growing and progressing. Oracle's money makers is…

Music to be productive

Clif Martinez makes some really good music to listen to while working and being productive. It's in the background, but not too boring. It changes and flows but it doesn't distract.

Progress through imperfection

When you focus on perfection in your craft you do yourself a disservice. When you think you are improving and creating something wonderful you are, in reality, weakening your skills, hindering your growth, and becoming the antithesis of what you aspire to. I have been working on Walled City for a long time. It's had several incarnations all with the same basic goal, but built in different…

The new Moto X phone

Motorola has just announced the Moto X. The first Android phone developed since being bought out by Google. It's an interesting departure from the business class Droids that shows Google's influence in design and audience. Leaks about the Moto-X have been apearing for awhile. Little leaks here and there, and then what seemed a torrent of information spilling the beans on most of the device…

Create smarter goals for success

The old adage is that if you want to do something it helps greatly to have a goal for how to get there. It’s a nice simple statement that leaves a lot to be desired. As all goals are not the same. Most goals are short and sweet. They are a forward looking view of how we want things to be. Generally they start with “I want…”, I want pizza for dinner, I want a sports car, I…

Golang vs PHP

The Go programming language is still new and growing in popularity. I’ve been playing with it for a few months, learning by writing a blog engine. I’ve enjoyed it, and when I realized I had the basic blog features I needed, I tossed out my old PHP based blog and switched to using Go full time. When I started to write this post I thought I would have a couple of little differences in…

What can we learn from the death of virtual worlds?

Iterating Fun has a list of how virtual worlds never lived up to the hype and why they died . Mostly these apply to sandbox style virtual worlds. Where there is nothing and you are free to do anything. They are good lessons for us to learn when building the next virtual world. What can they tell us about goals, themes, conflict and complexity?