SlideShare a Scribd company logo
1 of 92
Download to read offline
Minimizing cognitive load

in Perl source code parsing
javier@rodriguez.org.mx

Perl Mongers 20170831
Massachusetts General Hospital and Draper Labs
https://http.cat/403
A morning together
A morning together
http://www.pxleyes.com/profile/Sarah06/
– Master Yoda
“Disappointment is the path to the dark side.”
– Master Yoda
“Disappointment leads to anger. Anger leads to
hate. Hate leads to suffering. Suffering leads to
low productivity.”
Times New Roman
lO==10
Times New Roman
lO==10 lO==10
Courier
Courier
lO==10 lO==10
Inconsolata
Cognitive Dissonance
• Psychological conflict resulting from incongruous beliefs
and attitudes held simultaneously

https://www.merriam-webster.com/dictionary/cognitive%20dissonance
http://www.lowing.org/fonts/
http://hivelogic.com/articles/top-10-programming-fonts/
Top 10 Programming Fonts
• Courier
• Andale Mono
• Monaco
• Profont
• Monofur
• Proggy

• Droid Sans Mono
• Deja Vu Sans Mono
• Consolas
• Inconsolata
https://nerdfonts.com/
NerdFonts.com
• 3270
• AnonymousPro
• AurulentSansMono
• BitstreamVeraSansMono
• CodeNewRoman
• DejaVuSansMono
• DroidSansMono
• FantasqueSansMono
• FiraCode
• FiraMono
• Gohu
• Hack
• Hasklig
• HeavyData
• Hermit
• Inconsolata
• InconsolataGo
• Iosevka
• Lekton
• LiberationMono
• Meslo
• Monofur
• Monoid
• Mononoki
• MPlus
• ProFont
• ProggyClean
• RobotoMono
• ShareTechMono
• SourceCodePro
• SpaceMono
• Terminus
• Ubuntu
• UbuntuMono
=>
=>
=> ≥
=>
=>
=>
?
≥ ?
?
Ligatures
ff fb fl fh fi ffi ffl ffh
http://ilovetypography.com/2007/09/09/decline-and-fall-of-the-ligature/
=>
=>
me
Inconsolata
Use a coding font with ligatures
1. Pick a font
2. Pick an editor
3. Enable ligatures if necessary
Coding fonts with ligatures
• Fira Code 

https://github.com/tonsky/FiraCode
• Monoid 

https://github.com/larsenwork/monoid
• Hasklig 

https://github.com/i-tu/Hasklig
• Iosevka 

https://github.com/be5invis/Iosevka
• Pragmata Pro (Commercial)

https://www.fsd.it/shop/fonts/pragmatapro/
Editors with support for Ligatures
• Android Studio
• Anjuta
• AppCode
• Atom 1.1 or
newer
• BBEdit/
TextWrangler
• Brackets
• Chocolat
• CLion
• Cloud9
• Coda 2
• CodeLite
• Eclipse
• Geany
• gEdit / Pluma
• GNOME Builder
• IntelliJ IDEA
• Kate, KWrite
• Komodo
• Leafpad
• LibreOffice
• LightTable
• LINQPad
• MacVim
• Mancy
• Meld
• Mousepad
• NetBeans
• Notepad
• Notepad++
• PhpStorm
• PyCharm
• QtCreator
• Rider
• RStudio
• RubyMine
• Scratch
• Spyder IDE
• TextAdept
• TextEdit
• TextMate 2
• VimR
• Visual Studio
2015
• Visual Studio
2017
• Visual Studio
Code
• WebStorm
• Xamarin Studio/
Monodevelop
• Xcode
https://github.com/tonsky/FiraCode#editor-support
Editors WITHOUT support for Ligatures
• Arduino IDE
• Adobe Dreamweaver
• Delphi IDE
• Eclipse (Win)
• Standalone Emacs
• gVim
• IDLE
• KDevelop 4
• Monkey Studio IDE
• SublimeText
https://github.com/tonsky/FiraCode#editor-support
Enable ligatures
• IntelliJ et. al.
• Enable in Settings → Editor → Colors & Fonts → Font → Enable Font Ligatures
• Select Fira Code as "Primary font" under 

