![]() The problem was, I then stepped on the cake… I was just getting my feet wet in the wonderful, have-your-cake-and-eat-it-too world of SQL. The problem was, I then stepped on the cake and didn’t want to eat it anymore because it was wet and began to smell like feet. I’m going to start with a rather embarrassingly extreme example from a time when, long ago, I was just getting my feet wet in the wonderful, have-your-cake-and-eat-it-too world of SQL. Let’s start by listening to the advice of the sages as we explore together Jackson’s famous code optimization rules: ![]() That’s before we even consider some of the other ways in which one can optimize code, which we will below. So code optimization is a bit of a vague term. And someone smart and capable, like you, can avoid self-sabotage: Keep your ends noble but re-evaluate your means, despite the fact that they seem to be unquestionably intuitive. Whose? The next unlucky person who has to comprehend your code, which may even be yourself. In practice, we sometimes default to another definition: Writing less code.īut the pre-emptively badass code you are writing with that goal is even more likely to become a thorn in someone’s side. We say that code optimization is writing or rewriting code so a program uses the least possible memory or disk space, minimizes its CPU time or network bandwidth, or makes the best use of additional cores. Often, when we define it, we assume that we want code to perform better. You are in gravest danger of thwarting your own goals, no matter how experienced you are at programming. You shake your head at this phenomenon (incidentally, known as Wirth’s Law) and resolve to buck that trend. You take pride in your work.Ĭomputer hardware keeps getting faster, and software easier to make, but whatever simple thing that you Just Want to Be Able to Do, Dammit always takes longer than the last. Not just to avoid being “Dan” on The Daily WTF, but because you believe code optimization is the Right Thing to Do™. ![]() ![]() Not just to set yourself apart from the crowd as a better developer. Optimization of any kind should clearly be a good thing, judging by its etymology, so naturally, you want to be good at it. You may be thinking, not another one of those people. Performance optimization is one of the biggest threats to your code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |