12 Replies - 2757 Views - Last Post: 31 January 2014 - 06:49 AM

#1 glyserr  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 21-January 14

Desk Checking, how important is it ?

Post icon  Posted 21 January 2014 - 10:43 PM

Hey, I just wondering if anyone still do deskchecking to proof the algorithm or just type in the compiler ?
If it is important so why people tend to not to do it ?

sorry for my bad english.
Is This A Good Question/Topic? 0
  • +

Replies To: Desk Checking, how important is it ?

#2 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3163
  • View blog
  • Posts: 9,559
  • Joined: 05-May 12

Re: Desk Checking, how important is it ?

Posted 21 January 2014 - 10:50 PM

What is "deskchecking"?

Ahhh... found it: http://www.ehow.com/...-checking_.html

Usually, stepping through the code with a debugger is a better experience because you can also change the variable values to force the code to go down various path that your sample input may not use.

In general, though, the current idea with test driven development is that you write unit tests so that you don't have to step through the code manually. The unit tests should exercise all aspects of your code. And keep on exercising it as you progress and add more code.
Was This Post Helpful? 1
  • +
  • -

#3 glyserr  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 21-January 14

Re: Desk Checking, how important is it ?

Posted 22 January 2014 - 04:29 AM

hey, thank you for replying my topic.
Btw, are u doing deskschecking ? or u just code in compiler and see the result and if something wrong u just fix it without deskchecking ? or in other words do you use pseudocode or flowchart to build the algorithm ? or just code it no matter what ?
sorry for my question. I thought this is some of basic things I want to understand , thanks :)
Was This Post Helpful? 0
  • +
  • -

#4 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 5643
  • View blog
  • Posts: 12,359
  • Joined: 16-October 07

Re: Desk Checking, how important is it ?

Posted 22 January 2014 - 06:00 AM

The act of printing out code and reading it "at a desk." Sounds like something from the dark ages of COBOL.

The practice itself implies that you do not have a computer at your desk. Or that you should kill a tree for something that should be readily accessible on your screen.

I have never, ever, met anyone in the real world who would do this. At least, not someone who isn't collection social security. If a programmer were to be seen doing this, they would probably be mocked.

I do recall a "User Friendly" cartoon that poked fun at this, but I can't seem to find it.
Was This Post Helpful? 1
  • +
  • -

#5 jimblumberg  Icon User is online

  • member icon


Reputation: 3845
  • View blog
  • Posts: 11,737
  • Joined: 25-December 09

Re: Desk Checking, how important is it ?

Posted 22 January 2014 - 08:07 AM

Quote

are u doing deskschecking ?

I haven't done this in decades, and never for a C/C++ program. The only reason IMO to ever do this is when working with a language that doesn't have a debugger. And most if not all of today's programming languages have debuggers available. Also as the complexity of the program increases the likely hood of finding a problem with this method decreases dramatically.

As already stated by others, a debugger preforms this functionality much much better.

Jim
Was This Post Helpful? 0
  • +
  • -

#6 AfterBurner66  Icon User is offline

  • D.I.C Head

Reputation: 16
  • View blog
  • Posts: 116
  • Joined: 02-August 08

Re: Desk Checking, how important is it ?

Posted 22 January 2014 - 10:17 AM

Even if you want to design an algorithm, there are readily free available tools to do that. Then in code level there is the debugger as pointed out. But if you can't figure out, what is going on in a loop that malfunctions, in a snap or some other simple things inside a program (what is the value of a variable etc.) and I talk about moderately complex programs then that's a whole different story in my opinion.
Was This Post Helpful? 1
  • +
  • -

#7 no2pencil  Icon User is offline

  • Head MFIC
  • member icon

Reputation: 5066
  • View blog
  • Posts: 26,448
  • Joined: 10-May 07

Re: Desk Checking, how important is it ?

Posted 22 January 2014 - 10:20 AM

Until this topic, I didn't know that there was a term for this. I used to do this often with C, & on a recently large port/upgrade of a PHP to PHP Framework project I've done it.

