Having fun when programming should be much more important than having correct or fast code when you're a programmer and should be what we should aim for first.
Having fun when programming should be much more important than having correct or fast code (...)
That's only remotely reasonable if you're a weekend warrior that messes with coding as a pastime. Even so, I'm not sure what fun you can extract from dealing with slow, broken code.
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.
Here's another: most code reviews on larger companies are BS, just for show and nitpicking.
I work at a small organization where code reviews are good, but I've noticed that the larger the code review, the faster it needs to get done in order to avoid merge conflicts, which means large code reviews are much less effective in proportion to the size.
Here’s another: most code reviews on larger companies are BS, just for show and nitpicking.
Story time.
Once I worked with a developer that just joined the company straight out of college, and had far more ambition than competency. That developer decided that code reviews where the venue where their high bar for code quality would shine, so they decided to nitpick everything that went against their poorly formed sense of taste. As luck would have it, the developer was assigned to a legacy project that was in cold storage for years and had no tests and linters, and was in a really poor state, and proceeded to leverage that to challenge each and every insignificant detail such as if a space should be at the left or at the right of a symbol. Each code review automatically received dozens of comments nitpicking whitespace changes. What a waste of time with so much noise.
I drop by the project, and noticed the churn that developer alone forced upon everyone, as that team had a rule that all code reviews should be passed by all reviewers and that reviewer made it their point to reject reviews that didn't complied to their opinion on whitespace. So the first thing I did was onboard a code formatter, and made it my point to subject the spec to an unanimous code review. That problematic developer made it their point to nitpick away each and every single setting, but it turned out some of their opinions conflicted with previous feedback.
So the code formatter tool was onboarded onto the team. Did that stopped the problematic developer from continuing their nitpicking? No. Except this time around other developers started pushing back because the opinions were contradictory and contrasted with the official code formatting style.
All it took was a couple of days for the problematic developer to go from dozens of comments per day to zero. The code formatter was still optional and not fully adopted, but the problematic developer simply ceased with the bickering.
If your function is longer than 10 statements, parts can almost always be extracted into smaller parts. If named correctly, this improves readability significantly
HELL NO! If you split that function into three, but these always have to be called in succession, you win nothing but make your code WAY harder to read/follow.
Strong typing is for weak minds.
You absolutely do not need a computer telling you what types you can put in a collection. Put an assert, write some unit tests, if you aren't sure where data sources come from and can't write a one-line comment.
Dynamic typing makes you fast, it's empowering. Try it and quit being so scared.
No matter how many unit tests or comments you write, it's impossible to "prove" type correctness in a dynamically typed language - and it will eventually blow up in your face when you have to refactor. There's a reason for the adage "testing can't prove the absence of bugs."
People like static typing because it offers strong guarantees and eliminates entire classes of bullshit bugs, not because they're "weak minded."
I agree, strong typing is for weak minds. I work with a weak mind so I want strong typing.
There's no difference in speed between typing disciplines. In point of fact, there cannot be. You must know the structure of your data to program against it. Whether you write it down explicitly or implicitly changes nothing but the location you wrote it down.
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?
Abstraction will be the death of traditional software development as we know it
Modern PHP is great and people judging it by PHP 5 (version that's almost 20 years old) are idiots.
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.
The amount of unqualified people is staggering beginning with those who have no university education.
Answering my own question here. If you don't have any interest in how the tools you use work, programming isn't "for you" (take that with a grain of salt). If you are writing code and have never looked into how compilers/interpreters work or are using a library and haven't even taken a peak at the library's source code you should because it will make you a better programmer in the long run. And I'm not saying you can't get anything done without that curiosity but curiosity is a major part of being a programmer. Also you don't need to have a deep understanding of the tool just a overview of what it's doing. Like for a compiler understanding what lexers, parsers, ASTs, code generators are will allow you to write code with that in mind.
All programming languages suck, therefore the language you use doesn't matter
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).
If you're not a programming superstar you can probably make more money writing nothing but Terraform code for hapless enterprises.
Doing this is a hot take, but "clean architecture" is a joke.
My company is obsessed with it.
Programming
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