DEV Community

loading...

What bad habit do you have because you learned an approach *before* a better idea came along?

ben profile image Ben Halpern ・1 min read

When have you found yourself sticking to old ideas which are almost certainly worse than something which came around to replace it?

Discussion (54)

pic
Editor guide
Collapse
ben profile image
Ben Halpern Author

For me it's pretty much everything CSS. Learning all the ways to use float, position:absolute, to make stuff happen really stuck with me way too long after better things came along.

I'll also say that I had the same problem with sticking to table alignments well after they'd been replaced by better modern ideas.

Just in the past few months have I started shedding some old bad habits as I'm adopting the Crayons design system that @pp and @lisasy are implementing for DEV.

Collapse
rsa profile image
Ranieri Althoff

I have the opposite experience. I know a lot of people that stick flex in absolutely everything and forget the basics like margin: 0 auto;. Absolute positioning and float solve some problems very neatly.

Collapse
marbiano profile image
Martin Bavio • Edited

I was about to write something very similar, so I'll just leave it as an expanding comment.

I think that learning how to properly build an entire layout with float had such complexity and sense of wizardry, that it became super hard to let go. I still find myself thinking about how to do it with float and clear elements, even when we have flex and grid at our service.

Old habits, that took a ton to grasp, die hard.

Collapse
pika1998 profile image
Prafulla Raichurkar

I've been here, things like using pixel values, not using a mobile first approach. The worst habit of mine is I just start implementing stuff without investing much in why am I doing this or what could make it better, or just searching better practices before trying to implement it

Collapse
perpetual_education profile image
perpetual . education

So, you just write 'crayon' on every element? ; )

Collapse
frankfont profile image
Frank Font • Edited

Took me TOO long to realize that collaboration was the opposite of a burden.

Being successful for years creating solutions and solving programming problems myself blinded me to the much more powerful sustainably productive outcomes of working with others.

I really think a "collaboration first" mindset is how we will survive and thrive in the increasingly competitive technology field.

I took a stab at explaining the mechanics of successfully doing that here “Eight Principles of Effective Collaboration” by Frank Font link.medium.com/Kn5yWgpos7

Collapse
perpetual_education profile image
perpetual . education

Huge win! You can learn so much more from each other when collaborating.

Collapse
downey profile image
Tim Downey

I learned to put two spaces after a period cause of typing class in high school. I still do it out of habit... even though everyone says it is bad. 😔

Collapse
ben profile image
Collapse
peter profile image
Peter Kim Frank

I have such a hard time ever imagining breaking this habit.

Collapse
perpetual_education profile image
perpetual . education

!! So many clients to that. Line breaks! haha. Clad you're going to stop! ; )

Collapse
t4rzsan profile image
Jakob Christensen

It's not bad 😊

Collapse
jvarness profile image
Jake Varness

I try to avoid TypeScript. Much bigger fan of JavaScript

Collapse
ben profile image
Ben Halpern Author • Edited

Same here... for now. I wonder if TS will become the de facto standard in the future.

