This decoding table provides the user of ISO 3166-1 with an easy access to the definition of all 676 code elements available in the alpha-2 code of ISO’s country code standard.
The content of this document is taken from two sources: The official code list of ISO 3166-1 and the list of reserved ISO 3166-1 code elements which contains information on code allocations which are not officially part of ISO 3166-1 (see “Reserved code elements”). The reserved code elements have different statuses with regard to restrictions on use within ISO’s country code system. Some may be used – others must not be used.
These statuses – and their approximate meanings for the user of ISO 3166-1 – are described and colour-coded in Table 1. Tables 2 gives a colour coded, clickable matrix of all ISO 3166-1 alpha-2 code elements which is linked to Table 3 which gives the definition of the code element.
For more detailed information please refer to the section on “Reserved code elements” on our Website.
Contact the ISO 3166 Maintenance Agency
The ISO 3166/MA should be contacted through its secretariat. Please use the following address:
ISO 3166 Maintenance Agency c/o International Organization for Standardization Case postale 56 CH-1211 Genève 20
Code element may be used but restrictions may apply
Transitionally reserved code element
Code element deleted from ISO 3166-1; stop using ASAP
Indeterminately reserved code element
Code element must not be used in ISO 3166-1
Code elements not used at present stage [A]
Code element must not be used in ISO 3166-1
Un-assigned code elements
Code element free for assignment (by ISO 3166/MA only!)
AA
AB
AC
AD
AE
AF
AG
AH
AI
AJ
AK
AL
AM
AN
AO
AP
AQ
AR
AS
AT
AU
AV
AW
AX
AY
AZ
BA
BB
BC
BD
BE
BF
BG
BH
BI
BJ
BK
BL
BM
BN
BO
BP
BQ
BR
BS
BT
BU
BV
BW
BX
BY
BZ
CA
CB
CC
CE
CD
CF
CG
CH
CI
CJ
CK
CL
CM
CN
CO
CP
CQ
CR
CS
CT
CU
CV
CW
CX
CY
CZ
DA
DB
DC
DD
DE
DF
DG
DH
DI
DJ
DK
DL
DM
DN
DO
DP
DQ
DR
DS
DT
DU
DV
DW
DX
DY
DZ
EA
EB
EC
ED
EE
EF
EG
EH
EI
EJ
EK
EL
EM
EN
EO
EP
EQ
ER
ES
ET
EU
EV
EW
EX
EY
EZ
FA
FB
FC
FD
FE
FF
FG
FH
FI
FJ
FK
FL
FM
FN
FO
FP
FQ
FR
FS
FT
FU
FV
FW
FX
FY
FZ
GA
GB
GC
GD
GE
GF
GG
GH
GI
GJ
GK
GL
GM
GN
GO
GP
GQ
GR
GS
GT
GU
GV
GW
GX
GY
GZ
HA
HB
HC
HD
HE
HF
HG
HH
HI
HJ
HK
HL
HM
HN
HO
HP
HQ
HR
HS
HT
HU
HV
HW
HX
HY
HZ
IA
IB
IC
ID
IE
IF
IG
IH
II
IJ
IK
IL
IM
IN
IO
IP
IQ
IR
IS
IT
IU
IV
IW
IX
IY
IZ
JA
JB
JC
JD
JE
JF
JG
JH
JI
JJ
JK
JL
JM
JN
JO
JP
JQ
JR
JS
JT
JU
JV
JW
JX
JY
JZ
KA
KB
KC
KD
KE
KF
KG
KH
KI
KJ
KK
KL
KM
KN
KO
KP
KQ
KR
KS
KT
KU
KV
KW
KX
KY
KZ
LA
LB
LC
LD
LE
LF
LG
LH
LI
LJ
LK
LL
LM
LN
LO
LP
LQ
LR
LS
LT
LU
LV
LW
LX
LY
LZ
MA
MB
MC
MD
ME
MF
MG
MH
MI
MJ
MK
ML
MM
MN
MO
MP
MQ
MR
MS
MT
MU
MV
MW
MX
MY
MZ
NA
NB
NC
ND
NE
NF
NG
NH
NI
NJ
NK
NL
NM
NN
NO
NP
NQ
NR
NS
NT
NU
NV
NW
NX
NY
NZ
OA
OB
OC
OD
OE
OF
OG
OH
OI
OJ
OK
OL
OM
ON
OO
OP
OQ
OR
OS
OT
OU
OV
OW
OX
OY
OZ
PA
PB
PC
PD
PE
PF
PG
PH
PI
PJ
PK
PL
PM
PN
PO
PP
PQ
PR
PS
PT
PU
PV
PW
PX
PY
PZ
QA
QB
QC
QD
QE
QF
QG
QH
QI
QJ
QK
QL
QM
QN
QO
QP
QQ
QR
QS
QT
QU
QV
QW
QX
QY
QZ
RA
RB
RC
RD
RE
RF
RG
RH
RI
RJ
RK
RL
RM
RN
RO
RP
RQ
RR
RS
RT
RU
RV
RW
RX
RY
RZ
SA
SB
SC
SD
SE
SF
SG
SH
SI
SJ
SK
SL
SM
SN
SO
SP
SQ
SR
SS
ST
SU
SV
SW
SX
SY
SZ
TA
TB
TC
TD
TE
TF
TG
TH
TI
TJ
TK
TL
TM
TN
TO
TP
TQ
TR
TS
TT
TU
TV
TW
TX
TY
TZ
UA
UB
UC
UD
UE
UF
UG
UH
UI
UJ
UK
UL
UM
UN
UO
UP
UQ
UR
US
UT
UU
UV
UW
UX
UY
UZ
VA
VB
VC
VD
VE
VF
VG
VH
VI
VJ
VK
VL
VM
VN
VO
VP
VQ
VR
VS
VT
VU
VV
VW
VX
VY
VZ
WA
WB
WC
WD
WE
WF
WG
WH
WI
WJ
WK
WL
WM
WN
WO
WP
WQ
WR
WS
WT
WU
WV
WW
WX
WY
WZ
XA
XB
XC
XD
XE
XF
XG
XH
XI
XJ
XK
XL
XM
XN
XO
XP
XQ
XR
XS
XT
XU
XV
XW
XX
XY
XZ
YA
YB
YC
YD
YE
YF
YG
YH
YI
YJ
YK
YL
YM
YN
YO
YP
YQ
YR
YS
YT
YU
YV
YW
YX
YY
YZ
ZA
ZB
ZC
ZD
ZE
ZF
ZG
ZH
ZI
ZJ
ZK
ZL
ZM
ZN
ZO
ZP
ZQ
ZR
ZS
ZT
ZU
ZV
ZW
ZX
ZY
ZZ
Code
Name
Remark
Status
AA
user-assigned
AC
Ascension Island
[B] Requested by Universal Postal Union (UPU)
exceptionally reserved
AD
ANDORRA
officially assigned
AE
UNITED ARAB EMIRATES
officially assigned
AF
AFGHANISTAN
officially assigned
AG
ANTIGUA AND BARBUDA
officially assigned
AI
ANGUILLA
officially assigned
AL
ALBANIA
officially assigned
AM
ARMENIA
officially assigned
AN
Netherlands Antilles
2011-12 to 2061-12
transitionally reserved
AO
ANGOLA
officially assigned
AP
African Regional Industrial Property Organization
[A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3
indeterminately reserved
AQ
ANTARCTICA
officially assigned
AR
ARGENTINA
officially assigned
AS
AMERICAN SAMOA
officially assigned
AT
AUSTRIA
officially assigned
AU
AUSTRALIA
officially assigned
AW
ARUBA
officially assigned
AX
ÅLAND ISLANDS
officially assigned
AZ
AZERBAIJAN
officially assigned
BA
BOSNIA AND HERZEGOVINA
officially assigned
BB
BARBADOS
officially assigned
BD
BANGLADESH
officially assigned
BE
BELGIUM
officially assigned
BF
BURKINA FASO
officially assigned
BG
BULGARIA
officially assigned
BH
BAHRAIN
officially assigned
BI
BURUNDI
officially assigned
BJ
BENIN
officially assigned
BL
SAINT BARTHÉLEMY
officially assigned
BM
BERMUDA
officially assigned
BN
BRUNEI DARUSSALAM
officially assigned
BO
BOLIVIA, PLURINATIONAL STATE OF
officially assigned
BQ
BONAIRE, SINT EUSTATIUS AND SABA
officially assigned
BR
BRAZIL
officially assigned
BS
BAHAMAS
officially assigned
BT
BHUTAN
officially assigned
BU
Burma
1989-12 to 2039-12
transitionally reserved
BV
BOUVET ISLAND
officially assigned
BW
BOTSWANA
officially assigned
BX
Benelux Trademarks and Designs Office
[A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3
indeterminately reserved
BY
BELARUS
officially assigned
BZ
BELIZE
officially assigned
CA
CANADA
officially assigned
CC
COCOS (KEELING) ISLANDS
officially assigned
CD
CONGO, THE DEMOCRATIC REPUBLIC OF THE
officially assigned
CF
CENTRAL AFRICAN REPUBLIC
officially assigned
CG
CONGO
officially assigned
CH
SWITZERLAND
officially assigned
CI
CÔTE D’IVOIRE
officially assigned
CK
COOK ISLANDS
officially assigned
CL
CHILE
officially assigned
CM
CAMEROON
officially assigned
CN
CHINA
officially assigned
CO
COLOMBIA
officially assigned
CP
Clipperton Island
[C] Requested by International Telecommunication Union (ITU)
exceptionally reserved
CR
COSTA RICA
officially assigned
CS
SERBIA AND MONTENEGRO
2006-09 to 2056-09
transitionally reserved
CU
CUBA
officially assigned
CV
CAPE VERDE
officially assigned
CW
CURAÇAO
officially assigned
CX
CHRISTMAS ISLAND
officially assigned
CY
CYPRUS
officially assigned
CZ
CZECH REPUBLIC
officially assigned
DE
GERMANY
officially assigned
DG
Diego Garcia
[C] Requested by International Telecommunication Union (ITU)
exceptionally reserved
DJ
DJIBOUTI
officially assigned
DK
DENMARK
officially assigned
DM
DOMINICA
officially assigned
DO
DOMINICAN REPUBLIC
officially assigned
DY
Benin
[D] Requested by Secretary-General of UN for Road Traffic Conventions R49 and R68
indeterminately reserved
DZ
ALGERIA
officially assigned
EA
Ceuta, Melilla
[E] Requested by World Customs Organization (WCO)
exceptionally reserved
EC
ECUADOR
officially assigned
EE
ESTONIA
officially assigned
EF
Union of Countries under the European Community Patent Convention
[A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3
indeterminately reserved
EG
EGYPT
officially assigned
EH
WESTERN SAHARA
officially assigned
EM
European Trademark Office
[A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3
indeterminately reserved
EP
European Patent Organization
[A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3
indeterminately reserved
ER
ERITREA
officially assigned
ES
SPAIN
officially assigned
ET
ETHIOPIA
officially assigned
EU
European Union
Requested by ISO 4217/MA (March 1998) for ISO 6166 “Securities – International securities identification numbering system (ISIN)”. In August 1999, extension of scope to any application needing to represent the name European Union.
exceptionally reserved
EV
Eurasian Patent Organization
[A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3
indeterminately reserved
EW
Estonia
[D]
indeterminately reserved
FI
FINLAND
officially assigned
FJ
FIJI
officially assigned
FK
FALKLAND ISLANDS (MALVINAS)
officially assigned
FL
Liechtenstein
[D]
indeterminately reserved
FM
MICRONESIA, FEDERATED STATES OF
officially assigned
FO
FAROE ISLANDS
officially assigned
FR
FRANCE
officially assigned
FX
France, Metropolitan
Requested by France
exceptionally reserved
GA
GABON
officially assigned
GB
UNITED KINGDOM
officially assigned
GC
Patent Office of the Cooperation Council for the Arab States of the Gulf (GCC)
[A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3
indeterminately reserved
GD
GRENADA
officially assigned
GE
GEORGIA
officially assigned
GF
FRENCH GUIANA
officially assigned
GG
GUERNSEY
officially assigned
GH
GHANA
officially assigned
GI
GIBRALTAR
officially assigned
GL
GREENLAND
officially assigned
GM
GAMBIA
officially assigned
GN
GUINEA
officially assigned
GP
GUADELOUPE
officially assigned
GQ
EQUATORIAL GUINEA
officially assigned
GR
GREECE
officially assigned
GS
SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS
officially assigned
GT
GUATEMALA
officially assigned
GU
GUAM
officially assigned
GW
GUINEA-BISSAU
officially assigned
GY
GUYANA
officially assigned
HK
HONG KONG
officially assigned
HM
HEARD ISLAND AND MCDONALD ISLANDS
officially assigned
HN
HONDURAS
officially assigned
HR
CROATIA
officially assigned
HT
HAITI
officially assigned
HU
HUNGARY
officially assigned
IB
International Bureau of WIPO
[A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3
indeterminately reserved
IC
Canary Islands
[E] Requested by World Customs Organization (WCO)
exceptionally reserved
ID
INDONESIA
officially assigned
IE
IRELAND
officially assigned
IL
ISRAEL
officially assigned
IM
ISLE OF MAN
officially assigned
IN
INDIA
officially assigned
IO
BRITISH INDIAN OCEAN TERRITORY
officially assigned
IQ
IRAQ
officially assigned
IR
IRAN, ISLAMIC REPUBLIC OF
officially assigned
IS
ICELAND
officially assigned
IT
ITALY
officially assigned
JA
Jamaica
[F] Requested by Secretary-General of UN for Road Traffic Conventions
indeterminately reserved
JE
JERSEY
officially assigned
JM
JAMAICA
officially assigned
JO
JORDAN
officially assigned
JP
JAPAN
officially assigned
KE
KENYA
officially assigned
KG
KYRGYZSTAN
officially assigned
KH
CAMBODIA
officially assigned
KI
KIRIBATI
officially assigned
KM
COMOROS
officially assigned
KN
SAINT KITTS AND NEVIS
officially assigned
KP
KOREA, DEMOCRATIC PEOPLE’S REPUBLIC OF
officially assigned
KR
KOREA, REPUBLIC OF
officially assigned
KW
KUWAIT
officially assigned
KY
CAYMAN ISLANDS
officially assigned
KZ
KAZAKHSTAN
officially assigned
LA
LAO PEOPLE’S DEMOCRATIC REPUBLIC
officially assigned
LB
LEBANON
officially assigned
LC
SAINT LUCIA
officially assigned
LF
Libya Fezzan
[D]
indeterminately reserved
LI
LIECHTENSTEIN
officially assigned
LK
SRI LANKA
officially assigned
LR
LIBERIA
officially assigned
LS
LESOTHO
officially assigned
LT
LITHUANIA
officially assigned
LU
LUXEMBOURG
officially assigned
LV
LATVIA
officially assigned
LY
LIBYA
officially assigned
MA
MOROCCO
officially assigned
MC
MONACO
officially assigned
MD
MOLDOVA, REPUBLIC OF
officially assigned
ME
MONTENEGRO
officially assigned
MF
SAINT MARTIN (FRENCH PART)
officially assigned
MG
MADAGASCAR
officially assigned
MH
MARSHALL ISLANDS
officially assigned
MK
MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF
officially assigned
ML
MALI
officially assigned
MM
MYANMAR
officially assigned
MN
MONGOLIA
officially assigned
MO
MACAO
officially assigned
MP
NORTHERN MARIANA ISLANDS
officially assigned
MQ
MARTINIQUE
officially assigned
MR
MAURITANIA
officially assigned
MS
MONTSERRAT
officially assigned
MT
MALTA
officially assigned
MU
MAURITIUS
officially assigned
MV
MALDIVES
officially assigned
MW
MALAWI
officially assigned
MX
MEXICO
officially assigned
MY
MALAYSIA
officially assigned
MZ
MOZAMBIQUE
officially assigned
NA
NAMIBIA
officially assigned
NC
NEW CALEDONIA
officially assigned
NE
NIGER
officially assigned
NF
NORFOLK ISLAND
officially assigned
NG
NIGERIA
officially assigned
NI
NICARAGUA
officially assigned
NL
NETHERLANDS
Includes: the islands Bonaire, Saint Eustatius and Saba
officially assigned
NO
NORWAY
officially assigned
NP
NEPAL
officially assigned
NR
NAURU
officially assigned
NT
Neutral Zone
1993-07 to 2043-07
transitionally reserved
NU
NIUE
officially assigned
NZ
NEW ZEALAND
officially assigned
OA
African Intellectual Property Organization
[A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3
indeterminately reserved
OM
OMAN
officially assigned
PA
PANAMA
officially assigned
PE
PERU
officially assigned
PF
FRENCH POLYNESIA
officially assigned
PG
PAPUA NEW GUINEA
officially assigned
PH
PHILIPPINES
officially assigned
PI
Philippines
[F]
indeterminately reserved
PK
PAKISTAN
officially assigned
PL
POLAND
officially assigned
PM
SAINT PIERRE AND MIQUELON
officially assigned
PN
PITCAIRN
officially assigned
PR
PUERTO RICO
officially assigned
PS
PALESTINIAN TERRITORY, OCCUPIED
officially assigned
PT
PORTUGAL
officially assigned
PW
PALAU
officially assigned
PY
PARAGUAY
officially assigned
QA
QATAR
officially assigned
QM
user-assigned
QN
user-assigned
QO
user-assigned
QP
user-assigned
QQ
user-assigned
QR
user-assigned
QS
user-assigned
QT
user-assigned
QU
user-assigned
QV
user-assigned
QW
user-assigned
QX
user-assigned
QY
user-assigned
QZ
user-assigned
RA
Argentina
[F]
indeterminately reserved
RB
Bolivia [cf. Botswana: identical code element]
[D]
indeterminately reserved
RC
China
[F]
indeterminately reserved
RE
RÉUNION
officially assigned
RH
Haiti
[D]
indeterminately reserved
RI
Indonesia
[F]
indeterminately reserved
RL
Lebanon
[F]
indeterminately reserved
RM
Madagascar
[F]
indeterminately reserved
RN
Niger
[G]
indeterminately reserved
RO
ROMANIA
officially assigned
RP
Philippines
[G]
indeterminately reserved
RS
SERBIA
officially assigned
RU
RUSSIAN FEDERATION
officially assigned
RW
RWANDA
officially assigned
SA
SAUDI ARABIA
officially assigned
SB
SOLOMON ISLANDS
officially assigned
SC
SEYCHELLES
officially assigned
SD
SUDAN
officially assigned
SE
SWEDEN
officially assigned
SF
Finland
[D]
indeterminately reserved
SG
SINGAPORE
officially assigned
SH
SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA
officially assigned
SI
SLOVENIA
officially assigned
SJ
SVALBARD AND JAN MAYEN
officially assigned
SK
SLOVAKIA
officially assigned
SL
SIERRA LEONE
officially assigned
SM
SAN MARINO
officially assigned
SN
SENEGAL
officially assigned
SO
SOMALIA
officially assigned
SR
SURINAME
officially assigned
SS
SOUTH SUDAN
officially assigned
ST
SAO TOME AND PRINCIPE
officially assigned
SU
USSR
Requested by Foundation of Internet Development (FID)
exceptionally reserved
SV
EL SALVADOR
officially assigned
SX
SINT MAARTEN (DUTCH PART)
The island of Saint Martin is divided into the French northern part and the Dutch southern part
officially assigned
SY
SYRIAN ARAB REPUBLIC
officially assigned
SZ
SWAZILAND
officially assigned
TA
Tristan da Cunha
[B] Requested by Universal Postal Union (UPU)
exceptionally reserved
TC
TURKS AND CAICOS ISLANDS
officially assigned
TD
CHAD
officially assigned
TF
FRENCH SOUTHERN TERRITORIES
officially assigned
TG
TOGO
officially assigned
TH
THAILAND
officially assigned
TJ
TAJIKISTAN
officially assigned
TK
TOKELAU
officially assigned
TL
TIMOR-LESTE
officially assigned
TM
TURKMENISTAN
officially assigned
TN
TUNISIA
officially assigned
TO
TONGA
officially assigned
TP
East Timor
2002-05 to 2052-05
transitionally reserved
TR
TURKEY
officially assigned
TT
TRINIDAD AND TOBAGO
officially assigned
TV
TUVALU
officially assigned
TW
TAIWAN, PROVINCE OF CHINA
officially assigned
TZ
TANZANIA, UNITED REPUBLIC OF
officially assigned
UA
UKRAINE
officially assigned
UG
UGANDA
officially assigned
UK
United Kingdom
Requested by United Kingdom
exceptionally reserved
UM
UNITED STATES MINOR OUTLYING ISLANDS
officially assigned
US
UNITED STATES
officially assigned
UY
URUGUAY
officially assigned
UZ
UZBEKISTAN
officially assigned
VA
HOLY SEE (VATICAN CITY STATE)
officially assigned
VC
SAINT VINCENT AND THE GRENADINES
officially assigned
VE
VENEZUELA, BOLIVARIAN REPUBLIC
officially assigned
VG
VIRGIN ISLANDS, BRITISH
officially assigned
VI
VIRGIN ISLANDS, U.S.
officially assigned
VN
VIET NAM
officially assigned
VU
VANUATU
officially assigned
WF
WALLIS AND FUTUNA
officially assigned
WG
Grenada
[D]
indeterminately reserved
WL
Saint Lucia
[D]
indeterminately reserved
WO
World Intellectual Property Organization
[A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3
indeterminately reserved
WS
SAMOA
officially assigned
WV
Saint Vincent
[D]
indeterminately reserved
XA
user-assigned
XB
user-assigned
XC
user-assigned
XD
user-assigned
XE
user-assigned
XF
user-assigned
XG
user-assigned
XH
user-assigned
XI
user-assigned
XJ
user-assigned
XK
user-assigned
XL
user-assigned
XM
user-assigned
XN
user-assigned
XO
user-assigned
XP
user-assigned
XQ
user-assigned
XR
user-assigned
XS
user-assigned
XT
user-assigned
XU
user-assigned
XV
user-assigned
XW
user-assigned
XX
user-assigned
XY
user-assigned
XZ
user-assigned
YE
YEMEN
officially assigned
YT
MAYOTTE
officially assigned
YU
Yugoslavia
2003-07 to 2053-07
transitionally reserved
YV
Venezuela
[D]
indeterminately reserved
ZA
SOUTH AFRICA
officially assigned
ZM
ZAMBIA
officially assigned
ZR
Zaire
1997-07 to 2047-07
transitionally reserved
ZW
ZIMBABWE
officially assigned
ZZ
user-assigned
Notes:
[A] The World Intellectual Property Organization (WIPO) uses ten alpha-2 code elements for particular purposes in its Standard ST.3 which are not assigned in ISO 3166-1. The ISO 3166/MA will not use these alpha-2 code elements for assignment in ISO 3166 at the present stage.
[B] Official country names are given in CAPITAL LETTERS. Other names are given in normal orthography i.e including lower case letters.
[C] The list of ISO 3166-1 reserved code elements is only available in English, hence the lack of French names for entries which are not officially included in ISO 3166-1.
[D] Here the following pieces of information can be given:
Acronym of organization or name of country on whose behalf a reservation was made
Date of reservation (for transitional reservations)
Abbreviation of source document for reserved code element
Do not fear to be eccentric in opinion, for every opinion now accepted was once eccentric.
不要害怕怀有怪念头,因为现在人们接受的所有的观念都曾经是怪念头。
Democracy is the process by which people choose the man who’ll get the blame.
民主,就是挑选那个受批评的人的过程。
Drunkenness is temporary suicide.
喝醉是暂时性的自杀。
I say quite deliberately that the Christian religion, as organized in its Churches, has been and still is the principal enemy of moral progress in the world.
我明确的说,由教会所组织的基督教是道德进步的最大敌人,过去如此,现在依然如此。
A process which led from the amoeba to man appeared to the philosophers to be obviously a progress though whether the amoeba would agree with this opinion is not known.
从阿米巴变形虫到人类的这一过程对哲学家来说,很明显是个进步。但是变形虫怎么想我们就不知道了。
I would never die for my beliefs because I might be wrong.
我永远不会为信仰而死,因为我的信仰可能是错的。
In America everybody is of the opinion that he has no social superiors, since all men are equal, but he does not admit that he has no social inferiors.
在美国,所有人都认为没有什么人比他的社会地位高,因为人人生而平等。但是,他可不承认没有人比他社会地位低。
It has been said that man is a rational animal. All my life I have been searching for evidence which could support this.
据说人是一种理性动物。穷我自己一生,我都在寻找这观点的证据。
Man is a credulous animal, and must believe something; in the absence of good grounds for belief, he will be satisfied with bad ones.
人是轻信的动物,必须得相信点什么。如果这种信仰没有什么好的依据,糟糕的依据也能对付。
Many a man will have the courage to die gallantly, but will not have the courage to say, or even to think, that the cause for which he is asked to die is an unworthy one.
很多人可以勇敢的死去,但是却没有勇气说他为之而死的原因没有意义,甚至连这样想一想的勇气也没有。
Many people when they fall in love look for a little haven of refuge from the world, where they can be sure of being admired when they are not admirable, and praised when they are not praiseworthy.
很多人陷入爱情是为了寻找一个遁世的避难所。在这个避难所里,当他们不值得爱慕的时候,依然有人爱慕他们,当他们不值得赞扬的时候,依然有人赞扬他们。
Many people would sooner die than think; in fact, they do so.
有很多人,让他们思考一下还不如让他们去死。事实上,很多人还没思考过就已经死了。
Men are born ignorant, not stupid. They are made stupid by education.
人生而无知,但还不愚蠢。教育才把他们变蠢。
Conventional people are roused to fury by departure from convention, largely because they regard such departure as a criticism of themselves.
传统的人看到背离传统的行为就大发雷霆,主要是因为他们把这种背离当作对他们的批评。
A hallucination is a fact, not an error; what is erroneous is a judgment based upon it.
幻觉不是你的错,在幻觉中做决定,这就是你的不对了。
A life without adventure is likely to be unsatisfying, but a life in which adventure is allowed to take whatever form it will is sure to be short.
生活中完全没有冒险,这可能是没什么意思的。但是生活中如果不管什么种类的探险都有,那肯定是短暂的。
Against my will, in the course of my travels, the belief that everything worth knowing was known at Cambridge gradually wore off. In this respect my travels were very useful to me.
我曾相信,所有值得知道之事,我在剑桥都知道了。在我旅行的过程之中,这一想法逐渐消失了。这与我本意相反,但是却对我非常有益。
Aristotle maintained that women have fewer teeth than men; although he was twice married, it never occurred to him to verify this statement by examining his wives’ mouths.
亚里士多德说女人比男人的牙齿要少。尽管他结了两次婚,但是他都没想过要检查一下他老婆的牙。
Contempt for happiness is usually contempt for other people’s happiness, and is an elegant disguise for hatred of the human race.
对幸福的轻蔑通常是对其他人幸福的轻蔑,在精巧的伪装之下是对人类的仇恨。
For most people, the real life is long, is the ideal and may compromise between continuous compromise.
Undoubtedly the desire for food has been, and still is, one of the main causes of great political events. But man differs from other animals in one very important respect, and that is that he has desires which are, so to speak, intimate, which can never be fully gratified, and which should keep him restless even in Paradise. The boa constrictor, when he had an adequate meal, goes to sleep, and does not wake until he needs another meal. Human beings, for the most not part are not like this. When the Arabs, who had been used to living sparingly on a few dates, acquired the riches of the Eastern Roman Empire and dwelt in palaces of almost unbelievable luxury, they did not, on that account, become inactive. Hunger could no longer be a motive, for Greek slaves supplied them with exquisite viands at the slightest nod. But other desires kept them active; four in particular, which we can label acquisitiveness, rivalry, vanity and love of power.
Acquisitiveness-the wish to possess as much as possible of goods, or the title to goods-is a motive which, I suppose, has its origin in a combination of fear with the desire for necessaries.
I once befriended two little girls from Esthonia, who had narrowly escaped death from starvation in a famine. They lived in my family, and of course had plenty to eat. But they spent all their leisure visiting neighbouring farms and stealing potatoes, which they hoarded. Rockefeller, who in his infancy had experienced great poverty, spent his adult life in a similar manner. Similarly the Arab chieftains on their silken Byzantine divans could not forget the desert, and hoarded riches far beyond any possible physical need. But whatever the psychoanalysis of acquisitiveness, no one can deny that it is one of the great motives -especially among the more powerful, for ,as I said before, it is one of the infinite motives .However much you may acquire you will always wish to acquire more ;satiety is a dream which will always elude you.
But acquisitiveness, although it is the mainspring of the capitalist system, is by no means the most powerful of the motives that survive the conquest of hunger .Rivalry is a much stronger motive. Over and over again in Muhammadan history, dynasties have come to grief because the sons of a sultan by different mothers could not agree, and in the resulting civil war universal ruin resulted. The same sort of thing happens in modern Europe When the British Government very unwisely allowed the Kaiser to be present at a naval review at Spithead, the thought which arose in his mind was not the one which we had intended. What he thought was.” I must have a Navy as good as Grandmamma’s.”And from this thought pier place than it is if acquisitiveness were always stronger than rivalry. But in fact ,a great many men will cheerfully face impoverishment if they can thereby secure complete ruin for their rivals, Hence the present level of taxation.
Vanity is a motive of immense potency. Anyone who has much to do with children knows how they are constantly performing some antic and saying “Look at me”. “Look at me “is one of the most fundamental desires of the human heart. It can take innumerable forms, from buffoonery to the pursuit of posthumous fame. There was a Renaissance Italian princeling who was asked by the priest on his deathbed if he had anything to repent of “Yes,” he said “There is one thing. On one occasion I had a visit from the Emperor and the Pope simultaneously .I too tem to the top of my tower to see the view, and I neglected the opportunity to throw them both down .which would have given me immortal fame.” history does not relate whether the priest gave him absolution. One of the troubles about vanity is that it grows with what it feeds on .The talked about. The condemned murderer who is allowed to see the account of his trial in the Press is indignant if he finds a newspaper which has reported it inadequately. And the more he finds about himself in other newspapers, the more indignant he will be with those whose reports are meager. Politicians and literary men are in the same case. And the more famous they become, the more difficult the press cutting agency finds it to satisfy them .It is scarcely possible to exaggerate the influence of vanity throughout the range of human life, from the child of three to the potentate at whose frown the world trembles. Mankind have even committed the impiety of attributing similar desires to the deity, whom they imaging avid for continual praise.
But great as is the influence of the motives we have been considering, there is one which out weighs these all……Power, like vanity, is insatiable. Nothing short of omnipotence could satisfy it completely. And as it is especially the vice of energetic men, the casual efficacy of love of power is out of all proportion to its frequency. It is ,indeed, by far the strongest motive in the lives of important men .Love of power is greatly increased by the experience of power ,and this applies to petty power as well as to that of potentates ,In the happy days before 1914,when well-to -do ladies could acquire a host of servants, their pleasure in exercising power over the domestics steadily increased with age .Similarly, in any autocratic regime, the holders of power become increasingly, tyrannical with experience of the delights that power can afford. Since power over human beings is shown in making them do what they would rather not do, the man who is actuated by love of power is more apt to inflict pain than to permit pleasure .If you ask your boss for leave lf absence from the office on some legitimate occasion, his love of power will derive more satisfaction from refusal than from consent .If you require a building permit, the petty official concerned will obviously get more pleasure from saying “No” than from saying “Yes”. It is this sort of thing which makes the love of power such a dangerous motive ,But it has other sides which are more desirable .The pursuit of knowledge is ,I think ,mainly actuated by love lf power ,And so are all advances in scientific technique ,In politics also ,a reformer may have just as strong a love of power as a despot .It would be a complete mistake to decry love of power altogether as a motive ,Whether you will be led by this motive to actions which are useful ,or to actions which are pernicious ,depends upon the social system ,and upon your capacities .
I come now to other motives which ,though in a sense less fundamental than those we have been considering ,are still of considerable importuned ,The first of these is love of excitement .Human beings show their superiority to the brutes by their capacity for boredom ,though I have sometimes thought ,in Examining the apes at the Zoo, that they ,perhaps ,have the rudiments of this tiresome emotion .However that may be, experience shows that escape from boredom is one of the really powerful desires of almost all human beings.
When white men first effect contact with some unspoilt race of savages, they offer them all kinds of benefits, from the light of the Gospel to pumpkin pie. These, however, much as we may regret it, most savages receive with indifference. What they really value among the gifts that we bring to them is intoxicating liquor ,which enables them .for the first time in their lives ,to have the illusion, for a few brief moments ,that it is better to be alive than dead.
Red Indians ,while they were still unaffected by white men ,would smoke their pipes .not calmly as we do ,but orgiastically ,in haling so deeply that they sank into a faint ,And when excitement by means of nicotine failed ,a patriotic orator would stir them up to attack a neighbouring tribe ,which would give them all the enjoyment that we (according to our temperament ) derive from a horse race of a General Election.
With civilized men, as with primitive Red Indian tribes, it is, I think, chiefly love of excitement which makes the populace applaud when war breaks out; the emotion is exactly the same as at a football match, although the results are sometimes somewhat more serious.
It is not altogether easy to decide what is the root cause of the love of excitement. I incline to think that our mental make-up is adapted to the stage when men lived by hunting .When a man spent a long day with very primitive weapons in stalking a deer with the hope of dinner and when ,at the end of the day ,he dragged the carcase triumphantly to his cave ,he sank down in contented weariness, while his wife dressed and cooked the meat ,He was sleepy ,and his bones ached ,and the smell of cooking filled every nook and cranny of his consciousness. At last after eating, he sank into deep sleep. In such a life there was neither time nor energy for boredom. But when he took to agriculture, and made his wife do all the heavy work in the fields, he had time to reflect upon the vanity of human life, to invent mythologies and systems of philosophy, and to dream of the life hereafter in which he would perpetually hunt the wild boar of Valhalla.
Our mental make-up is suited to a life of very severe physical labour , I used ,when I was younger ,to take my holidays walking ,I would cover 25 miles a day ,and when the evening came I had no need of anything to keep me from boredom ,since the delight of sitting amply sufficed .But modern lift cannot be conducted on these physically strenuous principles ,A great deal of work is sedentary and most manual work exercises only a few specialized muscles. When London crowds assemble in Trafalgar Square to cheer to the echo an announcement that the government has decided to have them killed ,they would not do so if they had walked 25 miles that day .This cure for bellicosity is ,however ,impracticable and if the human race is to survive – a thing which is ,perhaps ,undesirable -other means must be found for securing an innocent outlet for the unused physical energy that produces love of excitement.
This is a matter which has been too little considered, both by moralists and by social reformers .The social reformers are of the opinion that they have more serious things to consider , The moralists ,on the other hand ,are immensely impressed with the seriousness of all the permitted outlets of the love of excitement; the seriousness ,however ,in their minds is that of Sin ,Dance halls ,cinemas ,this age of jazz are all ,if we may believe our ears gateways to Hell, and we should be better employed sitting at home contemplating our sins. I find myself unable to be in entire agreement with the grave men who utter these warnings. The devil has many forms, some designed to deceive the young ,some designed to deceive the old and serious .If it is the devil that tempts the young to enjoy themselves ,is it not ,perhaps ,the same personage that persuades the old to condemn their enjoyment? And is not condemnation perhaps merely a form of excitement appropriate to old age? And is it not , perhaps ,a drug which -like opium -has to be taken in continually stronger doses to produce the desired effect? Is it not to be feared that ,beginning with the wickedness of the cinema, we should be led step by step to condemn the opposite political party ,dagoes ,wops, Asiatics ,and ,in short, everybody except the fellow members of our club? And it is from just such condemnations, when widespread, that wars proceed. I never heard of a war that proceeded from dance halls.
What is serious about excitement is that so many of its forms are destructive. It is destructive in those who cannot resist excess in alcohol or gambling. It is destructive when it takes the form of mob violence. And above all it is destructive when it leads to war. It is so deep a need that is will find harmful outlets of this kind unless innocent outlets are at hand. There are such innocent outlets at present in sport, and in politics so long as it is kept in constitutional bounds. But these are not sufficient, especially as the kind of politics that is most exciting is also the kind that does most harm.
Civilized life has grown altogether too tame, and, if it is to be stable, it must provide harmless outlets for the impulses which our remote ancestors satisfied in hunting. In Australia ,where people are few and rabbits are many ,I watched a whole populace satisfying the primitive impulse in the primitive manner by the skilful slaughter of many thousands of rabbits ,But in London or New York, where people are many and rabbits are few ,some other means must be found to gratify primitive impulse ,I think every big town should contain artificial waterfalls that people could descend in very fragile canoes ,and they should contain bathing pools full of mechanical sharks ,Any persons found advocating a preventive war should be condemned to two hours a day with these ingenious monsters.
我们在每个视图上均独立地应用 Perry & Wolf 的公式,即定义一个所使用的元素集合(组件、容器、连接符),捕获工作形式和模式,并且捕获关系及约束,将架构与某些需求连接起来。每种视图使用自身所特有的表示法-蓝图(blueprint)来描述,并且架构师可以对每种视图选用特定的架构风格(architectural style),从而允许系统中多种风格并存。
我们将轮流的观察这五种视图,展现各个视图的目标:即视图的所关注的问题,相应的架构蓝图的标记方式,描述和管理蓝图的工具。并以非常简单的形式从 PABX 的设计中,从我们在Alcatel 商业系统(Alcatel Business System)上所做的工作中,以及从航空运输控制系统(Air Traffic Control system)中引出一些例子―旨在描述一下视图的特定及其标记的方式,而不是定义这些系统的架构。
进程架构可以在几种层次的抽象上进行描述,每个层次针对不同的问题。在最高的层次上,进程架构可以视为一组独立执行的通信程序(叫作”processes”)的逻辑网络,它们分布在整个一组硬件资源上,这些资源通过 LAN 或者 WAN 连接起来。多个逻辑网络可能同时并存,共享相同的物理资源。例如,独立的逻辑网络可能用于支持离线系统与在线系统的分离,或者支持软件的模拟版本和测试版本的共存。
接着,我们可以区别主要任务、次要任务。主要任务是可以唯一处理的架构元素;次要任务是由于实施原因而引入的局部附加任务(周期性活动、缓冲、暂停等等)。它们可以作为 Ada Task 或轻量线程来实施。 主要任务的通讯途径是良好定义的交互任务通信机制:基于消息的同步或异步通信服务、远程过程调用、事件广播等。次要任务则以会见或共享内存来通信。在同一过程或处理节点上,主要任务不应对它们的分配做出任何假定。
消息流、过程负载可以基于过程蓝图来进行评估,同样可以使用哑负载来实现”中空”的进程架构,并测量在目标系统上的性能。正如 Filarey et al. 在他的 Eurocontrol 实验中描述的那样。
进程视图的表示法
我们所使用的进程视图的表示方法是从Booch最初为 Ada 任务推荐的表示方法扩展而来。同样,用来所使用的表示法关注在架构上具有重要意义的元素。(图 4)
图 4 - 过程蓝图表示法
我们曾使用来自 TRW 的 Universal Network Architechure Services(UNAS0) 产品来构建并实施过程和任务集合(包扩它们的冗余),使它们融入过程的网络中。UNAS 包含 Software Architect Lifecycle Environment(SALE)工具,它支持上述表示方法。SALE 允许以图形的形式来描述进程架构,包括对可能的交互任务通信路径的规格说明,正是从这些路径中自动生成对应的 Ada 或 C++ 源代码。使用该方法来指定和实施进程架构的优点是易于进行修改而不会对应用软件造成太多的影响。
进程视图的风格
许多风格可以适用于进程视图。例如采用 Garlan 和 Shaw 的分类法1,我们可以得到管道和过滤器(Pipes and filters),或客户端/服务器,以及各种多个客户端/单个服务器和多个客户端/多个服务器的变体。对于更加复杂的系统,可以采用类似于 K.Birman 所描述的ISIS系统中进程组方法以及其它的标注方法和工具。
进程蓝图的例子
图 5 - Télic PABX 的过程蓝图(部分)
所有的终端由单个的 Termal process 处理,其中 Termal process 由输入队列中的消息进行驱动。Controller 对象在组成控制过程三个任务之中的一项任务上执行:Low cycle rate task 扫描所有的非活动终端(200 ms),将 High cycle rate task(10 ms)扫描清单中的终端激活,其中 High cycle rate task 检测任何重要的状态变化,将它们传递给 Main controller task,由它来对状态的变更进行解释,并通过向对应的终端发送消息来通信。这里 Controller 过程中的通信通过共享内存来实现。
类通常作为一个模块来实现,例如 Ada 包中可视部分的一个类型。密切相关的类(类的种类)的集合组合到子系统中。子系统的定义必须考虑额外的约束,如团队组织、期望的代码规模(通常每个子系统为 5 K 或 20 K SLOC)、可重用性和通用性的程度以及严格的分层依据(可视性问题),发布策略和配置管理。所以,通常最后得到的不是与逻辑视图逐一对应的视图。
D. Garlan & M. Shaw, “An Introduction to Software Architecture,” Advances in Software Engineering and Knowledge Engineering, Vol. 1, World Scientific Publishing Co. (1993).
D. E. Perry & A. L. Wolf, “Foundations for the Study of Software Architecture,” ACM Software Engineering Notes, 17, 4, October 1992, 40-52.
Ph. Kruchten & Ch. Thompson, “An Object-Oriented, Distributed Architecture for Large Scale Ada Systems,” Proceedings of the TRI-Ada ’94 Conference, Baltimore, November 6-11, 1994, ACM,p.262-271.
G. Booch: Object-Oriented Analysis and Design with Applications, 2nd. edition, Benjamin-Cummings Pub. Co., Redwood City, California, 1993, 589p.
K. P. Birman, and R. Van Renesse, Reliable Distributed Computing with the Isis Toolkit, IEEE Computer Society Press, Los Alamitos CA, 1994.
K. Rubin & A. Goldberg, “Object Behavior Analysis,” CACM, 35, 9 (Sept. 1992) 48-62
B. I. Witt, F. T. Baker and E. W. Merritt, Software Architecture and Design-Principles, Models, and Methods, Van Nostrand Reinhold, New-York (1994) 324p.
D. Garlan (ed.), Proceedings of the First Internal Workshop on Architectures for Software Systems, CMU-CS-TR-95-151, CMU, Pittsburgh, 1995.
Windows通信基础(Windows Communication Foundation,WCF)是基于Windows平台下开发和部署服务的软件开发包(Software Development Kit,SDK)。WCF为服务提供了运行时环境(Runtime Environment),使得开发者能够将CLR类型公开为服务,又能够以CLR类型的方式使用服务。理论上讲,创建服务并不一定需要WCF,但实际上,使用WCF却可以使得创建服务的任务事半功倍。WCF是微软对一系列产业标准定义的实现,包括服务交互、类型转换、封送(Marshaling)以及各种协议的管理。