11 ms·
I like this one a lot: Entry[Square] = BLANK; // Could be moved out of the loop Maybe I'm reading too much into it, but this type of thinking makes me smi
by nothrabannosir 12y ago
I like this one a lot:
Entry[Square] = BLANK; // Could be moved out of the loop
Maybe I'm reading too much into it, but this type of thinking makes me smile. The guilty perfectionism, "this can be improved."
Were I from Singapore, I'd be happy to see it in the person in charge of my country.
- casion 12y agoWhile I find the code to be interesting, I wouldn't exactly claim to want this person as my PM. Great, he used to program and displayed a handful of positive character qualities in doing so. A lot more than that is required to be an effective leader of a country.
- delinka 12y agoCertainly a lot more is required. But this demonstrates that he's not some high-level politician that's completely out of touch with today's reality. It shows he's capable of logical thought. Two qualities I'd prioritize over all others in my leading politicians.
- Kurtz79 12y ago"But this demonstrates that he's not some high-level politician that's completely out of touch with today's reality" It demonstrates he can write a sudoku solver in C++, I don't see how this has anything to do with being in touch with reality.
- delinka 12y agoToday's reality that Software Code Is Everywhere. There are other aspects of reality that are most assuredly not addressed by the PM's programming prowess.
- EliRivers 12y agoIt shows he's capable of logical thought He is a senior wrangler.
- Bockit 12y agoI think the distinction the grandparent made was they would be happy to see the trait in the leader of the country, not that seeing the trait makes a good leader.
- dagw 12y agoI'd be happy to see it in the person in charge of my country. Would you be equally happy to see Herman Cain as President of the US? He also has Masters in CS and spent the early parts of his career as a programmer.
- personjerry 12y agoI think you're focusing too much on the particular detail. The idea of the comment as I understand it is that the code shows attention to detail which is a desirable trait in a leader.
- dagw 12y agoSure, but I know lots of people with great attention to detail that I wouldn't want anywhere near running my (or any other) country.
- a8da6b0c91d 12y agoThat was the popular conclusion about Jimmy Carter, nuclear engineer.
- DominikR 12y agoThat's maybe because he's the only US President in the last 110 years that didn't start a war. It's sad that he is frequently criticised as being weak. (most likely because of that)
- unscaled 12y agoWhat war did Obama start exactly? If you're referring to the continuation of America's involvement in Afghanistan, let's not forget who was the president who first got America in there and provided training and financial support to the forerunners of the Taliban. That's right, Jimmy Carter.
- 12y ago
- deleted 12y ago[deleted]
- steinnes 12y agoYou would be happy to have a person who mixes tabs and spaces as your PM? ... mixes tabs and spaces. Argh.
- naz 12y agoThat's a pretty common style in C++. If he were a Ruby programmer and did that, then I'd be less happy.
- damcedami 12y agoThat's pretty common style in Ruby. If he were a Python programmer and did that, then I'd be super unhappy.
- FreeFull 12y agoPython doesn't even allow tabs by default, does it?
- rjaco31 12y agoYou can use tabs and spaces, you can even use both without any problem. However, your indentation has to be coherent along the whole file. So you can use as your indentation pattern "4 spaces", "one tab", "2 spaces", "one tab + 2 spaces", but you can never change your pattern in the middle of the file, once you have chosen one pattern, you have to keep this one till the end of the file or it'll throw an indentation error. But in reality, you should indeed stick with the "4 spaces" PEP8 compliant style.
- dagw 12y agoonce you have chosen one pattern, you have to keep this one till the end of the file or it'll throw an indentation error. Only if the resulting indentation is an actual error. It's quite possible that the parser's interpretation of resulting indentation is a valid program with different semantics than you intended.
- personjerry 12y agoOk I believe the phrasing of this comment makes its point a little unclear. Some people are saying how this demonstration doesn't guarantee that the president is a good one. This is true, but I believe the original comment here is merely saying that it is better to have a president WITH this characteristic than without.
- coldtea 12y ago>This is true, but I believe the original comment here is merely saying that it is better to have a president WITH this characteristic than without. Or maybe there's no correlation at all? In the sense that NO, it's not better to have a presidnet with this characteristic thna without, it's equally likely that both the president with and without this can be a bad politician.
- arianvanp 12y agoPlease remember that Signapore has no free speech. I am kind of angry we're cirlclejerking about a PM whose a criminal according to my view http://en.wikipedia.org/wiki/Human_rights_in_Singapore http://en.wikipedia.org/wiki/Human_rights_in_Singapore Can we please just ignore this dictator and be amazed about code of other people instead? It just feels wrong.... I think freedom of speech is a very very important part of the hacker community. I think no sane person would want this person in charge of his country. Coder or not.
- mikedmiked 12y agoControls on speech were necessary for Singapore to move from a third world country to a first world one in just 30 years
- muglug 12y agoInteresting theory. Do you have any evidence whatsoever to support that assertion?
- emodendroket 12y ago"The people responsible for suppressing speech said so."
- rsanders 12y agoAnd nobody dissented!
- tootie 12y agoIt worked for South Korea and Taiwan. They were both ruled by strongmen on the fence between dictatorship and autoritarian democracy. Park Chung-hee industrialized S Korea in 20 years by ruling with a rubber-stamp parliament and a disregard for human rights. The country emerged stronger and gave way to a true democracy with 20 years of his death.
- 12y ago