Settings → Editor → Colors & Fonts → Font → Editor Font
• ~/.gvimrc
set macligatures
set guifont=Fira Code:h12
• Atom
atom-text-editor {
text-rendering: optimizeLegibility;
}
• BBEdit
$ defaults write com.barebones.bbedit "EnableFontLigatures_Fira Code" -bool YES
https://github.com/tonsky/FiraCode#editor-support
https://github.com/tonsky/FiraCode
# apt-get install fonts-firacode
!
$ brew tap caskroom/fonts
$ brew cask install font-fira-code

C:> choco install firacode
#
Example (Fira Mono)
sub index($c) {
return $c->render();
}
sub view($c) {
my $id = $c->stash('id');
my $purchase = $c->customer->purchases->search({id => $id})->single;
die ("Invalid purchase") unless $purchase->customer->id eq $c->customer->id;
$c->stash(purchase => $purchase);
return $c->render();
}
Example (Fira Code)
sub index($c) {
return $c ->render();
}
sub view($c) {
my $id = $c ->stash('id');
my $purchase = $c ->customer ->purchases ->search({id => $id}) ->single;
die ("Invalid purchase") unless $purchase ->customer ->id eq $c ->customer ->id;
$c ->stash(purchase => $purchase);
return $c ->render();
}
Example (Fira Mono)
sub index($c) {
return $c->render();
}
sub view($c) {
my $id = $c->stash('id');
my $purchase = $c->customer->purchases->search({id => $id})->single;
die ("Invalid purchase") unless $purchase->customer->id eq $c->customer->id;
$c->stash(purchase => $purchase);
return $c->render();
}
Compare and contrast
sub index($c) {
return $c->render();
}
sub view($c) {
my $id = $c->stash('id');
my $purchase = $c->customer->purchases->search({id => $id})->single;
die ("Invalid purchase") unless $purchase->customer->id eq $c->customer->id;
$c->stash(purchase => $purchase);
return $c->render();
}
Compare and contrast
my $purchase = $c->customer->purchases->search({id => $id})->single;
Compare and contrast
my $purchase = $c->customer->purchases->search({id => $id})->single;
Compare and contrast
my $purchase = $c->customer->purchases->search({id => $id})->single;
Compare and contrast
my $purchase = $c ->customer ->purchases ->search({id => $id}) ->single;my $purchase = $c->customer->purchases->search({id => $id})->single;
Compare and contrast
my $purchase = $c ->customer ->purchases ->search({id => $id}) ->single;
my $purchase = $c->customer->purchases->search({id => $id})->single;
== != >= <= <=>
Compare and contrast
== != >= <= <=>
.= += -= *= |= ||= //=
Compare and contrast
.= += -= *= |= ||= //=
>> << >>= <<=
Compare and contrast
>> << >>= <<=
&& || // -- ++ **
Compare and contrast
&& || // -- ++ **
-> => ::
Compare and contrast
-> => ::
~~ .. ...
Compare and contrast
~~ .. ...
for (1..10)
Compare and contrast
for (1 ..10)
#! ## ###
Compare and contrast
#! ## ###
0x1337
Compare and contrast
0x1337
/* ** */
Compare and contrast
/* ** */
<!-- -->
Compare and contrast
<!-- -->
<img/>
Compare and contrast
<img />
Coding fonts with ligatures
• Fira Code 

https://github.com/tonsky/FiraCode
• Monoid 

https://github.com/larsenwork/monoid
• Hasklig 

https://github.com/i-tu/Hasklig
• Iosevka 

https://github.com/be5invis/Iosevka
• Pragmata Pro (Commercial)

https://www.fsd.it/shop/fonts/pragmatapro/
Minimizing cognitive load

in Perl source code parsing
javier@rodriguez.org.mx

