Fork me on GitHub
#off-topic
<
2019-09-19
>
jayesh-bhoot06:09:34

Hi. I hope this is the correct channel to ask this query: First the admission: I am not well-versed with the nitty gritty of Rx API. But conceptually I think it enables async programming by employing the Reactive programming paradigm, which in turn is implemented (in Rx) using the functional paradigm. I may either be wrong or very wrong here. Now, I have often encountered the opinion that Rx has a tendency to turn into a 'spaghetti mess' or a 'soup', or something on those lines. One example: https://www.reddit.com/r/reactjs/comments/41w6jb/comment/cz663a4 But I have never seen that claim substantiated. Can anyone with some experience elaborate for or against the claim? Or point me in that direction?

igl07:09:24

TL;DR: shit andré staltz says 🙂

igl07:09:50

i liked redux, but it requires vigorous discipline of your team

igl07:09:32

i choose relay/react, firebase/react any day now

igl07:09:17

using RX for debouncing click events or using from(Promise) all the time is overkill and missing the point. nobody needs RX for 99% of their UI

✔️ 4
igl07:09:31

so why build a framework around it?

igl08:09:08

you can always build spaghetti, RX or not. look at onion architecture or atomic design... but again those require discipline

✔️ 4
jayesh-bhoot08:09:53

I agree. I felt similar about Rx being overkill too, but was quite distracted by all the brouhaha over it in JS land.

jayesh-bhoot08:09:55

I like redux though. Its philosophy is simple. The view is a function of centralized state. Or view is a snapshot of the state at a given time, whichever seems more correct 😅

jayesh-bhoot08:09:47

I guess I will keep learning clojure for now. Found the CSP approach more amenable anyway.

igl08:09:23

yes, if build right a redux app can be maintained forever

igl08:09:39

but if you break the centralized state... start building your own middlewares to deal complex business logic... ugh

✔️ 4
igl08:09:11

first thing i always use is the time slider in the redux dev-tools to see if it breaks the site

👍 4
jeroenvandijk15:09:49

Anyone using Asana for sprints, issue tracking etc?

jeroenvandijk15:09:42

It looks like it could be used company wide, also for non-engineering. I'm curious what the experiences are of developers and if it has huge downsides compared to other tools

zirmite16:09:31

We've been using asana for years and really like it. but we are a data-team rather than a software engineering team so YMMV. Other non-engineering teams are also moving to Asana from Trello (mostly) and maybe other tools?

jaide16:09:55

We used it for a year or two. Ended up moving to https://clubhouse.io. As an added bonus it's written in Clojure.

dpsutton15:09:50

Did at my last job. I didn’t care for it

dpsutton15:09:40

Hard to move things between boards. The list view and board view were incompatible and were just settings on the board. Couldn’t easily view between them

jeroenvandijk15:09:58

I'm trying it now and it seems you can only add it to another project / board (which means it's connected to both). Odd or I miss something

jeroenvandijk15:09:02

Thanks for the feedback

jeroenvandijk09:09:14

Just found out how you can move an item between boards 🙂

jeroenvandijk15:09:09

ah hmm i was hoping to hear something else. Thanks!

avi15:09:28

If you’re looking for a project management tool I suggest you take a look at Clubhouse — https://clubhouse.io/

jeroenvandijk15:09:58

Thank you

👍 4
lilactown16:09:51

re: Rx, I think there are some cases where you want the async flow of values to be first class, and there Rx really shines

lilactown16:09:39

it makes explicit all of the implicit stuff you end up doing across your code base with events and requests and websockets etc.

lilactown16:09:40

but 80% of my cases, I don’t want that stuff to be explicit. Because the abstraction cost of Rx is extremely high; you have to solve the “how do I get Rx to do this” problem, before you can actually start to solve your real problem - “I need to fetch some data and render it over here”

👍 4
lilactown16:09:05

this is why I really like the things that have come out of React, like apollo/relay and soon the Suspense dataloader stuff. it covers the 80% case so well, while giving me an escape hatch (either a custom data loader, or hooks) to extend to something more complex like Rx, or in CLJS core.async, or whatever the next hotness is

jaide17:09:13

Hah! I love RxJS, I use it almost every day. I appreciate it as a general lib to express a lot of complex problems using the same terminology. I don't see how modeling with Rx is much different from Clojure core or any other FP-like library or language. Bacon, Highland, even Elixir streams and Rx all have a pretty similar API. By learning one I've had no friction picking up the others. I can see how it can get messy when you have a lot of streams you are combining together. I try to have one or two pipelines that everything either pushes to or reads from. I especially love redux-observable which combines RxJS + Redux. While I do like a lot of re-frame, I really love the expressive power of Rx for when simple db updates and pre-made fx doesn't quite cut it. I prefer the generalness of Rx to learning the very specific shape and api of re-frame when it only applies to re-frame.

jaide17:09:25

Granted, I definitely never got into Cycle. I liked the replay-ability of redux, and felt redux-observable allows me to model complex units of behavior in terms of simple transform functions that look for a specific action then emit another action.

👍 4
jayesh-bhoot17:09:58

In fact, I decided to delve into Rx because I was evaluating redux-observable and redux-saga. Rx certainly looks elegant compared to sagas (which look similar to CSP approach), at least from the examples I encountered. But the former has such a large API surface! On the other hand, saga while looked daunting at first, were reasonably comprehensible. I don't mind bits of imperative code as long as they are easier to reason about. I have found love in the clojure approach where pragmatism is valued over purity. So for now I am keeping Rx at bay. But I am sure my first use of Rx, if within Js, would be redux-observable.

jaide17:09:05

That's a fair assessment. I think Rx's API surface becomes moot if you are coming to it with understanding and experience with streams already. I think people tend to try to think of it as working with Arrays + time when really it's more like data hoses that will eventually have data fluid flowing through them. I feel the metaphor applies to architecture decisions as well. If you have a hose that has many other hoses piping into it and jutting out of it at random places, of course, it's going to become a spaghetti mess. If you stick to forming combinations at the beginning or at the end of your hoses, you always know where to look to make the changes you need.

👍 4
jaide17:09:22

Also, if it's of any use I did implement a near equivalent of redux + redux-observable in ClojureScript using BaconJS. https://github.com/eccentric-j/benfrankenberg.com/blob/master/src/com/benfrankenberg/app/state.cljs

jayesh-bhoot17:09:46

I think you hit the nail on the head. I am almost certain that I shied away from rx for lack of proper grasp on the underlying concepts; something I need to address first.

jayesh-bhoot17:09:01

Hah. I was dreaming of implementing (in near future of course) redux using rx paradigm in order to learn better the underlying concepts of redux and rx and reactive programming as a whole. Your link will come in handy!

timgilbert19:09:07

Hey, anyone want to answer a noob kubernetes question? I have two pods, one is a back-end server and the other is front-end code in an nginx container. When a new version of the FE pod is deployed, I want to notify the back-end server that that has happened so it can update a cache-busting parameter while it renders index.html. What's the approved k8s mechanism for reacting to this kind of event?