473,889 Members | 1,352 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Debugging, a lost art?

PsychoCoder
465 Recognized Expert Moderator Contributor
NOTE: I posted this on my blog a while back but feel the community can benefit from it.

I don’t know how many times I’ve seen someone post an error message and ask how to fix it. Does it irritate me , you bet it does. Students today have 100 times the resources at their disposal then what I had so many moons ago, yet they don’t (or wont I’m not sure at this point) use them.

When I was going for my BS in Computer Science the instructors drilled debugging into our heads. We didn’t have Google or Bing, we didn’t have e-books to read, all we had was each other and our brains.

I think this fail starts with the teachers, it seems no one harps on debugging in institutions anymore and it’s showing. Read forums and you’ll find hundreds of instances where simple debugging wasnt used. Where typing the error message into Google (or Bing) the answer is there, but the student is just too lazy to go that route.

Sure I’ve asked questions on forums, such as StackOverflow and others, but not until I had exhausted every resource I could get my hands on. I never ask for help until I’ve tried all other options, then, and only then, will I ask for assistance.

Teachers today seem as if they just want to get the students into the real world as fast as possible, thus diluting the programmer poll. In my opinion debugging is 25% of the programming process, yet students aren’t being taught anything about it.

It seems like that these students see an error message and immediately want help, because that’s how they were taught in today’s institutions, and it’s turning debugging into a lost art.

Someone tell me, just how hard is it to type an error message into Google and follow the links? Maybe our teachers need to be taught how to teach, maybe teachers who teach programming classes should know that debugging is vital and needs to be taught to their students.

Maybe these teachers should be required to work in the industry for a few years before they can teach programming, where they can see first hand how important debugging is and why it’s so vital to take the time to teach it.
Jul 6 '12
19 24978
john garvey
50 New Member
As another old codger I say - Long live breakpoints

Kind regards
Jul 30 '12 #11
kiseitai2
93 New Member
You know, some of the bad habits come with the first environment you learn to program. For example, I didn't learn about warnings or about treating warnings as errors when possible until I had the courage to learn C++. Before C++, I learned VB.net 2005, which meant you would get an in-code message if your code had problems or a "Build succeeded" message if the compiler found no errors. So, how high-level you start can affect whether you even become conscious of some basic programing skills.
Aug 1 '12 #12
Frinavale
9,735 Recognized Expert Moderator Expert
Can someone help me please!
I'm getting an error: Object reference not set to an instance of an object

*wink wink*

I don't think that I was taught debugging in school either but I also didn't use forums while in school. I used text books, sought help from my teachers and classmates, and used the web to search for help on the problems. The thing is that I didn't really have a good debugger at school...so my code was constantly littered with output statements helping me to track down bugs.

Soon you get to recognise things like null reference errors just by glancing at them...but it takes time to learn what they mean and recognise them.

The easy bugs are the ones thrown as errors in a program.
The hard ones don't throw the errors.

-Frinny
Aug 1 '12 #13
Dormilich
8,658 Recognized Expert Moderator Expert
yea, first comes that those students seem to be unable to read and then they ask in half a dozen forums in parallel.
Aug 1 '12 #14
kiseitai2
93 New Member
Well, Frinavale, now you know how I feel on my current project, which is to make my first videogame. Since I don't want to code the whole thing for the next two game afterwards, I am doing the right thing and coding my classes neatly with comments so I can re-cycle the core engine. As a result I haven't run the actual code, so I'm expecting to put up days dealing with the hard bugs once I start putting a demo together (I want a demo first to clean the engine from bugs before I use game-specific coding).
Aug 1 '12 #15
Banfa
9,065 Recognized Expert Moderator Expert
If you are planning on reusing your classes you would be well advised to run some sort of unit test on them to ensure their functionality.

Remember a good test is written directly from the specification of what the class should do not from knowledge of what the class does do.
Aug 2 '12 #16
Frinavale
9,735 Recognized Expert Moderator Expert
Hmm I find it best to test in small chunks.

I don't like the idea of writing entire classes (that depend on other classes etc) without testing what I have done along the way.

Unlike my coworker who will write 20 classes, not test anything, and then ask for help when it doesn't work...at which point it could be anything!

-Frinny
Aug 2 '12 #17
kiseitai2
93 New Member
I don't like to write big chunks of untested code, but I can't test until I have some minimal wrappers done. However, I'm gonna look into Banfa's suggestion. I don't know what unit tests are (I am a self-taught programmer and the only high school course I took was too basic for complex testing), but I will do some research and see how I can use them to clean my classes.
Aug 2 '12 #18
Frinavale
9,735 Recognized Expert Moderator Expert
Unit testing is pretty standard in this industry.

