Disimproved Editor 2.x : (

Trying to fit in the Arduino forum, I will try to be almost as brutal as some of the people who denigrate people for being inexperienced or asking for help, on this forum, as a daily basis.

Well, I was very excited to see a non-dot release in the editor. The dark theme is good. As for the rest...

Startup is painfully slow.

No standard way to set a font. Really? So, the new IDE is nearly as feature-complete as Notepad?

It's trying to update, endlessly.

Traditionally the preferences should be under Edit/Preferences, or Tools/Options.

I don't see the point in deprecating boolean for bool, because whatever you state is standard for Arduino programming. If pure C or C++ worked well for programming microcontrollers, without modifications, it would have been done before the older Arduino take on programming microcontrollers. So, what changed other than inexperienced programmers from standard C/C++ background, struggling to program microcontrollers for the first time. The funniest part is: Arduino is giving up their creative take on the language, which in spite of any corporate initiative, is unique, anyway.

Byte is also not syntax hightlighted.

Arduino is open, but still not Teensy open? There are many proprietary chips supported though libraries, but I guess that's out of your comfort zone?

Line numbers should be a toggleable option in a real View menu. This is a UI design failure: "everyone will use it like I am using it," or, "you are not playing with it right!"
Yes, I saw this: arduino-ide/advanced-usage.md at main · arduino/arduino-ide · GitHub

Think I'm cruel? Look around this forum. I've even read Ops denigrate people, who unlike the professional programmers and designers who worked on the IDE--might be kids. Last time, it took only 3 forum threads to show a programmer here at this Silicon Valley coffee shop, the true wrath of asking a question.

I am using 2.0.1 with a Teensy 4.1 daily, but Teensyduino needs to be installed, and for IDE 2.0 you have to add an "additional boards manager" URL in preferences. But perhaps I misinterpret what you are saying.

I use 2.0 exclusively now; while I am aware of various shortcomings, I am focused on what I am working on rather than twiddling with my tools.

  • Wes

I did not expect kindness on the Arduino forum, but thank you @weshowe : )
(I feel that people have been more kind to me than to others, here.)

What I meant was: Why can't Teensy's support be more transparent.

Oddly, I wasn't aware of fishing for answers, but thank you for the Teensy conformation. Given the new editor, the idea of installing Teensyduino makes me a bit nervous. I tend to use both Arduinos and Teensies. I have a project in mind for the Every, with its slightly expanded memory.

I do want to share:
1.) manually downloading and installing 2.0.1 seemed to solve the update loop.
2.) After the procedure to choose a font, and trying several syntax permutations, Bitstream Vera Sans Mono did go in, but with no single quotes ' like the default font uses, for multiple characters, for some reason.

After a save, I have seen the editor load multiple-tabs at about 16 seconds for 7 tabs, on something with about 2,700 lines total, though many comments.

Hi @BrendaEM. Thanks for your feedback.

Not really. It sounds like you already figured out how to do it, but for the sake of others who are interested in the subject, I'll provide the instructions:

The font can be adjusted in the advanced settings:

  1. Open the Command Palette by pressing Ctrl+Shift+P (Command+Shift+P for macOS users).
  2. Select the "Preferences: Open Settings (UI)" command.
  3. In the "Search Settings" field, type font family.
  4. You can now set the fonts by entering a font name in the fields of the settings you are interested in customizing.
    This field is a comma-separated lists of font names. The first installed font on the list is used, so a list of multiple fonts provides fallback fonts to use in case the previous ones don't happen to be installed on the system the IDE is running on.

The font change will take effect immediately.

There is some Windows specific supplemental information about setting fonts in the IDE here:


Please let me know if you have any questions or problems while customizing the font.

Primary user preferences are available via File > Preferences, just as it was in Arduino IDE 1.x.

The rest of your feedback seems to be targeted to Arduino IDE, so I should make it clear this deprecation is completely unrelated to Arduino IDE. It is happening in the firmware codebases and that affects any development tool compiling the firmware.

You can learn the reasons for deprecating the boolean typedef, and the specific changes that have been made (none of which were in the Arduino IDE codebase) here:

OK, so we are now stating that bool is the standard Boolean type.

I'm not sure I understood correctly what you mean by this. Please provide a more detailed description to help me to understand it.

This deficiency is tracked here:

I provided details about why it is not currently colored here:

I don't think you are cruel. I do think that you are inserting an unnecessary level of negativity into this topic that is a bit counterproductive. I think it would be better to keep the discussion purely technical, but I do understand that it can be frustrating when the tools we rely on don't work as we would like them to.

But I do think you really need to rethink the philosophy you seem to be taking: "it is OK for me to behave badly because some other people on the forum have behaved badly". It seems to me that you were unhappy with some of the behavior you observed here on the forum. Why not try to be part of making the forum community the way you would like it to be instead of being part of the problem?

Please provide a detailed description of the things you think are not transparent and the changes that would make them more transparent.

This is incorrect. Teensyduino is a modified version of Arduino IDE 1.x. Teensyduino is not used in any way by Arduino IDE 2.x

Teensy support in Arduino IDE 2.x uses the standard Boards Manager infrastructure, just like Arduino's official boards platforms and all the 3rd party boards platforms (e.g., ESP8266) use.

1 Like

Looking at the PJRC 2.0.0 link, adding the URL into preferences is still necessary before you can install the Teensy boards package. I already had another link in mine for an STM32 board (which I forget the name of), so I had to go to the end of the line and add a comma before pasting it in.

I realize that PJRC and Arduino are separate entities, but I am pleased there is a standard that allows me to use a single tool for projects on different hardware.

  • Wes

It really is an important advancement.

Teensyduino was created because Paul Stoffregen wanted some advanced capabilities that Arduino IDE 1.x could not provide out of the box. The managers of the Arduino CLI and Arduino IDE 2.x projects set the addition of the missing capabilities as one of the requirements for those projects. The developers worked closely with Paul Stoffregen and others from the community (example) to implement these.

These were designed in a very flexible manner so that they can meet the needs of any boards platforms. Even though Teensy was the first to take advantage of them, it is certain we will see other boards platforms take advantage of these new capabilities to do amazing things. In fact, Earle F. Philhower, III's "Raspberry Pi Pico/RP2040" boards platform is already using the new pluggable discovery system to facilitate uploading to boards that are in the "USB Mass Storage Mode".

There are plenty of other forums on the internet.

Also, your post is in the wrong category.

I just want to sing songs and not worry, be happy!
I think that there are lots of "nice touches" that have been set aside for the serious issues.

I like using the light theme... but it is not all light, the status window is black with red text... my eyez!

In my opinion this is all phase 2 minor irritations. My code UPLOADS (almost always, barring the serial port connection oddities, which I can fix with a program restart) and my code RUNS 100% reliable (barring my self-inflicted issues). I TRUST the underlying core of tools to give me what I have asked for, and when it does not, it ALWAYS resolves to a personal failing in my design or execution.

I'll quote Rodney King here "Can't we all get along"? We will get more positive results as a team.
Later, perhaps the developer team will make the most popular environment optimizations accessible in a friendlier manner.

I'm on the USER team, I write code, and I am pretty one-tracked on getting that done. If I find things that I think can be done in a better way, I say so, but I am not interested in putting aside my work for any longer than it takes to point out my findings.

  • Wes, W5ZZO

Your topic has been moved to the dedicated IDE2.0 section of the forum.

This is being tracked here:

Somewhat related:

Good to know it is already "on the radar". I figure all the cosmetic stuff will get fixed at some point, as it is important, too. I am, naturally, most concerned with those that break the workflow, and there are far fewer of those left since the "beta days".

  • Wes

Good morning all,

BrendaEM , Sorry if you have run into some less-than-ideal responses on the forums. I personally have not felt it up here, but then again, maybe I am now just used to some of it.

I have run into that on some other forums in the past, which caused me to almost quit learning about robotics. Luckily, I found some other forums at the time that felt very friendly.

Personally, I believe that Arduino 2.0.1 is a great step up from Arduino 1.x. Does it have warts? You bet. Things like the Serial Monitor still needs lots of work (and they know it).

I will mainly comment here about using this with Teensy boards, as that what I mostly do.

I should mention that there are several of us up here now, that use Teensy boards on Arduino IDE2. But if there is some additional Teensy specific questions you have, you might want to post them over on the PJRC forum as well.

As others have mentioned, Teensy now has support for Arduino IDE2 through the Arduino Standardized way of the boards manager.

Paul's most recent blog issue talks about this:
Arduino IDE 2.0.0 Teensy Support (pjrc.com)

Board Manager
As mentioned, the Teensyduino installs on Arduino 1.x was done to install the Teensy boards, but in addition to this to add some additional support to the underlying Arduino IDE code to better work with Teensy boards. Now with Arduino 2.x, support has been added to allow the Teensy boards to be installed like many other board types.

