Fork me on GitHub
#clojure-europe
<
2020-10-26
>
slipset07:10:42

So my take on the component/di thing is that in the systems that I've been working on, a lot of the interaction with outside systems happen over http, which means there is no state in terms of connections that need to be handled. Like when you're talking to aws stuff, you don't have a "connection". The only connections that come to mind in our current system is redis, the dbs, and probably one or two more that I can't seem to remember. Now, I believe that none to few of the connections which we need in our app are actually dependent, so it doesn't really matter if I start redis before the dbs or vice versa. Also, wrt the db's since we're so lucky as to be using mongo, we've implemented multitenancy as one mongo-db pr customer, which means that we don't know which dbs we'll need on system startup.

slipset07:10:48

So for all intents and purposes, we (of course we're using component, why wouldn't we) end up with something like (assoc req :system (assoc @system :customer-db (connect-to (:customer req))) in a ring middleware somewhere.

slipset07:10:58

And with that, I wish you a good morning!

thomas08:10:18

Can I just say that I really like that fact that this channel has become a community in the last year or so. Talking all kinds of Clojure stuff, loads of other things and lots of people coming in each morning and saying hello!

thomas08:10:32

So a big thank you to you all! 🙏

🛄 6
😄 21
slipset08:10:33

@thomas I can really second that. And I appreciate the "takhøyde" as we say in Norwegian in here. There seems to be more room for discussing off-topic-ish, "stupid", or philosophical Clojure questions in this little channel than other places.

dharrigan09:10:31

#clojure-uk is pretty good at talking about non-topic things 🙂 Right now we are discussing daylight savings time and farmers 🙂

dharrigan09:10:58

We do sprinkle in a few clojure things from time to time (mostly me asking dumb questions 🙂 )

slipset08:10:52

I'd say this is almost like the hallway track at a good Clojure conf 🙂

👍 9
thomas08:10:21

thank you @slipset , that last comment sums it up perfectly.

dominicm08:10:48

I wonder if you could run a conference of only clojure philosophical talks (no exp reports, etc.)

slipset08:10:01

I would love that.

dominicm08:10:23

Do them in a discussion style, 20m to present an idea, 20m to answer questions / discuss it.

dominicm08:10:45

Well, in the virtual style you could even pre-record the talk, and have the speaker answering questions and discussing it as it was played.

slipset08:10:08

Presented at ffs-conf the one year it was run in London. It was the coolest conf I've attended so far.

slipset08:10:32

https://ffstechconf.org The only downside to it was that it was https://en.wikipedia.org/wiki/Chatham_House_Rule, so no recording and no live-tweeting

slipset08:10:05

But the format was exactly like you suggest @dominicm 20 minutes rant, 20 minutes discussion.

orestis09:10:54

Morning! I have to alternate between playing PM and figuring out what other people should do, and the urge to sit down at my editor and solve things myself and it’s driving me crazy :) anyone with similar experience could offer some tips?

Ben Hammond10:10:32

burying your head with the > I'll do it all myself mindset produces a frustrated team

Ben Hammond10:10:50

you do need to allow them to help

Ben Hammond10:10:19

do you use a kanban kind of setup?

orestis10:10:33

Yeah there’s a Notion board separate into “Backlog” (rough stuff) “Ready to go” (hopefully with enough writeup or shared context to be actionable), “Review” and “Done”. We have a weekly meeting where we go over things and priorities including support, design, stakeholders and another weekly developer coordination meeting. Plus a lot of slack back-and-forth.

orestis10:10:10

I pretty much run all those meetings and when I ask people on our 1-1s they say it’s not too much, not too little.

Ben Hammond10:10:30

well that sounds good

orestis10:10:34

But people have different personalities and engineers have strong opinions which can be draining at times 🙂

Ben Hammond10:10:40

(as long as they are not just being polite)

javahippie10:10:10

Why do you have to decide what other people should do, why do you have to split the tasks? Would the team be capable of doing it themselves?

javahippie10:10:14

I used to be a teamlead for 4 years, and I was often surprised, which of my tasks I was able to delegate away. Often the team was happy to be trusted with more responsibility and was more knowledgeable of the codebase, anyways. “Hey team, this needs to be built. Please decide how you should best split up the tasks and how long it would take”, worked very often

orestis10:10:36

That’s a good point. The rest of the team is new (10 months and 3 months) and the project includes a rewrite/takeover of a legacy platform and codebase, of which I know the most, both on what currently is there code-wise, and of what should be there but was left half-baked for reasons.

orestis10:10:57

So I’m working slowly to expose everyone to the whole of the codebase so they can have more autonomy… it’s hard.

javahippie10:10:09

Ah, that’s a tricky situation, if the experience levels differ that much. But there is a nice “delagation pattern” that works on different experience levels. My source is in german, but I can translate here: https://www.mehr-fuehren.de/wp-content/uploads/2013/08/5-stufen-der-delegation.jpg

❤️ 3
javahippie10:10:45

