Managing Oneself - Harvard Business Review - January 2005 issue

by Peter F. Drucker

Success in the knowledge economy comes to those who know themselves—their strengths, their values, and how they best perform.

Summary. Throughout history, people had little need to manage their careers—they were born into their stations in life or, in the recent past, they relied on their companies to chart their career paths. But times have drastically changed. Today we must all learn to manage ourselves.

What does that mean? As Peter Drucker tells us in this seminal article first published in 1999, it means we have to learn to develop ourselves. We have to place ourselves where we can make the greatest contribution to our organizations and communities. And we have to stay mentally alert and engaged during a 50-year working life, which means knowing how and when to change the work we do.

It may seem obvious that people achieve results by doing what they are good at and by working in ways that fit their abilities. But, Drucker says, very few people actually know—let alone take advantage of—their fundamental strengths.

He challenges each of us to ask ourselves: What are my strengths? How do I perform? What are my values? Where do I belong? What should my contribution be? Don’t try to change yourself, Drucker cautions. Instead, concentrate on improving the skills you have and accepting assignments that are tailored to your individual way of working. If you do that, you can transform yourself from an ordinary worker into an outstanding performer.

Today’s successful careers are not planned out in advance. They develop when people are prepared for opportunities because they have asked themselves those questions and have rigorously assessed their unique characteristics. This article challenges readers to take responsibility for managing their futures, both in and out of the office.


History’s great achievers—a Napoléon, a da Vinci, a Mozart—have always managed themselves. That, in large measure, is what makes them great achievers. But they are rare exceptions, so unusual both in their talents and their accomplishments as to be considered outside the boundaries of ordinary human existence. Now, most of us, even those of us with modest endowments, will have to learn to manage ourselves. We will have to learn to develop ourselves. We will have to place ourselves where we can make the greatest contribution. And we will have to stay mentally alert and engaged during a 50-year working life, which means knowing how and when to change the work we do.

What Are My Strength?

Most people think they know what they are good at? They are ususlly wrong.

The only way to discover your strength is through feedback analysis.

How Do I Perform?

Am I a reader or a listener?

How do I learn?

What Are My Values?

I call it the “mirror test”.

Where Do I Belong?

What Should I Contribute?

To answer it, they must address three distinct elements:

  • What does the situation require?
  • Given my strength, my way of performing, and my values, how can I make the greatest contribution to what needs to be done?
  • And finally, What results have to be achieved to make a difference?

Responsibility for Relationships

  • The first is to accept the fact that other people are as much individuals as you youself are.
  • The second part of relationship responsibility is taking responsibility for communication.

The Second Half of Your Life

There are three ways to develop a second career:

  • The first is actually to start one. We will see many more second careers undertaken by people who have achived modest success in their first jobs.
  • The second way to prepare for the second half of yours life is to develop a parallel career.
  • Fially, there are the social entrepreneurs.

In effect, managing oneself demands that each knowledge worker think and behave like a chief executive office.

Knowledge workers outlive their organizations, and they are mobile. The need to manage oneself is therefore creating a revolution in human affairs.


Peter F. Drucker is the Marie Rankie Clarke Professor of Social Science and Management(Emeritus) at Claremont Graduate University in Claremont, California. This article is an excerpt from his book Management Challenges for the 21st Century(HarperCollins, 1999)


Scientific method & Debugging

Scientific method

The scientific method is often represented as an ongoing process.

© Robert Sedgewick and Kevin Wayne

  • Observe some feature of the natural world, generally with precise measurements.
  • Hypothesize a model that is consistent with the observations.
  • Predict events using the hypothesis.
  • Verify the predictions by making further observations.
  • Validate by repeating until the hypothesis and observations agree.

One of the key tenets of the scientific method is that the experiments we design must be reproducible, so that others can convince themselves of the validity of the hypothesis. Hypotheses must also be falsifiable, so that we can know for sure when a given hypothesis is wrong (and thus needs revision). As Einstein famously is reported to have said (“No amount of experimentation can ever prove me right; a single experiment can prove me wrong”), we can never know for sure that any hypothesis is absolutely correct; we can only validate that it is consistent with our observations.

Scientific Debugging

  1. Observe. we look at the behavior of the program. What are its outputs? What information is it displaying? How is it responding to user input?
  2. Hypothesize. we try to divide the set of possible causes into multiple independent groups. For example, in a client/server app, a potential hypothesis might be “the bug is in the client”, which is either true or false; if false, then presumably the bug is on the server. A good hypothesis should be falsifiable, which means that you ought to be able to invent some test which can disprove the proposition.
  3. Experiment. we run the test — that is, we execute the program in a way that allows us to either verify or invalidate the hypothesis. In many cases, this will involve writing additional code that is not a normal part of the program; you can think of this code as your “experimental apparatus”.
  4. we go back to the Observe step to gather the results of running the experiment.

