《自卑与超越》

关于本书

《自卑与超越》

1. 我们都生活在地球之上，地球资源共存同时又受其制约。

2. 没有谁是人类中唯一的存在，我们生活在与他人的联系之中，一旦隔绝，即是灭亡。

3. 人类由男女两性构成，爱与婚姻受制于该现实。

1. 我们该如何在地球家园中找出一个赖以生存的方式或职业？

2. 我们该如何在群体之中找到自己的位置，以便与他人合作并享受合作的益处？

3. 我们该如何自我调整，理解两性的存在以及依赖于两性关系的人类繁衍问题？

1. 保持欲望，自己想做的事情不要找借口，尽量做，不留遗憾；
2. 尽量多地与周围人和环境产生更多的交流和联系；
3. 保持谦虚，比我优秀的人数不胜数，学无止境；
4. 要保持自信，做任何事情用心去做，我也做得都很好。

My C/C++ Coding Style

1 Project Structure

1.1 File Guards

#ifndef ADSP_DRIVER_ADC_H_

...

#endif  /* ADSP_DRIVER_ADC_H_ */

1.1 Order of Includes

1. self.h.
2. A blank line
3. C/C++ system headers (more precisely: headers in angle brackets with the .h extension), e.g. <unistd.h>, <stdlib.h>.
4. A blank line
5. Other libraries’ .h files.

1.2 File Names

File names should include both platform name and module functions. For example:

• A driver file name example is mcu_driver_adc.c.
• A utility file name example is utility_crc32.c.
• A app file name example is app_gateway.c.
• A board file name example of project XXX isxxx_audio.c.

2. Code Format

2.1 Brace Placement

Allman style is used for brace placement, e.g.

while (x == y)
{
something();
somethingelse();
}

2.2 Indentations

Use 4 spaces rather than tabs as printers as users might have different tab settings.Use single line spacing between logical blocks of code.Use double line spacing between functions.Linux(LF) end line style is used.

2.3 Code Length

Code in single line should not exceed 80 characters. When breaking lines, use the natural logical breaks to determine where the newline goes. Indent the continuation line to illustrate its logical relationship to the rest of the code in the line.

if (thisVariable1 == thatVariable1 || thisVariable2 == thatVariable2 || thisVariable3 == thatVariable3)
bar();

becomes:

if (thisVariable1 == thatVariable1 ||
thisVariable2 == thatVariable2 ||
thisVariable3 == thatVariable3)
bar();

2.4 Brackets

Use a pure-block, fully bracketed style for blocks of code. This means put brackets around all conditional code blocks, even one-line blocks.

if(statement == true)
{
foo_true();
}
else
{
foo_false();
}

2.5 Spaces

• Insert space padding around operators. E.g.,
if (foo == 2)
a = bar((b - c) * a, d--);

3. Naming Conventions

• All identifiers (variables, constants, Classes etc. ) declared should have meaningful names.
• Have naming conventions to differentiate between local and global data.
• Identifiers may have their types attached to their names for clarity and consistency.
• In case where the language has support for header file, ensure all user defined header file should have the same name as the source file that is referenced in.
• Names should be readable and self documenting. Abbreviations and contractions are to be discouraged. Abbreviations are allowed when they follow common usage within the domain.
• Identifiers should not exceed 31 characters.

3.1 Files

File names should be named with lower case and underscores.

adsp_driver_adc.c adsp_driver_adc.h

3.2 Macros

Macro names should be named with all capitals and underscores.

#define ROUND(x) ...
#define PI_ROUNDED 3.0

3.3 Variables

