Skip to main content

All Questions

Tagged with
4 votes
2 answers
135 views

Separation of data retrieval and processing in loops?

Often I need to get some data and process it in some way. For example getting a list of customers from an API and assemble some summary data on them. As an example, getting : api_result = api.request(...
User's user avatar
  • 1,551
0 votes
3 answers
300 views

Start and exit actions in while loops

Sometimes I find it useful to have loops that do an action at the beginning and/or the end of a while loop. The best way I can think of for representing this in C++ would be: if(condition) { // ...
Graham's user avatar
  • 105
21 votes
1 answer
6k views

What is priming the pump? Sometimes called a priming read

I was taught this expression and pattern way back in the day. Sure, the name comes from old pumps that needed to be filled with water before they could pump water, but who cares? We're talking about ...
candied_orange's user avatar