Fork me on GitHub
#clojure-uk
<
2018-05-14
>
yogidevbear06:05:54

How are you doing this morning Dominic?

dominicm07:05:19

I'm doing good, how are you Andrew?

thomas07:05:25

morning....

mccraigmccraig08:05:36

anyone got an opinion on data-structure representations of SQL queries ? what's good, what's bad, examples ? i'm particularly looking for inspiration on a structure to represent joins. not for a SQL db as it happens, but a join is a join

Rachel Westmacott08:05:37

I’m keeping most of my SQL as strings. It’s a simple approach, but it seems to work well.

yogidevbear08:05:36

@peterwestmacott do you build up your query strings dynamically?

Rachel Westmacott08:05:52

occasionally - but mostly not

Rachel Westmacott08:05:23

mostly the queries are for specific use cases, so they’re hand-crafted SQL

yogidevbear08:05:11

I suppose it's less prevalent within Clojure as it works really well for transforming data after collection

Rachel Westmacott08:05:02

I don’t have the data on prevalence - but it works well for me. I’ve written quite a lot of SQL previously and I think it’s a reasonably good DSL to use.

👍 12
Rachel Westmacott08:05:41

There may well be better approaches than what I’m doing though.

mccraigmccraig08:05:24

if i was doing actual SQL i would probably go with the strings or the stringy hugsql approach ... but in this case i'm starting from scratch - there's no underlying join syntax i have to map to, and i don't have to deal with different'db's syntax differences... so a data-structure based DSL seems to make sense

danielneal08:05:07

we use the same approach as @peterwestmacott for sql - but I guess the underlying principle is minimal wrapping when appropriate - however we do have a thing that wraps magento "entities" because they are a nightmare and for that we use a datomic pull syntax style

danielneal08:05:03

this only came out recently, and wouldn't work in our case, but it's this kind of thing

danielneal08:05:54

vectors of keywords represent fields, maps represent joins

Rachel Westmacott09:05:16

“Walkable’s goal is to become the ultimate SQL library for Clojure.”

danielneal09:05:53

clearly not written by a brit

danielneal09:05:09

otherwise would be "walkable is a little sql datastructure thing, probably no one will be interested in it but I'll put it here on github anyway"

😂 24
alexlynham09:05:01

everybody get some sun in at the weekend?

alexlynham09:05:15

serious weather chat here

Rachel Westmacott09:05:09

got a bit of sun with my family yesterday painting some new bits of fence in our garden

Rachel Westmacott09:05:45

my wife asked the kids (aged 3 and 5) what colour we should paint it - so it’s painted like a rainbow now

mario-star 12
🌈 4
alexlynham09:05:12

so apparently user research has its limits after all 😂

alexlynham09:05:37

but then I am a ronseal in brown kinda fence guy so ymmv 🙂

mccraigmccraig09:05:33

walkable looks interesting, thanks @danieleneal

bronsa09:05:27

morning o/

3Jane09:05:45

@mccraigmccraig (also not SQL as it happens, but) I’ve been kicking around ideas for a query scheduler / resolver, and joins are sensitive

3Jane09:05:21

instead of representing joined queries, I’ve got a more complicated structure where I can tag fields (in Clojure that would use keywords) and then decide on which fields can be joined

3Jane09:05:53

so I guess in case of query representation, it would not be represented as a single merged entity, but as two or more entities with indications of the attributes over which they are joined - sounds kinda graphy

3Jane09:05:11

another thing that’s come up for me when investigating joins was (and this is probably more important for scheduling/resolving, but throwing it out there since I don’t know what your ultimate usecase is) metadata, specifically around things like row counts, so that you can decide whether it’s even worth to join, or whether you should perform separate queries.

Rachel Westmacott09:05:07

isn’t that the kind of decision that a good DB query planner should be making for you?

mccraigmccraig09:05:00

@peterwestmacott even good query planners have their limits - postgres query planner deals with a single join at a time, whereas i want to do n joins in a single pass

mccraigmccraig09:05:11

also, my db doesn’t support joins at all without spark and spark is great but slow, so i’m doing my own joins

mccraigmccraig09:05:04

(obvs u can’t do n general joins in one pass, but if the joins are all in the same key you can)

maleghast09:05:11

Morning All 🙂

3Jane10:05:38

@peterwestmacott if all the queries go to the same datasource, it’s not a problem. But when you need to coordinate several datasources, which contain duplicate data and are not all of the same type, it gets a bit complicated 🙂

