There are few national leaders who can say that they really understand technology. Even fewer of them have written actual programming code. But Singapore's Prime Minister Lee Hsien Loong has outdone them all by posting the source code for a program he wrote to Facebook today. The PM asked for bug reports to boot.
Lee mentioned the program in a speech he gave at a reception on April 20 before IT industry leaders. "The last program I wrote was a Sudoku solver in C++ several years ago, so I’m out of date," he said. "My children are in IT, two of them—both graduated from MIT. One of them browsed a book and said, 'Here, read this.'" It was a textbook on the Haskell programming language, Lee recounted. "One day that will be my retirement reading."
After the speech, Lee received a number of requests to see the code for his program. So today he posted a screenshot of the code along with a link to a Google Drive folder containing the source code, a sample of its output, and a compiled Windows (well, DOS command line) executable to his public Facebook page. "The program is pretty basic: it runs at the command prompt, in a DOS window," he wrote. "Type in the data line by line (e.g. 1-3-8---6), then the solver will print out the solution (or all the solutions if there are several), the number of steps the program took searching for the solution, plus some search statistics."
"Hope you have fun playing with this," he concluded. "Please tell me if you find any bugs!"
Source: arstechnica.com
0 comentarii:
Post a Comment