Library Manager
So far most of the Teensy specific libraries are still packaged as part of the board installs. And not installed using the Library Manager. Hopefully over time, more of the teensy libraries will be setup to be added using the library manager. I believe the main limiting factor for this conversion is time and energy.

Example Sketches
With Arduino 1.x/Teensyduino - Paul modified the Example sketch directory that Arduino installs, to add in the Teensy specific examples. So far, they have not been added to Arduino 2.x. Suggestions have been made to add them the way that other board types have, where they are added under some simple (probably empty) library. Hopefully Paul will have some time to add these for the next boards update.

proprietary chips supported though libraries
Not sure what you meant here? I am guessing that you spend a lot of your time, wanting to edit (or at least look at) source files that are either in libraries and/or core files? If so I hear you. I spend a lot of time within libraries or other system files, which the IDE does not allow you to edit. For those I typically use Sublime text. Note, I have a setup within sublimetext to allow me to do builds there, which I often use.

What is nice about IDE2 is that, if I change one or more of the files in the sketch folder, those changes will be picked up in the open IDE window. Before, you would have to try to set the IDE1 into external editor mode (preferences) and it was an all or nothing thing.

Note: There are times when I simply want to use the IDE and for example create a new library. What I will typically do, then is simply first create the library as source files, within the sketch folder. And only when I am mostly done with that library (or version of library), do I then move those files to a new library.

Serial Monitor
As I mentioned earlier, there are still some issues, here. Some on the Arduino side, some maybe on Teensy side. A lot of this has improved now through the RC cycles and between 2.0 and 2.0.1.

I personally use an external Serial Monitor (TyCommander) a majority of the time. But that is true for both IDE1 and IDE2.

Sorry, I am not sure if these rambling helps answer any of the questions you have about IDE 2 supporting Teensy development.

But if there are still some specific questions or suggestions that are not addressed here, please ask again here or up on the PJRC forums.

Kurt

Respectfully, I think that other than an abject dismissal of requests, people have treated me fairly.

Though, what I have seen in this forum--including that stated the moderators--I have warned 2 parents about.

I have even asked people with electronics and programming degrees if cruelty and denigration was an integral part of their education, but they state that it is not.

Thank you for the reply @KurtE,

Except for the dark theme, many of the changes were for the worst.

Arduino 2.x is slow, painfully slow to load and save, and it's not getting better.

Why is it so slow when 1.x wasn't?

Some of the unique statements were handy, though they are being deprecated to make new programmers, who have stopped learning, comfortable. What's next, mandatory pointers? One of the things I like about Arduino's (former) version of C is: a single person can write quicker swaths of code.

The byte keyword is simple to remember. Oh I wish enums could be set to use 8-bit bytes. I wish we could group nibbles, too, but that's the kind of thing you would only want to do on a microcontroller, nowadays. Oh, well.

[AFAIK, Arduino, other than the name of an Italian bar, was an offshoot of the Wiring board, which was made for artists to make exhibits.]

The auto-format now contracts the brace back up one line, making statements withing curly-braces less obvious. This is a style thing, and the formatted should not obliterate the programmer's style--if it is sound. Version 1.x didn't change this into that. I can visually check for structural errors much quicker using the first version, as I am writing; the containment if more obvious to me. Though, it might not be fair to force my style on everyone--would it? Yet, that's what you are doing.

void setup()
{
  // This
}

void setup(){
  // That
}

I also hate how the formatter now removes spaces within parens. When things get a little thicker, I find it much easier to add spaces within the line, for readability. Unlike double-equals, I rarely miss putting a parentheses in a line. Your new formatter breaks all of my formatting work, needlessly. All of that fits on one line, just fine in the editor. Arduino 1.x formatted without trashing style.

Please paste these in the editor, and see for yourself if it's not easier to read. It's formatted in a way to show the paren structure.

if ( ( axis[current_channel].frames + setting[ani_framjmp].val ) < setting[ani_frammax].val )

Here's a few more to try to take the spaces from:

  if ( ( setting[setting_current].val - setting[setting_current].inc ) >= setting[setting_current].low )

       Serial.print ( char ( id_name_eeprom[count] ) );

    if ( ( value >= setting[count].low) && ( value <= setting[count].high ) )

[Oddly, if you use the above method, its very easy to imagine the contents of the parens as being higher than that outside of it. So, as long as the spaces are added, you can just glance at it, instead of counting in from both ends.]

I can tell that there were a lot of infrastructure changes, but what good are they if things are bad for the users. The preferences, weren't really supposed to be used by the users, were they?

