Author Topic: Why Arduino users so agressive?  (Read 47679 times)

0 Members and 1 Guest are viewing this topic.

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3143
  • Country: ca
Re: Why Arduino users so agressive?
« Reply #300 on: August 27, 2019, 03:53:42 pm »
The use of libraries ... would be a prime example of Isaac Newton's famous remark "If I have seen further it is by standing on the shoulders of Giants".

You're confusing Engineering for Science. Newton was a scientists, who discovered laws of physics which existed before him. He just managed to see them. Similarly, a person who invented a wheel discovered that you need less effort to roll things than to drag them. For sure, he didn't create the principle. The principle existed before him. Then he used the newly discovered to create his first wheel. That's what engineers do - they do not discover laws of physics, they use them do design things. Over the centuries, they engineered lots of stuff based on the wheel principle - ball bearings, conveyors etc.

Once the principle is known, you cannot discover it again. You cannot discover Newton's laws because they're already discovered, and you cannot re-invent the wheel. However, you can engineer all sorts of mechanisms which use laws of physics discovered by others.

If you build something, you use a wheel which fits your goals. If you build a tricycle, you buy a tricycle wheel. If you build a Ferrari, you buy a Ferrari wheel. If you're not satisfied with any previously designed wheel, you design your own. Sure, there will be lots of people who yank your sleeve and convince you not to re-invent the wheel. But if these people were listened to, we would still use the same primordial wooden wheels instead of huge variety of wheels you see around you now. Fortunately, there always were (and hopefully will be) people who design new wheels, and all of them use the same old principle which was used by the original wheel inventor. How wonderful.
 
The following users thanked this post: SiliconWizard, techman-001

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14447
  • Country: fr
Re: Why Arduino users so agressive?
« Reply #301 on: August 27, 2019, 04:33:23 pm »
Good points.

The famous "don't reinvent the wheel" can be as reasonable as it can be utterly misleading.

Using something not quite adapted to your requirements just because it already exists is not always the smartest thing to do engineering-wise.

As I already said, whatever solution you choose, make sure you do it for a reason, not just out of sheer luck or lazyness. And if possible, make sure this is a good reason. There are often more bad reasons to do something that there are good reasons.

We can illustrate this with even very simple examples, that may be too simple to even be considered, at first glance, as a good reason to "reinvent the wheel".
Let's take an apparently very simple and mundane thing: a sorting function. Let's suppose you're developing code for a small embedded target. Now there are thousands of existing code to be found on the Internet, and more obviously the well-known 'qsort' function from the C Std library. So it would be easy to think that rewriting such a function for your project is completely stupid and insane. With that in mind, you'll be tempted to use qsort. Sounds good, except that 1/ there's a good chance it's been implemented as a recursive function - something that you may not want depending on the coding rules you use -  and 2/ depending on typical size of the arrays you need to sort, there's a chance it will take more time to execute than a simple, hand-written function with any O(n²) algorithm... finally 3/ if you need to port your code to another target, the function in question may not be available (probably little chance of that for qsort(), but very possible in many other cases). Now you may be convinced of that, and choose not to use qsort(), but may be thinking: let's not reinvent the wheel, and just pick up a random function doing this you just found on a random blog. It may be completely buggy and ruin your project, or at least make you waste hours debugging, whereas writing that yourself could have taken you just a few minutes.

So as always, thinking before doing is not necessarily the best approach for all areas of life, but it's certainly a reasonable one for engineering tasks.
« Last Edit: August 27, 2019, 04:35:43 pm by SiliconWizard »
 
The following users thanked this post: techman-001

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: Why Arduino users so agressive?
« Reply #302 on: August 27, 2019, 04:48:43 pm »
I held off replying to this thread, as I saw it spin off to other topics.  But in a naive attempt to get it back on track, and for my own curiosity, what do people consider to be an "Arduino" ?

