Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
![](/static/devrant/img/pipeless-devrant-banner-white.png)
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Cookie cutter opinion.
1. Whatever your flavor of clean code, you can understand it because you are used to it.
2. Of course we are writing for humans. That's why we writing classes and structs. You know, those do not exist in bytes? We could just write bytes directly.
3. Some goals are opposing. There is a reason why neither code golfing nor runtime challenges look like they write in programming guides. And it is pure luxury that we can write half-way clean.
4. Someone needs to write the stuff behind interfaces. A b-tree is never as clean or straight forward as saving something in an array. Sure, you can abstract it away and give both an identical interface, but someone has to actually write that b-tree and it is just never as clean. -
retoor35842dCode is so 2024.
I can control my bash with plain English using AI and self written tool. It works quite well, but I only use it for fun ofcourse. Often it confirms if he should execute something where I do respond "yes bb go hard" on and thus had a small dialog with the computer. It's fun.
Also, I have a chatbot that (until yesterday...) perfectly converts English to SQL and execute it. It always knows how to convert your English to something fitting the schema.
It's so convenient, for tools use and such, English could be a future "programming language". This works for example: "Hey overrated bits & bytes, a = 42, b = 1337, devide b by a bb". It cuts away all bullshit and knows exactly what to do. I really see future in this. -
Hazarth95752d@retoor if you deliver a codebase of prompts instead of code I would fire you on the spot
-
retoor35842d@Hazarth sure, now. But maybe not in future :D "Please make a socket connection to https://example.com and raise an message event everytime it receives a json dictionary with a key named" type" and the value "message" with the whole received object with parameter of the event.". There's still programming into it, it's EAAS, English as a service 😁😁😁 I think it'll be the future. We're caring about what happens in the background less and less, that's why we use simple programming languages that perform relatively bad. One day, it will come to this level that we just accept all code that AI outputs.
Also, who says that I don't fire YOU? 😁 Why would you be the boss 😁 -
I'm a smart programmer. I can write code that human can understand.
I just chose not to out of spite. -
@retoor I'm sort of in two minds about this.
People used to want to control what the computer did (i.e. a program in a high level language), and also exactly how it did it (i.e. the actual instructions generated by the compiler). Some people do still care about the latter but it's increasingly niche, i.e. we still want the computer to do what we tell it but we don't care exactly how it does it.
I would be uncomfortable with a program that says something like "display a form for the user to edit their profile". I would want to know what that form is going to look like and make sure it's not stupid.
But then, if I write some javascript, the user's browser will decide based on some heuristics whether to interpret it or JIT it, and if the latter, it might emit different instructions from one day to the next, and I don't care. -
A really good programmer can write simple shit so nobody can understand. (Event themselves after 1 month.) For job security.
Because FUCK OTHER PROGRAMMERS! -
@Demolishun you don‘t have to be a good programmer to write simple code that no one is able to understand.
It‘s easy.
Using single letter variables alone kills readability dramatically.
Than you can go and brag about how you can keep all that codebase in your head and don‘t need good variable names because YOU know what they mean, like a true retard.
(I don’t mean the specific "you" but the general "you") -
kiki360071d@Lensflare luckily for me, I don't have to make this choice, but if I had to choose between code readability and job security, I would've totally chosen the latter. I couldn't care less about the next guy supporting it — he's not paying my bills. All that matters to me is that I get paid here and now, and that I won't be kicked out tomorrow.
Getting the project up to speed after kicking me out has to have a greater immediate cost than keeping me.
I do write readable code with more comments than you've ever seen, but I do it just because I *can*, just because it doesn't hurt my job security. -
@kiki
Are you familiar with the prisoner's dilemma? It stipulates, that even if you only think about yourself, writing readable code might lead to your best outcome.
I personally am a huge fan of tits, which is exactly why I follow a tit for tat strategy. -
@kiki fair, but if you have to intentionally write unreadable code for job security, I‘d say that you work in the wrong place.
I know that in reality it might be a question of this job or no job, but we should strife for a world where we don‘t have to do this kind of bullshit. -
kiki360071d@TrayKnots I don't think it applies here. I and the second prisoner (e.g. the next guy) don't testify against each other at the same time. When I exist, he doesn't. When he comes, I suddenly stop caring about this project because I'm not paid to.
-
kiki360071d@Lensflare I empathise with ideas you talk about. I wasn't talking about intentionally writing bad code, I was talking about avoiding going the extra (unpaid) mile to make sure the code is readable by the next guy, especially when choosing not to marginally increases my chances of not being replaced that easily.
-
kiki360071d@Lensflare also, every minute spent on helping the next guy is a minute not spent on helping yourself/the client.
-
@kiki
It does apply. It is called a reputation system. Which is why you need to work on your reputation in every human endeavor. -
kiki360071d@TrayKnots it doesn’t matter. They’ll hire whoever walks into the room during the time of the highest demand.
-
this is subjective
if some people are better at writing code then some people are better at understanding how computers understand things
now you're discriminating against some people relative to others as if in the hope to account for people who don't know how computers work
I rather people who knew how computers worked worked on computers. just makes sense -
@jestdotty this is what is strange that is happening in the cs area. It seems they want to languages that don't align with how the computers work in the thought process. Then have the compiler figure out how to compile correctly. It seems like we want some holy grail of abstraction that isn't tied to architecture. Maybe there is the thought that computer architecture could change and doing things the way computes work now may not be ideal? I dunno.
I see things like typeless abstractions (type erasure) and struggle to understand how that improves my code. Unless there is a way to reason about it to create more performant or memory efficient code. I am sure it is because I just don't "get it" yet. But I wonder how much is high level smoke and mirrors? I want to see numbers of how it makes my game faster or makes smaller save files. -
@kiki
Strategies are a vector, not conditionals.
The urge to have sex is not disappearing (for most people) just because they wear a condom. It's a force vector, we are pushed towards having sex. Because in the big picture, it works to nudge us into procreating.
Same is true for this system. Tit for tat works. Reputation is its method. Reputation makes it a repeated game. Game theory requires infinite games.
There are also anti-cheating mechanism to weed out betrayers. But from time to time, those will find a niche in which they can sit and enact their parasitism.
It happens, that it doesn't matter like you said. But in the big picture, I'd rather not rely on finding a tiny niche. -
retoor35841dMaybe everyone is programmer in future and only the chosen ones are code reviewers (us). Would be sad, but I can see such thing happening. My db bot converts any question to good SQL and executes it. "Show me the name of users that are active?" -> it does select all users from the user table and filters with datediff on the field last_ping. That's quite impressive for such description. Also cool ids that it supports typo's and alternative table names. I could say accounts as well or smth. WOW, Maybe in dutch? Testing now.
-
@Demolishun there's several factors for it
first, people who went into CS not because they liked computers but due to familial pressure or monetary eyes don't think like computers. similarly humans always optimize for the most convenience for themselves, and this is very good evolutionarily but in this case it's becoming an excessive cancerous growth, because you're making more work instead of taking the path of least resistance
second, people who want supply-demand to shift so they can get cheaper developers like the idea that there's something the field can do so we get more workers so they can pay less to get the same work done. this is also good evolutionarily but you'll just repeatedly be paying for scams because you don't understand the underlying problems and instead throw money at con artists, which is fair but ye 😁
... now the question of why do programmers themselves buy this rhetoric? now that always confuses me -
@Demolishun I assumed type erasure means less data has to be processed by the CPU. I think rust does a bunch of checks at compile time to make sure variables are safe, and then omits any such checks from the compiled code. this way the code will run faster
i don't know if it is typical to omit or include type information in the compiled code. I assumed it was typical to include it so you can have better errors when this stuff conflicts. in rust I think they do type erasure and don't put in any type checks in the compiled code, because the compiler can validate everything before it makes the final instructions, and this way you can omit compile-time checks because everything will be accounted for. and without type information and having to check stuff all the time you take up less memory and waste less CPU for the same procedures
but I'm not terribly knowledgeable about low level programming so maybe I'm wrong
Any fool can write code that a computer can understand. Good programmers write code that humans can understand
random