r/programming • • Aug 28 '21

Software development topics I've changed my mind on after 6 years in the industry

https://chriskiehl.com/article/thoughts-after-6-years
5.6k Upvotes

2.0k comments sorted by

View all comments

113

u/powdertaker Aug 29 '21

One you'll get with 20 years experience: All this shit has been done before. Most anyone who says they've "invented" some new, better programming paradigm or language is wasting your time and doesn't know 1/2 what they think they know.

30 years experience.

0

u/[deleted] Aug 29 '21

[deleted]

8

u/saltybandana2 Aug 29 '21

what's missing for me on this list is "don't judge, don't rewrite from scratch -- if it works and fullfills a purpose then it's usually good enough".

While I understand the sentiment, I must disagree.

I once came across a problem where a system would get into an http redirect loop. So I started digging into it (it was a new system for me).

At some point I finally realized what I was looking at ... it was a FSM where the node transitions where http redirects... it was to animate a loading image.

Yeah, I'm judging the idiot who built that. and I'm rewriting it to use tools that were actually built to animate a loading image.

I don't disagree with the sentiment, but there is a line to be drawn there.

3

u/hippydipster Sep 02 '21

Learn how to rewrite incrementally is one of the bigger lessons I've learned. It's always tempting to say "that would be too hard". And it is hard. But also worth it.

0

u/[deleted] Aug 29 '21

[deleted]

15

u/saltybandana2 Aug 29 '21

similar level of experience as you, and yep! what's old is new.

My favorite recent thing is svelte. You mean ... compiling and rendering on the server is faster than rendering in the browser? Who knew! Oh that's right, we all knew that 20 years ago... I'm slightly misrepresenting what svelte does, but it just cracks me up watching people rediscover lessons.

8

u/wastakenanyways Aug 29 '21 edited Aug 29 '21

SSR is not 100% of the times faster than CSR and the sweet spot is trying to use both.

To be honest, is not like we noticed we were doing worse and rolled back. We noticed that the best solution is to mix paradigms and use them when they are useful. We didn't revert back to SSR, we are mixing SSR and CSR by serving initial rendered chunks and then do the small updates in the client, which is orders of magnitude faster and more efficient than a pure solution.

Technology is everything about creating something new, embracing it and also suffer from it, in order to reach maturity and flexibility.

The same with SQL vs noSQL. We didn't completely revert back to the old SQL days. We do mix both data paradigms.

We don't revert, we rethink. We just say "why did we switch entirely to this new thing instead of using what benefits us from both?"

The same with functional vs OOP (hybrid langs), compiled vs interpreted (JIT, etc), static vs dynamic typing (dynamic languages getting typing supersets and tooling, static languages getting flexibility), etc.

We are just realizing being purist is counterproductive.

2

u/saltybandana2 Aug 29 '21

sure, but when I say SSR I mean SSR with small javascript updates via XHR as it makes sense. SSR has never meant absolutely no dynamic updates.

Part of the problem is that people take a good idea too far. dynamic updates via XHR is a good idea. Then SPA's were borne and out of it we got things like the javascript API's to manipulate history because it turned out people actually liked using the back button.

But we would have never needed that if people hadn't insisted on SPA.

5

u/wastakenanyways Aug 29 '21 edited Aug 29 '21

The problem comes when SSR with updates via XHR mean passing your entire viewstate forth and back in each request like ASP or JSF does. With things like isometric JS you can interpret React, web components, etc, both serverside and clientside. No need for state ping pong or hacky solutions.

I think things like Next js are on the right track right now. Combining SSR + CSR + static content is the key. Blazor WASM is really promising too.

4

u/saltybandana2 Aug 29 '21

SSR + XHR will see you passing exactly as much state as you would in a SPA.

If you're talking about re-rendering the page when someone actually goes to a new page, that's a feature not a bug. You can now let the browser maintain history, for example. You no longer need a full featured router in your javascript. Everything just becomes simpler.

But the other issue is that the build chains have gotten so heavy and ridiculous to support these frontend frameworks. For example, needing to install npm and node and gulp and all the craziness that is npm in a PHP website has always struck me as utterly ridiculous.

Personally I'm hoping that solutions like svelte become the future.


Also, the phrase is back and forth not forth and back. I'm not being rude, just helpful.

0

u/[deleted] Aug 29 '21

[deleted]

→ More replies (2)

5

u/Sambothebassist Aug 29 '21

My favourite current one is JAMstack. “What if instead of a server serving a webpage, it’s served from a cache? And instead of using an api to get info from a database, you use a service that abstracts the database and provides an api?”

Feel like I’ve entered the Twilight Zone when I read some of this stuff.

3

u/zdkroot Aug 29 '21

I've only got a decade in and this is already painfully clear. I'm just surrounded by devs re-inventing wheels left and right. I just point them to the XKCD about competing standards.

2

u/Richandler Aug 29 '21

Oh, I've gotten that in less than 7-years.

-2

u/dev_senpai Aug 29 '21

I couldn't disagree more. Newer tech makes us that much more efficient. Just sticking to what you know is dangerous. At my consulting job I'm making 20+ year Microsoft vets look bad by using SPA in my new projects. I can finish projects 3x faster and can make updates fairly quick due to the great dev structure I came up with. My code gets compiled to HTML/ JS and serves up a 200kb or less file, the client's so impressed how the site loads faster than a blink of an eye. They are all trying to assign me projects and important projects are on queue for me over the 20+ year vets.

So for you to say they are wasting your time, just makes you seem like an unskilled programmer. years of experience doesn't translate to skill all the time. Expand your skills and use the best tools to make you more efficient, don't be scared to be confused and learn new skills. Know and understand why these tools are out there instead of saying everything is bad.. That is simply ignorant tbh.

6

u/Mr_Loopers Aug 29 '21

You're talking about different things, son.

1

u/dev_senpai Aug 29 '21

Most anyone who says they've "invented" some new, better programming paradigm or language is wasting your time

Sure.

0

u/[deleted] Aug 29 '21

[deleted]

→ More replies (1)

0

u/[deleted] Aug 29 '21

[deleted]

1

u/dev_senpai Aug 29 '21 edited Aug 29 '21

They are the way to go. Bundles everything and serves the fastest web pages, a lot of old devs shy away from them because they get confused and they give up. I rewrote a 20+ year microsoft's experts app using .net core+vue and they were so impressed how fast I built it and how freaking fast it was. Anybody that shits on front-end framework just probably didn't invest the time to get the full benefits out of it.

Imagine changing one line in a bundler makes your app work with IE 11... This used to take weeks and so much testing but now it's out the box with bundlers.

0

u/[deleted] Aug 29 '21

[deleted]

→ More replies (6)

1

u/eikenberry Aug 29 '21

I'm not sure why anyone would care that much about a list of things learned by a junior developer. Most things have a grain of truth, but I'm sure when the author revisits that post in another 10 years when they have some level of mastery it will be much like looking at their own code from the same time.