Live data from Hacker News

Can't Driven Development

rm4n0s.github.io

31–40 of 54 posts

Re: Can't Driven Development

#31

Earlier quoted context omitted.

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 langua…

    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.

Re: Can't Driven Development

#32

This doesnt make a lot of sense. The set of things your software cant do is infinite. The set of potential errors is massive and many if not most are unrelated to domain logic.

I think it's is finite. I couldn't think of another "can't" statement for my exercise. If you find any please tell me to patch the code. You thinking in DDD because in CDD there is no domain logic. Everything is part of stack trace tree

I guess while you're at it, you are also going to tell us how you solved the halting problem then? Why not prove if P != NP or not while you're at it. I mean after all, we just couldn't think of any other reason why P should not equal NP, so it must be equal, mustn't it?

Not being able to quickly think of more test cases for whatever you're trying to test at any given moment does not prove anything. You also seem to be very hung up on something about stack traces that I'm really not able to figure out what it really is, even though you keep mentioning it.

Re: Can't Driven Development

#33

Earlier quoted context omitted.

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 langua…

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…

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.

Re: Can't Driven Development

#34

Earlier quoted context omitted.

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 interfac…

So you telling me that you don't need to study on your free time? Is that correct?

You can't program in any language, don't fool yourself. Take, for example, SQL that is used in all companies. Can you write SQL functions with the same ease as Java? You may ask why do you need functions in SQL? Because it is faster to run the algorithm in SQL, rather than in Java from an ORM.

Re: Can't Driven Development

#35

Earlier quoted context omitted.

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 interfac…

So you telling me that you don't need to study on your free time? Is that correct? You can't program in any language, don't fool yourself. Take, for example, SQL that is used in all companies. Can you write SQL functions with the same ease as Java? You may ask why do you need functions in SQL? Because it is faster to run the algorithm in SQL, rather than in Java from an ORM.

I do not study in my free time, no.

I'm not saying I can instantly program at expert level in any language I've never heard of. But yes, I can read most programming languages even without ever having seen them. Take LUA. I had never used LUA and when I started out I was reading code examples and writing LUA code without first "learning" it at all. I just went and did it. Did I probably do some "stupid things" that an expert would do differently and/or fast? Of course. But I got stuff done and learned as I went along. Same when we introduced Kotlin for example. I was instantly productive but someone using Kotlin for a longer time (such as today's me) would "cringe" at how I was writing Kotlin as if it was Java.

Notable exceptions would be languages that have such a weird syntax as Brainfuck ;)

SQL is a great example. I have not been using SQL directly for quite a long time now. But about 20 years ago my bread and butter was SQL and I was writing stored procedures every single working day and I was not writing any Java at that point in time but was using two other languages other than SQL on a daily basis as well (Perl and Bash).

Re: Can't Driven Development

#36

Earlier quoted context omitted.

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…

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 exa…

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.

Re: Can't Driven Development

#37

Earlier quoted context omitted.

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 exa…

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(…

Odin can make stack traces as error types.

Your system with Java will break if someone else add an AuthenticationFilter, but my system in Odin will not even compile until I have handled all the stack trace paths that include AuthenticationFilter.

Do you see the differences between handling stack traces with union types rather than string?

Re: Can't Driven Development

#38

Earlier quoted context omitted.

So you telling me that you don't need to study on your free time? Is that correct? You can't program in any language, don't fool yourself. Take, for example, SQL that is used in all companies. Can you write SQL functions with the same ease as Java? You may ask why do you need functions in SQL? Because it is faster to run the algorithm in SQL, rather than in Java from an ORM.

I do not study in my free time, no. I'm not saying I can instantly program at expert level in any language I've never heard of. But yes, I can read most programming languages even without ever having seen them. Take LUA. I had never used LUA and when I started out I was reading code examples and writing LUA code without first "learning" it at all. I just went and did it. Did I probably do some "stupid things" that an…

Look, you are very lucky for sticking with java and using your OOP knowledge to move to other programming languages.

But an unexpected change will come and you will need to go back studying on your free time. This is always happening in our industry, you were just lucky for not living it because you sticked with Java.

Re: Can't Driven Development

#39

Earlier quoted context omitted.

I do not study in my free time, no. I'm not saying I can instantly program at expert level in any language I've never heard of. But yes, I can read most programming languages even without ever having seen them. Take LUA. I had never used LUA and when I started out I was reading code examples and writing LUA code without first "learning" it at all. I just went and did it. Did I probably do some "stupid things" that an…

Look, you are very lucky for sticking with java and using your OOP knowledge to move to other programming languages. But an unexpected change will come and you will need to go back studying on your free time. This is always happening in our industry, you were just lucky for not living it because you sticked with Java.

You are making assumptions there, even though in this very conversation you have evidence to the contrary.

In professional capacity over the years I have used Perl, PHP, Bash, SQL (various dialects), Java, Groovy, Kotlin, Scala, Javascript and Typescript. I did not move from Java and OOP knowledge to other programming languages. I started with with languages that don't (have to) use OOP. I still work with Typescript (and until recently Javascript) while also working with Java and Kotlin. And in Java and Kotlin there is very little traditional OOP going on.

I guess the point there is to always keep learning and evolving. I learned Kotlin at work, while doing it. I learned Typescript at work, while doing it. I learned about various libraries at work, while using them. Until a few years ago, I had never used React and I have never used React except at work.

Re: Can't Driven Development

#40

Earlier quoted context omitted.

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(…

Odin can make stack traces as error types. Your system with Java will break if someone else add an AuthenticationFilter, but my system in Odin will not even compile until I have handled all the stack trace paths that include AuthenticationFilter. Do you see the differences between handling stack traces with union types rather than string?

I don't see how it improves or gives me anything, no.

See, the `AuthenticationFilter` sits outside of my REST resource. I could not care less that someone configured it and that at runtime, based on some configuration that can change without even needing a recompilation, this filter will either be there on the stack or it won't.

My resource does not interact with this filter in any way and when an error happens somewhere down in another method I call, then I don't care that I was called with or without the auth token having been checked by said filter. I might care whether the method I called threw a `SQLException` or a `JSONParseException` but very probably I don't even care about that at all because I can't do anything specific in either case and will just throw it further (i.e. not handle it, other than potentially logging it).

Java actually tried the whole "specify all error situations with checked exceptions and otherwise the code won't even compile" and it failed miserably and you are hard pressed to see anything new derive from `Exception`. Everyone uses `RuntimeException`. It does come at a cost, because now I no longer have the hassle of explicitly knowing and deciding what to do with these exceptions and I may only figure out that a particular type of error can happen once I "see it in the wild" (e.g. in my logs, coz something failed) or I'm lucky enough to have actually read the documentation and handled all the exceptions I wanted to handle.

But that happened precisely because it was just too much to have all your code specify these exceptions when everyone figured out that 99% of all code just threw them further up the stack. You call one new library method that specifies an exception and you suddenly have to adjust 127 other files and the only thing you do is to declare all those methods will also just throw the exception further up the stack.

Post reply on HN