LeetCode - Algorithms - 1668. Maximum Repeating Substring

Problem

1668. Maximum Repeating Substring

Java

Brute-force loop

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
class Solution {
private int countByPrefix(String sequence, String word) {
int maxCount = 0;
int tempCount = 0;
int word_len = word.length();
for (int i = 0; i <= sequence.length() - word_len; i++) {
String str = sequence.substring(i, i + word_len);
if (str.equals(word)) {
tempCount++;
i += word_len - 1;
} else {
tempCount = 0;
}
if (tempCount > maxCount)
maxCount = tempCount;
}
return maxCount;
}

private int countBySuffix(String sequence, String word) {
int maxCount = 0;
int tempCount = 0;
int word_len = word.length();
for (int i = sequence.length(); i > word_len - 1; i--) {
String str = sequence.substring(i - word_len, i);
if (str.equals(word)) {
tempCount++;
i = i - word_len + 1;
} else {
tempCount = 0;
}
if (tempCount > maxCount)
maxCount = tempCount;
}
return maxCount;
}

public int maxRepeating(String sequence, String word) {
int maxCount_prefix = countByPrefix(sequence, word);
int maxCount_suffix = countBySuffix(sequence, word);
return maxCount_prefix > maxCount_suffix ? maxCount_prefix : maxCount_suffix;
}
}

Submission Detail

  • 212 / 212 test cases passed.
  • Runtime: 1 ms, faster than 82.84% of Java online submissions for Maximum Repeating Substring.
  • Memory Usage: 37.5 MB, less than 50.50% of Java online submissions for Maximum Repeating Substring.

© java short easy to understand

1
2
3
4
5
6
7
8
9
10
11
class Solution {
public int maxRepeating(String sequence, String word) {
int count = 0;
String pat = word;
while (sequence.contains(pat)) {
count++;
pat += word;
}
return count;
}
}

Submission Detail

  • 212 / 212 test cases passed.
  • Runtime: 1 ms, faster than 82.48% of Java online submissions for Maximum Repeating Substring.
  • Memory Usage: 37.6 MB, less than 50.74% of Java online submissions for Maximum Repeating Substring.

My English Words List - November - 2021

inquire

inquire

verb

  • to ask for information

We inquired the way to the station.

I called the school to inquire about the application process.

flutter

flutter

verb

butterflies fluttering among the flowers

We watched the butterflies fluttering in the garden.

Leaves fluttered to the ground.

The bird was fluttering its wings.

The breeze fluttered the curtains.

Flags fluttered in the wind.

scythe

scythe

noun

Parts of a scythe

Scythe

A scythe is an agricultural hand tool for mowing grass or harvesting crops. It is historically used to cut down or reap edible grains, before the process of threshing. The scythe has been largely replaced by horse-drawn and then tractor machinery, but is still used in some areas of Europe and Asia.

vine

vine

noun

Convolvulus vine twining around a steel fixed ladder

Grapes grow upon a vine.
Apples grow upon a tree.
Blueberries grow upon a bush.

inflate

inflate

verb

inflate a balloon

We used a pump to inflate the raft.

Rapid economic growth may cause prices to inflate.

Low tire pressure: Stop in a safe place, check tire pressures, and inflate tire(s) if necesssary.

pane

pane

noun

A paned window.

  • a framed sheet of glass in a window or door

frost on a window pane

Paned window &#40;architecture&#41;

swot

swot

noun

They coined a new term in Chinese: xiao zhen zuotijia, meaning “small-town swot”.

Cramming &#40;education&#41;

Synonyms

  • bookworm
  • nerd

vague

vague

adjective

He gave only a vague answer.

When I asked him what they talked about, he was rather vague.

I think I have a vague understanding of how it works.

His conjecture was more vague.

marvelous

marvelous

adjective

Andrew Wiles’s marvelous proof

vacant

vacant

adjective

a vacant seat on a bus

a vacant room

These lockers are all vacant.

a vacant job position

leash

leash

noun

A clip-on leash attached to a Jack Russel Terrier’s collar

put a dog on a leash

Dogs must be kept on a leash while in the park.

Leash

cartoon

cartoon

noun

The kids are watching cartoons.

Cartoon

barley

barley

noun

Barley

Barley

croak

croak