I mean, I often use the Atmega series for work, sometimes with USB-serial converters, and for convenience, the Arduino bootloader.  Does that count?  What if one uses the IDE but none of the built in libraries?  Or... the hardware, but Atmel studio writing bare metal?  If I used an Atmega328, at 16MHz, wrote the code in the Arduino IDE, would that count?

My point is, it seems some have very strong views on how problems/projects should be solved/completed, and some appear to be vehemently against anything Arduino, I suspect possibly because some of the libraries aren't great (whoever claimed they were?). 

But what exactly are these prejudices about?  Is it
1) The use of libraries
2) the hardware abstraction, or is it the hardware?
3) the fact that it is a handy, cheap, and useful platform for Artists and non-electronic engineers to blink some LED's for a larger project? 
4) Or is it that some feel those who are fully capable of writing their own  libraries shouldn't be using existing libraries?   

Unless we have a nice clear definition of what using an Arduino is about, people could be arguing about different points.

Seriously, I'm curious.  Also, just to add another data point - I haven't noticed Arduino "users" to be any more aggressive than any other area of engineering.  It seems to be more related to age than anything else.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14447
  • Country: fr
Re: Why Arduino users so agressive?
« Reply #303 on: August 27, 2019, 04:55:00 pm »
Also, just to add another data point - I haven't noticed Arduino "users" to be any more aggressive than any other area of engineering.  It seems to be more related to age than anything else.

Just a quick thought about this: people can be vehement when "promoting" a solution they use and think is great, but aggressiveness usually manifests itself when people feel attacked. Two different things.

 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Why Arduino users so agressive?
« Reply #304 on: August 27, 2019, 06:47:17 pm »

I mean, I often use the Atmega series for work, sometimes with USB-serial converters, and for convenience, the Arduino bootloader.  Does that count?
Absolutely!
Quote
What if one uses the IDE but none of the built in libraries?
Close enough!  Just having the IDE installed is enough to condemn all future work.  On any chip!
Quote
Or... the hardware, but Atmel studio writing bare metal?  If I used an Atmega328, at 16MHz, wrote the code in the Arduino IDE, would that count?
Again, this would absolutely count!

Now, there's no rhyme or reason for my answers above but, as this thread is completely off the rails in terms of rationality, why add any at this late stage.
Quote

My point is, it seems some have very strong views on how problems/projects should be solved/completed, and some appear to be vehemently against anything Arduino, I suspect possibly because some of the libraries aren't great (whoever claimed they were?). 

