clojure-uk

A place for people in the UK, near the UK, visiting the UK, planning to visit the UK or just vaguely interested to randomly chat about things (often vi and emacs, occasionally clojure). More general the #ldnclj
dharrigan 2021-04-30T04:55:11.334500Z

Good Morning!

Aron 2021-04-30T04:56:18.334700Z

Morning 🙂

dharrigan 2021-04-30T05:05:45.335500Z

I'm curious, what are you using (if at all) for rendering the frontend with Clojurescript, i.e., component library?

Aron 2021-04-30T05:14:52.336800Z

helix at the moment

harryvederci 2021-04-30T05:15:53.338500Z

I’m experimenting with https://htmx.org/ for my side project, for some oldschool-but-newschool server side html work. Pretty happy with it so far, but it’s not a complex application that I’m using it for.

Aron 2021-04-30T05:17:00.339900Z

but I am really disillusioned with react, at this point with cljs I think one doesn't need react although it depends what is the goal of the thing that we are building, personally I am not a fan of using something because it's popular (so other people can be hired and start working next day, which is the only reason anyone cares about popularity)

dharrigan 2021-04-30T05:25:31.342Z

thank you both, reading. I've never really been a frontend dev, although I have done an experiment using vuejs + bootstrap-vue. So, whilst I'm playing with Clojurescript atm, I'm just a bit unsure/lost as how to make the frontend pretty.

2021-04-30T05:29:55.342100Z

Morning

Aron 2021-04-30T05:40:30.342900Z

the real difference between front/backend development is not just in the tools though

harryvederci 2021-04-30T05:42:41.346200Z

For styling, I’d say just use https://getbootstrap.com/ if you’re unsure. Easy to drown in all the options otherwise. If it’s more of a learning experience, you can use no styling tools whatsoever, of course.

Aron 2021-04-30T05:44:09.348400Z

yeah, I still think those are the very very very easy problems

Aron 2021-04-30T05:44:53.349200Z

what styling. I mean, it's hard to make a good CSS system that doesn't end up making your life difficult, but not harder than writing any good software system

seancorfield 2021-04-30T05:46:41.352400Z

I was a bit surprised that our frontend team don’t use a CSS library/framework — but then we have a full-time UI/UX person who has created our “house style” from scratch…

Aron 2021-04-30T05:46:52.353Z

yeah, that works best

seancorfield 2021-04-30T05:47:26.354600Z

(they’re a big fan of Adobe XD and apparently now they can design “components” and export them to all sorts of media, of which CSS is just one flavor)

Aron 2021-04-30T05:47:44.355500Z

1. BE devs have their environment fully in control, usually a single system FE devs need to consider people using multiple different devices, different OS, different screensize, different capabilities (e.g. touch or not) 2. BE devs have control when they change the runtime, FE do not, we use what the client use 3. BE devs have sync db connection, you write save-to-db and next line you know your data is saved (or something went wrong), FE devs have localStorage which is a bad k/v database, or you need to include something heavy like datascript to have database that's moderately useful 4. However, another really big issue is due to the nature of the problem BE devs write software whose output will be consumed by other software, you can do linear state transitions and everything will be fine most of the time. That never works for FE For frontend, all the state that is represented must be thought as "shared" even if they are not actually related in any other way, because to be able to construct a proper FE experience, you often need to implement effects that affect the whole visual experience. Linear state transitions are not good enough anymore.

seancorfield 2021-04-30T05:47:45.355700Z

It’s all wizardry to me…

Aron 2021-04-30T05:48:06.356300Z

these are the difficult problems imho in FE

seancorfield 2021-04-30T05:48:48.357600Z

Oh yeah, the FE stuff is off-the-charts hard. I don’t know how they get anything done. The daily standup is always a revelation when the FE folks talk about what they’ve been blocked by…

dharrigan 2021-04-30T05:49:05.357700Z

