Severity: Warning
Message: unlink(/home/anhtest2/public_html/application/cache/Config_model_SelectByKeyhotline.cache): No such file or directory
Filename: drivers/Cache_file.php
Line Number: 279
Backtrace:
File: /home/anhtest2/public_html/application/core/MY_Model.php
Line: 25
Function: get
File: /home/anhtest2/public_html/application/models/Config_model.php
Line: 42
Function: query_cache
File: /home/anhtest2/public_html/application/core/MY_Controller.php
Line: 120
Function: SelectByKey
File: /home/anhtest2/public_html/application/controllers/frontend/Post.php
Line: 9
Function: __construct
File: /home/anhtest2/public_html/index.php
Line: 315
Function: require_once
Severity: Warning
Message: file_get_contents(/home/anhtest2/public_html/application/cache/Config_model_SelectByKeyaddress.cache): failed to open stream: No such file or directory
Filename: drivers/Cache_file.php
Line Number: 275
Backtrace:
File: /home/anhtest2/public_html/application/core/MY_Model.php
Line: 25
Function: get
File: /home/anhtest2/public_html/application/models/Config_model.php
Line: 42
Function: query_cache
File: /home/anhtest2/public_html/application/core/MY_Controller.php
Line: 122
Function: SelectByKey
File: /home/anhtest2/public_html/application/controllers/frontend/Post.php
Line: 9
Function: __construct
File: /home/anhtest2/public_html/index.php
Line: 315
Function: require_once
Severity: Notice
Message: Trying to access array offset on value of type bool
Filename: drivers/Cache_file.php
Line Number: 277
Backtrace:
File: /home/anhtest2/public_html/application/core/MY_Model.php
Line: 25
Function: get
File: /home/anhtest2/public_html/application/models/Config_model.php
Line: 42
Function: query_cache
File: /home/anhtest2/public_html/application/core/MY_Controller.php
Line: 122
Function: SelectByKey
File: /home/anhtest2/public_html/application/controllers/frontend/Post.php
Line: 9
Function: __construct
File: /home/anhtest2/public_html/index.php
Line: 315
Function: require_once
Severity: Warning
Message: unlink(/home/anhtest2/public_html/application/cache/Config_model_SelectByKeyfacebook.cache): No such file or directory
Filename: drivers/Cache_file.php
Line Number: 279
Backtrace:
File: /home/anhtest2/public_html/application/core/MY_Model.php
Line: 25
Function: get
File: /home/anhtest2/public_html/application/models/Config_model.php
Line: 42
Function: query_cache
File: /home/anhtest2/public_html/application/core/MY_Controller.php
Line: 126
Function: SelectByKey
File: /home/anhtest2/public_html/application/controllers/frontend/Post.php
Line: 9
Function: __construct
File: /home/anhtest2/public_html/index.php
Line: 315
Function: require_once
Severity: Warning
Message: unlink(/home/anhtest2/public_html/application/cache/Config_model_SelectByKeyzalo.cache): No such file or directory
Filename: drivers/Cache_file.php
Line Number: 279
Backtrace:
File: /home/anhtest2/public_html/application/core/MY_Model.php
Line: 25
Function: get
File: /home/anhtest2/public_html/application/models/Config_model.php
Line: 42
Function: query_cache
File: /home/anhtest2/public_html/application/core/MY_Controller.php
Line: 128
Function: SelectByKey
File: /home/anhtest2/public_html/application/controllers/frontend/Post.php
Line: 9
Function: __construct
File: /home/anhtest2/public_html/index.php
Line: 315
Function: require_once
Severity: Warning
Message: file_get_contents(/home/anhtest2/public_html/application/cache/Config_model_SelectByKeyqr_facebook_group.cache): failed to open stream: No such file or directory
Filename: drivers/Cache_file.php
Line Number: 275
Backtrace:
File: /home/anhtest2/public_html/application/core/MY_Model.php
Line: 25
Function: get
File: /home/anhtest2/public_html/application/models/Config_model.php
Line: 42
Function: query_cache
File: /home/anhtest2/public_html/application/core/MY_Controller.php
Line: 130
Function: SelectByKey
File: /home/anhtest2/public_html/application/controllers/frontend/Post.php
Line: 9
Function: __construct
File: /home/anhtest2/public_html/index.php
Line: 315
Function: require_once
Severity: Notice
Message: Trying to access array offset on value of type bool
Filename: drivers/Cache_file.php
Line Number: 277
Backtrace:
File: /home/anhtest2/public_html/application/core/MY_Model.php
Line: 25
Function: get
File: /home/anhtest2/public_html/application/models/Config_model.php
Line: 42
Function: query_cache
File: /home/anhtest2/public_html/application/core/MY_Controller.php
Line: 130
Function: SelectByKey
File: /home/anhtest2/public_html/application/controllers/frontend/Post.php
Line: 9
Function: __construct
File: /home/anhtest2/public_html/index.php
Line: 315
Function: require_once
Severity: Warning
Message: unlink(/home/anhtest2/public_html/application/cache/Config_model_SelectByKeymeta_keywords.cache): No such file or directory
Filename: drivers/Cache_file.php
Line Number: 279
Backtrace:
File: /home/anhtest2/public_html/application/core/MY_Model.php
Line: 25
Function: get
File: /home/anhtest2/public_html/application/models/Config_model.php
Line: 42
Function: query_cache
File: /home/anhtest2/public_html/application/core/MY_Controller.php
Line: 143
Function: SelectByKey
File: /home/anhtest2/public_html/application/controllers/frontend/Post.php
Line: 9
Function: __construct
File: /home/anhtest2/public_html/index.php
Line: 315
Function: require_once
Sử dụng “code sạch” trong lập trình thực tế mang tới nhiều giá trị, có nhiều lợi ích thiết thực. Việc xác định cụ thể và chuẩn xác được giúp chúng ta phần nào hiểu được lý do cần áp dụng clean code trong lập trình. Và đặc biệt đối với anh em Tester mình thì việc viết code Automation Test cũng cần clean code để đội nhóm hiểu rõ ràng hơn hiệu quả hơn đối với team QA.
“Clean code” mang lại rất nhiều lợi ích. Chẳng hạn như “clean code” giúp người khác khi đọc code dễ hiểu hơn. Khi phát triển một chương trình nào đó thì hầu như không phải là do cá nhân làm mà sẽ làm việc teamwork với nhau, vậy nên nếu mỗi người viết code một kiểu thì sẽ gây khó hiểu cho các thành viên khác. Điều này ảnh hưởng rất nhiều tới chất lượng của dự án và gây khó chịu cho người đọc.
Sự thể hiện đầu tiên về “clean code” có thể nói tới việc đặt tên biến. Vốn dĩ về tên biến các bạn có thể đặt thành bất cứ biến gì các bạn muốn. Chẳng hạn bạn có thể đặt là int a,b,c…. Điều này không hề ảnh hưởng tới chương trình của các bạn có chạy được hay không. Tuy nhiên nhìn cái tên biến như vậy sau một thời gian có thể chính mình còn quên biến đó lưu thứ gì trong đó chứ đừng nói đến đồng đội 😆 Cái đó là chưa nói tới sự chuyên nghiệp nữa đó nhe @@
Yeah Anh Tester giới thiệu đến bạn chuỗi nội dung nói về Clean Code và những lưu ý trong cuốn Clean Code của tác giả Juan Carlos Ruiz và các nội dung notes liên quan để code của bạn trở nên clean hơn. Tại đây nội dung có đề cập cụ thể đến ngôn ngữ lập trình Java nhé.
eBook Clean Code: https://drive.google.com/file/d/1yBZhYVBWywmrc8FOegnaZtPtz0HbuSY7/view?usp=sharing
Clean Code Notes: https://github.com/JuanCrg90/Clean-Code-Notes
Leetcode Solutions (Java): https://drive.google.com/file/d/111K2Q7148PgQOVESea4l_EjBYfTdvVZv/view?usp=sharing
Java Complete Notes (Java): https://drive.google.com/file/d/1jAkiO4GFA5fKVbTOU0XG02N97xc5QOrD/view?usp=sharing
Anh Tester
Đường dẫu khó chân vẫn cần bước đi
Đời dẫu khổ tâm vẫn cần nghĩ thấu