Auto-add void setup() and void loop()

Any chance you guys can code in a feature that automatically adds the setup and loop functions to a new sketch?

Being a total beginner, I tend to open existing sketches, erase everything but the 2 functions and go from there.

It shouldn't take too long to code in, and I don't see why not. (Well, unless some people are still on 10MB hard drives and don't have the extra 1.4KB to handle the new code, but then, where are they saving sketches?)

Welcome to the Arduino world.
You get that feature when you create a new sketch. As you gain experience you will find it increasingly unnecessary to delete your old ones so you will get comfortable with the existing capability :wink:

Hmmm, when I hit, Ctrl-N, Press the New icon or File > New, it doesn’t add those :confused:

Or are you implying that eventually my brain will just remember how it all works and “Auto add” them?

You do get so used to it that the brain does "Auto add" them! So much so that I completely forgot that it was not being done automatically by the environment.

So, sorry for the misinformation. But I do think you will quickly find that you are adding them without needing to think about it.

Now if the Arduino team could add a feature to find and fix logic errors in my sketches, that would be a big help ;)

Yes please.

I constantly find myself forgetting the ambiguous ;

And all the IDE can do is tell me “blah blah, ; expected before }”

WELL THEN FIX IT DAMMAT

I assume it hasn’t been done before because some people want specific things done, well then show a pop-up LOG of all changes, GOSH.

I assume it hasn't been done before because some people want specific things done

I think that's right. There are lots of pressing things (like fixing millis overflow so that sketches can do timekeeping properly) that are a higher priority for the scarce resources of the Arduino developers.

And all the IDE can do is tell me "blah blah, ; expected before }"

WELL THEN FIX IT DAMMAT

I think you'll find that's the C/C++ compiler under the hood complaining. I believe self-correcting compiler technology may be a non-trivial problem--just because it knows there is an error doesn't mean it knows how and where to fix it.

--Phil.

I believe self-correcting compiler technology may be a non-trivial problem–just because it knows there is an error doesn’t mean it knows how and where to fix it.

–Phil.

The biggest problem is that the compiler doesn’t know what the programmer really wants to do. Many of my bugs happen when I don’t really know what I it is I am doing, so its asking a bit much of the compiler to figure it out :wink: