SlideShare a Scribd company logo
The Practice of Programming -
Portability
Author : Juggernaut Liu
Date : 2014/04/18
Outline
• Introduction
• Language
• Headers and Libraries
• Program Organization
• Isolation
• Data Exchange
• Byte Order
• Portability and Upgrade
• Internationalization
Robert Venturi, Complexity and Contradiction in Architecture
Finally, standardization, like convention, can be another
manifestation of the strong order. But unlike convention it
has been accepted in Modern architecture as an enriching
product of our technology, yet dreaded for its potential
domination and brutality.
Introduction
Why do we worry about portability?
• Less maintenance and more utility
• Environments change
• A portable program is a better designed program
Language (1)
• Stick to the standard
• Program in the mainstream
• Sizes of data types
o sizeof (char) <= sizeof (short) <= sizeof (int) <= sizeof (long)
o sizeof (float) <= sizeof (double)
• Order of evaluation
o n = (getchar() <<8) | getchar()
Language (2)
• Signedness of char
Language (3)
• Alignment of structure and class members
o sizeof (struct X) bytes,
o not sizeof (char) + sizeof(int)
• Try several compilers
Headers and Libraries
• Use standard libraries
• Problems
o Headers tend to be cluttered
o Header files also can "pollute" the namespace by
declaring a function with the same name
• Solutions
o Use a different header for each compiler or environment
o Redefining the name
Program Organization
• Union vs Intersection
o Conditional compilation
o Include a header which defines all
• Suggestion
o Use only features available everywhere
o Avoid conditional compilation
Avoid conditional compilation(1)
VS
Avoid conditional compilation(2)
VS
Log4XXX can do it too.
Isolation
• Localize system dependencies in separate files
• Hide system dependencies behind interfaces
o Abstraction
o The I/O libraries are good samples
• Java is a good sample
Data Exchange
• Use Text for data exchange
Byte Order(1)
• Binary Data is more compact and faster
• little-endian vs big-endian
Byte Order(2)
• Use a fixed byte order for data exchange
• Sender and receiver agree on the byte order in
transmission
Portability and Upgrade
• Change the name if you change the specification
• Maintain compatibility with existing programs
and data
Internationalization
• Do not assume ASCII
o Unicode
o UTF-8
o Wide Characters (C/C++)
• Do not assume English
o L10N
o UI
Summary
• Portable code is an ideal that is well worth striving for, since
so much time is wasted making changes to move a program
from one system to another or to keep it running as it evolves
and the systems it runs on changes.
• The intersection approach is better than the union one.
o Loss of efficiency and features
o Z>B

More Related Content

What's hot

Allocation methods continuous method.47
Allocation methods continuous method.47 Allocation methods continuous method.47
Allocation methods continuous method.47 myrajendra
 
Presentation ASLIB 2014_Ghoula
Presentation ASLIB 2014_GhoulaPresentation ASLIB 2014_Ghoula
Presentation ASLIB 2014_GhoulaNizar Ghoula
 
STAT Requirement Analysis
STAT Requirement AnalysisSTAT Requirement Analysis
STAT Requirement Analysisstat
 
20 basic computer mcqs
20 basic computer mcqs20 basic computer mcqs
20 basic computer mcqs
shah ali
 
Disk allocation methods
Disk allocation methodsDisk allocation methods
Disk allocation methods
ajeela mushtaq
 
Microsoft power point chapter 5 file edited
Microsoft power point   chapter 5 file editedMicrosoft power point   chapter 5 file edited
Microsoft power point chapter 5 file edited
Linga Lgs
 
Code Search Based on Deep Neural Network and Code Mutation
Code Search Based on Deep Neural Network and Code MutationCode Search Based on Deep Neural Network and Code Mutation
Code Search Based on Deep Neural Network and Code Mutation
Norihiro Yoshida
 
Linked Open Data: A simple how-to
Linked Open Data: A simple how-toLinked Open Data: A simple how-to
Linked Open Data: A simple how-to
nvitucci
 
LDP-DL: A language to define the design of Linked Data Platforms
LDP-DL: A language to define the design of Linked Data PlatformsLDP-DL: A language to define the design of Linked Data Platforms
LDP-DL: A language to define the design of Linked Data Platforms
Mohammad Noorani Bakerally
 
The eXtensible Catalog Drupal Toolkit
The eXtensible Catalog Drupal ToolkitThe eXtensible Catalog Drupal Toolkit
The eXtensible Catalog Drupal Toolkit
Péter Király
 
File access methods.54
File access methods.54File access methods.54
File access methods.54myrajendra
 

What's hot (12)

Allocation methods continuous method.47
Allocation methods continuous method.47 Allocation methods continuous method.47
Allocation methods continuous method.47
 
Presentation ASLIB 2014_Ghoula
Presentation ASLIB 2014_GhoulaPresentation ASLIB 2014_Ghoula
Presentation ASLIB 2014_Ghoula
 
STAT Requirement Analysis
STAT Requirement AnalysisSTAT Requirement Analysis
STAT Requirement Analysis
 
20 basic computer mcqs
20 basic computer mcqs20 basic computer mcqs
20 basic computer mcqs
 
Disk allocation methods
Disk allocation methodsDisk allocation methods
Disk allocation methods
 
Microsoft power point chapter 5 file edited
Microsoft power point   chapter 5 file editedMicrosoft power point   chapter 5 file edited
Microsoft power point chapter 5 file edited
 
A few words about Search
A few words about SearchA few words about Search
A few words about Search
 
Code Search Based on Deep Neural Network and Code Mutation
Code Search Based on Deep Neural Network and Code MutationCode Search Based on Deep Neural Network and Code Mutation
Code Search Based on Deep Neural Network and Code Mutation
 
Linked Open Data: A simple how-to
Linked Open Data: A simple how-toLinked Open Data: A simple how-to
Linked Open Data: A simple how-to
 
LDP-DL: A language to define the design of Linked Data Platforms
LDP-DL: A language to define the design of Linked Data PlatformsLDP-DL: A language to define the design of Linked Data Platforms
LDP-DL: A language to define the design of Linked Data Platforms
 
The eXtensible Catalog Drupal Toolkit
The eXtensible Catalog Drupal ToolkitThe eXtensible Catalog Drupal Toolkit
The eXtensible Catalog Drupal Toolkit
 
File access methods.54
File access methods.54File access methods.54
File access methods.54
 

Viewers also liked

Unit test demo for calculatechinesenamenumber
Unit test demo for calculatechinesenamenumberUnit test demo for calculatechinesenamenumber
Unit test demo for calculatechinesenamenumberJuggernaut Liu
 
需求怎麼估 20150424新竹scrum社群分享
需求怎麼估 20150424新竹scrum社群分享需求怎麼估 20150424新竹scrum社群分享
需求怎麼估 20150424新竹scrum社群分享
Juggernaut Liu
 
The Practice of Programming - Notation
The Practice of Programming - NotationThe Practice of Programming - Notation
The Practice of Programming - Notation
Juggernaut Liu
 
快快樂樂打造自動化開發環境
快快樂樂打造自動化開發環境快快樂樂打造自動化開發環境
快快樂樂打造自動化開發環境
Chen Cheng-Wei
 
別用KPI折磨團隊 - 敏捷團隊的績效評量
別用KPI折磨團隊 - 敏捷團隊的績效評量別用KPI折磨團隊 - 敏捷團隊的績效評量
別用KPI折磨團隊 - 敏捷團隊的績效評量
Yves Lin
 
Scrum 路上的血與淚
Scrum 路上的血與淚Scrum 路上的血與淚
Scrum 路上的血與淚
Yves Lin
 
ScrumMaster 的吃飯傢伙 – 引導出個夢幻團隊 Building a Dream Team with Facilitation
ScrumMaster 的吃飯傢伙 – 引導出個夢幻團隊 Building a Dream Team with FacilitationScrumMaster 的吃飯傢伙 – 引導出個夢幻團隊 Building a Dream Team with Facilitation
ScrumMaster 的吃飯傢伙 – 引導出個夢幻團隊 Building a Dream Team with Facilitation
Yves Lin
 
空手、緊握、到放手 – 敏捷路上學到的5件事
空手、緊握、到放手 – 敏捷路上學到的5件事 空手、緊握、到放手 – 敏捷路上學到的5件事
空手、緊握、到放手 – 敏捷路上學到的5件事
Yves Lin
 
提到 DevOps 到底在
談些什麼玩意兒?(@ Agile Tour Taichung 2017)
提到 DevOps 到底在
談些什麼玩意兒?(@ Agile Tour Taichung 2017)提到 DevOps 到底在
談些什麼玩意兒?(@ Agile Tour Taichung 2017)
提到 DevOps 到底在
談些什麼玩意兒?(@ Agile Tour Taichung 2017)
Chen Cheng-Wei
 
Design Patterns這樣學就會了:入門班 Day1 教材
Design Patterns這樣學就會了:入門班 Day1 教材Design Patterns這樣學就會了:入門班 Day1 教材
Design Patterns這樣學就會了:入門班 Day1 教材teddysoft
 
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
ChinaNetCloud
 
ORID焦點討論法 - 白話入門篇
ORID焦點討論法 - 白話入門篇ORID焦點討論法 - 白話入門篇
ORID焦點討論法 - 白話入門篇
Chuang Shu-Ting
 
從廢柴到成材 - 那 20 個 sprints 教會我們的事 C.C Agile #40
從廢柴到成材 - 那 20 個 sprints 教會我們的事 C.C Agile #40從廢柴到成材 - 那 20 個 sprints 教會我們的事 C.C Agile #40
從廢柴到成材 - 那 20 個 sprints 教會我們的事 C.C Agile #40
diro fan
 

Viewers also liked (13)

Unit test demo for calculatechinesenamenumber
Unit test demo for calculatechinesenamenumberUnit test demo for calculatechinesenamenumber
Unit test demo for calculatechinesenamenumber
 
需求怎麼估 20150424新竹scrum社群分享
需求怎麼估 20150424新竹scrum社群分享需求怎麼估 20150424新竹scrum社群分享
需求怎麼估 20150424新竹scrum社群分享
 
The Practice of Programming - Notation
The Practice of Programming - NotationThe Practice of Programming - Notation
The Practice of Programming - Notation
 
快快樂樂打造自動化開發環境
快快樂樂打造自動化開發環境快快樂樂打造自動化開發環境
快快樂樂打造自動化開發環境
 
別用KPI折磨團隊 - 敏捷團隊的績效評量
別用KPI折磨團隊 - 敏捷團隊的績效評量別用KPI折磨團隊 - 敏捷團隊的績效評量
別用KPI折磨團隊 - 敏捷團隊的績效評量
 
Scrum 路上的血與淚
Scrum 路上的血與淚Scrum 路上的血與淚
Scrum 路上的血與淚
 
ScrumMaster 的吃飯傢伙 – 引導出個夢幻團隊 Building a Dream Team with Facilitation
ScrumMaster 的吃飯傢伙 – 引導出個夢幻團隊 Building a Dream Team with FacilitationScrumMaster 的吃飯傢伙 – 引導出個夢幻團隊 Building a Dream Team with Facilitation
ScrumMaster 的吃飯傢伙 – 引導出個夢幻團隊 Building a Dream Team with Facilitation
 
空手、緊握、到放手 – 敏捷路上學到的5件事
空手、緊握、到放手 – 敏捷路上學到的5件事 空手、緊握、到放手 – 敏捷路上學到的5件事
空手、緊握、到放手 – 敏捷路上學到的5件事
 
提到 DevOps 到底在
談些什麼玩意兒?(@ Agile Tour Taichung 2017)
提到 DevOps 到底在
談些什麼玩意兒?(@ Agile Tour Taichung 2017)提到 DevOps 到底在
談些什麼玩意兒?(@ Agile Tour Taichung 2017)
提到 DevOps 到底在
談些什麼玩意兒?(@ Agile Tour Taichung 2017)
 
Design Patterns這樣學就會了:入門班 Day1 教材
Design Patterns這樣學就會了:入門班 Day1 教材Design Patterns這樣學就會了:入門班 Day1 教材
Design Patterns這樣學就會了:入門班 Day1 教材
 
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
Dev-Ops与Docker的最佳实践 QCon2016 北京站演讲
 
ORID焦點討論法 - 白話入門篇
ORID焦點討論法 - 白話入門篇ORID焦點討論法 - 白話入門篇
ORID焦點討論法 - 白話入門篇
 
從廢柴到成材 - 那 20 個 sprints 教會我們的事 C.C Agile #40
從廢柴到成材 - 那 20 個 sprints 教會我們的事 C.C Agile #40從廢柴到成材 - 那 20 個 sprints 教會我們的事 C.C Agile #40
從廢柴到成材 - 那 20 個 sprints 教會我們的事 C.C Agile #40
 

Similar to Portability

Open Source SQL Databases
Open Source SQL DatabasesOpen Source SQL Databases
Open Source SQL Databases
Emanuel Calvo
 
Data Diffing Based Software Architecture Patterns
Data Diffing Based Software Architecture PatternsData Diffing Based Software Architecture Patterns
Data Diffing Based Software Architecture Patterns
Huahai Yang
 
Protobuff and gRPC
Protobuff and gRPCProtobuff and gRPC
Protobuff and gRPC
Uraz Pokharel
 
2018 12-kube con-ballerinacon
2018 12-kube con-ballerinacon2018 12-kube con-ballerinacon
2018 12-kube con-ballerinacon
Sanjiva Weerawarana
 
Data Serialization in Python JSON vs. Pickle
Data Serialization in Python JSON vs. PickleData Serialization in Python JSON vs. Pickle
Data Serialization in Python JSON vs. Pickle
Inexture Solutions
 
Reading Notes : the practice of programming
Reading Notes : the practice of programmingReading Notes : the practice of programming
Reading Notes : the practice of programming
Juggernaut Liu
 
Realizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache BeamRealizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache Beam
DataWorks Summit
 
ROS - an open-source Robot Operating System
ROS - an open-source Robot Operating SystemROS - an open-source Robot Operating System
ROS - an open-source Robot Operating System
abirpahlwan
 
Portable Lucene Index Format & Applications - Andrzej Bialecki
Portable Lucene Index Format & Applications - Andrzej BialeckiPortable Lucene Index Format & Applications - Andrzej Bialecki
Portable Lucene Index Format & Applications - Andrzej Bialecki
lucenerevolution
 
Linked Open Data Cloud
Linked Open Data CloudLinked Open Data Cloud
Linked Open Data Cloud
PretaLLOD
 
05 Lecture - PARALLEL Programming in C ++.pdf
05 Lecture - PARALLEL Programming in C ++.pdf05 Lecture - PARALLEL Programming in C ++.pdf
05 Lecture - PARALLEL Programming in C ++.pdf
alivaisi1
 
Growing an ecosystem on the JVM
Growing an ecosystem on the JVMGrowing an ecosystem on the JVM
Growing an ecosystem on the JVM
Iulian Dragos
 
Unit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptxUnit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptx
shashiden1
 
Software Programming with Python II.pptx
Software Programming with Python II.pptxSoftware Programming with Python II.pptx
Software Programming with Python II.pptx
GevitaChinnaiah
 
Distributed Logging Architecture in the Container Era
Distributed Logging Architecture in the Container EraDistributed Logging Architecture in the Container Era
Distributed Logging Architecture in the Container Era
Glenn Davis
 