Data TypePrefix/postfixSample Variable Names
general variablelowerCamelCasesequenceNo
constkconst int32_t kSequenceNo
staticsstatic int32_t sSequenceNo
enumerated data typeeeCapabilityMode
arrayaint32_t aSequenceNo[10]
pointerpint32_t *pSequenceNo
globalggAudioStruct
structPascalCase_sAudioStruct_s
typedefPascalCase_ttypedef struct AudioInfo_st { } AudioInfo_t;
member variable (C++)mmClassMember
class (C++)Pascal Caseclass AudioObject
template (C++)Ttemplate<…> class TAudioTemp
namespace (C++)Nnamespace NAudioName …
• Use <stdint.h> (uint8_t, int32_t etc).
• Use the smallest required scope.
• Variables in a file (outside functions) are always static.
• Avoid to use global variables (use functions to set/get static variables).
• # &,* is aligned to names, e.g., uint32_t *pAddress

3.4 Functions

Global function names start with lower case module name + underscore + camel case function name. E.g., one function in doxygen.c is

uint32_t doxygen_theFirstFunction(uint32_t param1, uint32_t param2);

Local static function names apply lowerCamelCase rule, e.g., one function in adsp_driver_adc.c is

// file adsp_driver_adc.c
static void getInstance(void)

Functions in C++ class should always apply PascalCase rule, e.g. ,

class AudioObject
{
uint8_t *GetObjectName(void);
}

Comments are used for the benefits of code readers as well as developers. So it is recommended that all comments should be written with simple and straightforward words, and English words only.

Doxygen is applied to generate documents according to code comments. Therefore, the rules of Doxygen should be strictly followed.

For better document graphic illustration, Grapghviz is recommended to be installed and used in Doxygen. Both Doxygen and Grapghviz can be installed in Cygwin.

Grapghviz

Doxygen

http://doxygen.nl/files/doxygen-1.8.18-setup.exe​doxygen.nl

4.1 File Banners

Every header file should have a function banner as follows :

/*****************************************************************************
* Portfolio Info
****************************************************************************/

/**
* @brief Brief file introduction.
*
* Detailed file introduction.
*
* @author Name
* @date day month year
*/

/**
* @brief Brief API description.
*
* Detailed api description.
*
* @{
*/

#ifdef __cplusplus
extern "C" {
#endif

/* INCLUDE FILES */

/* GLOBAL DEFINES */

/* GLOBAL VARIABLES */

/* GLOBAL FUNCTIONS */

...

#ifdef __cplusplus
}
#endif

/** @}*/

Every source file should have a function banner as follows :

/*****************************************************************************
* Portfolio Info
****************************************************************************/

/**
* @file file.c
* @brief Brief introduction.
*
* Here typically goes a more extensive explanation of what the source contains.
*
* @author Name
* @date day month year
*/

/* INCLUDE FILES */

/* MODULE CONSTANTS */

/* MODULE VARIABLES */

/* MODULE PROTOTYPES */

/* MODULE FUNCTIONS */

4.2 Function Banners

Detailed function banners should be used in header files since the corresponding c file(s) are not necessarily made available to the user, nor should the user need to read the c file in order to understand how the functions there should be used. Everything should be made obvious from the header file alone.

For static functions in c file(s), function banners are required to use for developing maintenance.

Every function should have a function banner as follows:

/**
* @brief Brief introduction.
*
* Detailed introduction.
*
* @param [in] param1 Input parameter.
* @param [out] param2 Output parameter.
*
* @return Describe what the function returns.
* @retval XXX_OK return value.
*
* @note Something to note.
* @warning Warning.
*/

For comments in codes, /* */ is suggested to use. And space are recommended to add before and after statements. E.g., Use /* example comment */ instead of /*examplecomment*/

Windows

AStyle is used to unify the code format. Before running the batch file, make sure AStyle.exe is included in system PATH. The format rules are configured in file config.astyle and all codes will be formated by running astyle.bat.

Reference

RDK coding guidelines
https://wiki.rdkcentral.com/display/RDK/Coding+Guidelines

C/C++ coding style by Fred Richards (good)
http://index-of.co.uk/C++/C%20&%20C++%20Programming%20Style%20Guidlines.pdf

Indian Hill C style
https://www.maultech.com/chrislott/resources/cstyle/indhill-cstyle.pdf

[转载] Opening Statement for U.S. Supreme Court Nomination Hearing – July 20, 1993

