Answers.Body: <p>Here's one that is recent (and in the news): Machine Learning.</p>
  
  <p>Alpha Zero is a program developed to <strong>learn</strong> how to play chess based on only the rules of the game.  It <em>learns</em> by playing games against itself and evaluating the positions and results of the game.</p>
  
  <p>This is revolutionary and will change the face of how we interact with computer systems.  Professional chess players are now learning from the games that Alpha Zero has played.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-27T13:32:18.043Z
Answers.LastActivityDate: 2019-08-27T13:32:18.043Z
Answers.UserDisplayName: Mr Bradley
Answers.Body: <p>Sadly your friend sounds to be a product of current bad programming practices he probably also thinks that program is just about learning a language . so give your friend this problem to solve:</p>
  
  <p>old fashioned phone keypad had letters to translate into numbers such that you have phone numbers like 1 800 call me so write a function that translates any letter into its corresponding number on the phone keypad without using any if statement (or switch,etc). ..</p>
  
  <p>this is what real programming is about. using too many if statements is typically considered bad programming.  sadly proper software engineering principles are being missed these days in order to turn programming into programming for dummies but many corporations still know the difference</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-27T06:08:39.140Z
Answers.LastActivityDate: 2019-08-27T06:08:39.140Z
Answers.UserDisplayName: Elkady
Answers.Body: <p>Obviously your friend is using a bit of hyperbole, and in truth, however annoyed you may be by his blithe dismissal of our entire field, he may not be open to being persuaded.  You may have to resign yourself to not "winning" this argument.  From what you've written, this is what I suspect is the real answer.</p>
  
  <p>For what it's worth, he's not, strictly speaking, <em>wrong</em>.  Data storage and branching are a huge portion of what computers actually do.</p>
  
  <p>But if you still want to attempt to capture him, you might point him towards image recognition.  Sure, it's "if this then do this" in theory, but two different images of birds will share not a single pixel in common, so how do you teach a machine that can only look at one pixel at a time to identify one?</p>
  
  <blockquote>
    <p>"Computer Science is no more about computers than astronomy is about telescopes." <em>-misattributed to Edsger Dijkstra</em></p>
  </blockquote>
  
  <p>Of course, even if he concedes the complexity of the problem, that's still a ways away from seeing the joy in trying to solve it. I'm not sure there's truly a way from here to there if he's not interested in taking an honest look.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-19T12:24:19.140Z
Answers.Text: Creativity comes in many forms. Programming is just one of them. It seems pretty natural if a creative person in one field doesn't appreciate the creative impulse in another.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-18T03:10:30.903Z
Answers.LastActivityDate: 2019-08-18T03:10:30.903Z
Answers.UserDisplayName: Ben I.
Answers.Body: <p>I don't really think it's your job to convince your friend that programming is fun. But I'm going to answer because I think there are other situations where presenting the "fun" parts of computer science has benefits, e.g. when teaching an introductory class.</p>
  
  <p><strong>Focus on the end result rather than on the process.</strong></p>
  
  <p>Instead of focusing on the act of writing code and trying to paint that as a fun process, focus on the cool stuff you can create with code.</p>
  
  <p>Which examples you use depends on who you're talking to. You might talk about <a href="https://en.wikipedia.org/wiki/Creative_coding" rel="nofollow noreferrer">creative coding</a> or <a href="https://en.wikipedia.org/wiki/Generative_art" rel="nofollow noreferrer">generative art</a>. You might talk about <a href="https://en.wikipedia.org/wiki/Video_game_development" rel="nofollow noreferrer">game development</a> or <a href="https://en.wikipedia.org/wiki/Procedural_generation" rel="nofollow noreferrer">procedural generation</a>. You might talk about <a href="https://en.wikipedia.org/wiki/Artificial_intelligence" rel="nofollow noreferrer">artificial intelligence</a> or healthcare or <a href="https://en.wikipedia.org/wiki/Category:Scientific_simulation_software" rel="nofollow noreferrer">scientific simulations</a>. You might talk about art, or sports, or dance, or music, or prose.</p>
  
  <p><strong>Show your audience examples of interesting things that were created with code. Then show them how to do it themselves.</strong></p>
  
  <p>See also: <a href="https://cseducators.stackexchange.com/a/4785/2068">How to teach a person to enjoy programming?</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-20T19:49:35.983Z
