Skip to content

Instantly share code, notes, and snippets.

Michael Langford langford

Block or report user

Report or block langford

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@langford
langford / chunks.swift
Last active Aug 16, 2018
Chunking data
View chunks.swift
//: Playground - noun: a place where people can play
import UIKit
struct ChunkedData{
let chunkCount:Int
let chunkSize:Int
let byteCount:Int
let originalData:Data
let chunks:[Data]
@langford
langford / pricing.md
Created Jun 29, 2018
Metal Pricing Guide
View pricing.md

What does a metal port mean to them? How many files? How many abstractions? How wrapped up in special case performance logic are they?

As there are not enough people who can do this, there should be a high rate. There is also a lot of minutia on top of the literal coding.

There is a ton of power you need to get this done. This needs to be granted to you as a matter of the contract. Continually reconvincing them to do the correct thing as you go will be tremendously draining.

You should have contractual technical assistance on their side with adapting their build system. (“In addition to a Decisionmaker, Client will provide a build assistance engineer to help with the asset pipeline and other project specfic tooling as needed, within 48 hours of notice of a problem. Build assistance engineer will supply written documentation on portion under discussion after the meeting for future documentation.”)

If you do not have a current and past stable of test devices, a portion (33-40%) should be billed as a fixed

@langford
langford / comprehensions.py
Last active Feb 7, 2018
Explanations of different comprehensions in python3
View comprehensions.py
"""This is an explainer for what list comprehensions are
Python was more adopted by mathy types than functional programmer types of people.
One thing that mathy types and functional programmer types have in common is
they often think similarly about data.
They both use statements about varables, called 'Declarative programming' over
statements that are a series of instructions to the compiler to move a value
here or there or whatever (called 'Imperative programming')
@langford
langford / adder.swift
Last active Dec 13, 2017
Georgina's Sequence
View adder.swift
//Playground
typealias StringBinary = String
///Converts a UInt to a binary string representation
func binary(_ v:UInt,_ rest:StringBinary="")->StringBinary {
switch v {
case v where v == 0:
return "0" + rest
case v where v == 1:
View gist:e0d3c1a6253f594ebda15ded3b3b65d8
How do you self QA (in UIs)
By @mj_langford on twitter
I write down what success looks like from a user goals and timing level. After that, important tests, and what is likely to be wrong in a UI test environment. What I can do next tends to stick out as a series of testable bits that a machine can check, as well as a list of tools, and platforms, I can manually check the app on to verify he app functions this way.
Then looking at the stakes and dev budget, I can winnow down the possible testing and verification procedures to fit the time we have, or request more budget/less nitpicking if the quality/delivery speed tradeoff does not match with larger standard project goals and professional and reputation standards as well as ethics.
I also try to use input validation on APIs standardized checking tools and common mistake checking tools (linters, project analysis tools, etc) to check automated errors.
View Dinosaurs Singing a Dinosaur Song
#From Oh My Oh My Oh Dinosaurs! by Sandra Boynton
# https://smile.amazon.com/Oh-My-Dinosaurs-Boynton-Board/dp/1563054418/
# For Sonic Pi: http://sonic-pi.net
use_bpm 145
play :c4
sleep 1.0
play :d4
sleep 1.0/2.0
play :f4
@langford
langford / Client Slack Questions
Last active Nov 12, 2016
Use of Slack in Client - Provider relationships
View Client Slack Questions
How do y'all handle the "join my slack" request from clients/prospective
clients?
I'm unexcited to do so before a contract is signed due to people's tendency to
hook automation into it, so I'd be in a dubious insurance predicament if
something went wrong
Afterwards that goes away, but there are arguments against using it then too,
that I don't really love, but makes sense
View gist:03b090a55ed3f5f8a5ab100d7118b632

I think there are a few things that could have happened here.

First the obvious ones:

  1. Fraud that both knew was fraud occured. I don't think that's likely but people are people.

  2. Something Apple calls "fraud" happened that may have been something more arguable, and a strong personality ran head first into a brick wall. This happens a lot in the iOS/Mac AppStore process, as anyone who's tried to moderate this situation on behalf of anyone else can attest.

The less obvious one:

View GV Mark All Read Applescript
activate application "Safari"
repeat 100 times
tell application "System Events"
key code 28 using {shift down}
keystroke "a"
key code 34 using {shift down}
key code 124
delay (1)
end tell
end repeat
@langford
langford / IANAL or an accountant, but choosing your business type:
Last active Jan 29, 2017
A business owner's take on business forms
View IANAL or an accountant, but choosing your business type:
I do apps for a living, and lots of the people I do apps for need to make companies. In addition to owning and operating a couple myself, I am often somewhat involved in the creation of others. There are many types of company you can make, and they each have different use cases and tax advantages and audit risks
Type one for small companies that do not expect to carry over losses very often, and do not need foreign ownership or venture capital:
LLC Filed federally as a C-corporation, promoted to a S-Corp shortly after founding for the purposes of taxes: This is what I have. You have to file taxes for it separately, but you largely do not pay tax directly from this for income taxes, but you don't have to do things like hold director meetings with yourself, or maintain minutes. You get the flexibility of a LLC operating agreement, and you can employ yourself easily as well. This form is also rarely audited, and the nature of the tax structure makes book keeping rather easy, taxes rather easy, and keeping your
You can’t perform that action at this time.