tiaalexa
2016-08-23 16:19:00

set the channel description: Sharing information (resources, tips etc) on devops

tiaalexa
2016-08-30 09:52:47

hey -- any advise on the best way for testing chef recipes? I can't really use the test dev because its literally a recipe for dir creation on a blank server. I was thinking of using a virtual machine to test on my workspace

brandon
2016-08-30 09:53:48

Yeah, we use a tool called Vagrant to spin up a VM and apply our recipes to it before trying it on test/dev

keenin
2016-08-30 09:53:52

I’d say that’s the best option

keenin
2016-08-30 09:54:12

bingo that sounds good, but setting up a whole vagrant instance for this might be a bit much

tiaalexa
2016-08-30 09:54:12

yeah that's exactly what I was going to use.

brandon
2016-08-30 09:54:19

and Vagrant installs an app called Oracle VM VirtualBox

:very_nice: keenin
🤗 tiaalexa
keenin
2016-08-30 09:54:25

but you’ll use it often i guess

tiaalexa
2016-08-30 09:54:35

well I have 4 JIRA tickets assigned to me and all chef scripts

keenin
2016-08-30 09:54:42

Vagrant that bish

✅ tiaalexa, brandon
tiaalexa
2016-08-30 09:54:59

haha I love this ^^

tiaalexa
2016-08-30 10:01:35

vagrant is dope -- thanks guys!

tiaalexa
2016-08-31 15:47:46

@tiaalexa uploaded a file: temp.PNG and commented: TYBG

keenin
2016-08-31 16:02:50

Good shit!!

keenin
2016-08-31 16:03:03

pretty bash

tiaalexa
2016-08-31 16:10:12

lol its git bash

tiaalexa
2016-08-31 16:10:14

lol windows

tiaalexa
2016-09-01 08:50:10

I STILL HAVE THE SAME ERROR

tiaalexa
2016-09-01 08:50:11

UGH

keenin
2016-09-01 09:01:50

What’s the error again?

tiaalexa
2016-09-01 09:06:59

@tiaalexa uploaded a file: error3.PNG

tiaalexa
2016-09-01 09:07:01

@tiaalexa uploaded a file: error2.PNG

tiaalexa
2016-09-01 09:07:11

look at the img from yesterday.. this is what I have now

tiaalexa
2016-09-01 09:07:21

I don't know if I changed a system var or what happened

tiaalexa
2016-09-07 10:51:09

has anyone used remote_file and it not retrieve the file?

keenin
2016-09-07 10:54:57

Is remote_file a command?

tiaalexa
2016-09-07 10:55:05

it's a resource

tiaalexa
2016-09-07 10:55:29

it's so you can fetch files remotely and specify where to place it on the node

keenin
2016-09-07 10:55:53

Still confused, is it like scp?

brandon
2016-09-07 10:56:11

Is it chef specific?

brandon
2016-09-07 10:56:43

ive never used it

tiaalexa
2016-09-07 10:57:16

okie, chef teased me and created the tar file I needed from a repo... but it was empty

tiaalexa
2016-09-07 10:57:18

classic

keenin
2016-09-07 11:16:22

silly chef

tiaalexa
2016-11-09 15:39:46

anyone know much about containers and how to customize a docker image?

brandon
2016-11-09 15:42:13

I wish I knew more :/

keenin
2016-11-09 15:42:37

Not off the top of my head

keenin
2016-11-09 15:42:38

lol

spkaplan
2016-11-09 15:42:45

I havent had a purpose for them yet

keenin
2016-11-09 15:43:00

I've dockerized stuff, but it's been like a year

tiaalexa
2016-11-09 15:54:33

okay, no worries. I am trying to create a process for devs to instantiate a env on their machine with containers but, there is custom features and I need to figure out how this would even work because most of our OS are linux and lots of people have windows so that is a problem.

tiaalexa
2016-11-09 16:29:55

JK boot2docker is saving me

tiaalexa
2016-11-09 16:30:02

check it out if you don't know what it is

keenin
2016-11-09 16:30:09

boot2docker is dope

keenin
2016-11-09 16:30:19

forgot they had that

tiaalexa
2016-11-09 16:32:37

but now they have docker toolbox

tiaalexa
2016-11-09 16:32:58

so I can run docker containers on my windows.

tiaalexa
2016-11-09 16:33:01

tight

keenin
2016-11-09 16:36:12

yea they needed that

keenin
2016-12-20 15:37:26

has renamed the channel from "devops" to "eng-devops"

keenin
2016-12-20 15:38:02

has renamed the channel from "eng-devops" to "xtra-devops"

andelink (andelinkyle@gmail.com)
2017-04-24 15:31:18

does anyone have any good introductory material to MapReduce?

andelink (andelinkyle@gmail.com)
2017-04-24 15:32:48

or general distributed computing frameworks?

spkaplan
2017-04-25 16:16:18

@andelink Here is the book that our team's architect gave me for learning Hadoop (https://play.google.com/books/reader?printsec=frontcover&output=reader&id=661sCgAAAEAJ&pg=GBS.PA0). It's licensed to him and has his contact info on it, so don't spread it around, but feel free to use it yourself 🙂 Let me know if this link doesn't work.

keenin
2017-04-25 16:19:46

I got an error trying to access it.

keenin
2017-04-25 16:20:21

Was curious😈

brandon
2017-04-25 16:20:34

He probably put you on a whitelist Sam. I'm getting the same error 😕

keenin
2017-04-25 16:20:52

Sam**

keenin
2017-04-25 16:21:21

LOL

brandon
2017-04-25 16:21:27

what are you talking about keenin? lol

keenin
2017-04-25 16:21:39

Brandon can't type

keenin
2017-04-25 16:21:49

He's a liar and his WPM is FALSE!!

brandon
2017-04-25 16:21:58

lol you wish

keenin
2017-04-25 16:22:09

I do...

brandon
2017-04-25 16:22:17

My last run on my new keyboard was 68 😎

keenin
2017-04-25 16:22:28

Damn...

keenin
2017-04-25 16:22:37

My high is like 62.... maybe

spkaplan
2017-04-25 16:26:49

It's because it's a in my google play books library, so I guess other people can't access it. I'll try to export as pdf or something.

spkaplan
2017-04-25 16:28:19

Again, please don't distribute the pdf since his contact info is on it 🙂

keenin
2017-04-25 17:00:16

Oops, my whole company now has it...

keenin
2017-04-25 17:00:56

¯_(ツ)_/¯

spkaplan
2017-04-25 17:02:03

Lol

andelink (andelinkyle@gmail.com)
2017-04-25 20:29:17

@spkaplan hey sam thanks for sharing! i am excited to go through it

andelink (andelinkyle@gmail.com)
2017-04-25 20:30:21

wait @spkaplan do you know it is over 500 pages long?

andelink (andelinkyle@gmail.com)
2017-04-25 20:30:34

did you even read that much in college?

andelink (andelinkyle@gmail.com)
2017-04-25 20:31:55

i will read each page

spkaplan
2017-04-25 20:32:29

Haha yeah, it's not a starter guide. More like the definitive reference. I jumped around through the book to get the parts I needed, but I ended up reading a lot of it.

andelink (andelinkyle@gmail.com)
2017-04-25 20:32:45

this is great. thanks man

spkaplan
2017-04-25 20:33:23

for sure ! 🙂

andelink (andelinkyle@gmail.com)
2017-05-03 08:54:12

re-entering the world of bash scripting.... can you guys recommend your favorite command line text-editors?

keenin
2017-05-03 08:54:50

Vim

👍 andelink, spkaplan, brandon
brandon
2017-05-03 09:07:27

For quick edits on the command line Vim is great if you take the time to learn how to use it. With the steep learning curve though, it's a time sink. Otherwise, other text editors are going to offer code completion and other features that just aren't available on the command line. When I write bash scripts I just do it in Atom and then keep a bash window open next to it.

spkaplan
2017-05-03 09:09:04

I guess we need to clear something up. @andelink are you limited to the command line, or can you use any text editor?

andelink (andelinkyle@gmail.com)
2017-05-03 09:09:16

command line specifically

andelink (andelinkyle@gmail.com)
2017-05-03 09:09:31

it's a bitch copying+pasting to and from command line so i just want to stay in

keenin
2017-05-03 09:10:07

When you copy pasta in Vim, remember to have it on insert mode. Or else it won't pasta everything.

andelink (andelinkyle@gmail.com)
2017-05-03 09:10:17

pasta lol

🍝 keenin
brandon
2017-05-03 09:11:25

You shouldn't have to copy/paste anything? Not sure what you mean. But yeah, if you are constrained to the command line, Vim is great if you have learned how to use it. You can also use nano or something like that but it's not that great. Vim is really the only way to go on the command line.

andelink (andelinkyle@gmail.com)
2017-05-03 09:12:29

oh sorry i should have mentioned that I am connecting to remote hosts and will be working there

andelink (andelinkyle@gmail.com)
2017-05-03 09:13:12

i could write/save files locally and then push them to the host but i am just playing around at the moment

spkaplan
2017-05-03 09:15:06

Yeah, for working remotely, it's worth doing it on the command line. Iteration is too slow if you have to scp to test every change.

brandon
2017-05-03 09:15:30

Oh, that makes sense 👍

andelink (andelinkyle@gmail.com)
2017-05-03 09:26:20

thanks guys. i think i remember using nano for small edits back at western. will try that and vim

andelink (andelinkyle@gmail.com)
2017-05-09 14:33:38

i don't even know how to type anything in VIM

andelink (andelinkyle@gmail.com)
2017-05-09 14:33:42

i am using nano

B25FDENA2
2017-05-09 15:05:18

[ MESSAGE TEXT EMPTY ]

andelink (andelinkyle@gmail.com)
2017-05-09 15:05:26

lol

brandon
2017-05-09 15:05:53

haha I played through this a couple times in college

vim-adventures.com
keenin
2017-05-09 15:06:17

Yep that'll def help.

andelink (andelinkyle@gmail.com)
2017-05-09 15:39:15

haha i will check that out later tonight

andelink (andelinkyle@gmail.com)
2017-05-25 14:25:58

what % of your time do you guys spend on code reviews? i am new to it but it takes up so much time its kind of insane

brandon
2017-05-25 14:27:35

It depends a lot on the code review and how relevant it is to me. I should probably spend more time and participate more than I do currently but I agree, it can be a big time sink.

spkaplan
2017-05-25 14:28:23

It definitely does take up a lot of time. I probably ROUGHLY spend about 1 day's worth of time every sprint (2 weeks) on code reviews.

andelink (andelinkyle@gmail.com)
2017-05-25 14:29:48

it's a great way to learn, see how others do things, and stay knowledgeable about different systems, but definitely spending more time on this than i thought i would be

andelink (andelinkyle@gmail.com)
2017-05-25 14:30:01

kinda nice to know it's normal

spkaplan
2017-05-25 14:31:23

I agree, I learn a lot through code reviews. I find it necessary, because otherwise I won't be familiar with the changes my teammates are making to our components.

andelink (andelinkyle@gmail.com)
2017-05-25 14:34:41

Yeah if you want to be an effective team member you have to do them

brandon
2017-06-05 12:54:18

spkaplan: wow, fancy!

spkaplan
2017-06-05 12:55:35

It looks fun, right!? But I don't think I'd want to have all of that flashing on a regular basis

brandon
2017-06-05 12:56:56

haha no. It's fun for a couple minutes and that's about it. My keyboard is programmable like that as well but I didn't splurge for the RGB version so my patterns are just always in red.

spkaplan
2017-06-25 17:24:33

anyone familiar with AWS Step Functions and/or AWS CloudWatch?

andelink (andelinkyle@gmail.com)
2017-06-27 08:44:33

@spkaplan nope

keenin
2017-06-27 09:27:59

@spkaplan CloudWatch a bit, what's up?

spkaplan
2017-06-27 09:42:42

@keenin The component I am designing is basically a driver/coordinator that will be responsible for running multiple very long running processes on a schedule. In addition to a Jenkins solution and a Java web service solution, I am looking into an AWS-specific solution. From what I've read so far (still have more reading and experimenting to do) it seems it is a common approach to use AWS Step Functions to build a series of steps to execute. Step Functions manages the workflow, retires, error handling, etc... of the downstream calls it is making. To accomplishing the "scheduling" requirement, I am looking at AWS CloudWatch as a way to trigger the Step Functions state machine on a schedule. It seems like this is a fairly standard method to solve this kind of problem. But I'd like to hear anything you know about CloudWatch that isn't particularly apparent from the high-level documentation. Any hidden trouble areas, advantages, quirks, etc...

keenin
2017-06-27 09:47:01

From what I've seen around my office, people tend to use it for a bit and then realize it's not that great/there's a better solution. We mainly deal with trying to get logs out of CloudWatch (kind of a pain). Typically people use lambda functions and CloudWatch together.

spkaplan
2017-06-27 09:54:55

Which do they use and then realize there's a better solution? Step Functions or CloudWatch?

keenin
2017-06-27 10:41:29

CloudWatch

spkaplan
2017-06-27 10:47:00

That's good to know. Can you give me more details about what the pain points are?

andelink (andelinkyle@gmail.com)
2017-06-27 11:13:35

My understanding was CloudWatch was primarily meant for logging/monitoring of all your AWS processes, rather than triggering of events, but I could be wrong

keenin
2017-06-27 11:14:20

@andelink You are correct. That is exactly what CloudWatch is for.

keenin
2017-06-27 11:15:13

Can't really say too much more on it, I just get the logs out of it. lol

andelink (andelinkyle@gmail.com)
2017-06-27 11:15:56

lol yeah i've only used it for monitoring but i haven't had the opportunity to set any of it up - only consume it.

spkaplan
2017-06-27 11:17:55

Thanks guys!

andelink (andelinkyle@gmail.com)
2017-06-29 15:05:51

heredocs are dope af

brandon
2017-06-29 15:06:50

why?

andelink (andelinkyle@gmail.com)
2017-06-29 15:07:11

they're so handy!

andelink (andelinkyle@gmail.com)
2017-06-29 15:07:55

i just learned of them and it is better than

echo 'asdfgasdf' >> some_file
echo '124351245' >> some_file

andelink (andelinkyle@gmail.com)
2017-06-29 15:08:31
cat >> some_file << EOF
asdfgasdf
124351245
EOF
andelink (andelinkyle@gmail.com)
2017-06-29 15:08:46

idk just thought it was cool

brandon
2017-06-29 15:11:58

hmmm not sure quite understand what they are. Or maybe I already knew what it was and just didn't know the term for it? haha I don't know. Is your second code snippet an example of heredocs?

andelink (andelinkyle@gmail.com)
2017-06-29 15:12:14

