SlideShare a Scribd company logo
Minimizing cognitive load

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

Perl Mongers 20170831
Massachusetts General Hospital and Draper Labs
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
https://http.cat/403
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
A morning together
A morning together
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
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.”
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
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/
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming 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/
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
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
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
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 />
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty programming fonts)
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 (6)

PPTX
About Best friends - HTML, CSS and JS
Naga Harish M
 
PDF
10- Learn CSS Fundamentals / Pseudo-elements
In a Rocket
 
ODP
Ruby on Rails
Aizat Faiz
 
PDF
14- Learn CSS Fundamentals / Inheritance
In a Rocket
 
PPT
Jquery presentation
guest5d87aa6
 
ODP
Intro to #memtech PHP 2011-12-05
Jeremy Kendall
 
About Best friends - HTML, CSS and JS
Naga Harish M
 
10- Learn CSS Fundamentals / Pseudo-elements
In a Rocket
 
Ruby on Rails
Aizat Faiz
 
14- Learn CSS Fundamentals / Inheritance
In a Rocket
 
Jquery presentation
guest5d87aa6
 
Intro to #memtech PHP 2011-12-05
Jeremy Kendall
 

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

PDF
Living With Legacy Code
Rowan Merewood
 
ODP
Best practices tekx
Lorna Mitchell
 
PDF
Working Effectively With Legacy Perl Code
erikmsp
 
KEY
Development tools
Robert Deutz
 
PDF
Parsing and Type checking all 2^10000 configurations of the Linux kernel
chk49
 
PDF
Coding for Designers. A primer. By Fabian Fabian
Codemotion
 
PDF
Perl-crash-course
tutorialsruby
 
PDF
Perl-crash-course
tutorialsruby
 
PDF
Perl-crash-course
tutorialsruby
 
PDF
Perl-crash-course
tutorialsruby
 
KEY
groovy & grails - lecture 6
Alexandre Masselot
 
KEY
Development workflow
Sigsiu.NET
 
PDF
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
Alessandro Confetti
 
KEY
Converging Textual and Graphical Editors
meysholdt
 
PDF
PHP Forum Paris 2012: Magic behind the numbers. Software metrics in practice
Sebastian Marek
 
PDF
Passing the Joel Test in the PHP World (phpbnl10)
Lorna Mitchell
 
PDF
Effective code reviews
Sebastian Marek
 
PDF
Care and feeding notes
Perrin Harkins
 
KEY
Xtext Best Practices
Sebastian Zarnekow
 
KEY
Pointcut Rejuvenation: Recovering Pointcut Expressions in Evolving Aspect-Ori...
Raffi Khatchadourian
 
Living With Legacy Code
Rowan Merewood
 
Best practices tekx
Lorna Mitchell
 
Working Effectively With Legacy Perl Code
erikmsp
 
Development tools
Robert Deutz
 
Parsing and Type checking all 2^10000 configurations of the Linux kernel
chk49
 
Coding for Designers. A primer. By Fabian Fabian
Codemotion
 
Perl-crash-course
tutorialsruby
 
Perl-crash-course
tutorialsruby
 
Perl-crash-course
tutorialsruby
 
Perl-crash-course
tutorialsruby
 
groovy & grails - lecture 6
Alexandre Masselot
 
Development workflow
Sigsiu.NET
 
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
Alessandro Confetti
 
Converging Textual and Graphical Editors
meysholdt
 
PHP Forum Paris 2012: Magic behind the numbers. Software metrics in practice
Sebastian Marek
 
Passing the Joel Test in the PHP World (phpbnl10)
Lorna Mitchell
 
Effective code reviews
Sebastian Marek
 
Care and feeding notes
Perrin Harkins
 
Xtext Best Practices
Sebastian Zarnekow
 
Pointcut Rejuvenation: Recovering Pointcut Expressions in Evolving Aspect-Ori...
Raffi Khatchadourian
 
Ad

More from Javier Arturo Rodríguez (9)

PDF
Introduction to ansible
Javier Arturo Rodríguez
 
PDF
WordPress Performance Tuning
Javier Arturo Rodríguez
 
PDF
WordPress for SysAdmins
Javier Arturo Rodríguez
 
PDF
Easy native wrappers with SWIG
Javier Arturo Rodríguez
 
PDF
Open Data: a view from the trenches
Javier Arturo Rodríguez
 
PDF
Barcelona.pm Curs1211 sess01
Javier Arturo Rodríguez
 
PDF
Build an autoversioning filesystem with Apache2
Javier Arturo Rodríguez
 
PDF
Periodismo de Datos II: Construyendo y explorando conjuntos de datos con las ...
Javier Arturo Rodríguez
 
PDF
DatosEnCrudo.org
Javier Arturo Rodríguez
 
Introduction to ansible
Javier Arturo Rodríguez
 
WordPress Performance Tuning
Javier Arturo Rodríguez
 
WordPress for SysAdmins
Javier Arturo Rodríguez
 
Easy native wrappers with SWIG
Javier Arturo Rodríguez
 
Open Data: a view from the trenches
Javier Arturo Rodríguez
 
Barcelona.pm Curs1211 sess01
Javier Arturo Rodríguez
 
Build an autoversioning filesystem with Apache2
Javier Arturo Rodríguez
 
Periodismo de Datos II: Construyendo y explorando conjuntos de datos con las ...
Javier Arturo Rodríguez
 
DatosEnCrudo.org
Javier Arturo Rodríguez
 
Ad

Recently uploaded (20)

PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
PPTX
Practical Applications of AI in Local Government
OnBoard
 
PDF
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
yosra Saidani
 
PDF
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
PDF
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
PDF
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
PPTX
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
PPTX
𝙳𝚘𝚠𝚗𝚕𝚘𝚊𝚍—Wondershare Filmora Crack 14.0.7 + Key Download 2025
sebastian aliya
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
PDF
The Growing Value and Application of FME & GenAI
Safe Software
 
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
PPTX
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
PDF
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
Practical Applications of AI in Local Government
OnBoard
 
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
yosra Saidani
 
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
𝙳𝚘𝚠𝚗𝚕𝚘𝚊𝚍—Wondershare Filmora Crack 14.0.7 + Key Download 2025
sebastian aliya
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
The Growing Value and Application of FME & GenAI
Safe Software
 
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 

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