Show newer

@GuerillaOntologist bees being bees. I think it is pretty. They will also do that if you don't have an inner cover and violate "bee space" between the cover and the top of the frames. <3/8" they fill it with propolis >3/8" they fill it with comb. :)

@sir True, because there is no way you could have 100% coverage with a single test!

Unit tests are useless if they are done wrong. If you don't have 100% coverage in well written and tested tests, then when they pass you know nothing. So they lend no confidence. If you have 100% coverage and they pass then you know you haven't broken anything.

@Wolf480pl@niu.moe @sir

Test First
Test Early
Test Often

Huzzah!

@sir I disagree. But I am not interested in changing your mind. :)

This is for python, but could be easily tweaked for any other development system.

Your suggestions and opinions are appreciated.

If you like to do code kata and you like to use Vim, here is a script that will create your 2 starter files (<kataname>.py and test_<kataname>.py)

#!/bin/sh
#
# kata, a script for starting up a new kata exercise
#
# Given a name for the kata the script will create 2
# files. One with the same name as the kata with '.py'
# extension added to the end and another named 'test_'
# followed by the kata name and '.py' extension. It will
# be opened in a 3 window layout of Vim with a vertical
# terminal to the left in which you can run 'pytest' or
# 'python -m unittest' or whatever appropriate runner
# you use.
#
# If these files don't alreay exist they will be created
# with an import , and basic docstrings.
#

if [ $# -eq 0 ]; then
printf "Usage:\n\t $0 <kataname>\n"
exit 0
fi

if [ ! -f "$1.py" ]; then
printf '"""%s module."""\n\n' "$1" > "$1.py"
fi

if [ ! -f "test_$1.py" ]; then
printf '"""Unit tests for %s module."""\n\n\n' "$1" > "test_$1.py"
printf 'import %s\n\n' "$1" >> "test_$1.py"
fi

vim -c ':vert topleft term' -c 'wincmd p' -o "$1.py" "test_$1.py"

TDD is awesome. is anyone out there using TDD? Anyone learning to use TDD? Do you want to?

@freemo haven't looked at that one. I just as soon use my vim a little closer to to the bone. I try to keep the plugins to a minimum

@freemo I am pretty sure, there is not much you can do in one that you can't do in the other. Another one to look at is

ErgoEmacs ergoemacs.org/ and

Cream for Vim cream.sourceforge.net/

These kind of 'actually' made modernizing changes

@Absinthe It is non-intrusive on spacemacs and doom-macs. If you know the command you type it so quickly the help at the bottom never shows. If you dont know the command and stop half way through it shows after a few ms delay. So it only shows when its needed and even then doesnt really get in the way

@freemo yeah you can get that in vim. I have it setup to give me the linting and documentation data as I type in vim. I usually have that turned off and only let me know when I save. But, that is all available in both places.

@freemo in general popup help tends to be irritating. But that is me. I have hated it since VB3 or so. :) For most code that I type, I don't need pop-up help anyway. At least not constantly. But you can get popup stuff in vim if you like. And now you can get it asynchronously too.

@Absinthe What i like about vim is the keys are easy to remember, its why i like evil-mode flavors like spacemacs. The popup help as you type in spacemacs and doom-macs though is a clear winning feature for me

@freemo and, if you have to use Eclipse there is a plugin called Vrapper that makes the whole editing experience tolerable.

Another interesting thing is whether Vim people use Vim keys everywhere they can. Like vimperator in the browser, or 'set -o vi'on the bash command line and so forth.

@Absinthe Actually last I checked in 2019 vim was still a pretty strong choice among developers. Checkout the stackoverflow survey it goes into some crazy detail.

@freemo the ability to support African children :)

The biggest "offer' is its ubiquity but as resources become cheaper, I am sure there will start to be more default distros that come with Emacs by default.

I think the bigger deal is more people moving to SCITE or Electron based editors. More of the CUA/SAA than either Vim or Emacs. Or IDE's in general.

@Absinthe yea Spacevim, but its far less popular. I've never done a real deep dive on vim or emacs until lately. So I'm really not sure what Vim would offer me that Emacs + Evil wouldnt.

@freemo and there are also vim versions of the space layer stuff

@freemo I pretty much have Emacs + Evil running org mode all the time, and Vim is used for editing code.

@uint8_t that's because people have found it easier to advance that way, than by being good at their trade.

Show older
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.