Hisham boosted
Hisham boosted

@garbados @Elizafox the democratically elected president was overthrown in Brazil in 2016... talk about a year that never ended

0
2

@juliobiason I like this description. We're clearly not there yet, our tests are still very "concrete" (e.g. we "mock" the luarocks.org server by running an HTTP server on localhost that gives some predefined answers, but the actual luarocks code being tested uses real sockets)

0
0

@juliobiason I lke this notion of "program behavior" vs "architecture adherence".

As much as I prefer testing behavior, I end up seeing value in tests as checkers for architecture adherence for the sad reason that I'm using a dynamically-typed language. I get the feeling that writing in Lua or Python, we end up relying on tests for things that we would otherwise use types for.

0
0

@juliobiason I think that's why I went originally with 100% blackbox integration testing. luarocks is a CLI tool, so I was only testing code that could be exercised "from the outside", launching the tool. (This actually did expose dead code that was impossible to trigger, matching what you mean by "excess code"). but it makes the testsuite a pain to use, which reduces its value. I'm trying to find a sweet spot, and it's not at all obvious.

0
0

@juliobiason case in point: the LuaRocks test suite had like 83% coverage doing blackbox integration tests alone. side effect: the suite is super slow because in some cases it forks a program and runs a lot of code just to cover a single line.

I don't know where to draw the line in replacing these integration tests with unit tests.

0
0

@juliobiason example of question:

for example, all right, unit tests test a single function, ok.

so a unit test for the function main() is essentially an integration test? :D

(joke aside, there are functions that are entrypoints for a ton of functionality, e.g. the luarocks install() function — where to draw the line between unit and integration there, avoid test duplication, avoid blind spots?)

0
0

@juliobiason not sure I'm disciplined enough for full-on TDD but tests have become central to my workflow enough so that I'm starting to have some beginner-philosophical questions about it and I figure people must have thought of things through already so I better not spend time reinventing the wheel.

0
0

what is a good (and hopefully entertaining) book about software testing?

1
0

@GetTogetherComm white on dark. better readability, box borders look outdated

0
1

Good morning.

I just had a dream where I had to type a number but NumLock was off and I got garbage in my terminal instead.

Even in my sleep.

EVEN IN MY SLEEP.

19
32

@RyuKurisu (my Mastodon TL has also been too hung up on Mastodon drama lately, too)

0
1

@RyuKurisu that's not the problem: it's that there's a lot of interesting people there who I also want to follow

0
1

I've been using Twitter semi-regularly again. I feel guilty.

0
0

A silly little thing which improves code ergonomics — when making lists of repeated entries, make pyramids:

hisham.hm/2018/06/16/when-list

2
3

5,000 Icelanders are in the stadium watching the game. If the equivalent percentage of the Brazilian population were in a stadium watching a game, that would amount to roughly the entire population of Uruguay (give or take the entire population of Iceland)

1
4
Show more
Mastodon

Follow friends and discover new ones. Publish anything you want: links, pictures, text, video. This server is run by the main developers of the Mastodon project. Everyone is welcome as long as you follow our code of conduct!