Wikipedia (http://en.wikipedia.org/)
brandon
2017-06-29 15:12:23

In this case, the double carrots aren't redirecting input/output?

brandon
2017-06-29 15:12:30

Yeah, im looking at that link right now haha

andelink (andelinkyle@gmail.com)
2017-06-29 15:12:33

lol

andelink (andelinkyle@gmail.com)
2017-06-29 15:13:47

it treats everything after the << EOF and before the second EOF as a file and redirect its content as input to the command preceding the <<

andelink (andelinkyle@gmail.com)
2017-06-29 15:14:20

So the following appends the two lines of content to somefile:
cat >> some
file << EOF
asdfgasdf
124351245
EOF

andelink (andelinkyle@gmail.com)
2017-06-29 15:14:46

while the following just echos it back to stdout:

cat << EOF
asdfgasdf
124351245
EOF

brandon
2017-06-29 15:15:58

Ok, that makes sense I guess. It's kind of like a short hand trick for lining up a bunch of text/tasks/scripts for manipulation

andelink (andelinkyle@gmail.com)
2017-06-29 15:16:18

yeah exactly

andelink (andelinkyle@gmail.com)
2017-06-29 15:16:24

i'm using it to refresh my aws credentials upon start up in my ~/.zshrc script:

cat > ~/.aws/config << EOF
[profile alexa]
region = us-east-1
[profile bt]
region = us-east-1
EOF

cat > ~/.aws/credentials << EOF
[alexa]
aws_access_key_id = $(odin-get -t Principal $ALEXA_MATERIAL_SET)
aws_secret_access_key = $(odin-get -t Credential $ALEXA_MATERIAL_SET)
[bt]
aws_access_key_id = $(odin-get -t Principal $ODIN_MATERIAL_SET)
aws_secret_access_key = $(odin-get -t Credential $ODIN_MATERIAL_SET)
EOF

brandon
2017-06-29 15:18:20

andelink: why don't you need two opening carrots following cat like in your previous examples?

andelink (andelinkyle@gmail.com)
2017-06-29 15:19:06

here i am wanting to overwrite the whole file rather than append

brandon
2017-06-29 15:19:22

oh..duh haha cool

andelink (andelinkyle@gmail.com)
2017-06-29 15:19:26

🙂

brandon
2017-06-29 15:16:29

Never heard of that before. Nice find 👍

😀 andelink
keenin
2017-06-29 15:16:56

I'll probably stick to vim lol

andelink (andelinkyle@gmail.com)
2017-06-29 15:17:07

what do you mean?

brandon
2017-06-29 15:17:14

not really related keenin haha

andelink (andelinkyle@gmail.com)
2017-06-29 15:17:23

lol

keenin
2017-06-29 15:17:24

lol

keenin
2017-06-29 15:17:34

Reading the wiki now, spoke too soon

andelink (andelinkyle@gmail.com)
2017-06-29 15:17:43

haha been there

keenin
2017-06-29 15:22:41

So in your .zshrc file, the here-doc is allowing you to mimic a file format with the ability to use bash commands/variables. Where using a regular file wouldn't let you use those commands/variables?

brandon
2017-06-29 15:37:22

keenin: It's more of just a short hand for passing a bunch of lines of text to a given command where each line is treated as a separate file and handled independently. In his zshrc example, each of the three lines under EOF is treated as a text file passed to cat. cat then echoes that file to the redirected output which is his credentials. It doesn't actually give him any additional functionality/commands.

keenin
2017-06-29 15:46:39

It's not treating each line like a file, it's treating everything in between the EOF tags as a file.

brandon
2017-06-29 16:08:36

Yeah, that's right. Good catch

andelink (andelinkyle@gmail.com)
2017-06-29 15:25:43

Sort-of I guess (just learned of it an hour ago so still learning). I am primarily using it to avoid doing this:

echo "[profile alexa]" > ~/.aws/config
echo "region = us-east-1" >> ~/.aws/config
echo "[profile bt]" >> ~/.aws/config
echo "region = us-east-1" >> ~/.aws/config

echo "[alexa]" > ~/.aws/credentials
echo "aws_access_key_id = $(odin-get -t Principal $ALEXA_MATERIAL_SET)" >> ~/.aws/credentials
echo "aws_secret_access_key = $(odin-get -t Credential $ALEXA_MATERIAL_SET)" >> ~/.aws/credentials
echo "[bt]" >> ~/.aws/credentials
echo "aws_access_key_id = $(odin-get -t Principal $ODIN_MATERIAL_SET)" >> ~/.aws/credentials
echo "aws_secret_access_key = $(odin-get -t Credential $ODIN_MATERIAL_SET)" >> ~/.aws/credentials

keenin
2017-06-29 15:49:17

Or you could echo with a newline \n.

echo "[profile alexa]\nregion = us-east-1\n[profile bt]\nregion = us-east-1" >> ~/.aws/config

andelink (andelinkyle@gmail.com)
2017-06-29 15:49:39

oh yeah that would have been better than an echo on each line as well

keenin
2017-06-29 15:49:43

Looks less clean lol

andelink (andelinkyle@gmail.com)
2017-06-29 15:49:48

but then you get a little less readable

andelink (andelinkyle@gmail.com)
2017-06-29 15:49:49

yeah lol

keenin
2017-06-29 15:51:17

Could just make your echo look pretty too lol

keenin
2017-06-29 15:51:23

fun ways to do the same thing XD

andelink (andelinkyle@gmail.com)
2017-06-29 15:52:09

yeah lol fun stuff

andelink (andelinkyle@gmail.com)
2017-06-29 15:52:44

it's weird though supposedly there is ideally one right way to do something but there are so many different ways to do the same thing

andelink (andelinkyle@gmail.com)
2017-08-25 22:30:50

A Facebook recruiter reached out to me about a Data Engineering role there and sent me their standard pre-interview questions for Data Engineering (meant to be practice material). It's a fucking breeze.

andelink (andelinkyle@gmail.com)
2019-11-13 16:04:50

I'm talking with a FB recruiter again and they sent me this exact same set of homework questions today. The exact same questions from two years ago.

andelink (andelinkyle@gmail.com)
2017-08-25 22:30:54
brandon
2017-08-25 22:33:40

haha yeah, that's some entry level shit. Do they know you are experienced and do that stuff everyday?! I wonder what an offer from facebook would look like. I think they have a pretty good comp package

andelink (andelinkyle@gmail.com)
2017-08-25 22:35:04

yeah i feel insulted lol

andelink (andelinkyle@gmail.com)
2017-08-25 22:35:51

i mean the guy saw my linkedin and reached out to me, so i assume that they know/think i am experienced in this. it was so basic

brandon
2017-08-25 22:41:37

Haha yeah, I mean I would have to look up how to do some of those queries but those must be like second nature to you by now. Have you responded to their email? Did they say what level the position was that they were interested in interviewing you for?

andelink (andelinkyle@gmail.com)
2017-08-25 22:44:34

They didn't say anything regarding level. I spoke with them on the phone before they sent the practice material and told them I wasn't considering leaving Amazon yet - but still wanted to see their practice material.

Based on what they sent, I can't imagine it being for anything above entry-level

andelink (andelinkyle@gmail.com)
2017-08-25 22:44:47

Even then it seems weak

andelink (andelinkyle@gmail.com)
2017-08-25 22:46:39

Here were my solutions:

andelink (andelinkyle@gmail.com)
2017-08-25 22:46:57

@andelink uploaded a file: facebook_de_coding.py

andelink (andelinkyle@gmail.com)
2017-08-25 22:47:02

@andelink uploaded a file: facebook_de_sql.sql

brandon
2017-08-26 10:34:30

Nice. Did you send in your solutions or just do them for fun? And are those two complete sets of solutions?

andelink (andelinkyle@gmail.com)
2017-08-26 10:37:51

Nah I just did them last night to try them. I tested the python ones and they worked (test with the assert statements), but I didn't verify the sql ones because I didn't want to create tables just to test

spkaplan
2017-08-27 22:36:17

TechCrunch
Katie Roof
andelink (andelinkyle@gmail.com)
2017-08-27 23:40:51

Just saw that!

andelink (andelinkyle@gmail.com)
2017-08-27 23:41:14

Should be interesting going to work tomorrow @spkaplan

spkaplan
2017-08-28 08:21:54

@andelink Yeah, I'm waiting for more people to get into the office. I'm curious to see what we hear throughout the day

andelink (andelinkyle@gmail.com)
2017-09-15 23:22:15

when your redshift cluster has an unrecoverable hardware failure and you need to spend your friday night on-call with aws support and restoring latest snapshot into a new cluster while re-loading old data that didn't quite make it into the snapshot and monitoring the backlog of 150+ load jobs in the queue to ensure they run in the proper order once the snapshot is restored

/gifs

:thisisfine: brandon
😂 spkaplan
B25FDENA2
2017-09-15 23:23:08

[ MESSAGE TEXT EMPTY ]

andelink (andelinkyle@gmail.com)
2017-11-07 07:38:51

Anyone have experience with the ELK stack?

🖐️ brandon
brandon
2017-11-07 08:13:32

I'm probably considered a bit if a fanboy haha

😄 spkaplan
andelink (andelinkyle@gmail.com)
2017-11-07 09:42:54

What is your use-case for it?

brandon
2017-11-07 12:07:25

haha all sorts of stuff! The biggest use case is as a searchable log store but I've also used it to store large lists of autocomplete options since the elasticsearch api has built in autocomplete functionality that is really quick and easy to set up. It's a distributed document store though. It's very quick at searching documents of the same shape since it can store the data in lots of small "shards", query them all asynchronously, and then return the aggregate data. What's your use case? I can probably help you decide if it's a good candidate solution.

andelink (andelinkyle@gmail.com)
2017-11-07 12:16:58

No I don't have a use-case for it

andelink (andelinkyle@gmail.com)
2017-11-07 12:18:32

A PRFAQ for a new analytics platform ended up in my inbox and was pushing to build it with ELK but I disagree with it being the right tool for the job. The whole document conveyed very little technical competencies.

Was wondering if anyone here has worked with it. What you've mentioned confirms my thoughts

brandon
2017-11-07 13:15:08

Hmmm ok. Here's the elastic pipeline in case you want to see how it fits into their overall system or dig into elasticsearch a bit more. (Elastic products)
(Elasticsearch)
Just out of curiousity, what would you suggest using as an alternative data store solution?

andelink (andelinkyle@gmail.com)
2017-11-07 13:59:42

It depends on what your goal is and requirements are. At its core ES is a full text search engine. It’s distributed and indexes everything heavily, making it strong for real time query retrieval. But since it is full-text it is a bit more than a document store (A fuzzy-wuzzy dynamodb, a restful mongodb).
It is schemaless so it lends itself to log analysis easily.

It has some simple aggregations which makes Kibana possible, but lacks any complex analytical functions and doesn’t handle joining different data sources well. Doesn’t make it a good solution for traditional business intelligence, ETL, dimensional modeling, or slicing/dicing/drill-downs. See typical relational databases (oracle, Postgres, Redshift, etc) and reporting applications.

It isn’t in-memory so it’s not good for your usual data science or ML tasks (model training is an iterative process). See Spark, Hadoop, etc (also decent general purpose ETL frameworks).

Depends on what you need to accomplish. Seems like a great fit for real-time operational intelligence, but not your usual massive ETL/aggregation/reporting that is associated with business intelligence or data cleaning/formatting and model training associated with data science

brandon
2017-11-07 14:56:40

Yeah, I would say I agree with your analysis 👍

andelink (andelinkyle@gmail.com)
2017-11-07 18:14:52

It’s awesome you get to use elasticsearch! I want to see it in action

andelink (andelinkyle@gmail.com)
2017-11-08 07:38:35

Are you using AWS Elasticsearch or rolling your own with the open-source?

brandon
2017-11-08 16:57:28

My team has 2 instances in AWS currently (one for a bulk of our logging which is used across other teams as well and another that handles the autocomplete for the search bar in the research center). I also have an ELK stack running on a spare dev box sitting under my desk at work which I set up as one of my first larger projects. It consumes snowplow logs () enriched with some employer data we keep in a mongo db. We use this for some of our SEO testing and analysis right now since Google Analytics samples our page views so it can be frustrating when trying to dig in and get specific.

andelink (andelinkyle@gmail.com)
2017-11-09 07:58:29

Nice I have heard of snowplow but don't really know anything about it. The link says: Cloud-native web, mobile and event analytics, running on AWS and on-premise with Kafka.

What does mobile and event analytics mean here?

brandon
2017-11-09 08:53:48

You can use it alongside Google Tag Manager which is a service that fires off events or posts variables on a web page when certain conditions are met. Snowplow captures all of those variables on the page and turns them into logs. So, each page load becomes a specific log and each user session has a unique id so you can track it. I think they just used mobile because it works across all platforms but their may be features specifically for mobile analytics I'm not aware of. That's my take on it but I'm not the one that originally set it up. I just got it all piped in to elasticsearch so we could more easily analyze it.

brandon
2017-11-07 08:21:49

Well, someone finally took the Soundstack idea..haha
@keenin @spkaplan

partyplay.cc
spkaplan
2017-11-07 08:23:55

Hahaha cool!

keenin
2017-11-07 09:13:30

Classic

2018-01-02 20:15:37

@andelink commented on @spkaplan’s file https://soundstack.slack.com/files/U2494HTLP/F54JD5CAZ/hadoopinpractice.pdf: Been meaning to say that this book helped me a lot when I started this stuff months ago. Thanks a ton for sharing.

2018-01-02 20:28:33

@spkaplan commented on @spkaplan’s file https://soundstack.slack.com/files/U2494HTLP/F54JD5CAZ/hadoopinpractice.pdf: @andelink I’m glad to hear it! 😄

andelink (andelinkyle@gmail.com)
2018-01-11 18:25:07

Does anyone know how to see the ssh-agent processes for just the current shell? ps aux | grep $USER | grep "ssh-agent" returns all ssh-agent processes for the user, not just what has been initiated in the currently active shell (e.g. if I use screen or tmux and initiate an ssh-agent in that shell, after already having initiated one elsewhere, and then use ps aux in either shell it would list both agents running)

Edit: nvm, $SSHAGENTPID returns the process ID for the ssh-agent in the current shell. this will suffice.

👍 brandon, keenin
spkaplan
2018-01-12 14:24:49

Glad you could figure it out, because I had NO idea haha

andelink (andelinkyle@gmail.com)
2018-02-07 07:31:50

Re: Slow Python

brandon
2018-03-08 09:48:13

Does anyone use a tool at work that allows you to build a dependency graph of your services across different platforms/networks? I can easily generate a dependency graph for a set of projects that belong to the same solution but the instant an API call is made, I lose visibility into what services the service I'm calling depends on. I want to be able to answer the question, "If service X goes down, will service Y go with it". Seems kind of tough. I feel like you would need to attach tracker metadata to each DTO that goes across the network so that it could be traced from its origin. Seems pretty out there, but I just thought I'd ask.

spkaplan
2018-03-08 09:55:16

I expect you would need to do what you suggested (doing some sort of tracing). I have not heard of any other tool/method to do it.

keenin
2018-03-08 09:58:24

Splunk can do this, is just a super expensive part of their product. It's difficult, because you have to have something sitting almost everywhere that's sniffing packets and recognizing what the API calls look like.

keenin
2018-03-08 10:00:01

Splunk's product works nicely because you inherently have splunk forwarder installed on every host. i.e. that agent can do all the sniffing and reporting back to the mothership.

andelink (andelinkyle@gmail.com)
2018-03-08 10:00:43

Not quite as general as your vision, but my team uses Airflow for most of our workflows. It generates DAGs and you can visually all your pipelines and dependencies

andelink (andelinkyle@gmail.com)
2018-03-08 10:01:28

Doesn’t discover underlying services any of your work might hit, however

brandon
2018-03-08 10:05:39

Alright, thanks guys. Thought it might be a cool hackday project but it seems a little out of scope. This is the first hackday where I've showed up and not immediately known what I was going to work on 😕

tiaalexa
2018-03-08 10:10:41

Yeah I believe we use splunk to handle this as keenin has mentioned

tiaalexa
2018-03-08 10:11:10

splunk triggers all of our alerts

andelink (andelinkyle@gmail.com)
2018-03-08 10:13:26

Something I’ve been meaning to spend time on haven’t gotten to yet; a nice UI for data discovery and table DDL, metadata, query/load history, etc. Lots of tools do a piece or so if this as an add-on but I can’t find something specifically for this with all the features I’d like. Would be pretty straightforward to build I think

brandon
2018-03-08 11:34:03

Hmmm I'm not familiar with those tools and their use cases so I'm probably not the one to take it on. Sounds like you need a hackday! haha Does anyone else's work do hack days?

keenin
2018-03-08 11:39:26

We do lab week three times a year. Exactly like hack day, but a week long.

brandon
2018-03-08 11:41:26

Nice 👍

andelink (andelinkyle@gmail.com)
2018-03-08 11:52:48

Various orgs across Amazon host hackathons that people can attend. Never been but seen plenty of posters for them

spkaplan
2018-04-06 15:18:17

@spkaplan uploaded a file: image.png and commented: A Coworker of mine sent this out this morning. I love it so much!

😆 andelink
👏 andelink
2018-04-06 15:19:16

@tiaalexa commented on @spkaplan’s file https://soundstack.slack.com/files/U2494HTLP/FA23D68F2/image.png: omg so many feels rn

2018-04-06 15:21:59

@brandon commented on @spkaplan’s file https://soundstack.slack.com/files/U2494HTLP/FA23D68F2/image.png: haha that's a good one

keenin
2018-04-06 15:28:33

Hits too close to home haha

andelink (andelinkyle@gmail.com)
2018-05-14 11:01:24

Stupid question here. Didn't take any CS so don't formally understand how long a certain operation takes. When serially iterating over say 15M+ objects, how much extra time does an extra conditional check add? Is it significant if it is just a modulo operation?

Specifically, this is what I have:

python
with NamedTemporaryFile() as tfd:
for _, tsv in filtered.toLocalIterator():
tfd.write(ensure_utf8_encoding('{}\n'.format(tsv)))
count += 1
if count % 100000 == 0:
LOG.info(' %s: %s', locale, count)
tfd.seek(0)
s3_put(tfd.name, outkey)


I'm wondering if removing the if count % 100000 == 0: LOG.info(...) bit would help shave some time off at all? Would it even make a dent?

spkaplan
2018-05-14 11:06:38

My first thought is to use timeit to get a sense of how long the modulo operation takes. . I would maybe put the modulo in a loop of 100k (or some large number) to get an average, and time that loop.

👌 brandon
spkaplan
2018-05-14 11:07:36

Hopefully this can give you a ballpark estimate of how much extra time is spent on the modulo.

andelink (andelinkyle@gmail.com)
2018-05-14 11:07:49

That makes sense. I'll give that a go. Thanks!

spkaplan
2018-05-14 11:08:48

It is quick to try, so might as well 🙂

keenin
2018-05-14 11:30:50

On 15M+ iterations, it will save some time. Not sure how much though lol.

keenin
2018-05-14 11:31:28

Taking out the I/O command though will definitely save time. (LOG.info(...)) TBF thought you only write 1/100000 entries.

andelink (andelinkyle@gmail.com)
2018-05-14 12:28:28

If anyone was wondering, here are the timeit results for iterating over 5M records 100 times:

python
>>> import timeit
>>> from tempfile import NamedTemporaryFile
>>>
>>>
>>> def test1(num_records):
... mod_check = int(num_records * 0.01)
... count = 0
... with NamedTemporaryFile() as tfd:
... for i in range(num_records):
... tfd.write('{}'.format(i).encode('utf-8'))
... count += 1
...
>>>
def test2(num_records):
>>> def test2(num_records):
... mod_check = int(num_records *
0.01)
... count = 0
... with NamedTemporaryFile() as tfd:
... for i in range(num_records):
... tfd.write('{}'.format(i).encode('utf-8'))
... count += 1
... if count % mod_check == 0:
... tfd.write(''.encode('utf-8'))
...
>>>
>>> for func in ('test1', 'test2'):
... print(func, ' : ', timeit.timeit('f(5000000)', setup='from __main__ import {} as f'.format(func), number=100))
...
test1 : 644.0622930042446
test2 : 711.0211787484586


Shaved almost 30 seconds off.

brandon
2018-05-14 12:41:35

Is that significant for you? How long of a task is this in total? Also, it seems like it shaved 67 seconds unless I'm reading this incorrectly?

andelink (andelinkyle@gmail.com)
2018-05-14 12:41:43

It is not significant

andelink (andelinkyle@gmail.com)
2018-05-14 12:43:51

This is being done in a Spark job, and the real bottleneck is the network transfer of the data. I was just curious about this

brandon
2018-05-14 12:44:22

Cool, that makes sense. Thanks for the context.

andelink (andelinkyle@gmail.com)
2018-09-16 17:25:24

Do any of you do personal programming projects on the side? If so, what do your dev environments look like?

spkaplan
2018-09-16 17:52:11

For the time being my work projects have been fun, so if I have had the urge to do coding outside of normal office hours, I still work on work projects.

What about you?

andelink (andelinkyle@gmail.com)
2018-09-16 17:58:30

That's been the case for me so far as well. But today I've been looking into setting up my own personal development environments and wanted to ask you all about any experience you have with that.

spkaplan
2018-09-16 19:53:59

For me I think it depends on what technology I'm using for the project.

tiaalexa
2018-09-16 22:09:06

Yeah I haven't been spending much time outside of work on side projects but have been itching to do some front end stuff to make a portfolio site.

tiaalexa
2018-09-16 22:09:14

Agreed with Sam. Depends on what you are using

andelink (andelinkyle@gmail.com)
2018-09-16 22:19:43

Noob question then. Why would it vary too much on what you’re trying to do?

tiaalexa
2018-09-16 22:26:06

In terms of IDE's- webstorm for FE, and intell-j for BE is what I prefer. More because that is what we use for work and that is what I am used to.

tiaalexa
2018-09-16 22:26:47

Some just make things easier to build and don't need to import extra plugin's so this is why I have different ones suited for specific languages

👍 spkaplan
andelink (andelinkyle@gmail.com)
2018-09-17 06:48:23

Oh yeah IDEs make sense. I was thinking more like in terms of project dependencies and workspace organization. Even that might be language dependent?

brandon
2018-09-17 10:08:25

Yeah, it's pretty language/framework dependent. Some languages like python put dependency management in your hands and things can get really hairy and confusing fast while other more structured languages like C# handle a lot of the management for you. At least that's been my experience especially when I slap a full IDE on top of it.

I would just start by creating a git repo so that your project is versioned and try to follow best practices for that language. In the case of python, that probably means using a virtual environment and maintaining a requirements.txt by using --save when installing packages with pip.

👍 spkaplan, tiaalexa
brandon
2018-09-17 10:11:39

Or if you want to do something way different than work and just have fun you should look at getting a starter Arduino kit or something. They are cheap and fun to play with and there is a large community around them on Reddit and whatnot where you can get ideas for projects.

🤖 keenin
andelink (andelinkyle@gmail.com)
2018-09-17 11:45:18

Arduino kit? Is that the same sort of thing you worked on for your high school project?

brandon
2018-09-17 11:48:54

It involves some of the same hardware concepts but my high school project was at a lower level than the Arduino would be. I didn't do any coding in high school but with an Arduino, there is coding involved. I had a lot of fun playing around with mine last year.

andelink (andelinkyle@gmail.com)
2018-11-14 22:05:21

Lol, poor sap

😬 brandon
brandon
2018-11-15 07:01:45

That's no way to live.

andelink (andelinkyle@gmail.com)
2018-11-16 15:12:04

In Sprint Review... looking at teammates code on the big screen...

B25FDENA2
2018-11-16 15:37:13

[ MESSAGE TEXT EMPTY ]

👏 spkaplan
😂 spkaplan
brandon
2018-11-16 15:58:37

😂

tiaalexa
2018-11-28 10:29:39

curious what you guys use for your CI/CD pipeline. As we move to microservices from monolithic application i think we are building out a new pipeline from chef. curious what other people use?

brandon
2018-11-28 10:31:38

We use chef for managing environments and then TeamCity for building packages and Octopus for deploying those packages to wherever.

andelink (andelinkyle@gmail.com)
2018-11-28 10:50:54

chef seems nice from what I've read. Haven't used it though.

Amazon has it's own internal CI/CD tooling. In the past couple years they've been inspirations for AWS offerings though:
* AWS CodeDeploy (internally: Apollo)
* AWS CodeBuild (internally: Brazil)
* AWS CodePipeline (internally: Pipelines)
* AWS CodeCommit (internally: our GitFarm)

The native AWS products still don't have all the features of our internal tools, so not all teams here have migrated their devops to native AWS yet. Long term our Builder Tools team is pushing for the native AWS devops.

andelink (andelinkyle@gmail.com)
2019-01-09 15:55:49

You guys have any good resources for learning OOP?

spkaplan
2019-01-22 21:27:28

Some of you may have already seen this in the HutchResearch slack, but figured I’d share here incase not. I always wanted to understand how it works from the ground up. This might be a cool way to do it.

nandgame.com
👍 andelink
brandon
2019-01-23 07:20:26

Ah yeah, saw this mentioned on Reddit the other day actually. Still need to take the time to check it out though. Have you tried it yet?

spkaplan
2019-01-23 09:11:15

I haven’t tried it yet. I will when I find a free hour to get into it.

andelink (andelinkyle@gmail.com)
2019-01-29 13:28:58

@brandon Elasticsearch is slow if you index on a field that you don't use in your search/query, right?

keenin
2019-01-29 13:31:29

Correct.

👍 brandon
brandon
2019-01-29 13:47:10

Also, just unnecessary right?

keenin
2019-01-29 13:54:21

Not necessarily. You'd want the index in your search to increase speed, but the other stuff in your search is used to narrow down the specific results (obviously slowing down the search, but a necessary).

keenin
2019-01-29 13:54:52

Ideally though, yes, you would only search on indexed fields, but that's a design/philosophical problem.

andelink (andelinkyle@gmail.com)
2019-01-29 14:03:44

Yeah this is somewhat basic DB indexing principles in play here

andelink (andelinkyle@gmail.com)
2019-01-29 14:03:47

I have a silly team I guess

andelink (andelinkyle@gmail.com)
2019-01-29 14:05:00

Had a design meeting where they changed the doc schema to index on a field we don't search on at all. We've got billions of documents here and no one is talking about the inevitable performance hit

:thisisfine: keenin, andelink
:nic_sad: keenin
:lifeishard: keenin
:suspense: keenin
andelink (andelinkyle@gmail.com)
2019-02-14 08:45:13

Does anyone use the AWS Elasticsearch Service?

spkaplan
2019-02-14 08:46:59

I spent an afternoon reading about it and deploying a cluster, so I know just a little bit.

andelink (andelinkyle@gmail.com)
2019-02-14 08:49:46

Okay. I'm just wondering if anyone can share their experience with how long simple config changes typically take. I'm enabling Cognito for Kibana authentication on a couple clusters and the time that the Domain Status = Processing seems way too long after I submit the change.

Googling doesn't help too much, mostly results of clusters hanging in the Processing state

andelink (andelinkyle@gmail.com)
2019-02-14 08:55:57

I might just be impatient. It's taking about 20 minutes process the change.

spkaplan
2019-02-14 09:03:44

Unfortunately, I didn't work with it enough to get a sense of how long an update is expected to take. I do seem to remember it taking a while to do some cluster changes though.

andelink (andelinkyle@gmail.com)
2019-04-12 10:02:55

Anybody here ever used the Go language? I'm encountering it for the first time in the wild and don't know anything about it. What it's used for, why use it, when to use it, etc

brandon
2019-04-12 10:24:29

Never gotten to use it but I've been interested in trying it. It's supposed to be pretty cool. That's all I've got lol

keenin
2019-04-12 10:49:50

I've done a few dummy projects with it. It's pretty confusing.

andelink (andelinkyle@gmail.com)
2019-04-12 19:35:27

@brandon what makes you interested in it? I saw it in the middle of an internal python package here at amazon and was confused by it’s presence

brandon
2019-04-13 08:38:42

Just that I had a coworker that would talk about it from time to time and that it's developed and maintained by Google. I have no idea what I'd build with it or what it excels at and I would also be confused by it's presence in the midst of a python script. Maybe someone just wanted to try it out and thought it would be a good language for the job?

andelink (andelinkyle@gmail.com)
2019-04-13 13:00:20

Gocha gotcha. idk. Just wondering if anyone here could speak to it. Too lazy to do my own research

andelink (andelinkyle@gmail.com)
2019-04-25 09:57:54

Anyone else having issues with AWS console?

andelink (andelinkyle@gmail.com)
2019-04-25 10:03:53

Looks like direct links to a service still work, e.g.

Also direct link to region landing pages, e.g.

brandon
2019-04-25 10:22:16

Yeah, I got the same message as you.

tiaalexa
2019-04-25 11:30:10

yep within our region i see issues

tiaalexa
2019-04-25 11:31:18

try the alt link

andelink (andelinkyle@gmail.com)
2019-04-25 11:31:46

Good to know about the alt link

spkaplan
2019-04-25 12:59:04

That was an unproductive morning

👎:skin_tone_3: tiaalexa
r.taylor
2019-05-08 20:59:12

It's amateur hour! I've been having an issue with an assignment that I can't figure out, was wondering if any of you had any more experience with sockets than me. I've been sending information from a server to a client just fine, but now I'm trying to send some information back to the server and it's not liking it. The program is a game, but the relevant info is that it's connecting two clients to a server and each takes turns sending words back to the server.

r.taylor
2019-05-08 20:59:29

Relevant function:

r.taylor
2019-05-08 21:00:11

And when player one sends "abcd" and player two sends "efgh":

r.taylor
2019-05-08 21:00:23
Received 4 bytes for a word of length 4...
The word "" from Player 1 which starts with a "" and has a length of 4.
Next turn.


Received 4 bytes for a word of length 4...
The word "" from Player 2 which starts with a "" and has a length of 4.
Next turn.


Received 10 bytes for a word of length 98...
The word "dc" from Player 1 which starts with a "d" and has a length of 98.
Next turn.


Received 10 bytes for a word of length 102...
The word "gh" from Player 2 which starts with a "g" and has a length of 102.
Next turn.
r.taylor
2019-05-08 21:02:07

As you can see, the server initially reports receiving the correct number of bytes but displays nothing. Then, it waits a full loop before reporting a different amount of bytes received and displaying part of the initial word sent.

r.taylor
2019-05-08 21:02:26

Any ideas would be appreciated, I'm out of them.

r.taylor
2019-05-08 21:08:00

Just another thing, it's always the last two bytes displayed no matter the length of the string sent. The order may change, but always the last two.

spkaplan
2019-05-10 11:37:49

Unfortunately, networks is one of those topics that I would need to do some serious refreshing on before I would be of any help. We do not work at such a low-level much, if at all, so the details are not fresh on my mind.

r.taylor
2019-05-10 11:49:58

Yea that's fair. Figured it was worth a shot. Figured it out eventually tho, it was just a wrong data type. Thanks, anyway!

spkaplan
2019-05-10 11:50:46

It is always definitely worth sharing it here. I’m glad to hear it!

andelink (andelinkyle@gmail.com)
2019-05-31 13:59:58

Thought this was too funny...

👏 spkaplan
😄 spkaplan
keenin
2019-05-31 16:10:29

Too damn accurate

tiaalexa
2019-08-05 14:26:13

SPLUNK EXPERTS (looking at @keenin) can you create an alert in splunk to trigger if a file is empty…?

spkaplan
2019-08-05 14:26:56

I love that we have this Slack workspace to ask questions like this!

🙃 tiaalexa
tiaalexa
2019-08-05 14:28:11

SAME ^^

keenin
2019-08-06 08:10:12

What do you mean by a file being empty? Like the log file the forwarder is reading? Or a file on the actual Splunk indexer/search head?

tiaalexa
2019-08-06 08:24:33

it’s the log file the forwarder is reading but i think i was overcomplicating it

tiaalexa
2019-08-06 08:24:48

i can just check the number of results returned that was read from the file

👍 spkaplan
tiaalexa
2019-08-06 08:24:54

😅

keenin
2019-08-06 13:07:15

HAHA yea that will work

spkaplan
2019-10-29 09:08:07

I just learned about this library Lombok. Has anyone else used it before?

r.taylor
2019-10-29 09:17:33

We use Lombok a bit. Mostly just for the @Getter and @Setter annotations, maybe a few constructors as well. It can definitely make things look a lot nicer. It has created some weird interactions, however.

spkaplan
2019-10-29 09:20:08

Cool! Can you elaborate on the “weird interactions”

r.taylor
2019-10-29 12:34:38

It's been awhile, but the main one I remember had something to do with autowiring through the constructors that Lombok was building. Spring and Lombok seemed to disagree on what exactly was happening in the constructor, and the error that was being thrown wasn't pointing at anything too helpful. But, I feel like anytime you trust libraries to write code that you can't really see, it opens you up to running into something like that; Especially using multiple of them together like we are.

andelink (andelinkyle@gmail.com)
2019-11-20 08:49:16

lmao

GitHub
r.taylor
2020-05-10 14:52:38

Anybody have experience with Docker and Docker Compose? I'm trying to get a couple containers with a server and db up and running and I have no clue what I'm doing. Followed the official "how to" but felt like I didn't really get why I was doing what I was doing.

spkaplan
2020-05-11 08:53:49

Yep, have worked with Docker and DockerCompose a good amount. Are you looking for a high-level introduction to Docker to get an understanding of what problems Docker aims to solve? If so, I would start by reading things like:

r.taylor
2020-05-11 09:47:20

Thanks! I'll take a look at those.

andelink (andelinkyle@gmail.com)
2021-04-29 11:27:35

Finally! Github dark mode is here 🙌

spkaplan
2021-04-29 11:44:35

Hallelujah!

brandon
2021-05-01 14:42:59

Another exciting GitHub announcement I'm looking forward to playing with.

GitHub
👍 andelink
andelink (andelinkyle@gmail.com)
2021-05-01 15:09:49

Browser/cloud IDE for remote development? I’m a big fan. Excited to try this

spkaplan
2021-05-01 15:15:36

That's looks awesome! The less I have to install on my machine the better 👍

andelink (andelinkyle@gmail.com)
2021-08-19 08:06:38

Hey @tiaalexa, do you know a way to get or make a quicklink/url I can share with someone that takes them to "create new issue in this epic" within JIRA?

andelink (andelinkyle@gmail.com)
2021-08-19 08:07:47

I want someone to file us a JIRA issue but I want it to be within a certain epic but I don't want them to have to worry about all that detail they don't care about.

andelink (andelinkyle@gmail.com)
2021-09-02 09:23:42

lol love to see it!

keenin
2021-09-02 09:32:31

Stack Overflow: turning 8 hour workdays into 2 hour workdays since 2008

😆 andelink
andelink (andelinkyle@gmail.com)
2022-02-06 15:32:52

I think stackoverflow is down again

andelink (andelinkyle@gmail.com)
2022-07-22 07:40:30

@brandon @spkaplan @keenin @r.taylor would like your thoughts on designing tests for this recursive method I (temporarily) need.

context
my service calls a model to run inference on some input data. that’s all you need to know about that. the models response type is a deeply and arbitrarily nested object with N depth, where N is unknown and can change with each call. the top-level body has as a defined contract (as in the reponse attributes are known), but they are nested with further data types to an infinite depth with a far less strict contract.

problem
nested way within these model responses are instances of numpy.float mixed along with primitive python floats. normally not a problem. but we batch up model responses for distributed processing in spark, and apparently pyspark doesn’t know how to map numpy.float to the appropriate scala spark type for use in its execution engine. (i’ll give you a hint: it rhymes with gloat). the best paths forward would be to (i) fix this in open source spark, and/or (ii) make upstream changes to the model response. both are on the jira board, but alas, we have a project roadmap with deadlines to meet, so i relent and ship the quick fix.

the quick fix solution
a simple method i’ve so aptly named to_floats that recursively descends into nested objects and cast all float-like objects (inherits from python float) to native python float. not a problem, but it scares my teammates. we need a robust test suite in place.

testing <---- this is where i need you, thanks for reading so far
how do you design your tests? note that, in python, native equality comparisons require the objects being compared to be of the same type in order to be considered equal - except for numeric types. for numeric types, the equality operator behaves as though the exact values of the numbers were being compared, disregarding type entirely. so you get things like:

>>> 1 == 1.0 == np.float64(1.0)
True

>>> {'a': [np.float64(1.0), 2]} == {'a': [1.0, 2]}
True

now, this is what my pride-and-joy little method does:
# good
>>> to_floats({'a': [np.float64(1.0), 2]})
{'a': [1.0, 2]}

what my tests need to catch, is if it doesn’t work ie like this:
# bad
>>> to_floats({'a': [np.float64(1.0), 2]})
{'a': [np.float64(1.0), 2]}

… and so, with python number comparisons being as they are, i cannot simply rely on:
# not good enough
>>> assert to_floats({'a': [np.float64(1.0), 2]}) == {'a': [1.0, 2]}
True

# because ...
>>> to_floats({'a': [np.float64(1.0), 2]}) == {'a': [np.float64(1.0), 2]} == {'a': [1.0, 2]}
True

conclusion and rfc
to overcome this, my tests implement their own recursion to do both a value check of individual elements and a type check to ensure all nasty little np.floats have indeed been replaced with floats. i don’t like it and it feels wrong. how would you go about testing this? would you do different? the same? i’d love your thoughts. PLS HELP.

thanks in advance. application and testing code in the 🧵 -->

UPDATE: put the code in a gist

andelink (andelinkyle@gmail.com)
2022-07-22 07:45:07

I am hoping this file gets syntax highlighting for you

andelink (andelinkyle@gmail.com)
2022-07-22 08:09:21

It’s here in this gist, easier to read:

keenin
2022-07-22 08:42:39

Testing recursion makes everyone queasy lol. But I'd say off the top of my head that this is the correct approach.

You could always flatten the object while testing to avoid recursion, but it'll essentially be the same thing.

Side note, while yes N can be infinite in theory, in reality it won't be. So, a little bit of a saving grace 🙂

andelink (andelinkyle@gmail.com)
2022-07-22 08:46:16

infinity recursion
giphy logo
Posted using /giphy | GIF by Feliks Tomasz Konczakowski

andelink (andelinkyle@gmail.com)
2022-07-22 08:47:23

Hmm I’m not sure how to flatten in this case

andelink (andelinkyle@gmail.com)
2022-07-22 08:47:53

I’ll consider anything

andelink (andelinkyle@gmail.com)
2022-07-22 13:12:41

please feel free to comment in the gist if its easier

r.taylor
2022-07-22 16:37:42

I've never even attempted writing tests for recursive functions, so I'm not gonna give my guesses as input, but I definitely don't envy you

spkaplan
2022-07-24 20:44:20

Wow, I'm not envious of you having to deal with a not well-defined response object. What you're doing sounds right to me. Keenin already mentioned this, but I will echo it, the only thing I can think to consider is whether you want to separate the 1) traversing and 2) to-float-ing, by flattening the object before to-floating. It's a trade-off between complexity (i.e. less complexity since you will have 2 slightly simpler pieces to test) and time/space efficiency. However, the flattening is nearly as complex and traversing and to-float, since they both require traversing the arbitrarily deep object.

