RSSAmplifier

Blog

Code with Jason

codewithjason.comRSS feed ↗10 posts

Latest posts

No epicycles

In ancient times, before astronomers figured out than the Sun rather than the Earth is at the center of the solar system, astronomers tried to figure out how to model the motions of the planets under the premise of geocentrism. Because their geocentric model of the solar system was fundamentally wrong, the models they came [ ] The post No epicycles appeared first on Code with Jason .

That’s not refactoring

I once worked for a client whose developers would sometimes embark on what they called refactoring. These developers had an interesting conception of what refactoring was. To them, refactoring was when you experimented with new design patterns. Sometimes the behavior of the refactored code would stay the same and sometimes it would change. Refactoring is [ ] The post That s not refactoring…

Abstraction != abstractness

An old man dies of a heart attack. What do we choose as the explanation for his death? We could simply say he died of a heart attack and leave it at that. Or we could say that his brain activity ceased due to lack of oxygen to the brain. Or we could say that [ ] The post Abstraction != abstractness appeared first on Code with Jason .

Programming principles as memes

In 1976 in The Selfish Gene, Richard Dawkins explained that the unit of selection for evolution is not the group or species or individual but the gene. Genes that are best at causing themselves to get replicated are the ones that do get replicated, and so those genes then become predominant. An organism s body is [ ] The post Programming principles as memes appeared first on Code with Jason .

Meatspace abstractions

Abstractions are not just for programming. Abstractions are used in real life too. The concept of a gear in an automobile transmission is a good example. What we call first gear, second gear, etc. are actually configurations of multiple gears which result in spinning the driveshaft at different speeds. You might call each gear a [ ] The post Meatspace abstractions appeared first on Code with Jason…

How do we tell what’s a good programming practice?

I ve been thinking lately about the question of how to decide what s a good programming practice and what s not. One way of looking at this is that it s all just subjective opinion. Just do whatever works for you. You might call this the anything goes principle. The problem with the Anything Goes Principle is that [ ] The post How do we tell what s a good programming practice? appeared first on…

Programming is technical writing

I enjoy reading nonfiction. Not just programming but also biology, physics, philosophy, mechanical engineering, robotics and other technical topics. The challenge in technical writing is to convey difficult ideas in ways that are easy to understand. The best technical writing doesn t make the reader think, Wow, the writer must be a genius to be able [ ] The post Programming is technical writing…

Sharp blades and dull blades

We all know the metaphor of technical debt. I want to share some weaknesses of the technical debt metaphor, plus a different metaphor which I think is better. In real life, debt is not inherently bad. If you have debt, all it means in most cases is that you took out a loan. Loans are [ ] The post Sharp blades and dull blades appeared first on Code with Jason .

Testing anti-pattern: accessing private properties

The point of private properties on an object, like private methods and private instance variables, is so you know what you can safely refactor without having to worry that you re going to mess up some external client that uses that object. Ruby provides sharp knives that let you get around privateness if you want to. [ ] The post Testing anti-pattern: accessing private properties appeared first on…

Testing anti-pattern: merged setup data

In a single test file, there s often overlap among the setup data needed for the tests in the file. For whatever reasons, perhaps in an effort to improve performance or avoid duplication, test writers often merge the setup code and bring it to the top of the file so it s available to all test cases. [ ] The post Testing anti-pattern: merged setup data appeared first on Code with Jason .