Home

Programming Principles Quotes

There are 110 quotes

"These three axes, so to speak—correctness, design, and style—are really the overarching goals when writing code."
"You should be able to afford to write nice programs, and for that reason, you should be able to do simple things simply and cheaply."
"Understanding code is important. Terms like readability get thrown around an awful lot in our industry."
"Separation of concerns: HTML for content, JavaScript for behavior."
"Cohesion principle suggests that related functionalities should be part of one unit, like a class."
"Any non-zero value in a computer language like C is considered true, also known as truthy."
"Everything's being defined in a declarative manner."
"Interfaces: When a class implements an interface, it promises to implement its methods, enhancing flexibility."
"Encapsulation protects data, ensuring it's accessed and modified safely within classes."
"Solid is a set of five principles for programming that you can apply to just about any language."
"Worst written code with tests is better than better written code with no tests."
"Easy/safe to share... just because you can see it doesn't mean you can change it because it's immutable."
"Remember, order of operations is important in programming."
"The first rule of functions is that they should be small, then the second rule of functions is that they should be smaller than that."
"Fundamentally, you need to be able to decide what you'd like your software to do and write that down in code—that's your test."
"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."
"The simplest things are the hardest to create. It's really hard to write simple code, and simple code is the best code."
"Python APIs are clean and beautiful. They don't have getters and setters everywhere. In fact, if you find yourself dividing, assigning a getter and setter, you're probably doing it wrong."
"Have your methods, your classes focus on one job and do it well."
"Functional programming is about side-effects mostly avoiding them unlike this dude so functional method is pure and pure methods or pure functions as opposed to impure will avoid sound effects kind of like an agent."
"Everything you open in PHP you have to close in PHP."
"Constants allow you to define a constant value that cannot be changed."
"Understanding the distinction between actions and calculations is fundamental in functional programming."
"Explicit is better than implicit and errors should never pass silently."
"Dependency Inversion Principle: The most flexible systems refer only to abstractions, not to concretions."
"Depend on abstractions, whether abstract classes or concepts, instead of concrete types."
"Single Responsibility Principle: Each module should be responsible for a single task."
"Pure functions result in clean code."
"The same input always gives the same output."
"A pure function should have at least one parameter."
"No input state can be modified when we're writing a pure function."
"We're going to make a nice separation of concerns."
"Make your programs small, make your programs simple, and build modular programs."
"Value objects must be immutable to allow sharing value objects safely."
"This is the principle of dependency injection."
"You don't want to get a bit of code that's spaghetti; you want to get a code that's well structured and laid out."
"It's not strictly about that it's always nice to have more readable code, but this is about being able to rely on the compiler to prove things for you."
"The Rule of Three: If your class directly manages some kind of resource, you almost certainly need to hand-write three special member functions."
"Being trivially destructible and trivially copyable are probably the best things you can do to write optimizable code."
"Follow the rule of zero and understanding triviality is one of the main keys for writing code that is constant or friendly."
"Make it right before you make it fast."
"A constant is a fixed value that cannot be altered by the program during its execution."
"This is more on the principle of functional programming and how you can use and leverage functions as values."
"There are almost no absolutes in programming."
"The interior mutability pattern gives us flexibility, but we have to be careful and make sure that our code abides by the borrowing rules."
"Knowing when to use inheritance and when to use an interface is important."
"Interfaces are consumer contracts, not producer or implementer contracts."
"You don't communicate by sharing memory; instead, you share memory by communicating."
"Do not communicate by sharing memory; share memory by communicating."
"The main idea is that every file by default is a module."
"You have it in one spot with all your logic; have that DRY—don't repeat yourself."
"Bindings exist so that we can have a single source of truth. We don't ever have to duplicate our State or copy it into a var inside a View or something because that View can always just have a Binding to the actual source of truth somewhere."
"Python is strongly typed, meaning it doesn't convert data from one type to another type automatically."
"Make it work, make it right, make it fast."
"Regular is what we mean when we say do what int does."
"The code expresses itself; it is open and obvious about what it does, how it does it, why it does it."
"Code to the interface, not to the implementation."
"Component composition is so important."
"Keeping the code as separated as possible and having tiny methods that do one thing and small classes that are responsible for one thing."
"All data values in Elm are immutable."
"Why we should prefer composition over inheritance."
"Without mutable state, a function is truly modular because it can be understood entirely in isolation."
"Unsafe by default is better. It's the same principle behind 'const' ultimately, right? And we like 'const'."
"There's a fundamental difference between working with classes that have static members versus instance members."
"The fundamental purpose of OOP: data and functionality right there next to it."
"The very first rule of handling user input is to not trust user input."
"You can think of modules like the main route of your entire application."
"It keeps everything maintainable and adheres to the DRY principle of 'Do not repeat yourself'."
"Whatever you declare inside of the curly brackets of a function is only recognized and can be used inside of those curly brackets."
"Rails aims to create beautiful, simple, and self-documenting APIs."
"You should be able to start with the simplest driver possible and then you opt into the complexity as you need functionality."
"It really cleans up our code and tells us how to tell the browser and the developer the meaning of our code."
"The mantra of Julia: zero-cost abstraction. Get a real nice abstraction, but there is no cost to it whatsoever."
"It's very important when you have basically value classes or data classes."
"Thread safety isn't just documentation, it's actually law in Rust."
"Flat is better than nested in the structuring of your program."
"We want a type system that proves our code works on their specified types. We want to improve developer experience. And we don't want to restrict Elixir idioms."
"If you ever find yourself copying and pasting code, you really need to think, 'Is there a better way to do this?'"
"Stay DRY, which basically means don't repeat yourself."
"You shouldn't have to pay for what you don't use."
"This ability to sort of lay out your memory frankly, or lay out a value structurally, turns out to make your program quite a bit more comprehensible."
"Value-based by default is a very good idea; it lets you reason locally."
"TypeScript supports object-oriented programming principles like classes, interfaces, and inheritance."
"That's really one of the greatest benefits of dependency injection containers."
"The most important thing to actually take away from this is how the code is actually organized."
"Abstraction basically allows us to take programming concepts and display them in a more simplified manner."
"OOP is not the use of any specific language, but rather a way of software design based on the three fundamental concepts of: Encapsulation, Inheritance, and Polymorphism."
"The core principle we drive forward in PyTorch is that building models leverages a familiar imperative and object-oriented style."
"They must be interruptable, concurrent, composable."
"And then that's it, it's done, it no longer exists and it's just local to the function."
"Encapsulation is the idea of making things private so outside classes cannot interact with the private things inside of this class."
"Ecmascript 5 is statically scoped where possible."
"If your data is going to change, make it a variable; if your data will never change, make it a constant."
"The core programming principles you learn here aren't just limited to JavaScript; they're transferable to other languages too."
"The MVC pattern is quite simple and we have to follow this pattern."
"Espresso will kind of have a formula that is what people call a fluent API."
"This is the core concept of encapsulation and why you should be using it."
"We should be doing things declaratively instead of imperatively."
"Reuse code as much as possible. Avoid any duplication."