Во время стажировки w/крупная компания, которая имела много из в IT дома, я был соединен w/наставник. Практика определенно помогла моему профессиональному развитию, и с точки зрения технических навыков и с точки зрения бизнес-навыков. Вот являются некоторые причины менторством, разработанным так хорошо:
No, you're doing the right thing.
Here's a snippet of my PB (detail ommited for brevity):
message DemandSummary
{
required uint32 solutionIndex = 1;
required uint32 demandID = 2;
}
message ComputeResponse
{
repeated DemandSummary solutionInfo = 3;
}
...and the C++ to fill up ComputeResponse::solutionInfo:
ComputeResponse response;
for ( int i = 0; i < demList.size(); ++i ) {
DemandSummary* summary = response->add_solutioninfo();
summary->set_solutionindex(solutionID);
summary->set_demandid(demList[i].toUInt());
}
response.solutionInfo now contains demList.size() elements.
Another way of accomplishing the same thing:
message SearchResponse {
message Result {
required string url = 1;
optional string title = 2;
repeated string snippets = 3;
}
repeated Result result = 1;
}