Fork me on GitHub

I tend to partition my web apps loosely into “handlers”, “model”, and “views” just because I find it a good visual reminder of what sort of code should or should not live in each type of thing — keep web/request stuff out of the model; keep pure business logic out of the handlers; keep view-related concerns together. But as I start a new web app, I tend to have one big handler.clj ns until I have enough code and enough common business logic to warrant refactoring out to multiple handlers, a model section full of business-related namespaces (although a lot of our business logic is already in a shared “library”), and view-specific stuff like how to render templates and header/footer wrappers and JS/CSS stuff etc.

👍 8

(that said, some of our simpler web apps have just two namespaces: the “handler” stuff — all of the logic of the app including rendering — and the “bootstrap” stuff — initialize everything, define routing, logging/middleware setup)

🚀 8
Ian Fernandez00:03:22

Now I'm like trying to convince people to use less and less namespaces everyday, and they're like showing scaffold of folders on a application 😢

Ian Fernandez00:03:03

without even knowing what it'll be in the future


I have a list of arbitrary long-running commands (listed in a file) I want to start/stop at once, and restart any of them if the process crash. (they are actually a bunch of kubernetes port-forward, that sometimes close for network/other reasons). Any existent tool that would help me? I’m thinking of making a quick babashka script otherwise.


systemd --user


Hmm true, and it would give me an excuse to learn systemd. I’ll check this link:


After googling a bit, it seems that while systemd allows to start multiple process in one unit, it can’t track them individually (to restart them in crash for example)


Yeah, make them each a unit


It’d be annoying to edit multiple files, as the list of commands changes often. In the same google search I found that seems to handle that use case


Hey wait


I forgot I switched to osx on monday….


I think I’ll just go with the babashka script 😅


Any redis (carmine) guys?


Can anyone remind me of the term (which I'm forgetting, and it's proving difficult to look up) for the "syndrome", I think it's called, in which a person with expertise is repeatedly able to identify substantial errors in journalistic reporting on their field, yet continues to believe those same outlets when reporting on things outside that field?


Gell-Mann Amnesia

👀 3

That's it, thanks!!


Is there a good reference for organizational/architectural patterns in code that would describe things like what is an Entity vs Model vs ViewModel? What constitutes a Service or a View? etc.


Elements of Clojure is a good book for that level of design question I think

👍 3

the classic of course is the gang of four design patterns book


(and the many follow ups and responses)

seancorfield18:03:35 is a pretty good overview of the various names of architectural patterns and links to definitions of specific ones.


Maybe not exactly addressing your question, but this also might be of interest:


hmm, looks like I have a bit of reading to do


Also the C2 wiki is a huge resource (fun fact: this is the original wikiwikiweb. the mother of all wikis)