Fork me on GitHub
#clojure-uk
<
2018-08-20
>
rhinocratic08:08:14

Took the plunge and quit the job on Friday. 😐 Seems I'm not going to be held to the 13-week notice period, which is good. In an odd kind of limbo at present!

🎉 8
👌 1
practicalli_john08:08:33

I also handed in my notice last week. Lets hope we both find a new and exciting challenge. Good luck.

rhinocratic09:08:45

Many thanks - here's hoping!

alexlynham08:08:20

what's your plan now?

rhinocratic08:08:12

Got one or two interviews in the offing, so hoping one of those comes up. Meanwhile, sending out more applications! I guess it's a high-risk strategy, but I felt as though I had to get out.

peterwestmacott08:08:25

Morning all! And I don’t think it’s a high risk strategy. Quality developers are in high demand.

agile_geek08:08:21

I'd qualify that.... Quality developers are in demand in certain locations

jasonbell08:08:57

@rhinocratic - best advice I got, upgrade your Linkedin to premium, even if it's for the 30 day trial.

3Jane10:08:44

Which parts of premium make it valuable?

1
jasonbell09:08:54

Contacting folk out of network for me. Better feedback on post performance and so on, drill down organisations on who's looking at posts. Basically I'm paying to have my ego stroked by professionals 🙂

3Jane09:08:05

Right, so I saw that people recommended premium for contacting people out of network, but you only get like 4 messages per month, don’t you?

3Jane09:08:11

That’s not really enough to have a conversation

3Jane09:08:27

And interesting that you mention post performance, I don’t know any techies that post on linkedin, I’m mostly seeing recruiters and HR people engaging it strongly

jasonbell10:08:50

I'm not using it in anger much at the moment except for post performance but that's really to do with something I'm launching later in the year.

jasonbell10:08:04

I'm probably not the best use case 🙂

3Jane10:08:52

> that’s really to do with something I’m launching later in the year. ohhhhh ears twitching

3Jane10:08:59

right, right 😄

jasonbell10:08:34

More later.... a little while.

peterwestmacott08:08:05

Plus there’s the risk of staying in a job that is bad for one’s mental state

👍 3
rhinocratic08:08:08

@jasonbell I'd need to reactivate my LinkedIn - I deleted my account about 8 months ago!

jasonbell08:08:15

@rhinocratic And there's #jobs and #remote-jobs on here too

👍 2
rhinocratic08:08:42

Thanks - I keep a close eye on those!

jasonbell08:08:43

There's a supply/demand issue right now so i) work it to your advantage, three month period is actually good strategy and ii) Linkedin is worth being back on, so many quality leads in a short space of time.

👍 1
Conor08:08:18

Noted death cult Linkedin gives me a lot of useless approaches from recruiters, but also some good ones

rhinocratic08:08:37

I found that the ratio was less favourable - I didn't feel that I was getting any value from it at all. However, in my case it's probably worth being on there at present!

Conor08:08:32

I'd say the ratio is 9:1

👍 1
firthh08:08:36

If you're looking for Clojure jobs I'm sure there are people in this channel that can refer you to places. There's always the usual crowd of places that are looking for people

👍 1
jasonbell08:08:25

Functional Works have a good selection.

👍 1
rhinocratic08:08:39

Thank you - got an application in with them - waiting to hear!

guy08:08:19

Morning all!

danm08:08:06

I found the quality and level of the recruiter spam I got went up significantly after my Kafka Summit talk went up online, which is interesting as it implies some of them are aware of it...

danm08:08:17

I don't think I even linked it on there

guy08:08:24

Probs just google

practicalli_john08:08:02

Morning. If anyone loves Emacs AND Vim (or wants to learn to love them) then I have a workshop on Tuesday night at SkillsMatter. Details on the London Clojurians meetup https://www.meetup.com/London-Clojurians/

dominicm09:08:00

That isn't vim!

practicalli_john10:08:52

I guess Vim means Vim

maleghast10:08:16

I'm coming, John 🙂

agile_geek10:08:23

That's just 'evil'....especially when I'm trying to be 'holy'

practicalli_john11:08:56

Its all ed in the end 🙂

danm10:08:47

Ahoy

1
maleghast10:08:55

Morning All 🙂

maleghast11:08:09

Has anyone "out there" done an image upload with Yada..? I am getting the rawdata from the context (finally), but it's very definitely corrupted - I compare the version of the file that's been through the upload with the original and they are very different, and it seems__ to be a character encoding thing, but I am not sure...

maleghast11:08:03

Anyway, I was wondering if anyone has done specifically image upload and could maybe tell me what godawful n00b thing I am doing to have the file be corrupted in this way?

mccraigmccraig11:08:39

are you specifying :raw-stream? when setting up your webserver ?

maleghast11:08:54

The uploaded version of the image file is full of little question marks inside diamonds instead of the proper content...

maleghast11:08:35

(I'm using Edge, so the webserver is pretty much as it is out of the box in Edge)

maleghast11:08:09

Or is that something that I need to specify on the Yada Resource that is handling the upload?

maleghast11:08:34

yep, that's the one

mccraigmccraig11:08:35

and there is no :raw-stream? true alongside :port

maleghast11:08:18

no there is not, but I could add it...

mccraigmccraig11:08:18

is there any reason why :raw-stream? true isn't specified by default @malcolmsparks @dominicm? or is is defaulted elsewhere now?

maleghast11:08:19

Adding it and restarting has not made any difference to the outcome though...

mccraigmccraig11:08:44

there's nothing fundamentally wrong with yada's upload capability - we are uploading document, picture and video files of many megabytes in size without issue - but it will be difficult for me to help you, because we are using custom yada.multipart.PartConsumer and yada.multipart.Partial implementations

mccraigmccraig11:08:17

(iirc because when we implemented upload suitable implementations didn't yet exist)

maleghast11:08:51

@mccraigmccraig - Ah, right... No worries then, but thanks anyway

maleghast11:08:41

It is clear to me that if I compare the contents of the jpg in question (in vim, just comparing it visually), before and after upload, that something horrible is happening to the file in transit.

maleghast11:08:32

I just don't know what...

maleghast11:08:30

Anyone else have any thoughts as to why my image file would be being corrupted in transit using Yada to handle the upload?

3Jane11:08:18

have not used yada, but in cases like that, I’d check that for example the file is not being read (before transmit) as a text file rather than binary file

rhinocratic11:08:25

When you say "something horrible", is the result of the same dimensions and/or file size? Does it just look like noise?

maleghast11:08:19

@rhinocratic - noise, and the file is no longer recognised as as Jpeg by imagemagick or GIMP

maleghast11:08:36

@lady3janepl - I am using the JavaScript dataTransfer API that should just pass on a file location to the browser, so it should be automatically treated as a binary file, if I have understood this correctly..?

maleghast13:08:26

OK, so I have almost sorted it out... @lady3janepl made me re-evealuate and I realised that the dumb n00b thing I was doing was using (spit ...) which ONLY works on strings... I am using http://clojure.java.io/output-stream now, which is much better, but there is one last wrinkle... I need to remove the following:

Content-Disposition: form-data; name="file"; filename="Ciny_Pots_I_annotated.jpg"^M
Content-Type: image/jpeg^M
^M
from the byte-array before I write it to file...

maleghast13:08:40

Anyone have any ideas on how to do that..?

3Jane13:08:25

out of curiosity, are you always expecting it to contain Content-Type: image/jpeg or will you be allowing varied content?

maleghast13:08:39

I am going to allow all web-supported image types

maleghast13:08:03

(hence accept="image/*" in the form)

maleghast13:08:13

I am pretty sure that I know what the offset is for the byte-array, I just need to figure it all out, which means getting to grips with Java Byte Arrays in Clojure...

peterwestmacott13:08:24

I know I’m late to this particular party, but did you try #yada?

mccraigmccraig13:08:28

uh, why are you having to strip http headers @maleghast?

maleghast13:08:08

@peterwestmacott - yeah, there's not really anyone in there at the moment, as far as I can tell...

peterwestmacott13:08:02

yeah I used to lurk there a bit, but I haven’t checked it in ages

maleghast13:08:13

When Malcolm is online he is often in there, but he is showing as offline at the moment.

maleghast13:08:35

@mccraigmccraig - well 'cos they are there in the byte-array I get out of the Yada request context's :body

maleghast13:08:01

(:bytes (get (:body ctx) "file")

maleghast13:08:42

in my let binding, gets me the byte-array of the upload, but those three lines above ^^ are tacked onto the head / front of the byte-array

mccraigmccraig13:08:24

hmm. that's not how we do file-uploads at all

mccraigmccraig13:08:51

that requires you to have the whole file in-memory

maleghast13:08:05

Yes, I suppose that it does

mccraigmccraig13:08:22

hold on... i'll get you some code

maleghast13:08:29

er ok, thx 🙂

mccraigmccraig13:08:29

ok, here's the bulk of the implementation - the PartConsumer and Partial

mccraigmccraig13:08:57

and here's a yada resource which uses it:

mccraigmccraig13:08:43

you end up with a java.io.File object in your request map

maleghast13:08:49

Hold on a sec - need to open some browser tabs...

mccraigmccraig13:08:37

that impl stores the upload in a tempfile and gives you the java.io.File for the tempfile @maleghast... which is crude but effective. you could do something smarter and directly stream the upload to your final destination (e.g. S3 etc) bypassing any local storage, but we've not gotten around to doing that yet

maleghast13:08:52

There is something in there that tells me how to do what I want, in this case (as I don't mind having all of some small image files in memory one at a time...)

mccraigmccraig13:08:52

warning: there may well be simpler and more idiomatic ways to do this in yada now - that upload code was written many yada versions ago

maleghast13:08:53

I have GOT IT, thanks to something in your code...

maleghast13:08:13

(I was unaware of the other options I could pass to (.write ...) )

mccraigmccraig13:08:32

oh, the :body-offset used in create-tempfile-partial

maleghast13:08:51

I'll talk to @malcolmsparks at some point, to see if there are better ways now that Yada has moved on, but for now, this works!

rickmoynihan16:08:04

@maleghast: sorry just catching up on some slack… We had a great response to this job advert I wrote (with tweaks/suggestions from others in our team too): https://medium.swirrl.com/swirrl-is-hiring-ed456c08b78b We spent a lot of time trying to get the wording right. In particular I wanted to avoid making out that we’re smarter than the candidate, and avoid all the macho-bs stuff, or rule out otherwise good candidates who missed something “essential”.

👍 1
rickmoynihan16:08:29

not claiming its anything like perfect; but I had similar thoughts to those you mentioned on job ads.

maleghast17:08:46

@rickmoynihan - Thanks very much indeed; I will have a look now 🙂

seancorfield21:08:31

@rickmoynihan That's a great job posting! The narrative feels a little bit repetitive in the first section but that's a minor nit -- overall the message is awesome and it covers a lot of ground. It would inspire me to apply if I was UK-based and happy to relocate to Manchester!

rickmoynihan21:08:27

Thanks. We’ve hired 4 people and a contractor off the back of it. 3 of them women, all a very high standard. I know what you mean regarding the repetition, but the first sentence was added as a TLDR summary; if you drop that does it still feel repetitive?

seancorfield08:08:00

No, but I understand why the opening sentence was added.