Show newer

@sir so all you do is first line testing? I ran it, it worked. Let's ship it! :) Been there, done that.

No, I am not concerned with little green lights.

You and I have a problem of vernacular. When you say TDD and when I say TDD we are not talking about the same thing.

Like I said in the beginning, I am not interested in changing your mind or having an argument about it.

@sir making human beings do mindless repetitive tasks is immoral and akin to cruel and unusual punishment. A computer can do that better. There are testings that are suited to humans, let them do that, because computers are not quite up to that task. Right tool for the job. Sometimes that tool is a human.

@sir if you are doing TDD correctly, you are refactoring after each passed test in the process. If your code is constantly refactored to remove unnecessary complexity, then there is little to refactor later. It is a process. Work the steps. Save the world :)

@sir I disagree with that statement as well. But you are certainly entitled to that opinion.

@sir if you do TDD properly what you get in your unit tests is different than if you just write unit tests after the fact. You also get well refactored code earlier so there aren't the same needs for mass refactorings later. But there are plenty of need of TESTS besides unit tests. Functional tests, end to end tests, integration tests, regression tests. Untested code is immoral.

@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.

Show older
Qoto Mastodon

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