SlideShare a Scribd company logo
1 of 36
Download to read offline
CROSSWORDS
Nick Doiron - @mapmeld
The Asia Foundation
B
U
R
M
E

E
Nick Doiron - @mapmeld
The Asia Foundation
This Talk
• Generating crossword puzzles
• Adapting for NodeJS
• Unicode
• Is this a good idea?
Background: Crosswords
• Popular in 1920s, NY Times started in 1942

• Dec 18, 1941:

“We ought to proceed with the puzzle…
there will now be bleak blackout hours -- or
if not that, then certainly a need for
relaxation…”
Background: Crosswords
• Revisit even a familiar problem with your present
programmer’s mind
Phase 1: the Web
<canvas>
1 2
Approach 1
• Add words
sequentially
• Start offset from
top left
• Alternate across /
down
8
1
2 4
7
6
3 5
Approach 2
• Random start
position
• Random across /
down
Approach 3
• Look for match

in previous
words first
• Randomly sort
previous words
each time
1
4
2
3
5
9
8
6
7
10
Check word ends
• If I’m going down
• Make sure there’s nothing above the
start or below the end
• If I’m going across
• Make sure there’s nothing left of the
start or right of the end
Check the sides
• For each square that I’d place…
• If it’s an existing square
• Only check that the letter matches
• If it’s a new square…
• and word is going across…
• Fail if there’s a letter above or below
• Add a letter
Numbering
• Word starts with a number
• That number should be:
• n, for the n-th word
• i18n_function(n), for the n-th word
• shared_start || i18n_function()
Phase 2: NodeJS
Moving to NodeJS
• Biggest step: one-time sequential creation to:



• Separate browser input from program I/O:
• Enter a value and clicking button ->

game.addWord(	)
• $(“ul.across”).append() ->

Receive clue number and direction (2 Across)

in callback
<canvas> on NodeJS
• npm install canvas
<canvas> on NodeJS
• You need cairo installed

• Special build-pack on Heroku

(and maybe other PaaS)

Phase 3: Unicode
the Unicode you know
Unicode: the dark side
• We don’t talk about:
• Unicode often legitimizes bad
encodings and characters
• Non-compliant fonts and inputs
• Brahmic Scripts
Brahmic Scripts
“Myanmar” in Burmese
မ ြ န ် မ ာ
???
မ င'
က)
ဒ ္ ဓ = ဒ-
RegEx
• Started like this:

(W(?:[ြ|ျ|ွ|ှ|ျ|ေ|ဲ|ာ|ိ|ူ|ု|ံ|်|့|း]+)?္)
• npm install regenerate
Is it a good idea?
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Is it a good idea?
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z
Is it a good idea?
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z
က' က ကiu ;က <က=> က? ကu eကA e;ကA ကB eက?> ကA ကiu> က= ကC ;ကA> ကD> eက?A
ကBE eက?A' ကi ကF ကD <ကiu> <ကi e;က Hက ;ကA က) eကB> က?iu> e;က> ကEI <ကJI ကE ;ကuJ
က?i က?A> eကA' က?K> eကAI eကB ကBA ကFE eကBI <ကiu <ကE eက ;ကu <ကJ eက? က?=>
Is it a good idea?
က'
က ကiu ;က
<က=> က? ကu eကA e;ကA ကB eက?> ကA ကiu> က= ကC ;ကA> ကD> eက?A ကBE eက?A' ကi ကF
ကD <ကiu> <ကi e;က Hက ;ကA က) eကB> က?iu> e;က> ကEI <ကJI ကE ;ကuJ က?i က?A> eကA' က?K>
combined

< 0.5%
eကAI eကB ကBA ကFE eကBI <ကiu <ကE eက ;ကu <ကJ eက? က?=>
One more thing:
ဒ=ေနရAမBA ျမMNA language ထည့္လiuရလA bro
တiu ျမMNA languageနE႔သJုးခ'ကViuပY Help ပYအJုး
How Zawgyi works
Why hate a font?
• Different uses for same code-points
• like Dvorak as a font
• Overwrites minority languages
Fixing
Zawgyi
!
(software
and
hardware)
Thanks!
npm install crossword
Nick Doiron - @mapmeld
The Asia Foundation

More Related Content

Similar to Burmese Crosswords

Lviv PMDay 2016 S Дмитро Маленко: A Brief History of Software Project Management
Lviv PMDay 2016 S Дмитро Маленко: A Brief History of Software Project ManagementLviv PMDay 2016 S Дмитро Маленко: A Brief History of Software Project Management
Lviv PMDay 2016 S Дмитро Маленко: A Brief History of Software Project ManagementLviv Startup Club
 
Reduce, Reuse, Refactor
Reduce, Reuse, RefactorReduce, Reuse, Refactor
Reduce, Reuse, Refactorcklosowski
 
Reduce, Reuse, Refactor
Reduce, Reuse, RefactorReduce, Reuse, Refactor
Reduce, Reuse, Refactorcklosowski
 
Distributed processing of large graphs in python
Distributed processing of large graphs in pythonDistributed processing of large graphs in python
Distributed processing of large graphs in pythonJose Quesada (hiring)
 
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
Just In Time Scalability  Agile Methods To Support Massive Growth PresentationJust In Time Scalability  Agile Methods To Support Massive Growth Presentation
Just In Time Scalability Agile Methods To Support Massive Growth PresentationLong Nguyen
 
Flow Charts and Pseudo Code
Flow Charts and Pseudo CodeFlow Charts and Pseudo Code
Flow Charts and Pseudo Codelistergc
 
PowerPoint Presentation about Programming 101 for Girls
PowerPoint Presentation about Programming 101 for GirlsPowerPoint Presentation about Programming 101 for Girls
PowerPoint Presentation about Programming 101 for GirlsImelda Reyes
 
Crosswords Puzzles - QueensJS
Crosswords Puzzles - QueensJSCrosswords Puzzles - QueensJS
Crosswords Puzzles - QueensJSNick Mapmeld
 
Distributed: Reinventing the Workplace
Distributed: Reinventing the WorkplaceDistributed: Reinventing the Workplace
Distributed: Reinventing the WorkplaceYoav Farhi
 
How to look like a model? MongoDB for Rails apps
How to look like a model? MongoDB for Rails appsHow to look like a model? MongoDB for Rails apps
How to look like a model? MongoDB for Rails appsboogie_cat
 
Hackathon Slides
Hackathon SlidesHackathon Slides
Hackathon SlidesJen Looper
 
Cassandra nice use cases and worst anti patterns
Cassandra nice use cases and worst anti patternsCassandra nice use cases and worst anti patterns
Cassandra nice use cases and worst anti patternsDuyhai Doan
 
Kick-@$$ Sofware Development
Kick-@$$ Sofware DevelopmentKick-@$$ Sofware Development
Kick-@$$ Sofware DevelopmentSven Peters
 
On Hiring (in a Devops World)
On Hiring (in a Devops World)On Hiring (in a Devops World)
On Hiring (in a Devops World)Dave Zwieback
 
Coder dojo Limerick - introduction to programming languages
Coder dojo Limerick - introduction to programming languagesCoder dojo Limerick - introduction to programming languages
Coder dojo Limerick - introduction to programming languagesBank of Ireland
 
Cassandra for the ops dos and donts
Cassandra for the ops   dos and dontsCassandra for the ops   dos and donts
Cassandra for the ops dos and dontsDuyhai Doan
 
Design-Thinking-SXSW-2016
Design-Thinking-SXSW-2016Design-Thinking-SXSW-2016
Design-Thinking-SXSW-2016Jill DaSilva
 
Data Modelling at Scale
Data Modelling at ScaleData Modelling at Scale
Data Modelling at ScaleDavid Simons
 

Similar to Burmese Crosswords (20)

Lviv PMDay 2016 S Дмитро Маленко: A Brief History of Software Project Management
Lviv PMDay 2016 S Дмитро Маленко: A Brief History of Software Project ManagementLviv PMDay 2016 S Дмитро Маленко: A Brief History of Software Project Management
Lviv PMDay 2016 S Дмитро Маленко: A Brief History of Software Project Management
 
Reduce, Reuse, Refactor
Reduce, Reuse, RefactorReduce, Reuse, Refactor
Reduce, Reuse, Refactor
 
Reduce, Reuse, Refactor
Reduce, Reuse, RefactorReduce, Reuse, Refactor
Reduce, Reuse, Refactor
 
TypeScript Go(es) Embedded
TypeScript Go(es) EmbeddedTypeScript Go(es) Embedded
TypeScript Go(es) Embedded
 