spkaplan
2022-07-24 20:44:53

For what it's worth, I love your post and gist!

❤️ andelink
andelink (andelinkyle@gmail.com)
2022-07-28 05:05:04
andelink (andelinkyle@gmail.com)
2022-07-28 05:06:33

F all of stackoverflow is down 🚨

andelink (andelinkyle@gmail.com)
2022-07-28 05:06:44

how am i supposed to work??

😂 r.taylor
r.taylor
2022-07-28 06:47:41

Do you actually use stackoverflow that much?

andelink (andelinkyle@gmail.com)
2022-07-28 06:47:55

lmao i was using it just now

andelink (andelinkyle@gmail.com)
2022-07-28 06:48:32

almost all of my stack overflow is for shell/system dev

r.taylor
2022-07-28 06:55:11

Ahh, okay, I guess that's fair haha you're just always so on top of these outages

andelink (andelinkyle@gmail.com)
2022-07-28 09:11:21

lol it is funny

andelink (andelinkyle@gmail.com)
2022-07-29 08:37:40

omg stackoverflow is down again

r.taylor
2022-07-29 08:38:01

Lol I actually noticed before you today!

keenin
2022-07-29 08:38:46

But didn't say anything??

andelink (andelinkyle@gmail.com)
2022-07-29 08:38:55

