WORLDWARECONFERENCE
Static Analysis for I18n
Adam Asnes
President and CEO
Lingoport
www.lingoport.com
P: 303.444.8020Lingoport, Inc.3980 BroadwayBoulder, ColoradoUSA 80304+1 303 444 8020www.lingoport.com
Saturday, April 8, 2023
WORLDWARECONFERENCE
Presenters• Adam Asnes
– Lingoport
WORLDWARECONFERENCE
Agenda
• Business Case• Traditional Approach• Globalyzer• Static Analysis Demonstration• ROI: Implications and Examples• Questions and Answers
WORLDWARECONFERENCE
Business Case:
Nothing gets internationalized or localized just because it would be cool
WORLDWARECONFERENCE
Business Case – why it’s important• Survival• Global Revenues
– Key business partners– 60% or more of revenues
• Competitiveness• Strategic Growth
WORLDWARECONFERENCE
Business Case• Localization Support
– U/I and data management/presentation
• Enterprise Customer Support– Global enterprise customers need Unicode support– DB and presentation must support client needs
WORLDWARECONFERENCE
Is It Internationalized?• Developers often underestimate i18n
requirements• Most don’t know the answer• Agile or other feature and release requirements
often overrun less formally measured i18n requirements
• There is a Management Value in being able to confirm global readiness
WORLDWARECONFERENCE
Traditional Approach - repeat, and repeat, and repeat, and repeat
Localize and see what you’re
missing
GREP, overwhelm developers
View pages. Pour through code for
strings, methods, etc.
Externalize and refactor one by
one
Test, Pseudo-Localize
WORLDWARECONFERENCE
Tiers and Technologies
1 •Java•C#
2 •JavaScript•VB
3 •C++•Older languages: e.g. RPGTime and effort increase
WORLDWARECONFERENCE
Traditional Approach
• Tedious Search – “hunt and peck”• Simple scripts and pseudo-localization testing is
insufficient and iterative by nature• IDEs are poor at finding i18n issues and across
programming languages• Finding issues too late• Ugly surprises during localization
– or worse, after release
WORLDWARECONFERENCE
Source: “Software Internationalization Tools and Solutions” - Xerox
Catch Bugs Early!
Mai
nten
ance
Loca
lizat
ion
Acc
epta
nce
Test
ing
Cod
ing
Arc
hite
ctur
e an
d D
esig
n
Req
uire
men
ts
30 x
15 x
7 x
4 x
2 x
Development Phase whenan I18N bug is detected
WORLDWARECONFERENCE
Testing vs. Static Analysis• Testing only validates what can be easily
exercised– Hard to cover error messages and all aspects of the
interface– Expensive and inefficient process
• Static Analysis– Evaluates issues at the source level
• Covers the entire application
– Guides development through solutions
WORLDWARECONFERENCE
Static I18n Analysis• Frequent i18n analysis speeds the process and
– Measures how coding practices are in compliance with i18n standards
– What gets measured improves
• $$$ value in answering management that the software is global and meets a set of standards
WORLDWARECONFERENCE
Examples of what to look for?• Presentation
– Embedded Strings– Concatenation
• Data– Display
• E.g. Calendar, numerical formatting
– Processing e.g.• String processing logic• Character encoding
• Other– Pattern matching for special cases
WORLDWARECONFERENCE
Globalyzer
Manage, perform and track internationalization so you’re ready for localization
WORLDWARECONFERENCE
Globalyzer Server and Clients
Server
Client
Command Line
WORLDWARECONFERENCE
Static Analysis Example
With Globalyzer 3.2www.globlayzer.com
WORLDWARECONFERENCE
Detection• Embedded Strings• Locale-unsafe methods, functions, classes per
programming language• Locale-unsafe programming patters
• Filtering– Conditional – using regex– Dictionary matches for strings– Special exceptions– Individual issue status
WORLDWARECONFERENCE
Building your own Tools• Painful to consider, especially over multiple
programming languages– How do you search for strings?– Research and find methods/functions/classes across
programming languages– Difficult to gain intelligent results that can be built
upon for precise direction during implementation– Hard to track issues– You now have to support it!
WORLDWARECONFERENCE
Obstacles to Acceptance• False Positives – too many issues detected
overwhelms developers• Globalyzer filtering• Globalyzer project files• Globalyzer DB tracks issues and exceptions
– “Auto-magic” solutions usually don’t work in a highly variable environment. Adaptation is a better solution.
WORLDWARECONFERENCE
Resource Hours per I18N bug
Avg # bugs per release
Avg product releases/yr
Avg Cost per hour Cost
L10N Vendor QA
1 25 60 55 82,500
L10N PM 1 25 60 45 67,500
L10N QA 2 25 60 45 135,000
Core QA 2 25 60 45 135,000
Core Eng 4 25 60 57 342,000
Total Cost/Yr $762,000
Product I18N bug count
Release :
A 27
B 1
C 15
D 2
E 8
F 3
G 5
H 8
I 34
J 31
K 6
L 0
M 0
N 49
O 85
P 140
Q 46
• When I18N issues are discovered during L10N testing, time is spent by 5 different groups of workers
• If we avoided I18N errors, we could save $762K /yr
• If we caught I18N errors at the source, we could save $420K/yr
Cost of Fixing I18N Issues During Localization
WORLDWARECONFERENCE
Management Rule
• Whatever Gets Measured Improves