The weather was warm, but in the evening everything froze

During the day, the weather was warm, around +1 degree. Outside, everything started to melt, and small puddles appeared. Because of that, I decided to go outside and clean my car, as it was covered with wet snow. I didn’t want all that snow to freeze on it later. If it froze, it would cause more inconvenience, and I would have to spend extra time removing it. So I decided to be on the safe side and cleaned the car. And I was right — in the evening, everything started to freeze.

Now it is −7 degrees outside, and at night the forecast predicts up to −10 degrees. As a result, all the roads and pedestrian areas look like mirrors because everything is frozen. I felt it myself when I went for a walk after 10 PM. Still, it wasn’t too bad for me. I could walk along the embankment without serious problems and just had to be careful. I didn’t want to slip, hurt myself, or end up lying there.

0
0
0
0
0
0
0
0
0
0
0
0
0
This photo is from my walk, and it shows my city’s embankment covered with snow. The city has also started to get decorated for the New Year. New decorations are appearing everywhere, and they have already begun setting up the New Year tree in the central square

This workday started with reviewing my mistakes in work tasks, which I mentioned in my previous post. I decided to figure everything out and dive deeper. The first task, where I passed the wrong parameter type, was clear and understandable. However, the second task had a controversial moment and didn’t give me any peace. When I started debugging the code, I couldn’t find the mistake that my team lead had pointed out. He said that

$arResult["USER_PHONES"]

would always be true. However, during debugging, I never saw it as true. Then I wrote a short report about my debugging process and attached it to my merge request. After that, he replied: “Oh, faq, I don’t know why I thought that, but the code is correct.” After that, he simply pushed the code to the production server. Still, in that place I could use

!empty($arResult["USER_PHONES"])

because it is more readable and works for all cases. But even without it, the code will work correctly, so I think using empty() there is a bit unreasonable. However, I decided to follow my team lead’s advice and use empty() to check that array.

0
0
1
0
0
0
1
0
2
2
0
0
6
101
The journey doesn't end here. This post can also be discussed on my Telegram channel, where readers gather to exchange ideas, share opinions, and celebrate interesting content together. You're warmly welcome to join the conversation!
Comments list (0)
No one has left a comment yet. Be the first, and feel free to help me!
To use your real name, please create an account. Otherwise, your messages will be posted anonymously. Registered users can also edit, delete, and manage their comments