This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-23
Channels
- # announcements (8)
- # babashka (12)
- # babashka-sci-dev (6)
- # beginners (62)
- # biff (5)
- # calva (4)
- # cider (2)
- # clj-commons (8)
- # clj-kondo (17)
- # clj-yaml (40)
- # clojars (3)
- # clojure (117)
- # clojure-europe (122)
- # clojure-nl (5)
- # clojure-norway (20)
- # clojurescript (10)
- # consulting (1)
- # datomic (65)
- # events (15)
- # figwheel (1)
- # fulcro (4)
- # lsp (15)
- # mount (15)
- # music (1)
- # off-topic (53)
- # polylith (12)
- # releases (3)
- # shadow-cljs (13)
- # sql (1)
- # test-check (8)
- # xtdb (31)
bleatings!
I haven’t experienced it that bad, but I have, in my career, heard management people say things that displayed an absurd ignorance of what the business application was actually doing. I think I get it, though. In essence, their job was not necessarily to know the application, and they had plenty of other stuff to fill up their headspace. It just seems silly from my perspective.
Good morning 🙂
Apropos tabmageddon and similar: I just dumped a bunch of todos from my “main” todo into “sub-todos”, and now, my main is only 10ish items. I feel such a huge relief. In recent times, I’ve begun feeling overwhelmed when I see a lot of workitems at once. Sometimes, I miss the days when my responsibility was more like “I’m working on this item until it’s done, then I pick the next one”.
if my todo list scrolls, it feels overwhelming to me. silly lizard brain thing
Same! Ideally, I want maybe 5 items or less.
My girlfriend keeps lists of lists for all of the shit she keeps track of. Her head is exploding, even if she’s way more used to it and comfortable with it than me. Just vetting the backlog is a huge task by itself. I think there’s something to be said for “welp, this was on the list forever, but I never got around to it, and apparently, that wasn’t a problem. Out you go”
something to try with your girlfriend: 'what is the value of re-prioritising tasks 10+ more than once? would it maybe be more calming and freeing to ignore anything after 10 until you've dealt with 1-10?'
i.e. roadmaps suck.
i realised this during a particularly tough time a couple years back, where i'd spend all day playing planning tetris to try make all the stakeholders happy, and then the USA would wake up, inject fresh opinions, and i'd have to throw the plan in the bin and start again. i realised that it wasn't helping anyone at all to be trying to predict whether we'd finish task 20 3 weeks from now or 3.5 weeks from now, and that we should decide, at most, which 3 things to do next, and then to do them until they're conclusively done! that was the beginning of a much brighter, happier part of my career, one i am still in today 😊
in other words: things suck, but that’s okay. You’re not a superhero, you don’t need to single-handedly save everything
another lens: maybe let future-you deal with future-you's challenges
YESSSSS
i maintain notes on systems thinking stuff cos i'm babbling about it to people all the time and constantly want to share stuff with them: https://rostnl.notion.site/ one of my most used: https://rostnl.notion.site/Complex-Adaptive-Systems-Cynefin-ae89a77d4e564db7976762acf50f6306
Even then, there were enough outside disturbances to deal with… But at least, they were outside.
What’s the best literature (online included) for organizing Clojure code? I always feel like we could do better in making things easy to navigate, find and overview.
I would also be interested in what are the Clojure/FP counterparts to the GoF Design Patterns, SOLID principles, ORM, etc.
@U0ETXRFEW thx, I did not have it on my radar.
@U02AMR8032L You know about http://mishadoff.com/blog/clojure-design-patterns/ ?
Opinions: (and not online resource, sry :man-shrugging: ) There is no such thing as too many namespaces Try to avoid the repository pattern No need for a "util" namespace Group stuff according to functionality and concern - error handling, logging, http, functional transformation (middleware, cps, etc), ring,
Whats’ “the repository pattern”, @UK0810AQ2?
In short, an abstraction layer to mediate your persistence layer and domain model https://www.martinfowler.com/eaaCatalog/repository.html Problem, it always leaks. Your persistence isn't universal, it's either key value, relational, or something else. You can't paint over it, then I rather build it in terms of function and not domain, eg instead of abstracting operations for the domain, abstract operations over persistence. If it's key value, have a keyvalue namespace and build your operations with it.
this is a great article about code org and dealing with abstractions: https://lambdaisland.com/blog/2022-03-10-mechanism-vs-policy
i agree with you @UK0810AQ2!
lots of simple namespaces is better than fewer bigger ones. a common refactoring i do is to split an ns - an obvious tell is when a subset of defs in there all share a common word e.g. "get-repo" "repos-for-n" "may-use-repo?" tells me i need a new namespace just for "repo"
Re: Polylith: @U04V70XH6 has written several articles where Polylith is involved. Check out: https://corfield.org/blog/2021/06/06/deps-edn-monorepo-3/
I'll give an example riffing on the post you shared.
It's a good example, but I often see stuff like this applied cargo-cultishly, i.e. all namespace that are involved in policy will be under the policy
directory and all namespaces involved in mechanism will be under the mechanism
directory (which is often also called repository
)
just call your namespace my-app.json, no need for http://my-app.repository.json
i use the policy/mechanism thing as a way to read the code, rather than a way to organise it
one common question i ask myself is, how could i use more data and less functions to represent this policy?
Who cares if it's in a different files, it gives the function a better name by just putting it there
sometimes i do keep things combined because seeing the whole system on a single screen is also useful. but usually this is when it's an independent, isolated bit that happens to have several abstractions in it
e.g. a script to export a bunch of testing data from a production db will deal with db queries and configuration to be used by those queries, and then fns that e.g. a scheduler would call to do that work, all in the same ns
most of the time tho its all nicely factored out
I just split the editor screen if I need to look at several things. It can be in the same file, too
my eyes are shit, so my big screen is a + for me
That's a different concern; I meant in terms of layout. A big screen with big font is useless for lines 200+ chars long
ohh right yeah
What would be the preferred way of creating a graphical representation ( UML like) of the system? Would it make sense to associate a namespace with a class as in UML class diagram. For me it's always easier to reason about the interactions within a systems by means of a diagram.
Namespaces and classes are fundamentally different imo. Classes encapsulate state, namespaces (should) encapsulate ideas. They let you name and organize things
So a package?
And if I wanted to see which namespaces and functions are involved in realizing a specific use case what would be my options? For stuff like this I usually make use of something like a sequence diagram.
assuming you're not loading anything dynamically, you can make a dependency graph for vars, not just namespaces. Namespaces are places where vars hang around, you can totally ask "which var definitions use other var definitions"
thx for the Info!
@U02AMR8032L FP counterpart to design pattern is a fairly old topic. I remember first reading about it on a presentation by some famous Googler - he claims that a large majority of the GoF patterns become just language features in FP (some would go further and say that design pattern in OOP is mainly a way to compensate for its lack of expressiveness). As an example: https://dev.to/qgabe/functional-programming-design-patterns-part-2-factory-method-pattern-e19 In short, you’d try a combination of HoF/currying/partial application/lambda/closure…
However, the irony is that later on, ppl seem to find that there are a separate set of design patterns in FP - things like Monad and Combinator
@UK0810AQ2 why no util ns? I often have one where I put some pure compute functions that are general purpose and not really project specific… (it’s like my personal extension to clojure.core
)
@U0509NKGK a bit of a side-track: the mechanism/policy distinction is also something that happen a lot when you dig into the internals of famous cloud softwares
re put related stuff all in one ns vs spread it out: feel like the old debate on monolith vs microservice aka phase change due to scale
one more question to tack on: in some project I get into a “tangled mess” situation where it seems no matter what I do, some form of circular dependency b/w namespaces appear. Putting absolutely everything in a single namespace “solves” it, but as they say, heavy circular dependency is usually indicative of deeper design issue (tight coupling?)… any hints on what to do in such scenario?
one ns vs spread - I would say that it's one ns vs multiple ns (would imply high cohesion). The thing in between is a modular monolith. As far as I can tell from what I read until now Polylith facilitates the creation of a modular monolith. In case of circular dependency just add a message broker in between 😉.
@U6L5FFL95 the util ns has unrelated things. That's not just compute stuff. There's stuff for string, for errors, for collections, for maps. All those things should be their OWN namespaces
so the equivalent of a god class 🙂 ?
@UK0810AQ2 oh I see… any suggestion for what name to use for the namespace? (keeping in mind that naming things is one of the 2 hard problems in CS - the others being “cache invalidation, and off-by-one error” 😉)
Like I said, for collections call it call the ns collection, for strings, string, for error handling, error, for io, you get the point
utils namespaces are like mushrooms in a cupboard 😂
What I like about Polylith is that by "forcing" a structure on your code -- a fairly flat, broad structure of "bases" and "components" -- you are "forced" to think more clearly about the names of your components (groups of namespaces) and also their dependencies. So you work much harder at ensuring lower coupling.
moorning
Good morning 🍁 I recently created an Unsplash account and posted a couple of my latest shots. This one turned out to be special ☺️ 232K views so far: https://unsplash.com/photos/g06oUV5dWDQ
you're really good, wow!
you are like ze buzzing of flies to him!
Ooh ghostbusters
Btw is ghostbusters still worth watching for the first time?
yes this.
I thought the sequel was OK 🙂
it’s all good fun
There's nothing that wrong with Ghostbusters II, just that it wasn't as great as the first one.
Indeed 🙂
I liked the remake/reimagining one as well. Chris Hemsworth as a himbo worked excellently!
But the first one was certainly special compared to the rest.
I’m quite ignorant on cultural matters, but if I’m not mistaken, ghostbuster becomes kind of a cult/meme once localized in Hong Kong…
Good night!
Good Morning!