Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I’m a sufficiently advanced programmer, and I still use the Arduino IDE rather than anything else for my electronics projects (though mostly non-Arduino boards these days)

My VSCode setup is already crowded with Development tools for other platforms and the Arduino IDE reliably works, with the libraries. I’ve been using the 2.0 beta for awhile And it is really nice. I’m pleased it’s made it out of beta.



I'm the exact opposite. I find the Arduino ide totally unusable. It takes forever to start up. Every operation is slow. It can take over ten seconds to open a small file and display it on an top of the line 12th gen Intel laptop

It literally recompiles all code on every verify or upload (because "we don't want lots of machine objects littering hard disks")

So on any of the mbed based boards compiles are like a minute or two for anything. On platformio and other compatible ways, it is instant.

So even for basic messing around I don't use the Arduino ide because it makes it not fun


> recompiles all code

This alone was reason for me to move to PlatformIO. It's infuriating.


> It can take over ten seconds to open a small file and display it on an top of the line 12th gen Intel laptop

What did you do to your computer? My 5 year old Ryzen desktop opens the Arduino IDE in ~1.5 seconds.


I can screencast it, but it's actually consistent even across OSes.

My top of the line macbook, with a fresh arduino 2.0 ide install on MacOS, is the same way.

Meanwhile, literally everything else works great.


I had something similar, I thought Arduino IDE was crazy slow, but then switched laptops and it was crazy fast. Not that the new laptop was more expensive or a lot newer, just different.

I blame windows stuff I guess, it's definitely not just CPU power


I mean, I'm on Linux, but I really wouldn't expect the JDK performance to be that different between operating systems.


I can make this happen on macos too :)


How can C++ compilation be slow if Arduino doesn't even use templates and the final binary is to fit in 32kb of ROM? If anything, recompiling all cpp files instead of individual object files with a link step shouldn't even have a noticeable speed difference


Yeah I don't even have a build system for my embedded C++ projects targeting 32-128K flash systems.

A main.cpp that includes all other .cpp files and a build.bat that recompile everything, it's always been instant.

And I do use a some amount of template and constexpr for peripheral setup code (computing all the constant values for GPIO config registers with a nice "DSL" of sort for example).


I have a significant C++20 app on zephyr (an RTOS), and it compiles to 65k on zephyr on an ARM board, and, with stripped/lto/etc to about 300k on ARM desktop (debug binaries are much larger, so it's not that). The only difference in code between the two (impressively for zephyr, IMHO) is some small GPIO/device abstractions to account for zephyr vs linux[1]. None of those take up any meaningful amount of code.

It all compiles nearly instantly. So you can have large apps that work fine in that space and time.

I haven't debugged the differences in compile options, etc. I suspect it is related to constant data handling differences (they both have the same RTTI, exceptions settings. They both use the same GCC version). But IMHO there can be very wide variation in the size of literally the same code.

In the case of arduino, they don't provide you anything that could be used to flamegraph it, but i suspect it's just recompiling a significant part of mbed each time or something.

The non-Mbed based ones are faster to compile for sure.

[1] The one thing Zephyr does not yet support is std::thread/std::mutex, but it's really easy to make it work in your app because the build system functions properly, so i did and sent them patches as an example. They are working on proper support in the toolchain. Just need to rebuild it with some different config flags and twiddle a few files. MBed fully supports std::thread/etc if i remember right.


Templates on their own aren't that slow, what is slow is doing crazy meta-programming tricks with them at compile time all over the place.


From my experience about 7 years ago, it was 10-100x faster under Linux (minutes compared to seconds), even though the Windows machine was way more powerful. Maybe file accesses are slowed down by something like an antivirus?


It's horrible. After futzing with it for a year or two for trivial test rig and automation stuff I switched to avr-gcc and avr-libc toolchains and just used vim and makefiles now.


Unfortunately yes. I ran a workshop with a group of students learning about digital electronics. They all installed the IDE and it was pretty much unusable except for on the faster laptops. The RP2040 was particularly bad, but the Mega*8 was a bit better. The problem seemed to be continual project indexing and no caching. It was also very difficult to see progress so often you'd hit upload and wait for tens of seconds before figuring out if anything had compiled or uploaded.

This is absolutely an Arduino problem. avr-gcc for a small program often compiles faster than the time it takes to upload with avrdude. And the IDE uses both underneath. Or compared to Atmel Studio, which is surprisingly not bad.


What kind of laptops are y'all using? My daily driver laptop is 7 years old and it compiles arduino stuff (uno) in like a couple of seconds.


Lots of people swear by PlatformIO on VSCode, and that's totally fine. But if you're the kind of programmer that just wants "notepad, but with an 'upload' button" the Arduino IDE is hard to beat.


Why would anyone want that though? Masochistic challenge? "If you're the kind of person who likes to wash their clothes by hand..."


I like Arduino IDE as kind of a living reminder of "how the other half lives". I'm sitting here with Tinygo and my J-Link pushing several revisions of my code per minute (not to mention fucking goroutines and channels on an ARM M0 core), and other people are fiddling for hours trying to get Arduino IDE to compile code for 45 minutes only to be told COM69 is no longer connected (because Windows decided that it's now COM123).

