Stop doing math in your config files
カートのアイテムが多すぎます
ご購入は五十タイトルがカートに入っている場合のみです。
カートに追加できませんでした。
しばらく経ってから再度お試しください。
ウィッシュリストに追加できませんでした。
しばらく経ってから再度お試しください。
ほしい物リストの削除に失敗しました。
しばらく経ってから再度お試しください。
ポッドキャストのフォローに失敗しました
ポッドキャストのフォロー解除に失敗しました
-
ナレーター:
-
著者:
概要
Ever feel the urge to write out calculations in your code to make them "self-documenting"?
In the latest episode of the No Compromises podcast, we discuss why inline math in configuration values is a habit worth breaking.
Aaron argues that if a value never changes, there's no reason to calculate it every time. A well-placed comment can explain how you got the number without the unnecessary overhead.
We also cover how comments can clarify units like seconds versus milliseconds, why this thinking applies beyond config files, and how questioning small habits can improve your code overall.
- (00:00) - How many seconds is five minutes?
- (01:45) - The problem with inline config math
- (03:45) - Using comments instead of runtime calculations
- (05:30) - Why questioning habits improves code
- (07:00) - Silly bit
Want a second set of eyes on your Laravel project?
まだレビューはありません