ldnclj

Find us on #clojure-uk
thomas 2015-11-24T08:24:47.000157Z

morning

agile_geek 2015-11-24T08:49:37.000158Z

Ay up!

agile_geek 2015-11-24T08:52:00.000159Z

Discussion of the day: I like the idea of property based and generative testing but as most of my work involves manipulating data in to different shapes rather than calculating anything I’m unconvinced that it helps me that much. What are other ppl’s thoughts on good use cases for generative and/or property based testing?

agile_geek 2015-11-24T08:54:07.000160Z

P.S. I have an ulterior motive as I’m thinking of putting together a presentation on the subject for the FP North East user group.

maleghast 2015-11-24T09:29:20.000161Z

Morning (for you) @agile_geek :simple_smile: I can see your dilemma - honestly it’s an area of testing that I’ve never really gotten into either, so I am a little lacking in opinions, but I am interested in what others may bring...

jamiei 2015-11-24T09:34:12.000162Z

Morning

mccraigmccraig 2015-11-24T10:08:19.000163Z

@agile_geek: can't different shape combinations also be generated ? i.e. can you not used generative testing to find shapes which trigger buggy paths through your code ?

maleghast 2015-11-24T10:11:28.000164Z

raises eyebrow @mccraigmccraig: That sounds like an interesting possibility that had not even occurred to me

mccraigmccraig 2015-11-24T10:12:47.000165Z

@maleghast: disclaimer - ianagtu (i am not a generative test user) - so i may be talking through my hat

maleghast 2015-11-24T10:13:35.000166Z

Fair point, but it’s an interesting idea

maleghast 2015-11-24T10:13:36.000167Z

:simple_smile:

agile_geek 2015-11-24T10:14:27.000168Z

@mccraigmccraig: I’m sure they can but I’m not sure I see how.

agile_geek 2015-11-24T10:15:31.000169Z

You can definitely use generators to create data structures with random strings, numbers etc. in the shape you require.

agile_geek 2015-11-24T10:16:30.000171Z

I guess the bit I struggle with is what to assert. Other than an expected schema…and I have schema for that.

tcrayford 2015-11-24T10:22:35.000172Z

Hi

tcrayford 2015-11-24T10:22:53.000173Z

@agile_geek: Yeller uses test.check extensively

mccraigmccraig 2015-11-24T10:22:57.000174Z

@agile_geek: presumably you would want to generate input shapes to your transformation, and then schema-check the outputs ?

agile_geek 2015-11-24T10:23:24.000175Z

@mccraigmccraig: I guess so

tcrayford 2015-11-24T10:23:25.000176Z

I can't imagine using example based tests for that much these days :/

agile_geek 2015-11-24T10:24:02.000177Z

@tcrayford: Is your code base open source?

tcrayford 2015-11-24T10:24:08.000178Z

No ;)

tcrayford 2015-11-24T10:24:15.000179Z

Commercial product ;)

agile_geek 2015-11-24T10:25:03.000180Z

@tcrayford: I wonder if you’d mind sharing an example? Feel free to simplify or obfuscate.

tcrayford 2015-11-24T10:25:19.000181Z

I wrote some stuff about test.check a few times: http://yellerapp.com/posts/2015-04-13-effective-test-check.html http://yellerapp.com/posts/2014-05-08-testing-riak.html

agile_geek 2015-11-24T10:25:45.000182Z

@tcrayford: cool. I’ll check them out when I get chance.

tcrayford 2015-11-24T10:25:46.000183Z

Sure

agile_geek 2015-11-24T10:26:10.000184Z

@tcrayford: BTW are you coming to ClojureX?

tcrayford 2015-11-24T10:26:29.000185Z

Yeller has a very high level test which throws a set of generated messages at the system, then checks the count of messages after loading them all is correct.

tcrayford 2015-11-24T10:26:42.000186Z

Sadly I don't think I can make ClojureX this year

agile_geek 2015-11-24T10:27:36.000188Z

Shame. I wouldn’t have minded a chat over coffee about this.

tcrayford 2015-11-24T10:27:41.000189Z

That test has caught a bunch of "aww shit I dropped messages somehow" way before hitting production

tcrayford 2015-11-24T10:27:47.000190Z

Yeah, me too :/

tcrayford 2015-11-24T10:28:09.000191Z

It really does depend on your domain though

tcrayford 2015-11-24T10:28:26.000192Z

I'd highly recommend John Hughes talk from Clojure West

agile_geek 2015-11-24T10:28:27.000193Z

@tcrayford: nice example. Food for thought

agile_geek 2015-11-24T10:28:38.000194Z

I’ll check that out too

tcrayford 2015-11-24T10:29:42.000195Z

Other classic things: serialization round tripping is the easiest and most obvious thing

tcrayford 2015-11-24T10:30:04.000196Z

Given that most systems use JSON or Transit or something like that to communicate with clients

tcrayford 2015-11-24T10:30:33.000197Z

Generate values, serialize them then deserialize them, assert that the deserialized value is the same as the original one

tcrayford 2015-11-24T10:32:56.000198Z

For Yeller, literally everything I put in storage or send or receive over the wire has a serialization roundtrip test

pupeno 2015-11-24T12:12:39.000199Z

Good morning.

maleghast 2015-11-24T12:25:05.000200Z

Hello :simple_smile:

jamiei 2015-11-24T14:58:06.000201Z

Did anyone see this? http://priceonomics.com/stack-overflow-and-the-zeitgeist-of-computer/ or specifically this graph: http://pix-media.s3.amazonaws.com/blog/1069/image03.png

jamiei 2015-11-24T14:58:21.000203Z

Which puts Clojure in the "Losing steam on SO" graph.

jamiei 2015-11-24T14:59:01.000204Z

I wonder if October last year was particularly busy for questions, or if there is a general trend to be looked it in Clojure

mccraigmccraig 2015-11-24T15:04:38.000205Z

@jamiei: it's very difficult to interpret that chart, i.e. what can be inferred from "losing steam"... off the top of my head splitting of topics (e.g. [clojure] -> [clojure,clojurescript]), release of new versions and consequent issue spikes may affect the numbers greatly

jamiei 2015-11-24T15:09:17.000206Z

Indeed

jamiei 2015-11-24T15:09:21.000207Z

"it's important to note that tags losing steam on Stack Overflow is not necessarily indicative of people losing interest. It might just be that the questions regarding smaller topic areas get saturated and there are no more questions that need to be asked."

jamiei 2015-11-24T15:09:29.000208Z

or split as you say

agile_geek 2015-11-24T15:14:24.000209Z

Also how much does this very forum reduce the number of stack overflow questions?

agile_geek 2015-11-24T15:14:52.000210Z

I don’t ask on Stack Overflow any more … I ask here. Usually of the library authors directly!

agile_geek 2015-11-24T15:25:41.000211Z

Another interesting measurement to take would be how much time I spend being distracted by this Slack team instead of doing work in JavaLand for my client….or perhaps I better not look under that rock!

jamiei 2015-11-24T15:40:00.000213Z

You were joking, right? You are actually still online :simple_smile:

jamiei 2015-11-24T15:45:29.000214Z

Apparently not..

agile_geek 2015-11-24T17:08:51.000215Z

@jamiei: I am but I am trying to focus on what I’m paid to do for a change! 😉

korny 2015-11-24T19:03:55.000216Z

morning

korny 2015-11-24T19:04:25.000217Z

just checking, anyone here going to the clojure dojo @ TW tonight? We had a number of people accept, but very few arrive...

korny 2015-11-24T19:04:44.000218Z

there’s a big talk happening in the other half of the office, suspect some folks might have gotten lost