Distributed Logging Architecture in Container Era
Distributed Logging Architecture in Container EraDistributed Logging Architecture in Container Era
Distributed Logging Architecture in Container Era
SATOSHI TAGOMORI
 
Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)Don Demcsak
 
Source-to-source transformations: Supporting tools and infrastructure
Source-to-source transformations: Supporting tools and infrastructureSource-to-source transformations: Supporting tools and infrastructure
Source-to-source transformations: Supporting tools and infrastructure
kaveirious
 
Introduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKennaIntroduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKenna
openseesdays
 
The Oxford Common File Layout
The Oxford Common File LayoutThe Oxford Common File Layout
The Oxford Common File Layout
Stefano Cossu
 

Similar to Portability (20)

Open Source SQL Databases
Open Source SQL DatabasesOpen Source SQL Databases
Open Source SQL Databases
 
Data Diffing Based Software Architecture Patterns
Data Diffing Based Software Architecture PatternsData Diffing Based Software Architecture Patterns
Data Diffing Based Software Architecture Patterns
 
Protobuff and gRPC
Protobuff and gRPCProtobuff and gRPC
Protobuff and gRPC
 
2018 12-kube con-ballerinacon
2018 12-kube con-ballerinacon2018 12-kube con-ballerinacon
2018 12-kube con-ballerinacon
 
Data Serialization in Python JSON vs. Pickle
Data Serialization in Python JSON vs. PickleData Serialization in Python JSON vs. Pickle
Data Serialization in Python JSON vs. Pickle
 
Reading Notes : the practice of programming
Reading Notes : the practice of programmingReading Notes : the practice of programming
Reading Notes : the practice of programming
 
Realizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache BeamRealizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache Beam
 
ROS - an open-source Robot Operating System
ROS - an open-source Robot Operating SystemROS - an open-source Robot Operating System
ROS - an open-source Robot Operating System
 
Portable Lucene Index Format & Applications - Andrzej Bialecki
Portable Lucene Index Format & Applications - Andrzej BialeckiPortable Lucene Index Format & Applications - Andrzej Bialecki
Portable Lucene Index Format & Applications - Andrzej Bialecki
 
Linked Open Data Cloud
Linked Open Data CloudLinked Open Data Cloud
Linked Open Data Cloud
 
05 Lecture - PARALLEL Programming in C ++.pdf
05 Lecture - PARALLEL Programming in C ++.pdf05 Lecture - PARALLEL Programming in C ++.pdf
05 Lecture - PARALLEL Programming in C ++.pdf
 
Growing an ecosystem on the JVM
Growing an ecosystem on the JVMGrowing an ecosystem on the JVM
Growing an ecosystem on the JVM
 
Unit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptxUnit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptx
 
Software Programming with Python II.pptx
Software Programming with Python II.pptxSoftware Programming with Python II.pptx
Software Programming with Python II.pptx
 
Distributed Logging Architecture in the Container Era
Distributed Logging Architecture in the Container EraDistributed Logging Architecture in the Container Era
Distributed Logging Architecture in the Container Era
 
Distributed Logging Architecture in Container Era
Distributed Logging Architecture in Container EraDistributed Logging Architecture in Container Era
Distributed Logging Architecture in Container Era
 
Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)
 
Source-to-source transformations: Supporting tools and infrastructure
Source-to-source transformations: Supporting tools and infrastructureSource-to-source transformations: Supporting tools and infrastructure
Source-to-source transformations: Supporting tools and infrastructure
 
Introduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKennaIntroduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKenna
 
The Oxford Common File Layout
The Oxford Common File LayoutThe Oxford Common File Layout
The Oxford Common File Layout
 

More from Juggernaut Liu

2020 MOPCON - How to be Agile
2020 MOPCON - How to be Agile2020 MOPCON - How to be Agile
2020 MOPCON - How to be Agile
Juggernaut Liu
 
