your advice is excellent for makers and hackers, but if you're building a product, arduino/raspberry pi is far too expensive
But I wouldn't go recommend Atmega328 for new designs unless its extremely simple, so when I say "Arduino" I mean something similar, like a Teensy 3+ or Olimex STM32 or Adafruit Feather M0