Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #83880

Re: How to "wow" someone new to Python

From Marko Rauhamaa <marko@pacujo.net>
Newsgroups comp.lang.python
Subject Re: How to "wow" someone new to Python
Date 2015-01-16 17:20 +0200
Organization A noiseless patient Spider
Message-ID <87fvbaah1t.fsf@elektro.pacujo.net> (permalink)
References <mailman.17792.1421420646.18130.python-list@python.org>

Show all headers | View raw


Chris Angelico <rosuav@gmail.com>:

> Scenario: You're introducing someone to Python for the first time.
> S/he may have some previous programming experience, or may be new to
> the whole idea of giving a computer instructions. You have a couple of
> minutes to show off how awesome Python is. What do you do?

My experience is that if you have your "customer" try their hand on
programming and complete a simple challenge, they'll be extremely
impressed. "Did I manage that?"

On the other hand, if you want to demo your greatest achievements at the
screen, they will be left unmoved. "Even my favorite Zynga game looks
cooler than that."

> I was thinking along the lines of a simple demo in the REPL, showing
> off some of Python's coolest features. But then I got stuck on the
> specifics. What are Python's best coolnesses? What makes for a good
> demo?

I would advise steering clear of the REPL and go directly to writing a
program and executing it. Maybe the classic ASCII graphics presentation
of the sine wave:

========================================================================
#!/usr/bin/env python3

import time
import math

def main():
    for angle in range(0, 100000, 5):
        print(int((1 + math.sin(math.radians(angle))) * 35) * "*")
        time.sleep(0.1)

if __name__ == "__main__":
    main()
========================================================================

> Ideally, this should be something that can be demo'd quickly and
> easily, and it should be impressive without going into great details
> of "and see, this is how it works on the inside". So, how would you
> brag about this language?

I'd recommend not skipping the traditional boilerplate (see my example).
Be professional from the start.


Marko

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to "wow" someone new to Python Chris Angelico <rosuav@gmail.com> - 2015-01-17 02:03 +1100
  Re: How to "wow" someone new to Python Marko Rauhamaa <marko@pacujo.net> - 2015-01-16 17:20 +0200
  Re: How to "wow" someone new to Python Rustom Mody <rustompmody@gmail.com> - 2015-01-16 09:16 -0800
  Re: How to "wow" someone new to Python alex23 <wuwei23@gmail.com> - 2015-01-19 16:19 +1000
  Re: How to "wow" someone new to Python wxjmfauth@gmail.com - 2015-01-21 07:15 -0800
  Re: How to "wow" someone new to Python Steve Hayes <hayesstw@telkomsa.net> - 2015-01-21 19:59 +0200
    Re: How to "wow" someone new to Python Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2015-01-21 19:20 +0100
      Re: How to "wow" someone new to Python Chris Angelico <rosuav@gmail.com> - 2015-01-22 06:06 +1100
        Re: How to "wow" someone new to Python André Roberge <andre.roberge@gmail.com> - 2015-01-21 11:20 -0800
        Re: How to "wow" someone new to Python Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2015-01-22 00:46 +0100
      Re: How to "wow" someone new to Python Matthew Ruffalo <mmr15@case.edu> - 2015-01-21 16:20 -0500
      Re: How to "wow" someone new to Python Chris Angelico <rosuav@gmail.com> - 2015-01-22 08:26 +1100
        Re: How to "wow" someone new to Python Alan Bawden <alan@scooby-doo.csail.mit.edu> - 2015-01-21 16:44 -0500
          Re: How to "wow" someone new to Python Alan Bawden <alan@scooby-doo.csail.mit.edu> - 2015-01-21 16:52 -0500
            Re: How to "wow" someone new to Python Paul Rubin <no.email@nospam.invalid> - 2015-01-21 14:35 -0800
            Re: How to "wow" someone new to Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-01-22 15:51 +1100
          Re: How to "wow" someone new to Python Mario Figueiredo <marfig@gmail.com> - 2015-01-21 23:13 +0100
      Re: How to "wow" someone new to Python Matthew Ruffalo <mmr15@case.edu> - 2015-01-21 16:46 -0500
      Re: How to "wow" someone new to Python Chris Angelico <rosuav@gmail.com> - 2015-01-22 09:22 +1100
  Re: How to "wow" someone new to Python André Roberge <andre.roberge@gmail.com> - 2015-01-21 10:34 -0800
  Re: How to "wow" someone new to Python Mario Figueiredo <marfig@gmail.com> - 2015-01-21 19:05 +0000
    Re: How to "wow" someone new to Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-01-22 15:39 +1100
      Re: How to "wow" someone new to Python Grant Edwards <invalid@invalid.invalid> - 2015-01-23 00:09 +0000

csiph-web