Perl Mongers 20170831
Massachusetts General Hospital and Draper Labs
Pretty Programming Fonts

More Related Content

What's hot

About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSNaga Harish M
 
10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elements10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elementsIn a Rocket
 
14- Learn CSS Fundamentals / Inheritance
14- Learn CSS Fundamentals / Inheritance14- Learn CSS Fundamentals / Inheritance
14- Learn CSS Fundamentals / InheritanceIn a Rocket
 
Jquery presentation
Jquery presentationJquery presentation
Jquery presentationguest5d87aa6
 
Intro to #memtech PHP 2011-12-05
Intro to #memtech PHP   2011-12-05Intro to #memtech PHP   2011-12-05
Intro to #memtech PHP 2011-12-05Jeremy Kendall
 

What's hot (6)

About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JS
 
10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elements10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elements
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
 
14- Learn CSS Fundamentals / Inheritance
14- Learn CSS Fundamentals / Inheritance14- Learn CSS Fundamentals / Inheritance
14- Learn CSS Fundamentals / Inheritance
 
Jquery presentation
Jquery presentationJquery presentation
Jquery presentation
 
Intro to #memtech PHP 2011-12-05
Intro to #memtech PHP   2011-12-05Intro to #memtech PHP   2011-12-05
Intro to #memtech PHP 2011-12-05
 

Similar to Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)

Does my DIV look big in this?
Does my DIV look big in this?Does my DIV look big in this?
Does my DIV look big in this?glen_a_smith
 
Becoming a better WordPress Developer
Becoming a better WordPress DeveloperBecoming a better WordPress Developer
Becoming a better WordPress DeveloperJoey Kudish
 
OWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsOWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsLewis Ardern
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradioDroidcon Berlin
 
Rowdy Rabouw - Unleash your web skills on native
Rowdy Rabouw - Unleash your web skills on nativeRowdy Rabouw - Unleash your web skills on native
Rowdy Rabouw - Unleash your web skills on nativeOdessaJS Conf
 
Writing clean code in C# and .NET
Writing clean code in C# and .NETWriting clean code in C# and .NET
Writing clean code in C# and .NETDror Helper
 
PSR-7 - Middleware - Zend Expressive
PSR-7 - Middleware - Zend ExpressivePSR-7 - Middleware - Zend Expressive
PSR-7 - Middleware - Zend ExpressiveMilad Arabi
 
5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniternicdev
 
PHP Development With MongoDB
PHP Development With MongoDBPHP Development With MongoDB
PHP Development With MongoDBFitz Agard
 
PHP Development with MongoDB (Fitz Agard)
PHP Development with MongoDB (Fitz Agard)PHP Development with MongoDB (Fitz Agard)
PHP Development with MongoDB (Fitz Agard)MongoSF
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Railsrfischer20
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsMark Rackley
 
Cocoa pods iOSDevUK 14 talk: managing your libraries
Cocoa pods iOSDevUK 14 talk: managing your librariesCocoa pods iOSDevUK 14 talk: managing your libraries
Cocoa pods iOSDevUK 14 talk: managing your librariesDiego Freniche Brito
 
Javascript orientado a testes
Javascript orientado a testesJavascript orientado a testes
Javascript orientado a testesAlexandre Gomes
 
Beer&Tech: Tech Documentation - cod == doc
Beer&Tech: Tech Documentation - cod == docBeer&Tech: Tech Documentation - cod == doc
Beer&Tech: Tech Documentation - cod == docGilles Legoux
 
SADI in Perl - Protege Plugin Tutorial (fixed Aug 24, 2011)
SADI in Perl - Protege Plugin Tutorial (fixed Aug 24, 2011)SADI in Perl - Protege Plugin Tutorial (fixed Aug 24, 2011)
SADI in Perl - Protege Plugin Tutorial (fixed Aug 24, 2011)Mark Wilkinson
 
