Fork me on GitHub
#off-topic
<
2020-05-25
>
dpsutton01:05:31

spam in announcements

dorab01:05:03

Oops. Sorry about the spam. That was an accident. I've deleted. Thanks for mentioning it.

πŸ‘ 8
dpsutton02:05:58

bit by any? 😞

gklijs06:05:48

I might try out VSCode some day soon as well. IntelliJ seems more bloated with each release. Up to the point that it's really slowing me down, but haven't used another IDE for years.

solf09:05:51

I want to try a new (at least to me) approach to refactor a code base. Main problems are long functions that should be broken down, a few global variables used everywhere, and most of all complete lack of tests. It's a difficult task when I don't even know what are the input/output of most functions, so I thought I would: - "spy" all the functions in the problematic namespaces, so they would write their inputs/outputs somewhere - run the server, simulate normal interactions with it - generate a first version of tests from those logged inputs/outputs - then start improving the tests manually This is so I have at least some kind of safety net when doing refactoring, as well as try to understand better the shape of the data being passed along. Thoughts?

vemv11:05:57

Sounds nice to me! > - "spy" all the functions in the problematic namespaces, so they would write their inputs/outputs somewhere If that helps, you can hijack the :pre/:post mechanism for that: :post [(do (log! %) true)] Maybe I'd defer then start improving the tests manually till the defn splitting is done. Else you risk refinining coarse defns that don't really represent the final desired status

vemv12:05:05

Relatedly you can use :pre/:post for their more usual purpose as well. This way you have an 'inline test' run at all times. So that you don't have to maintain a bunch of test ns'es in sync At the same time you can write high-level acceptance tests, independent of the number/shape of defns. That way you exercise those pre/posts

solf12:05:28

Thanks for the ideas. I haven't used :pre/:post yet, I'll give them a try

✌️ 4
dazld15:05:32

there's an excellent spy library for clojure: https://github.com/alexanderjamesking/spy

orestis18:05:35

Jose Valim (creator of Elixir) just announced this: https://bytepack.io/

πŸ‘ 4
orestis18:05:45

Essentially you can use that platform to sell a software library. Consume it via normal tooling (npm, maven, etc). Seems like it’s not launched yet but seems useful.

πŸ‘€ 12
πŸ‘ 12
borkdude18:05:42

Interesting