Up to Main Index                         Up to Journal for September, 2016

                   JOURNAL FOR MONDAY 26TH SEPTEMBER, 2016
______________________________________________________________________________

SUBJECT: What is a change?
   DATE: Mon 26 Sep 21:57:10 BST 2016

I often say in the journal that I'm working on changes or making changes.
Recently I was asked what do I mean by 'changes' - what goes into a 'change'.

Hrm, interesting and worth a little pondering before answering.

A single change for me is the following sequence of events:


  1. Edit source file
  2. Save file
  3. Sources automatically recompiled on saving
  4. If there are errors go to step 1 and fix them
  5. Start - or restart - the server
  6. Log into the server as a player
  7. Test change
  8. If there are errors go to step 1 and fix them
  9. Commit change into Git


This is a standard edit/compile/debug cycle.

Steps 2 and 3 are really quick with Go - a second or less. Sometimes steps 6
and 7 can take the longest - especially now when I'm writing the code to
create new accounts as I have to keep going through the creation process every
time I test.

The above steps are repeated over and over again for as many times as I can
fit into a coding session. This is how WolfMUD is developed. One change at a
time, endless iterations of the above cycle...

Usually I have four terminals open. The main terminal runs Vim for editing
files. The second terminal runs a script watching for changed files and
recompiles them automatically - this terminal also shows any compilation
errors. The third terminal is for running the server. The fourth and final
terminal is for running TELNET to log into the server for testing.

Here is a screenshot of how I develop: development.png

Yes, my screen is only 1280x1024 pixels. Yes, my screen is mostly a nice
soothing amber/gold on black. The window manager is a customized version of
DWM[1], terminal is XTerm and the shell is Bash[2]. For Vim I only use sparse
syntax highlighting and a manual hook to run 'go fmt' on the source I'm
editing. Git I mostly use just from the command line. Unless I'm browsing
commits or changes I've made, then I sometimes use tig[3] which is a text mode
Git interface.

That's my setup. Basic, a bit boring - no distractions - and lightning fast :)

What 'changes' have been made since my last entry?

I've mostly been cleaning up the account and player creation code. I've got a
few corner cases I'm fixing. For example when two players try to create an
account with the same Account ID at the same time. I still haven't push the
changes out yet as I'd like to get them right first. I've also been tweaking
the player data files again.

--
Diddymus

  [1] DWM see: https://dwm.suckless.org

  [2] Grumpy with Bash at the moment as readline (vi mode) seems a bit iffy
      since the upgrade to Bash 4.4. Ctrl-W to delete previous word does not
      always work and the word delimiters seem to have changed also. However I
      haven't had the time to dig into it yet.

  [3] Tig on GitHub: https://github.com/jonas/tig


  Up to Main Index                         Up to Journal for September, 2016