But what exactly are these prejudices about?  Is it
1) The use of libraries
2) the hardware abstraction, or is it the hardware?
3) the fact that it is a handy, cheap, and useful platform for Artists and non-electronic engineers to blink some LED's for a larger project? 
4) Or is it that some feel those who are fully capable of writing their own  libraries shouldn't be using existing libraries?
[/quote[ 

Unless we have a nice clear definition of what using an Arduino is about, people could be arguing about different points.

Seriously, I'm curious.  Also, just to add another data point - I haven't noticed Arduino "users" to be any more aggressive than any other area of engineering.  It seems to be more related to age than anything else.

The complaint against libraries, in general, can't be justified unless one is willing to write in assembly language or rewrite the C library.  Libraries are libraries, if you don't like Arduino libraries because they may not be 'perfect', how do you know the C library works under all conditions?  After all, AVR Libc is just a derivative of glibc...  Libraries are built on other libraries, how far down do the complainers want to condemn?

The complaint that the libraries are suboptimal because they are written by amateurs doesn't stand up well when you consider that ALL open source software is written by amateurs, for amateurs.  If it was professional code, it would cost money!  Lots and lots of money.  You wouldn't use 'open source' software for any life safety applications, right?  Not GCC, certainly not glibc and absolutely not the Arduino libraries.  Right?  You would buy professional software, right?  You would want a guarantee, right?  Well, if you want a guarantee, buy a toaster!

A few pages back I was talking about my experience with a library for the AD9833 Waveform Generator and how I could drop it into the IDE, compile the example and get a waveform.  In about 5 minutes.  Now, true, I would have to sort out the pins on the Arduino and the pins on the demo board but that's pretty straight forward and applies to ALL SPI peripherals so there are a lot of examples.

Then I rewrote the code from scratch.  Trust me, it took a lot longer than 5 minutes and is nowhere near as general or 'API like'.  My code rmeets a specific requirement and is clearly not 'general purpose'.  More to the point, I had to spend time figuring out which of the 4 CPOL/CPHA attributes matched the device and then I had to figure out what the Arduino SPISettings() function calls them.  Of course I also had to verify that my Clk speed wasn't too fast for the part.  Datasheet kinds of things that aren't necessary when using the library.  They are already dealt with.

Now, given somebody who is new to uC and, particularly SPI, how are they supposed to know?  How do they, as an 'Artist', understand from the timing diagram that CPOL is high and CPHA is falling (SPI_MODE2).  The thing about the library is that they don't have to know.  It's already handled.  Just plug and play.

Earllier somebody pointed out that much of the whining is a result of the speed with which 'Artists' can accomplish their goals.  Everything that can be done with an Arduino has been done and the code is on the Internet.  Today, embedded programming at the more superficial level is available to everyone!

Then somebody wants to get clever and talk about multitasking.  What about multitasking?  Well, there's an Arduino library that uses FreeRTOS (yet another library, I'm afraid).

At the end of the day, the complainers are talking out of their ***.  The platform works, the platform is popular because it works and I can buy a perfectly capable small CPU with USB interface for about $4 because it is popular.  It disturbs their view of their position in the hierarchy.  It's no longer necessary to spend years and years in college just to create a sine wave with an Arduino.  Anybody can do it!  Even really old guys, long retired and kickin' back.

And, no, the Arduino Uno is not the cure for world hunger.  I think we need a bigger chip.  Maybe the Mega 2560...

As a side issue, my incantation of the code is known to work on an Arduino Nano, Arduino Uno (both 8 bit CPUs) and the Teensy 4.0 (32 bit Cortex M7) with no changes.  It's about the library!  That's why I can choose from a number of chips and use the same source code.  That's a pretty powerful idea.

Sometimes the libraries are just the ticket to success.





« Last Edit: August 27, 2019, 06:58:49 pm by rstofer »
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: Why Arduino users so agressive?
« Reply #305 on: August 27, 2019, 07:13:18 pm »
Reminds me of a discussion with an assembly language programmer on a project years ago (where I was coding in a higher level language) -  "You're cheating!  Each single line in a program like that can execute THOUSANDS of assembly language instructions!!!!"

He never did accept that this could possibly be perceived as a benefit by anyone....  including completing your work quickly.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Why Arduino users so agressive?
« Reply #306 on: August 27, 2019, 07:18:34 pm »
And the first thing the assembler writers did was add macro capability to abstract the instruction set and become more 'high level'.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3143
  • Country: ca
Re: Why Arduino users so agressive?
« Reply #307 on: August 27, 2019, 07:26:44 pm »
... how do you know the C library works under all conditions?

You don't. You either avoid the library or you take the risk.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3143
  • Country: ca
Re: Why Arduino users so agressive?
« Reply #308 on: August 27, 2019, 07:31:46 pm »
And the first thing the assembler writers did was add macro capability to abstract the instruction set and become more 'high level'.

That's how C works. C looks a lot like macro-assembler. Traditionally, the output of the C compiler is the assembler source code. You can even insert assembler commands directly into your C code which go straight to the output.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Why Arduino users so agressive?
« Reply #309 on: August 27, 2019, 08:30:17 pm »
Reminds me of a discussion with an assembly language programmer on a project years ago (where I was coding in a higher level language) -  "You're cheating!  Each single line in a program like that can execute THOUSANDS of assembly language instructions!!!!"

He never did accept that this could possibly be perceived as a benefit by anyone....  including completing your work quickly.

I read an article many years ago that the average programmer could generate 100 lines of debugged/documented code per day.  I doubt that it has changed much - in terms of line count.

What has changed is how much work you can get done with 100 lines.
 

Offline maginnovision

  • Super Contributor
  • ***
  • Posts: 1963
  • Country: us
Re: Why Arduino users so agressive?
« Reply #310 on: August 27, 2019, 08:37:17 pm »
This isn't real work stuff but one good project I had for "Arduino" was making my daughter's play kitchen. Added lights sound and a small stereo to the thing. Took an hour to wire, program, and assemble some small boards for interfacing. Add an extra hour if you'd like to touch up on a couple libraries I used. Using a Teensy 3.5 made it very easy. The libraries made it very simple to play sounds from an SD card and interface with buttons and microswitches to activate different functions. Pairs with a meanwell 5VDC ac-dc power supply. Been plugged in for years with no issues and works every time.
 

Offline sokoloff

  • Super Contributor
  • ***
  • Posts: 1799
  • Country: us
Re: Why Arduino users so agressive?
« Reply #311 on: August 27, 2019, 08:55:36 pm »
And the first thing the assembler writers did was add macro capability to abstract the instruction set and become more 'high level'.
That's how C works. C looks a lot like macro-assembler. Traditionally, the output of the C compiler is the assembler source code. You can even insert assembler commands directly into your C code which go straight to the output.
I not infrequently refer to C as "portable assembly".
I generally mean high praise when I say that.
 

Offline KL27x

  • Super Contributor
  • ***
  • Posts: 4099
  • Country: us
Re: Why Arduino users so agressive?
« Reply #312 on: August 27, 2019, 09:36:09 pm »
Quote
I not infrequently refer to C as "portable assembly".
I generally mean high praise when I say that.
I wonder if people use C compiler just to primarily code in assembly, in some instances. Seems like the way you do defines and syntax of denoting register,bit and whatnot would remain consistent across all devices that are supported by that compiler. Rather than learning the quirks of syntax each individual assembler. E.g, with one assembler you might need to use a period, here, and the other a comma. Little things like that.

edit: In hindsight, defines are probably IDE-specific? But same idea, that a compiler that supports multiple IDE, the compiler would mask those things with another layer of abstraction that works across all of them.
« Last Edit: August 27, 2019, 09:45:45 pm by KL27x »
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: Why Arduino users so agressive?
« Reply #313 on: August 27, 2019, 09:49:12 pm »
I read an article many years ago that the average programmer could generate 100 lines of debugged/documented code per day.  I doubt that it has changed much - in terms of line count.

What has changed is how much work you can get done with 100 lines.

I seem to recall that the bar is only at 10 lines of documented, debugged code per day...   but the principle of your observation is true.  One line of VBA code can invoke an entire application...
 

Offline sokoloff

  • Super Contributor
  • ***
  • Posts: 1799
  • Country: us
Re: Why Arduino users so agressive?
« Reply #314 on: August 27, 2019, 10:01:10 pm »
“Measuring programming progress by lines of code is like measuring aircraft building progress by weight.”
― Bill Gates
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: Why Arduino users so agressive?
« Reply #315 on: August 27, 2019, 10:07:08 pm »

...so how many lbs of code did you produce today?  ;D
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Why Arduino users so agressive?
« Reply #316 on: August 27, 2019, 10:54:20 pm »
ALL open source software is written by amateurs, for amateurs. If it was professional code, it would cost money!  Lots and lots of money.  You wouldn't use 'open source' software for any life safety applications, right?  Not GCC, certainly not glibc and absolutely not the Arduino libraries.  Right?  You would buy professional software, right?  You would want a guarantee, right?  Well, if you want a guarantee, buy a toaster!

Talking about me, usually, the toolchain is Greenhills { C, C++, Ada } or Windriver DiabCC, with their libc, whistles, and bells.

This stuff costs a lot of money, and we also have to use crazy software like tools for the architecture analysis and design languages, whose licenses can cost around 50K euro per package, which is more than the double the cost for the toolchain (usually 5-10K euro) and for the RTOS (usually around 20K euro), but not so much if compared to the hardware, which costs much more money even because it has a lot of top requirements, and even debugging stuff costs a fortune since it has to be able to perform a lot of extra analysis such as the dynamic coverage -called- "realtime equivalent", which means down-clocking the CPU(1), but the most of FPGA and ASIC circuits, and especially the external simulators of the turbines and sensors, or whatever is "input and output", cannot be "too-much" down-clocked, and simulators cost around 100K euro each, and those for supersonic machines are even more expensive.

So ... definitely, the Open Source is all another planet :D


(1) PowerPC with its cache somehow forced to be constantly invalidated in order to avoid weird effects when extracting triplets for the analysis, and it's a lot of data to be moved fast and accurately.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Why Arduino users so agressive?
« Reply #317 on: August 27, 2019, 11:44:42 pm »
The complaint that the libraries are suboptimal because they are written by amateurs doesn't stand up well when you consider that ALL open source software is written by amateurs, for amateurs.

Reality is different:

"In the latest "Linux Kernel Development" report produced by the Linux foundation, the vast majority of the contributions to kernel development -- more than 80 percent -- are "demonstrably done by developers who are being paid for their work." Translation: The work is being done by programmers contributing to Linux in the service of some corporate paymaster, be it Red Hat, Intel, Suse, Samsung, or Oracle."

https://www.infoworld.com/article/2610207/who-writes-linux--corporations--more-than-ever.html

Quote
You wouldn't use 'open source' software for any life safety applications, right?

Also not quite true :)

