搜尋此網誌

2025年8月8日星期五

Computer room

    比爾·蓋茲喜歡電腦,電腦讓他思考。電腦對他馬虎的思維嚴酷無情。電腦要求他在邏輯上貫徹始終,在細節上小心注意。

    I loved how the computer forced me to think. It was completely unforgiving in the face of mental sloppiness. It demanded that I be logically consistent and pay attention to details.

disparate: so different from each other that they cannot be compared or cannot work together

rudimentary: dealing with only the most basic matters or ideas

ominously: in a way that suggests that something bad is going to happen in the future

elegance: the quality in a plan or an idea of being clever but simple

instantaneous: happening immediately

tic-tac-toe: a paper-and-pencil game for two players who take turns marking the spaces in a three-by-three grid, one with Xs and the other with Os.

infer: deduce

outstrip: to become larger, more important, etc. than somebody/something

sloppiness: ​the fact of showing a lack of care, thought or effort

rigorous: demanding that particular rules, processes, etc. are strictly followed

Algebra is a branch of mathematics that uses symbols, often letters, to represent numbers and their relationships in mathematical expressions and equations.

persevere: to continue trying to do or achieve something despite difficulties

coax: to persuade somebody to do something by talking to them in a kind and gentle way

asterisk: DJ[ˋæstərisk]

rack up: to collect something, such as profits or losses in a business, or points in a competition

blistering: done very fast or with great energy

gaggle: ​a group of noisy people

stoke: to make people feel something more strongly

mosh pit: the place, just in front of the stage, where the audience at a concert of rock music dances and jumps up and down

outdo: to do more or better than somebody else

indeterminate: that cannot be identified easily or exactly

put-upon: treated in an unfair way by somebody because they take advantage of the fact that you are kind or willing to do things

sophomore: ​a student in the second year of a course of study at a college or university

exploit: to treat a person or situation as an opportunity to gain an advantage for yourself

If someone is jockeying for position, they are using whatever methods they can in order to get into a better position than their rivals.

rival: a person, company or thing that competes with another in sport, business, etc.

hand-me-down: ​no longer wanted by the original owner

A Renaissance DJ[rəˋneisəns] man is a term for someone who is knowledgeable, educated, and proficient in many different fields, excelling in a variety of areas.

ICBM: Intercontinental Ballistic Missile

muttonchops: long hair growing down each side of a man's face

goad: stimulate

bait: a person or thing that is used to attract somebody in order to catch them or make them do what you want

gadget: DJ[ˋgædʒit] a small tool or device that does something useful

cerebral: relating to the mind rather than the feelings

foursome: a group of four people taking part in a social activity or sport together

leveler: an event or a situation that makes everyone equal whatever their age, importance, etc.

RAND is a nonprofit institution that helps improve policy and decision-making through research and analysis.

kooky: strange or crazy

hindsight: the understanding that you have of a situation only after it has happened and that means you would have done things in a different way

de facto: (from Latin, formal) existing as a fact although it may not be legally accepted as existing

overseer: a person or an organization that is responsible for making sure that a system is working as it should

thrilled: very excited and pleased

poke: to push something somewhere or move it in a particular direction with a small quick movement

squabble: ​a noisy argument about something that is not very important

wrath: extreme anger

tongue-in-cheek: not intended seriously; done or said as a joke

laissez-faire: the policy of leaving things to take their own course, without interfering

oversight: the fact of making a mistake because you forget to do something or you do not notice something

rebuff: rebuff something to refuse a friendly offer, request or suggestion in an unkind way

Bill Gates "Source Code"

Online Dictionaries Used:

hk.dictionary.search.yahoo.com

www.oxfordlearnersdictionaries.com

www.merriam-webster.com

Some explanations are from Google AI Overview.

2025年8月5日星期二

Reference in C++

#include <iostream>

void incrementByReference(int& ref) {
    ref++;  // Directly increments the original variable
}

int main() {
    int value = 20;
    int& rValue = value;  // Declare a reference bound to 'value'
   
    std::cout << "Before: " << value << "\n";  // Prints 20
   
    incrementByReference(rValue);
   
    std::cout << "After:  " << value << "\n";  // Prints 21
   
    // References must be initialized and cannot be reseated
   
    return 0;
}

References in C++ act as true aliases for existing objects.

Once you bind a reference to an object, any operation through that reference directly

affects the original. There’s no extra indirection or separate storage - think of the

reference as a permanent nickname for the object.


Ideal for function parameters when you want to modify the caller’s variable.

value is the caller’s variable (actual parameter) in the main() function.

Microsoft and GitHub Copilot

Pointer in C++

#include <iostream>

void incrementByPointer(int* ptr) {
    if (ptr) {
        (*ptr)++;  // Dereference pointer, then increment the pointee
    }
}

Line 1. Function Signature - Return type is void, so nothing comes back to the caller. - Parameter is int* ptr, a pointer to an int.

Line 2. Null Check
Guarding against a null pointer prevents undefined behavior if someone accidentally calls
incrementByPointer(nullptr).

Line 3. Dereference & Increment
- The parentheses ensure you dereference ptr first, yielding the int it points to.
- The ++ then increments that int in place.
Note: Writing ptr++ would advance the pointer itself, not the value it points to.

int main() {
    int value = 10;
    int* pValue = &value;  // Declare a pointer and take the address of 'value'
   
    std::cout << "Before: " << value << "\n";  // Prints 10
   
    incrementByPointer(pValue);
   
    std::cout << "After:  " << value << "\n";  // Prints 11

When you see both ptr and pValue in the code, they’re actually two separate pointer variables that refer

to the same int in memory, but they live in different scopes and serve different roles.

Roles and Scope

    pValue

Declared in main().

Holds the address of value.

Its lifetime is the entire execution of main.

You use it to pass &value into functions or perform pointer arithmetic in main.

    ptr

Declared as a parameter in incrementByPointer(int* ptr).

Receives a copy of pValue (the address).

Its lifetime is the duration of the function call.

You use it inside incrementByPointer to modify the pointee.


The literal "\n" represents a single newline character in C++ strings.

When inserted into an output stream, it moves the cursor to the beginning of the next line.

    // Pointer arithmetic example
    int arr[] = {1, 2, 3};
    int* pArr = arr;  // Points to the first element
    std::cout << "Second element via pointer arithmetic: "
              << *(pArr + 1) << "\n";  // Prints 2
   
    return 0;
}

arr decays to int* pointing at the first element.

pArr + 1 advances the pointer by one int (4 bytes on most platforms).

The dereference *(pArr+ 1) yields the second element, exactly like arr[1].

Output:

Second element via pointer arithmetic: 2


Microsoft Copilot

His friend

unruly: not readily ruled, disciplined, or managed

cleft lip: a birth defect characterized by one or more clefts in the upper lip resulting from failure of the embryonic parts of the lip to unite

impediment: a problem, for example a stammer, that makes it more difficult for somebody to speak, hear, etc.

stammer: a problem that somebody has in speaking in which they repeat sounds or words or often stop, before saying things correctly

orthodontia: the treatment of irregularities in the teeth and jaws.

slackly: loosely

A Unitarian minister is a religious leader in the Unitarian or Unitarian Universalist (UU) tradition.

clique: a small group of people who spend their time together and do not allow others to join them

pursue: to do something or try to achieve something over a period of time

tumultuous: involving many difficulties and a lot of change and often violence

assassination: DJ[ə͵sæsiˋneiʃən] the murder of an important or famous person, especially for political reasons

convention: a large meeting of the members of a profession, a political party, etc.

bow out: to stop taking part in an activity, especially one in which you have been successful in the past

vying: vie: to compete strongly with somebody in order to obtain or achieve something

vehemently: ​in a way that shows very strong feelings, especially anger

devour: to read or look at something with great interest and enthusiasm

senator: a member of a senate

senate: one of the two groups of elected politicians who make laws in some countries, for example in the US, Australia, Canada and France. The Senate is smaller than the other group but higher in rank. Many state parliaments in the US also have a Senate.

