Notifications
Clear all

Comment blocks

26 Posts
7 Users
6 Likes
1,085 Views
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@barrie 

I'm not that talented, I need considerably more than two goes, that's why I rarely mention what project(s) I'm working on until they're finished. (Easier to hide the evidence of failure that way 🙂 )

I find that it's only when I do something wrong that I agonize and research it on Google for hours before I finally figure out the problem. Then I've learned what the problem really was, how to fix it, how to avoid it in the future and about a dozen other things that I came across (but where only tangentially involved).

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@will 

I know that some editors will do that but IDE 1.8... isn't one of them. That's why I suggested an alternative which IS available on the editor in use.

Always the downside of other people's code, the inability to modify or add to it. Back in ye old days I wrote my own editors and could add whatever features I so desired.

 


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@robotbuilder 

Can you imagine the chaos if everyone was allowed to add their own custom widgets to the IDE. It would be rendered useless in seconds.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@will 

Not at all, it depends how it is done. It would be more like adding accessories to something to make it more useful to the user. The additions don't have to be added to the main version of the editor. It is like being able to include a library to your Python code to allow you to do things with Python that would be impossibly slow if you actually wrote them in the standard set of statement and data types that Python provides.

 


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@robotbuilder 

But you're overlooking the incompetence of some of the potential contributors.

It's FAR more reasonable that the existing IDE allows you to select an alternate editor of your choice so that you can have your cake and eat it too without polluting the IDE.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@will 

But you're overlooking the incompetence of some of the potential contributors.

It's FAR more reasonable that the existing IDE allows you to select an alternate editor of your choice so that you can have your cake and eat it too without polluting the IDE.

For me this is all of practical consideration as a hobby programmer with limited abilities and lack of programming practice and probably the writer of incompetent code 🙂

I will not labour the point as we all have to live with what is and whinging about it is a waste of time and a pain for others to endure or block.  Instead I use work around solutions when the IDE fails to provide the functionality I need - because I can 🙂

I can always, and have, copied source code to my own editors to process and then copy it back again to the editors everyone uses.

 


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@barrie

Posted by: @barrie

Is there a shortcut that will apply a block comment to a few lines of selected code?

Indeed there is:

CTRL + /

... will toggle comment a block selection of code, in both old and new IDE's.

Cheers


   
ron bentley reacted
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@barrie FYI @frogandtoad

That's <command> / on a Mac.

Anything seems possible when you don't know what you're talking about.


   
frogandtoad reacted
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@inq

Posted by: @inq
Posted by: @will

What this does is leave you in the situation that only the LAST part you added caused the problem instead of trying to find a conflict or error amongst ALL of the parts at once.

100% concur!!!  Baby steps - hardware or software!  And either have some good code-repository software so you can check-in changes that you can easily back-up/out to any version you've ever done... or zip up the folder at every milestone.

I agree, and think 'git' is a good choice here - it's free and relatively easy to learn and use.

Cheers


   
ReplyQuote
ron bentley
(@ronbentley1)
Member
Joined: 2 years ago
Posts: 385
 

@barrie,

hi, assuming you are using Arduino IDE (any version) then block the section of code you wish to comment out then, from the meu bar, select:

Edit->Comment/Uncomment

or use CTRL + Slash.

Use this same operation to also uncomment the block or part thereof.

I use this a lot in doing just as you say, in debugging. 

Cheers

Ron B

image

Ron Bentley
Creativity is an input to innovation and change is the output from innovation. Braden Kelley
A computer is a machine for constructing mappings from input to output. Michael Kirby
Through great input you get great output. RZA
Gauss is great but Euler rocks!!


   
frogandtoad reacted
ReplyQuote
barrie
(@barrie)
Member
Joined: 2 years ago
Posts: 86
Topic starter  

@ronbentley1 @will @frogandtoad)

Yes, it is a great debugging tool. It also (in my case) minimises the probability of accidentally disabling a dreaded Curley bracket that creates another bug. 

Thanks for the short cut.

This post was modified 2 years ago by barrie

   
ron bentley reacted
ReplyQuote
Page 2 / 2