Fork me on GitHub

is there a 'standard process' for 'writing code' vs 'writing test' ? I find myself constantly ping ponging in between the two: "write code" too much ==> bugs hard to debug, find myself suddenly writing lots of tests "write tests" too much ==> end up testing lots of trivial things that don't really guide code towards what needs to be done


What I have found myself doing is, every time I get a fn pretty well done, I will throw a few #_ed forms under it to send to the repl, just to kick the tires/validate assertions about edge cases (“what if you get an empty string for params?“)


Now, what usually becomes of those is that they get a pretty little filigree of ;; TODO: deftest these! on the top and then they sit there forever


but if I were a better engineer those would become my tests, and that cadence of pausing to validate my own understanding of behavior and edge cases with direct execution of the thing I just wrote (which may well be calling other things I wrote and similarly “tested” earlier) after every fn or so of work, I find to be a good balance


I’m always thinking about the shape of data and edge cases of the thing I’m doing now, so I don’t run too high a risk of going off into the weeds


setting up an are test with some inputs to outputs and then making the function is really nice sometimes


as a side note, I just had a chat with the slack support asking them if there was some way to support a community of our size with some kind of plan that would involve an increase in the chat history (...just struck out on finding the answer to a question I posted a few months back...getting senile I guess). The rep was quite impressed with our size (quote: "wow"!) and said that we were a fantastic use case for slack. He also said they were discussing "community paid plans" but that at the current time nothing suitable was available... :[


also said he would bring the request up the chain...for whatever it's worth


@mikeholmesuk You don't think that passing the username/pass as part of the connection string in Clarango is a security issue?


@mbjarland That's a good topic for #community-development if anyone wants to dig in deeper. I'll just note that the main Kotlin Slack is even bigger than ours -- I'm not sure whether there's an "official" max size or not at this point.


@seancorfield ok good to know, will move the comment there.