|
|
|
|
|
by anonemouse145
3093 days ago
|
|
This. A logic class could do the same thing if you could get a good, modern logic class. Internalizing for loops, if-else, while, boolean, etc is a universal benefit that would help anyone break into programming. Sadly, I've taken some really bad logic classes. Usually this is because they use terrible toy languages that are artificially difficult to work with. They should just do those classes in Javascript or python or something, after they cover the old Aristotelian logic bit. (Socrates is a man, all men are mortal...) You could rig up a test suite to brute force truth tables and verify when you create correct logical statements. It would be a blast. Instead you spend all year having to derive known logical theorems from scratch. Because reasons? Example:!(x and y) == (!x or !y). I had a class where in the toy language it took a whole hour to derive that theorem. Instead, how about we have to draw out a truth table or actually use that statement? You can do that in half the time and get more from it. I've had to use that in programming all the time. You can flip if!(!x.isEmpty and !y.isEmpty) into if(y.isEmpty or x.isEmpty)... If I typed that right. Comes up all the time refactoring or simplifying logic. |
|
Maybe i'm missing something, but what does for-loops have to do with logic in a way that it might be part of the class?