verb

We could hear the frogs croaking by the pond.

blend

blend

verb

The music blends traditional and modern melodies.

noun

a blend of cream and eggs

damp

damp

noun

  • slight wetness in the air

The cold and damp made me shiver.

verb

His hands were damped with sweat.

Adjective

My hair’s still damp from the rain.

thorn

thorn

noun

Thorns on a blackberry branch

Thorns, spines, and prickles

wellness

wellness

noun

lifestyles that promote wellness

Daily exercise is proven to promote wellness.

Synonyms

fitness, health, healthiness, robustness, wholeness

Antonyms

illness, sickness, unhealthiness

assure

assure

verb

I assure you that we can do it.

I can assure you that you won’t be disappointed.

Hard work assures success.

He assured the children all was well.

She assured herself that the doors were locked.

the seller assured the buyer of his honesty

puck

puck

noun

A standard hockey puck

  • a vulcanized rubber disk used in ice hockey
  • a rubber disk used in hockey

Hockey puck

rink

Children playing ice hockey on a backyard rink in Canada

rink

The hockey team is practicing at the rink.

Ice rink

Ice hockey rink

seminar

seminar

noun

a seminar bringing together the world’s leading epidemiologists

Seminar

reap

reap

verb

He reaped large profits from his investments.

You’ll reap the benefit of your hard work.

reap a crop

Synonyms

gather, harvest, pick

excerpt

excerpt

noun

Her latest novel is called “The Air We Breathe” and you can read an excerpt on our website.

verb

This article is excerpted from the full report.

sundae

sundae

noun

The original sundae consists of vanilla ice cream topped with a flavored sauce or syrup, whipped cream and a maraschino cherry.

tailored

tailored

adjective

pants bought off the rack never fit me so I have to buy tailored ones instead

growl

growl

verb

his stomach growled

the dog growled at the stranger

I could hear a dog growling behind me.

My stomach’s been growling all morning.

gulp

gulp

verb

gulp down a sob

gulp down knowledge

She told him not to gulp his food.

The exhausted racers lay on the ground, gulping air.

threshold

threshold

noun

A worn-out wooden threshold

on the threshold of a new age

Percolation threshold

Threshold knowledge

pore

pore

noun

Sourdough bread pores

Rye bread pores

Pore &#40;bread&#41;

porous

porous

adjective

  • full of small holes

porous wood

  • capable of absorbing liquids

porous paper

dynamite

dynamite

noun

Dynamite

Dynamite was invented by Swedish chemist Alfred Nobel in the 1860s and was the first safely manageable explosive stronger than black powder.

Dynamite

verb

They plan to dynamite the old building.

willful

willful

adjective

a stubborn and willful child

willful children

He has shown a willful disregard for other people’s feelings.

The Willful Child

Once upon a time there was a child who was wilful and would not do what her mother wished.

Be the Best of Whatever You Are

by Douglas Malloch

If you can’t be a pine on the top of the hill,
Be a scrub in the valley — but be
The best little scrub by the side of the rill;
Be a bush if you can’t be a tree.

If you can’t be a bush be a bit of the grass,
And some highway happier make;
If you can’t be a muskie then just be a bass —
But the liveliest bass in the lake!

We can’t all be captains, we’ve got to be crew,
There’s something for all of us here,
There’s big work to do, and there’s lesser to do,
And the task you must do is the near.

If you can’t be a highway then just be a trail,
If you can’t be the sun be a star;
It isn’t by size that you win or you fail —
Be the best of whatever you are!


Plane Division by Lines

Problem

Pancake cut into seven pieces with three straight cuts.

How many slices of pizza can a person obtain by making n straight cuts with a pizza knife?

What is the maximum number \( L_n \) of regions defined by n lines in the plane?

Solution

The maximum number of pieces, p obtainable with n straight cuts is the n-th triangular number plus one, forming the lazy caterer's sequence

The nth line (for n > 0) increases the number of regions by k if and only if it splits k of the old regions, and it splits k old regions if and only if it hits the previous lines in k-1 different places. Two lines can intersect in at most one point. Therefore the new line can intersect the n-1 old lines in at most n-1 different points, and we must have \( k \leq n \). We have established the upper bound
\( L_n \leq L_{n-1} + n, \qquad \text{for n>0. } \)

Furthermore it’s easy to show by induction that we can achieve equality in this formula. We simply place the nth line in such a way that it’s not parallel to any of the others (hence it intersects them all), and such that it doesn’t go through any of the existing intersection points (hence it intersects them all in different places).

recurrence relation