Distributed processing of large graphs in python
Distributed processing of large graphs in pythonDistributed processing of large graphs in python
Distributed processing of large graphs in python
 
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
Just In Time Scalability  Agile Methods To Support Massive Growth PresentationJust In Time Scalability  Agile Methods To Support Massive Growth Presentation
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
 
Flow Charts and Pseudo Code
Flow Charts and Pseudo CodeFlow Charts and Pseudo Code
Flow Charts and Pseudo Code
 
PowerPoint Presentation about Programming 101 for Girls
PowerPoint Presentation about Programming 101 for GirlsPowerPoint Presentation about Programming 101 for Girls
PowerPoint Presentation about Programming 101 for Girls
 
Crosswords Puzzles - QueensJS
Crosswords Puzzles - QueensJSCrosswords Puzzles - QueensJS
Crosswords Puzzles - QueensJS
 
Distributed: Reinventing the Workplace
Distributed: Reinventing the WorkplaceDistributed: Reinventing the Workplace
Distributed: Reinventing the Workplace
 
How to look like a model? MongoDB for Rails apps
How to look like a model? MongoDB for Rails appsHow to look like a model? MongoDB for Rails apps
How to look like a model? MongoDB for Rails apps
 
Hackathon Slides
Hackathon SlidesHackathon Slides
Hackathon Slides
 
Cassandra nice use cases and worst anti patterns
Cassandra nice use cases and worst anti patternsCassandra nice use cases and worst anti patterns
Cassandra nice use cases and worst anti patterns
 
Kick-@$$ Sofware Development
Kick-@$$ Sofware DevelopmentKick-@$$ Sofware Development
Kick-@$$ Sofware Development
 
Enchant at BIMTECH
Enchant at BIMTECHEnchant at BIMTECH
Enchant at BIMTECH
 
On Hiring (in a Devops World)
On Hiring (in a Devops World)On Hiring (in a Devops World)
On Hiring (in a Devops World)
 
Coder dojo Limerick - introduction to programming languages
Coder dojo Limerick - introduction to programming languagesCoder dojo Limerick - introduction to programming languages
Coder dojo Limerick - introduction to programming languages
 
Cassandra for the ops dos and donts
Cassandra for the ops   dos and dontsCassandra for the ops   dos and donts
Cassandra for the ops dos and donts
 
Design-Thinking-SXSW-2016
Design-Thinking-SXSW-2016Design-Thinking-SXSW-2016
Design-Thinking-SXSW-2016
 
Data Modelling at Scale
Data Modelling at ScaleData Modelling at Scale
Data Modelling at Scale
 

More from Nicholas Doiron

Quantum Computers and Where to Hide from Them (Japanese)
Quantum Computers and Where to Hide from Them (Japanese)Quantum Computers and Where to Hide from Them (Japanese)
Quantum Computers and Where to Hide from Them (Japanese)Nicholas Doiron
 
Arabic Unicode and Calligraphy
Arabic Unicode and CalligraphyArabic Unicode and Calligraphy
Arabic Unicode and CalligraphyNicholas Doiron
 
Building Encrypted APIs with HTTPS and Paillier
Building Encrypted APIs with HTTPS and PaillierBuilding Encrypted APIs with HTTPS and Paillier
Building Encrypted APIs with HTTPS and PaillierNicholas Doiron
 
Code for Japan: Civic Tech and Maps
Code for Japan: Civic Tech and MapsCode for Japan: Civic Tech and Maps
Code for Japan: Civic Tech and MapsNicholas Doiron
 
If OLPC started today... JSConf.is
If OLPC started today... JSConf.isIf OLPC started today... JSConf.is
If OLPC started today... JSConf.isNicholas Doiron
 
Demolitions and Dali : Web Dev and Data in a Graph Database
Demolitions and Dali : Web Dev and Data in a Graph DatabaseDemolitions and Dali : Web Dev and Data in a Graph Database
Demolitions and Dali : Web Dev and Data in a Graph DatabaseNicholas Doiron
 
Future of Home: Living on the Run with Airbnb
Future of Home: Living on the Run with AirbnbFuture of Home: Living on the Run with Airbnb
Future of Home: Living on the Run with AirbnbNicholas Doiron
 
Community Planning: Less Maps, More Design
Community Planning: Less Maps, More DesignCommunity Planning: Less Maps, More Design
Community Planning: Less Maps, More DesignNicholas Doiron
 
RobotsConf - Wiring, Soldering, Prototyping
RobotsConf - Wiring, Soldering, PrototypingRobotsConf - Wiring, Soldering, Prototyping
RobotsConf - Wiring, Soldering, PrototypingNicholas Doiron
 
CartoDrop: secure mapping and reporting over Tor
CartoDrop: secure mapping and reporting over TorCartoDrop: secure mapping and reporting over Tor
CartoDrop: secure mapping and reporting over TorNicholas Doiron
 
CfA Ignite 2013: Uploading an Island, the Ultimate Backup Plan
CfA Ignite 2013: Uploading an Island, the Ultimate Backup PlanCfA Ignite 2013: Uploading an Island, the Ultimate Backup Plan
CfA Ignite 2013: Uploading an Island, the Ultimate Backup PlanNicholas Doiron
 
Code for America & the War on Git
Code for America & the War on GitCode for America & the War on Git
Code for America & the War on GitNicholas Doiron
 
MajuroJS.org (Chicago presentation)
MajuroJS.org (Chicago presentation)MajuroJS.org (Chicago presentation)
MajuroJS.org (Chicago presentation)Nicholas Doiron
 
How Code for America Makes Maps
How Code for America Makes MapsHow Code for America Makes Maps
How Code for America Makes MapsNicholas Doiron
 

More from Nicholas Doiron (20)

Quantum Computers and Where to Hide from Them (Japanese)
Quantum Computers and Where to Hide from Them (Japanese)Quantum Computers and Where to Hide from Them (Japanese)
Quantum Computers and Where to Hide from Them (Japanese)
 
Arabic Unicode and Calligraphy
Arabic Unicode and CalligraphyArabic Unicode and Calligraphy
Arabic Unicode and Calligraphy
 
Building Encrypted APIs with HTTPS and Paillier
Building Encrypted APIs with HTTPS and PaillierBuilding Encrypted APIs with HTTPS and Paillier
Building Encrypted APIs with HTTPS and Paillier
 
Code for Japan: Civic Tech and Maps
Code for Japan: Civic Tech and MapsCode for Japan: Civic Tech and Maps
Code for Japan: Civic Tech and Maps
 
Post-Quantum Dev Ops
Post-Quantum Dev OpsPost-Quantum Dev Ops
Post-Quantum Dev Ops
 
If OLPC started today... JSConf.is
If OLPC started today... JSConf.isIf OLPC started today... JSConf.is
If OLPC started today... JSConf.is
 
Demolitions and Dali : Web Dev and Data in a Graph Database
Demolitions and Dali : Web Dev and Data in a Graph DatabaseDemolitions and Dali : Web Dev and Data in a Graph Database
Demolitions and Dali : Web Dev and Data in a Graph Database
 
NodeJS in Naypyitaw
NodeJS in NaypyitawNodeJS in Naypyitaw
NodeJS in Naypyitaw
 
Future of Home: Living on the Run with Airbnb
Future of Home: Living on the Run with AirbnbFuture of Home: Living on the Run with Airbnb
Future of Home: Living on the Run with Airbnb
 
The Civic Deep Web
The Civic Deep WebThe Civic Deep Web
The Civic Deep Web
 
Community Planning: Less Maps, More Design
Community Planning: Less Maps, More DesignCommunity Planning: Less Maps, More Design
Community Planning: Less Maps, More Design
 
RobotsConf - Wiring, Soldering, Prototyping
RobotsConf - Wiring, Soldering, PrototypingRobotsConf - Wiring, Soldering, Prototyping
RobotsConf - Wiring, Soldering, Prototyping
 
CartoDrop: secure mapping and reporting over Tor
CartoDrop: secure mapping and reporting over TorCartoDrop: secure mapping and reporting over Tor
CartoDrop: secure mapping and reporting over Tor
 
CfA Ignite 2013: Uploading an Island, the Ultimate Backup Plan
CfA Ignite 2013: Uploading an Island, the Ultimate Backup PlanCfA Ignite 2013: Uploading an Island, the Ultimate Backup Plan
CfA Ignite 2013: Uploading an Island, the Ultimate Backup Plan
 
Code for America & the War on Git
Code for America & the War on GitCode for America & the War on Git
Code for America & the War on Git
 
GeoGit for Open Data
GeoGit for Open DataGeoGit for Open Data
GeoGit for Open Data
 
MajuroJS.org (Chicago presentation)
MajuroJS.org (Chicago presentation)MajuroJS.org (Chicago presentation)
MajuroJS.org (Chicago presentation)
 