（以下内容来自金斯博格大法官在1993年最高法院大法官的个人陈述，我在读到的时候很受触动，因此转载分享）

Thank you, Mr. Chairman, Senator Hatch, and other members of the committee.

May I say first how much I appreciate the time committee members took to greet me in the weeks immediately following the President’s nomination. It was a particularly busy time for you, and I thank you all the more for your courtesy.

To Senator Moynihan, who has been at my side every step of the way, a thousand thanks could not begin to convey my appreciation. Despite the heavy demands on his time, during trying days of budget reconciliation, he accompanied me on visits to Senate members, he gave over his own desk for ID)’ use, he buoyed up my spirits whenever a lift was needed. In all, he served as the kindest, wisest counselor a nominee could have.

Senator D’Amato, from my great home State of New York, volunteered to join Senator Moynihan in introducing and sponsoring me, and I am so grateful to him. I have had many enlightening conversations in Senate Chambers since June 14, but my visit with Senator D’Amato was sheer fun.

The CHAIRMAN. It always is. [Laughter.]

Judge GINSBURG. My children decided at an early age that mother’s sense of humor needed improvement. They tried to supply that improvement, and kept a book to record their successes. The book was called “Mommy Laughed.” My visit with Senator D’Amato would have supplied at least three entries for the “Mommy Laughed” book.

Representative Norton has been my professional colleague and friend since days when we were still young. As an advocate ·of human rights and fair chances for all people, Eleanor Holmes Nor­ ton has been as brave and as vigilant as she is brilliant. I am so pleased that she was among my introducers, and so proud to be one of Eleanor’s constituents.

Most of all, the President’s confidence in my capacity to serve as a Supreme Court Justice is responsible for the proceedings about to begin. There are no words to tell him what is m my heart. I can say simply this: If confirmed, I will try in every way to justify his faith in me.

I am, as you know from my responses to your questionnaire, a Brooklynite, born and bred-a first-generation American on my father’s side, barely second-generation on my mother’s. Neither of my parents had the means to attend college, but both taught me to love learning, to care about people, and to work hard for whatever I wanted or believed in. Their parents had the foresight to leave the old country, when Jewish ancestry and faith meant exposure to pogroms and denigration of one’s human worth. What has be­ come of me could happen only in America. Like so many others, I owe so much to the entry this Nation afforded to people yearning to breathe free.

I have had the great fortune to share life with a partner truly extraordinary for his generation, a man who believed at age 18 when we met, and who believes today, that a woman’s work, whether at home or on the job, is as important as a man’s. I at­ tended law school in days when women were not wanted by most members of the legal profession. I became a lawyer because Marty and his parents supported that choice unreservedly.

I have been deeply moved by the outpouring of good wishes received in recent weeks from family, neighbors, camp mates, class­ mates, students at Rutgers and Columbia, law-teaching colleagues, lawyers with whom I have worked, judges across the country, and many women and men who do not know me. That huge, spirit-lifting collection shows that for many of our people, an individual’s sex is no longer remarkable or even unusual with regard to his or her qualifications to serve on the Supreme Court.

Indeed, in my lifetime, I expect to see three, four, perhaps even more women on the High Court Bench, women not shaped from the same mold, but of different complexions. Yes, there are miles in front, but what a distance we have traveled from the day President Thomas Jefferson told his Secretary of State: “The appointment of women to [public] office is an innovation for which the public is not prepared.” “Nor,” Jefferson added, “am I.”

The increasingly full use of the talent of all of this Nation’s people holds large promise for the future, but we could not have come to this point–and I surely would not be in this room today-with­ out the determined efforts of men and women who kept dreams of equal citizenship alive in days when few would listen. People like Susan B. Anthony, Elizabeth Cady Stanton, and Harriet Tubman come to mind. I stand on the shoulders of those brave people.

Supreme Court Justices are guardians of the great charter that has served as our Nation’s fundamental instrument of government for over 200 years. It is the oldest written constitution still in force in the world. But the Justices do not guard constitutional rights alone. Courts share that profound responsibility with Congress, the President, the States, and the people. Constant realization of a more perfect Union, the Constitution’s aspiration, requires the widest, broadest, deepest participation on matters of government and government policy.

One of the world’s greatest jurists, Judge Learned Hand, said, as Senator Moseley-Braun reminded us, that the spirit of liberty that imbues our Constitution must lie first and foremost in the hearts of the men and women who compose this great Nation. Judge Hand defined that spirit, in a way I fully embrace, as one which is not too sure that it is right, and so seeks to understand the minds of other men and women and to weigh the interests of others along­ side its own without bias. The spirit Judge Learned Hand de­ scribed strives for a community where the least shall be heard and considered side by side with the greatest. I will keep that wisdom in the front of my mind as long as I am capable of judicial service. Some of you asked me during recent visits why I want to be on the Supreme Court. It is an opportunity beyond any other for one of my training to serve society. The controversies that come to the Supreme Court, as the last judicial resort, touch and concern the health and well-being of our Nation and its people. They affect the preservation of liberty to ourselves and our posterity. Serving on this Court is the highest honor, the most awesome trust, that can be called in a judge. It means working at my craft-working with and for the law-as a way to keep our society both ordered and free.

Let me try to state in a nutshell how I view the work of judging. My approach, I believe, is neither liberal nor conservative. Rather, it is rooted in the place of the judiciary, of judges, in our democratic society. The Constitution’s preamble speaks first of “We, the People,” and then of their elected representatives. The judiciary is third in line and it is placed apart from the political fray so that its members can judge fairly, impartially, in accordance with the law, and without fear about the animosity of any pressure group. In Alexander Hamilton’s words, the mission of judges is “to se­ cure a steady, upright, and impartial administration of the laws.” I would add that the judge should carry out that function without fanfare, but with due care. She should decide the case before her without reaching out to cover cases not yet seen. She should be ever mindful, as Judge and then Justice Benjamin Nathan Cardozo said, “Justice is not to be taken by storm. She is to be wooed by slow advances.”

We-this committee and I-are about to embark on many hours of conversation. You have arranged this hearing to aid you in the performance of a vital task, to prepare your Senate colleagues for consideration of my nomination.

The record of the Constitutional Convention shows that the delegates had initially entrusted the power to appoint Federal judges, most prominently Supreme Court Justices, not to the President, but to you and your colleagues, to the Senate acting alone. Only in the waning days of the Convention did the Framers settle on a nomination role for the President and an advice and consent role for the Senate.

The text of the Constitution, as finally formulated, makes no distinction between the appointment process for Supreme Court Justices and the process for other offices of the United States, for ex­ ample, Cabinet officers. But as history bears out, you and Senators past have sensibly considered appointments in relation to the appointee’s task.

Federal judges may long outlast the President who appoints them. They may serve as long as they can do the job. AB the Constitution says, they may remain in office “during good Behaviour.” Supreme Court Justices, most notably, participate in shaping a lasting body of constitutional decisions. They continuously confront matters on which the Framers left things unsaid, unsettled, or un­ certain. For that reason, when the Senate considers a Supreme Court nomination, the Senators are properly concerned about the nominee’s capacity to serve the Nation, not just for the here and now, but over the long term.

You have been supplied, in the 5 weeks since the President announced my nomination, with hundreds of pages about me and thousands of pages I have penned-my writings as a law teacher, mainly about procedure; 10 years of briefs filed when I was a court­ room advocate of the equal stature of men and women before the law; numerous speeches and articles on that same theme; 13 years of opinions– counting the unpublished together with the published opinions, well over 700 of them-all decisions I made as a member of the U.S. Court of Appeals for the District of Columbia Circuit; several comments on the roles of judge and lawyers in our legal system.

