Skip to content

Instantly share code, notes, and snippets.

View zkwentz's full-sized avatar
😅
Working

Zach Wentz zkwentz

😅
Working
View GitHub Profile
@zkwentz
zkwentz / rule-1.md
Last active July 28, 2023 13:10
Management Rules

1. Be Up Front

Perception Management is Just Preparation

If you know somehting is coming up that will impact how you are perceived. Right or wrong, be up front about it. Don't damn the other party telling yourself they shouldn't feel this way. And don't try to sneak it, finding a way or some in the moment excuse. Instead, be very upfront about it and put a workaround in place. Colleagues in town and you have to leave early? Put a calendar invite with your time letting them know and apologize, and then setup some time with each earlier in the day.

All projects cost the same amount of time, stress, and resources.

You have these three pools to pull from; time, stress, and resources. If you don't have the resources, you're going to pull from one of the other two. Choose how much from each ahead of time, and be upfront about it with yourself, with stakeholders, with the team.

Put the bottom line up front.

Lead with the BLUF

@zkwentz
zkwentz / Full Settings
Created April 6, 2018 06:59
Google Meets for BTT Touch Bar
This file has been truncated, but you can view the full file.
{
"BTTPresetName" : "vas3k v2",
"BTTPresetUUID" : "DA11492E-9150-4295-9076-842A309D928A",
"BTTPresetContent" : [
{
"BTTAppBundleIdentifier" : "BT.G",
"BTTAppName" : "Global",
"BTTAppSpecificSettings" : {
},
@zkwentz
zkwentz / analyzer.rb
Created December 5, 2016 03:03
tweet bot
module Sentanalyzer
module Initializer
def initialize(*args)
self.sentihash = load_senti_file('./sentanalysis/sentiwords.txt')
self.sentihash.merge!(load_senti_file('./sentanalysis/sentislang.txt'))
super(*args)
end
end
@zkwentz
zkwentz / adapters.application.js
Created June 15, 2016 15:48
2. Promises in Computed Properties
import DS from 'ember-data';
export default DS.FixtureAdapter.extend({});
@zkwentz
zkwentz / adapters.application.js
Last active July 26, 2016 14:24
Difference in Promised Properties
import DS from 'ember-data';
export default DS.FixtureAdapter.extend({});
@zkwentz
zkwentz / adapter.application.js
Created June 15, 2016 04:41
promise-in-property
export { default } from 'ember-data-fixture-adapter';
@zkwentz
zkwentz / 1-summary.md
Last active June 5, 2016 22:20
Ember Meetup Talk Outline 6/15

A Pattern for Promised Properties

Computed properties and promises, historically, just don't mix. In fact, a lot of developers have devoted a lot of time to avoiding the problem altogether. I work with Ember data a lot, and therefore promises and computed properties a lot, and I'd like to share my pattern for dealing with promised in properties. And how that helped me develop a good pattern for dynamically-keyed, computed properties.

Both of these examples that follow are contrived and both could more easily done in a template, but they come together in a good example where we need to filter a model's hasMany children by a belongsTo relationship on those children, and pass those to a select as options. It shows both the need for these techniques, and yet how much of a corner case they are.

`import DS from 'ember-data'`
Post = DS.Model.extend(
title: DS.attr('string')
body: DS.attr('string')
comments: DS.hasMany('comment',async:true)
user: DS.belongsTo('user',async:true)
@zkwentz
zkwentz / README.md
Last active October 5, 2015 00:00
Ember validations, defined on a model, server-side compatible

Problem

Ember-validations, was built to define the validations outside the model, and if you define them on your model, it will cause server-side errors to no longer work correctly (still unsure why).

Solution

In this example, we pull the validations off the model, and attach them to our error-wrapper component.

The solution outlined here allows gives you three benefits: