LIST

Business goals (aka role of the CEO)

Quote_ are you against layoffs “Let me review what we have agreed on. We agreed that we should, ‘Make money now as well as in the future,’ ‘Provide a secure and satisfying environment for employees now as well as in the future,’ and ‘Provide satisfaction to the market now as well as in the future.’ The first one represents the traditional view of people who own companies. The second is the traditional view of the unions, the employees’ representatives....

March 23, 2023

google cloud function go GCP

package function import ( "fmt" "net/http" "github.com/GoogleCloudPlatform/functions-framework-go/functions" ) func init() { functions.HTTP("HelloWorld", helloWorld) } // helloWorld writes "Hello, World!" to the HTTP response. func helloWorld(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "Hello, World!") } so then your entry_point = “HelloWorld” That is the entrypoint from the init() NOT the function name inspiration: Write Cloud Functions _ Cloud Functions Documentation _ Google Cloud GoogleCloudPlatform_functions-framework-go_ FaaS (Function as a service) framework for writing portable Go functions

March 22, 2023

run gcp functions locally (python)

run a single function export GCLOUD_PROJECT="XXX" export GOOGLE_ACCOUNT="your@email.com" echo "GOOGLE_ACCOUNT=$GOOGLE_ACCOUNT" export GOOGLE_APPLICATION_CREDENTIALS=$HOME/.config/gcloud/legacy_credentials/${GOOGLE_ACCOUNT}/adc.json export YOUR_ENV_VAR="foo" pip3 install functions-framework functions-framework --source ./path/to/yuor/main.py --target your_python_function_name --debug run a custom api functions/run_functions_locally.py from flask import Flask, request from my_function_a.main import my_python_function_a from my_function_b.main import my_python_function_b app = Flask(__name__) @app.route('/') def index(): return 'Index Page' @app.get('/api/a') def get_a(): return my_python_function_a(request) @app.post('/api/b') def post_b(): return my_python_function_b(request) functions/my_python_function_a/main.py import functions_framework YOUR_ENV_VAR = os.getenv("YOUR_ENV_VAR") @functions_framework.http def my_python_function_b(request): headers = { 'Access-Control-Allow-Origin': '*', } return "hello from function a YOUR_ENV_VAR=" + YOUR_ENV_VAR, 200, headers functions/my_python_function_b/main....

March 22, 2023

Go error: cannot find main module, but found .git/config

fixing error error: go: cannot find main module, but found .git/config in [redacted] fix: go mod init cards (src) (this adds a file “go.mod” containing: module cards go 1.20 the src mentions it’s better to use git or something

March 16, 2023

Run intelli/golandj files without having to add each file manually

Run intelli/golandj files without having to add each file manually ./deck_test.go:6:7: undefined: newDeck solution: change ‘Run kind’ from “File” to “directory”

March 16, 2023

Course: Go: The Complete Developer's Guide (Golang) - Stephen Grider

udemy.com/course/go-the-complete-developers-guide https://github.com/StephenGrider/GoCasts Hello world package main import "fmt" func main(){ fmt.Println("Hello world!") } go run main.go go build # compile files go run # compile + execute go fmt # format all files in PWD # dependencies: go install # install a package go get # download raw src coude go test # run tests package ~= project package main -> executable package not_main -> library package main MUST have...

March 14, 2023

GCP create config account

create config (only once) #show state before gcloud config configurations list gcloud config configurations create "MY_PROFILE" export CLOUDSDK_ACTIVE_CONFIG_NAME="MY_PROFILE" gcloud config set core/project "MY_GCP_PROJECT" gcloud config set core/account "MY_EMAIL" #show state after gcloud config configurations list use config (every terminal session) # choose project export CLOUDSDK_ACTIVE_CONFIG_NAME="MY_PROFILE" # login (valid for about an hour) export GOOGLE_OAUTH_ACCESS_TOKEN="$(gcloud auth print-access-token)"

March 10, 2023

run terraform as a service account

grant permission to a group / user resource "google_service_account_iam_member" "allow_us_to_impersonate" { service_account_id = google_service_account.service_account.id role = "roles/iam.serviceAccountTokenCreator" member = "group:GOOGLE_GROUP_EMAIL" } run terraform as a service account # run as service account export GOOGLE_IMPERSONATE_SERVICE_ACCOUNT="SERVICE_ACCOUNT_EMAIL" # stop running as service account export GOOGLE_IMPERSONATE_SERVICE_ACCOUNT=""

March 10, 2023

impact map + hypothesis driven development

impact map + hypothesis driven development Video_ Why Scaling Agile Doesn’t Work - Jez Humble (How to Implement Hypothesis-Driven Development _ Thoughtworks _ Thoughtworks) (Book_ Impact Mapping - Gojko Adzic)

February 26, 2023

10x

I always say: “the 10x engineer is the one who built it in the first place.” Understand the problem that is solved Why does this thing exist? What is the value? Who are the users? Understand the solution Has a useful mental model of the solution, that limits cognitive load Understand the vision Allows decision making that keeps open paths towards the future Familiar with the tech stack Familiar with the current architecture Knows which tradeoffs were made, thus can evolve the architecture Cf: Toyota Kaya quote" let them copy, they won’t be able to build on that and will be stuck Knows where to find information Who knows what Where is some documentation Familiar with the team’s ways of working Knows undocumented information Knows about previous learnings / experiments and their outcomes

February 24, 2023