That body of material, I know, has been examined by the committee with care. It is the most tangible, reliable indicator of my attitude, outlook, approach, and style. I hope you will judge my qualifications principally on that written record, a record spanning 34 years, and that you will find in that written record assurance that I am prepared to do the hard work and to exercise the in­ formed, independent judgment that Supreme Court decision-making entails.

I think of these proceedings much as I do of the division between the written record and briefs, on the one hand, and oral argument on the other hand, in appellate tribunals. The written record is by far the more important component in an appellate court’s decision­ making, but the oral argument often elicits helpful clarifications and concentrates the judges’ minds on the character of the decision they are called upon to make.

There is, of course, this critical difference. You are well aware that I come to this proceeding to be judged as a judge, not as an advocate. Because I am and hope to continue to be a judge, it would be wrong for me to say or to preview in this legislative chamber how I would cast my vote on questions the Supreme Court may be called upon to decide. Were I to rehearse here what I would say and how I would reason on such questions, I would act injudiciously.

Judges in our system are bound to decide concrete cases, not abstract issues. Each case comes to court based on particular facts and its decision should tum on those facts and the governing law, stated and explained in light of the particular arguments the par­ ties or their representatives present. A judge sworn to decide impartially can offer no forecasts, no hints, for that would show not only disregard for the specifics of the particular case, it would dis­ play disdain for the entire judicial process.

Similarly, because you are considering my capacity for independent judging, my personal views on how I would vote on a publicly debated issue were I in your shoes–were I a legislator-are not what you will be closely examining. As Justice Oliver Wendell Holmes counseled, “[O]ne of the most sacred duties of a judge is not to read [her] convictions into [the Constitution].” I have tried and I will continue to try to follow the model Justice Holmes set in holding that duty sacred.

I see this hearing, as I know you do, as a grand opportunity once again to reaffirm that civility, courtesy and mutual respect properly keynote our exchanges. Judges, I am mindful, we the elected branches-the Congress and the President-respectful consideration of how court opinions affect their responsibilities. And I am heartened by legislative branch reciprocal sensitivity. As one of you said 2 months ago at a meeting of the Federal Judges Association, ”We in Congress must be more thoughtful and more deliberate in order to enable judges to do their job more effectively.”

As for my own deportment or, in the Constitution’s words, “good Behaviour,” I prize advice received on this nomination from a dear friend, Frank Griffin, a recently retired Justice of the Supreme Court of Ireland. Justice Griffin wrote: “Courtesy to and consideration for one’s colleagues, the legal profession, and the public are among the greatest attributes a judge can have.”

It is fitting, as I conclude this opening statement, to express my deep respect for, and abiding appreciation to Justice Byron R. White for his 31years and more of fine service on the Supreme Court. In acknowledging his colleagues’ good wishes on the occasion of his retirement, Justice White wrote that he expects to sit on U.S. courts of appeals from time to time, and so to be a consumer of, instead of a participant in, Supreme Court opinions. He expressed a hope shared by all lower court Judges. He hoped “the Supreme Court’s mandates will be clear an crisp, leaving as little room as possible for disagreement about their meaning.” If confirmed, I will take that counsel to heart and strive to write opinions that both “get it right” and “keep it tight.”

from https://www.loc.gov/law/find/nominations/ginsburg/hearing.pdf.

《时间的秩序》

“为了钱而工作”错了吗？

“Fight for the things that you care about, but do it in a way that will lead others to join you.”

2020年9月18日，对于很多法律从业者来说注定是很不平凡的一天。在这一天，美国著名大法官金斯博格去世了。她可能是女性眼中的超级英雄，可能是很多平凡人眼中努力奋斗的力量来源，同样也可能是很多法律从业者心目中的行业标杆。因为金斯博格的身体情况，很多人对她的去世可能不会感到震惊。但是在美国大选之前这样一个敏感的节点去世，却给2020年的总统大选铺上了一层新的迷雾。

附录

https://www.bilibili.com/video/BV15k4y1C7AX?from=search&seid=1837391866184737188

参考

https://forge.medium.com/the-psychology-of-belief-d1e1f22d8761