0% found this document useful (0 votes)
20 views55 pages

Week_04_typing_searching

The document outlines an introductory course on Data Management, focusing on manipulating text and mastering keyboard skills. It covers topics such as keyboard layouts, text editors, searching techniques, and the basics of regular expressions. The objective is to equip IT practitioners with essential tools and techniques for efficient text manipulation and data management.

Uploaded by

Yash Soni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views55 pages

Week_04_typing_searching

The document outlines an introductory course on Data Management, focusing on manipulating text and mastering keyboard skills. It covers topics such as keyboard layouts, text editors, searching techniques, and the basics of regular expressions. The objective is to equip IT practitioners with essential tools and techniques for efficient text manipulation and data management.

Uploaded by

Yash Soni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 55

COMP 1238

Introduction to
Data Management

Manipulating text
COMP 1238

Introduction to Data
Management

Starting at 1:05
Monday, Sept 23
◎ AtKlass: ????
◎ AtKlass reg: S8A0
COMP 1238 – Intro to Data
Management

Starting Zoom recording


3
In previous episodes …
◎ History and structure of written text and numbers
◎ Bits, Bytes, ASCII encoding
◎ Markup languages

4
WORKIN
G WITH
TEXT
Agenda
◎ Keyboards, touch-typing and keyboard shortcuts
◎ Text editors - notepad, vi, VSCode
◎ Searching in text - wildcards and the basics of regexp
◎ Lab prep – GitHub Pages

Objective:
Lay the foundation for mastery of tools used by IT practitioners day-to-day but often taken
for granted, focusing on keyboard and text editors.

6
Mastering
the
Keyboard

7
Why Master the Keyboard?
◎ Keyboard and mouse are the main ways of controlling
the the computer
◎ Mouse and touchpad/screen seem intuitive enough
◎ With keyboard we see way too many people struggling
with slow, frustrating and unhealthy habits.
Repetitive strain injury can be debilitating

8
Keyboards come in
many shapes and
sizes

9
IBM Model M
10
Standard 104 key
layout

11
Physical, visual, and functional
layouts

◎ Physical – arrangement & shapes of keys


◎ Visual - labeling of keys
◎ Functional - software response to a key press

12
Layouts for non-latin scripts

13
QWERTY & country specific layouts

Layouts usually named


after the top left row
QWERTZ is common in
Germany, Eastern Europe
and Portugal

14
Dvorak layout & other exotics

Layouts usually named


after the top left row, but
Dvorak layout is named
after August Dvorak

See also: Colemak layout

15
Modifier keys
A modifier key temporarily modifies the normal action of another key

⇧ Shift
⌃ Ctrl – Control
⎇ Alt – Alternate – also labelled ⌥ Option on Apple keyboards.
⌘ Cmd – Command key, Apple keyboards
⊞ Win – Windows logo on Windows keyboards

Fn (Function) – used on small-layout keyboards, or keyboard where the top row of function
keys have multimedia functions like controlling audio volume

Modifiers on Space Cadet keyboard (designed in 1978) 16


Shortcuts – Ctrl-C, Ctrl-V, Ctrl-Z …

◎ Use shortcuts, they help a lot


○ Unfortunately, they don’t make you a superman
◎ Avoid changing them, unless you really want to
○ Non-standard shortcuts can make it frustrating to work
with a coworker’s PC or one at the library

17
Inside the
keyboard
“Rubber dome” and “mechanical” switches
are the most common

Many other types exist, including magnetic


and optical

18
Will you take the blue or the red switch?

19
Keyboard safety
◎ No keyboard is “best”, choose one you like
◎ Avoid keyboards that frustrate you - oddly or
inconsistently behaving keys, annoying sounds …
◎ Be attentive to how you feel, this is the key to prevent
injury –see Repetitive_strain_injury
◎ If something feels odd:
○ Change your own posture, raise or lower the chair
○ Change the location and angle of the keyboard. Try
moving it away from yourself
○ Take a break
20
What happens when you press
a key?

21
What goes over the wire – key
events
Pressing Control-V
# evtest /dev/evt4
Event: time 1717863909.946255, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0
Event: time 1717863909.946255, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 1
Event: time 1717863909.946255, -------------- SYN_REPORT ------------
Event: time 1717863910.059252, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70019
Event: time 1717863910.059252, type 1 (EV_KEY), code 47 (KEY_V), value 1
Event: time 1717863910.059252, -------------- SYN_REPORT ------------
Event: time 1717863910.156245, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70019
Event: time 1717863910.156245, type 1 (EV_KEY), code 47 (KEY_V), value 0
Event: time 1717863910.156245, -------------- SYN_REPORT ------------
Event: time 1717863910.201254, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e0
Event: time 1717863910.201254, type 1 (EV_KEY), code 29 (KEY_LEFTCTRL), value 0
22
Programmable keyboards and small
layouts
Example of a “60% keyboard”
It lacks the F1-F12, Arrow keys and many more
Fn + something is used instead. For example Fn+1 = F1
This translation is done on the keyboard, not by the OS like for other
modifiers

