Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:46 06 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Programming Proverbs

Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6269
Posted: 02:21pm 11 Oct 2016
Copy link to clipboard 
Print this post

Back in the '70s there was a book called Programming Proverbs by Henry Ledgard
I was recently made aware of it and it does have a lot of ideas very relevant to today to both experienced and beginning programmers.
A blog on MSDN is worth a look, including the comments by others.

https://blogs.msdn.microsoft.com/alfredth/2007/01/19/programming-proverbs/

I would make a small change for the 'mites - test small code fragments so you know how to talk to the attached devices first. Then start again on the big program.

Jim
VK7JH
MMedit
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6269
Posted: 11:43am 12 Oct 2016
Copy link to clipboard 
Print this post

Another useful link
https://ericlippert.com/2014/03/05/how-to-debug-small-programs/

  Quote  If your program still has a bug, obtain a rubber duck. Or if a rubber duck is unavailable, get another computer science undergraduate, it’s much the same. Explain to the duck using simple words why each line of each method in your program is obviously correct. At some point you will be unable to do so, either because you don’t understand the method you wrote, or because it’s wrong, or both.


Jim
VK7JH
MMedit
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 06:35pm 12 Oct 2016
Copy link to clipboard 
Print this post

Luvvit Jim - and I think (know... ) I'm guilty of many of the sins.
This quote from it is pretty good too.

If this sounds like a lot of work, that’s because it is. If you can’t do these techniques on twenty line programs that you wrote yourself you are unlikely to be able to use them on two million line programs written by someone else, but that’s the problem that developers in industry have to solve every day. Start practicing!

Greg
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2428
Posted: 02:16am 13 Oct 2016
Copy link to clipboard 
Print this post

a favourite one that is particularly salient when contemplating the merits (or otherwise) of modern object-orientated methodologies:

"Any programming problem can be solved by adding another layer of
abstraction. Except for the problem of too many layers of abstraction."


i believe the first sentence is a variation on a quote from a famous GDP (great dead programmer) by the name of David Wheeler. the (full) original quote may have been, "All problems in computer science can be solved by another level of indirection, but that usually will create another problem."

with some wisdom Bart Smaalders (not yet dead) quipped, "Layers are for cakes, not for software."
see: http://www.dmst.aueb.gr/dds/pubs/inbook/beautiful_code/html/Spi07g.html#layers_forever


cheers,
rob :-)

Edited by robert.rozee 2016-10-14
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 12:25am 14 Oct 2016
Copy link to clipboard 
Print this post

Geeze Rob, had a quick look at that article and decided having been a metallurgist was a lot more fun.

Greg
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6269
Posted: 10:45am 14 Oct 2016
Copy link to clipboard 
Print this post




I should give credit to the Liberty Basic forum.
This is where the debugging discussion started.

Same problems everywhere.

Jim
VK7JH
MMedit
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 01:29am 15 Oct 2016
Copy link to clipboard 
Print this post

Think the little two-box loop directly above "NO PROBLEM" doesn't have an exit condition. Mind you Jim, as I mentioned, I'm a metallurgist.

Greg
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025