"Arm, BMW Car IT GmbH, KUKA, Linutronix, and Toyota join ELISA project to advance open source functional safety across transportation, manufacturing, healthcare, and energy industries"

https://www.linuxfoundation.org/press-release/2019/02/the-linux-foundation-launches-elisa-project-enabling-linux-in-safety-critical-systems/
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: Why Arduino users so agressive?
« Reply #318 on: August 28, 2019, 12:43:22 am »

Open source benefits everyone in the computer industry...  the corporations know that, which is why they're contributing.
 
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: Why Arduino users so agressive?
« Reply #319 on: August 28, 2019, 12:52:27 am »
"Arm, BMW Car IT GmbH, KUKA, Linutronix, and Toyota join ELISA project to advance open source functional safety across transportation, manufacturing, healthcare, and energy industries"

https://www.linuxfoundation.org/press-release/2019/02/the-linux-foundation-launches-elisa-project-enabling-linux-in-safety-critical-systems/

I suspect there will be a lot of changes for this project.  I can't see any way in the world that life safety applications want to run on a kernel with 17 million lines of code.  At a minimum, I suspect they will toss many of the drivers as they contribute over half to the line count.

I haven't followed RT Linux but if Linux is to be industrialized, it absolutely must support realtime operation.

And, of course, the reason that corporations are contributing is that they use the kernel in cell phones and that's a pretty big business.  Canonical, distributor of Ubuntu, contributes almost nothing, according to the article.
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: Why Arduino users so agressive?
« Reply #320 on: August 28, 2019, 01:19:29 am »

