timeless

kloc and other foolish metrics

2003-10-01 09:12 UTC  by  timeless
0
0
Click to read 1249 words
timeless

Statements

2003-10-01 09:22 UTC  by  timeless
0
0
Statements Statements

Oddly enough just about every language you can imagine has some measure of a statement. Even English. Some statements may be simpler than others, but the number of statements is still a better estimate of complexity than the number of lines or bytes.

So how would one count statements?

For XML, I would count each (nonwhitespace) node that would be generated in a dom.

This means that <foo></foo> and <foo/> would both have value "1", and <foo>bar</foo> and <foo/><py q="q" r="r" s="s" t="t"/> would both have value "2".

For JavaScript and Perl a statement is generally delimited by a newline or a semicolon.

For C/C++, statements are generally delimited by semicolons or parentheses.

x=x+1;++y;r*=5+3/p; /*3 statements*/
for (a=0;b<4;c++) b+=c; /*5 statements*/
while
(
0
)
{
}
/*1 statement */

An icon containing 4 images would be assigned a value "4". And an xbm containing 1 images would be assigned a value "1". This means your average xbm loses value (sorry).

timeless
What can be done to make profile data use safer and friendlier? What can be done to make profile data use safer and friendlier?
  • Support Read Only access to profile data
  • Allow merging/reconciling of profile data (Bookmarks, History, Cookies)
  • Inactive profile users should flush their changes and relinquish their lock(s)
  • There should be a single universally recognizable lockfile
  • Instead of tossing up a dialog and refusing to allow the user to use the profile data, we should let the user use the profile and start a thread to watch the profile lock/data. If the lock disappears we should acquire it and offer to reconcile the profile data
  • Consider splitting the locks

What can be done to catch stale locks?

  • We can ping the computer to see if it's alive
  • For local processes, we can check to see if the process actually has the lock file open

What can not be done to the profile lock?

  • The global lock can't be deleted. Deleting it would result in a big backwards compatibility problem: an old browser (like Netscape 6) would think that the profile is unlocked and ignore the new split locks.
timeless

Building a better Manager

2003-10-28 10:49 UTC  by  timeless
0
0
Click to read 1883 words

Back