Chapter 51. Learn to Say, âHello, Worldâ
PAUL LEE, username leep, more commonly known as Hoppy, had a reputation as the local expert on programming issues. I needed help. I walked across to Hoppyâs desk and asked whether he could take a look at some code for me.
âSure,â said Hoppy, âpull up a chair.â I took care not to topple the empty cola cans stacked in a pyramid behind him.
âWhat code?â
âIn a function in a file,â I said.
âSo, letâs take a look at this function.â Hoppy moved aside a copy of K&R and slid his keyboard in front of me.
âWhereâs the IDE?â Apparently, Hoppy had no IDE running, just some editor that I couldnât operate. He grabbed back the keyboard. A few keystrokes later, we had the file openâit was quite a big fileâand were looking at the functionâit was quite a big function. He paged down to the conditional block I wanted to ask about.
âWhat would this clause actually do if x
is
negative?â I asked. âSurely itâs wrong.â
Iâd been trying all morning to find a way to force x
to be negative, but the big function in the big file was part of a big
project, and the cycle of recompiling and then rerunning my experiments was wearing me
down. Couldnât an expert like Hoppy just tell me the answer?
Hoppy admitted he wasnât sure. To my surprise, he didnât reach for K&R. Instead, he copied the code block into a new ...
Get 97 Things Every Programmer Should Know now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.