a bit of clarification on my side. It's not so much the styling, it's the ability to do things, i.e., to "react" (pun not intended), to things. i.e., pull down data from the server, render it in a table, make each row clickable, fire an event. Add a button to a row, make that do something as well, show a dialog box, let the user click on it, handle the yes/no response...and then, yes, make it look pretty.

dharrigan 2021-04-30T05:49:21.358200Z

I echo @seancorfield's feelings here. FE just feels so hard 🙂

Aron 2021-04-30T05:49:55.359400Z

well, I think I have learned it so that I can reliably implement things, but without clojure and without lots of clojure talks I would've never been able

Aron 2021-04-30T05:50:04.360Z

required me to switch mentality several times

dharrigan 2021-04-30T05:50:14.360500Z

I like the warm bosom of backend dev, it's just data flowing in and out, with transformations 🙂

seancorfield 2021-04-30T05:51:37.362600Z

Today, I updated our “deploy to production” console (which is built into our overall staging system admin app) and I wanted to display the versions of JARs on staging vs production — and that requires calls out to staging and production so I decided to display the page and then use JS calls back to the server to initiate those and populate the table. Writing the BE code to go fetch the versions took me maybe fifteen minutes. Writing the FE code to do the async calls and update the page in the browser… took me f’ing hours! I hate JS.

2👍
Aron 2021-04-30T05:51:57.362800Z

heh

Aron 2021-04-30T05:52:03.363100Z

shouldn't take that long

seancorfield 2021-04-30T05:52:14.363600Z

Almost anything I do with JS takes me hours.

Aron 2021-04-30T05:52:15.363700Z

i mean, if it's the same work

Aron 2021-04-30T05:52:28.364Z

yeah, it's a lot about practice and dev environment

2021-04-30T05:52:36.364200Z

I tend to look at myself as both, but it usually ends up like this.

1💯1😆
Aron 2021-04-30T05:53:44.365900Z

also about integration testing, I don't agree with dnolen that automated tests are not useful, I refactored a big chunk of FE last week, at the end I ran the tests, caught all the remaining issues and I was able to not waste time with manually clicking around. Testing FE takes way too long, people just ive up 😞

Aron 2021-04-30T05:55:02.366700Z

but these tests start with loading the page, clicking on elements, typing realistic values, reading the DOM, checking sizes of DOM elements... it's not just an 'assert'

Aron 2021-04-30T05:55:03.366900Z

😄

Aron 2021-04-30T05:55:20.367400Z

i know most tests aren't just asserts, but our python tests are almost all just that

Aron 2021-04-30T05:56:37.368400Z

btw, the 4th issue, and I can't let it go if went this far, I think ultimately leads to the conclusion that encapsulation on the frontend is a much worse idea than anywhere else

Aron 2021-04-30T05:57:21.368900Z

I got my final proof for this when I read this github issue:https://github.com/facebook/react/issues/11527#issuecomment-360199710

Aron 2021-04-30T05:58:02.369500Z

> I want to highlight that in typical React apps that rely on `setState()` this is the single most common kind of React-specific refactoring that you would do on a daily basis.

seancorfield 2021-04-30T05:58:20.370100Z

Our FE team are big on automated testing. And every new feature and every bug fix they do gets tests.

Aron 2021-04-30T05:58:21.370200Z

Imagine being told that most of your job is to rewire what you did yesterday?

seancorfield 2021-04-30T06:03:22.373100Z

We’ve had automated BE tests for a decade and we keep adding to that suite but we’ve only recently had completely automated deploys from our CI system (I’ve tweeted a couple of times about my battles with BitBucket Pipelines lately). I’ve also been working on simplifying and streamlining our build/deploy pipeline to the point where a deploy of most of our apps — 14 of them — is completely automatic to staging, based on CI builds passing, and then just “select & click” in the admin console to get them to production (which our product manager / QA folks can do whenever they want — including running SQL migrations).

2021-04-30T06:04:45.374300Z

Automated tests are awesome. They have helped our team multiple times spot side unintended side-effects of new features

seancorfield 2021-04-30T06:06:17.376Z

Automated deploys of all the shell scripts etc that support processes on staging/production is a little less automated — because we don’t have any real automated tests around the shell script stuff — but even there it’s a single command from anyone’s dev setup to get the appropriate scripts on staging and then a single (manual) command run on staging to get that same bundle out to all the production servers if it “passes QA” on staging. So I think that’s my next target for Pipelines 🙂

seancorfield 2021-04-30T06:08:40.378700Z

And then, finally, there’s the two legacy CFML apps (yes, really), and those are also now down to a local command to package them and push to staging, followed by a few scripts to deploy them and restart the CFML engines. And a single command to push them to production, followed by a similar manual script step on production. Def. better than it was even a month ago. Of course we are actively rewriting those CFML apps to Clojure (and have been for years — it’s a lot of work) so that we can get to the same, fully-automated test & deploy CI process for those too.

Aron 2021-04-30T06:16:50.379600Z

I didn't intend to say dnolen is against all automated tests, just in context of FE testing the other day he told me this https://clojurians.slack.com/archives/C03S1L9DN/p1618931137246900

seancorfield 2021-04-30T06:20:03.380800Z

To be fair, he’s advocating a separation that makes FE testing viable/easy — just not testing the UI portion.

Aron 2021-04-30T06:24:07.381400Z

Seemed to me that what he described as an ideal situation is specific to his needs, not a generally applicable approach

Aron 2021-04-30T06:24:52.382300Z

and there are details that I bet would be causing trouble, like, if as he said all components are in js, that is basically saying almost all the important stuff is not in cljs

Aron 2021-04-30T06:25:12.382700Z

-> behavior of generalized components

Aron 2021-04-30T06:26:05.384400Z

so what I suspect is happening is that they avoid all the issues from putting behavior in the js components, but that's not really something anyone or any company can do

seancorfield 2021-04-30T06:26:07.384500Z

I can’t comment on the cljs issue since our FE is pure JS — React.js, Immutable.js, Redux, etc — but I know the FE team has worked hard to be able to automate testing of all the components, independent of the actual UI.

Aron 2021-04-30T06:26:23.384700Z

they must have great stories 😄

Aron 2021-04-30T06:26:29.385Z

pun not intended

seancorfield 2021-04-30T06:26:38.385300Z

Oh yeah, seriously great stories. I’m in awe of them.

djm 2021-04-30T06:43:03.385700Z

On the topic of testing front end stuff, Cypress is pretty amazing

seancorfield 2021-04-30T06:44:26.387Z

I’d never heard of Cypress until the recent “State of ColdFusion” survey (like our State of Clojure survey) and it was a popular write-in answer to “What testing frameworks do you use?”

djm 2021-04-30T06:45:47.387600Z

Having suffered the pain of Selenium in the past, I was blown away by how good it is

Aron 2021-04-30T06:50:26.388Z

cypress is great

Aron 2021-04-30T06:51:01.388700Z

I am using puppeteer right now though, I think when* I tried Cypress had some dev env issues

Aron 2021-04-30T06:52:24.390Z

on a different note, what do you think about my conviction that we (as in software people :D), should be actively producing many many more browsers for the internet?

seancorfield 2021-04-30T06:53:36.390500Z

What do you mean by “browser” in that?

seancorfield 2021-04-30T06:55:42.391Z

Do you mean more programs like Edge, Chrome, Firefox, etc?

Aron 2021-04-30T06:56:28.391200Z

yes and no

Aron 2021-04-30T06:56:50.391800Z

Yes, as in, yes today all browsers are like that, no as in that's why we need more, that we need diversity.

Aron 2021-04-30T06:58:19.393500Z

Essentially, if you reverse the situation, what this would mean not for the users of the browsers but the makers of the interfaces that we (FE devs) would not have to repeatedly write the same code. I imagine this whole thing along the lines of what Bret Victor talks about in his talks. E.g. when he mocks APIs, if you have seen it.

seancorfield 2021-04-30T06:59:25.393900Z

How would “more browsers” not mean “more pain for FE devs”?

Aron 2021-04-30T06:59:40.394100Z

🙂

Aron 2021-04-30T07:03:17.395300Z

Let me ask a different question first: why would anyone use more than one browser?

seancorfield 2021-04-30T07:09:59.395700Z

I only use Microsoft Edge — on macOS, Windows, and Linux.

djm 2021-04-30T07:10:59.396100Z

I use Firefox and w3m

djm 2021-04-30T07:11:30.396300Z

Also: https://www.commitstrip.com/en/2018/12/12/chromedge/

seancorfield 2021-04-30T07:12:06.396800Z

OMG! :rolling_on_the_floor_laughing:

danm 2021-04-30T07:36:28.400100Z

I switched (back, after 6-7 years or so) to Firefox about 6-8 months ago, because there was a bug in some Chrome helper on macOS that kept maxing my CPU that eventually annoyed me enough to lose the benefit of multiple logged in profiles. Firefox containers does that anyway, more or less

danm 2021-04-30T07:37:28.401Z

And the profile stuff was always more of a pain on Windows, whereas FF containers works the same in both (and Linux)

Aron 2021-04-30T07:38:08.401400Z

I think you misunderstood my question 🙂

Aron 2021-04-30T07:38:58.402400Z

I meant it generally, not specifically. Why would anyone in general use more than one browser, not why would specifically use more than one browser from the existing ones.

Aron 2021-04-30T07:42:09.404Z

Second question has good answers, I use more browsers because I need to test what I do with them 🙂 Or because they have different 3rd providers baked in, e.g. difference between Edge, Chrome, Brave is just that.

Aron 2021-04-30T07:42:33.404300Z

It's otherwise literally the same 'browser' experience.

Aron 2021-04-30T07:42:59.404800Z

Think of it like this, how many other kind of browsers do we use, next to the web browser?

thomas 2021-04-30T07:57:15.405Z

mogge

2021-04-30T07:59:06.405100Z

I use Firefox for online banking and nothing else I use Vivaldi for everyday browsing I use Chrome when I want things to just work and I don't mind being extra spied on to pay for it

2021-04-30T07:59:31.405300Z

vivaldi I block 3rd party cookies chrome I dont

2021-04-30T08:04:26.405500Z

I use firefox for most things but I have to use chrome/ium for google meet and other assorted things

2021-04-30T08:04:41.405700Z

it does feel like google have a habit of breaking things in firefox and not really being arsed about it

djm 2021-04-30T08:13:49.406400Z

I'm thinking of buying a microphone. Does anyone have an recommendations?

danm 2021-05-01T13:06:40.419300Z

I use headphones with a mic on. By far and away the biggest issue workmates had before that was their own voice feeding back to them from my speakers through the mic, and even relatively good mic still did that. The headphone one being nice and close to my mouth meant I could have the pickup level quite low too. And of course it was directional, but I imagine the standalone more expensive ones were too

djm 2021-05-01T13:09:53.419500Z

@carr0t I currently have a work provided headset, but I'll have to give that back when I leave. Plus swapping from nice headphones to the headset for meetings is suboptimal. So the plan is (separate) mic + headphones

danm 2021-05-01T13:10:58.419700Z

Oh I just got headphones good enough to use the rest of the time for music 😉

danm 2021-05-01T13:12:14.419900Z

https://www.amazon.co.uk/SteelSeries-Arctis-All-platform-compatibility-Detachable/dp/B07PS3Y5BY is what I got my last place to get for me as a 'video call headset', because anything without pretty hefty ear cans that prevent any part of the headphone from pressing on my ears at all ends up hurting in any meeting longer than ~10 minutes

danm 2021-05-01T13:12:31.420300Z

I seemingly have very sensitive ears

danm 2021-05-01T13:13:15.420500Z

I'm also used to that style, as https://www.amazon.co.uk/SteelSeries-Arctis-All-platform-compatibility-Detachable/dp/B07B819VMQ?th=1 is what I have for gaming on my desktop

danm 2021-05-01T13:15:13.420700Z

Prior to that I had some open backed Sennheisers which were more audiophile headphones, and I stuck an AntLion ModMic onto them: https://www.amazon.co.uk/Attachable-Noise-Cancelling-Microphone-Playstation-GDL-1500/dp/B07YN26PBT/ref=sr_1_4?dchild=1&keywords=antlion+modmic&qid=1619874871&s=computers&sr=1-4

danm 2021-05-01T13:15:25.420900Z

They now seem to do a variant without the mute for cheaper, and a wireless one for more

danm 2021-05-01T13:16:45.421100Z

But wireless became more important for me once we had Matt. Less for him to grab, and if he is elsewhere and yells I don't need to remember to take the headphones off before going to get him, which was a problem several times, hence I bought the Steelseries headset

djm 2021-05-01T13:42:09.421400Z

I have.. too many pairs of headphones

danm 2021-05-01T13:55:02.421800Z

I've just got a set of bone-conduction bluetooth ones, but they're for when I'm out and about more than anything else

djm 2021-05-01T14:23:05.422Z

For that I use https://www.amazon.co.uk/dp/B08C7C29JK/

djm 2021-05-01T14:23:23.422200Z

How are the bone conductor ones?

danm 2021-05-01T14:25:05.424100Z

I really like ‘em. A bit buzzy (on my head, not sound wise) at high volumes, but I absolutely don’t need them that loud. And they don’t sit in my ears (which also make ‘em hurt)

Aron 2021-05-01T16:44:08.424300Z

https://www.amazon.co.uk/Status-Audio-Closed-Monitor-Headphones/dp/B01BDX1IVW https://www.amazon.co.uk/Philips-SHP9500-00-Headphone/dp/B00ENMK1DW/ https://www.amazon.co.uk/gp/product/B083T4XJDY the first two, I think I will buy more as time passes as both are exceptional for the price the last one definitely not 🙂 have a bunch of others too that i don't or can't use now because they are broken 😞 although the important parts sound wise are good, many new headphones are built in such a way that if they break, it requires extreme effort to fix them, often better to just replace most of it

2021-04-30T08:15:13.406500Z

I use a tonor tc30 which I picked up for cheap on amazon, it works flawlessly on linux if you care about that

djm 2021-04-30T08:17:58.406700Z

A cow-orker has a different (slightly more expensive) Tonor mic, and said the sound quality is quite poor (and it has bad reviews on amazon).

2021-04-30T08:19:39.406900Z

hmm, this one seems pretty good for sound quality, but I must admit I mainly only wanted a step up from the one built into my webcam

2021-04-30T08:19:48.407100Z

I'm not really recording podcasts or anything

djm 2021-04-30T08:20:40.407300Z

Based on the negative amazon reviews for the tc30, I'm getting the impression that the sound quality is fairly good, but that it picks up a lot of background noise

mccraigmccraig 2021-04-30T08:24:28.407600Z

morening

2021-04-30T08:24:45.407700Z

when I tested it out and first got it it seemed like a big upgrade from the built in one in the webcam, but your milage may vary, it is on the cheaper end of the scale

1👍
2021-04-30T08:27:28.408Z

they see it as driving engagement, no doubt

1👍
alexlynham 2021-04-30T08:30:01.408300Z

morning

alexlynham 2021-04-30T08:30:15.408400Z

what is the mic for?

alexlynham 2021-04-30T08:30:30.408600Z

i use a clip-on lavalier mic and it's the business

djm 2021-04-30T08:33:05.408800Z

@alex.lynham work meetings

dharrigan 2021-04-30T08:44:31.409Z

I use a Blue Yeti Pro

dharrigan 2021-04-30T08:44:41.409200Z

works wonderfully well 🙂

Aron 2021-04-30T08:45:28.409400Z

Depends what you want to use it for and what environment. E.g. for recording or meetings or streaming or anything else.

djm 2021-04-30T08:49:52.409600Z

I have considered a Blue Yeti, but it's a little more than I'd like to spend

Aron 2021-04-30T08:50:00.409800Z

