BinaryByter
Template is with OOP
well yea you can use classes
BinaryByter
but don't use deeper oop
Alignant
I use what I deem befitting of the task
Isn't it what everyone tries to do?
BinaryByter
Isn't it what everyone tries to do?
there are peopel who still think that making a class inherit from another is a good idea that should always be used
MᏫᎻᎯᎷᎷᎬᎠ
but don't use deeper oop
Inheritance and polymorphism and virtual inheritance and and and They are all heroes
Alignant
Inheritance is the weakest part of C++ lol. Everyone says so
BinaryByter
Inheritance and polymorphism and virtual inheritance and and and They are all heroes
they just make your day end two hours later than preconized
BinaryByter
BinaryByter
all this polymorphism stuff is making you detest C++
Alignant
they just make your day end two hours later than preconized
Okay, this guy just defeated my argument by saying he likes inheritance
BinaryByter
I remember two years ago, I was like... 13. I tried to use function pointers to member functions of a class
BinaryByter
MᏫᎻᎯᎷᎷᎬᎠ
I think OOP knocked u maxi
MᏫᎻᎯᎷᎷᎬᎠ
wat?
Wht i read
BinaryByter
man I love classes
MᏫᎻᎯᎷᎷᎬᎠ
BinaryByter
but I don't like all those OOP features
MᏫᎻᎯᎷᎷᎬᎠ
Then why the hell uu .....
MᏫᎻᎯᎷᎷᎬᎠ
Oh
BinaryByter
see those this-> things?
BinaryByter
they clutter up my code
BinaryByter
they are ugly
BinaryByter
I wouldn#t need them
BinaryByter
but because of some issue with inheritance with templates
BinaryByter
I need them
MᏫᎻᎯᎷᎷᎬᎠ
I recommend u to read a programming design book
MᏫᎻᎯᎷᎷᎬᎠ
Really
MᏫᎻᎯᎷᎷᎬᎠ
Ur code is shit
MᏫᎻᎯᎷᎷᎬᎠ
No one can read it
BinaryByter
lol why?
BinaryByter
No one can read it
it's pretty readable, I find
Alignant
but because of some issue with inheritance with templates
At what age did you start learning C++. I'm just curious
BinaryByter
I started coding at 9
BinaryByter
something like that
MᏫᎻᎯᎷᎷᎬᎠ
No one can read it
I think this is the reason why ur tasted input lately getting u nowhere
Alignant
Do your parents code? Or are you unnaturally smart? :D
BinaryByter
Do your parents code? Or are you unnaturally smart? :D
my dad codes, but he hates coding. i'm not unnaturally smart
Alignant
my dad codes, but he hates coding. i'm not unnaturally smart
Lol, same here. My dad codes websites on WP :D
BinaryByter
I think this is the reason why ur tasted input lately getting u nowhere
tell me, how can I improve my code for it to be more readable without losing speed and features?
Anonymous
BinaryByter
Define the word speed
no, just tell me
BinaryByter
how would you change my code?
Anonymous
can anybody help my if cases are not working?
MᏫᎻᎯᎷᎷᎬᎠ
no, just tell me
Do u mean speed execution or programming?
BinaryByter
no, just tell me
BinaryByter
how would you change my code?
MᏫᎻᎯᎷᎷᎬᎠ
MᏫᎻᎯᎷᎷᎬᎠ
I can help u
BinaryByter
template <class floatType> void HiddenLayer<floatType>::calculateDerivatives(const std::vector<floatType> &nextLayersDerivatives, const std::vector<Neuron<floatType>> &nextLayersNeurons) { std::vector<floatType> temporaryDerivatives; for (unsigned int i = 0; i < this->size; i++) { floatType accumulator; for (size_t j = 0; j < nextLayersDerivatives.size(); j++) accumulator += nextLayersDerivatives[j] * nextLayersNeurons[j].weights[i]; floatType derivative = this->normalization.derivative(this->layerOutputValues[i]) * accumulator; temporaryDerivatives.push_back(derivative); } this->derivatives = temporaryDerivatives; }
BinaryByter
how would you change that function?
MᏫᎻᎯᎷᎷᎬᎠ
First thing is to comment ur code :)
BinaryByter
no
BinaryByter
comments are bad
MᏫᎻᎯᎷᎷᎬᎠ
To fix bugs if it's found
BinaryByter
comments lie
BinaryByter
comments get old
MᏫᎻᎯᎷᎷᎬᎠ
Meen
BinaryByter
comments get old
comments clutter your code
MᏫᎻᎯᎷᎷᎬᎠ
Alignant
comments are bad
They demand comments from us at work 😢
Alignant
Nope, Russia xD
BinaryByter
or is your code that bad?
BinaryByter
oh thats horrible
MᏫᎻᎯᎷᎷᎬᎠ
comments clutter your code
Sometimes u think of quality
BinaryByter
Sometimes u think of quality
comments don't help you read clean code but make it less clean
MᏫᎻᎯᎷᎷᎬᎠ
BinaryByter
so all you wanted to tell me about was that I lack comments?
BinaryByter
I know devs who put the comment's color to invisible
MᏫᎻᎯᎷᎷᎬᎠ
opposite
Can u read a code with 9999 line?
BinaryByter
Can u read a code with 9999 line?
those are not 9999 lines, those are 7 lines maybe