Embedded Programming in decline

I hate you. I hate debugging scripts written in a write only language like perl.... dude just use python. :)
Trust me... I'm having to learn python now. I'm a die-hard tabs vs spaces guy, so just that bit is annoying... But WHO is the person that decided, "hey, let's control logic flow based on indentation!"?

But that's ok, I just setup vim to make tab stops at 2 and auto-expand tabs to spaces. ;)

The last year I'm fully engaged in automated provisioning and deployment into Azure with Ansible. We are moving to a CI/CD model of Infrastructure as Code and I'm busily automating clustered SAP on Linux deployments.

Ansible is built with python and so writing extension modules is usually done in Python, so yeah... I've now written a few.

But back to Perl: it doesn't have to be unreadable... It's just that it's so flexible that when you are advanced you can consolidate something that might take 10-20 lines of code in another language down to 1 or 2 lines. But later having to unravel that logic can be, uh, fun?

I've definitely written things that were super concise and really rather crafty (if I do say so myself) only to re-write them so they would be easier to digest later if needed.
 
Going back to embedded systems programming, you need very special skills to understand hardware restrictions and possibilities and tweak out the Nth degree of performance

I would say you need those skills regardless of embedded or not. Most of that talent pool has been gobbled up by the Big 6 - Apple, Amazon, Facebook, Microsoft, Google and Netflix - for good reason - look at the salary data :)

...out from closed and tight systems and also make the code bullet-proof. And handle memory constraints and take care of memory allocations/frees -can't rely on garbage collection exactly. Most embedded systems have their own realtime OS as well so it' not exactly Linux.

These days embedded products is a mixture of RTOS + linux, cheaper ones just RTOS. freeRTOS is gaining popularity and it's actually quite sensible.

You need to code in C and assembly. Add DSP knowledge on top of this and suddenly the hiring pool is very small.
Indeed and add C++ to that too. I've actually coded embedded systems with C++17 now, and arm bare metal gcc based toolchains (using proprietary RTOS, freeRTOS as well and Linux based). It's miles ahead of doing it in C. And for assembly I just do inline assembly on the rare cases where you need it - let the compiler deal with the glue on saving/restoring/allocating registers, etc.
 
Trust me... I'm having to learn python now. I'm a die-hard tabs vs spaces guy, so just that bit is annoying... But WHO is the person that decided, "hey, let's control logic flow based on indentation!"?
You've never seen a codebase where clearly there was many styles from different people and a mix of tab and spaces just looks dumb? :) I think Guido encountered just that a few times before starting python :)

But that's ok, I just setup vim to make tab stops at 2 and auto-expand tabs to spaces. ;)
Officially yeah they prefer spaces, but as long as you keep it consistent (i.e. all tabs, or all spaces - with a consistent number of tabs or spaces for indentation) python won't complain.
 
You've never seen a codebase where clearly there was many styles from different people and a mix of tab and spaces just looks dumb? :) I think Guido encountered just that a few times before starting python :)
Oh, I have... But almost everything I've worked on is scripting languages and mostly not large projects or large numbers of contributors.

And I've been able to be the final code reviewer for the environment I work, so I enforce consistency.

Same thing with block styles using the K&R style vs POSIX style, etc...

Most of what we do (actually, did, as I'm in a new position now) is actually shell scripts (primarily ksh, as it's most portable across *nix systems)... Same kind of deal.

Officially yeah they prefer spaces, but as long as you keep it consistent (i.e. all tabs, or all spaces - with a consistent number of tabs or spaces for indentation) python won't complain.

True... But since spaces are the preference, and I may have to edit the code of others, I figured I should just assimilate now :)
 
Tabs are the devil.

Hehe yes they are :)

Bill Gates said he used tabs back in the day on a recent reddit AMA
The Linux kernel uses them too - 8-space TABS at that....

Now I always configure my editor to insert spaces on a TAB Key press, it's not like I go around pressing the spacebar multiple times like this:
 
Tabs are the devil.
Them's fightin' words!

Seriously, though, I never understood a preference for MORE typing.

I can set my editor to display tabs of any width I chose and I get 1 indent with 1 key press. And I can widen or narrow that by only changing an editor setting at any time without changing my files.

But I don't want any holy war debates...
 
Bill Gates said he used tabs back in the day on a recent reddit AMA
The Linux kernel uses them too - 8-space TABS at that....
Tabs are as wide as you set them in your editor... Don't want them to be 8 simply change the tabstop.
Now I always configure my editor to insert spaces on a TAB Key press
That's what I'm doing with python and ansible.

Fortunately vim allows this stuff to be pretty easy.
 
I would rather live in a world with Typescript than without... calling it "laughable" is hyperbolic. Until WebAssembly gains traction we're stuck transpiling to JS and Typescript is pretty clearly the best choice insofar as it manages to hide most of the ugliness while still exposing the target language for the times where it's necessary.

This is one of the reasons it is laughable. I've watched webdevs have to straddle that line and end up with a hodge podge of code because Typescript is just a crappy derivative of Jscript. And the incompatibility between versions means either reworking code each release or dealing with the mystery bugs that crop up.

I've no idea how you can feel justified trashing Typescript then suggesting a language that doesn't have proper first-class functions or reified generics with a gigantic bloated de-facto framework (Spring). I know Python has its fans but in my book a language that's dynamically-typed, has no access modifiers and sports weird name-mangling means it's more suitable for scripting than heavyweight app development.

Python is bizarre for plenty of reasons. I dislike the spacing-for-flow control thing. But it has things like class hierarchies, with/using construct, type information, static/class/instance scoping, etc. To be honest, I've only recently learned Python because it is the language of choice for lots of EE tool chains that we work with. I don't really like it a lot but it's definitely less gross than writing any flavor of Jscript.

My favorite language these days is C#. It really is quite elegant and a lot easier to write robust and maintainable code that performs fairly well. When it comes to performance, C/C++ is still king unless you want to write a lot of assembler.
 
Hehe yes they are :)

Bill Gates said he used tabs back in the day on a recent reddit AMA
The Linux kernel uses them too - 8-space TABS at that....

Now I always configure my editor to insert spaces on a TAB Key press, it's not like I go around pressing the spacebar multiple times like this:

OMG... That video made me laugh!

That's my tabs argument right there!

Except I'm vim over emacs... But I tried to avoid that other holy war topic :D
 
My favorite language these days is C#. It really is quite elegant and a lot easier to write robust and maintainable code that performs fairly well. When it comes to performance, C/C++ is still king unless you want to write a lot of assembler.
Go has quickly won me over. Fantastic language with killer perfomance.
 
VSCode is available for Linux so you can have decent editor now :p
I've used it a bit on Windows, but I've got 25+ years of power vi editing experience so I'd rather spend my "learning" time on new languages and not a new editor.

If I didn't, I would probably use VSCode as that's the currently recommended tool where I work.
 
VSCode is available for Linux so you can have decent editor now :p

You mean the editor written in electron, the framework that takes Javascript to even more ridiculous levels - i.e a desktop app? :)
VSCode is actually pretty nifty though my tools of choice these days are from the JetBrains family, CLion for C++, Pycharm for python, GoLand for go.
 
Have you not watched that series? Holy shit dude. You can't live and work here in high tech and not watch that show. Hits waaaaaaaaay close to home.


Funny thing is I watched a show called Betas before Silicon Valley came out... And when I tried watching SV, it felt like a rip-off.

I should watch it... Maybe I'll give it another chance because I know a lot of people like it.
 
Back
Top Bottom