9 truths only programmers know
Generally speaking, programmers know much more about related computer and code knowledge than the average person. Below I will reveal some truths that people in the industry will not tell you.
Truth #1
“What you don’t know is that many of the critical software we use every day (like Mac OS Disadvantages and shortcomings. It’s like taking apart a brand new 747 aircraft but discovering that the fuel lines are held in place by hangers and the landing gear is taped together.” - Ben Cherry
This. In fact, it is a very interesting thing: web pages and programs may look beautiful and run smoothly, but they may only be perfect on the front end (the part that users can see). They are riddled with holes and errors, but for some magical reason they work.
Truth #2
“When writing an application, about 25% of the time is spent thinking about what stupid things the end user will do.” -Brian Humes
However, the 25% number will vary depending on the developer and It fluctuates depending on what the programmer does. Every time we build a product, we need to sit down and think about how end users are going to mess up the program. What they click on, what they write, the wording of the question, the language used, and the way we write make a difference in understanding. If we don't pay attention to this, many problems will occur. This is because although we know how the program works, the end users do not.
Truth #3
"Programmers don't fix computers." - Ritesh Kumar Gupta
Programmers work on algorithms and design principles, not computer fixers. We know the inner workings of a computer, how code works together, but we don't know how to fix the hardware, why our browser crashes every time we open it, or why our computer overheats. Please don’t look at us in a way that “this kind of thing is a piece of cake for you”.
Truth #4
“Programming is thinking, not typing code.” ——Casey Patton
Programming does not mean that as long as you sit down quietly, write thousands of lines of code, publish a program or The meaning of application program is actually a kind of thought and a method of solving problems. And relaxation is the key to figuring out the method.
Truth #5
Start calculations from zero, not from one.
We start counting from 0, so your “1” is my “0” and your “10” is my “9”. This is done because it improves efficiency at scale.
Truth #6
“Once you get into the zone, programming is like a miracle—this state of concentration makes any problem a piece of cake.” - Morgan Johansson
Do you know why programmers are called night owls? ? Do you know why we often stay up late? Because it allows us to enter a state of concentration without having to worry about being interrupted by other people - because they are all asleep, these annoying guys finally shut up their chirping mouths. What a great time coding!
Truth #7
Let me tell you a secret, sleeping with a problem can actually solve it.
Many times when I encounter a problem that I can’t solve after spending hours, I just go to sleep. After sleeping for 20 minutes, one hour, six hours, or twelve hours, the answer to the question will come naturally after waking up.
Truth #8
Assigned tasks that are no longer needed are like parents killing their children.
The programs we write are actually similar to this hierarchical structure. Parent manages the Child below it.
In reality, if parents don’t want a child, they will have an abortion. In the program, if certain tasks are no longer needed, its connection with the server will be cut off and the child will be killed.
Finally, Truth #9
You usually ignore us when we brag about how much we know about computers, and similarly, your bragging annoys us.
Honestly, this is really annoying, we really don’t care at all about your computer knowledge. It's understandable if you say "I don't know much about computers" or "I'm not very interested in computer programming", but bragging and having a big ax in front of Luban's door will bore us. Please avoid this behavior.
Receive LAMP Brothers Original PHP Tutorial CD/"Essential PHP in Detail" for free. For details, please contact the official website customer service:
http://www.lampbrother.net
PHPCMSSecondary development http://yun.itxdl.cn/online/phpcms/index.php?u=5
WeChat development .cn/online/server/index.php?u=5
JavascriptCourse http://yun.itxdl.cn/online/js/index.php?u=5
CTOTraining Camp
|

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

The enumeration function in PHP8.1 enhances the clarity and type safety of the code by defining named constants. 1) Enumerations can be integers, strings or objects, improving code readability and type safety. 2) Enumeration is based on class and supports object-oriented features such as traversal and reflection. 3) Enumeration can be used for comparison and assignment to ensure type safety. 4) Enumeration supports adding methods to implement complex logic. 5) Strict type checking and error handling can avoid common errors. 6) Enumeration reduces magic value and improves maintainability, but pay attention to performance optimization.

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

RESTAPI design principles include resource definition, URI design, HTTP method usage, status code usage, version control, and HATEOAS. 1. Resources should be represented by nouns and maintained at a hierarchy. 2. HTTP methods should conform to their semantics, such as GET is used to obtain resources. 3. The status code should be used correctly, such as 404 means that the resource does not exist. 4. Version control can be implemented through URI or header. 5. HATEOAS boots client operations through links in response.

In PHP, exception handling is achieved through the try, catch, finally, and throw keywords. 1) The try block surrounds the code that may throw exceptions; 2) The catch block handles exceptions; 3) Finally block ensures that the code is always executed; 4) throw is used to manually throw exceptions. These mechanisms help improve the robustness and maintainability of your code.

The main function of anonymous classes in PHP is to create one-time objects. 1. Anonymous classes allow classes without names to be directly defined in the code, which is suitable for temporary requirements. 2. They can inherit classes or implement interfaces to increase flexibility. 3. Pay attention to performance and code readability when using it, and avoid repeatedly defining the same anonymous classes.
