From the course: Career Clinic: Developer Insights
Clean code practice
From the course: Career Clinic: Developer Insights
Clean code practice
- Yes, document your code. Next. Testing is very good. You need to figure out ways to do that, because when you're starting to work with a reusable framework over time, you need to make sure that you're not experiencing regressions. But that seems kind of obvious. So going into writing clean code, I think this is the most important thing to go over. There are a lot of things that processors these days brag to be able to do on the orders of thousandths or 10 thousandths of seconds. If you're not in an academic environment where that kind of edge is required, and I've been in that kind of environment where 1/10,000 of a second is important, it's not so common to run into that anymore. Make sure that what you make works and make sure that you're open to learning new ways to do things. Let's say, for example, you iterate through a loop of something and someone says, "Oh, it sucks that you did that that way. "I have a better way to do it, "and it'll save you 1/100 of a second." Consider the pros and cons of that. Don't just blindly go into it because it's automatically better. It might be a more difficult way to go about it. It might not fit into the scheme of your application or your framework that you're developing. But just make sure that it works for you. Consider the environment that you're in, whether or not that kind of time difference is really important and pertinent to what you're working on. But when it comes to writing clean code, don't be afraid to make mistakes and be open to constructive criticism from people. - I would say, for one thing, do what works for you. Not everybody else's process is going to be the exact right process for you. Also, again, take the time to be passionate about the code you write. When you write something that's ugly and it's going to keep you up that night, try to take the time to go back and clean it up. It won't probably take as long as you think. Also, share that with other people as other people shared that probably online with you through various resources. And that can help improve it. They can make suggestions to your code. But really be passionate about it. Enjoy it. Sometimes that elegance of something you write is something you can really be proud of, even though, again, a lot of people may not see it. You'll also be glad a year from now when you have to go back in and change it or fix bugs that it was well-written and nice and clean. But that's part of it. I mean, sometimes the back of a tapestry can be artwork too, and so sometimes the code is something that you can really take pride in beyond just the result of the app running on the phone or whatever you're developing. - We write documentation, and everyone assumes that because, whatever, you speak fluent English and that you can write English, therefore you can do documentation. But it really doesn't work that way. Documentation is all about who you're writing it for. You have to understand your target audience. Who actually is going to use your product? And how can you present this information in a very clear, concise way? Developers in general overestimate how much their target audience knows always. So you need to think lower. If you make the documentation too basic, quote, too basic, it's really not too basic. It just means it's very understandable for beginners. And for advanced people, they get to what they need really, really quickly. You're not going to offend anybody if you make your documentation too easy to understand. - Good documentation has saved me so many times. I can't even tell you how many times. Because especially now in my career where I'm working on multiple projects at the same time, each process has its own needs, its own bits and pieces, being able to refer to a source of truth where this is how we're doing the project, this is what our expectations are for the project, that's an amazing thing. Now, keep in mind that I am referring to documentation at a larger scale, at a project scale. I work at the project level, and so I'm always thinking about what are the style guides we use? What's the playbook we have in place for this? What are our standard solutions for issues? Do we have our continuous integration system in place, our CI in place? There's also code level documentation. My preference for code level documentation is self-documenting code, which is its own sort of technique, its own skill, being able to write code in a way that is readable. I forget who said it, very famous developer. He basically said he spends 90% of his day reading code. That was a very powerful moment for me, because I realized he was absolutely right. I spend more time reading code than I do writing it, and so having self-documenting code, code that's easy to read, that makes sense as soon as I see it, I don't have to think about it beyond what I'm seeing, that speeds up the process tremendously.
Contents
-
-
Kirsten Hunter4m 55s
-
Mary Ellen Bowman3m 40s
-
Ray Villalobos4m 51s
-
Rae Hoyt4m 25s
-
Steven Lipton4m 26s
-
Diversity in tech5m 23s
-
Mohammad Azam4m 49s
-
Chiu-Ki Chan4m 56s
-
Maximiliano Firtman3m 27s
-
Carrie Dils2m 40s
-
Ted Neward5m 13s
-
Shonna Smith3m 1s
-
Janan Siam4m 3s
-
Emmanuel Henri3m 28s
-
Albert Lo3m 9s
-
Christina Truong3m 1s
-
Sasha Vodnik3m 47s
-
Jen Kramer4m 25s
-
Freelancing5m 14s
-
Upcoming in tech3m 39s
-
David Okun3m 57s
-
Learning and obtaining new skills3m 43s
-
Perseverance3m 59s
-
Clarissa Peterson4m 27s
-
Starting a business3m 27s
-
Mind of a developer4m 7s
-
Derek Peruo5m 26s
-
Clean code practice5m
-
Mentorship3m 33s
-
Bear Cahill3m 4s
-
Networking5m 15s
-
Ketkee Aryamane3m 28s
-
Conferences4m 19s
-
Meetups4m 19s
-
Leigh Lawhon2m 48s
-
Star Wars or Star Trek1m 43s
-
Unexpected opportunities4m 58s
-
Acting on your ideas3m 30s
-
Matt Boyd2m 31s
-
Career changes3m 53s
-
Business tips4m 57s
-
Bonnie Brennan2m 8s
-
Collaboration and open source5m 44s
-
Communication skills3m 49s
-
Upcoming in tech3m 46s
-
Diversity in tech5m 15s
-
Mind of a developer3m 48s
-
Working across generations5m 35s
-
Mentorship5m 33s
-
Conferences4m 59s
-
Collaboration on projects4m 26s
-
Networking3m 30s
-
Introversion5m 22s
-
Raising concerns4m 19s
-
Dealing with conflict5m 20s
-
Work-life balance5m 25s
-
Impostor syndrome5m 24s
-
Learning and obtaining new skills1m 42s
-
New tools learned4m 16s
-
Favorite gadgets/tech3m 46s
-
Communication skills5m 3s
-
Diversity3m 23s
-
Mentorship4m 29s
-
Motivate kids/development3m 31s
-
Work/life balance2m 14s
-
Perseverance4m 49s
-
Introversion3m 40s
-
Imposter syndrome3m 39s
-
(Locked)
Self-promotion3m 36s
-
Favorite projects4m 59s
-