Rachel Westmacott10:05:04

ah, yes - then I guess you’d need to take a step back

3Jane10:05:04

(don’t write a database…. unless you need to write a database)

👍 8
3Jane11:05:38

Thanks! That looks like a good read 🙂

jasonbell10:05:56

Whoooooooooo Jade says BACK IN THE ROOM @agile_geek lovely to see you dude!

agile_geek10:05:18

@jasonbell W00t! So glad to see my sarcasm lives on in my absence Jade!

agile_geek10:05:40

Morning everyone

guy10:05:45

morning!

mccraigmccraig10:05:01

you been confined to a corporate bunker @agile_geek ?

mccraigmccraig10:05:08

haha, so you work for GCHQ now, which obvs you can't answer truthfully 😬

😂 4
👀 4
agile_geek10:05:13

Naw, Government won't have me anymore....too disruptive apparently!

agile_geek10:05:39

I'm in Leeds ATM (at least for next few months)

agile_geek10:05:46

I am inexorably making my self unwelcome in as many corporates as possible!

😂 12
agile_geek10:05:35

You know you're doing well when Govt depts desperate for ppl won't renew your contract!

kappa 4
danm10:05:02

@alex.lynham Went walking up Rivington Pike with the mutt and some friends, was great 😄

danm10:05:18

Took the SLR out for the first time in ages too, and then failed to use it in time when I saw a stoat

otfrom10:05:41

good to see you around again

guy10:05:52

is there a part one?

otfrom10:05:30

I was also going to ask @agile_geek if you've done the event storming design technique before as a part of that kind of method

alexlynham10:05:51

people are big on event storming here I think...

otfrom10:05:02

and :hugging_face:

otfrom10:05:30

I was also going to ask @agile_geek if you've done the event storming design technique before as a part of that kind of method

alexlynham10:05:53

> failed to use it in time when I saw a stoat I think we an all sympathise with that predicament

😂 4
agile_geek12:05:50

Thanks Thomas

alexlynham12:05:02

@agile_geek the second blog post in that series is chefs_kiss.gif

alexlynham12:05:21

the stuff on data/domain modelling particularly rings true

agile_geek12:05:02

@otfrom I haven’t had the chance to use event storming but I think it would work quite well.

agile_geek12:05:44

I must finish off part 4 of that series but I’m still thinking about what I want it to focus on.

agile_geek12:05:28

Also there’s some spin off blog posts I have in mind almost as footnotes or appendices to the main post thread

agile_geek12:05:10

I’m trying to turn it into a talk I can give at a conference my friend Fiona is helping organise in Newcastle in November.

agile_geek12:05:38

I find it interesting that you folks seem interested in my thoughts on architecture but my previous client didn’t renew my contract because of them!

mccraigmccraig12:05:51

what @agile_geek, they didn't like you having thoughts ?

😂 8
agile_geek12:05:13

@mccraigmccraig no they didn't like my thoughts not being group think

mccraigmccraig12:05:45

sounds like a doomed company @agile_geek, or a public service

3Jane12:05:29

some people don’t like it when their employees are smarter… and they remove competition

3Jane12:05:11

corporate politics are a separate skill 😞

agile_geek12:05:20

I think it's more that my torrence for corporate politics has decreased over the years. I just don't play the game anymore

alexlynham12:05:05

it is quite exhausting to swim upstream in a large org

flefik12:05:03

in my current role I have learned that possibly more important than being right and having the right idea is to introduce those changes at a pace that is compatible with the organisational structure. For example if you are working for an organiation that doesn't have version control, tests, CI/CD etc, you cannot go off an introduce all those things all at once at a high rate of change. Change has to be drop fed so as to get buy in from management, but most importantly from the team members themselves. Start by introducing git, then let that simmer for a week, stir in some linting, let the team adjust, then enforce pull requests etc.

💯 16
flefik12:05:37

You can't go full fascist on day one. For some organisations that may work, but in most places you slowly have to convert your coworkers over a period of say 3-6 months

3Jane12:05:44

^ getting fluent in a new workflow is a significant mental effort and makes a lot of experienced people feel stupid

3Jane12:05:04

so if you change too many things at once, it’s like giving an iPhone person an Android phone, or vice versa

3Jane12:05:15

Makes people panicky internally, thus generates a lot of resistance related to fear of failure, looking bad in front of others etc.