\( L_0=1; \)
\( L_n=L_{n-1}+n, \qquad \text{for n>0. } \)

Simply put, each number equals a triangular number plus 1.

In other words, \( L_n \) is one more than the sum \( S_n \) of the first n positive integers.

\( L_n = \frac{1}{2}n(n+1)+1 \)

resources

A Psalm of Life

What The Heart Of The Young Man Said To The Psalmist.

by Henry Wadsworth Longfellow

Tell me not, in mournful numbers,
&nbsp;&nbsp;Life is but an empty dream!—
For the soul is dead that slumbers,
&nbsp;&nbsp;And things are not what they seem.

Life is real! Life is earnest!
&nbsp;&nbsp;And the grave is not its goal;
Dust thou art, to dust returnest,
&nbsp;&nbsp;Was not spoken of the soul.

Not enjoyment, and not sorrow,
&nbsp;&nbsp;Is our destined end or way;
But to act, that each to-morrow
&nbsp;&nbsp;Find us farther than to-day.

Art is long, and Time is fleeting,
&nbsp;&nbsp;And our hearts, though stout and brave,
Still, like muffled drums, are beating
&nbsp;&nbsp;Funeral marches to the grave.

In the world’s broad field of battle,
&nbsp;&nbsp;In the bivouac of Life,
Be not like dumb, driven cattle!
&nbsp;&nbsp;Be a hero in the strife!

Trust no Future, howe’er pleasant!
&nbsp;&nbsp;Let the dead Past bury its dead!
Act,—act in the living Present!
&nbsp;&nbsp;Heart within, and God o’erhead!

Lives of great men all remind us
&nbsp;&nbsp;We can make our lives sublime,
And, departing, leave behind us
&nbsp;&nbsp;Footprints on the sands of time;

Footprints, that perhaps another,
&nbsp;&nbsp;Sailing o’er life’s solemn main,
A forlorn and shipwrecked brother,
&nbsp;&nbsp;Seeing, shall take heart again.

Let us, then, be up and doing,
&nbsp;&nbsp;With a heart for any fate;
Still achieving, still pursuing,
&nbsp;&nbsp;Learn to labor and to wait.


LeetCode - Algorithms - 221. Maximal Square

Problem

221. Maximal Square

Java

dynamic programming

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
class Solution {
public int maximalSquare(char[][] matrix) {
final int[][] D = {
{-1, 0}, // up
{0, -1}, // left
{-1, -1} // diagonal
};
int h = matrix.length;
int w = matrix[0].length;
int[][] countMatrix = new int[h][w];
for (int i = 0; i < w; i++) {
countMatrix[0][i] = matrix[0][i] == '1' ? 1 : 0;
}
if (h > 1) {
for (int j = 1; j < h; j++) {
countMatrix[j][0] = matrix[j][0] == '1' ? 1 : 0;
}
for (int i = 1; i < h; i++) {
for (int j = 1; j < w; j++) {
if (matrix[i][j] == '1') {
int minCount = Integer.MAX_VALUE;
for (int k = 0; k < 3; k++) {
int x = i + D[k][0];
int y = j + D[k][1];
if (minCount > countMatrix[x][y])
minCount = countMatrix[x][y];
}
countMatrix[i][j] = minCount + 1;
} else {
countMatrix[i][j] = 0;
}
}
}
}
int maxCount = 0;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if (countMatrix[i][j] > maxCount)
maxCount = countMatrix[i][j];
}
}
return maxCount * maxCount;
}
}

Submission Detail

  • 74 / 74 test cases passed.
  • Runtime: 5 ms, faster than 51.51% of Java online submissions for Maximal Square.
  • Memory Usage: 49 MB, less than 8.01% of Java online submissions for Maximal Square.

My English Words List - October - 2021

brownie

brownie

noun

A homemade chocolate brownie

a small square or rectangle of rich usually chocolate cake often containing nuts

The dinner will include Swiss steak, baked potato with sour cream and butter, slaw, green beans, roll and butter, and a brownie.

Chocolate brownie

ranch

ranch

noun

Aike Ranch, El Calafate

a large farm for raising horses, beef cattle, or sheep

lives on a cattle ranch in Texas that’s as big as the whole state of Rhode Island

Ranch

dove

dove

noun

Rock dove courtship

any of numerous pigeons especially : a small wild pigeon

Columbidae

reconciliation

reconciliation

noun

National Day for Truth and Reconciliation

duo

duo

noun

The comedy duo will perform tonight.

liar

liar

noun

a person who tells lies

She called him a dirty liar.

Lie

