Issue: 15.1 (January/February 2017)
Author: Scott Boss
Author Bio: Scott Boss is the founder of Nocturnal Coding Monkeys, Llc, who specialize in writing custom software. Scott has been a developer, system administrator, storage engineer, consultant, and architect to businesses from startup to global 100.
Article Description: No description available.
Article Length (in bytes): 5,949
Starting Page Number: 77
Article Number: 15110
Related Link(s): None
Excerpt of article text...
Actually we are going to talk about two different open source items this month. First we are going to talk about an application written by Kem Tekinay that is open source and is designed to help us write better Xojo code. We are looking at Profile Reader (https://github.com/ktekinay/Profile-Reader).
Now you are going to ask me how a profile reader is going to help you write better code. When you turn on code profiling (
Project -> Profile Code) and you execute the application, it puts a text file (
Profile.txt) next to the executable. This file is created once the application closes down. The file contains all profiling information in it. The problem is the file is not really human readable (see Figure 1).
The Xojo IDE has a view into code profiles that you generate when running code. But it doesn't work with compiled applications. So Profile Reader can read those code profile text files. Both the internal Code Profile and the Profile Reader show the method name, number of times it is called, total milliseconds, and average milliseconds. The bonus information in the Profile Reader is, it also displays the percentage of the applications time spent in each method. Now why do you care? Looking at the information you can see where you application is spending most of its time and see if there are ways to refactor or speed up the code.
The application is a great tool to add to your tool chest. It is my recommendation that you try Profile Reader application.
Next we are going to look at a Xojo module for determining Readability Scores and Indexes. Readability (https://bitbucket.org/nocturnalcodingmonkeys/readability) was written by myself to determine the readability of some documentation I was writing. I had to write a lot of documentation targeting a non-technical group of people and had to make sure the diction and prose was at the right level.
There are several Scores or Indexes you can use, and I have found none of them are optimized for technical writing. Therefore I look at all the various indicators and average out their results. The four scores that I have included with the module as of this writing was the Flesh Kincaid, the Gunning Fog, the Coleman Liau Index, and the U.S. Army FORECAST. The U.S. Army designed the FORECAST score to determine how easily their training manuals were for their soldiers.
...End of Excerpt. Please purchase the magazine to read the full article.