this post was submitted on 01 Sep 2023
323 points (96.5% liked)

Programming

20998 readers
135 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 2 years ago
MODERATORS
(page 3) 50 comments
sorted by: hot top controversial new old
[–] lefixxx@lemmy.world 15 points 2 years 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

[–] warlaan@lemm.ee 10 points 2 years ago

My hot take: There is no such thing as 0-index. If you start with 1 it's an index, of you start with 0 it's an offset.

load more comments (6 replies)
[–] ennemi@hexbear.net 14 points 2 years ago

DRY means Do Repeat Yourself, when the alternative is cooking up some awful OOP abstraction

[–] tatterdemalion@programming.dev 14 points 2 years 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)
[–] Thordros@hexbear.net 14 points 2 years ago (2 children)

If you can't find where you missed a closed parentheses, just add a bunch of them to the end of your project like this...

)))))))))

... until your editor's syntax helper tells you it's good. I am very good at coding.

load more comments (2 replies)
[–] StudioLE@programming.dev 14 points 2 years ago (1 children)

My mantra has always been to bring solutions not problems. Applying that to code reviews makes for a far more productive experience.

Rather than just pointing out errors in code help the developer with prompts towards the solution.

Or, if you're too lazy to explain why something shouldn't be done then why should another developer have to act on your criticism?

load more comments (1 replies)
[–] IonicFrog@lemmy.sdf.org 12 points 2 years ago (1 children)

A lot of programmers need to work on their soft skills.

load more comments (1 replies)
[–] WoofWoof91@hexbear.net 11 points 2 years ago (2 children)
load more comments (2 replies)
[–] silent_water@hexbear.net 10 points 2 years ago (2 children)

learn Haskell, write better code

load more comments (2 replies)
[–] Floey@lemm.ee 10 points 2 years ago (1 children)

Write the whole thing, and only then, scrap it and rewrite it. This way you actually have a good understanding of the entire implementation when you are rewriting. When I refractor while writing my draft I will slow myself down and trip over myself, I'll be way more likely to rewrite something I've already rewritten.

Sure there is a limit to the size of projects this can work for, but even for massive projects they can still be broken into decently sized chunks. I'm just advocating for not rewriting function A as soon as you finish function B.

load more comments (1 replies)
[–] Patchwork@lemmy.world 10 points 2 years ago (3 children)

Doing this is a hot take, but "clean architecture" is a joke.

My company is obsessed with it.

load more comments (3 replies)
[–] Blamemeta@lemm.ee 10 points 2 years ago (4 children)

Front end and back end are different enough that you can really specialize in one or the other. They take very different mindsets. I know how to make css obey, I don't know how to make sql performant. Its possible to have both, but not as well.

For every front-end dev, you need 3 back-end guys and a designer.

Programmers are not bad at our jobs, its just not a mature disclipline yet.

load more comments (4 replies)
[–] GaveUp@hexbear.net 10 points 2 years ago* (last edited 2 years ago) (2 children)

Programming is actually hard af to do for any extended period of time (more than half an hour)

It requires such a specific mind that's drawn to all the detail oriented specific robotic parts of coding but almost all coders say coding is easy because the people whose mind don't fit coding already quit long ago

Yes I find coding hard and no I'm not coping

Actually programming being difficult might not be correct but more like programming is largely unbearable

load more comments (2 replies)
[–] valentino@lemmy.ml 9 points 2 years ago (9 children)

The amount of unqualified people is staggering beginning with those who have no university education.

load more comments (9 replies)
[–] nomecks@lemmy.world 9 points 2 years ago (3 children)

If you're not a programming superstar you can probably make more money writing nothing but Terraform code for hapless enterprises.

load more comments (3 replies)
[–] callouscomic@lemm.ee 9 points 2 years ago

Good programmers need to be creative, flexible (soft skills with others), critical thinkers, and problem solvers. Lacking those kinds of features makes for a rigid and terrible programmer that is near impossible to work with or code behind. Leave the ego at the door.

[–] CodeBlooded@programming.dev 9 points 2 years ago (2 children)

Python, and dynamically typed languages in general, are known as being great for beginners. However, I feel that while they’re fun for beginners, they should only be used if you really know what you’re doing, as the code can get messy real fast without some guard rails in place (static typing being a big one).

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