(Actually I wouldn't say I'm a much bigger fan. My reasons are probably more out of apathy. I wouldn't reject TypeScript per se.

Collapse
teekay profile image
TK

As a person who started coding with Python, Javascript, Clojure, and Ruby (and was frustrated with C++), I always liked dynamically typed languages. After learning Haskell and now that I'm using Typescript I can say that I should have learned Typescript earlier. It's so powerful and I feel safer and in a environment with better-documented code.

I still like doing some scripts with Python or playing around with Lisps, but if I'm starting a new project (website or dev tools), I tend to use Typescript.

Thread Thread
jvarness profile image
Jake Varness

Don't get me wrong, type safety is really convenient when you start talking about larger systems with more complex business requirements.

For websites, I'm still more likely to reach for JavaScript. Call me a fuddy-duddy but I feel more productive. Between Jasmine/Mocha tests and ESLint I feel pretty confident most of the time.

Collapse
jvarness profile image
Jake Varness

It's really hard to call onself a fan of JavaScript because of how convoluted it can be, but I just kind of feel like things are super easy to accomplish in JS.

This is also coming from someone who doesn't know Ruby or Python very well lol.

Collapse
perpetual_education profile image
perpetual . education

Typescript is JavaScript - isn't it? It's a super set, right? Any regular Javascript is valid TypeScript, syntactically.

Collapse
jvarness profile image
Jake Varness

Sort of. An example is that you can't use regular expressions the same way. I'm turnt that you have to construct a new Regex in order to use a regex.

The typing system doesn't feel very strong to me either. It feels much more like duck typing than actual type safety to me, but this is also coming from someone who has a pretty extensive career using Java.

I get that for certain things there's compile-time checking that can help you not make mistakes, but I'm still failing to justify the time you gave to spend accounting for those things while also remaining productive.

Collapse
msfjarvis profile image
Harsh Shandilya

I've spent the last 10 minutes wondering what to write in here and came up blank. Hard to tell if I've always been quick to adapt or just never learnt anything :p

Collapse
waylonwalker profile image
Waylon Walker

Typing... They taught touch typing when I was in elementary school and I was terrible at it and didn't get very far.

I am now trying to break bad habits with keybr.com.

A few years ago I made major improvements, regressed a but and am now getting better than ever.

Collapse
ben profile image
Ben Halpern Author

I'm not a very skilled typer, maybe I should check this out too.

Collapse
srleyva profile image
Stephen Leyva (He/Him)

typing.io/

This is pretty cool. Typing practice with coding in mind.

Collapse
waylonwalker profile image
Waylon Walker

It's Soooouch more advanced and cool than what I used as a kid. It has very clever ways of building word like things to stretch out certain fingers without being repetitive.

I remember as a kid it was. i i i ij ij ij iji I

It has also made me realize that my struggles are all in my left hand 🤔

Collapse
utkarsh profile image
Utkarsh Talwar

I've actually been thinking lately about improving my typing as well. Thanks for the resource!

Collapse
hammertoe profile image
Collapse
itsjzt profile image
Saurabh Sharma • Edited

I used to adding both curly braces then go right, then enter and then type the body.

Some editors which autocompleted braces annoyed me

Collapse
easrng profile image
easrng

I do the same thing!

Collapse
lbonanomi profile image
Collapse
ben profile image
Collapse
giorgosk profile image
Giorgos Kontopoulos 👀

What is the problem with table ? As far as I can tell it is not going to be deprecated or replaced any time soon (or actually never) :-p

Collapse
lbonanomi profile image
lbonanomi

Table tags for tabular data are fine, as long as you label the columns correctly. Displaying a page as a 100% x 100% table and using that as all your page layout scheme... well, I used to get an earful from my mother about what this did to screen reading software and its bound to look like Hell on a smart phone.

Thread Thread
giorgosk profile image
Giorgos Kontopoulos 👀

Sure I was thinking to you wanted to replace it!!

Collapse
brunolemos profile image
Bruno Lemos

When building a landing page or a MVP, for example, I always build it myself from “scratch”. Maybe I should start using some nocode tools or even hiring someone to save time and quickly test things.

Collapse
johnylab profile image
João Ferreira

I possibly have the worst one. Coding in ASP3 VB Script after .NET MVC4 being available. I learned ASP first cause I guessed PHP was kind of a next level. So I should try the easier first, and happened to never coming to learn PHP at all.

Nowadays I'm forced to code in C# thanks to my current job.

Collapse
habereder profile image
Raphael Habereder

For me there are a lot "I learned a bad approach before learning the right approach" things.

!important was one of those "I need it to work now" habits.
I had no idea what classes were, so I did a lot of inline-styling too.

Nobody explained css to me back in the day, so that took a lot of reading, feedback and discipline to fix.

Collapse
jacoby profile image
Dave Jacoby

I dunno if "habit" is the correct term, but I'm a dyed-in-the-wool Perl-and-CGI guy from the 1990s who has tried to reinvent MVC within the CGI context because actually getting a post-Rails application into my prev-job environment would've required so much shoehorning.

And nothing I've played with on my own since the new job has had anything to do with back-end code.

Collapse
n8chz profile image
Lorraine Lee

I'm Gen-Jones-Gen-X cusp, so like everyone in my age cohort, my first language was BASIC--specifically old-school basic with LINE NUMBERS (and without scope). I learned ALL the bad habits and had to painstakingly unlearn them over the last four decades.

Collapse
lbonanomi profile image
Collapse
giorgosk profile image
Giorgos Kontopoulos 👀

What is the better alternative ?

Collapse
lbonanomi profile image
lbonanomi

Based on articles I've seen on dev.to good ol' bash is losing market share to ZSH and fish. My sticking to bash when these shells offer an alternative may remain value-neutral for another 5-10 years, but I think that my adherence to bash will prove to be an old man's quirk before the decade is over.

Collapse
vunderkind profile image
mogwai

I still use pixel values when defining border radiuses on my buttons ._.

Collapse
developertharun profile image
Tharun Shiv

Not using a consistent naming convention throughout the project.
I tend to mix up between snake case and camel case.

Collapse
hyliancoder profile image
ΔNDRΞW • Edited

Lone Wolf to a Team setting. I love the benefits and commeradarie. But I forget I can lean on others instead of banging my head for hours trying to get past a block.

Collapse
pika1998 profile image
Prafulla Raichurkar

This is such a good conversation, a bad habit would be not learning from these.

Collapse
jeikabu profile image
Collapse
radoslaven profile image
radoslaven

Git update, it costs me 1 second per pull but at the end of day, if it is 1000 pulls per week it is almost 5 minutes. Also IoC and autowiring annotations

Collapse
bernardbaker profile image
Bernard Baker

Not refactoring immediately.

Collapse
matt profile image
Matt Seymour

I have an extremely bad typing technique (which I am now correcting). This was partly because I learned to type when computers in homes were not a common thing (darn I sound old).

Collapse
lehmannsystems profile image
Mike

Always wanting to change HTML elements using the Jquery way. Why bind that when I can just select it with Jquery and change it?!?! :D

Collapse
sths20 profile image
säthïs

Inconsistent in learning a new language 😑

Collapse
hammertoe profile image
Matt Hamilton

That Javascript is shit? I started on it back in the day when it was vying with JScript in the early days of the web. It has come a long way, and I'm still trying to make my peace with that and actually use Node.js at times.

Collapse
easrng profile image
easrng

JavaScript and JScript are the same language with different names, to avoid lawsuits.