decry: to strongly criticize somebody/something, especially publicly

conspiracy theory: the belief that a secret but powerful organization is responsible for an event

plot: a secret plan made by a group of people to do something wrong or illegal

idolize: to admire or love somebody very much, possibly too much

LBJ: Lyndon B. Johnson

liberal: a person who supports individual freedom and rights, democracy and free enterprise (= businesses competing against each other with little government control)

carpet: to cover something with a thick layer of something

canvass:  to ask people to support a particular person, political party, etc., either by going around an area and talking to people or by phoning them

flyer: a small sheet of paper that advertises a product or an event and is given to a large number of people

stake out: ​to watch a place secretly, especially for signs of illegal activity

pudgy: ​slightly fat

bump into: (informal) to meet somebody by chance

take on: to begin to have a particular quality, appearance, etc.

machination: a secret and complicated plan

obsess: to completely fill your mind so that you cannot think of anything else, in a way that is not reasonable or normal

mitigate: to make something less harmful, serious, etc.

intrigue: to make somebody very interested and want to know more about something

disquisition: a long complicated speech or written report on a particular subject

ding: to speak with tiresome reiteration

shortcoming: ​a fault in somebody’s character, a plan, a system, etc.

outline: to give a description of the main facts or points involved in something

slog: a hard journey

rugged: (of the landscape) not level or smooth and having rocks rather than plants or trees

slosh: to move around making a lot of noise or coming out over the edge of something

inundate: overflow

fled: flee: to leave a person or place very quickly, especially because you are afraid of possible danger

aside from: except for

notion: ​an idea, a belief or an understanding of something

envision: to imagine what a situation will be like in the future, especially a situation you intend to work towards

Douglas MacArthur (26 January 1880 - 5 April 1964) was an American general who served as a top commander during World War II and the Korean War.

dissect something: to study something closely and/or discuss it in great detail

decipher: to succeed in finding the meaning of something that is difficult to read or understand

"Lucy in the Sky with Diamonds" is a song by the English rock band the Beatles, featured on their 1967 album Sgt. Pepper's Lonely Hearts Club Band.

marvel at: to show or experience great surprise or admiration

flaw: a mistake in something that means that it is not correct or does not work correctly

appointee: a person who has been chosen for a job or position of responsibility

clout: DJ[klaut] power and influence

prodigious: ​very large or powerful and causing surprise; impressive

A clapboard is a type of siding, traditionally made of long, thin, overlapping wooden boards, used to cover the exterior of buildings.

A cog railway is a type of railway that uses a toothed rack rail, usually between the running rails, to climb steep slopes.

hunch over: to bend the top part of your body forward and raise your shoulders and back

rotary: moving in a circle around a central fixed point

A teletype machine, also known as a teletypewriter or teleprinter, is an electromechanical device that transmits and receives typed messages over communication channels.

In computing, time-sharing refers to a method of sharing a computer's resources, typically the CPU, among multiple users or processes concurrently.

concurrently: at the same time

parcel out: to divide something into parts or between several people

caliber: the quality of something, especially a person’s ability

An ordained minister is a member of the clergy who has been formally recognized and authorized by a religious institution to perform religious rites and ceremonies.

freewheeling: not concerned about rules or the possible results of what you do

aeronautical: connected with the science or practice of building and flying aircraft

avid: very enthusiastic about something (often a hobby)

sabbatical: a period of time when somebody, especially a teacher at a university, is allowed to stop their normal work in order to study or travel

sacred: very important and treated with great respect; that must not be changed or challenged

infamous: notorious

trek: a long, hard walk lasting several days or weeks, especially in the mountains

intrepid: very brave; not afraid of danger or difficulties

lease: a legal agreement that allows you to use a building, a piece of equipment or some land for a period of time, usually in return for rent

rummage sale: a sale of old or used clothes, etc. to make money for a church, school or other organization

cutting-edge: at the newest, most advanced stage in the development of something

