Hacker News new | ask | show | jobs
by sunir 566 days ago
Guard conditions, assertions, constraints and tests are dynamic limits on code and are critical to maintain quality despite code rot and drift from changes.

Static constraints like types can also be also good, where types are good.

I applaud anyone who advocates to focus on the unhappy path over the happy path.

On a side note 25 years ago was the end of the dot.com and the height of the y2k scam and I have never seen developers more burnt out than then; but that’s because I was just starting my career then. I don’t know about previous eras like the 89 crash and recession.

I am not sure why the OP has rose coloured glasses of the past. But it’s always good to treat history with a little more interest.

1 comments

I put coloured glasses on the past because back then companies didn't request developers to know more than one programming language. They just used fancy words for simple tasks.
Yes they did. My dad worked in IBM 360 assembler. And in COBOL. And in Natural (yes that's actually a programming language - https://documentation.softwareag.com/natural/nat426mf/pg/pg-...) And JCL. And I am probably forgetting some. And they had learn their "Hibernate" and JPA etc too (CICS comes to mind).

Also in a similar regard your article mentions other things like microservices being the root of all evil so to speak and you need to know multiple services.

When in fact microservices are meant to do the opposite. You are supposed to be able to focus on just your service and what it needs to do and make it do it well. Instead of having to wade through a huge monolithic and probably very interwoven code base. We can of course talk about whether microservices achieved that goal.

They are not fundamentally different from having worked in large enterprises 25 years ago where you would've encountered many many different services making up your application landscape. It was probably using SOA and the services were deployed to a bunch of application servers like an IBM WebSphere and those services might be talking to other services incidentally deployed on some JBoss app servers and they'd talk via message passing via a queue (JMS comes to mind but other ways existed).

Did your Dad worked on IBM 360 assembler, COBOL, Natural and JCL on the same day?

today fullstack developers have to pivot between 2-3 languages on the same day

All the SOA back then was JAVA, they had just different types of HTTP servers to run JAVA

All four probably not. He might have worked on some feature in COBOL that then required a new/change to a channel program that would have been written in assembler and at the end of the day write some JCL to get a job to start. Yes.

I constantly write software in Typescript, Java and Kotlin. Some days it's all of them other days it's only a subset. I don't see an issue with that at all. If you don't have a standard set of languages I would agree with you but a stack of one frontend and one backend language should not be a problem for anyone that calls themselves full stack.

The SOA point was not about languages any longer. It was about having multiple services that make up an overall feature and app landscape. Also you seem to have missed the part where I said that I was not in fact HTTP calls is manyif not most cases ;)

And how is your social life? Do you have a girlfriend?
Completely fine and the kids are growing (up fast).

I fail to see how one has anything to do with the other.

Knowing and applying both Java and Typescript is not an issue at all. What is a pain is CSS and why I tell everyone I'm a BE dev. But I happily build vertical slices of functionality where I have full control over FE and BE code and can adjust as I see fit instead of having to create or follow a rigid interface definition and where the BE isn't user testable when it gets written. What is a pain is the libraries on the FE but that's not an issue with knowing multiple programming languages but with the web dev FE ecosystem in general. A non full stack FE developer would have the same pain.

While we did learn a programming language at university to code our exercises in, we didn't learn that language specifically as "this is the language we teach and this is what you will use in your job until you retire". On the contrary we were told and taught about programming concepts, data structures and algorithms and it was expected that you can program in any language. The (mandatory) operating systems course for example would just assume that you learned enough C by yourself to do the programming exercises. We had to write a working memory compactification algorithm for Minix. In the scripting language course (non mandatory) you had to choose any scripting language you wanted and implement a project in it. In the mandatory hardware course we were expected to pick up enough VHDL to implement whatever we learned in the course.

What problem do you have with companies requesting developers know more than one language? If they want a master in multiple then they are fools. But a web developer for example will need proficiency in a few.
First, in the article I wrote how detrimental it is to the developer's social life, to know multiple languages.

Secondly, companies need to realize that they request multiple programming languages because the current programming languages can't parse stack traces, and they push everything to microservices, so they can parse their errors from DevOps services. Which means they don't request only to know multiple languages, but also DevOps services.

I have written about all these in a previous article of mine https://rm4n0s.github.io/posts/5-it-will-take-your-job

    in the article I wrote how detrimental it is to the developer's social life, to know multiple languages.
That is an opinion and not fact. One based on your personal experience that is not universal in any way. Knowing multiple programming languages is quite normal and I would expect any good software developer to pick and up be able to program in (almost) any language. I guess https://en.wikipedia.org/wiki/Brainfuck might be an exception. JCL comes close to it.

We learned this in high school and it was super fun: https://en.wikipedia.org/wiki/Busy_beaver

Do I expect everyone to be an instant expert in any language? Or able to create the busiest beaver? No of course not! But I do expect any decent programmer to pick up any programming language and work in it.

Do we all have preferences? Heck yes! I absolutely dislike Python and would not take a job where I have to program in it if I wasn't forced to by circumstances. I've never done C# or Lua professionally but it was super easy to pick both up when I dabbled with them for game development in private (each respective game engine used these languages for scripting).

    Secondly, companies need to realize that they request multiple programming languages because the current programming languages can't parse stack traces
I read something like that in the article and it still makes no sense whatsoever when I read it here either. Parsing a stack trace in various languages is absolutely possible. But what's that got to do with anything?

FWIW, yes, I've actually looked at previous stack frames (e.g. `e.getCause()` in Java) for error handling. It always felt very very dirty but it was my only choice under the circumstances.

    they push everything to microservices
We have to distinguish the why there.

Some companies (meaning the people within those companies) because they read about how Netflix has x-many of them and it's the thing to do today. Stay away from those companies. They will also make you do other things just because someone read an article of forbes.com.

And then there's companies that are actually trying to solve similar problems as the ones that Netflix was trying to solve with microservices and it actually makes sense to model their internal application service landscape that way! We're in that space for example. We have one big legacy "macroservice" aka very monolithic core and then we have a bunch of newer microservices (some larger, some smaller) that actually solve problems. All of these microservices are written in exactly two languages: Java and Kotlin. Newer ones in Kotlin, older ones in Java (like the legacy monolith). The FE is written in exactly one language by now: Typescript (converted from quite a large javascript code base over multiple years).

    so they can parse their errors from DevOps services
What does that even mean? Makes no sense to me whatsoever. If you're talking about having a central log analytics service like Splunk, Datadog or Graylog et al. then that has nothing to do with microservices or multiple languages. At a previous place we had a bunch of monoliths make up the overall application and splunk so that you'd be able to actually reason about what the system overall was doing for any given overall user transaction / session and it was awesome to have. And if you have any sort of actual need to run software that has uptime requirements, then you are going to run at least two replicas of whatever service you created, monolith or not and you want a central log aggregation service.

I'm really sorry to say this, but it seems like your articles are really just ranting about things that you personally don't like for one reason or another but there's no actual real reasoning or universal truth to it.

to understand what I said, you have to solve the Error Handling Challenge, in your favorite programming language https://rm4n0s.github.io/posts/3-error-handling-challenge/

When you try to implement it, then everything on what I said will make sense to you.

Also, we don't need log systems when there is a programming language like Odin to parse stack traces with type checking (not just string like you gave me as an example from Java).

In microservices you are the error handlers. For example, if in the logs you see a stack trace, then you will go to the code and fix the error.

In Odin I don't need to go in that trouble, because ALL the stack traces can be handled. There will be no undefined behavior in software or unexpected input that caused an unexpected stack trace, so there is no reason to have logs.

I looked at that and I find it pretty funny. As in, why would I ever build error handling that cares about the specific call stack to handle the error? That makes no sense to me. I'll show you why.

Let's say you have the call stack as this (from your example):

    f4()->
      f3()->
        f1()->
          ErrInvestmentLost
Great, I'll handle this based on the fact that f1 was called by f3 (in the Java example, you'll just inspect e.getCause() until you reach the desired point in the trace - basically do what `printStackTrace()` but don't print it and instead do your error handling based on it).

But nobody would ever want to do this because it's super brittle. I change f4 so that it first calls f17, which then calls f3, which then calls f17 again, which calls f1 and your error handling based on the call path is suddenly broken.

What is it that you are trying to even achieve by doing this? Proper error handling doesn't depend on the call path. Proper error handling depends on the type of error that occurred and whether you can actually handle it at all or if you just have to give up and throw the error all the way to where it will get logged for a programmer to take a look at why it happened and why we couldn't handle it.

Your claim about being able to handle "all stack traces" makes no sense to me. You don't handle stack traces. You handle error types.

A real world example of the above (taking Java as an example again) might be a REST resource. My error handling should not depend on nor suddenly break, just because someone configured a new filter in the filter chain that sits above the actual resource method. Say someone added in a `AuthenticationFilter` that checks if some auth token is present and valid and that didn't used to be the case. Now any error handling in my resource method that was based on the exact stack trace combination that existed before that filter was added will break horribly.

Developers were more in tune with the entire tech stack down to silicone. Today you’d be “unreasonable” for asking such a thing.
The entire stack down to silicon exploded multiplied by 3 or 4 in that time.

Vectorization, more cache levels, branch prediction, multiple cores and processors, gpu, virtual machines, (operating systems, but they didn't change much, I only let the placeholder for the layer), containers, but all that in the cloud, distributed databases, frameworks written in a language that need to be compiled to a language that is actually implemented by a web browser in the client (we are far better on compatibility between browsers, but much libraries or practices keep stuck in the past).

I haven't touched shift in practices that make it far worse.

That make it more unreasonable.

I am not asking, it will be the only way from now on if companies don't want to waste more money and time.

Because the option to parse stack traces from the programming language itself, it will destroy what ever built on or for microservices

Yeah because back then the tech stack was:

php apache mysql linux

it was so small we could put it into an acronym.

Meanwhile in 2024 you could barely begin to even describe any individual layer of the stack with so few words. You'd be out of breath before even beginning to finish describing React.

(btw it's silicon, not silicone).

Good ole PAML stack :)