Fork me on GitHub

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.


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.


And with that, I wish you a good morning!


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!


So a big thank you to you all! 🙏

🛄 6
😄 21

@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.


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


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


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

👍 9

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


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


I would love that.


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


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.


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 The only downside to it was that it was, so no recording and no live-tweeting


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


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?


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.


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


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)


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?


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


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.


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


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:

❤️ 3

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


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


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


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


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


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


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…


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


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


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 🙂


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


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


I’ll order it for a covid winter read 🙂


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


Give in and just code 🙂


Working with developers is like herding cats.


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


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

@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 :)


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


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


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 🙂


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


@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.


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

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


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.


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.


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


@slipset I agree completely with that


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


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


So much complexity and "hacks" which we celebrate.


Go’ aften!


I'm sure a lot of people on 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...


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


This is at best UGT in your parts of the world


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


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


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


also aligns with some of the US colleagues at work


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

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


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

🍼 3

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


it I mean, not my code


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


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


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


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.


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


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


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


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


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


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


btw please upvote CLJ-2568 :)


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


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


hehe have you ever met a gamer?


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


@borkdude have you looked at how zippers use metadata?


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)


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


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


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


hehe post, I like to enjoy it


We use metadata for, well metadata 🙂


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


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.


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]]


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


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


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


Using meta feels a bit like using dynamic vars.


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


e.g. docjure


consider it an example 🙂


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


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


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.


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


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


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


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


probably performance: interleave is much faster