Fork me on GitHub
#clojure-uk
<
2016-05-27
>
agile_geek06:05:10

I haven't used expectations but it looks promising especially the better error messages. Also it looked we easier to read, and as I feel automated tests are one of the more reliable forms of documentation, that's important.

agile_geek06:05:19

I've blogged about test.check and stateful-check and I can see both being very useful for generative (property based) tests. However, like all tests, they need investment of time and thought. I feel that investment pays off in better understanding of the problem and support when making inevitable changes.

agile_geek06:05:45

Testing, like clean coding, is completely misunderstood by most managers (and even more lamentably lots of devs). They don't realise that investment in the right techniques applied at the right level leads to faster progress in anything except the smallest throw away prototype (and even then I add tests as over half the prototypes I've been involved with shipped)

agile_geek06:05:36

I've seen a lot of contradictory studies around the impact of tests, particularly TDD. There's nothing definitive but there's evidence that tests speed up, slowdown and have no impact on development times, depending on the study, and in one I read I saw all 3 in sane study.

agile_geek06:05:46

However, there is better evidence that they reduce bug density in production.

agile_geek06:05:21

I've not seen anything that talks about whether systems constructed using tests as a guide (whether it's test first, TDD or even test after but before change) are easier/faster/cheaper to change. I'd like to see studies on that.

agile_geek06:05:49

Anecdotally I've experienced automated testing support faster refactoring to introduce new requirements late in a project without edit and pray syndrome. Also I've onboarded new developers with little support by simply piloting them to the tests.

agile_geek06:05:27

Phew... That's a lot of brain dump for this early in morning!

martintrojer07:05:11

all automated checking help prevent mistakes

mccraigmccraig07:05:41

@yogidevbear: i've used midje quite a lot in the past, and spent quite a lot of time fighting its dsl and finding weird macro edge cases. currently i'm just using clojure.test

quentin08:05:27

I'm still a newbie when it comes to testing. But I think that until you are in a situation where you realize tests are making your life much easier (not just the small demo that shows how to do testing/tdd/whatever test flavour) it's hard to get it right

glenjamin08:05:01

at Uni almost every project is a few months long, and started from scratch

glenjamin08:05:13

and as the incoming requirements are artificial, they don’t change much

glenjamin08:05:51

IME the biggest advantage of good automated tests is verifying that behaviour isn’t regressed unintentionally when making an unrelated change

glenjamin08:05:14

and making an unrelated change and worrying about regression pretty much never happens in a university setting

thomas08:05:19

+1 on all the testing talk.

thomas08:05:57

I have only used Midje so far. but only little tests, nothing too fancy.

martintrojer08:05:13

I've yet to come across anybody who have used Midje and still likes it.

agile_geek08:05:33

I've used Midje a fair bit but all my projects are 'toy'. I don't dislike it but I've migrated back to clojure.test and I can't put my finger on why exactly. I think tool support and lowest common denominator are probably the factors. However, I think clojure.test is the least readable IMHO.

glenjamin08:05:41

i really like having autotest+growl, and then I treat “save” as my “run all tests” button

agile_geek08:05:25

autotest in CIDER is quite nice.

glenjamin08:05:29

I was comparing notes with colleague recently, who doesn’t like that approach, and we think it might be because she’s used to saving continuously - even when stuff doesn’t work

glenjamin08:05:07

there’s a lein autoexpect which has growl support

agile_geek08:05:26

Last time I tried Expressions I found the expression mode in emacs didn't seem to work. Not sure if that's been fixed.

glenjamin08:05:03

One of the things I like about using “save” as the trigger is that you can easily trigger lots of tools off the same action, and it’s editor agnostic 🙂

minimal10:05:42

I’ve spent far too much time trying to get it to do my bidding

minimal10:05:49

I liked it at the start for testing small pure functions but in a big project I just ended up spending all day trying to get its strange macro do do what I want

minimal10:05:56

And it has loads of features that seem to overlap and the docs don’t really tell you which ones you should actually use

minimal10:05:55

Expectations is my favourite but I often end up using clojure.test because of tooling support and it’s easier to use with test.check

thomas14:05:04

clj CLojure O’Clock!!! clj

malcolmsparks14:05:48

Drinks in Camden tonight if anyone is around.

agile_geek15:05:05

@malcolmsparks: 300 miles away otherwise you wouldn't be able to stop me!

benedek15:05:35

anybody here who knows how to run an inlein script on windows?

agile_geek15:05:27

@malcolmsparks: what travel every week? Got to admit I'm getting tired of it but I get lots of learning done on train! This week I travelled home on Wed and I was at Sunderland Uni yesterday so WFH today.

thomas15:05:21

@quentin: parinfer is really cool. one trick to know is that indenting matters. but once you know that it works really well

thomas15:05:49

@malcolmsparks: I am only 60 odd miles away… but still can’t make it 😞

benedek15:05:01

hehe, solved. you need rename the inlein to inlein.bat obviously 😉 sry for the noise

agile_geek15:05:46

@benedek: obviously. Don't you just live Windows...just remember..don't click on any red crosses!

malcolmsparks16:05:26

But surely Microsoft aren't forcing you to upgrade! You can undo your misintended red cross click by simply modifying the registry...

benedek16:05:27

haha, tbh i wrote this nice little script and gave a try to inlein which i really liked. the only tight spot was making it run on my colleague’s win machine

benedek16:05:06

i am lucky enough not to see a win machine for more than 5 years now i think

benedek16:05:29

not true i wrote some excel macros few months back 👿

agile_geek16:05:04

Unfortunately I have to work on Windows 7 machine locked down so I can't install anything, can't connect to public wifi, access internet through a firewall that won't let me browse github or read 90% of the technical blogs I need to reference.... Now you know why I bring my own laptop in with me and connect that to public wifi otherwise I would not be able to communicate with you good people. 😉

benedek16:05:10

actually borrowed a really old win laptop for it

benedek16:05:44

sounds like some financial institution @agile_geek 😉

dharrigan16:05:17

The only windows I use are the ones you look out of.

dharrigan16:05:36

or, the only way to run windows is within a [vm] window

benedek16:05:04

yeah indeed. use this pretty awesome browser stack service when have to test something on IE now and then

benedek16:05:13

feels like a windows confession this 😉

thomas16:05:25

@agile_geek: does the company in case really think it is adding value doing things that way?

agile_geek16:05:39

@benedek: they have an odd perception of risk. Lock everything down so that every developer wastes at least 4 weeks of the year raising tickets to install and unlock stuff

agile_geek16:05:37

Spin up 50 teams where one would do, write millions of lines of untested code that is unstructured and contains massive duplication

thomas16:05:38

@agile_geek: I hope they pay you really well for that? 💰

thomas16:05:29

@agile_geek: if the company in question spins up 50 teams, surely a (range 1 5) man team can deliver the same functionality in less time with some Clojure?

benedek16:05:06

testing is overrated btw 😉

benedek16:05:10

inlein script runs on win uploading stuff to s3 and writing in a db too 🎉

benedek16:05:20

time for some 🍻 i guess 😉

benedek16:05:15

see some of you at camden hopefully? 😉

benedek16:05:10

it tells me if it fails and i escape forward @thomas 😉

benedek16:05:19

well not always tbh. depends on the context a lot

benedek16:05:36

for clj-refactor/cider stuff i am all for rigorous testing

agile_geek16:05:01

@thomas: same company could deliver same functionality in existing lang (Java) with 10 teams! Less is more! Could do it in Clojure with 3-4!

agile_geek16:05:30

Mind it would help if 90% of developers knew what SRP was or even what delegation is!

agile_geek16:05:55

Actually had to explain what a method was to one of them!

quentin17:05:29

@malcolmsparks: when/where in camden?

quentin17:05:51

I live 20min walking from camden 🙂