A Fairlie locomotive is a type of articulated steam locomotive that has the driving wheels on bogies. The locomotive may be double-ended (a double Fairlie) or single ended (a single Fairlie). Fairlies are most famously associated with the Ffestiniog Railway in North Wales. While the Fairlie locomotives are now used only on heritage railways, the vast majority of diesel and electric locomotives in the world today follow a form not very different from the Fairlie — two power trucks with all axles driven, and many also follow the Fairlie's double-ended concept, capable of being driven equally well in both directions. The Scottish engineer Robert Francis Fairlie patented his design in 1864. He had become convinced that the conventional pattern of locomotive was seriously deficient; they wasted weight on unpowered wheels (the maximum tractive effort a locomotive can exert is a function of the weight on its driving wheels) and on a tender that did nothing but carry fuel and water without contributing to the locomotive's adhesive weight. Furthermore, the standard locomotive had a front and back, and was not intended for prolonged driving in reverse, thus requiring a turntable or wye at every terminus. Fairlie's answer was a double-ended steam locomotive, carrying all its fuel and water aboard the locomotive and with every axle driven. It had a double-ended boiler, with one firebox in the centre and a smokebox at each end. Fairlie was not the first engineer to design and build a double-engine. In 1850, the Belgian company John Cockerill & Co built a double-boiler locomotive called Seraing which featured two independently articulated driving bogies. It had several differences from Fairlie's design, notably the buffers were fixed to the carrying frame, not the bogies, and the bogies were attached to the frame using four carrying pins, which restricted the degree of articulation. Seraing was a failure and Robert Fairlie was likely unaware of it when he produced his design in the 1860s.