Answers.LastActivityDate: 2019-08-20T19:55:06.390Z
Answers.LastEditDate: 2019-08-20T19:55:06.390Z
Answers.UserDisplayName: Kevin Workman
Answers.Body: <p>Depending on the person there may be different approaches, here are a few:</p>
  
  <ul>
  <li>Listen to them, ask them to tell you about their experiences.</li>
  <li>Tell them about your experiences (Don't work about difficulty, it is just a story).</li>
  <li>Consider different programs that can be written, to solve a problem that they may have.</li>
  <li>Solve a problem for them.</li>
  <li>Puzzles: Show some programming puzzles.
  
  <ul>
  <li>Prove that you can write any program (is Turing complete), without conditionals (this also rules out recursion, except infinite). (I have done this)</li>
  <li>Prove that you can write any program (is Turing complete), without iteration: You will need conditionals, and (at least tail) recursion.</li>
  </ul></li>
  <li>Show alternatives to conditional code: tables (conditional data), polymorphism (Lizcov substitution),</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-20T11:50:33.920Z
Answers.LastActivityDate: 2019-08-20T11:50:33.920Z
Answers.UserDisplayName: ctrl-alt-delor
Answers.Body: <p>What about music?
  A C white note on a partition means a specific frequency for a specific amount of time. And a partition is just a sequence of such commands.</p>
  
  <p>Looks pretty dull to write such a thing, no ?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-19T11:36:40.617Z
Answers.LastActivityDate: 2019-08-19T11:36:40.617Z
Answers.UserDisplayName: ysalmon
Body: <p>I have a friend who, in his mind, has the wrong image about programming. Whenever I mention that programming is fun and that one can enjoy it very much especially if they like solving problems (both math and algorithm related), he stares at me and repeats "if this then do this.. what's so hard or fun about writing that?" and that's just annoying. It is as if one would say "<em>ah well, maths.. 1+1 = 2 there u go!</em>".</p>
  
  <p><strong>Is there a way I can make him paint a better picture in his mind regarding this field?</strong></p>
  
  <p>About 10 years ago when he was younger, he did try basic programming and that's what I believe he is basing his judgement on.</p>
  
  <p>(Not sure if this is the right place to post this but let's see... )</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-17T22:35:26.517Z
Comments.Text: Building a skyscraper is just "cut this, connect that." It's not the steps you take but the solution you create. Welcome to [cseducators.se]. I suspect the question is borderline, as written, but could be edited to be "in-scope". After all, many students may come to their first "computer" class with nearly the same notions.
Comments.UserDisplayName: Gypsy Spellweaver
Tags: <programming><adult-education>
Title: Explain to someone that programming isn't just all "if"s and "else"s
ThreadText: # Explain to someone that programming isn't just all "if"s and "else"s
  
  (Asked by: username_0 on 2019-08-17)
  
  I have a friend who, in his mind, has the wrong image about programming. Whenever I mention that programming is fun and that one can enjoy it very much especially if they like solving problems (both math and algorithm related), he stares at me and repeats "if this then do this.. what's so hard or fun about writing that?" and that's just annoying. It is as if one would say "*ah well, maths.. 1+1 = 2 there u go!*".
  
  **Is there a way I can make him paint a better picture in his mind regarding this field?**
  
  About 10 years ago when he was younger, he did try basic programming and that's what I believe he is basing his judgement on.
  
  (Not sure if this is the right place to post this but let's see... )
  
  **Tags:** programming, adult-education
  
  > **Comments:**
  > **username_1**: Building a skyscraper is just "cut this, connect that." It's not the steps you take but the solution you create. Welcome to [cseducators.se]. I suspect the question is borderline, as written, but could be edited to be "in-scope". After all, many students may come to their first "computer" class with nearly the same notions.  
  
  ---
  
  ## 6 answers
  
  ### Answer by username_4 on 2019-08-18. Score: 7 | Accepted answer
  
  Obviously your friend is using a bit of hyperbole, and in truth, however annoyed you may be by his blithe dismissal of our entire field, he may not be open to being persuaded. You may have to resign yourself to not "winning" this argument. From what you've written, this is what I suspect is the real answer.
  
  For what it's worth, he's not, strictly speaking, *wrong*. Data storage and branching are a huge portion of what computers actually do.
  
  But if you still want to attempt to capture him, you might point him towards image recognition. Sure, it's "if this then do this" in theory, but two different images of birds will share not a single pixel in common, so how do you teach a machine that can only look at one pixel at a time to identify one?
  
  > "Computer Science is no more about computers than astronomy is about telescopes." *-misattributed to Edsger Dijkstra*
  
  Of course, even if he concedes the complexity of the problem, that's still a ways away from seeing the joy in trying to solve it. I'm not sure there's truly a way from here to there if he's not interested in taking an honest look.
  
  > **Comments:**
  > **username_5**: Creativity comes in many forms. Programming is just one of them. It seems pretty natural if a creative person in one field doesn't appreciate the creative impulse in another.  
  
  ---
  
  ### Answer by username_6 on 2019-08-20. Score: 2
  
  I don't really think it's your job to convince your friend that programming is fun. But I'm going to answer because I think there are other situations where presenting the "fun" parts of computer science has benefits, e.g. when teaching an introductory class.
  
  **Focus on the end result rather than on the process.**
  
  Instead of focusing on the act of writing code and trying to paint that as a fun process, focus on the cool stuff you can create with code.
  
  Which examples you use depends on who you're talking to. You might talk about [creative coding](https://en.wikipedia.org/wiki/Creative_coding) or [generative art](https://en.wikipedia.org/wiki/Generative_art). You might talk about [game development](https://en.wikipedia.org/wiki/Video_game_development) or [procedural generation](https://en.wikipedia.org/wiki/Procedural_generation). You might talk about [artificial intelligence](https://en.wikipedia.org/wiki/Artificial_intelligence) or healthcare or [scientific simulations](https://en.wikipedia.org/wiki/Category:Scientific_simulation_software). You might talk about art, or sports, or dance, or music, or prose.
  
  **Show your audience examples of interesting things that were created with code. Then show them how to do it themselves.**
  
  See also: [How to teach a person to enjoy programming?](https://cseducators.stackexchange.com/a/4785/2068)
  
  
  ---
  
  ### Answer by username_7 on 2019-08-20. Score: 2
  
  Depending on the person there may be different approaches, here are a few:
  
  * Listen to them, ask them to tell you about their experiences.
  * Tell them about your experiences (Don't work about difficulty, it is just a story).
  * Consider different programs that can be written, to solve a problem that they may have.
  * Solve a problem for them.
  * Puzzles: Show some programming puzzles.
    + Prove that you can write any program (is Turing complete), without conditionals (this also rules out recursion, except infinite). (I have done this)
    + Prove that you can write any program (is Turing complete), without iteration: You will need conditionals, and (at least tail) recursion.
  * Show alternatives to conditional code: tables (conditional data), polymorphism (Lizcov substitution),
  
  
  ---
  
  ### Answer by username_8 on 2019-08-19. Score: 2
  
  What about music?
  A C white note on a partition means a specific frequency for a specific amount of time. And a partition is just a sequence of such commands.
  
  Looks pretty dull to write such a thing, no ?
  
  
  ---
  
  ### Answer by username_2 on 2019-08-27. Score: 1
  
  Here's one that is recent (and in the news): Machine Learning.
  
  Alpha Zero is a program developed to **learn** how to play chess based on only the rules of the game. It *learns* by playing games against itself and evaluating the positions and results of the game.
  
  This is revolutionary and will change the face of how we interact with computer systems. Professional chess players are now learning from the games that Alpha Zero has played.
  
  
  ---
  
  ### Answer by username_3 on 2019-08-27. Score: 0
  
  Sadly your friend sounds to be a product of current bad programming practices he probably also thinks that program is just about learning a language . so give your friend this problem to solve:
  
  old fashioned phone keypad had letters to translate into numbers such that you have phone numbers like 1 800 call me so write a function that translates any letter into its corresponding number on the phone keypad without using any if statement (or switch,etc). ..
  
  this is what real programming is about. using too many if statements is typically considered bad programming. sadly proper software engineering principles are being missed these days in order to turn programming into programming for dummies but many corporations still know the difference
  
  
  ---
  
  