All mics work best if you can talk right into them, the farther they are the more problems you will have.

Aron 2021-04-30T08:50:41.410Z

I also got a cheap knockoff usb mic (won't share the name because I just checked and seems like they are shipping bad units now, there are many more bad reviews than when I bought it...)

Aron 2021-04-30T08:51:19.410200Z

If you can isolate the stand from vibrations and move the mic close to your mouth, you can easily set up almost any quality microphone to have exceptional quality.

dharrigan 2021-04-30T08:51:35.410400Z

imho, if it's only a little more....why not get it? It's something that I've used quite a lot whilst working from home. The quality is outstanding, and I always have the view it's better to spend money on good quality stuff, then buy cheap stuff repeatingly.

Aron 2021-04-30T08:51:43.410600Z

Depends on hardware, but it was long time ago when we needed dedicated sound boards

Aron 2021-04-30T08:52:22.410800Z

yeti is at least 3 times the cost of what I have.

djm 2021-04-30T08:54:57.411Z

https://www.amazon.co.uk/dp/B08VGMGXKQ seems to mostly have good reviews, or for a little more https://www.amazon.co.uk/dp/B08L91T9QV may be better, but I'm not sure I want a boom arm

dharrigan 2021-04-30T08:55:32.411200Z

Be careful of those boom arms that have springs

djm 2021-04-30T08:55:33.411400Z

I don't particularly trust reviews on amazon, but the first of those was recommended somewhere that's probably more reliable

dharrigan 2021-04-30T08:55:41.411600Z

They can cause quite a bit of background vibration

dharrigan 2021-04-30T08:55:44.411800Z

twwaaaaang

djm 2021-04-30T09:03:47.412Z

Yeah, a nice idea in theory, but seems like it'd be more trouble than it's worth

Aron 2021-04-30T09:06:52.412200Z

i don't trust the review that is positive, but i do trust negative reviews with photographs that sound human

Aron 2021-04-30T09:07:50.412400Z

a good support might cost more in time and efforts than the mic

Aron 2021-04-30T09:09:06.412600Z

https://www.v-moda.com/us/en/products/boompro-microphone I have one of these too, very useful

djm 2021-04-30T09:10:24.413Z

Looks interesting

Aron 2021-04-30T09:10:24.413200Z

And in general?

jiriknesl 2021-04-30T09:15:08.413500Z

Morning

alexlynham 2021-04-30T09:23:59.413600Z

a decent clip on lav mic is a tenner

alexlynham 2021-04-30T09:24:17.413800Z

if you can be bothered to clip it to your collar before a meeting

djm 2021-04-30T09:33:03.414Z

The £10 ones on amazon don't seem too good from the reviews, as best as I can weed out user error, bad luck, etc

alexlynham 2021-04-30T09:33:44.414200Z

i have a ten quid lav mic and it's brilliant, there's almost nothing that can go wrong as they're v simple devices

alexlynham 2021-04-30T09:34:37.414400Z

https://www.amazon.co.uk/gp/product/B07SHSHW6H/

djm 2021-04-30T09:34:43.414600Z

That's what I'd have expected (nothing to go wrong)

alexlynham 2021-04-30T09:36:03.414800Z

i use it for calls, as a field recorder, i've used it with my mobile while out cycling & once a week i do a virtual ride with mates where i clip it to the handlebars - it can handle the fan + bike on the trainer with the wind puff, so

alexlynham 2021-04-30T09:36:26.415100Z

as far as cheap solutions go 🤷

djm 2021-04-30T09:36:54.415300Z

9% 1* reviews. Although I suspect a lot of those are related to usb-c + smartphones

alexlynham 2021-04-30T09:38:51.415500Z

oh yeah obviously i connect it to a macbook with the standard TRS jack. TRRS/ TRRS -> USB-C is always a strong case of YMMV 'cos there's not really standards

alexlynham 2021-04-30T09:39:50.415700Z

looking at one star reviews it's people having issues with TRRS vs TRS

2021-04-30T13:48:47.416100Z

@dharrigan: re-frame for me