logo

Quotes About Code

Mohandas's marriage, which was arranged when he was thirteen, lasted for the next sixty-two years. Despite his enduring reputation for living a life of simplicity and self-denial, he did not come to this easily and struggled in his youth with uncontrolled appetites, both sexual and gastronomic. In violation of his family's religious code, he experimented with meat eating, hoping it would make him large and strong like the carnivorous English.
~ Mark Kurlansky
If you have to translate code to statements to understand it, it should probably be statements in the first place.
~ Unknown
Python "best practice" rule of thumb is to use docstrings for functional documentation (what your objects do) and hash-mark comments for more micro-level documentation (how arcane bits of code work).
~ Unknown
Design note: as we'll learn in Chapter 30, the __repr__ method is often used to provide an as-code low-level display of an object when present, and __str__ is reserved for more user-friendly informational displays like ours here.
~ Unknown
The problem here is a very general one: anytime you copy code with cut and paste, you essentially double your maintenance effort in the future.
~ Unknown
Think about it: because we copied the original version, if we ever have to change the way raises are given (and we probably will), we'll have to change the code in two places, not one. Although this is a small and artificial example, it's also representative of a universal issue — anytime you're tempted to program by copying code this way, you probably want to look for a better approach.
~ Unknown
composites. We'll explore this pattern in more detail in Chapter 31, which is really more about design than about Python. As a quick example, though, we could use this composition idea to code our Manager extension by embedding a Person, instead of inheriting from it.
~ Unknown
When people write software, they are not writing it for themselves. In fact, they are not even writing primarily for the computer. Rather, good programmers know that code is written for the next human being who has to read it in order to maintain or reuse it. If that person cannot understand the code, it's all but useless in a realistic development scenario.
~ Unknown
In a sense, a module is like a single-instance class, without inheritance, which corresponds to an entire file of code.
~ Unknown
That is, a class is a local scope and has access to enclosing local scopes, but it does not serve as an enclosing local scope to further nested code.
~ Unknown
as this little function isn't needed elsewhere, it was written inline as a lambda.
~ Unknown
Project: Potential was a separate class that the gifted students went to for an hour each day. The name was supposed to make it exciting, like Code Name: Cursive or Mission: State Capitals.
~ Unknown
I mean that it is possible to be unselfish without a moral code, sophisticated without and education, and beautiful wearing a skeleton on the outside.
~ Unknown
Fair knight, the code of love says that marriage is no obstacle to lovers." Her brow wrinkled. "Does that satisfy you?
~ Unknown
It's not a baby, it's a copy of me, made with code." Amena folded her arms and looked intensely skeptical. "That you and ART made together, with code. Code which both of you are also made out of.
~ Martha Wells
Reaction 1: oh, that's who had hacked my code. Reaction 2: flattering that they thought I was dangerous enough to pay for the contract on a Combat SecUnit. Reaction 3: I bet PortSec did not okay that and was going to be pissed off. Reaction 4: oh shit I'm going to die.
~ Martha Wells
I've had clients who thought they needed an absurd level of security. (And I'm talking absurd even by my standards, and my code was developed by a bond company known for intense xenophobic paranoia, tempered only by desperate greed.)
~ Martha Wells
I'm letting you see all this because I want you to know what I am and what I can do. I want you to know who targetControlSystem is fucking with right now. I want you to know if you help me, I'll help you , and that you can trust me. Now here's the code to disable your governor module.
~ Martha Wells
This is Tremaine Valiarde." There was a faint gasp at the other end. "I can't speak long"—family code for someone is listening—"but I needed to let Uncle Galiard know that I'm all right." I need help and I need it now.
~ Martha Wells
I've had clients who thought they needed an absurd level of security. (And I'm talking absurd even by my standards, and my code was developed by a bond company known for intense xenophobic paranoia, tempered only by desperate greed.) I've also had clients who thought they didn't need any security at all, right up until something ate them.
~ Martha Wells
There is an ancient belief that the gods love the obscure and hate the obvious. Without benefit of divinity, modern men of similar persuasion draft provisions of the Internal Revenue Code. Section 341 is their triumph.
~ Unknown
Code that communicates its purpose is very important. I often refactor just when I'm reading some code. That way as I gain understanding about the program, I embed that understanding into the code for later so I don't forget what I learned.
~ Martin Fowler
Even so the program works. Is this not just an aesthetic judgment, a dislike of ugly code?
~ Martin Fowler
If oy have to spend effort looking at a fragment of code and figuring out what it's doing, then you should extract it into a function and name the function after the "what".
~ Martin Fowler