There are however some advantages to an academic job: somewhat more flexible schedule (not when you're teaching), relative freedom to engage in whatever research you wish, no need to sit in front of a computer screen all day, job security.
There are however some advantages to an academic job: somewhat more flexible schedule (not when you're teaching), relative freedom to engage in whatever research you wish, no need to sit in front of a computer screen all day, job security.
On the other hand, there's a lot that's more inflexible than in a SWE job: lecture times, university-dictated exam times (at night! I had to sleeptrain my toddler to make them), staff meeting times (hard to find a time that works for a staff of 50-100).
So yeah- more flexible in some ways, less flexible in others, it depends what sort of flexibility you're looking for.
Congratulations for trying out lecturing and for the eloquent writeup.
P.S. Btw, I've stumbled upon your website https://www.recursionvisualizer.com/, which even works with memoized functions (in what seems to be a left-to-right call-by-value order), so I will be using this the next time I'm teaching dynamic programming or backtracking, in order to save time on drawing calls by hand on the board.
Pamela already addressed the inflexibility part. And I'll just echo that I find it worse than how she described. But I've probably over-committed myself, too. Engaging in research-like stuff is very fun, but it is often unpaid for someone who is a lecturer.
As for job security: Non-Tenured folks (like the OP) get relatively short term contracts. And it's easy for the University to not renew them, especially when there are budget constraints. Sure, I never had a contract like this as SWE and I could have been fired before my 1-2 years were up, but my job there felt much more secure. I knew my manager and how the company was doing. In contrast, while I'm friends with everyone - I don't yet have security that I'll be returning in the Fall, even though my name is on the schedule.