There's safety in numbers.  E.g. if a corp uses the same base software as other manufacturers for their self driving car, they are following "industry best practices" and are in a perceived (and probably actual) lower risk situation compared to the "maverick" corporation that does everything their own way (Tesla, we're looking at you).  This also relates somewhat to the need for a sizeable ecosystem of producers and consumers - if too small, the zoo collapses (Blackberry and Windows Phone, we are looking at you).   Open source goes a long way towards alleviating both these concerns.
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4414
  • Country: dk
Re: Why Arduino users so agressive?
« Reply #321 on: August 28, 2019, 01:22:21 am »
"Arm, BMW Car IT GmbH, KUKA, Linutronix, and Toyota join ELISA project to advance open source functional safety across transportation, manufacturing, healthcare, and energy industries"

https://www.linuxfoundation.org/press-release/2019/02/the-linux-foundation-launches-elisa-project-enabling-linux-in-safety-critical-systems/

I suspect there will be a lot of changes for this project.  I can't see any way in the world that life safety applications want to run on a kernel with 17 million lines of code.  At a minimum, I suspect they will toss many of the drivers as they contribute over half to the line count.

I haven't followed RT Linux but if Linux is to be industrialized, it absolutely must support realtime operation.

And, of course, the reason that corporations are contributing is that they use the kernel in cell phones and that's a pretty big business.  Canonical, distributor of Ubuntu, contributes almost nothing, according to the article.