amusing: funny and giving pleasure

hunch: a feeling that something is true even though you do not have any evidence to prove it

Bill Gates "Source Code"

Online Dictionaries Used:

hk.dictionary.search.yahoo.com

www.oxfordlearnersdictionaries.com

www.merriam-webster.com

Some explanations are from Google AI Overview.

2025年7月30日星期三

New School

station wagon: an automobile that has a passenger compartment which extends to the back of the vehicle, that has no trunk, that has one or more rear seats which can be folded down to make space for light cargo, and that has a tailgate or liftgate

tailgate: the door that opens upwards at the back of a car (called a hatchback) that has three or five doors

liftgate: a rear panel that opens upward

A college feeder is a school, typically a high school, that sends a disproportionately high number of students to a particular college or university, or a specific type of higher education institution.

disproportionately: in a way that is too large or too small when compared with something else

abolish: abolish something to officially end a law, a system or an institution

While A Separate Peace has not been banned, it has been challenged six times between 1980 and 1996 in six different counties. Most of the complaints about the book cite offensive language; several complaints also include homosexual themes and negative attitudes expressed by characters.

county: one of a number of areas that some countries are divided into, each with its own local government

clip: to cut something with scissors or shears, in order to make it shorter or neater; to remove something from somewhere by cutting it off

upperclassman: ​(in the US) a male student in the last two years of high school or college

fame: the state of being known and talked about by many people

championship: a competition to find the best player or team in a particular sport

forestry: the science or practice of planting and taking care of trees and forests

the ropes [plural]: the fence made of rope that is around the edge of the area where a boxing or wrestling match takes place

A glee club is a group of people who sing together, often in a school or university setting.

shtick: a style of humor that is typical of a particular performer

goof-off: ​a person who avoids work or responsibility

fellowship: (formal) a feeling of friendship between people who do things together or share an interest

depiction: the act of showing somebody/something in a particular way in words or pictures, especially in a work of art

loner: a person who is often alone or who prefers to be alone, rather than with other people

nerd: a person who is boring, stupid and not fashionable

obnoxious: extremely unpleasant, especially in a way that offends people

Avid generalist refers to someone who is highly skilled and knowledgeable across a broad range of subjects or fields, rather than specializing in a single area.

crew cut: a hairstyle in which the hair is cut very short

pump-fake: in football and basketball, an action in which a player deceives their opponent by pretending to throw the ball in a particular direction, or by pretending to move in a particular direction

clown: a person that you think is bad because they act in a stupid way

sting: to make somebody feel angry or upset

redeem somebody/something: to make somebody/something seem less bad

crib: to dishonestly copy work from another student or from a book

deluge: a large number of things that happen or arrive at the same time

opus: an important piece of literature, etc., especially one that is on a large scale

exhortation (to do something): an act of trying very hard to persuade somebody to do something

oblige: DJ[əˋblaidʒ] to help somebody by doing what they ask or what you know they want

extensive: including or dealing with a wide range of information


Bill Gates "Source Code"

Online Dictionaries Used:

hk.dictionary.search.yahoo.com

www.oxfordlearnersdictionaries.com

www.merriam-webster.com

Some explanations are from Google AI Overview.

2025年7月29日星期二

20 mg Simvastatin q.d.

Over-the-counter (OTC) medicines are medications that can be purchased without a prescription from a healthcare professional. They are used to treat a variety of common ailments (minor illness) and their symptoms. While readily available, it's crucial to use them safely and responsibly.

In Hong Kong, most cholesterol lowering drugs can only be obtained from pharmacy with a prescription. They should be used under close supervision by healthcare professionals.

for loops

In C++, vector<int> is a dynamic array from the Standard Template Library (STL) that stores integers. Unlike regular arrays, vectors can grow or shrink in size during runtime.

for (initialization; condition; update) {
    // Code to execute in each iteration
}

average += laptimes[i];
is equivalent to
average = average + laptimes[i];

average/= laptimes.size();
is equivalent to
average = average / laptimes.size();

Microsoft Copilot