jajaja

r.taylor
2022-07-29 08:38:59

I forgot to update you all, I'm sorry

keenin
2022-07-29 08:39:40

taking notes for PIP

r.taylor
2022-07-29 08:40:06

Psh, I don't work for Amazon, I don't have to worry about getting PIPed

keenin
2022-07-29 08:40:54

In this economy… everyone is a PIP target 🎯

😂 r.taylor
andelink (andelinkyle@gmail.com)
2022-07-29 09:01:42

Keenin you’re on the verge of getting pipped

keenin
2022-07-29 09:09:41

I live on the edge baby

andelink (andelinkyle@gmail.com)
2022-07-29 09:10:29

Sir I’m talking about your unresolved issues that remain open still

GitHub
😂 r.taylor, keenin
keenin
2022-07-29 09:55:48

The traffic is unprecedented, we don't have the bandwidth for this kind of operational excellence. 🥵

r.taylor
2022-07-29 09:56:02

Git gud

andelink (andelinkyle@gmail.com)
2022-07-29 10:56:23

Popped!

keenin
2022-07-29 11:15:55

All issues have been resolved. Thank you.

😂 r.taylor
andelink (andelinkyle@gmail.com)
2022-07-29 12:32:30
keenin
2022-07-29 12:43:55

*Thread Reply:* None

andelink (andelinkyle@gmail.com)
2022-07-29 13:25:56

lolol

andelink (andelinkyle@gmail.com)
2022-07-30 12:28:26

I just found the best CLI for viewing any text-based content within the terminal: rich-cli chefkiss enjoy

andelink (andelinkyle@gmail.com)
2022-08-18 09:27:08

Pasting here so I don’t lose this:

WebFX
:awesome: andelink
😂 r.taylor
andelink (andelinkyle@gmail.com)
2022-08-18 09:29:10

Actually I made it a bookmark here because Slack is deleting old messages now

:awesome: andelink
keenin
2022-08-18 09:55:27

What's the difference between that and this: https://emojipedia.org/

emojipedia.org
andelink (andelinkyle@gmail.com)
2022-08-18 10:34:49

idk

andelink (andelinkyle@gmail.com)
2022-08-18 10:35:03

Both are new to me!

andelink (andelinkyle@gmail.com)
2022-09-16 06:37:49

💯

quastor.org
andelink (andelinkyle@gmail.com)
2022-09-16 10:44:52

This guy is really nice. Not only does he publish quality and regular content, he also personally asks everyone who signs up what kind of engineer they are and their experience level to help improve his curation. Pretty solid in this day and age.

Here’s his past archives of articles:

blog.quastor.org
andelink (andelinkyle@gmail.com)
2022-09-20 16:00:12

https://news.ycombinator.com/item?id=32909076

Most programmers are not like Donald Knuth. But there are a few that are. I'm one of them.

🤣😂😆😄🙂😐🙄

spkaplan
2022-09-23 08:22:01

Favorite keyboard macros 🧵 Go!

:cat_type: andelink
andelink (andelinkyle@gmail.com)
2022-09-23 08:31:22

I’d love some some inspiration, not sure I use any macros. Are these a sequence of keyboard events that you can trigger with a keyboard shortcut? What are yours?

:yes: spkaplan
spkaplan
2022-09-23 08:32:05

I just programmed my firs this morning...my email address is now 1 key press 😍

:nicebold: andelink
spkaplan
2022-09-23 08:32:10

Looking for other ideas

andelink (andelinkyle@gmail.com)
2022-09-23 08:36:19

hahaha how often do you need to type your email address

spkaplan
2022-09-23 08:36:51

We'll see 🤷 signing up for new accounts and such i guess.

andelink (andelinkyle@gmail.com)
2022-09-23 08:37:19

Well nice. Gotta start somewhere. I don’t have any!

andelink (andelinkyle@gmail.com)
2022-09-23 08:38:24

I have terminal triggers and aliases but not any general purpose use anywhere type of things

spkaplan
2022-09-23 08:38:33

I'm hoping to get some more ideas 🙏

🙏 andelink
:same: andelink
spkaplan
2022-09-23 08:38:49

aliases are the shit for sure. Fav alias thread?

:nicebold: andelink
spkaplan
2022-09-23 09:09:13

I just added macros for jumping to my most used Slack channels

andelink (andelinkyle@gmail.com)
2022-09-23 09:15:42

Oh that’s a good one!

andelink (andelinkyle@gmail.com)
2022-09-23 09:19:25

I usually do ⌘+K and then enter the channel/person

spkaplan
2022-09-23 09:19:47

exactly, now that is 1-press

andelink (andelinkyle@gmail.com)
2022-09-23 09:19:54

lol

andelink (andelinkyle@gmail.com)
2022-09-23 09:19:55

nice

andelink (andelinkyle@gmail.com)
2022-09-23 09:20:02

that’s why we do it

spkaplan
2022-09-23 09:20:09

haha exactly 😄

spkaplan
2022-09-23 08:38:58

Fav terminal aliases 🧵

:pepe_hacker: andelink
andelink (andelinkyle@gmail.com)
2022-09-23 08:45:55

I’ve added a bunch of git functions and aliases, and use almost all of the different hook functions to run things whenever I change directory or execute a certain class of commands.

I’ve got too many. I’ll list some

andelink (andelinkyle@gmail.com)
2022-09-23 09:08:41

I’ve switched to using mostly functions rather than aliases. Some of these are really old, so don’t judge. They’re ugly but they’re mine.

andelink (andelinkyle@gmail.com)
2022-09-23 09:11:13

I’ve omitted everything necessary for triggering execution based on changing directory or what command has been entered because it’s a lot

andelink (andelinkyle@gmail.com)
2022-09-23 09:14:29

Some pip/python ones I’ve used a fair amount

andelink (andelinkyle@gmail.com)
2022-09-23 09:15:31

And then I have some Lyft-specific ones for connecting to VPN, assuming different IAM roles, docker and k8s stuff

spkaplan
2022-09-23 09:11:51

Anyone used gpt-3 api in an app/tool/project? We have a hackathon, and my team is gonna try to use gpt-3 in a slack bot to help answer customer Qs.

andelink (andelinkyle@gmail.com)
2022-09-27 05:16:57

saminiir's hacker blog
r.taylor
2022-09-27 09:59:08

How does everybody here lean, man pages or StackOverflow?

r.taylor
2022-09-27 10:00:03

I'm definitely a man pages type of guy. I remember getting annoyed with Python because the man pages were so hard to find and inconsistent. Java, on the other hand, has lovely man pages.

andelink (andelinkyle@gmail.com)
2022-09-27 10:15:03

I use man pages for CLIs. You use man pages for Python? What does that even mean really? Like man python?

andelink (andelinkyle@gmail.com)
2022-09-27 11:06:29

I use the standard Python docs a lot docs.python.org

andelink (andelinkyle@gmail.com)
2022-09-27 11:06:40

Been meaning to try out this though:
https://kapeli.com/dash

kapeli.com
r.taylor
2022-09-27 11:13:07

What does that even mean really?
The docs you linked are pretty much what I'm talking about. I consider them modern man pages.

r.taylor
2022-09-27 11:14:35

I use the standard Python docs
Yea, they certainly exist, I've just always found it hard to find the specific info I want from the Python docs. Here's the difference between the Python docs and Java docs:

r.taylor
2022-09-27 11:14:47

Just a lot more useful info included in the Java docs

andelink (andelinkyle@gmail.com)
2022-09-27 11:21:16

Maybe I’ve used the Python docs so long I can’t remember any pain points I might have had with them earlier on. But I don’t see what’s in the Java docs that make them better. Fwiw I don’t think I see either as being better or worse, of those two examples you link. Is it the table formatting you like in the Java docs?

r.taylor
2022-09-28 11:12:03

Just the depth and style of the information provided. So, sure, in part the table. I don't like that the Python docs are mostly just a paragraph that minimally describes methods. The Java docs give you pretty much all the information you could ever need: inherited methods, method examples, links to all relevant objects, including parameters, extended classes, and extending classes, etc.

andelink (andelinkyle@gmail.com)
2022-09-29 07:38:10

True, the Python docs do tend to be a bit wordy. But none of the class information is needed for your example because print is just a function. Everything in Java is a class, while not so with Python

andelink (andelinkyle@gmail.com)
2022-09-30 08:38:35

This is a really awesome tool I’ve been using for querying apis across AWS, GitHub, Slack, JIRA, etc. Writing SQL against tables (on top of the platform APIs) then learning each platform individually and writing custom scripts for each

https://steampipe.io/

Steampipe
spkaplan
2022-09-30 09:39:30

Sounds cool! What are you fav queries for AWS/Github/Slack?

andelink (andelinkyle@gmail.com)
2022-09-30 10:04:40

Oh I don’t know. It’s been one-off so far. But I plan to use this to query GitHub and JIRA for building a performance review report when the perf cycle rolls around. Remind me what I did and get stats on my work

👌 spkaplan
andelink (andelinkyle@gmail.com)
2022-10-02 14:55:06

Looks pretty similar but for your local machine instead of cloud resources https://osquery.io/

spkaplan
2022-10-02 16:07:43

Cool! I like this idea of using SQL for everything

andelink (andelinkyle@gmail.com)
2022-10-02 16:27:55

In a pinch it’s real nice for sure

spkaplan
2022-10-03 09:53:43

@andelink if/when you build query(ies) for pulling github activity for someone, i'd love to have a look at them, if you're willing 🙂

spkaplan
2022-10-03 09:54:04

i'll do the same if i get there first

andelink (andelinkyle@gmail.com)
2022-10-03 09:55:39

For sure!

spkaplan
2022-10-03 20:37:01

@andelink If you were to gather data from github to evaluate your performance, what metrics would you want to build? Just list of PRs, or...?

andelink (andelinkyle@gmail.com)
2022-10-03 20:42:43

Every time I sit down to write a self-review I’m always like “I did nothing.” So it would mostly just be to help me remember what I actually did do lol

:this: spkaplan
andelink (andelinkyle@gmail.com)
2022-10-03 20:45:21

I have a list of sort of templated hyperlinks I refer to every review cycle.

Github PRs you’ve authored.


Another Github one I use is for things that involve you, but are not authored by you:

Easy to change the above for commits. You can get at PR conversations, cross team collaboration etc.

JIRA - updated, resolved, created
 != newtablehandler and key in updatedby(kandelin, "2021-06-30", "2022-01-01") order by updated desc, created desc

!= newtablehandler and assignee = kandelin and resolved > 2021-06-30 and resolved < 2022-01-01 order by resolved desc, created desc

!= newtablehandler and creator = kandelin and created > 2021-06-30 and created < 2022-01-01 order by created desc, updated desc

Confluence - created, last modified
"kandelin"+and+created+>=+"2021-06-30"+and+created+<=+"2022-01-01"+order+by+created

"kandelin"+and+lastmodified+>=+"2021-06-30"+and+lastmodified+<=+"2022-01-01"+order+by+lastmodified

Emails you sent.
 source:mail after:2021/06/30 before:2022/01/01

Now sure how well this google drive/docs search is
 source:drive after:2021/06/30 before:2022/01/01

andelink (andelinkyle@gmail.com)
2022-10-03 20:47:47

Writing something in SQL and joining across all these platforms would be nice and once written make it way easier to refresh and go through your work. If you wanna be clever with numbers I could see interesting ways of getting hard data for sevs/tickets reduced after your commits, number of consumers hitting your library/service after your code rolled out, X reviews/guidance on Y external teams, dollars saved etc

❤️ spkaplan, brandon
spkaplan
2022-10-03 21:15:20

I currently track what the engineers on my team do by hand (jot down when I see they are driving a big convo, author a great doc, etc...), and by User Stories. Having additional data from GitHub and other sources would certainly help jog my memory of their recent accomplishments better. I'll provide any SQL queries a write.

❤️ brandon
andelink (andelinkyle@gmail.com)
2022-10-03 22:09:36

You sound like a good manager 🙂

andelink (andelinkyle@gmail.com)
2022-10-12 08:26:12

I hit the rate limit of 5000 requests/hour when querying github data via steampipe, have to wait 55 more minutes before making any more calls 😑

spkaplan
2022-10-12 13:45:04

You sound like a good manager 🙂
Woops, missed this. I try 🤷 🎌

spkaplan
2022-10-12 13:45:35

I hit the rate limit of 5000 requests/hour when querying github data via steampipe, have to wait 55 more minutes before making any more calls 😑
ah bummer, hopefully you can write a more optimal query??

andelink (andelinkyle@gmail.com)
2022-10-12 14:15:36

nah

andelink (andelinkyle@gmail.com)
2022-10-12 14:15:38

junk api

andelink (andelinkyle@gmail.com)
2022-10-12 14:15:56

i can do better with just the gh cli

andelink (andelinkyle@gmail.com)
2022-10-12 14:16:02

it was really slow

andelink (andelinkyle@gmail.com)
2022-10-12 14:21:22

Does salesforce use GitHub?

:yes: spkaplan
andelink (andelinkyle@gmail.com)
2022-10-05 13:13:02

I was reviewing the gh env variables and it led me to a great discovery: charm.sh

They have great terminal applications, but even better they have great libraries for building terminal apps AND really great services for provisioning a backend for your terminal apps claps claps claps

  • gum: gonna start using this immediately in my shell scripts

  • glow: switching to this for markdown instead of rich-cli

  • charm: <---- command line backend tools that i am really impressed by


I”ve been noodling with a CLI notes app for a while now and every time I’ve thought about building a backend for syncing across devices I’ve though “eh, too much work” but these charm tools look like the perfect way to do it. They built skate using charm as an example and they make it looks so easy

andelink (andelinkyle@gmail.com)
2022-10-05 13:23:25

wish is a project of theirs for easy building of custom ssh servers/applications. They built a demo with it for folks to get an idea of what can be built with it and it’s honestly really fun to use and get you thinking about different terminal apps are possible.

I think it’s great. You can try it out for yourself:

ssh git.charm.sh

spkaplan
2022-10-05 13:39:56

