this post was submitted on 01 Sep 2023
329 points (96.1% liked)

Programming

17484 readers
116 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
(page 2) 50 comments
sorted by: hot top controversial new old
[–] NBJack@reddthat.com 26 points 1 year ago* (last edited 1 year ago) (3 children)

Oh boy, here we go (inhales):

Agile isn't that bad. People just believe they are more productive if they are "heads down" and not held accountable for what they write/do.

Functional programming isn't that great and doesn't solve all of the world's problems; it just pushes the issues with state to other parts of your design, and doesn't scale well in deeply nested solutions.

IDEs with proper code support (i.e. automatic structure analysis, autocomplete, etc.) are one of the best ways to deal with a large codebase that needs refactoring. Doing widescale refactors without one is asking for trouble. If you believe you don't need it, either your codebase is just that small (which is fine) or playing with fire.

Much of the advice out there on architecture and tooling isn't properly contextualized on the codebase, market, and team situation. If you believe you have the One True Architecture Solution, you are naive. (Ex. Microservices, large complex code pipelines, monorepos, etc.) Be especially wary of anything from FAANG engineering blogs unless you are also in another letter of FAANG.

There. Got it out of my system. Have fun dissecting it.

load more comments (3 replies)
[–] mathterdark@lemmy.world 25 points 1 year ago (2 children)

MATLAB is an okay programming language when used in the right context. It’s intended for scientific applications, so trying to do your standard object oriented programming with it gets weird. I think we forget that some things were made for a specific purpose- you know, a hammer can’t do everything and all that.

load more comments (2 replies)
[–] makr_alland@lemmy.world 24 points 1 year ago (11 children)

My hot take: Vi, make and C would have gone the way of COBOL a long time ago if it wasn't for a lot of programmers thinking "my tools are more difficult to use, hence I'm a better programmer".

[–] witx@lemmy.sdf.org 18 points 1 year ago

I agree with C and Make, not with vim/neovim though

[–] xigoi@lemmy.sdf.org 16 points 1 year ago (1 children)

I agree. You should use Neovim instead of Vi nowadays. :P

load more comments (1 replies)
load more comments (9 replies)
[–] NewPerspective@lemmy.world 24 points 1 year ago (15 children)

If white space carries any function that the compiler/interpreter needs to know about like structure or scope, it's probably not a very good programming language.

load more comments (15 replies)
[–] newIdentity@sh.itjust.works 24 points 1 year ago (4 children)

JavaScript isn't bad. Sure it has its quirks, but it's not as bad as everyone makes it sound it is

load more comments (4 replies)
[–] thomasdouwes@sopuli.xyz 23 points 1 year ago (6 children)

Not sure about here but is was a hot take on reddit:
Pointers are not that hard and really useful

load more comments (6 replies)
[–] Crashumbc@lemmy.world 23 points 1 year ago (3 children)

Not everyone can or even should learn programming.

load more comments (3 replies)
[–] words_number@programming.dev 22 points 1 year ago (17 children)

JS is horse shit. Instead of trying to improve it or using that high level scripting language as a compilation target (wtf?!), we should deprecate it entirely and put all efforts into web assembly.

load more comments (17 replies)
[–] rk96@lemmy.one 22 points 1 year ago (1 children)
load more comments (1 replies)
[–] whoisearth@lemmy.ca 22 points 1 year ago (13 children)

SQL is the core language that everyone should be required to learn first and foremost.

load more comments (13 replies)
[–] TehPers@beehaw.org 21 points 1 year ago (2 children)

When writing software that will be deployed to a production environment, it's better to slow down and take the time needed to write a higher quality, more durable solution than to rush and quickly kick a product out the door.

I don't know why this is a hot take, but sometimes it feels like it is.

load more comments (2 replies)
[–] ArmainAP@programming.dev 21 points 1 year ago* (last edited 1 year ago) (1 children)

I really love the project structure of C++. I know that it is an archaic design developed like this due to lack of resources, but I find packages extremely offputting.

The first reason is that splitting declaration and implementation across files makes it easier to figure out what something does.

Second reason is that I feel that I have more control over libraries and packages that have to be manually added to a project rather than using a package manager.

Third, I feel like modern languages iterate over too many versions too fast. C++ has version releases too, but I feel that versioning is handled better from time, compatibility and stability point of view.

load more comments (1 replies)
[–] Swiggles@lemmy.blahaj.zone 20 points 1 year ago (21 children)

Python is stupid. Using non printable characters as anything other than token separation is just asking for trouble.

load more comments (21 replies)
[–] csm10495@sh.itjust.works 20 points 1 year ago (15 children)

GNU make is confusing as hell and shouldn't be used in today's world.

load more comments (15 replies)
[–] akselmo@lemmy.kde.social 20 points 1 year ago (4 children)
load more comments (4 replies)
[–] __little_omega@lemmy.world 19 points 1 year ago (2 children)

If programmers stick to what they know and not try to solve every problem at hand with the latest thing/programming language they've learned then there would be fewer bugs and projects would end by the estimated dates.

load more comments (2 replies)
[–] willia4@lemmy.world 19 points 1 year ago (8 children)

TDD is overrated. Code coverage is extremely overrated. Both of these tend to lead to a morass of tests that prove the compiler works at its most basic level while simultaneously generating a surplus of smugness about the whole situation.

Tests have their place. Tests can be, and often are, valuable. But the easier the test is to write, the easier it would've been to just encode it into the type system to begin with.

load more comments (8 replies)
[–] pelotron@midwest.social 19 points 1 year ago

Carbon? Just what we were all hoping for, yet another programming language from Google. They can keep it.

[–] escapesamsara@discuss.online 18 points 1 year ago (11 children)

Python is legitimately the best language by far for the vast majority of non-performance critical tasks, and most tasks that need to be developed for are not performance critical.

[–] foo@withachanceof.com 18 points 1 year ago (5 children)

Heh, I was about to comment how my hot take is that Python is overrated. It's... fine and I don't really have anything against it for the most part, but I greatly prefer Ruby to Python.

I'm speaking purely about the language itself here, not any libraries available for it (since someone will always point out how great Python is for data work).

load more comments (5 replies)
load more comments (10 replies)
[–] dpkonofa@lemmy.world 18 points 1 year ago* (last edited 1 year ago) (7 children)

Most frameworks are garbage and most programmers that use them have no idea how they work and that makes them shitty programmers. I hate when people use frameworks without even knowing why they’re using them.

load more comments (7 replies)
[–] Kushan@lemmy.world 17 points 1 year ago

That the entire industry is cyclical and the current trends are yesterday's anarcisms. Oop Vs functional, separating concerns Vs vertical slices, there's examples all over the place.

All of this has happened before and all of this will happen again.

[–] onlinepersona@programming.dev 16 points 1 year ago (6 children)

Composition over inheritance has become a meme that people repeat without understanding. Both have their uses, but if composition is all you use, then you're using a hammer on everything. There is no silver bullet in life and most undeniably not in programming.

Also, electron has a reason for existing. If it didn't have a use, it wouldn't have the number of users it has. You can't tell me in all seriousness that Qt, Gtk, Swing, Tkinter is easier to use than electron for the common developer.

load more comments (6 replies)
[–] lefixxx@lemmy.world 16 points 1 year ago (7 children)

I like 1-index because its what I learned first, and you like 0-index because that's what you learned first

[–] Weirdfish@lemmy.world 23 points 1 year ago (1 children)

We just need to compromise, arrays start at 0.5

load more comments (1 replies)
load more comments (6 replies)
[–] qevlarr@lemmy.world 16 points 1 year ago (3 children)
load more comments (3 replies)
[–] Gnubyte@lemdit.com 16 points 1 year ago* (last edited 1 year ago) (3 children)

🌶️🥵Many people consume Facebook meta company's tech stack wholesale, don't know how to actually traditionally program their way out of a paper bag, and web dev and devops caused a massive layoff (250k people) at the end of 2022, start of 2023 because it was all vaporware. They consume the same software in droves if the other guy uses it.

There is an entire subculture around it that is just a bunch of medium.com writers, YouTubers and twitter handles just trying to get the clicks for their ad money. Some of these guys have never written valid software or done anything noteworthy. If you meet them head on you'd find they have enormous egos and can't find a counter argument when presented with reason.

I'll even add on that there are many programmers who don't know how to code outside a web app.

Why is something like [react, graphql, react ssr, devops, tailwind, unit tests, containers] vaporware?

  • there are other frameworks even with component libraries that are easier to read the code for large codebases, better maintained, and have cohesive full stack solutions, and even faster to develop in, to name one quasarJS or even just plain ecmascript
  • if you look at the anatomy of these enterprises using these solutions they've evolved to have micro front ends requiring armies of workers.
  • devops is a sales term, the actual implementation of it is so contextual that you'd probably find you don't need a full time job for it half the time and most are relatively easy to setup inside of a business quarter
  • not everything is Facebook scale: unless you're padding your resume why did some of these get adopted? How complicated does your app need to be? Did you really need to transpile JavaScript for it?
  • unit tests were code to test your code that you're going to have to functionally test anyways: you're telling me that you have to write your code...twice? How the hell did this ever get justified to mangers? Why did the culture not evolve into literal automated smoke tests of the actual builds, instead of testing whether a function that is probably type annotated is going to fire anyways???
  • docker/containers suck ass: great that they solved a problem but created a whole new one. we moved to python and JS which were JIT without artifacts and suddenly everything needs a generalized build system to run it. C lang variants and Rust lang compile to a binary you can just run... Ship the small ass binary not an entire container to run your shitty web app

You know the stuff I don't hear about?

  • Javascript and Python were steps in the evolution but never the end goal. I'd even say the same of java. There are new solutions but JavaScript in the browser especially should be replaced.
  • eye appeal is buy appeal
  • that eye appeal shouldn't always mean you need to use a library or framework; vanilla apps work okay too.
  • binaries/artifacts/installer packages > containers
  • automated testing of the actual end product
  • well written logging to the point someone can tell what the application was doing without seeing code
  • using all these compsci algorithms to actually write new products and searches from scratch instead of being a framework baby: do you actually need ELK or Splunk for your search? Really?
  • you probably don't need MySQL for a lot of projects, I bet you an async library with sqlite would be the same for many of these projects.
  • small teams with feature rich apps using SSR, the value of an SSR web app
  • the value of a SPA
  • the value of traditional desktop software and not using REST APIs
load more comments (3 replies)
[–] lysdexic@programming.dev 16 points 1 year ago (2 children)

Duplicate code can be a code smell, but it's far better to have the same function definition or code block appear twice in the code than extracting a function that tightly couples two components that should not be coupled at all.

See Write Everything Twice (WET) principle.

load more comments (2 replies)
[–] witx@lemmy.sdf.org 15 points 1 year ago (4 children)

Here's another: most code reviews on larger companies are BS, just for show and nitpicking.

load more comments (4 replies)
[–] Templa@beehaw.org 15 points 1 year ago (1 children)

My experience with people from university is that they have extremely strong opinions about things they don't know very much how they work outside theory. There is this syndrome that you have to do everything from scratch with low level languages and keep shitting on anything that uses abstraction to make your life easier.

I don't know why people in this industry have this need of feeling that they're better than others.

load more comments (1 replies)
[–] tatterdemalion@programming.dev 15 points 1 year ago (10 children)

The only thing a GUI text editor can be better at than a terminal editor is making it easier to use the mouse.

load more comments (10 replies)
load more comments
view more: ‹ prev next ›