Mongo NYC PHP Development
Mongo NYC PHP Development Mongo NYC PHP Development
Mongo NYC PHP Development Fitz Agard
 

Similar to Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts) (20)

Does my DIV look big in this?
Does my DIV look big in this?Does my DIV look big in this?
Does my DIV look big in this?
 
Becoming a better WordPress Developer
Becoming a better WordPress DeveloperBecoming a better WordPress Developer
Becoming a better WordPress Developer
 
OWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsOWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript Applications
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradio
 
Rowdy Rabouw - Unleash your web skills on native
Rowdy Rabouw - Unleash your web skills on nativeRowdy Rabouw - Unleash your web skills on native
Rowdy Rabouw - Unleash your web skills on native
 
Writing clean code in C# and .NET
Writing clean code in C# and .NETWriting clean code in C# and .NET
Writing clean code in C# and .NET
 
Rails with mongodb
Rails with mongodbRails with mongodb
Rails with mongodb
 
PSR-7 - Middleware - Zend Expressive
PSR-7 - Middleware - Zend ExpressivePSR-7 - Middleware - Zend Expressive
PSR-7 - Middleware - Zend Expressive
 
5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter
 
PHP Development With MongoDB
PHP Development With MongoDBPHP Development With MongoDB
PHP Development With MongoDB
 
PHP Development with MongoDB (Fitz Agard)
PHP Development with MongoDB (Fitz Agard)PHP Development with MongoDB (Fitz Agard)
PHP Development with MongoDB (Fitz Agard)
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Rails
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentials
 
Cocoa pods iOSDevUK 14 talk: managing your libraries
Cocoa pods iOSDevUK 14 talk: managing your librariesCocoa pods iOSDevUK 14 talk: managing your libraries
Cocoa pods iOSDevUK 14 talk: managing your libraries
 
Javascript orientado a testes
Javascript orientado a testesJavascript orientado a testes
Javascript orientado a testes
 
Beer&Tech: Tech Documentation - cod == doc
Beer&Tech: Tech Documentation - cod == docBeer&Tech: Tech Documentation - cod == doc
Beer&Tech: Tech Documentation - cod == doc
 
SADI in Perl - Protege Plugin Tutorial (fixed Aug 24, 2011)
SADI in Perl - Protege Plugin Tutorial (fixed Aug 24, 2011)SADI in Perl - Protege Plugin Tutorial (fixed Aug 24, 2011)
SADI in Perl - Protege Plugin Tutorial (fixed Aug 24, 2011)
 
Mongo NYC PHP Development
Mongo NYC PHP Development Mongo NYC PHP Development
Mongo NYC PHP Development
 
Quality code by design
Quality code by designQuality code by design
Quality code by design
 
Cucumber & BDD
Cucumber & BDDCucumber & BDD
Cucumber & BDD
 

More from Javier Arturo Rodríguez

More from Javier Arturo Rodríguez (9)

Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 
WordPress Performance Tuning
WordPress Performance TuningWordPress Performance Tuning
WordPress Performance Tuning
 
WordPress for SysAdmins
WordPress for SysAdminsWordPress for SysAdmins
WordPress for SysAdmins
 
Easy native wrappers with SWIG
Easy native wrappers with SWIGEasy native wrappers with SWIG
Easy native wrappers with SWIG
 
Open Data: a view from the trenches
Open Data: a view from the trenchesOpen Data: a view from the trenches
Open Data: a view from the trenches
 
Barcelona.pm Curs1211 sess01
Barcelona.pm Curs1211 sess01Barcelona.pm Curs1211 sess01
Barcelona.pm Curs1211 sess01
 
Build an autoversioning filesystem with Apache2
Build an autoversioning filesystem with Apache2Build an autoversioning filesystem with Apache2
Build an autoversioning filesystem with Apache2
 
Periodismo de Datos II: Construyendo y explorando conjuntos de datos con las ...
Periodismo de Datos II: Construyendo y explorando conjuntos de datos con las ...Periodismo de Datos II: Construyendo y explorando conjuntos de datos con las ...
Periodismo de Datos II: Construyendo y explorando conjuntos de datos con las ...
 
