Friday. Time – 12:53 AM (in China).
Yes, in practice I didn’t manage to complete my plan within the week, but I had a lot of business stuff going on — one night I didn’t even sleep at all, nearly 24 hours straight. And on the other days I slept 5, 6, 7, or at least once even 8 hours. In reality though, I still have tonight — and no one canceled that. Time is a myth, just like thoughts, the future, the past, or even the present. If you look deeper into time, you’ll realize we don’t have it — and at the same time, we do. I believe there’s no point wasting something we kind of don’t even have, on things that are completely meaningless. Although, everyone does as they please, but I’ve chosen my own path. Below is the text I wrote, I think, on Thursday.
This is how I learn Chinese. (The mnemonic method is weird, but it’s from the book Unlimited Memory. I’ve already memorized over 400 words in 3 months and one week. I also write down abbreviations for these words with later pronunciation of them, in addition to the more obvious reasons to remember these words for real-life situations → a method I got from YouTube. For once that platform was actually useful, and not just triggering FOMO.) I’ve been living in China for 3 months now, so I occasionally have conversations with native speakers, plus minimal practice with them. 400 words is very little… even a child knows way more. 1,000 words is the first minimum to understand most basic topics, and I still have a lot to learn. Also, sentence construction is often not obvious, which means I’ll need to memorize lots of phrases, particles, forms, structures, etc. Oh, almost forgot. I’m from Russia, so it’s much easier for me to come up with homonyms and associations in Russian… I’m baring my soul with this post, because many of the things below came to me by chance and initially in the form of a weird “mini-story.” I should also mention that even tones are included in my mnemonics, because if you pronounce even a single vowel at the wrong pitch, you probably won’t be understood…
The words themselves (absurd, but it works):
- bǎi - hundred, numerous (Можно сказать бай огромному количеству знакомых, наверное сотне) *Например, это стоило 100 юаней
- bào zhǐ (бАо джи) - newspaper, newsprint (Да он избалованный джином словно, вот так пишет эти газеты)
- guò - to pass (time), to celebrate (Гула то сколько было, но время прошло, вы же отмечали?)
Next, I have 2 tests awaiting me from both sides (Chinese – English), which I might pass immediately, but usually I need to revise certain unlearned words first and only then pass everything. That’s how I test myself.
And I still have 3 projects, and possibly tennis coaching (the last one is not certain yet). One of them is a joint project, the other 2 are my personal ones. I don’t know how I manage everything, but I’m extremely motivated, because nothing else in this life or the entire world interests me.
And here are my 5 behind-the-scenes topics on computer theory (all links are in Russian, for an obvious reason… Previously, I tried learning completely new topics without knowing the basics and in a foreign language, especially English — it was pointless and difficult):
Basics of Electronics
http://beam-robot.ru/electronics_for_beginners/electronics_base.php
Capacitor (this is the term I wanted to understand better)
Boolean Algebra (Logic Algebra)
http://beam-robot.ru/electronics_for_beginners/logical_algebra.php
Logical Addition (Disjunction)
http://beam-robot.ru/electronics_for_beginners/disjunction.php
Logical Multiplication (Conjunction)
http://beam-robot.ru/electronics_for_beginners/conjunction.php
Logical Negation (Inversion)
http://beam-robot.ru/electronics_for_beginners/inversion.php
1. Basics of Electronics
Questions:
- What is electric current?
- What’s the difference between alternating current (AC) and direct current (DC)?
- What are a resistor, capacitor, and inductor?
- How do a diode and a transistor work?
- What is Ohm’s law? Write down the formula.
- What are logic levels in digital electronics (0 and 1)?
Answers:
- Electric current is the directional flow of charged particles (electrons or ions).
- AC changes direction (e.g., in a wall outlet), DC flows in one direction (e.g., a battery).
- * Resistor – resistance, limits current.
- Capacitor – stores charge.
- Inductor – creates a magnetic field when current flows through it.
- * Diode – allows current to pass in only one direction.
- Transistor – amplifies or switches current (e.g., NPN/PNP types).
- Ohm’s Law: $V = I \times R$ (Voltage = Current × Resistance).
- Logic 0 – low voltage (~0V), logic 1 – high voltage (~3.3V or 5V).
2. Boolean Algebra (Logic Algebra)
Questions:
- What is Boolean algebra and where is it used?
- What are the basic logical operations?
- What is a truth table?
- How are logical expressions written?
Answers:
- Boolean algebra is a branch of mathematics that studies logical operations on statements (true/false). It is used in digital electronics, programming.
- Basic operations: AND, OR, NOT, XOR (exclusive OR).
- Truth table – a table showing the result of an operation for all possible input combinations.
- Logical expressions are written using variables (A, B) and operators (∧, ∨, ¬).
3. Logical Addition (OR)
Questions:
- How does the OR operation work?
- What is the truth table for OR?
- What does the logical expression for OR look like?
- How is OR implemented using transistors or relays?
Answers:
OR outputs
1
if at least one input is1
.OR truth table:
| A | B | A∨B |
| - | - | --- |
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
Expression: $A + B$ or $A \lor B$.
In electronics, OR can be implemented with diodes or transistors (parallel connection).
4. Logical Multiplication (AND)
Questions:
- How does the AND operation work?
- What is the truth table for AND?
- What does the logical expression for AND look like?
- How is AND implemented with transistors?
Answers:
AND outputs
1
only if both inputs are1
.AND truth table:
| A | B | A∧B |
| - | - | --- |
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Expression: $A \cdot B$ or $A \land B$.
In electronics, AND is implemented using transistors connected in series.
5. Logical Negation (NOT)
Questions:
- How does the NOT operation work?
- What is the truth table for NOT?
- What does the logical expression for NOT look like?
- How is NOT implemented with transistors?
Answers:
NOT inverts the signal (
0
→1
,1
→0
).NOT truth table:
| A | ¬A |
| - | -- |
| 0 | 1 |
| 1 | 0 |
Expression: $\overline{A}$ or $\neg A$.
In electronics, NOT is implemented with a transistor (inverter).
And 1 C++ topic.
📘 Original tutorial source (in Russian)
1. Basics of Loops in C++
Questions:
- What is a loop in programming?
- What types of loops exist in C++?
- What’s the difference between
while
,do-while
, andfor
? - How do you avoid an infinite loop?
Answers:
- A loop is a construct that repeats a block of code as long as a condition is true.
- C++ offers:
-
while
– loop with a pre-condition -
do-while
– loop with a post-condition -
for
– counter-controlled loop- Differences:
while
checks the condition before executiondo-while
executes the body at least once, then checks the condition-
for
is a compact loop with init, condition, and update- To avoid infinite loops:
Ensure the exit condition is reachable
In
for
, verify the counter is changing correctlyIn
while
/do-while
, avoid conditions that are alwaystrue
2. The while
Loop
Questions:
- How does
while
work? - What is the syntax of
while
? - When is
while
better thanfor
? - Can
while
run zero times?
Answers:
-
while
executes code as long as the condition istrue
- Syntax:
while (condition) {
// loop body
}
- Use
while
when the number of iterations is unknown (e.g., reading a file) -
Yes — if the condition is initially
false
, it won’t run at all
3. The do-while
Loop
Questions:
- How does
do-while
work? - How is it different from
while
? - When should you use
do-while
? - Is
;
required afterwhile()
?
Answers:
-
do-while
executes the body first, then checks the condition - Difference:
-
do-while
guarantees at least one execution- Use it when you need one execution minimum (e.g., menu input)
-
Yes, semicolon is required after
while()
:
do {
// body
} while (condition); // ← don't forget ;
4. The for
Loop
Questions:
- How does
for
work? - What are the parts of a
for
loop declaration? - Can parts of
for
be skipped? (e.g., initialization) - How do you count backward (10 to 1)?
Answers:
-
for
executes code while the condition istrue
, updating a counter - Structure:
for (init; condition; update) {
// body
}
- Yes, parts can be skipped, but semicolons are required:
int i = 0;
for (; i < 5; i++) {
...
}
- Reverse countdown:
for (int i = 10; i >= 1; i--) {
cout << i << " ";
}
5. Loop Control (break
, continue
)
Questions:
- What does
break
do? - What does
continue
do? - Can
break
andcontinue
be used in all loops? - How do you exit a nested loop?
Answers:
-
break
immediately exits the loop -
continue
skips the current iteration, moving to the next -
Yes, both work in
while
,do-while
, andfor
- To exit nested loops:
- Use
break
in the inner loop - Or use
goto
(not recommended) or flags:
bool exitFlag = false;
for (int i = 0; i < 10 && !exitFlag; i++) {
for (int j = 0; j < 10; j++) {
if (condition) {
exitFlag = true;
break;
}
}
}
6. Practical Tasks (To check your understanding)
1. for
loop: Print even numbers from 2 to 20
for (int i = 2; i <= 20; i += 2) {
cout << i << " ";
}
2. while
loop: Sum numbers until user enters 0
int num, sum = 0;
while (true) {
cin >> num;
if (num == 0) break;
sum += num;
}
3. do-while
: Ask for password until "12345" is entered
string password;
do {
cout << "Enter password: ";
cin >> password;
} while (password != "12345");
🔍 Optional Topics to Explore Further
- Nested loops
- Loop optimization (
++i
vsi++
) - Range-based
for
loop (C++11 and newer)
🌙 Now, Back to Monday Night...
I still have 4 algorithms left to write and need to pass a test on Chinese vocabulary.
Also, I’ll review all CS and C++ topics one more time.
Top comments (0)