Method of encoding preparation information, the method comprising forming a code on: a container for a beverage preparation machine or foodstuff preparation machine, the container for containing beverage or foodstuff material; or an attachment (100, 94) for attachment to said container or a beverage preparation machine or foodstuff preparation machine, the method further comprising: arranging at least two reference units to define a virtual reference line ( r) of a reference portion; encoding a value of a parameter of the preparation information with a data portion of the code by arranging a data unit on a virtual encoding line that intersects the virtual reference line ( r) at a virtual intersection point, the data unit being arranged a distance ( d) extending from said virtual intersection point along the virtual encoding line, said distance ( d) along said virtual encoding line encoding said value, whereby said virtual encoding line is circular or comprises a segment of a circle and is arranged with a tangent thereto orthogonal the virtual reference line ( r) at said virtual intersection point; and at least partially encoding a parameter of the preparation information with one or more discrete positions which are arranged at known locations on said virtual encoding line with respect to the arrangement of said data unit along said virtual encoding line, wherein said discrete positions either comprise or do not comprise a further data unit as a variable to at least partially encode a parameter of the preparation information. a container for a beverage preparation machine or foodstuff preparation machine, the container for containing beverage or foodstuff material; or an attachment (100, 94) for attachment to said container or a beverage preparation machine or foodstuff preparation machine, the method further comprising: arranging at least two reference units to define a virtual reference line ( r) of a reference portion; encoding a value of a parameter of the preparation information with a data portion of the code by arranging a data unit on a virtual encoding line that intersects the virtual reference line ( r) at a virtual intersection point, the data unit being arranged a distance ( d) extending from said virtual intersection point along the virtual encoding line, said distance ( d) along said virtual encoding line encoding said value, whereby said virtual encoding line is circular or comprises a segment of a circle and is arranged with a tangent thereto orthogonal the virtual reference line ( r) at said virtual intersection point; and at least partially encoding a parameter of the preparation information with one or more discrete positions which are arranged at known locations on said virtual encoding line with respect to the arrangement of said data unit along said virtual encoding line, wherein said discrete positions either comprise or do not comprise a further data unit as a variable to at least partially encode a parameter of the preparation information. arranging at least two reference units to define a virtual reference line ( r) of a reference portion; encoding a value of a parameter of the preparation information with a data portion of the code by arranging a data unit on a virtual encoding line that intersects the virtual reference line ( r) at a virtual intersection point, the data unit being arranged a distance ( d) extending from said virtual intersection point along the virtual encoding line, said distance ( d) along said virtual encoding line encoding said value, whereby said virtual encoding line is circular or comprises a segment of a circle and is arranged with a tangent thereto orthogonal the virtual reference line ( r) at said virtual intersection point; and at least partially encoding a parameter of the preparation information with one or more discrete positions which are arranged at known locations on said virtual encoding line with respect to the arrangement of said data unit along said virtual encoding line, wherein said discrete positions either comprise or do not comprise a further data unit as a variable to at least partially encode a parameter of the preparation information.