In the classical secretary problem an employer would like to choose the best candidate among n competing candidates that arrive in a random order. This basic concept of n elements arriving in a random order and irrevocable decisions made by an algorithm have been explored extensively over the years, and used for modeling the behavior of many processes. Our main contribution is a new linear programming technique that we introduce as a tool for obtaining and analyzing mechanisms for the secretary problem and its variants. The linear program is formulated using judiciously chosen variables and constraints and we show a one-to-one correspondence between mechanisms for the secretary problem and feasible solutions to the linear program. Capturing the set of mechanisms as a linear polytope holds the following immediate advantages. Computing the optimal mechanism reduces to solving a linear program. Proving an upper bound on the performance of any mechanism reduces to finding a feasible solution to the dual program. Exploring variants of the problem is as simple as adding new constraints, or manipulating the objective function of the linear program. We demonstrate these ideas by exploring some natural variants of the secretary problem. In particular, using our approach, we design optimal secretary mechanisms in which the probability of selecting a candidate at any position is equal. We refer to such mechanisms as incentive compatible and these mechanisms are motivated by the recent applications of secretary problems to online auctions. We also show a family of linear programs which characterize all mechanisms that are allowed to choose J candidates and gain profit from the K best candidates. We believe that linear programming based approach may be very helpful in the context of other variants of the secretary problem.