Page 2 of 3

Re: a small (and robust) toboolean function

Posted: Wed Oct 18, 2017 1:04 am
by Azhukar
grump wrote: Wed Oct 18, 2017 12:46 amYou need to enhance your calm.
Telling someone he is wrong is neither offensive nor a sign of anger. You're right about the intent though, I was wrong and it seems he wanted to assign an arbitrary string a boolean value.

Re: a small toboolean function

Posted: Thu Oct 19, 2017 2:33 pm
by brogrammer
yo Schwender.exe, you famous now

Re: a small toboolean function

Posted: Thu Oct 19, 2017 5:55 pm
by hamberge
Hah... aww, c'mon guys, that's mean-spirited.

I want to know which Love forums poster is Hans_Meiser_Koeln.

Also, this bad code forum looks interesting.

Re: a small toboolean function

Posted: Thu Oct 19, 2017 7:03 pm
by Schwender.exe
brogrammer wrote: Thu Oct 19, 2017 2:33 pm yo Schwender.exe, you famous now
oh joy :death:

Re: a small toboolean function

Posted: Thu Oct 19, 2017 7:14 pm
by Schwender.exe
hamberge wrote: Thu Oct 19, 2017 5:55 pm Hah... aww, c'mon guys, that's mean-spirited.

I want to know which Love forums poster is Hans_Meiser_Koeln.

Also, this bad code forum looks interesting.
not sure why there even is a 'bad code' forum. there's a such think as broken or non-working code, but 'bad code' isn't. everyone thinks and therefor tackles problems differently then others, my original code was terrible because I posted it without testing it out (was going to edit it after testing it) and didn't expect so many people to actually see the post before then. oh well :P

Re: a small toboolean function

Posted: Thu Oct 19, 2017 7:53 pm
by hamberge
Well... I think there is such a thing as bad code.

For example, it is possible to overcomplicate things, especially for programmers who are naturally systematizers.

One example is "Fizz-Buzz Enterprise Edition." https://github.com/EnterpriseQualityCod ... iseEdition

Fizz-Buzz is a basic level programming task designed to weed out the truly inept. It's supposed to be implementable in one function, with one or a few lines of code.

The Enterprise Edition pokes fun at an overly complicated programming style by building a whole system based on the Fizz-buzz problem.

There are countless stories of people writing huge libraries to accomplish tasks that could easily be done with a few functions that are part of the core underlying programming language.

Re: a small toboolean function

Posted: Fri Oct 20, 2017 12:35 am
by brogrammer
Schwender.exe wrote: Thu Oct 19, 2017 7:14 pm not sure why there even is a 'bad code' forum. there's a such think as broken or non-working code, but 'bad code' isn't. everyone thinks and therefor tackles problems differently then others, my original code was terrible because I posted it without testing it out (was going to edit it after testing it) and didn't expect so many people to actually see the post before then. oh well :P
dude of course there is such a thing as bad code
broken and nonworking is bad right
you posted bad code then you tried to fix it and posted even worse code that didnt work at all lol
dont be mad we all make mistakes we just dont proudly post them publicly and call them robust lol

Re: a small toboolean function

Posted: Fri Oct 20, 2017 1:29 am
by Schwender.exe
brogrammer wrote: Fri Oct 20, 2017 12:35 am
Schwender.exe wrote: Thu Oct 19, 2017 7:14 pm not sure why there even is a 'bad code' forum. there's a such think as broken or non-working code, but 'bad code' isn't. everyone thinks and therefor tackles problems differently then others, my original code was terrible because I posted it without testing it out (was going to edit it after testing it) and didn't expect so many people to actually see the post before then. oh well :P
dude of course there is such a thing as bad code
broken and nonworking is bad right
you posted bad code then you tried to fix it and posted even worse code that didnt work at all lol
dont be mad we all make mistakes we just dont proudly post them publicly and call them robust lol
yea, sorry for the bad and broken code, atleast it works now and actually does what it's supposed to

Re: a small toboolean function

Posted: Fri Oct 20, 2017 1:47 am
by brogrammer
Schwender.exe wrote: Fri Oct 20, 2017 1:29 am yea, sorry for the bad and broken code, atleast it works now and actually does what it's supposed to
no its slow and unnecessarily complicated and does redefine what true means
you know that anything ~= nil and false is supposed to be true right
its still bad code
why not just take the function grump has posted and just add the words you want to be recognized as true

Re: toboolean function

Posted: Fri Oct 20, 2017 1:49 am
by hamberge
"Extremely" robust.