And after all of these years, you can't give us a proper font chooser?!
On Windows, even lowly Notepad has a font chooser. BBEdit has a font chooser. Notepad++ has a font chooser. What is the problem? Looking up the proper name of font to make sure it is correct. Your current solution is no better than the editing the old preference file. Setting a font is no more fun, than finding the proper video card name for my Adobe 6.x software, so it can use Cuda, on two computers.

Yes, indeed, the Serial Monitor isn't working right. I am not sure why I would post a bug report--when Arduino has been printing code with letters larger than your hand--for years.

Arduino 2.x makes it a bit harder to Save As versions by inserting date strings in the file name. This makes versioning harder for people who do.
What I want: filename01, filename02
What I get: filename_copy_20221229105247
Pst! I have a secret for you: there are dates on most computer files.

Rhino 3D can automatically increment files saves, but Arduino decided just to throw in munged-together dates.

So, except for the dark theme, what benefit is 2.x to users?

We senior members and every moderator I know try very carefully to catch bad actors and report personal abuse; in every case I have flagged, posts have quickly been edited or removed.
But while you are talking to parents, maybe you also mention that a lots of forum noise come from school-aged lazy, abusive, and demanding young people demanding code solutions. If parents were more concerned, perhaps they would be engaged with their children's education and be instructive on how to use the Arduino forum; there are rules which really are strongly suggested guidelines on how to effectively utilize the vast resources, but almost all newbies refuse to comply. Even after they are referred to the correct link, many refuse to act. I have personally delt with my share of young folk who received an Arduino kit as a gift and simply have-no-clue and refuse any link to research and instructive material; all the youth want is an answer.
So while I understand frustration, this forum is not a give away code for anyone's whimsies - rather the forum is a free exchange of talent to assist self-disclipined persons to achieve knowledge and assistance sufficient for them to achieve success with coding any single project.
Thus, teach your children to approach a free service with respect, to ask for assistance, to be respectful as this is a world-wide forum and often context is lost in translation. No one here is paid which is to say everyone is a volunteer giving of themselves for the better good.

Ray Burnette
Member since 2012

1 Like

Some interesting observations here.

I agree that the IDE is VERY slow to load. The reason why is not clear but the fact that it is written in Java is probably a factor. Java is well known for its lack of speed.

It is curious that the 'byte' type is not syntax highlighted, but maybe its to discourage its use? The term 'byte' means different things on different platforms. On many Arduino MCU's it means a 8-bit unsigned integer but on other platforms it may mean a 16, 32 or even 64-bit unsigned integer. It may sound intuitive, but sometimes one may need to be more specific.

I am puzzled by the decision to move the line numbering checkbox out of preferences an into some obscure hidden dialogue. I only became aware of Ctrl-Shift-P this evening! I have not really had the need to change font and didn't realise it was possible, but I would have expected that feature to be readily accessible a well.

I do think there have been some improvements. Uploading is now much faster. The dark theme is a useful addition, although I do find the layout a bit confusing in some respects. It is imperfect, but it is free or for a contribution if one feels inclined. The early release candidates did have some bugs, but version 2.0.3 appears to be stable and has been growing on me. Of course, there are also other free alternatives available such as Vscode+PlarformIO. Its a bit of a learning curve initially, but well worth considering.

All in all I think v2 is better in some ways, but there are areas that could be improved. In the meantime, Some of these things might be changed in due course, but in the meantime, I appreciate that it has been made available to us for free and would like to thank the developers for their hard work.

IDE2.0 is not written in Java; anything before that was written in Java.

You can customize the style of the "Auto format" feature according to your preferences:

https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-customize-auto-formatter

The purpose of a code formatter tool is to produce a specific consistent style, not to make some subjective judgement about whether the existing style of the code is "sound".

Arduino IDE 1.x used the Artistic Style code formatting tool. Although it is a very nice tool, unfortunately it is no longer actively maintained. For the sake of sustainability of the project for the decades to come, it was determined that a tool with a strong future was needed for Arduino IDE 2.x. The very popular and actively maintained ClangFormat met the criteria. Unfortunately there are differences between the two tools which resulted in some unavoidable changes in the formatting style produced by the Arduino IDE 2.x "Auto Format" feature compared to that of Arduino IDE 1.x.

We went to great lengths to find a ClangFormat configuration that minimized those differences and set up a powerful and well documented custom configuration system to allow those users too stubborn to adapt to the official standardized Arduino code style to configure the tool according to their own preferences.

Nope. You are free to configure the feature according to your own preferences.

Feel free to submit the necessary code changes to the free open source Eclipse Theia IDE framework that provides the font configuration capability for Arduino IDE 2.x.

I guess because you would rather gripe about the IDE's flaws than work to improve this free open source software.

Arduino IDE 1.x used an incredibly crude keyword highlighting system where arbitrary keywords were defined in a text file and the editor would highlight those words without any real intelligence (e.g., a keyword for a function in an arbitrary library would be highlighted even if the library was not used by the sketch and the keyword happened to occur completely independently in the sketch in a different usage such as a variable).

Arduino IDE 2.x uses a sophisticated C++ language extension: the same one used by VS Code. This extension is very smart about standard C++, but doesn't know anything about the Arduino core API.

This is tracked by the Arduino IDE developers here:

No. Despite what Brenda might have implied. There is, and has never been, any intent to discourage the use of the Arduino core API's byte typedef.

How about:

enum myType:uint8_t { zero, one, two, three };

or even

enum myType:byte { zero, one, two, three };

And byte is highlighted (IDE nightly 20221224):

2 Likes

You are welcome. I try to help out as I can, but as I mentioned, if you have specific questions about Teensy integration with the IDE2 and CLI, you may want to post up on the pjrc forums, as there are there are several of us up there that try to help out (for Teensy specific issues).

Others have commented on the majority of things in your post, so will try to keep mine short:

@ptillisch has already described methods for how you can customize this, which I totally makes sense, at least to a point. But I do agree that I wish there still was a more light handed cleanup settings and/or command. That is with IDE1, I mainly used this, to do things like to fix up the tab versus space thing, plus when I did a compile and got a strange set of error messages, it helped to quickly see if there was a { } mismatch in the code.

Should mention, that most of this. like enum and the like are standard C or C++ stuff controlled by the underlying compiler. In the case of the Teensy, it is the GCC compilers. Note: the current beta versions of Teensyduino are using a more recent version of GCC than the current released Teensyduino.

As for using byte, I have not run into issues of different sizes, but they may not agree on is it signed or not. But have been and continue to be bit by "word", as lots of libraries are written assuming this is 16 bits, where on many arm boards this is 32 bits and maybe some 64.
So I personlly prefer in most of these cases to use, types that specify it, like: uint8_t uint16_t ...

?
Note: When I mentioned Serial Monitor in my first response, I was referring to some known issues, which have been stated elsewhere and have bug reports on them, like:

cut/copy/paste out of Serial monitor may not include all of the selected data.
When new data is printed in the monitor, it may not fully scroll to make the new data visible.

Note: there are/were some additional issues in the Teensy forum, that the new Teensy installs, hopefully fix. This includes that there were input lines coming in over the Serial monitor that were being lost. Also, some issues where the selection of Serial port was being lost or not seen.

Paul put in some changes to the underlying things like pluggable monitor and the like that hopefully addressed some of these. In some cases he needed to add polling to see if the hardware changed as the system was not notifying him of all of the hardware changes.

I think that answer will be different for different people, for me some of the things I appreciate include: (Note my names for things are probably wrong)

Context sensitivity, auto completion: For example, I can put the mouse over a variable name, and it will show me, the class of that object. Likewise, for a method, it can show me the comments for that method as well as parameters.

Teensy support: IDE 1.x did not have any of the hooks that Paul needed/wanted, so he ended up having to do Teensyduino releases where he would need to modify the underlying IDE to make it work properly. IDE 2 now has the hooks and the like in place, such that the Teensy releases can be done in the same way as most other board types.

Color Schemes: You can install different color schemes, that were made for Visual Code and use them with IDE2. I am currently running one called: Atom One Dark. Not sure if these change the fonts as well or not. But this fixed the problems I had with the two installed Dark ones. Arduino Dark could not see the cursor. Thei Dark could not see if Autoscroll was selected or not.

File Change notifications: I often do a lot of my editing using a different editor, like sublime Text. With IDE 1, if I wanted to edit the IDE file and have the changes picked up by the IDE, you had to go into preferences and choose "Using External Editor", and this was global and would not allow you then to edit in the IDE, nor allow you to go into this mode when you had any IDE window open with changed files. IDE2 does like most other editors and monitors the files and if changed external, it will pick those up.

Column select and editing: I can select a portion of several lines of text using middle mouse button on Windows and then do the same edits on those multiple lines.
...

Is it perfect... No, but I personally believe it is a major step forward.

Oops sorry, maybe it was not too short after all.