I feel it's important (to me) because I can pencil in ideas, highlight with marker, & look at entire blocks of code with the ability to take notes. The larger project was done with 2 developers, so we were able to point at code, jot down notes, circle items, number a to-do list... & so on.
Was This Post Helpful? 0
  • +
  • -

#8 Programmist  Icon User is offline

  • CTO
  • member icon

Reputation: 251
  • View blog
  • Posts: 1,833
  • Joined: 02-January 06

Re: Desk Checking, how important is it ?

Posted 22 January 2014 - 12:03 PM

Came here to find out what "deskchecking" was. I thought maybe it was something to do with remote workers coming in to the office every so often and "checking in" at their physical desk.

I've written pseudocode before, but I've never printed out actual code and then poured over it. I can't see too many reasons to do that unless you have to prove the correctness of an algorithm and really want to do it in pencil.
Was This Post Helpful? 0
  • +
  • -

#9 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7293
  • View blog
  • Posts: 12,109
  • Joined: 19-March 11

Re: Desk Checking, how important is it ?

Posted 22 January 2014 - 07:54 PM

If you're developing an algorithm, it can make a lot of sense to go over it on paper or better yet at a whiteboard, with a colleague or two to play devil's advocate. This would happen before any code is written, though. I agree completely with the consensus that reviewing code in hard copy is not among the current "best practices" and I would be very surprised to find anyone advocating it today.
Was This Post Helpful? 1
  • +
  • -

#10 Momerath  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 995
  • View blog
  • Posts: 2,386
  • Joined: 04-October 09

Re: Desk Checking, how important is it ?

Posted 30 January 2014 - 12:28 AM

I'm old so deskchecking was something I used to do. Back in the old days we didn't have terminals and real time systems. We had batch jobs. You submit your program for execution, sometime later it is run and you get output. No stepping through lines in a debugger, you didn't have one :)/>

With the advent of real time systems and CRTs (yes, I used to program on a Model 33 teletype) this practice has gone by the wayside.

I still have paper tape (and punch cards) in my "old computer stuff" closet (along with a 300 baud modem, 8 inch floppy disks, etc.)

This post has been edited by Momerath: 30 January 2014 - 12:29 AM

Was This Post Helpful? 0
  • +
  • -

#11 Minimalist  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 100
  • Joined: 13-November 13

Re: Desk Checking, how important is it ?

Posted 30 January 2014 - 01:22 AM

I'm in the process of moving a school timetabling program I have coded in the 90's in vb3,vb4,vb5 over to vb.net. Lots of .txt files and .dat files, now the data goes into a database. To do this I needed print outs to go over just to understand the logic of many parts of the program and write notes in place. So yes, sometimes there is a need to do some desk checking.

This post has been edited by Minimalist: 30 January 2014 - 01:22 AM

Was This Post Helpful? 0
  • +
  • -

#12 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3163
  • View blog
  • Posts: 9,559
  • Joined: 05-May 12

Re: Desk Checking, how important is it ?

Posted 30 January 2014 - 09:23 AM

Let me recommend using Source Insight. I used to do lots of print outs as well to understand code, but Source Insight and using One Note let me go all electronic.
Was This Post Helpful? 0
  • +
  • -

#13 xclite  Icon User is offline

  • LIKE A BOSS
  • member icon


Reputation: 877
  • View blog
  • Posts: 3,122
  • Joined: 12-May 09

Re: Desk Checking, how important is it ?

Posted 31 January 2014 - 06:49 AM

View Postjon.kiparsky, on 22 January 2014 - 09:54 PM, said:

If you're developing an algorithm, it can make a lot of sense to go over it on paper or better yet at a whiteboard, with a colleague or two to play devil's advocate. This would happen before any code is written, though. I agree completely with the consensus that reviewing code in hard copy is not among the current "best practices" and I would be very surprised to find anyone advocating it today.

Yep - this is how I do it. Sometimes I draw out scenarios on paper to see how the system interacts, but tests/debugging are much easier on the computer. I dislike manually tracing code just because I don't want to have to update the various states and track multiple paths of execution.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1