Eat Commas for Breakfast

Larry Wall famously said, «People understand instinctively that the best way for computer programs to communicate with each other is for each of the them to be strict in what they emit, and liberal in what they accept.» I think that the evolution of HTML has proven that this isn’t such a great idea. In fact, the stricter the API is about its input, the more likely the code is going to work in funny situations. The designers of Java got it right when they decided that nothing about the Java spec should leave any choice to the compiler developers (at least, not in the gratuitous way that C did, where the size of basic data types was not fixed). A better quote comes from Russian Field Marshal Suvorov: «A hard drill makes an easy battle.» You want your compiler and your development environment to be as strict as possible; you want it to literally generate random return values for GlobalSize so that you don’t get into the habit of counting on something that won’t be there everywhere; you want to use French international settings on Chinese Windows 2000 with an absurd color scheme, DVORAK keyboard, trackball, 640x480 VGA mode, and huge ugly fonts on your development system so that you remember to bake in the code that adjusts for all these things. Then your application will be buff and strong and it will laugh in the face of wimpy problems like people who use commas instead of dots as the decimal. Ha. I eat commas for breakfast, your code will say, with a Russian accent.

Как же классно он пишет, читать одно удовольствие.

Дальше
Ctrl →Exceptions
4 комментария
Baka 2005

Впрочем, Суворова он, как и многие, цитирует неточно.

(И сам Суворов говорил, что в _бою_ не может быть легко.)

MazeFAQa 2005

А что именно он неправильно цитирует? Мне на самом деле интересно, я всегда слышал именно такую версию.

Baka 2005

«...легко в _походе_».

MazeFAQa 2005

Хм... А можно ссылочку на источник? Для достоверности

Написал, а потом сам начал ковырять просторы сети. Похоже что вы все-таки правы.

Мои книги