im totally confused what this is 😆 but will read more

andelink (andelinkyle@gmail.com)
2022-10-05 13:48:30

lol

andelink (andelinkyle@gmail.com)
2022-10-05 13:48:33

what do you mean?

andelink (andelinkyle@gmail.com)
2022-10-05 13:48:40

i’m just sharing tools

andelink (andelinkyle@gmail.com)
2022-10-05 13:48:55

this is my personal channel stream of consciousness

spkaplan
2022-10-05 13:49:24

no no, i totally appreciate you sharing the tools! I am confused what the tool(s) is/are from first glance 😄

andelink (andelinkyle@gmail.com)
2022-10-05 13:49:33

ahhhh

spkaplan
2022-10-05 13:49:35

However, after a few more mins of reading, i understand the highlevel goal of Charm now

andelink (andelinkyle@gmail.com)
2022-10-05 13:50:35

gum and glow and skate are more straightforward IMO

spkaplan
2022-10-05 13:51:24

charm is the 'platform' project. gum glow and skate are built using capabilities from charm project, right?

andelink (andelinkyle@gmail.com)
2022-10-05 13:52:23

then the tools in charm are used to build terminal applications with a backend for user auth/storage/syncing etc. they built skate using charm

👌 spkaplan
spkaplan
2022-10-05 13:52:49

groking it now 🙂 ty!

❤️ andelink
spkaplan
2022-10-05 13:53:06

I LOVE these kind of lib projects. The more powerful libs like this the better ❤️

andelink (andelinkyle@gmail.com)
2022-10-05 13:54:43

yuup charm is the platform project

i don’t think gum has a backend (if it does I missed it). it was with, and provides features to, their other projects bubbletea and lipgloss.

glow does have the option for a backend i believe with the stashing of documents and syncing them across your different devices.

skate built with all of them

andelink (andelinkyle@gmail.com)
2022-10-05 13:56:04

Me too! I honestly felt floored when I was reading their charm docs. For anyone thinking about building these types of applications, charm has got to be one of the first tools you reach for when doing so

andelink (andelinkyle@gmail.com)
2022-10-05 13:56:14

also love their branding and web design

spkaplan
2022-10-05 14:10:03

ha yes the branding drew me in 😍

spkaplan
2022-10-05 13:40:00

Thanks for sharing!

spkaplan
2022-10-22 13:26:32

Does anyone know if a tool exists to visualize k8s clusters, ideally even including info about worker nodes, networking resources (i.e. security groups, in the case of AWS). Basically a single GUI to see all the resources in play in a k8s cluster. I feel like something like this should exist, but I'm not finding anything that seems very sophisticated or thorough.

brandon
2022-10-22 15:40:47

Not much experience in this area unfortunately. It does seem like an important tool to have for such an architecture though.

andelink (andelinkyle@gmail.com)
2022-10-24 13:00:53

We use custom dashboards with grafana. Our templates though come with a bunch of default panels for k8s specifically

andelink (andelinkyle@gmail.com)
2022-10-26 15:41:09

What’s the longest you’ve spent debugging a test failing? I just spent ~3 hours 🙃

spkaplan
2022-10-26 16:49:39

I don't even want to think about it, lol I'm sure way longer than 3 hours

andelink (andelinkyle@gmail.com)
2022-10-26 18:10:17

So annoying

andelink (andelinkyle@gmail.com)
2022-10-27 11:42:34

I’ve never used a debugger in my life. And now I’m too afraid to try

brandon
2022-10-29 12:34:30

This is baffling.

spkaplan
2022-10-27 12:41:24

For real!?

:yep: andelink
andelink (andelinkyle@gmail.com)
2022-10-27 12:52:42

it’s true!

andelink (andelinkyle@gmail.com)
2022-10-31 10:37:54

The best way to write secure and reliable applications

Stars
54158
Language
Dockerfile
👍 brandon
🤣 spkaplan
spkaplan
2022-11-01 11:39:12

I literally say "the best code is no code" all the time 😄

andelink (andelinkyle@gmail.com)
2022-11-01 11:46:35

100%!

andelink (andelinkyle@gmail.com)
2022-11-08 17:24:27

https://blog.ldodds.com/2022/11/08/recreating-sci-fi-terminals-using-vhs/ I love VHS and aLalaLOVE charmbracelet ❤️