Actually, I remember one course in college requiring us to write unit tests. So, while we weren't taught debugging, we were taught how to test our work :)
Aug 2 '12 #19
Banfa
9,065 Recognized Expert Moderator Expert
If you had a system made of several processes each made of several modules each made of several classes then:

Unit Test would be testing the smallest possible unit in the code that can be made to run separately, for example a single small class or even a single method on a large complex class.

Module Test would be black box testing the module at the level of its interface or alternatively black box testing a whole process.

Integration test would be testing each individual program to make sure it will integrate properly with the rest of the system.

System Test would be testing the whole system to ensure it meets its requirements.
Aug 3 '12 #20

Sign in to post your reply or Sign up for a free account.

Similar topics

6
13025
by: Tony G. | last post by:
Hi there, I have an APS 3 application, running on a Windows 2003 Web edition server - it is a very busy website, and when users are click on certain links (membership info), a new window i opened via javascript. This new window is on the SAME website as where the user is located, but just opened in HTTPS (secure) mode - the user can now examine memberhip terms and continue to buy membership.
16
2884
by: Java script Dude | last post by:
To all Mozilla JS Guru's (IE dudes welcome), I have spent the last three years developing complex DHTML applications that must work in IE 5.5sp2+ but I use Mozilla 1.3+** to do all my development. I have build some cross browser debuggers so my users can send me verbose debug dumps. I have some success but have come to a roadblock with the basic underlying JavaScript models. The only way to get a complete stack in IE is to use the...
0
1589
by: Saira | last post by:
Hi all I have had an add-in that has references to several assemblies running smoothly for some time. recently i have lost the ability to debug it. When the solution starts, the symbols do not load. I narrowed down the problem to a timestamp mismatch between the pdb files and the dlls. When Excel loads, it loads the .net assemblies from the GAC, however these are not the current dlls that I am debugging with (these are in my bin...
4
1676
by: Ian | last post by:
Good day all, As a dotnet newbie there are a couple of things I am hoping some one can help me with. (1) In vb6 and vba I can F8 and step through a program. Whilst stepping through I can edit the code easily whilst the program is running. With dotnet as soon as I start the code screen comes up read only ..... Is there a way I can edit like in VBA and VB6 (2) In VB6 and VBA I can use on error goto 0 etc to break on an error etc. In dot...
0
1175
by: Carmen | last post by:
Hi all I'm using IIS 5.1 on XP with Visual Studio 7.1. I debugged all my apps till yesterday without problems. After shutting my machine down and restarting it now I'm unable to debug any of my apps Error while trying to run project: Unable to start dbugging on the webserver. You do not have permissions to debug the server. Verify that you are a member of the 'Debugger Users' group on the server Looking into the IIS console surprised me...
2
2749
by: Jeremy S. | last post by:
By default, Web.config has the following section: <compilation defaultLanguage="c#" debug="true" /> note that debug="true" There is a comment - also in the default Web.config - that states that making debug="false" will result in faster performance but a loss of
0
1259
by: Eric Caron | last post by:
Hi everyone, I installed the .NET Framework 2.0 beta 2 on a dev server to test some new things in Web Developper Expres, but now when I try to remotely debug my 1.1 projects, I get the error message "Unable to start debugging on the web server. Would you like to disable future attempts to debug ASP.NET pages for this project?". Checked the usual suspects, like URLScan and the Debugging Users group, but nothing has changed. Anyone know...
23
3217
by: keyser_Soze | last post by:
I have MS Visual Studio 2003 on Windows XP Pro. I have IIS running on this machine and I am trying to debug some existing code which has both ASP and ASP.NET components. When I try and launch the debugger from VS, I am told it can't because the project is of output type class library. The error indicates I should set the start action to start external program or start URL. I tried both of these and cannot seem to get the debugger to...
0
1852
by: Pheasant Plucker® | last post by:
Hi there, Not sure if this is the correct ng and I am not a programmer so excuse me but here goes...:-) We have a custom application that has a hook or calls either the Outlook calendar or looks in the Inbox for a specific email and acts upon it if found. This has worked great for over a year but when I updated using the usual
2
6004
by: Ashraf Fawzy | last post by:
My question about Windows Mobile : VB.Net 2008 SP1 I'm facing an error while I'm debugging my project , This is the error message : "The remote connection to the device has been lost.Please verify the device connection and restart debugging." I saved my project and closed it , and opened it again but the same error. I tried changing platforms and devices images (6 - 6.1 - 6.4 - 6.5 ),And I have the same error. I made a Reset (Hardware...
0
9807
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11188
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10789
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9606
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7993
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6028
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4647
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4251
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3255
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.