afaik Tormachs PathPilot is linuxcnc running on linux with realtime 


 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Why Arduino users so agressive?
« Reply #322 on: August 28, 2019, 01:55:44 am »
Quote
The complaint that the libraries are suboptimal because they are written by amateurs doesn't stand up well when you consider that ALL open source software is written by amateurs, for amateurs.
Meh.  The non-open-source libraries written by supposed professionals seem to be sub-optimal as well.  "Everyone" agrees that STMCube, Atmel ASF, TI's Tivaware, and etc, all are pretty awful.  Buggy, bloated, slow, poorly written, and difficult to read (remembering that "not open-source" does not mean that you can't look at the source.)

Quote
ALL open source software is written by amateurs, for amateurs.
and I don't agree that that's true...

(Hey, you get a choice: vendor libraries written by interns, university code written by ivory tower purists, OSSW written by amateurs, abandoned libraries written by professionals and released as OSSW when the company went broke, or would-be "professional" code written by companies that haven't gone broke or been acquired yet, which turns out to be "Two Guys and a Vax" or similar.  Or I guess you could write it all yourself.)

 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Why Arduino users so agressive?
« Reply #323 on: August 28, 2019, 08:58:28 am »
It seems that MISRA is claiming that C and C++ are unsafe in the context of embedded systems?

Oh, well ... talking about what I do in avionics and military avionics for a living, the real problem is not *the programming language* but rather the life-cycle of a product, which has several serious problems with team-working, and Misra-C for C and Spark for Ada are the best-fit for being compliant to D0178/B, which is the only way to keep things under control (and in-budget) in large teams of people with inhomogenous skills.

If you develop something that the testing-squad is not able to test ... the team has a problem, the QA has a problem, and even lawyers have a problem.

Guys in the QA group uses their AADL language to address common problems in the development of products for mission- and safety-critical systems, such as avionics systems in aircraft systems, and I can assure you that AADL is neither C, Ada, nor Matlab or Forth, it's a purely symbolic language (a thing for scientists, specifically for mathematicians) which aims for addressing problems such as mismatched assumptions about the physical system, computer hardware, software, and their interactions that can result in system problems detected too late in the development lifecycle.

This is usually the reason why they give us orders and restrictions such as being strictly compliant to MisraC and SparkAda: because from their point of view, and considering devs and testers, and the whole team in the product lifecycle, well the not being compliant creates an increasingly-unaffordable and potentially dangerous situation for developers and users of mission- and safety-critical technologies.
 
The following users thanked this post: KL27x, SilverSolder, techman-001

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Why Arduino users so agressive?
« Reply #324 on: August 28, 2019, 08:59:28 am »
Maybe they should use Forth like NASA ?

If you can elaborate a solid plan and a framework which allows the analysis of system designs *prior* to development, and *if* this does support an architecture-centric, model-based development approach throughout the system lifecycle, and if *Forth* can find its place in this making things better ... 

... then -YES- you have a solid chance to convince AADL-guys to approve Forth :D
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf