10 Coding Habits To Avoid

preview_player
Показать описание
Recorded live on twitch, GET IN

MY MAIN YT CHANNEL: Has well edited engineering videos

Discord

Рекомендации по теме
Комментарии
Автор

If this article wasn't AI generated, the writer should worry, cause ChatGPT could definitely have made this.

botondhetyey
Автор

This article is something I'd write in high school when the teacher wants 1000 words for a simple question.

astral
Автор

this article is definitely ai generated

aniketnegs
Автор

You know every article that contains a phrase such as 'in the vast landscape of programming' or some variant is 100% a Chat Gippity special.

thommccarthy
Автор

I'm pretty sure the robot that wrote this wanted to give programmers conflicting advice because it didn't want to be manipulated.

nclanceman
Автор

The joy of programming is the key thing. I've been coding since I was 13, in 1983! I love it! I programmed professionaly from 1991 to 2015. I retired when I was 45. I now code for pure unadulterated pleasure, I'm now 53. I will continue coding until the day I die. I still live, breathe and eat coding. It is the sheer joy of programming that keeps me going - I truly love it, I loved it at the beginning, I will love and continue programming till the end of my days.

runny
Автор

I put the prompt into chatGPT and it wrote a much better article:
Title: 10 Coding Habits That Make You a Bad Programmer

Introduction:
In the world of software development, writing clean, efficient, and maintainable code is paramount. Good coding habits not only enhance productivity but also improve collaboration and minimize errors. On the flip side, bad coding habits can lead to buggy, hard-to-read code that is difficult to maintain. In this article, we will explore ten coding habits that can make you a bad programmer. If you find yourself guilty of any of these habits, don't worry! Recognizing them is the first step towards improvement.

1. Inconsistent Naming Conventions:
One of the most common coding habits that can hinder readability is inconsistent naming conventions. Choosing meaningful and consistent names for variables, functions, and classes is crucial. Using clear and descriptive names improves code comprehension and makes it easier for others (or even yourself) to understand and modify the code in the future.

2. Ignoring Code Documentation:
Documentation is often overlooked, but it plays a vital role in maintaining codebases. Bad programmers tend to neglect documenting their code, leaving their colleagues or future maintainers in the dark. Well-documented code helps others understand the purpose, inputs, and outputs of functions, making it easier to debug and enhance the codebase.

3. Writing Lengthy Functions:
Long and monolithic functions are a recipe for disaster. Bad programmers often write functions that span multiple pages, making it hard to understand their logic and troubleshoot issues. Breaking down complex functions into smaller, modular ones improves code readability and reusability. Aim for functions that do one thing well and are easy to comprehend.

4. Neglecting Code Comments:
Code comments are crucial for explaining non-obvious parts of your code. Bad programmers either omit comments entirely or write uninformative comments that don't add any value. Meaningful comments provide insights into the purpose, intentions, and edge cases of the code, aiding future developers who need to understand or modify it.

5. Not Using Version Control:
Version control systems, such as Git, are essential tools for managing source code. Bad programmers often neglect version control, leading to code inconsistencies, conflicts, and difficulty reverting changes. By using version control, you can track code changes, collaborate effectively with teammates, and easily roll back to previous versions if necessary.

6. Lack of Error Handling:
A bad programmer often ignores proper error handling, leading to unpredictable program behavior and potential crashes. Error handling is essential for identifying and gracefully recovering from unexpected situations. By incorporating proper error handling techniques, such as try-catch blocks, you can make your code more robust and reliable.

7. Copy-Pasting Code:
Copying and pasting code may seem like a time-saver, but it can lead to a maintenance nightmare. Bad programmers tend to duplicate code instead of creating reusable functions or modules. Duplicated code increases the chances of introducing bugs and makes code maintenance more challenging. Instead, strive to write modular and reusable code that can be easily shared across different parts of your project.

8. Ignoring Testing:
Writing tests is often considered a hassle, but it is a fundamental part of ensuring code quality. Bad programmers tend to neglect testing, resulting in code that is prone to bugs and difficult to refactor. Adopting a test-driven development approach and writing automated tests can help catch errors early, maintain code integrity, and facilitate future modifications.

9. Poor Performance Optimization:
Efficient code is vital for maintaining a responsive and scalable application. Bad programmers often overlook performance optimizations, resulting in sluggish and resource-intensive software. Understanding algorithms, data structures, and profiling tools can help identify bottlenecks and improve the overall performance of your code.

10. Resistance to Learning and Improvement:
Perhaps the most detrimental habit of a bad programmer is the resistance to learning and improving their skills. Technology and programming languages

sub-harmonik
Автор

Ok, "You can't get good at something you hate". Well, that's my Javascript career out the window :)

hinzster
Автор

At #4, i am now sure that it is not written by a programmer.

Programming is a craft and this sounds like an electrician telling me that he will make the electrics in my house in a creative and never seen before way. Please don't. When the next guy takes over, he won't say "oh my, this is brilliant! I've never seen something like this!" he will say "wtf is that bullsh*t. We need to rewrite all of that."

sealsharp
Автор

"The emotional coder" reminds me of one of my favorite pieces of advice from "How To Write Unmaintainable Code": use emotionally charged variable names to distract the maintenance programmer from the underlying logic, e.g. "marypoppins = (superman + starship) / god"

AzureFlash
Автор

I feel like the author must be a programmer of the likes of:
if something == true {
return true;
} else {
return false;
}

and then use a ton of comments to explain every line of code.

MrLowbob
Автор

Wow, this article was such a nothing burger

SADDE
Автор

"In the thrilling world of programming"

SloanStewart
Автор

Sorry, this article is total crap.
I don't worry about insulting the author as the article was definitely generated by some crappy AI.

mvargasmoran
Автор

If you do copy code from a third party, I recommend putting in a comment with the URL where you got it from so if someone has questions later, they know where to look.

Like all written works, code is only copyrightable if it's creative enough. Contrary to popular opinions, there's not 1000 ways to do things. There are infinite combinations of things you can do to create a product with code, but most individual blocks of code are boilerplate algorithms.

It's easier to protect a whole product than a particular function.

bkucenski
Автор

Article felt more like a wholesale of cute platitudes but little grip on reality. On the burnout issue, i fully agree that it's not how much you're working on it but how much you WANT to work on it. Have had weeks with a couple hours a day sleep that ended with me totally out of gas and happy, and have had weeks working 9-5 that ended in misery and despair. If you want to figure when you're in one or the other, think overtime. If you're willing to do overtime for free, you're in the former, "in the zone", happy life. If you're not willing to do overtime at ANY rate, you're in the later.

ErazerPT
Автор

It is very motivating to hear your funny and very refreshing explanation ideas, I always find something in common with your point of view. Thank you!

DanielFerreira-qurp
Автор

back in 2001 a class mate in probabilistic class in college told me that a guy he met suggested him the best way to program is to learn your favorite language, dominate it and then learn to call other programming languages from your own.

In other words, learn C & how to use emscripten to be fullstack dev.

laughingvampire
Автор

Regarding the mastering of a language:
I have to say that I only started to master languages once I explored more languages because you (or at least I) only start understanding how and why things work once there is some contrast and some language where it's done differently.

Emil_
Автор

Articles like this show very well what happens when you replace authors with AI text generators.

Linuxdirk