1. “Execute” - Stick exactly to my orders. I did the research, you just have to do it

javahippie10:10:06

2. “Make yourself familiar” - Look at the topic, work out solutions and clarify again with me

javahippie10:10:40

3. “Create a solution ” - Get into the topic, and propose the solution to me

javahippie10:10:08

4. “Decide with reporting back” - You decide what you want to do, and tell me afterwards what you did

javahippie10:10:29

5. “Decide without reporting back” - Your call, do what you think is best, I don’t need to know afterwards

javahippie10:10:28

So the more you trust your team members the more you can “climb up the stairs” of delegation. It really helped me to figure out, who was on which step and have a certain framework to stick to

orestis10:10:31

That’s super helpful and I’ve seen it before. It’s important I think to make sure that everyone agrees they’re on a specific “step”, it’s frustrating when opinions differ…

orestis10:10:43

(Which is something I struggle a bit to communicate, TBH)

javahippie10:10:34

Yes, that’s the “social and communications” part, that was always a struggle for me, too.

orestis10:10:41

I’ve never had a role model or even experience in a team where this was happening explicitly so it’s tough to figure out what I should be doing 🙂

javahippie10:10:44

I only learned by Podcasts, and in the end I booked a program with one of those podcasters. There is an incredible amount of “craftship” and techniques which make it more easy. For the technique part I can recommend books by Fredmund Malik. He was desperate, because every profession needs to be studied or learned, but everybody just kind of “does” leadership and management. He tried to bring structure into it and summarized it really well

javahippie10:10:24

I read “Managing Performing Living” (“Führen, Leisten, Leben”) and it helped a lot

orestis11:10:48

I’ll order it for a covid winter read 🙂

orestis09:10:04

I would gladly rant about this at a conf setting BTW :)

dharrigan09:10:12

Give in and just code 🙂

dharrigan09:10:28

Working with developers is like herding cats.

dharrigan09:10:38

One of the guys at my work transistioned to being a developer to the "development manager". I don't envy his role.

otfrom09:10:27

saying "morning" is a bit like having clojure dojos. It gets everyone in the same place with similar interests having fun and getting to know each other. That just makes more chances for good things to happen

❤️ 9
orestis09:10:44

@dharrigan I do code, quite a bit :) in terms of making things happen though a team is much more effective and resilient. It’s just that you have to repeat your point and direction every week until other developers cave in and accept it :)

dharrigan09:10:33

I guess it's harder now? Do you all work remotely?

orestis09:10:01

Yeah everyone is remote now. Three-dev team, so not too large but still I’m having trouble breaking down tasks into something that’s both not too trivial or too daunting. I have the most context and information so I have to do a lot of writing and talking.

Ben Hammond10:10:56

try to find the fun bits in people management

orestis10:10:15

The most gratifying part is seeing other people sink their teeth in a hard problem (be that UI, ops, whatever), seeing them do a good job — and realizing that that’s one problem I don’t need to solve myself 🙂

otfrom11:10:39

that is the nice thing about it. That and helping the team and team members be better than they were before

slipset11:10:36

@orestis I think the main responsibility for a tech-lead/product manager is to create an understanding of why something is being done, and possibly also why it needs to be delivered at some point.

slipset11:10:32

If you can establish this understanding, ie the intent, and you've hired reasonable people, they will deliver the stuff you need, not necessarily the stuff you figured you should ask for.

👍 6
slipset11:10:50

IMNSHO, it makes for a much more interesting place to be a dev as well.

3
orestis11:10:02

Definitely @slipset - I sought that behavior and created it in the current workplace. The context is a very small startup with a lot of baggage (operating for almost 10 years now with established product and clients). The trouble with communication is trying to figure out how to tune sender and receiver.

orestis11:10:34

Also another issue is scoping and time boxing. As engineers we tend to fall into rabbit holes and it usually takes outside intervention to get us out - and some times in my experience it has to be an “order”, otherwise the calling of the unsolved problem is too strong, even if the solution isn’t relevant to the business any more.

orestis11:10:32

Perfect is the enemy of good, as a bike tuner once told me in Belgium :)

otfrom11:10:27

@slipset I agree completely with that

otfrom13:10:26

I'm still of the opinion that mongodb is no worse than mysql used to be

dominicm13:10:46

That comic made me sad. There's too many people genuinely doing that.

dominicm13:10:57

So much complexity and "hacks" which we celebrate.

orestis14:10:48

Go’ aften!

zilti15:10:08

I'm sure a lot of people on http://dev.to would post that "ironically", while they actually do exactly that and are completely oblivious to it. That site really was an eye-opener for me to see what the dev world has turned into...

slipset15:10:53

you need to start getting a life @raymcdermott ...

slipset15:10:13

This is at best UGT in your parts of the world

genRaiy15:10:43

I start work later these days so it is officially morning for me too

slipset15:10:23

Hmm, so morning is when work starts? or have you shifted your days around?

