Notifications
Clear all

Comment blocks

26 Posts
7 Users
6 Likes
206 Views
Will
 Will
(@will)
Noble Member
Joined: 1 year ago
Posts: 2112
 

@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).

I was kidnapped by mimes.
They did unspeakable things to me.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Noble Member
Joined: 3 years ago
Posts: 1554
 

@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)
Noble Member
Joined: 1 year ago
Posts: 2112
 

@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.

I was kidnapped by mimes.
They did unspeakable things to me.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Noble Member
Joined: 3 years ago
Posts: 1554
 

@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)
Noble Member
Joined: 1 year ago
Posts: 2112
 

@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.

I was kidnapped by mimes.
They did unspeakable things to me.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Noble Member
Joined: 3 years ago
Posts: 1554
 

@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.

 

This post was modified 3 months ago by robotBuilder

   
ReplyQuote
frogandtoad
(@frogandtoad)
Noble Member
Joined: 3 years ago
Posts: 1476
 

@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)
Noble Member
Joined: 1 year ago
Posts: 2112
 

@barrie FYI @frogandtoad

That's <command> / on a Mac.

I was kidnapped by mimes.
They did unspeakable things to me.


   
frogandtoad reacted
ReplyQuote
frogandtoad
(@frogandtoad)
Noble Member
Joined: 3 years ago
Posts: 1476
 

@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)
Reputable Member
Joined: 9 months ago
Posts: 328
 

@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)
Trusted Member
Joined: 3 months 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 months ago by barrie

   
ron bentley reacted
ReplyQuote
Page 2 / 2