A computer-implemented method for optimization of crop protection, the method comprising: accessing one or more configuration data structures wherein the one or more configuration data structures include data fields to store: crop data wherein a crop data record stores at least crop identifier information for a particular crop and properties regarding the applicability of various protection product segments for the particular crop, advice data related to respective crop data wherein each advice data record (222-1, 222-2, 222-3) stores advice identifier information and properties regarding recommendations for the related crop with regards to a respective protection product segment, and crop protection product data related to respective advice data wherein each crop protection product data record (223-1, 223-2, 223-3, 223-4) stores identifier information about a particular protection product for at least one specific target, and product application properties in relation to the related advice data record, each target describing a particular infestation or a particular crop disease; accessing a plurality of code snippets wherein each code snippet (231, 232, 233) has a condition which relates either to at least one property field of the one or more data structures or to a result of another code snippet, and further includes generic program logic associated with the condition, and wherein each property field is used in the condition of at least one code snippet; applying the plurality of code snippets to the one or more configuration data structures to generate an advice logic program by transforming the generic program logic of each code snippet into executable program logic in compliance with the respective conditions and respective data field values; receiving input comprising at least a particular crop identifier, a particular target identifier and a particular crop growth stage code representing a real world field situation; and applying the generated advice logic program to the received input to generate a crop protection product mix instruction for treatment of the real world field situation. accessing one or more configuration data structures wherein the one or more configuration data structures include data fields to store: crop data wherein a crop data record stores at least crop identifier information for a particular crop and properties regarding the applicability of various protection product segments for the particular crop, advice data related to respective crop data wherein each advice data record (222-1, 222-2, 222-3) stores advice identifier information and properties regarding recommendations for the related crop with regards to a respective protection product segment, and crop protection product data related to respective advice data wherein each crop protection product data record (223-1, 223-2, 223-3, 223-4) stores identifier information about a particular protection product for at least one specific target, and product application properties in relation to the related advice data record, each target describing a particular infestation or a particular crop disease; crop data wherein a crop data record stores at least crop identifier information for a particular crop and properties regarding the applicability of various protection product segments for the particular crop, advice data related to respective crop data wherein each advice data record (222-1, 222-2, 222-3) stores advice identifier information and properties regarding recommendations for the related crop with regards to a respective protection product segment, and crop protection product data related to respective advice data wherein each crop protection product data record (223-1, 223-2, 223-3, 223-4) stores identifier information about a particular protection product for at least one specific target, and product application properties in relation to the related advice data record, each target describing a particular infestation or a particular crop disease; accessing a plurality of code snippets wherein each code snippet (231, 232, 233) has a condition which relates either to at least one property field of the one or more data structures or to a result of another code snippet, and further includes generic program logic associated with the condition, and wherein each property field is used in the condition of at least one code snippet; applying the plurality of code snippets to the one or more configuration data structures to generate an advice logic program by transforming the generic program logic of each code snippet into executable program logic in compliance with the respective conditions and respective data field values; receiving input comprising at least a particular crop identifier, a particular target identifier and a particular crop growth stage code representing a real world field situation; and applying the generated advice logic program to the received input to generate a crop protection product mix instruction for treatment of the real world field situation.