December 28, 2009
Ruby, Emacs & Flog MetricsBy Geoffrey Grosenbach
One hour screencast.
- Flog metrics are often difficult to understand. The numbers can’t be compared between projects or even classes. This editor enhancement helps by showing the flog score in the left column as you code.
- Flog Score in the Column
- This method has a flog score of 22 which can be seen in the column. It’s more meaningful if compared to the scores of other methods in the same class. Larger numbers indicate greater complexity. If one method has a score that is significantly larger than others, it should probably be broken apart into several methods.
- Repeated OR
- The method repeats a conditional inline many times in the options. Refactoring the optional default value into the metadata method simplifies it and reduces the flog score in real time. (See the screencast linked above.)
- You’ll need
(sudo gem install flog). The
to flog is also available in several SCMs.
About the Author
- The sound of no command
- 3 Entry Level Certifications to Help You Launch Your IT Career
- Take Command of Server 2008 with Windows PowerShell – Part 3
- How to Install WordPress on Server 2008 the Easy Way
- 2 Most Common Mistakes People Make on IT Exams
- How to Install VMware ESX Server
- 5 Things You Need to Know How To Do in Excel 2007
- Vista 70-622 MCTS Exam Prep: Installations and Updates
- 10 Steps to Installing the Web Server Role in Windows Server 2008