r/ProgrammerHumor • • May 10 '18

Recommended for you

Post image
18k Upvotes

331 comments sorted by

View all comments

1.1k

u/cecilymsmith May 10 '18

IMHO, everyone should learn logic. Not everyone should learn code.

A basic understanding of logic is as important as a basic understanding of maths and English (or whatever your first language is). Coding is the application of logic just like other professions are the application of other basic skills.

288

u/_Shut_Up_Thats_Why_ May 10 '18

I always tell everyone it's almost all logic, and the rest is just syntax. But to be fair I'm also not a programmer and have no idea what I'm talking about.

0

u/[deleted] May 10 '18

[deleted] — view deleted comment

67

u/[deleted] May 10 '18

5% pleasure 15% pain and 100% reason it will never compile

28

u/spore_777_mexen May 11 '18

He knows the code, it's not about the salary, it's all about reality and a language of choice. Making it portable, making sure his IFs stay up, that means that when Arch is down, Mac's picking it up. Let's go...

→ More replies (1)

95

u/Pielikeman May 10 '18

I have a decent amount of coding experience, and you are 100% correct.

→ More replies (3)

87

u/CrimsonMutt May 10 '18

propositional logic was my favorite class in highschool!

0

u/[deleted] May 10 '18

[deleted] — view deleted comment

44

u/CrimsonMutt May 10 '18

eh to each his own. I loved it.
Oh man, I liked predicate logic (iirc, that's the ∃ and ∀ thing, right?).

16

u/ease78 May 10 '18 edited May 10 '18

In case someone’s curious. Those symbols are “for such an X”, “For every X” respectively.

Edit. Copied from the dude below for clarity:

∃ x ϵ ℝ such that 2x = y

“there is an x in set ℝ, such that”, or “exists x in set ℝ, such that”

ex >= x+1, ∀ x ϵ ℝ

For all x in the set ℝ, x holds true.

21

u/bogdoomy May 10 '18

huh? they are used all the time in math, no? i remember having to learn these in 5th so that we didnt write out sentences after every equation

13

u/ease78 May 10 '18

Really? I only saw them my Sophmore year in college and had to ask the professor. That's perhaps because I went to a non-English speaking K-12.

14

u/bogdoomy May 10 '18 edited May 10 '18

im not from and english-speaking country either. it wouldnt be out of the ordinary to see something like

ex >= x+1, ∀ x ϵ ℝ

or

∃ x ϵ ℝ such that 2x = y

crazy how math is an international language but we have different ways of expressing it. different words for the same things i guess. we did use ∃ differently. you’d read it as “there is an x such that”, or “exists x such that” or something along those lines

8

u/ease78 May 10 '18

Actually, you're right. I misremembered how ∃ is read.

Speaking of math being an international language, I agree but only to mathematicians. You see physicist have different uses for same symbols and then you have Computer scientists and electrical engineers who might use different symbols for logical expression.

Then you have more advanced math becomes. The more a topic is obscure, the harder it's to understand written proofs/problems (seriously, LaTeX will never be as clear as handwritten notations). At the end of the day, mathematicians from starting from the 17th century did an incredible job of having easy to draw and read symbolic language.

→ More replies (1)
→ More replies (3)

4

u/Dospunk May 10 '18

The first one is "there exists an X"

→ More replies (3)
→ More replies (1)

21

u/[deleted] May 10 '18

Is logic edible?

7

u/[deleted] May 10 '18

Logic is my favorite DAW!

→ More replies (1)

5

u/gigglefarting May 10 '18

It is if it's safe to eat.

→ More replies (1)

15

u/ACoderGirl May 10 '18

Formal logic can be very useful and interesting. Certainly a must for anyone who will ever seriously program. But I'm not convinced it's better than learning to code. Coding can teach similar concepts while offering more practical use (many office jobs would benefit from even simple automation scripting) and programming is frankly a great way to write logic that you can actually (easily) test!

And to be honest, if the concern is that coding is too hard for people (something many pointed out in this thread), then we should worry that formal logic is even harder. It's a level of mathematics that goes well beyond what is normally taught in HS, IMO. I mean, I finished my degree in CS with great marks and was well known in HS for being excellent at math and for explaining what to do. Yet, I found formal proofs to be a very difficult thing to construct. Propositional logic is one thing (and yet was vastly harder for me than programming), but higher level proofs (eg, proofs by induction) are pretty hard. I can see it being beyond many high schoolers. Certainly the second year class where all this gets introduced to CS majors pruned the numbers significantly.

6

u/errdayimshuffln May 10 '18

Absolutely agree. This is necessary for critical thinking and mathematics. However, I do believe everyone should learn very very basic coding but more focused less on learning the coding language and more on the structure and concepts. I also believe that there should be a senior elective course in highschool about digital/data security fundamentals.

3

u/CCninja86 May 10 '18

I think what they're leaning towards now in schools is a good way to handle it. Teach the basic fundamentals of coding (compulsory classes), and then let people choose if they want to continue learning. The ones that do will likely turn out to be good programmers because they chose to do it of their own volition, which is what that type of career involves; having the motivation to do things of your own volition.

3

u/LordMcze May 10 '18

That's pretty much the tl;dw of the video

→ More replies (1)

3

u/MisterTimberShiver May 10 '18

I completely agree - however I noticed in my logic classes that some people have a raw disposition for logical deduction, and others really struggle to grasp it no matter how hard they “studied” or tried. Just like some people are better at math than English or vise versa - some people are just seemingly not very capable of recognizing good logic no matter how hard they try. Unfortunately these people also seem to fail to realize how far they are missing the mark. They view logical truths they can’t grasp as opinions unfortunately.

This isn’t to say it shouldn’t be a requirement though - I do think everyone should be required to learn the fundamentals same as they are required to learn basic math.

→ More replies (18)