👍 4
alexlynham13:05:46

yeah if you've been repeating yourself for 6-8 months about fixing problems to lots of positive noise but little outcome it can become a bit wearying

alexlynham13:05:08

sorry, bit of a debbie downer this week, I always get morbid around my birthday

👍 8
guy13:05:27

Its cool, i think conversations like this can be useful

guy13:05:37

Its good insight into different working conditions and experiences

guy13:05:48

Also i’m 100% the same with my birthday 😂

danielneal13:05:30

birthdays are such a weird thing to celebrate

guy13:05:51

I guess its just an ancient tradition

guy13:05:31

Living long is expected now, but i guess a long time ago, life expectancy was much shorter so its celebrated?

3Jane13:05:35

Celebrations are about community. Birthdays are people showing you that they’re happy to have you with them.

alexlynham14:05:52

> Celebrations are about community. Birthdays are people showing you that they’re happy to have you with them. I know, I always feel like an absolute git because I always a) don't want to make a fuss & b) look at what I've achieved in the last year and get down

alexlynham14:05:05

I should probably just lighten up a bit 🙂

danielneal14:05:22

nah this is clojure-uk

danielneal14:05:35

if grumbling is welcome anywhere

otfrom14:05:40

at least my birthday isn't on xmas. (it is on 1 Jan tho)

😄 4
danielneal14:05:04

mine is xmas 🙂

3Jane15:05:20

how is this possible, you guys have 365 days of the year to choose from O.o

3Jane15:05:55

if it helps, I remember reading research showing people’s happiness and life satisfaction is highest at the start and end of life, but drops dramatically in adulthood

😱 4
3Jane15:05:11

so it’s normal to be grumpy

👍 4
3Jane15:05:23

…that’s what I tell myself when I look back on the previous year -.-

😄 4
3Jane15:05:55

❤️ the interactive tagging there @U08TUA46M XD

guy15:05:12

gotta make use of the threads!

rhinocratic15:05:53

Since I'm the wrong side of 50, my birthday no longer feels like cause for celebration. My friends and I therefore have a few drinks in honour of World Toilet Day, with which it coincides. :face_with_rolling_eyes:

🍻 8
🎉 8
😂 16
agile_geek13:05:13

Wasn't even that drastic. Everyone in project agreed with my tech solutions (I was tech arch). Issue was I didn't have 10 years of org specific knowledge of ppl and processes to navigate. I kept falling fowl of checkpoints because I hadn't talked/cadjoled/begged/ bribed the right ppl cos I didn't know the right ppl. Product owner dismissed me cos she needed someone who could do that. The role description and the actual job requirements were not aligned. No way anyone coming in new could do it in timescales.

😱 4
😔 4
thomas13:05:34

quite sad that an organisation expects that of people.

alexlynham14:05:37

was this a govt department or large org?

alexlynham14:05:52

sounds oddly familiar tho

alexlynham14:05:22

even if people agree with a call on a technical thing, you either don't have the mandate or the org knowledge to get it anywhere

flefik14:05:50

Mandates are rarely given. Just take it. 😄 It's easier to apologise than ask for permission.

alexlynham08:05:22

haha easier said than done - where you're dealing with e.g. servers in meatspace on a WAN you can't take what you want, you need permission. There's some things you can do with github and travis and a couple of AWS boxes but they're usually not the hard or the most painful things

alexlynham08:05:31

although, that's just my experience 🙂

flefik08:05:32

sure, there are obviously exceptions to the sentiment. But if you can use aws, or travis, then just go ahead and commission it.

agile_geek14:05:36

@cfeckardt lesson to learn if you’re a contractor….can’t apologise when they don’t renew your contract!

flefik14:05:00

Yeah, it doesn't really apply in that situation

flefik14:05:43

Typically as a contractor you're retained for one of two reasons, drive process change or churn out code.

flefik14:05:48

it's important to know which 🙂

agile_geek14:05:25

I was supposed to draw diagrams so that they could be shredded by 20+ self important people who couldn't Google CAP theorem let alone understand it!

picard-facepalm 4
agile_geek14:05:37

Not that I'm bitter

agile_geek15:05:43

You would think that after 11 years of consulting I would have learned…but as I said, my ‘BS’ tolerance has got lower in my old age.

flefik15:05:37

i feel you

maleghast15:05:47

@agile_geek - Amen, Brother...

maleghast15:05:58

Still, good to see you back in the channel 🙂

maleghast15:05:02

It would appear that Slack can't embed .webp so you've just gonna have to download it... 😉

yogidevbear16:05:15

Quick poll... Would anyone in this channel be interested in an online Clojure study group?

1️⃣ 16
👍 28
yogidevbear16:05:36

To clarify, I'm thinking from all levels of experience (e.g. beginners wanting to learn Clojure through to experienced Clojure devs willing to share their wealth of knowledge/experience)

yogidevbear16:05:29

For anyone that is interested, what sort of times would suit you best? Personally, 8:30pm onwards on a weekday would probably be my preferred option.

👌 8
👍 8
guy16:05:25

I think for me, as due to family reasons i barely have any time, i would be interested in seeing recordings on it too, and seeing what the outcomes were

guy16:05:43

So i could commit to like once a month rather than more than that if that makes sense

yogidevbear16:05:47

I am in a similar position. I'd envision this as being a monthly thing (maybe fortnightly at a stretch)

otfrom17:05:47

remote clojurians +/- 2 GMT?

👍 4
guy17:05:22

Ah i assumed 8pm BST

yogidevbear17:05:12

Yes, I'm thinking 8/8:30ish UK time. So BST currently

👌 12
maleghast18:05:48

I would definitely be interested but may have to come and go depending on when it happens...

👍 4
yogidevbear19:05:38

No hard commitments 🙂

3Jane16:05:08

I would be, but also in my previous experience (granted with human language study groups) “all levels” doesn’t work

yogidevbear16:05:37

I suppose if various topics were covered over the period of months, some would be expects in certain areas while others might be experts in different areas.

3Jane17:05:35

it’s not just that, but the level of cooperation possible.

3Jane17:05:58

as in, you can’t talk about which library to best use to solve the problem of … let’s say promises, if you’re talking to someone who still struggles to set up their project

3Jane17:05:58

(in language groups: you can’t practice language by having a conversation if one of the members is someone who can’t put together a sentence without a lot of “uhhhh” in between)

3Jane17:05:07

(I realise this may sound like a “I can’t be bothered to help beginners” impatient pushing; but my experience is actually as someone who was a beginner and didn’t really have a good way to work with a more advanced group in various contexts.)

yogidevbear17:05:21

All valid points

3Jane16:05:35

so it’d require a bit more discussion around how to organise things 🙂

👍 4
dominicm17:05:14

@yogidevbear how would such a thing look?

otfrom17:05:13

google meet?

otfrom17:05:17

(that can be recorded too)

sundarj17:05:59

the #virtual-clj-meetup uses http://crowdcast.io

yogidevbear17:05:14

Yes, was thinking along the lines of Google hangouts to start with

yogidevbear17:05:39

I like crowdcast but it's a minimum of $49/mo

yogidevbear17:05:52

Bit expensive for my personal pocket :)

sundarj17:05:07

ah, fair enough

yogidevbear17:05:44

Main issue with hangouts is it limits participants to 10 I think

guy17:05:07

Do u think we will get more than 10?

yogidevbear17:05:42

Probably not, but if we did then that's a good problem to have

guy17:05:48

true true

otfrom17:05:44

I think meet goes up to 20 or 25

otfrom17:05:49

happy to look at others

otfrom17:05:57

http://meet.google.com - the replacement for hangouts

yogidevbear17:05:19

Oh cool, I hadn't heard of that before 👍

yogidevbear17:05:21

Save time and money by having the team Meet, wherever they are in the world.

    - High-definition video meetings with up to 30* participants
    - Easy-access meetings – just share a link and anyone can join with one click
    - Every meeting has a dial-in number for team members who prefer to call in*
    - Integrates directly with Calendar, making it easy to see important meeting details and join instantly

    You can always Meet with teams via an invitation, but to enjoy the full capabilities you must use a G Suite-enabled account authorised to use Meet. If you are unsure about your account status, contact your G Suite domain administrator. Find more information at 

    *Available in G Suite Enterprise Edition

otfrom17:05:41

that's the one

otfrom17:05:48

might not be easy to use w/o a hosting acct

otfrom17:05:08

(i really don't care as long as I can participate from linux 😉 )

yogidevbear17:05:24

I've got access to a g-suite account so this could work well

dominicm18:05:24

Always worth looking for a slightly more privacy-sensitive option of course 🙂

yogidevbear17:05:05

But not sure if we'd get more than that to start with