We all learn from experience, so what are the tips or techniques you wish you’d discovered earlier?
For further actions, you may consider blocking this person and/or reporting abuse
We all learn from experience, so what are the tips or techniques you wish you’d discovered earlier?
For further actions, you may consider blocking this person and/or reporting abuse
Jasmeet Singh -
Mr #1738 -
Jagroop Singh -
Hossein Yazdi -
Top comments (19)
The one thing that transformed the way I write code now the most was when I started to use
early returns
. In my opinion it makes it so much more readable. That's definitely one thing I wish I discovered earlier.One little one for JS...
If you want to debug code like this:
And it isn't working, so you want to add a log to see what's going on. But it's a pain because you think you need to build out the entire function body like this:
Which is also annoying because once it works, you need to remove all that extra syntax.
Instead, you can use a comma, like this:
JS will evaluate both statements and send the value of the final one.
It's a little thing, but makes my life a little nicer on a daily basis :)
I hate to be the smartass who mentions a book but the experience was genuine. I've been working professionally as a software developer for 6 years and recently I picked up "The Pragmatic Programmer" by Andrew Hunt and David Thomas.
I feel like this IS THE BOOK that I wish I had read when I was just starting out. It covers all the basic stuff that I had to learn by banging my head against the wall and more. It's pretty broad in terms of the topics it covers and it never gets too particular. The good news on that front is that it comes with a good bibliography that you can then follow up on.
If you're just starting out READ THIS BOOK. It will save you a lot of time, headaches and make you look amazing in comparison with your fellow juniors.
There are a lot of books out there people should read and absorb (some of) the material. From the top of my head the following books are a must read (take your time):
They are universal, present a lot of opinions. It is up to you to pick the parts you want to work with.
School taught me to hate reading books by mandating the kind of books to read. I recall that I used to read quite a bit as a kid, but once school started to mandate reading books it put me off. It put me off to reading books in general. Quite a few years ago I started to read books again, mostly non-fiction. I try to read a few chapters after lunch on Saturday and Sunday. Reading non-fiction books quite often gets me motivated to work on various things.
All of those are on my "reading list" so I think I've chosen wisely (I'm assuming you mean Clean Code by Robert C Martin and not Clear Code).
I have the same experience reading these general purpose coding books. It fills me with motivation to try new stuff and when you see how much better you can get everyday by just applying some new techniques you've read about, it really motivates you to keep going.
Change the text editor theme when you read someone else’s or your own old code.
It makes it stand out more and forces you to focus.
Also changing the theme on preferred text editor when run as root.
In no particular order.
One thing that really improved everything on a project I worked on was promises. As a beginner I kept on piling up
setTimeout
s until the application wouldn't even load.If I knew this beforehand it would've saved me a looooot of time.
Under promise, over deliver.
How to really do Test Driven Developement
SOLID principles
Continuous testing
Make changes in small batches
How to make code readable and understandable
any tips, materials, extraordinary book on #1?
Yeah Test Driven Development by Example, by Kent Beck
Think first, code later.