"Frank's skill in asking the right questions is un-mistakable, and is at the core of his leadership philosophy.

The power of these questions cannot be underestimated, especially if you want to lead and not manage."
—John Cave
Westhaven Worldwide Logistics

If not otherwise stated—all postings © Frank D. Kanu. All rights reserved.

Posts

Archive for the 'Code review' Category

Bad? - Answer

The query was only getting bad because WHOEVER was messing with it didn’t READ ANY of the code around. That PLUS raping the original design to squeeze out something it was never intended to do instead of rethinking and designing something the “programmer” could be proud of…
Comment of the lead programmer

Does that need any further comment?




Tags:
 

This blog-entry is protected by a digital fingerprint:785273ed81985582c8a1be62f78c9459

Bad?

How is this for a check-in reason:
“Mining always resets the query now. The query setup was getting bad and the core didn’t work with it.”


Tags:
 

This blog-entry is protected by a digital fingerprint:785273ed81985582c8a1be62f78c9459

No changes made

I kid you not.
No changes made
This is the original check-in reason found in the version control system of commercial software with hundreds of user.

Just in case you were wondering, yes, there were changes…

Tags:
 

This blog-entry is protected by a digital fingerprint:785273ed81985582c8a1be62f78c9459

Do they ever test?

The news are full of messages that Microsoft’s Windows Home Server corrupts files.
Then I learned today that MS outlook marks a low disk alert message as junk/spam:
Low Disk Space Alert on XXXX
Alert on XXXX at 12/xx/2007 12:01:33 AM
The following disk is low on free disk space. Low levels of free disk space can cause performance problems and prevent users from saving files on the disk.
Drive Letter: F:
Free Disk Space: 256.000000. MB
% Free Disk Space: 0.268364.%
You can disable this alert or change its threshold by using the Change Alert Notifications task in the Server Management Monitoring and Reporting taskpad.


The admin I know cursed worst than a sailor or a coachman. But maybe that was MS intention all along—to have folks curse and thus increase their work morale and output: those bad words can be very helpful at the workplace.

Two separate incidents, but both proof one thing: Testing always was and apparently always will be the forgotten stepchild of programming.

Can you share a story of an obviously untested program?

While that might be bothersome in some cases—once there are lives involved it is getting really messy.

How would you enforce more and better testing?

Maybe having the programmers / testers pay damages out of their own pocket?


Tags:
 

This blog-entry is protected by a digital fingerprint:785273ed81985582c8a1be62f78c9459

No Thinking Involved - Answer

This code was pasted all over the place.

Shouldn’t it have been declared and programmed once?

Despite what many think—copy and paste is not your friend. Why would anyone in their right set of mind want to include a parameter that is set to a specific value (not using a variable) but then check for a different value?

Tags:
 

This blog-entry is protected by a digital fingerprint:785273ed81985582c8a1be62f78c9459

No Thinking Involved

...
  nId := GetIdFromDB;
  setSelectionPage(nId, '');

procedure setSelectionPage(id : integer; desc : String );
var
  myNode:TTreeNode;
begin
  bFilter := False;
  if (desc = '-1') then begin
    bFilter := True;
...



This blog-entry is protected by a digital fingerprint:785273ed81985582c8a1be62f78c9459

What does this do? - Answer

As long as proper design and documentation aren’t part of the programmers work we can’t speak of engineering.

Btw, there was nobody neither admitting that code came from them nor being able to immediately explain what the code does…


Tags:
 

This blog-entry is protected by a digital fingerprint:785273ed81985582c8a1be62f78c9459

What does this do?

With 4 breaks and 3 counters and no documentation—you think anyone knows what it does?
for j := 0 to Items.Count - 1 do begin
  if ((TDataNode(Items[j].Data).NodeType = ntQ1) and (TDataNode(Items[j].Data).NodeID = Q1)) then begin
    k := j;
    Inc(k);
    while (k <= (Items.Count - 1)) do begin
      if (TDataNode(Items[k].Data).NodeType = ntQ1) then
        Break;
      if ((TDataNode(Items[k].Data).NodeType = ntQ2) and (TDataNode(Items[k].Data).NodeID = Q2)) then begin
        aNode := Items[k];
        m := k;
        Inc(m);
        while (m <= (FCurTV.Items.Count - 1)) do begin
          if (TDataNode(FCurTV.Items[m].Data).NodeType = ntQ2) then
            Break;
          if ((TDataNode(FCurTV.Items[m].Data).NodeType = ntQ3) and (TDataNode(FCurTV.Items[m].Data).NodeID = ID)) then begin
            bQ := TRUE;
            Break;
          end;
          Inc(m);
        end;
      end;
      Inc(k);
    end;
    Break;
  end;
end;


Tags:
 

This blog-entry is protected by a digital fingerprint:785273ed81985582c8a1be62f78c9459
You are on page 1 of 5

1 2345

This blog is designed to provide accurate and authoritative information in regard to the subject matter covered. If legal advice or other expert assistance is required, the services of a competent professional should be sought.