Home

Coding Practices Quotes

There are 162 quotes

"We're creating abstractions so that when we're actually going through our main function here of our code, we don't have to think about what ask question does; we just know we call it."
"Using namespace aliases helps readability, apart from resolving ambiguity."
"This is called keeping your code DRY, which stands for Don't Repeat Yourself."
"SRP forces you to think about what one thing a class does."
"Copying and pasting the code one more time is an act of criminal negligence."
"Premature optimization is the root of all evil."
"Realistically when we're coding, we're using stack overflow. Every serious coder I know uses stack overflow to build better answers." - Chris Peach
"This allows you to keep your code clean and avoid those print statements and log statements."
"Aiming for more general and complete concepts actually improves code."
"Don't worry about var, what you want to use is let."
"If we're gonna reset a value potentially, we're gonna use let."
"I mean don't have globals, if you can avoid them, obviously."
"You're not trying to show off and write absolutely just show everyone that you know every single zip ocelots feature out there."
"You don't have to spend the whole rest of your programming life just putting individual print statements everywhere."
"We think this is a really powerful feature that enables you to do smaller commits and get a better overview of the changes you make."
"I remember a lot of my fellow developers were just masters at global find."
"Use 'Option Explicit' to ensure variables are declared."
"You have to experiment with your values in CSS."
"We should avoid magic numbers as much as possible."
"Methods: Methods allow you to avoid duplicate code and help you organize."
"Better comments: annotate and document code more efficiently."
"Coding challenges are a great way to improve your skills."
"It's a nicer experience to type into a website which posts your code across the Internet to someone else's machine that builds it and sends it back than it is to just do it locally."
"I just think it gives you a good way to make sure your code is consistent and clean."
"Bitters is the idea behind those styles so that once you start a project, you throw bitters in there and it gives you a nice-looking site right from the start."
"Our resulting rendered CSS will have normalized at the top and then did we import bourbon really I'm sorry do we import bitters."
"By structuring your page this way, your code is going to be easier to maintain, it's also going to be easier to update, and it's also going to make your code much more readable."
"Let's add one more code block to the base.html file for the browser's tab title."
"By writing tests along with your code, even if your code is a little bit messy, it actually helps make your code better."
"Now, if we didn't own the repository, or we didn't have access rights, or we needed other people to review our code, before we merged it in with all the rest of the code, then we would also have to take the extra step of making a pull request."
"Test-driven development means that you write the test before you write the code."
"Testing your code is the most exciting thing to do."
"This helps a lot, especially when you're writing programs that have tens of thousands of lines of code."
"Separate functions or methods do one thing and do one thing very well."
"This is how you're including Vue.js right here."
"Do not think about the clean or perfect code. Think about the best solution to the worst problems."
"One way is to create scripts and write your code in here rather than executing them individually on the command window."
"Make the code checkable and then check it whenever you can."
"Always use polymorphism if you can get rid of if and switch statements."
"I think that's something that you should always think about... what does the code actually read like when it's done right?"
"Designing your code to always work with TDD makes better code."
"You're not testing how the code does things, you're testing what the code is meant to do."
"Test-driven development can and does work in all of these cases."
"It forces us to pause and consider a bit more carefully what we'd really like our code to do before we actually write the code."
"So, if I get a null let's bring this down here and attach an expresso tag onto this which will open up the expresso editor and let's call this light switch."
"When does testing begin? Testing begins with the code."
"Handling state is great, but you don't want to have a giant, big, single state class with tons of complex state in there."
"Essentially inside of this advanced component, we're using this user variable inside of our useEffect but it doesn't appear inside of our dependencies here."
"Writing better, cleaner, more scalable, and easier to understand code is a really big deal, especially if you're working for a company or on some type of team."
"Simple code is easy to debug, easy to read, easy for other people to understand, and will live in the code base for a long time."
"It's good to have to, yeah, unless you just shorthand both. I'd like to have multiple."
"One of the goals of the unit tests that we write should be that whenever the code is not doing the right thing at least one of our unit tests should fail."
"Another thing that will help you follow along with your code and also help other people with your code is entering comments."
"Nobody wants to open up a bunch of source code to find paragraphs called do file stuff or test123."
"Using the local scope of a function makes it easier to understand and easier to work with."
"So what I can do is say T and the value of object is now T, but I also want to put some constraints on the generic type."
"Technical debt is the implied cost of additional rework caused by choosing an easy or limited solution now instead of using a better approach that would take longer."
"Without Git, you would have to resort to trying to remember what you changed."
"You want commits that are very detailed as to what changes were made."
"You write good names, you write short functions, that's what we do here."
"Start using git today to manage your project's code effectively."
"When you have to go back and change this code in the future, it's about writing something that's easy to read and easy to maintain."
"For anybody who's ever gone back and looked at code from years ago that doesn't have comments it's definitely a lifesaver to have good documentation that can tell us exactly what's going on."
"Long descriptive names but when you're context aware do not bloat your naming."
"Creating a better design is the simple goal with refactoring."
"I don't want to do that in the constructor because it's going to be a little bit messy."
"You always want to load your JavaScript code just above the closing body tag."
"Readable code is about fast and effective communication."
"It's important to keep your code clean and readable even if nobody else is going to be looking at it."
"Instead of just copying from a global array here, let me write a function called all options."
"Embrace the 'don't put all your eggs in one basket' philosophy because we know where that leads."
"Don't be afraid to reinvent the wheel simplify your code constantly because it's easier to optimize and practice optimization and you'll learn how to write pass code by default."
"Don't name your variables C and R, it's overwhelming."
"And that comments out everything in between it, so anyway now we've commented that out it's not going to be used by the browser."
"The reason we write our tests first is so that we know that every line of code we wrote was because of a failing test."
"Try to be simple. Try to be easy. Do not create really deep folder and deep files because otherwise you will have very long name at the end."
"...this is exactly a scenario where if we had just called get seconds even though yes it is more code and it does look less clean it provides more information and I think that's one of the most important things about programming."
"...this is basically a no-brainer I don't see any controversy with writing a bool conversion operator I think it's great."
"So, let's finish up: Avoid pure code, avoid non-pure code in your core domain, that's the main takeaway from this talk."
"Efficient terraform coding practices, like using workspaces and modules, are key skills for devops engineers."
"Understanding how to write code that is unit testable, I think, will over the long run help you understand how to basically structure your code."
"The unsafety factor... will effectively lead you down a path of writing worse code and more unsafe code."
"Once your infrastructure as code file gets really big, a good suggestion or good practice is to have different resources within different files."
"TDD model helps you learn exactly how to code in the best possible way."
"By placing all my code inside this anonymous callback function, I separate the scope of my game from the global scope."
"The goal is to build a workflow where unit tests are part of coding efficiency."
"It's very easy, it's a uniform way of doing things, a very explicit way, so it's very easy to read, it's very easy to do pull request reviews and all that stuff, right?"
"Vue js is more robust than something like jQuery, since it gives you specific recommended patterns for code organization."
"Once you get used to writing unit tests, your code will also be better because you'll have thought about it much more carefully."
"Structure your coding in folders around your domains, this is my recommendation."
"You should never, never ever write code like that."
"Do what makes your code cleaner, do what you think you can most likely code correctly and what you can most likely maintain correctly."
"If we're careful about how we name things, it's much easier to be clearer about what each part of the code is meant to do."
"Descriptive names for your variables and functions really do matter; it really does make a big difference."
"Anything I show you today is for your knowledge and demonstration purposes; it does not mean you should do this in production code."
"This might look like something that makes you write more code to achieve the same thing, but in the long run, it is way more beneficial."
"Prefer exceptions to return codes; provide some context with those exceptions."
"You want to write code that people can read and understand and you want to write code that can be changed without breaking things."
"Less code is better, generally, as long as it's understandable."
"The most standard ones you should always be using are 'use strict' and 'use warnings'."
"If you think that a comment is necessary, that means you didn't name things well enough."
"The more descriptive name you put, the easier it's going to be to make your code cleaner and easier to read."
"Git is a version control system, just a way to basically keep track of your code as you change it."
"My number one recommendation, apart from remembering that you're not programming, is to code as simply and explicitly as you possibly can."
"Ideally, there should be some kind of symbiotic relationship between your coding and your tests."
"We read code much more often than we write it, and so we should write our code to be as readable as we can make it."
"Think data is the place where you put the dirty stuff; code is the place where you want to keep it as clean as possible."
"It seems like a lot of steps but I believe the reason they're doing this is one to reuse code and also to obscure some of the transaction details."
"I'd rather have my variables be incredibly verbose than have it conflict with other things."
"The interior mutability pattern gives us flexibility, but we have to be careful and make sure that our code abides by the borrowing rules."
"Not every rule will make sense for every project but hopefully you'll find a bunch of things here that will help you write better python code faster."
"Why reinvent the wheel, so why take a risk writing new code from scratch when we know this code works, we know it's solid and sort of tried and tested."
"If you can grasp this concept of how to write tests, how to refactor, how to split stuff up, you're going to be on a good path to writing some really beautiful code."
"I'm willing to sacrifice some verbosity, some explicitness, let's not call it verbosity, for the safer code."
"Test-driven development is the single most powerful tool you have for preventing bugs within your application."
"Once you realize the power of the Cascade, it can actually mean that you write a lot less CSS and more maintainable CSS along the way."
"We built it in a way where we can add stuff too, right? Sometimes, like in the code-wise, it's hard to build things where you can add stuff without breaking things, but we've done that very much on purpose."
"You don't want to copy and paste; you don't want to have duplicated code throughout your project."
"It's not required but it's a good practice to make sure your code is maintainable."
"BEM is self-documenting code because of the naming structure; it's so semantically accurate and readable that you don't need any additional documentation beyond it."
"It's just good practice, you can never have too many comments."
"You're writing code for other developers; always keep that at the back of your mind, and you'll naturally write better code."
"You should always try to write clean, understandable code and then use comment as an addition."
"Make sure your code is well indented so that it's very easy to read."
"You can't write serious code without a serious build system."
"Reusability involves defining code once and using it many times without having to rewrite it."
"You should embrace removing code wherever possible."
"Never, ever include sensitive information in your application's source code."
"It is considered good practice not to include the closing PHP tag if you don't intend to write HTML after writing PHP."
"Write some code that has nothing to do with the program itself but makes it easier to test and debug the program."
"Put 90 plus percent of your code in your class library."
"You have to treat your infrastructure as code."
"Asserts are things that you definitely want to be true."
"The ability to abstract your code away sort of like pull your code out of being tied to an operating system."
"This is how you can also build some error conditions in your code which are mandatory and which should be built otherwise your application will have a lot of bugs."
"Indenting is an easy way to make sure that you're writing code that other people and yourself in the future can go back and read."
"The cycle of write a bit of code, test, write a bit more code, and test it is a very good way of making efficient progress."
"Use explicit port references in module instantiations."
"So generally when you start writing code that counts, you should almost always start at zero."
"It's better for casting as well as for pushing the possible errors into the compile time section of your code."
"These methods that we write and we put into this class shouldn't be located in this class because this class has a single responsibility."
"TypeScript comes in when you want to write more of a polished and protected JavaScript."
"Don't repeat yourself... it's always best practices to try and only put code in one location."
"Avoid the hacks and keep stuff clean and simple."
"First thing I always do whenever I code in Python is I import the libraries that I'm going to be using."
"This is not just automation; you're applying all patterns and practices that you would apply to your production code."
"Automated testing is just coding... you got to apply good practices for that code as well if you want to make it maintainable, robust, and not just be a headache."
"You know when the code you've written is not straightforward, right? It feels hacky, it feels bad, it feels like this is not what we should be doing."
"By encapsulating all of their code inside of this anonymous function, they essentially have their own scope that doesn't risk clobbering any existing variable."
"Making code easy to write is your best protection against bugs."
"Modularity and separating concerns is really about our sanity as developers."