Design Sprint Case in Trend Micro
Design Sprint Case in Trend MicroDesign Sprint Case in Trend Micro
Design Sprint Case in Trend Micro
Juggernaut Liu
 
趨勢科技案例分享 - 與專家一起共舞 Design Sprint
趨勢科技案例分享 - 與專家一起共舞 Design Sprint趨勢科技案例分享 - 與專家一起共舞 Design Sprint
趨勢科技案例分享 - 與專家一起共舞 Design Sprint
Juggernaut Liu
 
RPG Retrospective Workshop in AgileTour Hsinchu 2018
RPG Retrospective Workshop in AgileTour Hsinchu 2018RPG Retrospective Workshop in AgileTour Hsinchu 2018
RPG Retrospective Workshop in AgileTour Hsinchu 2018
Juggernaut Liu
 
Scrum drawing game in agile summit 2018
Scrum drawing game in agile summit 2018Scrum drawing game in agile summit 2018
Scrum drawing game in agile summit 2018
Juggernaut Liu
 
A dev ops team's practice in trend micro in agile summit 2018
A dev ops team's practice in trend micro in agile summit 2018A dev ops team's practice in trend micro in agile summit 2018
A dev ops team's practice in trend micro in agile summit 2018
Juggernaut Liu
 
Scrum Drawing Game 2.0 for Agile Tour 2017
Scrum Drawing Game 2.0 for Agile Tour 2017Scrum Drawing Game 2.0 for Agile Tour 2017
Scrum Drawing Game 2.0 for Agile Tour 2017
Juggernaut Liu
 
Scrum Drawing Game for Scrum Gathering Tokyo
Scrum Drawing Game for Scrum Gathering TokyoScrum Drawing Game for Scrum Gathering Tokyo
Scrum Drawing Game for Scrum Gathering Tokyo
Juggernaut Liu
 
Adapt or Die_devopsdaystaipei_2017
Adapt or Die_devopsdaystaipei_2017Adapt or Die_devopsdaystaipei_2017
Adapt or Die_devopsdaystaipei_2017
Juggernaut Liu
 
Null object pattern
Null object patternNull object pattern
Null object pattern
Juggernaut Liu
 
在瀑布底下玩Scrum
在瀑布底下玩Scrum在瀑布底下玩Scrum
在瀑布底下玩Scrum
Juggernaut Liu
 
Jug EIE Menu presentation
Jug EIE Menu presentationJug EIE Menu presentation
Jug EIE Menu presentation
Juggernaut Liu
 
Think on your feet
Think on your feetThink on your feet
Think on your feet
Juggernaut Liu
 
Photos in SLC by Juggernaut Liu
Photos in SLC by Juggernaut LiuPhotos in SLC by Juggernaut Liu
Photos in SLC by Juggernaut Liu
Juggernaut Liu
 

More from Juggernaut Liu (14)

2020 MOPCON - How to be Agile
2020 MOPCON - How to be Agile2020 MOPCON - How to be Agile
2020 MOPCON - How to be Agile
 
Design Sprint Case in Trend Micro
Design Sprint Case in Trend MicroDesign Sprint Case in Trend Micro
Design Sprint Case in Trend Micro
 
趨勢科技案例分享 - 與專家一起共舞 Design Sprint
趨勢科技案例分享 - 與專家一起共舞 Design Sprint趨勢科技案例分享 - 與專家一起共舞 Design Sprint
趨勢科技案例分享 - 與專家一起共舞 Design Sprint
 
RPG Retrospective Workshop in AgileTour Hsinchu 2018
RPG Retrospective Workshop in AgileTour Hsinchu 2018RPG Retrospective Workshop in AgileTour Hsinchu 2018
RPG Retrospective Workshop in AgileTour Hsinchu 2018
 
Scrum drawing game in agile summit 2018
Scrum drawing game in agile summit 2018Scrum drawing game in agile summit 2018
Scrum drawing game in agile summit 2018
 
