1. Think and summarize 💡

1.1 What exactly do you learn when learning a new framework? 🤔

No matter what the technology stack, new frameworks are constantly emerging, so so many frameworks, what do we need to learn?

Many people learn a new framework by first learning how to use it and then not using it.

In terms of importance, I think the framework learning should focus on learning design ideas, understanding the advantages and disadvantages of the framework and the best applicable scenarios, followed by learning the use of the framework.

Finally, once you understand how the framework works and how it works, you should also think about whether you can build on it and whether it will bring short-term, or even long-term, benefits to the project you are developing.

1.2 How to maximize growth from business requirements? 🤔

Remember that requirements are not the goal, the goal is to grow through requirements

  1. Through demand precipitation methodology;
  2. Improve problem solving ability through requirements;
  3. Improve code capabilities through requirements;
  4. Innovation through demand;
  5. Validate ideas with requirements.

Finally, use the way of article ✍🏻 to write down your thinking and summary, and broaden your influence.

2. This week we learned 👨🏻💻

2.1 shrinkWrap property in Flutter

There is a shrinkWrap property in ListView and some other list class components. What is the function of this property?

Normally, ListViews (GridView, PageView, CustomScrollView) fill as much space as possible with the parent component, whereas shrinkWrap: true fills itself.

With shrinkWrap: False:

With shrinkWrap: True:

2.2 Failed to run the flutter packages pub run build_runner build command

Alert me when executing flutter packages pub run build_runner build command: file conflict.

The reason is that when you run the command to generate a new class, if the class already exists, the existing class will not be updated. Therefore, you need to delete the existing class and run the following command to generate it:

flutter packages pub run build_runner build --delete-conflicting-outputs
Copy the code

There is a better way to use watch instead of build:

flutter packages pub run build_runner watch
Copy the code

It runs a persistent build server to monitor changes to the file system and automatically perform rebuild tasks when needed.

3. Reading to improve 📚

A book I’ve been reading recently: The Way to Become a Programmer

3.1 Is there a best solution?

The answer in the book is:

There is no single best solution, whether it be tools, languages, or operating systems; Only in certain circumstances can there be a more appropriate system.

So, this requires programmers not to be tied to any particular technology, but to have a broad enough background and experience base to choose the right solution for a given situation.

Your background comes from an understanding of the fundamentals of computer science, while your experience comes from a wide range of practical projects.

Combining theory with practice makes you strong.

This is the pragmatic programmer.

3.2 Entropy of software

Entropy is a physics term that defines the total amount of “disorder” in a system. The laws of thermodynamics dictate that entropy in the universe tends to be maximized.

In software development, we can think of entropy as technical debt. In other words, if we are not careful in our daily development, the technical debt will accumulate.

What causes technical debt?

It can be explained by the broken window theory 🪟 :

In the center of the city, some buildings are clean and beautiful, while others are dilapidated. Why is that? Some researchers in the field of crime and urban decay have discovered an interesting trigger that can very quickly turn a perfectly clean, livable building into a dilapidated waste.

A broken window.

If a broken window is left unrepaired for a while, the residents of the building will instill a sense of abandonment.

Then other Windows began to break, residents began to litter, graffiti began to appear on walls, and the building began to suffer severe structural damage. In what seemed like a short period of time, the building was damaged enough to discourage the owners from trying to repair it, and the feeling of abandonment eventually became a reality.

Therefore, in the development process, in order to avoid the technical debt caused by the broken window theory, we need to do:

  • Deal with bad design, bad decisions, bad code, and fix it as soon as you find one

  • Don’t cause collateral damage just because something is critical. One broken window is too many

If you’re on a healthy team and the code on your project is so perfect — clearly written, well designed, simple and elegant — you tend to be extra careful not to mess it up.

So, be sure to tell yourself, “Don’t break the window.”

4. Gossip 🔈

The first thing programmers need to do to stay healthy: protect their cervical vertebrae

This is not the first time I’ve heard people around me tell me I have cervical spine problems, mostly caused by sitting at my desk writing code.

It is recommended that you buy a lift table and alternate between standing and sitting positions to relieve the pressure on your cervical spine.

In addition, THERE is a neck relaxation course on KEEP, which I often practice with good results:

5. Postscript 🔚

I heard that good-looking people like to give me a thumbs-up 👍!

See you next week.