23
Touch
Typing Mülheim, Germany c. 1910
A touch-typing class in a commercial school
Touch-typing
◎ Typing without looking at the keyboard, using
all fingers
◎ In 1888, Frank McGurrin, won a decisive victory
in a typing contest held in Cincinnati. The
results were displayed on the front pages of
many newspapers. McGurrin won $500 (about
$16k today) and popularized the new typing
method.

25
Touch-typing, why learn it?
◎ I feel like I can "drive" a computer now.

◎ I don't actually have to think about the physical act of


typing and can instead think about what I am writing.

◎ Reducing the cognitive demand of typing to almost


nothing makes me feel a lot less tired at the end of a
working day.

26
Touch-typing, how to learn
◎ Use ratatype.com or keybr.com to start
○ Optionally continue with entertrained.app
○ They free and work in the browser
◎ Practicing 'little and often' (15 -30 minutes a day)
works much better than an hour or more once a week.
If you practice regularly and don't give up, you should
be able to learn to touch type fluently in 2-3 months
◎ Typing subreddit - reddit.com/r/typing

27
Touch-typing
◎ Typing subreddit - reddit.com/r/typing
◎ Subreddit guide - Gary Internet's Typing Guide v12

28
ratatype.com
TEXT
EDITORS
>
What software do
you use to edit text?
Word Processors (MS Word) vs Text Editors
(Notepad)

◎ The most Notepad

32
33
IDEs vs Editors
◎ IDE = Integrated Development
Environment
◎ An IDE includes an editor + many
other tools integrated into it
WebStorm ⬆ ⬇ Turbo C++ (1990s)
◎ IDEs are often language specific
○ WebStorm for – HTML, CSS,
JavaScript
○ PyCharm for Python
○ Android Studio for Android apps

34
Text-mode editors
are still alive and
popular
◎ Vi vs. Emacs – a source of
flamewars since 1976
◎ Appeared long before the
mouse and had to rely on
keyboard only
◎ Vim is pre-installed on many
Linux and MacOS by default
35
Exiting Vim
If you do want to learn using
Vim:
◎ reddit.com/r/vim
◎ vim-adventures.com

37
◎ Microsoft VSCode ≠ Visual Studio
◎ By far the most popular editor/IDE lately
◎ First released in 2015 – one of the younger editors
◎ Lots of extensions created by other people
◎ Available online in multiplayer collaboration mode
◎ vscode.dev
38
39
Lab prep – GitHub pages

40
Searching
Ctrl-F, Ctrl-Shift-F, Ctrl-H
Let’s look the details of these dialogs. What do all the options
mean?

PowerPoint VS Code
How to look for approximate
pattern?
◎ Say we want to search for
◎ “Student ID” followed by some digits?
◎ Or “<h1>” to “<h6>” with any number

44
*.txt
◎ You might have seen search patterns like *.txt when
looking for files with a specific extension

◎ Demo

45
Wildcard characters
“Wild card” - a playing card that can
have any value in a game

COMPUTING
a character that will match any
character or sequence of characters
in a search

46
47
RegEx – regular expressions

◎ A whole language for creating search patterns


◎ Cryptic and confusing, but you only need the basics
◎ The basics:
○ . matches any character
○ [abc] – matches any of the listed characters
○ [a-z] – matches any lower-case letter
○ [0-9] – matches any digit, so does \d
○ Demo in the editor

48
What will the following regexps
match?
◎ <h1>
◎ <h.>
◎ <h[1-6]>
◎ p[io]ng
◎ CAD[0-9]+
◎ CAD\d+
◎ [a-z]+\.com
◎ 192\.168\.1\.\d{1,3}
49
Regex for an email address

50
Questions?

51
Links
• Subreddit about keyboard typing - reddit.com/r/typing
• Gary Internet's Typing Guide v12
• Fireship
• Fireship, 10 editors
• VS Code in 100 Seconds
• Regular Expressions (RegEx) in 100 Seconds
• Vim – article, video on how to start
• Frank_McGurrin – popularized touch-typing in 1880s
• Regular Expressions – Computerphile (alternative explanation)

52
DRAFTS
File organization – directory
tree

◎ Files are just chunks of data on the disk


◎ Files have names and metadata like
creation date
◎ directories = folders
○ Intuitive organization
○ Help manage access permissions
○ Concept of “current directory” –
being “in a directory” is a lot like
being in a room in a big house
55
56

You might also like