DatosEnCrudo.org
DatosEnCrudo.orgDatosEnCrudo.org
DatosEnCrudo.org
 

Recently uploaded

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 

Recently uploaded (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 

Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)

  • 1. Minimizing cognitive load
 in Perl source code parsing javier@rodriguez.org.mx Perl Mongers 20170831 Massachusetts General Hospital and Draper Labs
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 8.
  • 9.
  • 12.
  • 13.
  • 14.
  • 16. – Master Yoda “Disappointment is the path to the dark side.”
  • 17. – Master Yoda “Disappointment leads to anger. Anger leads to hate. Hate leads to suffering. Suffering leads to low productivity.”
  • 18.
  • 20. Times New Roman lO==10 lO==10 Courier
  • 22. Cognitive Dissonance • Psychological conflict resulting from incongruous beliefs and attitudes held simultaneously
 https://www.merriam-webster.com/dictionary/cognitive%20dissonance
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 30. Top 10 Programming Fonts • Courier • Andale Mono • Monaco • Profont • Monofur • Proggy • Droid Sans Mono • Deja Vu Sans Mono • Consolas • Inconsolata
  • 32.
  • 33. NerdFonts.com • 3270 • AnonymousPro • AurulentSansMono • BitstreamVeraSansMono • CodeNewRoman • DejaVuSansMono • DroidSansMono • FantasqueSansMono • FiraCode • FiraMono • Gohu • Hack • Hasklig • HeavyData • Hermit • Inconsolata • InconsolataGo • Iosevka • Lekton • LiberationMono • Meslo • Monofur • Monoid • Mononoki • MPlus • ProFont • ProggyClean • RobotoMono • ShareTechMono • SourceCodePro • SpaceMono • Terminus • Ubuntu • UbuntuMono
  • 34. =>
  • 35. =>
  • 37. =>
  • 38. =>
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53. ff fb fl fh fi ffi ffl ffh
  • 55. => =>
  • 57. Use a coding font with ligatures 1. Pick a font 2. Pick an editor 3. Enable ligatures if necessary
  • 58. Coding fonts with ligatures • Fira Code 
 https://github.com/tonsky/FiraCode • Monoid 
 https://github.com/larsenwork/monoid • Hasklig 
 https://github.com/i-tu/Hasklig • Iosevka 
 https://github.com/be5invis/Iosevka • Pragmata Pro (Commercial)
 https://www.fsd.it/shop/fonts/pragmatapro/
  • 59. Editors with support for Ligatures • Android Studio • Anjuta • AppCode • Atom 1.1 or newer • BBEdit/ TextWrangler • Brackets • Chocolat • CLion • Cloud9 • Coda 2 • CodeLite • Eclipse • Geany • gEdit / Pluma • GNOME Builder • IntelliJ IDEA • Kate, KWrite • Komodo • Leafpad • LibreOffice • LightTable • LINQPad • MacVim • Mancy • Meld • Mousepad • NetBeans • Notepad • Notepad++ • PhpStorm • PyCharm • QtCreator • Rider • RStudio • RubyMine • Scratch • Spyder IDE • TextAdept • TextEdit • TextMate 2 • VimR • Visual Studio 2015 • Visual Studio 2017 • Visual Studio Code • WebStorm • Xamarin Studio/ Monodevelop • Xcode https://github.com/tonsky/FiraCode#editor-support
  • 60. Editors WITHOUT support for Ligatures • Arduino IDE • Adobe Dreamweaver • Delphi IDE • Eclipse (Win) • Standalone Emacs • gVim • IDLE • KDevelop 4 • Monkey Studio IDE • SublimeText https://github.com/tonsky/FiraCode#editor-support
  • 61. Enable ligatures • IntelliJ et. al. • Enable in Settings → Editor → Colors & Fonts → Font → Enable Font Ligatures • Select Fira Code as "Primary font" under 
 Settings → Editor → Colors & Fonts → Font → Editor Font • ~/.gvimrc set macligatures set guifont=Fira Code:h12 • Atom atom-text-editor { text-rendering: optimizeLegibility; } • BBEdit $ defaults write com.barebones.bbedit "EnableFontLigatures_Fira Code" -bool YES https://github.com/tonsky/FiraCode#editor-support
  • 63. # apt-get install fonts-firacode !
  • 64. $ brew tap caskroom/fonts $ brew cask install font-fira-code 
  • 65. C:> choco install firacode #
  • 66. Example (Fira Mono) sub index($c) { return $c->render(); } sub view($c) { my $id = $c->stash('id'); my $purchase = $c->customer->purchases->search({id => $id})->single; die ("Invalid purchase") unless $purchase->customer->id eq $c->customer->id; $c->stash(purchase => $purchase); return $c->render(); }
  • 67. Example (Fira Code) sub index($c) { return $c ->render(); } sub view($c) { my $id = $c ->stash('id'); my $purchase = $c ->customer ->purchases ->search({id => $id}) ->single; die ("Invalid purchase") unless $purchase ->customer ->id eq $c ->customer ->id; $c ->stash(purchase => $purchase); return $c ->render(); }
  • 68. Example (Fira Mono) sub index($c) { return $c->render(); } sub view($c) { my $id = $c->stash('id'); my $purchase = $c->customer->purchases->search({id => $id})->single; die ("Invalid purchase") unless $purchase->customer->id eq $c->customer->id; $c->stash(purchase => $purchase); return $c->render(); }
  • 69. Compare and contrast sub index($c) { return $c->render(); } sub view($c) { my $id = $c->stash('id'); my $purchase = $c->customer->purchases->search({id => $id})->single; die ("Invalid purchase") unless $purchase->customer->id eq $c->customer->id; $c->stash(purchase => $purchase); return $c->render(); }
  • 70. Compare and contrast my $purchase = $c->customer->purchases->search({id => $id})->single;
  • 71. Compare and contrast my $purchase = $c->customer->purchases->search({id => $id})->single;
  • 72. Compare and contrast my $purchase = $c->customer->purchases->search({id => $id})->single;
  • 73. Compare and contrast my $purchase = $c ->customer ->purchases ->search({id => $id}) ->single;my $purchase = $c->customer->purchases->search({id => $id})->single;
  • 74. Compare and contrast my $purchase = $c ->customer ->purchases ->search({id => $id}) ->single; my $purchase = $c->customer->purchases->search({id => $id})->single;
  • 75. == != >= <= <=> Compare and contrast == != >= <= <=>
  • 76. .= += -= *= |= ||= //= Compare and contrast .= += -= *= |= ||= //=
  • 77. >> << >>= <<= Compare and contrast >> << >>= <<=
  • 78. && || // -- ++ ** Compare and contrast && || // -- ++ **
  • 79. -> => :: Compare and contrast -> => ::
  • 80. ~~ .. ... Compare and contrast ~~ .. ...
  • 81. for (1..10) Compare and contrast for (1 ..10)
  • 82. #! ## ### Compare and contrast #! ## ###
  • 84. /* ** */ Compare and contrast /* ** */
  • 85. <!-- --> Compare and contrast <!-- -->
  • 87.
  • 88.
  • 89.
  • 90.
  • 91. Coding fonts with ligatures • Fira Code 
 https://github.com/tonsky/FiraCode • Monoid 
 https://github.com/larsenwork/monoid • Hasklig 
 https://github.com/i-tu/Hasklig • Iosevka 
 https://github.com/be5invis/Iosevka • Pragmata Pro (Commercial)
 https://www.fsd.it/shop/fonts/pragmatapro/
  • 92. Minimizing cognitive load
 in Perl source code parsing javier@rodriguez.org.mx Perl Mongers 20170831 Massachusetts General Hospital and Draper Labs Pretty Programming Fonts