Introduction Joan Boone jpboone@email.unc.edu Summer 2020 Slide 1 - - PowerPoint PPT Presentation

introduction
SMART_READER_LITE
LIVE PREVIEW

Introduction Joan Boone jpboone@email.unc.edu Summer 2020 Slide 1 - - PowerPoint PPT Presentation

INLS 560 Programming for Information Professionals Introduction Joan Boone jpboone@email.unc.edu Summer 2020 Slide 1 Information Science and Programming Information science is that discipline that investigates the properties and behavior


slide-1
SLIDE 1

Slide 1

Introduction

Joan Boone

jpboone@email.unc.edu

Summer 2020

INLS 560

Programming for Information Professionals

slide-2
SLIDE 2

Slide 2

Information Science and Programming

“Information science is that discipline that investigates the properties and behavior of information...and the means of processing information for optimum accessibility and usability.”

  • - Borko, H. (1968). Information science: What is it? American Documentation, 19, 3.

SILS Masters Papers that focus on the processing and analysis of information

  • A NLP Processing Approach to Analyzing Consultation Visits... by Yumeng Liu
  • Analysis and Visualization Methods for Data-Driven Longitudinal Patient Summary

by Jyotsna Krishna Sastrula

  • Implementation of an Event-based Business Document Indexing and

Retrieval System by Huiying Ma

  • Visual Analytics System Implementation in ICISS environment by Rita Kundu
  • Finding similarity using metadata of clinical trials using Natural Language

Processing in DataBridge by Harika Boya

  • Searching for Art Records: A Log Analysis of the Ackland Art Museum's

Collection Search System by Meredith Hale

slide-3
SLIDE 3

Slide 3

Visualization of Search Log Analysis

Ackland Art Museum Search Collection Results

slide-4
SLIDE 4

Slide 4

Programming Languages: History, Usage, and 'Popularity'

  • A brief History of Programming Languages

– Fortran, LISP, COBOL, Pascal, C, C++, Objective-C, Perl,

Python, Ruby, Java, PHP, JavaScript, ...

  • Many uses

– Supercomputing, AI, teaching, systems programming, game

development, commercial apps, embedded software, mobile apps, database apps, network programming, graphics, web apps (server-side and client-side browsers), big data analysis

  • IEEE Spectrum: 2019 Top Programming Languages
  • TIOBE Index measures 'popularity' of languages based on

search engine hits

slide-5
SLIDE 5

Slide 5

The Proliferation Problem

Source: http://xkcd.com/927/

programming languages

slide-6
SLIDE 6

Slide 6

Why Python?

  • High level language → easier to understand
  • General purpose language → can solve many

types of problems

  • Scripting language → no compilation
  • Simple syntax → no curly brackets and semi-

colons

  • Simple semantics → no data typing
slide-7
SLIDE 7

Slide 7

Basic Concepts: Computer Hardware

Source: Starting Out with Python by Tony Gaddis

slide-8
SLIDE 8

Slide 8

How Computers Store Data

Source: Starting Out with Python by Tony Gaddis

slide-9
SLIDE 9

Slide 9

How a Program is Executed (Run)

Source: Starting Out with Python by Tony Gaddis

slide-10
SLIDE 10

Slide 10

Compiling a Program

Source: Starting Out with Python by Tony Gaddis

slide-11
SLIDE 11

Slide 11

Interpreting a Program

Source: Starting Out with Python by Tony Gaddis

slide-12
SLIDE 12

Slide 12

Basic Concepts: Computer Software

High-level language program

(C, Objective-C, Java, )

Compiler Interpreter Machine language Program

(specific to Mac, PC, Linux )

executes

translates entire program alternates translation and execution of program statements

slide-13
SLIDE 13

Slide 13

Using Python: Several Choices

Python Interpreter (installed with Python)

  • Run from Command Prompt (Windows) or Terminal (Mac)

IDLE Programming environment (installed with Python)

  • Includes a text editor, debugger, other features
slide-14
SLIDE 14

Slide 14

Best Choice is an IDE: PyCharm

Python IDE (Integrated Development Environment)

  • Intelligent Code Editor
  • Debugger
  • Documentation
slide-15
SLIDE 15

Slide 15

First Program: hello_world.py

  • print is a built-in Python function
  • print has one argument: “Hello World!”
  • “Hello World!” is a string (or text), delimited by double quotes

print("Hello World!")

Green check mark indicates no errors Output after running the program

slide-16
SLIDE 16

Slide 16

Python: Use version 3.x (not 2.x)

A few version differences...

  • In 3.x, print is a function: print(“this”) (not print “this”)
  • In 3.x, input function replaces raw_input function

Why this might be a problem...

  • Many online code samples will not specify the version used
  • Possible hint: Version release dates

How do you know?

  • Check Python documentation, ensure you are looking at 3.8.x code
  • Reference: What's New in Python 3.0
  • Better yet...PyCharm will flag as an error!
slide-17
SLIDE 17

Slide 17

Errors and Debugging

3 kinds of errors can occur in a program

  • Syntax: Language syntax is incorrect, so the

program won't run

  • Runtime: Error occurs after the program

starts running

  • Semantic: Program runs successfully, but

produces wrong results

Debugging

  • Process of figuring out what went wrong and

fixing it

  • Can be both frustrating and interesting
  • One of the best ways to learn programming

Source: http://xkcd.com/568/