A dev ops team's practice in trend micro in agile summit 2018
A dev ops team's practice in trend micro in agile summit 2018A dev ops team's practice in trend micro in agile summit 2018
A dev ops team's practice in trend micro in agile summit 2018
 
Scrum Drawing Game 2.0 for Agile Tour 2017
Scrum Drawing Game 2.0 for Agile Tour 2017Scrum Drawing Game 2.0 for Agile Tour 2017
Scrum Drawing Game 2.0 for Agile Tour 2017
 
Scrum Drawing Game for Scrum Gathering Tokyo
Scrum Drawing Game for Scrum Gathering TokyoScrum Drawing Game for Scrum Gathering Tokyo
Scrum Drawing Game for Scrum Gathering Tokyo
 
Adapt or Die_devopsdaystaipei_2017
Adapt or Die_devopsdaystaipei_2017Adapt or Die_devopsdaystaipei_2017
Adapt or Die_devopsdaystaipei_2017
 
Null object pattern
Null object patternNull object pattern
Null object pattern
 
在瀑布底下玩Scrum
在瀑布底下玩Scrum在瀑布底下玩Scrum
在瀑布底下玩Scrum
 
Jug EIE Menu presentation
Jug EIE Menu presentationJug EIE Menu presentation
Jug EIE Menu presentation
 
Think on your feet
Think on your feetThink on your feet
Think on your feet
 
Photos in SLC by Juggernaut Liu
Photos in SLC by Juggernaut LiuPhotos in SLC by Juggernaut Liu
Photos in SLC by Juggernaut Liu
 

Recently uploaded

Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 

Recently uploaded (20)

Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 

Portability

  • 1. The Practice of Programming - Portability Author : Juggernaut Liu Date : 2014/04/18
  • 2. Outline • Introduction • Language • Headers and Libraries • Program Organization • Isolation • Data Exchange • Byte Order • Portability and Upgrade • Internationalization
  • 3. Robert Venturi, Complexity and Contradiction in Architecture Finally, standardization, like convention, can be another manifestation of the strong order. But unlike convention it has been accepted in Modern architecture as an enriching product of our technology, yet dreaded for its potential domination and brutality.
  • 4. Introduction Why do we worry about portability? • Less maintenance and more utility • Environments change • A portable program is a better designed program
  • 5. Language (1) • Stick to the standard • Program in the mainstream • Sizes of data types o sizeof (char) <= sizeof (short) <= sizeof (int) <= sizeof (long) o sizeof (float) <= sizeof (double) • Order of evaluation o n = (getchar() <<8) | getchar()
  • 7. Language (3) • Alignment of structure and class members o sizeof (struct X) bytes, o not sizeof (char) + sizeof(int) • Try several compilers
  • 8. Headers and Libraries • Use standard libraries • Problems o Headers tend to be cluttered o Header files also can "pollute" the namespace by declaring a function with the same name • Solutions o Use a different header for each compiler or environment o Redefining the name
  • 9. Program Organization • Union vs Intersection o Conditional compilation o Include a header which defines all • Suggestion o Use only features available everywhere o Avoid conditional compilation
  • 12. Isolation • Localize system dependencies in separate files • Hide system dependencies behind interfaces o Abstraction o The I/O libraries are good samples • Java is a good sample
  • 13. Data Exchange • Use Text for data exchange
  • 14. Byte Order(1) • Binary Data is more compact and faster • little-endian vs big-endian
  • 15. Byte Order(2) • Use a fixed byte order for data exchange • Sender and receiver agree on the byte order in transmission
  • 16. Portability and Upgrade • Change the name if you change the specification • Maintain compatibility with existing programs and data
  • 17. Internationalization • Do not assume ASCII o Unicode o UTF-8 o Wide Characters (C/C++) • Do not assume English o L10N o UI
  • 18. Summary • Portable code is an ideal that is well worth striving for, since so much time is wasted making changes to move a program from one system to another or to keep it running as it evolves and the systems it runs on changes. • The intersection approach is better than the union one. o Loss of efficiency and features o Z>B