Neat F1 Command-Line Program

I am a massive fan of motor-sports and so Memorial Day is always a fun day for me thanks to three great races always on that day:

  1. Monaco Grand Prix
  2. Indianapolis 500
  3. Coca-Cola 600

So with that in mind I wanted to share a fun and useful command-line program I recently found—fun if you’re an F1 fan that is.

F1Results

F1Results by Darren Jeacocke is a Ruby program that you run from your terminal to get race or qualifying results for any Formula One event. For example, if I run the command f1results 1984 monaco then I get this output:

+-----+-----+--------------------+-------------------+------+--------------+------+--------+
|                            Monaco Race 1984 Monaco Grand Prix                            |
+-----+-----+--------------------+-------------------+------+--------------+------+--------+
| Pos | Num | Driver             | Team              | Laps | Time/Retired | Grid | Points |
+-----+-----+--------------------+-------------------+------+--------------+------+--------+
|   1 |   7 | Alain Prost        | McLaren-TAG       |   31 |  1:01'07.740 |    1 |      4 |
|   2 |  19 | Ayrton Senna       | Toleman-Hart      |   31 |      + 7.446 |   13 |      3 |
|   3 |  28 | Rene Arnoux        | Ferrari           |   31 |     + 29.077 |    3 |      2 |
|   4 |   6 | Keke Rosberg       | Williams-Honda    |   31 |     + 35.246 |   10 |      1 |
|   5 |  11 | Elio de Angelis    | Lotus-Renault     |   31 |     + 44.439 |   11 |      1 |
|   6 |  27 | Michele Alboreto   | Ferrari           |   30 |      + 1 Lap |    4 |      0 |
|   7 |  24 | Piercarlo Ghinzani | Osella-Alfa Romeo |   30 |      + 1 Lap |   19 |      0 |
|   8 |   5 | Jacques Laffite    | Williams-Honda    |   30 |      + 1 Lap |   16 |      0 |
| DSQ |   4 | Stefan Bellof      | Tyrrell-Ford      |   31 | Disqualified |   20 |      0 |
| Ret |  22 | Riccardo Patrese   | Alfa Romeo        |   24 |     Steering |   14 |      0 |
| Ret |   8 | Niki Lauda         | McLaren-TAG       |   23 |     Spun Off |    8 |      0 |
| Ret |  14 | Manfred Winkelhock | ATS-BMW           |   22 |     Spun Off |   12 |      0 |
| Ret |  12 | Nigel Mansell      | Lotus-Renault     |   15 |     Spun Off |    2 |      0 |
| Ret |   1 | Nelson Piquet      | Brabham-BMW       |   14 |   Electrical |    9 |      0 |
| Ret |  25 | Francois Hesnault  | Ligier-Renault    |   12 |   Electrical |   17 |      0 |
| Ret |   2 | Corrado Fabi       | Brabham-BMW       |    9 |   Electrical |   15 |      0 |
| Ret |  20 | Johnny Cecotto     | Toleman-Hart      |    1 |     Spun Off |   18 |      0 |
| Ret |  16 | Derek Warwick      | Renault           |    0 |    Collision |    5 |      0 |
| Ret |  15 | Patrick Tambay     | Renault           |    0 |    Collision |    6 |      0 |
| Ret |  26 | Andrea de Cesaris  | Ligier-Renault    |    0 |     Accident |    7 |      0 |
| DNQ |  17 | Marc Surer         | Arrows-Ford       |    0 |              |    0 |      0 |
| DNQ |   3 | Martin Brundle     | Tyrrell-Ford      |    0 |              |    0 |      0 |
| DNQ |  23 | Eddie Cheever      | Alfa Romeo        |    0 |              |    0 |      0 |
| DNQ |  18 | Thierry Boutsen    | Arrows-BMW        |    0 |              |    0 |      0 |
| DNQ |  10 | Jonathan Palmer    | RAM-Hart          |    0 |              |    0 |      0 |
| DNQ |  21 | Mauro Baldi        | Spirit-Hart       |    0 |              |    0 |      0 |
| DNQ |   9 | Philippe Alliot    | RAM-Hart          |    0 |              |    0 |      0 |
+-----+-----+--------------------+-------------------+------+--------------+------+--------+

The program comes in the package of a Ruby gem so installation is fairly straight-forward. Truth be told I was planning on sitting down one day in the near future to write a program for exactly this purpose, but Darren Jeacocke’s f1results is a terrific piece of programming and any efforts should go towards improving it instead of re-inventing that wheel.

(Get it? Wheel? Racing? Genius! I’ll just be over here patting myself on the back….)

Normally I write posts to share tools that help with game development or programming in general. But in anticipation of a wonderful day of racing tomorrow I couldn’t help but share this one too.

Advertisements

Add Your Thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s