genRaiy15:10:05

I'm doing life in the morning and work afternoon / evening ... for me it's a big lifestyle improvement tbh

genRaiy15:10:26

also aligns with some of the US colleagues at work

orestis17:10:05

I’m thinking of doing the same - moving back to Copenhagen where the daylight is precious. Not sure how I’m going to manage with baby-related sleep deprivation though.

😬 3
mpenet18:10:25

Lots of vitamin D. I live close to Malmö, 2 kids under 4, I know the feeling.

mpenet18:10:05

Enjoying parental leave now, working 50% for a bit (afternoons)

🍼 3
genRaiy19:10:28

first proper, non-trivial use of clojure.walk/prewalk today - quite the thing

genRaiy19:10:42

it I mean, not my code

borkdude19:10:40

Do you mean btw, that postwalk is more common in your code than prewalk?

dominicm19:10:01

I think I found a use for walk recently to optimize something, but I'm using postwalk in a weird way instead :)

genRaiy19:10:39

I only used prewalk - yeah I saw that issue but it's doesn't concern me. I'm very direct 🙂

borkdude19:10:29

I usually use postwalk as a search and replace in nested data structures. I also use it quite a lot in clj-kondo and sci, but more in the spirit of, not the built-in implementations.

genRaiy19:10:07

yeah it was for finding paths after a search ... for making what I thought was a simple game (checkers / draughts) with my son, not work

dominicm19:10:40

The metadata thing has only tripped me on a handful of uses of walk.

dominicm19:10:12

Hmm, I think they're all library uses as well. So probably something in that.

borkdude19:10:14

sci leans quite heavily on metadata so that issue became apparent to me quite early in that project. I've been bitten by it before

borkdude19:10:41

the metadata design in clojure is quite fantastic, there's always an escape hatch. I've used this in clj-kondo lots of times

borkdude19:10:31

"crap, this map is symbol to symbol, but we need locations as well.."

borkdude19:10:15

btw please upvote CLJ-2568 :)

borkdude19:10:47

@raymcdermott It's great that you're teaching your son Clojure. He can take your morning shift

dominicm19:10:00

I haven't figured out what is and isn't a good use for metadata yet. I bet Alex would have something pithy to say

genRaiy19:10:37

hehe have you ever met a gamer?

borkdude19:10:35

@dominicm please don't ask, I might get regrets

dominicm19:10:29

@borkdude have you looked at how zippers use metadata?

dominicm19:10:02

I think I remember the stock answer: use metadata only when you don't care about equality. (Or you want it to not be considered)

borkdude19:10:35

yes, I think that's the greatest thing about metadata: I can compare two symbols for equality even if they have different location metadata. <3

borkdude19:10:47

you can even serialize data structures while preserving metadata: EDN supports it. Although transit might not

borkdude19:10:18

@raymcdermott Do you drink coffee pre or post dogwalk in your morning life?

genRaiy19:10:02

hehe post, I like to enjoy it

slipset19:10:39

We use metadata for, well metadata 🙂

borkdude19:10:22

btw datafy also uses metadata to keep track of the real thing that was datafied

slipset19:10:49

One example is that we import data from excel. Customer data might not start at row 0, so there is a row offset going on. I attach the real row-num to the vector that contains a row using metadata.

slipset19:10:18

So given something like:

[[col1 col2 col3] ;; this might be row 3 in the excel sheet it came from, so (:rownum (meta row)) will be 3
 [col1 col2 col3] 
 [col1 col2 col3]]

slipset19:10:09

But I think it’s hard to define where to use meta and where to create another datastructure. We could have solved this as:

slipset19:10:03

[{:rownum 3
  :columns [col1 col2 col3]}
 {:rownum 4
  :columns [col1 col2 col3]}
 {:rownum 5
  :columns [col1 col2 col3]}]

slipset19:10:43

I couldn’t use meta for column-numbers as cell values could be primitives…

slipset19:10:14

Using meta feels a bit like using dynamic vars.

borkdude19:10:53

@slipset why not use an excel lib that makes nice maps out of this?

borkdude19:10:00

e.g. docjure

slipset19:10:18

consider it an example 🙂

borkdude19:10:53

yeah, metadata offers flexibility and prevents pre-mature refactorings also in cases like this

slipset19:10:18

We do use poi at the edges, but then make it into a matrix at some point and continue from there.

slipset19:10:43

There is stuff around the excel format that doesn’t suit us, or at least didn’t suit us at the time of the implementation of this thing.

borkdude19:10:07

@slipset wow, this got me thinking. what if poi was properly datafied, that could maybe a a nice way of dealing with it

slipset19:10:21

One thing about the excel format is that it’s sparse, so you get matrices with ragged edges.

borkdude21:10:24

hmm, I just needed interleave but I forgot it existed, so I wrote (mapcat list xs ys)

borkdude21:10:46

almost makes you wonder why core hasn't implemented it like that

borkdude22:10:01

probably performance: interleave is much faster