waffle

Philosophy

Based on a discussion I had earlier this week, I’ve been thinking a lot about my philosophy towards computers and programming and the Internet. I’m going to just throw out a few points, and you’re free to tell me how wrong I am in the monkey pit after the post.

  • Check in your personal prestige at the door.

  • C++ is object-oriented programming that’s easier for the machine and harder for you. Ruby, Objective-C or even C# is object-oriented programming that’s easier for you and harder for the machine. Wanna bet which one of you and the machine has the most potential to quadruple in speed over five years? Wanna bet which one tires first of doing harder things?

  • Optimize for people, not machines. That applies even if you’re writing stuff only machines should read, because they’ll need to have an interface other people can connect to other machines.

  • I don’t like designing classes. I just write them. I use properties, not methods, for things that only change and validate a value (and possibly update another property). Methods for me say “using THIS, do THAT to THAT THING OVER THERE”.

  • I have a desire to learn as many things as possible. I will never learn everything, but everyone has the potential to cram enough facts on something that they’ll never have to go ask someone about the basics or general gist of something they’re likely to run into. I know enough about Python and C++ that I’d never want to use them for my own development again. They don’t work with me, and that’s fine, because to start working with me, they’d need to stop working with other people, and other people are doing spectacular things with them, and I don’t want them to stop.

  • Open, loose formats are good. They are enablers. Strict interpreters are also good. They are gatekeepers. Postel’s law – be liberal in what you accept and conservative in what you do – is the best compromise. Going against it because your case is special or because people are stupid is not a good argument against it.

  • I like magic constructs as long as they have a function and as long as the magic is distinguishable or deeply embedded within the language’s own philosophy. Some of the magic my ideal language has is regex magic (Perl), date literals (upcoming JavaScript versions), ranges as a native type (Ruby), easy iteration through anything (Ruby) and a unified model where anything and everything is an object to you (Ruby, the whole of .NET).

  • As far as you can, milk what you have. Don’t needlessly feel you have to reinvent anything.

  • Don’t be afraid to break backwards-compatibility, but do it only when needed. Adopt the latest technology not because it’s the latest technology but because it lets you do stuff you couldn’t do before. Think about how many people will be affected positively and negatively by the choice you make, and pick the option that results in the most people affected positively.

  • Don’t be afraid to pervert the purpose of what you’re using. Be very afraid of perverting what you’re writing. Flexibility means people can pervert your stuff. That’s when they get productive, that’s when they have fun, that’s when they start liking your stuff.

  • Have tremendous respect for others, but don’t feel like you owe them anything. If help is offered, take it.

  • Don’t be afraid of people picking another alternative over yours. Different strokes for different people. Keep your thing true to itself, and think twice before you expand it to tie your shoes and make coffee.

  • The minute I stopped caring about how to get people to start paying me was the minute my first donation arrived.

  • Use the right tool for the right job. Not knowing the right tool is no excuse.

  • There are three magic numbers in programming: 0, 1 and n. Writing for any other number usually means you’ll have a problem in short order. Set as few limits as possible.

  • Never stick to your first design for anything larger than a data structure. Let the code you write adapt itself to the problem. There’s nothing to gain from having been right from the start. Unless you’ve written the same thing a hundred times, you will have learned the right approach along the way. If you have written the same thing a hundred times, make it reusable, and reuse it the next time.

  • Reuse code. Reuse others’ code and respect their licensing. If you improve something, help out.

  • Learn the basics of hardware.

  • There’s nothing stopping you from hitting yourself in the head with a hammer, but that doesn’t mean it’s not greater than anything else at driving nails into walls.

  • Pave the cow paths. Put reusable code in libraries or snippets. If you find yourself working around something in the same way, consider changing the behavior, or consider building in a helper function to work around that. When the fix is not needed, you can tear it out.

  • Use version control for personal use as well. It helps you make change logs, and it helps you make distribution downloads much easier.

  • Avoid repeating yourself.

  • Avoid writing stuff for its own sake, unless you just want to have fun and educate yourself doing so.

  • Automate the tedious.

  • Make it easy for yourself to do the right thing.

  • Try out new languages and tools. Find a way to try them out that makes it clear early on if you’re going to like it or not, but compare to the ideal case, not to the current case.

  • There are absolutely no absolutes.

No comments yet.

Leave a comment

Your e-mail address is never shown. If you type a line break in the comment, it will show up as a line break (naturally). The following HTML is allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

(required)

(required)


Please note: Your comment will not show up at once. Unless you're spamming or being abusive, you have nothing to worry about. (Read the full policy.)