A person who communicates a lie may be termed a liar.

tilde

tilde

noun

the mark used to indicate an approximate value

Tilde

receipt

receipt

noun

A receipt from a restaurant

Keep your receipt in case you need to return anything.

Receipt

anthem

anthem

noun

O Canada“ is the national anthem of Canada.

celestial

celestial

adjective

the sun, moon, and stars are celestial bodies

The moon is Earth’s closet and most studied celestial neighbour

knead

knead

verb

kneading dough

Knead the dough until it is smooth.

My grandfather taught me how to knead the bread dough.

tortilla

tortilla

noun

Corn tortillas

a thin round of unleavened cornmeal or wheat flour bread usually eaten hot with a topping or filling (as of ground meat or cheese)

Tortilla

A plate of tortilla chips with salsa and guacamole

tortilla chip

a thin, hard piece of food (called a chip) that is made from corn and usually salted

Tortilla chip

hummus

hummus

noun

Hummus dip with chickpeas, sesame seeds, and oil

a soft food made of ground chickpeas, garlic, and oil

Hummus

guacamole

guacamole

noun

Guacamole

Guacamole with tortilla chips

  • pureed or mashed avocado seasoned with condiments
  • a Mexican food made of mashed avocado usually mixed with chopped tomatoes and onion

Guacamole

lien

lien

noun

a legal claim that someone or something has on the property of another person until a debt has been paid back

The bank had a lien on our house.

Lien

The owner of the property, who grants the lien, is referred to as the lienee and the person who has the benefit of the lien is referred to as the lienor or lien holder.

deductible

deductible

noun

an amount of money that you have to pay for something (such as having your car fixed after an accident) before an insurance company pays for the remainder of the cost

I have an insurance policy with a $1,000 deductible.

Deductible

warranty

warranty

noun

a one-year warranty for the refrigerator

Warranty

New car factory warranties commonly range from one year to five years and in some cases extend even 10 years, with typically a mileage limit as well. Car warranties can be extended by the manufacturer or other companies with a renewal fee.

Used car warranties are usually 3 months and 3,000 miles

trade-off

trade-off

noun

  • a balancing of factors all of which are not attainable at the same time
  • a situation in which you must choose between or balance two things that are opposite or cannot be had at the same time

Trade-off

spine

spine

noun

Numbering order of the vertebrae of the human spinal column

The vertebral column, also known as the backbone or spine, is part of the axial skeleton.

Vertebral column

ulna

ulna

noun

An example of a human ulna, shown in red

Ulna

blob

blob

noun

  • a small drop or lump of something viscid or thick

flicked a blob of jelly on the toast and began to spread it around

calcium

calcium

noun

Her doctor said she should eat more foods that are high in calcium, such as milk and cheese.

Calcium

casual

casual

adjective

a casual meeting

casual clothing

causal

causal

adjective

There is a causal link between poverty and crime.

spam

spam

noun

  • e-mail that is not wanted
  • e-mail that is sent to large numbers of people and that consists mostly of advertising

Email spam

Email spam, also referred to as junk email or simply spam, is unsolicited messages sent in bulk by email (spamming).

pantry

pantry

noun

A contemporary kitchen pantry

homemade jams and pickles are stored in a separate pantry off the kitchen

Pantry

A pantry is a room where beverages, food, and sometimes dishes, household cleaning chemicals, linens, or provisions are stored.

prism

prism

noun

Uniform triangular prism

A rectangular prism
Rectangular cuboid

Prism

defect

defect

noun

This small defect greatly reduces the diamond’s value.

tote

tote

noun

A tote bag

Tote bag

mandarin

mandarin

noun

  • the official language of China
  • the group of closely related Chinese dialects that are spoken in about four fifths of the country and have a standard variety centering about Beijing

Mandarin Chinese

Mandarin orange

Mandarin orange

refuge

refuge

noun

a wildlife refuge

treat

treat

noun

  • the act of providing another with free food, drink, or entertainment

Two children trick-or-treating on Halloween in Arkansas, United States

Trick-or-treating is a customary celebration for children on Halloween. Children go in costume from house to house, asking for treats such as candy or sometimes money, with the question, “Trick or treat?” The word “trick” implies a “threat” to perform mischief on the homeowners or their property if no treat is given.

Trick-or-treating

trick or treat

trick or treat

noun

  • a Halloween practice in which children wearing costumes go from door to door in a neighborhood saying “trick or treat” when a door is opened to ask for treats with the implied threat of playing tricks on those who refuse

We got all dressed up for trick or treat.

‘Trick or Treat’: A History