Up to Main Index Up to Journal for July, 2019 JOURNAL FOR SUNDAY 28TH JULY, 2019 ______________________________________________________________________________ SUBJECT: A lack of inspiration DATE: Sun 28 Jul 19:40:31 BST 2019 It has been a slow week or so since I last wrote anything for the journal. Mainly because I had nothing much to say. Weather has been stupidly hot with temperatures going over 30°C. Anything over 22-23°C and it makes me very sluggish and tired all the time. Not ideal when trying to program. When I have been programming I've been writing tests for the existing PUT command before replacing the PUT command with a new implementation using the new matcher. I'm still unhappy with the current command tests. Commands are very high level and a lot goes on behind the scenes. Since realising I was trying to test the wrong things a while ago[1] things have improved somewhat. However the amount of code I've been writing for tests still seems disproportionate to the amount of code I am testing! Case in point: put.go 110 lines, put_test.go 300 lines and not finished yet. Code working? Yes✓ Do tests work and pass? Yes✓ Am I happy? No[2] :( *sigh* Because I'm unhappy with the code I just end up poking at it, making little progress, hoping for some flash of inspiration. I could just push testing to the side for now and work on something more fun, telling myself I'll come back to it later. That would be a lie, just postponing testing to probably never :( I've tried reading through the Go sources for inspiration, I've Googled, I've done a lot of reading — no inspiration yet. For now I'll just continue to plod on, hoping something will ignite that tiny spark I need. I have pushed out two minor changes to the public dev branch that dropped out of the tests for PUT. You can no longer PUT items 'into' another player. As players have an inventory they were treated as containers. This meant you could 'PUT <item> <player>' and the target player would have the item put into their inventory. At some point a GIVE command will be added that will ask the target player if they want to accept the item or not. The other change is a very minor tweak to the message emitted by the PUT command when you try putting an item inside itself. Now if only I could pull myself out of this fug I'm stuck in… -- Diddymus [1] Journal for Monday 10th June, 2019 - An update on WolfMUD & the importance of testing the right things: ../6/10.html [2] There are other reasons I'm not happy right now. The new generics proposal for Go[3], the way modules are being pushed. What happened to Java seems to be happening all over again. [3] Updated Go generics proposal: https://go.googlesource.com/proposal/+/master/design/go2draft-contracts.md Up to Main Index Up to Journal for July, 2019