Skip to content

Instantly share code, notes, and snippets.

View langford's full-sized avatar

Michael Langford langford

View GitHub Profile
@langford
langford / progressQuestionMark.py
Created December 3, 2022 20:28
Emotional Feeling of a Progress Bar
import time
import sys
import os
def clearline():
sys.stdout.write("\033[2K\033[1G")
def clearscreen():
@langford
langford / chunks.swift
Last active August 16, 2018 18:43
Chunking data
//: 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 June 29, 2018 13:45
Metal Pricing Guide

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 February 7, 2018 14:32
Explanations of different comprehensions in python3
"""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 December 13, 2017 22:48
Georgina's Sequence
//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:
@langford
langford / gist:e0d3c1a6253f594ebda15ded3b3b65d8
Created March 27, 2017 05:18
Some self QA at a high level:
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.
#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 November 12, 2016 19:10
Use of Slack in Client - Provider relationships
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
@langford
langford / gist:03b090a55ed3f5f8a5ab100d7118b632
Last active October 6, 2016 19:21
Dash/Kapeli Prediction

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:

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