Maps No One Wants
Maps No One WantsMaps No One Wants
Maps No One Wants
 
Unicode vs The World
Unicode vs The WorldUnicode vs The World
Unicode vs The World
 
How Code for America Makes Maps
How Code for America Makes MapsHow Code for America Makes Maps
How Code for America Makes Maps
 

Recently uploaded

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 

Recently uploaded (20)

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 

Burmese Crosswords

  • 1. CROSSWORDS Nick Doiron - @mapmeld The Asia Foundation B U R M E
 E
  • 2. Nick Doiron - @mapmeld The Asia Foundation
  • 3.
  • 4. This Talk • Generating crossword puzzles • Adapting for NodeJS • Unicode • Is this a good idea?
  • 5. Background: Crosswords • Popular in 1920s, NY Times started in 1942
 • Dec 18, 1941:
 “We ought to proceed with the puzzle… there will now be bleak blackout hours -- or if not that, then certainly a need for relaxation…”
  • 6. Background: Crosswords • Revisit even a familiar problem with your present programmer’s mind
  • 9. Approach 1 • Add words sequentially • Start offset from top left • Alternate across / down 8 1 2 4 7 6 3 5
  • 10. Approach 2 • Random start position • Random across / down
  • 11. Approach 3 • Look for match
 in previous words first • Randomly sort previous words each time 1 4 2 3 5 9 8 6 7 10
  • 12. Check word ends • If I’m going down • Make sure there’s nothing above the start or below the end • If I’m going across • Make sure there’s nothing left of the start or right of the end
  • 13. Check the sides • For each square that I’d place… • If it’s an existing square • Only check that the letter matches • If it’s a new square… • and word is going across… • Fail if there’s a letter above or below • Add a letter
  • 14. Numbering • Word starts with a number • That number should be: • n, for the n-th word • i18n_function(n), for the n-th word • shared_start || i18n_function()
  • 16. Moving to NodeJS • Biggest step: one-time sequential creation to:
 
 • Separate browser input from program I/O: • Enter a value and clicking button ->
 game.addWord( ) • $(“ul.across”).append() ->
 Receive clue number and direction (2 Across)
 in callback
  • 17. <canvas> on NodeJS • npm install canvas
  • 18. <canvas> on NodeJS • You need cairo installed
 • Special build-pack on Heroku
 (and maybe other PaaS)

  • 21. Unicode: the dark side • We don’t talk about: • Unicode often legitimizes bad encodings and characters • Non-compliant fonts and inputs • Brahmic Scripts
  • 23. “Myanmar” in Burmese မ ြ န ် မ ာ
  • 25. RegEx • Started like this:
 (W(?:[ြ|ျ|ွ|ှ|ျ|ေ|ဲ|ာ|ိ|ူ|ု|ံ|်|့|း]+)?္) • npm install regenerate
  • 26.
  • 27. Is it a good idea? A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
  • 28. Is it a good idea? A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z
  • 29. Is it a good idea? A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z က' က ကiu ;က <က=> က? ကu eကA e;ကA ကB eက?> ကA ကiu> က= ကC ;ကA> ကD> eက?A ကBE eက?A' ကi ကF ကD <ကiu> <ကi e;က Hက ;ကA က) eကB> က?iu> e;က> ကEI <ကJI ကE ;ကuJ က?i က?A> eကA' က?K> eကAI eကB ကBA ကFE eကBI <ကiu <ကE eက ;ကu <ကJ eက? က?=>
  • 30. Is it a good idea? က' က ကiu ;က <က=> က? ကu eကA e;ကA ကB eက?> ကA ကiu> က= ကC ;ကA> ကD> eက?A ကBE eက?A' ကi ကF ကD <ကiu> <ကi e;က Hက ;ကA က) eကB> က?iu> e;က> ကEI <ကJI ကE ;ကuJ က?i က?A> eကA' က?K> combined
 < 0.5% eကAI eကB ကBA ကFE eကBI <ကiu <ကE eက ;ကu <ကJ eက? က?=>
  • 31. One more thing: ဒ=ေနရAမBA ျမMNA language ထည့္လiuရလA bro တiu ျမMNA languageနE႔သJုးခ'ကViuပY Help ပYအJုး
  • 33. Why hate a font? • Different uses for same code-points • like Dvorak as a font • Overwrites minority languages
  • 34.
  • 36. Thanks! npm install crossword Nick Doiron - @mapmeld The Asia Foundation