Lost Boy
Leigh Dodds (https://blog.ldodds.com/author/leighdodds/)
brandon
2022-11-09 17:47:23

Cool! I'll have to remember this exists.

andelink (andelinkyle@gmail.com)
2022-11-09 18:12:20

Yeah I dig it! I’ve begun replacing existing README gifs and static shell snippets with it

andelink (andelinkyle@gmail.com)
2022-11-09 18:13:07

I want to explore the pre-commit hook to see if it’s a good way to keep the gifs updated as the code base changes

brandon
2022-11-09 18:22:51

Shouldn't static shell snippets stay as text so they can be copied though?

andelink (andelinkyle@gmail.com)
2022-11-09 18:30:29

Our READMEs use to be full of crazy specific snippets I could never remember, and I always had to copy every single time. I’ve since shipped some CLIs that handle all the nuanced specifics behind simple, easy to remember commands. And if you can’t remember the command you can print the help in the terminal.

So maybe we don’t need all the example usage as code snippets. GIFs are more fun, and, if the command response/behavior is noteworthy, more valuable.

Or maybe we do still need em. If this comes up in PR discussion I’d maybe keep the snippet alongside the GIF, or point the reader to the VHS .tape file that built the GIF and they can copy commands from there.

👍 brandon
brandon
2022-11-09 18:36:23

Sounds like a plan!

andelink (andelinkyle@gmail.com)
2022-11-17 09:13:03

I wonder if forcing people to watch gifs instead of blindly copy pasting commands will improve their learning/understanding/retention

brandon
2022-11-17 09:24:38

You know, I'd believe it. It's probably better to type it out.

spkaplan
2022-11-16 12:32:32

Has anyone tried k8slense?

k8slens.dev
andelink (andelinkyle@gmail.com)
2022-11-16 12:47:51

Looks polished enough to try out. But after reading about their account requirements and privacy policy, I'm gonna have to pass.


brandon
2022-11-16 14:53:04

I see a couple things I don't really like there, but curious which is the deal breaker for you in this case? Also, do you need to register in order to use the product? I haven't tried.

andelink (andelinkyle@gmail.com)
2022-11-16 15:13:11

  • registering is required in order to use the product

  • billing/shipping information attached to my registration

  • real name, postal address, phone number, email address


None of the above are requirements for using the overwhelming majority of other open-source projects. Seems shady to me, don't trust em

👍 brandon
spkaplan
2022-11-16 15:13:39

yeah, that is lame they are asking for that info

spkaplan
2022-11-28 10:31:38

update: My coworker said he didn't have to provide any personal/billing info. i haven't tried it myself to confirm yet

spkaplan
2022-11-28 10:35:35

I'm finally learning how oidc/saml/sso works. Found an article with a great explanation.

goteleport.com
👍 keenin
💯 brandon, andelink
andelink (andelinkyle@gmail.com)
2022-11-30 10:34:10

TL;DR?

spkaplan
2022-11-30 10:42:23

@andelink The first 1/2 of the article provides a pretty good overview and is pretty concise. Not sure a TL;DR would provide more value without sacrificing too much info.

andelink (andelinkyle@gmail.com)
2022-11-30 11:05:21

SAML (Security Assertion Markup Language)
til

:plusone: spkaplan
andelink (andelinkyle@gmail.com)
2022-11-30 10:37:34

World Cup soccer balls have gotten crazy advanced with this new IMU sensor in them. 500hz signals being processed in real time!! To contrast this, we use “only” 25hz signals for driver telematics

FiveThirtyEight
Written by
Ben Dowsett
Filed under
2022 World Cup, Shot-Tracking, Soccer, Technology, World Cup
😮 brandon
spkaplan
2022-11-30 11:48:22

is 25hz too lossy for driver telemetrics? I know nothing about the area

andelink (andelinkyle@gmail.com)
2022-11-30 11:50:51

It works for us! I just wish Android IMUs would be more reliable in their emitting of the sensor readings

spkaplan
2022-11-30 11:51:27

ah gotcha. I now see you put "only" in quotes.

andelink (andelinkyle@gmail.com)
2022-11-30 11:52:07

Yeah 25hz is still a good amount of data coming off one signal. 25 data points per second that is

spkaplan
2022-11-30 11:57:43

haha yeah that is what I thought too. I was surprised when i thought you were saying 25hz is not enough data 😆 ohhh, the context that can be missed via text

andelink (andelinkyle@gmail.com)
2022-12-17 17:47:50

I asked ChatGPT to explain a Dockerfile to me. The attached PDF is our chat. The dockerfile is in the thread.

Any docker experts care to confirm the explanation? cc @keenin. Looks reasonable to me but I’m no expert. This is supposedly an example of a multi-stage build that copies only the necessary artifacts to the final image in order to reduce its size, from Lyft’s infra team.

andelink (andelinkyle@gmail.com)
2022-12-17 17:48:05

Source Dockerfile

spkaplan
2022-12-19 10:54:58

Ooo that is a cool use case. Been busy, but will hopefully find time to look at the dockerfile and the gpt response about it soon

spkaplan
2022-12-19 12:45:05

without going over it with fine-toothed comb, honestly, it seems to explain it pretty well.

spkaplan
2022-12-19 12:46:48

but dockerfiles are already pretty readable

keenin
2022-12-19 12:47:03

Yea sense accurate. But also just seems like chatgp is just replacing the commands with text lol. cd -> file is changing directory from arg0 to arg1

💯 spkaplan
andelink (andelinkyle@gmail.com)
2022-12-19 12:54:44

yeah lol

spkaplan
2022-12-28 19:16:12

How do you continue learning, besides on-the-job learning?

andelink (andelinkyle@gmail.com)
2022-12-29 16:53:27

I read hacker news sort of obsessively. i organize things i read with readwise.io/read. i also listen to tech podcasts almost daily. anything that catches my interest i usually try using/doing hands-on at least once

❤️ spkaplan
andelink (andelinkyle@gmail.com)
2022-12-29 16:56:58

I also am pretty selfish when it comes to things I do at work. I’ll go out of my way to develop a nice-to-have feature for myself/my team, which usually gets me experience with things not strictly used in the day-to-day

❤️ spkaplan
spkaplan
2022-12-30 17:13:35

What features of readwise do you benefit from the most?

spkaplan
2022-12-30 17:14:37

How do you decide what to read on hacker news? Just scan from the top? Or...?

andelink (andelinkyle@gmail.com)
2022-12-30 17:20:38

Yeah, usually just anything on the front page that interests me. I also subscribe to their "best" feed which lands in my reader feed.

I don't use the original readwise app at all really. Don't do much highlighting or taking notes. I use their reader app, which I really like. It's quite polished and supports a ton of content/media types. Any RSS feeds I subscribe to land in there, and then whenever I come across an article online I want to read, I add it to reader. The tagging system is really good IMO and allows me to organize/archive content I've read easily. It also has a built-in gpt-3 feature ("ghost reader"), which is neat. You can ask gpt to summarize the article, or define a word or something, in the context of the article on whole

❤️ brandon
spkaplan
2022-12-30 17:22:33

That aggregation ability of the reader app interests me a lot. Gonna give it a try. Thanks for the recommendation!

spkaplan
2022-12-30 17:23:40

Also, what are some of your fav feeds you have hooked up to Reader?

👍 brandon
andelink (andelinkyle@gmail.com)
2022-12-30 17:23:50

np! they give a 30 day free trial, but this youtuber has a referral code for 60 day free trial in the description of this video:


referral link:

👏 spkaplan
andelink (andelinkyle@gmail.com)
2022-12-30 17:26:04

I don't have many rss feeds.


  • (email newsletter I setup to forward to my reader feed)





spkaplan
2022-12-30 17:27:54

A good start, thanks!

👍 andelink
andelink (andelinkyle@gmail.com)
2022-12-30 17:29:52

sure, let me know how you like it! their web app is really fleshed out, their mobile app is good for reading and quick tagging but not as great as their web app. the chrome extension is handy.

here's useful articles from them on using reader:

👍 spkaplan, brandon
spkaplan
2022-12-31 15:57:38

Have you looked into anything else on pragmatic engineer besides the blog? Like the job board, etc...?

spkaplan
2022-12-31 16:02:41

Also, do you pay for pragmatic engineer newsletter and find it a worthwhile ROI?

andelink (andelinkyle@gmail.com)
2022-12-31 16:22:15

I haven’t looked at anything beyond the blog. I just discovered it, so I’m just reading the free tier articles. The pay walled stuff sounds really interesting though

andelink (andelinkyle@gmail.com)
2022-12-31 16:30:09

Another thing about reader that I really like is how they handle YouTube videos. I hate watching videos. I much prefer reading text content. Reader produces a transcript so I can take a YouTube video and treat it like an article instead. And if you want to watch the video it will auto-scroll and highlight the current transcript blurb accordingly, like karaoke.

spkaplan
2022-12-31 17:35:35

Yeah, I'm gonna start w/ free tier and then evaluate. The article titles seem interesting.

spkaplan
2022-12-31 17:36:58

I actually really like video format, but that is a really cool feature! I have more time to listen to videos (running the dog, etc...) than I do to read.

👍 andelink
andelink (andelinkyle@gmail.com)
2023-01-25 11:43:29

@brandon here’s the reader

andelink (andelinkyle@gmail.com)
2023-01-25 11:44:08

I think the most valuable thing for me is the archiving and tagging. No more losing old things I’ve read. Also getting around paywalls is nice

andelink (andelinkyle@gmail.com)
2023-03-11 15:08:55

They gave me a new 30 day free trial 🙌

:nice2: spkaplan
andelink (andelinkyle@gmail.com)
2022-12-31 16:48:04

I keep forgetting to try this out

Stars
5829
Language
Python
🆒 spkaplan
andelink (andelinkyle@gmail.com)
2023-01-09 07:41:12
ssh whoami.filippo.io
andelink (andelinkyle@gmail.com)
2023-01-09 07:44:15

til

:til: r.taylor
andelink (andelinkyle@gmail.com)
2023-01-26 10:15:28

@brandon here maybe this is a good starting point:


It was at one point up-to-date but I’ve since been like fuck it I’m not setting up new macs all the time so it’s gotten out of sync because I do some adhoc shit for each laptop. But it’s got some okay stuff in there. Look at the README and all the files. It addresses your ssh config as well.

Language
Shell
Last updated
a year ago
❤️ brandon
🆒 spkaplan
andelink (andelinkyle@gmail.com)
2023-01-26 10:15:58

github bot is wrong it wasn’t updated a year ago it was updated a few minutes ago

andelink (andelinkyle@gmail.com)
2023-01-26 10:18:19

README is outdated

brandon
2023-01-26 10:18:47

The repo isn't visible to me

andelink (andelinkyle@gmail.com)
2023-01-26 10:19:13

what’s your github username

brandon
2023-01-26 10:21:03

brtaylor0731

andelink (andelinkyle@gmail.com)
2023-01-26 10:21:04

okay i added brtaylor0731

brandon
2023-01-26 10:21:20

You found me!

:penguin2: andelink
brandon
2023-01-26 10:22:11

Thanks a bunch! Excited to look through this

andelink (andelinkyle@gmail.com)
2023-01-26 10:22:38

np. will update this thread with stuff i think of

👍 brandon
andelink (andelinkyle@gmail.com)
2023-01-26 10:44:56

mac os specifics

# brew is the package manager
brew install
brew info
brew upgrade
brew update
brew list

# clipboard
pbcopy # e.g. cat ~/.ssh/config | pbcopy
pbpaste # e.g. pbpaste > ~/.ssh/config

# manage any macos setting with the defaults command
defaults read # list settings
defaults write # update settings

# for example, sort activity monitor results by cpu usage:
defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage"
defaults write com.apple.ActivityMonitor SortDirection -int 0

# or, don't show recent apps in dock
defaults write com.apple.dock show-recents -bool false

# i hope you don't have to ever really use or think about plists, but if you do:
alias plistbuddy=/usr/libexec/PlistBuddy
alias plist='plistbuddy -c "print"'

don’t sleep on the zsh history lookup! control+r and then start typing
unlimited zsh history:
HISTFILE="$HOME/.zsh_history"
HISTSIZE=10000000
SAVEHIST=10000000
setopt BANG_HIST # Treat the '!' character specially during expansion.
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
setopt SHARE_HISTORY # Share history between all sessions.
setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history.
setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again.
setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space.
setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file.
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry.
setopt HIST_VERIFY # Don't execute immediately upon history expansion.
setopt HIST_BEEP # Beep when accessing nonexistent history.

fave tools
install with brew ()

  • bat is like cat, but better

  • ripgrep is the fastest recursive grep you’ll ever use. command line via rg

  • gh is the github cli you didn’t know you needed. really great. and an awesome example of what you can make using the charm terminal-app suite.

  • json:

  • jq

  • jqp

  • gron

  • jless

  • tree

  • ffmpeg

  • youtube-dl

  • micro is like nano, but better. defaults to windows keybindings if you’re missing those.

  • jenv for managing java environments (pyenv for python, rbenv for ruby)

  • yq is like jq but for yaml

  • xml processing: xmlstarlet

  • essential: pre-commit

  • build better clis:

  • real-time zsh syntax highlighting: brew install zsh-syntax-highlighting



cheat.sh is an awesome website, made even better via terminal
# Cheat on commands e.g. cheat jq
function cheat() {
curl -s cheat.sh/${1} | bat -p
}

👍 brandon
❤️ brandon
💯 brandon
andelink (andelinkyle@gmail.com)
2023-01-26 10:47:03

if you want to go hard with zsh extensions/customization, check out https://github.com/ohmyzsh/ohmyzsh

I personally don’t want all that as a dependency, so I cherry pick what I like and vendor-in the specifics

Website
<https://ohmyz.sh>
Stars
154646
👍 brandon
andelink (andelinkyle@gmail.com)
2023-01-26 11:00:31

if you’ll be writing any shell scripts, do yourself a favor and use shellcheck

Website
<https://www.shellcheck.net>
Stars
31216
👍 brandon
andelink (andelinkyle@gmail.com)
2023-02-17 10:17:42

https://brew.sh/2023/02/16/homebrew-4.0.0/

Brew 4 is released. Particularly happy to see this:

brew update will now be run automatically less often (every 24 hours rather than every 5 minutes) and these auto-updates will be much faster as they no longer need to perform the slow git fetch of the huge homebrew/core and homebrew/cask taps’ Git repositories.

Homebrew
🙌 keenin, brandon
andelink (andelinkyle@gmail.com)
2023-03-03 17:05:48

If you also have a teammate who has an unbreakable habit of pre-maturely resolving all comments on a PR, here’s a tampermonkey script I created to open up all resolved comments upon page load, and also made it accessible as a ctrl+d keyboard shortcut:


(a userscript engine like tampermonkey is required for install)

Non-install link to the gist in github:

👀 spkaplan
spkaplan
2023-03-03 17:06:27

That's hilarious!

spkaplan
2023-03-03 17:06:55

I have the opposite problem, where folks don't click "Resolve" even after the convo has been resolved, so it is hard to tell which threads still need a resolution 😆

andelink (andelinkyle@gmail.com)
2023-03-03 17:09:46

i admit i don’t always remember to resolve them. figure better to forget to resolve than resolve too early

spkaplan
2023-03-03 17:10:22

it is ok to forget some, but most folks on my team never click the Resolve button lol

andelink (andelinkyle@gmail.com)
2023-03-03 17:10:31

like, this guy, he will resolve comments before the changes have been made. he’ll even comment “fixed” and then hit resolve. but the changes have not yet been pushed from his local checkout

spkaplan
2023-03-03 17:10:56

hahaha yeah, i hate that too. like wait until you push the change before you say it is fixed, duh!

andelink (andelinkyle@gmail.com)
2023-03-03 17:10:57

me, my other teammate, and my manager have all asked him to stop but he just can’t help himself

🍀 spkaplan
spkaplan
2023-03-03 17:13:16

fire him...jk

andelink (andelinkyle@gmail.com)
2023-03-03 17:13:44

lol yeahhhhhhh he has been difficult

andelink (andelinkyle@gmail.com)
2023-03-03 17:13:55

hopefully can turn things around

spkaplan
2023-03-03 17:15:36

gotta run. have a good weekend!

andelink (andelinkyle@gmail.com)
2023-03-03 17:15:46

you too!

andelink (andelinkyle@gmail.com)
2023-03-03 17:46:32

@brandon because you said you’re good with javascript. how do i make it so my script runs every time i click “Show more hidden items” buttons

👀 r.taylor
andelink (andelinkyle@gmail.com)
2023-03-03 18:21:12

this show more hidden buttons

r.taylor
2023-03-04 10:49:25

he will resolve comments before the changes have been made
How long does he wait though? Cuz, I'll admit, I've sometimes hit resolve while changes are still local but that's when I'm using it as a sort of checklist and know I'll be pushing the changes shortly

👎 brandon, keenin
andelink (andelinkyle@gmail.com)
2023-03-04 11:48:09

Not long no excuse

brandon
2023-03-06 10:11:55

This was discussed at length in chat the other day (to @keenin’s dismay), but I'll repeat my verdict here for the record! In almost all cases, the comment should be resolved by the author who requested the change and all comments should be resolved prior to merging the PR. Otherwise, you don't have confirmation that the author of the request is satisfied with your solution. This requires continuous collaboration between the commenter and PR author though so there has to be an agreement in place. My new team isn't aligned on this... yet.

❤️ spkaplan
:plusone: andelink, keenin
andelink (andelinkyle@gmail.com)
2023-03-06 10:45:56

Okay, one small downside to my tampermonkey script that I just experienced. There was a resolved comment thread, of course, that I commented on and requested him to revert the changes. It wasn’t until I came back to the PR after a meeting that I realized my comment would not be obviously apparent to readers because it was an already resolved collapsed thread. So I had to unresolve it myself, which I didn’t do originally

r.taylor
2023-03-09 11:59:04

the comment should be resolved by the author who requested the change and all comments should be resolved prior to merging the PR
Agree, but I don't think I've ever seen anybody on my team resolve their own comments...

andelink (andelinkyle@gmail.com)
2023-03-08 15:03:50

Do you all use statsd for your metrics emission/collection or something else?

spkaplan
2023-03-08 15:46:04

collectD process, w/ statsD plugin, and dogStatsD flavor....to be specific

andelink (andelinkyle@gmail.com)
2023-03-08 15:53:55

thanks. can’t say i’ve heard of the other two you mentioned

spkaplan
2023-03-08 15:55:02

collectD is a generic plugable daemon. So, it accepts a statsD plugin, which minics exactly the statsD interface and functionality. But collectD can also run all sorts of other plugins.

spkaplan
2023-03-08 15:57:27

DogStatsD is an extension to the statsD "language" to enable tags/dimensions to metrics.

andelink (andelinkyle@gmail.com)
2023-03-08 15:59:54

Oh maybe we use something like DogStatsD, cause we also have tags/dimensions e.g.

    stats.incr(
'upload_request',
tags={
'report_source': report_source,
'report_platform': report_platform,
},
)

spkaplan
2023-03-08 16:00:41

yeah, looks like it. If you can filter a specific metric by additional tags, then you are prob using dogStatsD

spkaplan
2023-03-08 16:01:38

history is statsd was developed and open sourced by Etsy. Then DataDog picked it up and released (as open source) a new backwards compaible "flavor" (dogstatsd). I love open source for this reason.

💯 andelink, r.taylor
spkaplan
2023-03-08 16:02:43

It is usually just a config setting to switch between the flavors. Most things default to dogstatsd now, since it is backwards compatible, so doesn't hurt to have more available functionality 🙂

andelink (andelinkyle@gmail.com)
2023-03-08 16:03:17

Ahh I see. TIL. It’s a great product

spkaplan
2023-03-08 16:04:06

Its simplicity is key

andelink (andelinkyle@gmail.com)
2023-03-10 11:19:49

😮

Website
<https://githistory.xyz/>
Stars
13236
andelink (andelinkyle@gmail.com)
2023-03-11 22:07:00

@keenin i use starship.rs for my zsh theme management. it’s built in rust so super fast. although i set my transparency to 10%. i feel like you would like the tokyo night preset. i also like the pastel powerline

brew install starship
echo 'eval "$(starship init zsh)"' >> ~/.zshrc

Also I use the mocha color profile from

Stars
200
Language
TypeScript
❤️ brandon
👀 keenin, r.taylor
andelink (andelinkyle@gmail.com)
2023-03-11 22:07:21

i use fira code nerd font

brew tap homebrew/cask-fonts
brew install font-fira-code-nerd-font

spkaplan
2023-03-12 10:33:11

Gorgeous

brandon
2023-03-13 09:05:02

Here's mine:

Stars
34920
Language
Shell
brandon
2023-03-13 09:08:57

Without knowing what Powerlevel10k was written in, I figured the Rust implementation would be faster, but the creator of p10k claims it's still faster in this post 😮 Seems like they are both great options though according to the zsh community.

Eh, here's another perf post where starship is faster. Funny enough, it uses the perf tool built by the author of p10k.

andelink (andelinkyle@gmail.com)
2023-03-13 09:46:07

brandon idk why but i’m getting strong 90s windows sysadmin or dba vibes from that theme lol

brandon
2023-03-13 11:26:04

Yeah, the default color palette is definitely a bit more retro

andelink (andelinkyle@gmail.com)
2023-03-13 17:26:43

Oh man, this is awesome:


I’ve wanted something like for a long time. I have plenty of interest in spinning up a project with a web front end, but I have zero desire to learn JS/react/whatever frontend framework and don’t view it as a good investment of my time. But now with this, I don’t have to! Super excited to try this out

Website
<https://pynecone.io>
Stars
6100
andelink (andelinkyle@gmail.com)
2023-03-13 17:27:22

Website: (built entirely from pynecone, other examples in their gallery)
HN launch:

spkaplan
2023-03-13 17:37:48

Holy shit, wut. That is insane

andelink (andelinkyle@gmail.com)
2023-03-13 17:39:15

Yeah! It actually looks well done. I’ve seen similar attempts but nothing that looked as promising as this

brandon
2023-03-15 15:52:49

Wow, that's very cool. Microsoft has blazor for the .NETers, but I think there is more templating required maybe? Hard to tell. Integration with React? Also very cool. I do wonder how much control you'll have out of the box without doing a lot of custom css and templating though. But, if you just want a basic web app for a personal project, this seems great!

andelink (andelinkyle@gmail.com)
2023-03-15 16:09:22

I understood the project as no CSS or templating needed. At least not truly. You control the appearance through their Python abstractions.

I see a small dictionary with some values, but other than that I don’t see any css/templates in the source code for their gallery websites e.g.



no actual css or html from what i can tell.

andelink (andelinkyle@gmail.com)
2023-03-15 16:10:07

this is as close as you get:

definitely could argue you’re still css-ing, but it’s far enough away for me to try it out

andelink (andelinkyle@gmail.com)
2023-03-14 15:57:16

hey

andelink (andelinkyle@gmail.com)
2023-03-14 15:58:30

people here use vs code, right? how can i add a custom command so that i can run a shell command with the current editor filename passed as input (via right-click or keyboard shortcut)?

andelink (andelinkyle@gmail.com)
2023-03-14 16:31:26

Figured it out.

  1. Add task configuration to tasks.json

  2. Add keybind configuration to keybindings.json

  3. Optionally update the When condition in the Keyboard Shortcuts editor

andelink (andelinkyle@gmail.com)
2023-03-14 16:31:57

Oh you can do step 3 directly in keybindings.json

andelink (andelinkyle@gmail.com)
2023-04-01 21:37:21

nice read

A Less Mad March
👀 spkaplan, brandon
👍 spkaplan
spkaplan
2023-04-02 21:01:48

Anyone ship traces with Open Telemetry?

r.taylor
2023-04-03 08:48:22

Not yet, looking into it is on my to-do list though. Lyft recently migrated from OpenTracing+Lightstep to OpenTelemetry+X-Ray, and I want to get my team onboarded because we have no tracing right now.

👍 andelink
spkaplan
2023-04-03 08:52:36

I'm integrating our service with Zipkin via Otel. I've got the basics working, but trying to figure out how to have Otel always send "slow" and failed request traces. Currently it just does a flat sample rate across all requests.

r.taylor
2023-04-03 08:54:25

Ah, yea, definitely can't help you there 😅

andelink (andelinkyle@gmail.com)
2023-04-03 09:04:13

My team also doesn’t have tracing setup. Would love if Ryan you learn all the ins and out and then do a lunch and learn for me

😆 r.taylor
brandon
2023-04-05 15:40:55

Also in the process of implementing OTel. Will report back in 6 months 😄

spkaplan
2023-04-05 15:44:02

6mo!?

brandon
2023-04-05 15:47:55

Eh, I don't have a timeline but just figured that's about when I'd have enough battle tested experience to give you good advice. Sounds like you'll beat me to it though!

spkaplan
2023-04-05 15:48:44

For sure 😄 Just giving you a hard time. I'm moving slowly, since I'm only working on it in spare time.

spkaplan
2023-04-05 15:51:44

What i've learned so far:

  • Take advantage of auto-instrumentation. Only after auto instrumentation would you want to rely on manual.

  • Salesforce tooling doesn't currently support a static sample rate (e.g. 1%) for "normal" requests, and to send all slow and failed request traces, but it is totally possible, so I recommend seeing if your tooling supports it.

👍 brandon
keenin
2023-04-04 13:36:54

Do your teams outline a monitoring/alarm/metrics standard?

For example how do you treat a lack of metrics: do you alarm or consider that okay, and when is that okay?
On top of that, is your standard to have services emit a 0 on success and 1 on failure, or only emit for failures, and again, when and why?

Our current standard is just how the engineer felt when adding or modifying the metric, alarm, or monitor.

spkaplan
2023-04-04 13:44:57

For example how do you treat a lack of metrics
We alert on no-data, but with a longer inertia (maybe after there is no data for 10mins), where as we would alert on error immediately or after 1min.

is your standard to have services emit a 0 on success and 1 on failure, or only emit for failures, and again, when and why?
To satisfy the previous no-data alerting, you have to emit metrics on success, otherwise you can't tell the difference between success and no-data.

spkaplan
2023-04-04 13:45:17

Happy to answer any more specific questions on how we do it. Hopefully I can learn something from how you do it as well 🙂

r.taylor
2023-04-04 13:50:15

My team is pretty similar to Sam's. We emit metrics at the end of most flows to track usage, and we alarm on sudden changes in metrics (both up and down, in some cases), zeroes in success metrics, and error rates. The exact times and rates vary by service though.

keenin
2023-04-04 13:58:48

Right, so my question goes beyond your current setup to an actual living standard that is known by your team when creating a new metric/monitor/alarm. Basically, can you tell me that you are 100% certain all of your alarms and metrics work like this or are you going to find some odd ball cases if you do an audit?

r.taylor
2023-04-04 14:00:32

Oh, oddball cases, for sure. I haven't even setup alarms for the feature I added awhile ago yet. This is just the expectation, we don't have any systems in place to verify it.

spkaplan
2023-04-04 14:30:45

We absolutely have success/failure metrics for any new feature added. No one can say they are done with a feature until that happens. The no-data part could slip through, but is generally caught during code review when configuring the new alerts.

r.taylor
2023-04-04 14:34:01

^ just reminded me of a caveat: every new feature is initially released with experimentation, so we are very aware of usage immediately after release. I do now wonder if this makes us more lax on alarms though 🤔

keenin
2023-04-04 15:06:59

Yea like you only create alarms for things you witness in the experiment.

andelink (andelinkyle@gmail.com)
2023-04-04 16:41:05

For example how do you treat a lack of metrics: do you alarm or consider that okay, and when is that okay?
We do alarm on no-data. It’s annoying to get the PromQL right for this though. PromQL is one of the things I hate most in tech.

On top of that, is your standard to have services emit a 0 on success and 1 on failure, or only emit for failures, and again, when and why?
We have three types of metrics:
  • stats.incr(): emit a counter

  • stats.timer(): time an execution and emit percentile measure p50, p95, p99, p999

  • stats.gauge(): tbh i’ve never used this i don’t know what this does


So when you ask emit a 0 on success and 1 on failure, it’s more like stats.incr('mymetricname.success') and stats.incr('mymetricname.failure') or something to that effect. My team emits a stat at almost every step of the pipeline. We have too many arguably. When we don’t use them for a long time they get blocked by our systems to save on costs.

andelink (andelinkyle@gmail.com)
2023-04-04 16:45:52

We also have a ton of auto-generated alarms for generic observability. Like cpu/mem usage. k8s autoscaling/replication. Endpoint request volume. Logging level error counts. http exception stats

👍 r.taylor
andelink (andelinkyle@gmail.com)
2023-04-04 16:54:44

Right, so my question goes beyond your current setup to an actual living standard that is known by your team when creating a new metric/monitor/alarm.
Lyft has standards that are company wide. Our infra is actually really good for the size of our company, and has really good docs. s/o to the infra org. Aside from the auto-generated alarms previously mentioned, it’s still up to individual contributors to ensure good alarm coverage. But observability is hammered in pretty hard during eng onboarding. But, per usual, good PR reviewers have to comment on it if they are missing.

Basically, can you tell me that you are 100% certain all of your alarms and metrics work like this or are you going to find some odd ball cases if you do an audit?
Fuck no. We’ve had many sevs due to alarms not working as expected. Not my team (of course). But across Lyft

👍 r.taylor
r.taylor
2023-04-04 20:12:31

  • stats.gauge(): tbh i’ve never used this i don’t know what this does

A counter that can decrement, for monitoring something like current connections. Never used it either though

👍 andelink, spkaplan
andelink (andelinkyle@gmail.com)
2023-04-04 20:32:37

That’s good to know! I want to think of a use-case to use it on my team

😆 r.taylor
spkaplan
2023-04-05 09:11:12

counter is monotonically increasing. gauge is a number that can bounce around.

👍 r.taylor
spkaplan
2023-04-15 07:25:28

Do yall's codebases makes use of AOP? If so, what functionality do you do w/ AOP (e.g. metrics, logging, etc...)?

andelink (andelinkyle@gmail.com)
2023-04-15 14:16:01

Hmm. I have not heard of aspect-oriented programming before now. But reading the wikipedia page on it, it sounds like my team might do some of it without thinking about it as AOP. It almost sounds like a fancy word for monkey patching. I wouldn’t say it we do this sort of thing a lot, on the contrary, I try to minimize certain classes of side-effects.

The example of logging is one I’ve done before. Where I wanted to automatically log all the calls of a certain classes methods, so rather than modify the code of the class and its methods, I monkey patched the class so when one of it’s instance methods are called the function and args are logged. Does that count?

Some things at Lyft that are widely monkey-patched are Flask apps and gevent greenlets. Basically the first thing you do when starting your application is monkey patch Flask and gevent, and then you go and load your core app modules that use them.

I could be totally misunderstanding AOP though. Do you do it?

spkaplan
2023-04-15 17:31:09

Your example of automatically logging by "monkey patching" the class, sounds like AOP.

AOP when done right, usually supported by a framework, seems like it can really keep a code base cleaner. We use it in a few places (e.g. implementing db call retry logic). I'm looking at using it for wrapping method calls in Spans for distributed tracing.

andelink (andelinkyle@gmail.com)
2023-04-15 17:50:37

That sounds like a good use-case!

andelink (andelinkyle@gmail.com)
2023-04-15 17:51:41

Would applying a decorator to a function be considered AOP? Like suppose I have a decorator that modifies a function to log the name/args prior to executing the function when it’s called. like

@log_function_calls
def my_elegant_function(args, kwargs):
# do stuff
return something

The logfunctioncalls decorator is applied to myelegantfunction so when myelegantfunction is called, it logs it. Wikipedia says AOP doesn’t modify the function code directly, but this decorator approach is applied at/near the function definition, very close to the code. I guess it achieves the goal of AOP, separation of concerns, but idk if formally AOP has a more strict definition.

andelink (andelinkyle@gmail.com)
2023-04-15 18:08:33

Decorators I use a lot

spkaplan
2023-04-15 18:27:48

Sounds like AOP to me! I think decorators would be considered one of many ways to connect the Aspect to your code.

spkaplan
2023-04-15 18:28:18

I'm using decorators as well for my use case. They seem like a good way to tie in the Aspect

👍 andelink
spkaplan
2023-04-15 19:01:23

Now you can claim you are using AOP rather than monkey patching and sound legit 😊

andelink (andelinkyle@gmail.com)
2023-04-15 19:01:46

lol yes I can!

brandon
2023-05-01 16:48:48

Had to review definition of AOP as well, but given that I'm using Java/Spring, I think it's safe to say that I do a lot of AOP! Everything's a decorator! .NET was similar, but less extreme. I think it was a better balance. The Java ecosystem just takes it too far sometimes. So much black box magic going on everywhere. You have to memorize the side effects of all the annotations/decorators to know what you're dealing with.

spkaplan
2023-04-17 10:31:39

Does anyone use Github Desktop? I remember checking it out and not finding it helpful, but wondering if I might be missing something.

:nah: andelink, r.taylor
andelink (andelinkyle@gmail.com)
2023-04-26 20:56:35

I don’t use GH Desktop, but I do use the great GitHub CLI every day:
https://github.com/cli/cli

Website
<https://cli.github.com>
Stars
32119
andelink (andelinkyle@gmail.com)
2023-04-26 20:55:37

Amazing ls/du/tree/find-in-one CLI tool so incredibly named after Elden Ring, erdtree:
https://github.com/solidiquis/erdtree

Website
<https://crates.io/crates/erdtree>
Stars
1655
andelink (andelinkyle@gmail.com)
2023-06-13 12:21:52

AWS outage right now?

spkaplan
2023-06-13 12:54:53

I'm not seeing pagerduty firing

andelink (andelinkyle@gmail.com)
2023-06-13 13:23:23

must just be an outage for me

andelink (andelinkyle@gmail.com)
2023-06-13 13:27:53

us-east-1 is definitely on the struggle bus

andelink (andelinkyle@gmail.com)
2023-06-13 13:29:50

👍 spkaplan
spkaplan
2023-06-13 13:30:30

luckily, we don't use those.

andelink (andelinkyle@gmail.com)
2023-06-13 13:39:11

the problem as i understand it is that AWS Lambda is degraded. Lambda is used by AWS in the backend for many of their other services. Notably for me/Lyft, we are unable to authenticate reliably, hitting credential errors when trying to assume IAM roles

:same: brandon
spkaplan
2023-06-13 15:01:33

yea, I just saw that STS is also impacted

andelink (andelinkyle@gmail.com)
2023-06-13 15:02:38

end of the world
giphy logo
Posted using /giphy | GIF by GIPHY Studios 2021

brandon
2023-06-14 16:06:59

Damn, missed this thread yesterday haha but yeah, our lambdas and STS were also causing a bunch of issues. We even had tangential issues with scaling up resources and deploying. Please link to the post mortem if/when it's released!

andelink (andelinkyle@gmail.com)
2023-06-24 00:12:56

Would have liked a bit more low-level details, but still an interesting read! I love technical blog posts from companies, even if they are just recruiting vehicles. I guess they work lol
https://slack.engineering/real-time-messaging/

Slack Engineering
spkaplan
2023-06-24 10:13:49

Thanks for sharing. I'll give this one a read. I appreciate when companies do that as well. I read some of Uber's back in the day.

andelink (andelinkyle@gmail.com)
2023-06-24 10:52:05

Uber had a great blog! I wonder if they still do, I haven’t looked in a while

spkaplan
2023-06-24 11:22:31

Ditto

andelink (andelinkyle@gmail.com)
2023-06-26 17:36:46

Woah this is pretty cool https://eruda.liriliri.io/ (for mobile browsers)

andelink (andelinkyle@gmail.com)
2023-06-27 13:33:18

Just deleted 300+ TB of data. Feels good

:nice2: spkaplan
spkaplan
2023-06-27 13:50:41

What was the data?

andelink (andelinkyle@gmail.com)
2023-06-27 14:30:24

It was a compaction service we had spun up just before the Nov 2022 layoffs, which resulted in me being the sole engineer on the team. Then we got an eng from a sister team to assist 20% of their time on the service. Then April layoffs happened, and he and my other new teammate were let go. Back to me being sole eng. So we decided we couldn’t support this project anymore. I turned off any new compaction back at the start of May, but just got around to deleting all the compacted data it had produced just now. It was live Sep 2022 - Apr 2023, compacting all telematics signal data as it came in to a condensed, easier to use format. Would have liked to keep it going and support it full-time, but just don’t have the resources

brandon
2023-06-27 14:54:33

Oh man, you had me thinking it was an accident in the first half lol I was very worried.

:lolbold: andelink
andelink (andelinkyle@gmail.com)
2023-06-27 15:32:05

lol oh boy that would be a lot of data to accidentally delete

andelink (andelinkyle@gmail.com)
2023-06-28 10:41:14

fuck leap seconds

😆 spkaplan, r.taylor
spkaplan
2023-06-28 15:00:55

So glad ive never had to deal with those in my career

andelink (andelinkyle@gmail.com)
2023-06-28 17:00:20

For the last week or so been trying to debug why GPS sensor timestamps coming from a new device we’re launching don’t line up with the sensor timestamps we record on the driver phone, for the same recording period. They’ve been consistently off by approximately 19 seconds. Been banging our heads as to why.

Yesterday the device firmware team made the brilliant statement: “the GPS uses GPS time….” Okay?!?! So what, the time coming from these two different devices be roughly the same, maybe within +/- 10 microseconds… right? Oh, but no no sweet summer child, they said. GPS time is different, they said…

Fucking news to me.

GPS time does not includes leap seconds.
Okay… good to know but not helpful, I said. There have been 27 leap seconds inserted into UTC since epoch (1970). But we are off by 19 seconds, so thanks for this random piece of trivia.

GPS time uses a different epoch, 1980
Fuck me. Of the 27 leap seconds since UTC epoch, 9 of them occurred in the 1970s, before GPS epoch. Thus, leaving 27 - 9 = 18 leap seconds ‼️

But that leaves one second unaccounted for
We are, after all, 19 seconds behind, not 18. Turns out there is often around a 1s delay between when the time measurement was taken on the other device GPS module and when it gets routed through bluetooth to the client (driver phone), and we anchored those timestamps to the client receive timestamp. Off by one second. 18 + 1 = 19 💡

Mystery solved. It all does line up, once we account for these clock differences

😵‍💫 r.taylor
andelink (andelinkyle@gmail.com)
2023-06-28 17:00:45

Gotta admit, I felt real dumb not knowing GPS time was a different clock altogether. I just thought it meant the normal time coming from the GPS lol I know absolutely nothing and can’t believe people trust me to do this stuff

spkaplan
2023-06-28 17:25:47

Holy shit, that is an amazing example of why dealing with time is difficult

andelink (andelinkyle@gmail.com)
2023-06-28 17:30:42

Yeahhhh never do your own date/time management if you can avoid it

andelink (andelinkyle@gmail.com)
2023-09-03 12:45:48

Awesome website

ijmacd.github.io
😵‍💫 brandon
spkaplan
2023-09-03 12:46:42

The world of time scares me lol

😂 andelink
andelink (andelinkyle@gmail.com)
2023-09-04 23:53:13

lol as it should! It’s awful

Simple Poll
2023-09-08 09:32:17

andelink (andelinkyle@gmail.com)
2023-09-08 10:57:05

Python slicing is relatively performant, so in your case, I think if you can assume a non-empty string, I like your third option. Except, I’m not sure why it has to be an open-ended slice. Would x[-1] be sufficient?

andelink (andelinkyle@gmail.com)
2023-09-08 10:57:33

Seems like a strange problem though. From readability perspective, I might just go with 'b' in x

r.taylor
2023-09-08 10:58:12

Answer poll

andelink (andelinkyle@gmail.com)
2023-09-08 10:58:21

Although, if x is literally ever only 'b' or 'a,b', you don’t need to check for existence of 'b', because you know it is guaranteed

r.taylor
2023-09-08 11:01:16

I was trying to keep it simple and I can't edit the poll to clarify, but the possible values are more like:

  • xyz

  • abc,xyz

  • qrs

  • abc,qrs

r.taylor
2023-09-08 11:01:42

So, it needs to be a slice and b is not guaranteed

r.taylor
2023-09-08 11:02:07

And it's Jinja so I need to check if in works for strings

andelink (andelinkyle@gmail.com)
2023-09-08 11:02:15

ahhh, jinja

andelink (andelinkyle@gmail.com)
2023-09-08 11:02:46

in might not work, but x.contains() should

andelink (andelinkyle@gmail.com)
2023-09-08 11:03:36

in is available:

👍 r.taylor
r.taylor
2023-09-08 11:03:46

I think in actually does? My testing env is 3.x though and we're using 2.x

r.taylor
2023-09-08 11:04:24

I saw that, but for some reason thought it'd only check characters, not substrings

andelink (andelinkyle@gmail.com)
2023-09-08 11:05:39

i assume it uses the python string contains method, which checks substrings

👍 r.taylor
r.taylor
2023-09-08 11:06:46

Okay, best answer 🤦‍♂️

:lolbold: andelink
Simple Poll
2023-09-08 11:06:33

---
⚙️ Results revealed after closing
Created by @r.taylor with /poll
🔒 This poll is now closed

andelink (andelinkyle@gmail.com)
2023-09-22 13:42:41

Anyone use devdocs.io for documentation? I’ve been really liking it

brandon
2023-09-22 13:45:32

Interesting, never heard of it. So it's just a bunch of docs indexed in one place. It looks nice.

brandon
2023-09-22 13:46:09

My IDE kind of handles presenting me with the relevant docs though.

andelink (andelinkyle@gmail.com)
2023-09-22 13:46:56

Yeah, I like it. It has an offline mode with is nice. And loads of keyboard shortcuts. The open-source Python docs are particularly bad, hard to browse. So this is a really nice alternative. I’ve setup Kagi to redirect all docs.python.org search results to the proper devdocs.io/python link

andelink (andelinkyle@gmail.com)
2023-09-22 13:47:24

Yeah, my IDE also has docs presented. It’s nice to hover over and get them, or pin them on the side

andelink (andelinkyle@gmail.com)
2023-09-22 13:47:42

But I always find myself just opening up the links. Not sure why but I like a separate window

spkaplan
2023-09-22 13:54:10

Nope, but I'll definitely check it out!

:pepe_hacker: andelink
andelink (andelinkyle@gmail.com)
2023-09-27 13:40:14

@brandon now that you’re trying out Kagi, I’ll share my redirects for examples/inspiration.

I use these so any docs.python.org links redirect to the appropriate devdocs.io link:

# Links without a minor version
^https?://docs.python.org(?:/\d)/(.?)?(?:.html)?(/?#[^#]+)?$|

# Links with a minor version
^https?://docs.python.org/(\d.\d+)/(.
?)?(?:.html)?(/?#[^#]+)?$|

👌 brandon
andelink (andelinkyle@gmail.com)
2023-10-04 17:30:01

how can i tell if my system is compromised?

a security guy at lyft said there was a chance my system was compromised due to some connections made to a malicious domain. he said there was a chance i had my data exfiltrated, and that it might be good to change my password just to be safe, but he didn’t see the hard proof that he saw with other people who connected to the site. only a few minutes later my slack app quit out while i was actively typing a message (and no i didn’t hit cmd+q). if slack had crashed unexpectedly, would it report it to me anywhere? i’m used to apps reporting that they crashed and asking for permission to send crash details/diagnostics back to HQ ™️ for better understanding what went wrong. Slack didn’t do that

andelink (andelinkyle@gmail.com)
2023-10-04 18:52:58
Pedro Gonzalez [3:31 PM]
Hello Kyle, I’m investigation suspicious emails that tried to collect some data from us, using carrier.formcarry.com do you use this service or recall to use it in last 30 days?

Kyle Andelin [3:33 PM]
I have never heard of carrier.formcarry.com (edited)

Pedro Gonzalez [4:58 PM]
It’s weird I don’t se also any emails coming to you so I don’t think its related, but I do noticed that there was a request to this domain from your device, the domain is legit but was used to create a form and then exfiltrate info, if you do not recall to visit the site I would suggest to change your password just to be cautious

Kyle Andelin [5:00 PM]
oh snap
[5:03 PM] so carrier.formcarry.com is a website people typically access in their internet browser? and it then proceeds to exfiltrate certain user data?
[5:03 PM] do you know if the data is restricted to browser data or is it the rest of my system as well?
[5:04 PM] and it’s my macbook the request came from?

Pedro Gonzalez [5:05 PM]
Yes the trick was to make the user open a malicious file than then sent the data to this site, but in your case I did not see the file nor the email that was sent to other internal directions, just that your browser resolve the directions DNS, this could be because other legit site used for legit purposes but theres a little chance that maybe you received in another form, right now theres no evidence that suggest that your system or something else is compromised

Kyle Andelin [5:08 PM]
very curious. thanks for reaching out. i’m gonna snoop around my system to see if i can see the request at any point

Pedro Gonzalez [5:09 PM]
Thanks, I have this date: 09-28-2023 05:02:59 pm UTC
[5:09 PM] for the connections

Kyle Andelin [5:09 PM]
brilliant. thanks
andelink (andelinkyle@gmail.com)
2023-10-04 18:53:01

@brandon

brandon
2023-10-04 19:24:07

Ah, gotcha. It sounds like the site is used for legitimate purposes as well and you didn't have the problematic file or email in your inbox so there is no reason to think you were compromised necessarily. Hopefully he would have been more aggressive if there was more evidence. And it sounds like the nature of this attack is that they collect a static snapshot of data and push it out to an endpoint for collection. I don't think you need to be worried about your system being compromised unless they have used that data to hack in further, thus the advice to change your password just in case.

👍 andelink
brandon
2023-10-04 19:24:44

Either way, you have record that the security guy reached out and that you did everything that was asked of you, so if anything comes up later you'll be covered.

andelink (andelinkyle@gmail.com)
2023-10-04 20:26:53

i haven’t changed my password yet

andelink (andelinkyle@gmail.com)
2023-10-04 20:28:51

do you think the hacker tested is access levels by trying to close an active process that i spawned (slack)? If indeed my system is already compromised, who’s to say he hasn’t implemented a permanent backdoor and my password now is irrelevant

andelink (andelinkyle@gmail.com)
2023-10-04 20:32:26

how do you guys come up with passwords for things outside the scope of password managers? like your laptop user password. i can’t memorize an actual strong password

brandon
2023-10-05 08:59:18

Well, then you're fucked 🙃 Just do what IT says to cover your own butt. I really doubt you were compromised though. There are better ways for a hacker to check their permissions.

brandon
2023-10-05 09:01:43

I'm not great at password generation. I just have patterns that I rotate through based on the context.

andelink (andelinkyle@gmail.com)
2023-10-05 09:30:06

same

andelink (andelinkyle@gmail.com)
2023-10-05 09:30:10

i updated my password

r.taylor
2023-10-13 18:38:06

Surprisingly easy to memorize sixteen random characters, especially if you type them every day

r.taylor
2023-10-13 18:38:58

And all secrets are in the scope of password managers, they aren't just for autofilling

andelink (andelinkyle@gmail.com)
2023-10-13 18:49:55

That’s true

brandon
2023-10-06 06:19:34

👀

Category
General
Comments
6
:pepe_hacker: andelink, r.taylor
🌶️ andelink
🍿 andelink
andelink (andelinkyle@gmail.com)
2023-10-06 09:55:30

subscribed 🍿 🍿 🍿

andelink (andelinkyle@gmail.com)
2023-10-06 09:58:51

What version of curl are you guys on? I just checked after seeing this post

❯ curl -V
curl 8.1.2 (x86_64-apple-darwin23.0) libcurl/8.1.2 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.55.1
Release-Date: 2023-05-30
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL threadsafe UnixSockets

8.1.2, 2023-05-30. This is way more recent than I was expecting. I’ve never thought at all about curl upgrades and didn’t even know they were happening in the background. 8.3.0 was released three weeks ago though, and now that I’m aware I’m impatient where’s the upgrade

brandon
2023-10-06 11:28:27

I'm on 8.1.2 as well

r.taylor
2023-10-13 18:45:46

Wow, just a buffer overflow

r.taylor
2023-10-13 18:46:00

I remember thinking those were behind us when I learned about them

:same: brandon
r.taylor
2023-10-13 18:46:13

How naive I was

andelink (andelinkyle@gmail.com)
2023-10-13 18:49:27

Nay

andelink (andelinkyle@gmail.com)
2023-10-13 18:49:42

Rewrite everything in Rust

andelink (andelinkyle@gmail.com)
2023-11-15 12:47:02
spkaplan
2023-11-17 07:14:03

wow

andelink (andelinkyle@gmail.com)
2024-02-01 21:43:14

getlapseapp.com
🚫 andelink
andelink (andelinkyle@gmail.com)
2024-02-05 17:40:36

Handy tool that helped me identify the UTI of my current clipboard content:

Website
<https://sindresorhus.com/pasteboard-viewer>
Stars
576
:nice2: spkaplan
brandon
2024-02-05 17:57:03

UTI? 😳

andelink (andelinkyle@gmail.com)
2024-02-05 23:52:05

uniform type identifier

andelink (andelinkyle@gmail.com)
2024-02-06 00:40:00

Every piece of data on your mac is of a certain type, defined by its UTI. How an application interacts with a piece of data is UTI dependent.

An app can define its own UTI types and can choose to export them to the system or keep them private. A tool I use to see what UTIs are available on my system, what apps use them, and change what app should be the default handler for a given UTI is . It adds a new System Settings pane serving as a UI to these things + URI schemes (Uniform Resource Identifier is the original, technically correct term, but most everyone uses URL scheme interchangeably, including Apple). It also includes a CLI

andelink (andelinkyle@gmail.com)
2024-04-12 15:10:19

very nice

ast-grep.github.io
Website
<https://ast-grep.github.io/>
Stars
5797
:nice2: spkaplan
spkaplan
2024-10-08 16:17:56

Anyone running ollama locally to do RAG on your docs or code or whatever?

:shake: andelink
spkaplan
2024-10-08 16:18:14

I'm looking for the best maintained opensource repo to do this.

brandon
2024-10-08 16:36:06

Just making sure I'm interpreting this correctly. You basically want a custom LLM that has the context of your docs and source code, right?

This sounds super cool. I feel like there are some enterprise solutions, but a self hosted open source option that could be plugged into confluence and GH would be great!

spkaplan
2024-10-08 16:36:52

yeah, It can be a non-custom LLM, like Llama models, but with a RAG layer on top to feed in my personal docs and code and such.

spkaplan
2024-10-08 16:37:51

Trying ragflow now 🤞

Website
<https://ragflow.io>
Stars
18772
spkaplan
2024-10-08 16:38:41

If you use Obsidian for notes, it has a "Smart Second Brain" plugin which you can hook up to Ollama running locally. But I want it to have context beyond just my Obsidian notes, so trying this out. WIll report back.

brandon
2024-10-08 16:43:12

Have you tried the obsidian one out? That would be cool, although I'm unsure about feeding it work related stuff. Would have to learn more.

spkaplan
2024-10-08 16:44:37

I haven't tried the Obsidian one yet.

The motivation for running Ollama locally is nothing leaves your laptop, so you can feed it work stuff, code, docs, etc..

spkaplan
2024-10-08 16:47:04

One of my coworkers is using Ollama and Open WebUI and says it is working great. I might try that next.

brandon
2024-10-08 17:00:03

That's cool. I'd love to mess around with more of that stuff, but my company policy is still pretty strict on usage of AI tools so I'm not sure it's worth it. I think the policy is mostly targeted toward using AI generated content in our products/services, while this would just be a fancy way to grep notes, but I don't want to risk it 😬

spkaplan
2024-10-08 20:48:11

Of course, don't go against the company policy 🙂

spkaplan
2024-10-08 21:07:50

OpenWebUI + Ollama works so far.
Easy to add local docs and ask questions against them.
Will try asking about code next

❤️ brandon
Slackbot
2024-10-08 16:18:15

Kyle is the best.

andelink (andelinkyle@gmail.com)
2024-12-06 12:41:25

random

everyuuid.com
andelink (andelinkyle@gmail.com)
2024-12-06 12:42:43

Background:

eieio.games
andelink (andelinkyle@gmail.com)
2024-12-06 12:43:43

^ this blog does footnotes very nicely

andelink (andelinkyle@gmail.com)
2024-12-06 12:56:39

Actually an excellent blog post

andelink (andelinkyle@gmail.com)
2025-01-02 14:17:22

FYI for anyone who uses iterm you should update to 3.5.11 ASAP. The security vulnerability is stunning:


I’ve used iTerm for the last several years and definitely impacted by this edit: maybe not actually after reading the notes more closely. Extremely disappointing. Coincidentally, last week I started using ghostty as my terminal emulator. So I guess I was already out the door anyways.

🏃 brandon
andelink (andelinkyle@gmail.com)
2025-01-02 14:23:48

Diff for the fix is short:



Looking at it… just why even in the first place

spkaplan
2025-04-04 20:55:21

holy shit, we got Cursor licenses for work, and my mind is legit blown. i've only been playing with it for a day, but it is so much better than i imagined

spkaplan
2025-04-04 20:56:28

It's like having an okay-ish engineer who can take instructions, go work for a few minutes, give you a small PR, and you either accept or decline it.

andelink (andelinkyle@gmail.com)
2025-04-05 16:32:53

Cursor is all the rage online. Haven't tried it myself!

andelink (andelinkyle@gmail.com)
2025-04-05 16:33:12

Now you can fire half your team!

spkaplan
2025-04-05 16:42:59

Yeah I was suspending belief until I tried it. Far exceeded my expectations. This is easily as big of a step function improvement as when chatgpt first came out. I can see it becoming an expectation for people to develop much faster.

spkaplan
2025-04-05 16:44:57

Salesforce hasn't been super fast at giving us access to frontier AI, so I'm pleasantly surprised they gave us cursor already

spkaplan
2025-04-05 16:45:10

We only recently got Gemini a month or two ago

andelink (andelinkyle@gmail.com)
2025-04-05 17:08:13

I'm out of touch with company practices. Is it normal for companies to make the suite of all GPT-like products available internally?

spkaplan
2025-04-05 17:09:40

Good Q, not sure what's normal at other companies.

spkaplan
2025-04-06 09:31:39

Wow, just watched some videos showing MCP usage in Cursor for browser and terminal and github interactions. This is insane. I was aware of MCP, but I didn't realize it was being used in products yet. I gotta get this set up tonight. I've been rerunning UTs and pasting the errors into cursor, so hopefully I can just get it to rerun the UTs automatically and iterate on the errors.

spkaplan
2025-04-06 20:03:01

Give it a try on a personal project, just to see what it's like. My mind keeps being blown. I really expect to spend a majority (not all) of my time prompting ai, reviewing code from AI, and repeat, instead of writing code. I didn't think that until the past few days.

andelink (andelinkyle@gmail.com)
2025-04-07 08:31:27

I'll take a look at it today!

:awesome: spkaplan
spkaplan
2025-04-07 08:52:58

For work/prod code, there will def be more time spent reviewing/refactoring/editing the AI code, at least for now. But I vibe coded a tool for querying github PRs last night and I did days worth of work in a few hours. So weird

brandon
2025-04-07 10:44:17

Wow, that's incredible. We just got access to enterprise ChatGPT last week as well. It's already come in handy a couple times, but what your describing sounds incredible.

spkaplan
2025-04-07 10:53:09

Having access to an LLM chat interface is such a huge improvement. We only got that a month or two ago with Gemini. Being able to put your code and docs into it is so helpful. Id be happy to do a demo for you of cursor, but youtube can probably do better than me 🙂

👍 brandon
brandon
2025-04-07 11:00:59

Yeah, the Google Drive integration is pretty sweet. I want a Slack and Confluence integration too. Also, it would be even better if I could ask it to show me documentation on a particular topic instead of having to hand feed it the doc I want it to process.

spkaplan
2025-04-07 11:29:42

Yeah, Cursor + MCP servers will do this for you. It is beautiful.

spkaplan
2025-04-10 15:25:47

Got my first MCP server working with Cursor. This paradigm is gamechanging. Soon, your AI will be able to connect to all of your tools and it will become even smart and more aware of your context.

❤️ andelink
brandon
2025-04-10 15:38:34

That's cool. Does your employer bless and encourage these integrations? Also, what type of MCP server are you connecting to? I'm not too familiar with the term.

We're ramping up on ChatGPT over here and it's been awesome, and that includes integration with Google Drive built in. However, the AI model needs to be hand fed individual documents of interest so it's not nearly as powerful as what you are describing. I naturally want my model to have access to Confluence, GitHub, Google Drive, etc by default. However, I can't expect it to scan through all of those sources every time I ask it a question. How does it decide which sources to consider in it's response?

keenin
2025-04-10 15:53:11

And then whoever owns the AI will own your company!!! Muahahaha!!! SKYNET 1.0!!! evilparrot

keenin
2025-04-10 15:54:16

wake me up when I can just turn off my brain

brandon
2025-04-10 15:54:19

The AI will own the company 😳

spkaplan
2025-04-10 15:54:31

wake me up when I can just turn off my brain
getting close 🙂

:lolz: keenin
:ripparrot: keenin
spkaplan
2025-04-10 15:55:23

I started with the open source github mcp server. im following on whether they bless the usage of open source MCPs or if they're gonna have like a list of vetted ones or something like that.

brandon
2025-04-10 15:55:26

Please don't let this make my skills worthless 🙏

brandon
2025-04-10 15:55:40

I like being paid handsomely

spkaplan
2025-04-10 15:55:53

It's the opposite. It enables you to multiply your skills. It makes it so you can spend the time thinking an architect viewing rather than figuring out syntax and actually typing the code your fingers.

spkaplan
2025-04-10 15:57:13

However, I can't expect it to scan through all of those sources every time I ask it a question. How does it decide which sources to consider in it's response?
I havent integrated it with like a large document source (like g drive) yet so I'm not sure because even indexing that large of a document source doesn't seem feasible. But it does index your repo that you have open so it basically has a lay of the land of the entire repo and all the files in it.

👍 brandon
brandon
2025-04-10 15:57:51

That's a lot of architects! I guess as long as I stay ahead of it, I can still stay relevant even if a lot of the lower tier jobs disappear. It's going to change the job market for sure!

spkaplan
2025-04-10 15:58:04

wake me up when I can just turn off my brain
getting close 🙂 (edited)
But seriously, it's gonna turn each one of us into architects who rarely ever if ever actually right code and we just tell the AI what needs to be done and review it and architect.

spkaplan
2025-04-10 15:58:20

Like we are way closer to that point than I would've thought a week ago

keenin
2025-04-10 15:58:50

It will allow us to think about much more interesting problems without having to worry so much about the minutiae.

💯 spkaplan
spkaplan
2025-04-10 15:59:34

You may still need to worry about the detail details, but instead of implementing it yourself, you just review the output and make sure it is as you would like it. Again, very similar to us if you had a team of engineers working for you where you just review their output and tell them what to do

brandon
2025-04-10 15:59:39

I started with the open source github mcp server. im following on whether they bless the usage of open source MCPs or if they're gonna have like a list of vetted ones or something like that.
Nice, that's cool that you feel comfortable integrating with open source tools to try things out. They have been pretty strict with us so far, but it's only week 2.

spkaplan
2025-04-10 16:00:30

well, im not doing too much with the MCPs until i get the green light. there are internal teams working on vetting and hosts MCPs, so i suspect they will want us to use those.

spkaplan
2025-04-10 16:00:48

but hopefully they move quickly 🤞 it is hard to wait 😄

brandon
2025-04-10 16:03:23

Ok, I'll try to be more optimistic. But I want to keep my brain on, that's what keeps any average joe from doing my job, which keeps me in demand, which I like 😁

brandon
2025-04-10 16:04:02

I wonder if pull requests are going to get more tedious if people are pushing out code more quickly. Well actually, the pull requests will probably be reviewed by AI too 😆

spkaplan
2025-04-10 16:05:58

yeah there will definitely be more PRs :D

spkaplan
2025-04-10 16:07:22

i vibe coded this tool to query our github and output how many PR reviews peope do. I haen't even seen the code lol. and the graph is super interactive

:nic_sad: brandon
spkaplan
2025-04-10 16:08:09

we will of course review production code, but for small tools, it can take minutes to a few hours to build what would have taken days to weeks. i don't even know html/javascript 😄

spkaplan
2025-04-10 16:09:24

ill delete it soon, since it has usernames in it 😕

brandon
2025-04-10 16:09:46

That is super cool. I'd love to hear more about your "vibe coding" process here.

brandon
2025-04-10 16:09:56

Where is the tool hosted? Just locally?

keenin
2025-04-10 16:09:56

How much code did you vibe out?

spkaplan
2025-04-10 16:10:12

a local java app, api key to our internal github, outputs an html file

spkaplan
2025-04-10 16:10:19

i vibed every single line

brandon
2025-04-10 16:10:25

If you have any favorite resources on how to do that most effectively, please share!

spkaplan
2025-04-10 16:10:31

it was a test to see if its possible to not touch the code once

keenin
2025-04-10 16:10:42

How big is the project? Single file?

brandon
2025-04-10 16:10:51

Oh wow, a java app

spkaplan
2025-04-10 16:10:54

a few java classes, and an html template , think

spkaplan
2025-04-10 16:10:58

video call

spkaplan
2025-04-10 16:10:58

?

brandon
2025-04-10 16:11:06

Yeah, I'm free

keenin
2025-04-10 16:11:08

Tomorrow

spkaplan
2025-04-10 16:11:09

is huddle a thing here?

brandon
2025-04-10 16:11:23

We can do tomorrow if Keenin is free then

brandon
2025-04-10 16:11:26

I'll be around

brandon
2025-04-10 16:11:31

I would love a demo though

spkaplan
2025-04-10 16:11:36

we can do a short one now either way

keenin
2025-04-10 16:11:37

Same

spkaplan
2025-04-10 16:33:59

video with this guys' tips on coding with AI

YouTube
Cole Medin (https://www.youtube.com/@ColeMedin)
keenin
2025-04-10 16:39:42

why can't i join your huddle?

❓ spkaplan
keenin
2025-04-10 16:40:06

wow

keenin
2025-04-10 16:40:13

paid feature for more than 2 in a huddle

spkaplan
2025-04-10 16:42:05

lets do gmeet tomorrow

spkaplan
2025-04-10 16:42:20

whats. agood time for yall?

brandon
2025-04-10 16:43:11

Any time between noon and 4:30 works for me.

keenin
2025-04-10 16:45:21

Let’s shoot for 1pm

keenin
2025-04-11 08:12:02

actually, can you guys do 12p? I got a haircut at 1.30p

spkaplan
2025-04-11 08:49:03

I can do 12

:aw_yeah: keenin
:dope: keenin
:woohoo: keenin
brandon
2025-04-11 09:52:33

Yeah, that works. I might be slightly late coming back from the gym around that time.

💪 keenin
🏋️‍♂️ keenin
keenin
2025-04-11 09:57:07

Sam and I can cover stuff you went over yesterday til you show up

👍 brandon
andelink (andelinkyle@gmail.com)
2025-04-11 11:00:01

Damn i missed a lot!

keenin
2025-04-11 11:58:29

meet.google.com
Slackbot
2025-04-10 16:11:11

A huddle started

andelink (andelinkyle@gmail.com)
2025-04-16 08:33:59




import tariff

# Set your tariff rates (package_name: percentage)
tariff.set({
"numpy": 50, # 50% tariff on numpy
"pandas": 200, # 200% tariff on pandas
"requests": 150 # 150% tariff on requests
})

# Now when you import these packages, they'll be TARIFFED!
import numpy # This will be 50% slower
import pandas # This will be 200% slower

Why TARIFF?
Because foreign packages have been STEALING our CPU cycles for TOO LONG!

lol

PyPI
😆 brandon, spkaplan
spkaplan
2025-05-22 13:43:24

I hadn't heard of fzf. Have you?

GitHub
:lolz: keenin
brandon
2025-05-22 14:24:35

@andelink introduced this to me when I switched to mac a couple years ago. It's been so long since I set it up that I don't even know which parts it is contributing, but it's definitely installed in my shell!

andelink (andelinkyle@gmail.com)
2025-05-22 14:25:09

i'm balls deep in fzf

spkaplan
2025-05-22 14:25:14

nice. it seems like something i should have known about, or thought to search for, a longggg time ago :face_palm:

brandon
2025-05-22 14:25:29

I think there is another plugin that integrates with fzf, but I can't remember the name

andelink (andelinkyle@gmail.com)
2025-05-22 14:26:30

there are many. the one i most recommend is fzf-tab. it hooks into zshs native completion system so that every time you hit to complete, fzf opens up with the completion choices

:awesome: spkaplan, brandon, keenin