I really think that professional software engineers are trolling "normal people" with stuff like this. Oh, you want to be a programmer? Jump through these 8 million flaming hoops suspended over man-eating sharks, and you'll see just how hard it is to make an LED blink. After failing, you will dedicate a new national holiday to our sacrifices; we do this for a living and you should be grateful that literal human garbage like you are even allowed to THINK about monitoring the water level of your potted plants. But behind the scenes, we don't do this for a living. When we press TAB, our IDE knows exactly which level to indent the text too. When we want to reflash our microcontroller, it does a diff of the last binary we pushed and updates only the 3 flash cells that actually changed and updates it in microseconds. When we want the documentation for some library function, it pops up in a web browser hovering above our cursor. Our life is nothing like this. We just use our skills to give you tools to make you think programming sucks.

It's all a scam.


I definitely agree. Arduino was good back in 2009 when professional alternatives were expensive and complicated, but it basically didn't change at all until now. And they've only really fixed the IDE. The rest of it is still terrible. Awful API, badly written libraries, everything done over an (emulated!) serial port.

It's like the legal system where emails are converted to fax when sent and then back to email when received.

That said, I think Mbed should have eaten Arduino's lunch but they kept making loads of different terrible build systems, and there are still a load of old boards available that need firmware updates to work properly. I have a couple of K22F's that have been bricked just by plugging them into a Windows machine. Never happened with Arduino.

So yeah, Arduino have sat still at the "it's rubbish but it works pretty reliably" stage while Mbed has failed to get beyond "it's great... when it works".


So yes a masochistic challenge then?


Because having thirty billion integrations and automations, toggles and etc that a new user may mess up is overwhelming for a newcomer. Arduino IDE serves great as a plug-and-play introduction to microcontrollers, allowing people to learn what they're doing before figuring out what the billions of automation tools are and how to tame them. It's the same reason python still has IDLE, it's just notepad with a run button, because it's all you need when you first start getting to grips with everything.


I don't think syntax highlighting and autocomplete and live error squiggles and tooltip help make things harder for beginners. The optimum beginner experience definitely isn't Eclipse, but it also definitely isn't Notepad!


VSCode is kind of bloated + really bad if you like to exclusively use keyboard control rather than "mouse sometimes", as things lose focus easily when notifications and other things gets focus and then it doesn't drop focus back where you were.

Not every tool is for everyone, and that's fine :)


Interesting I found platform.io and a like a Makefile approach so I can continue using vim… but it’s a little frustrating when the esp32 s3 came out and support lagged behind… maybe I should use the more native approach for these or maybe just use the IDE… I just can’t bring myself to learn a user interface that will not be the same in 10 years… vim and bash have not really changed in 20 years …


Yeah, I'm the same way. I battle build systems, cross compilers and version control all day for work. I have specific company owned laptops set up for all that. When I just want to mess around with a microcontroller, I fire up the Arduino IDE, and use Google drive for versioning...


This is the problem with vscode that I'm sure many are experiencing. I hope they add easier way to manage and run multiple profiles of the IDE.


I do have set up different workspaces for different development tasks where only the necessary plugins are activated. If I do embedded development I open my platformio.workspace, if I'm doing Java I have a workspace and if I'm doing JS/Frontend stuff I have a workspace as well as for LaTeX. It really works well and isn't really difficult (although I'm not really sure that workspaces should be used for this)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: