Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror

Comment: Re:Not that big of a deal... (Score 3, Insightful) 176

by gnasher719 (#49619187) Attached to: Singapore's Prime Minister Shares His C++ Sudoku Solver Code

The code resembles something you expect from a first-year programming student - there's an input buffer overflow bug waiting to happen, the array size is odd (80 byte array? why? scanf() is still called without a field length specifier, and you only use 9 of those 80 bytes in a normal case).

You seem to be very optimistic in your views of first year programming students.

Here's what I see: Many years ago, I had a lovely job helping to teach people to program, and I had to review their homework. There were some whose thought processes were all over the place. There was one guy who managed to write the most convoluted code that always worked perfectly well, but I would never have hired him because reviewing it was just too painful. And there was one student who wrote code that I could scan in half a minute and see that it was correct and worked. And that's what this guy's code looks like.

"Perhaps it was written by him in his spare time". OF COURSE it was written in his spare time. His a prime minister, he doesn't write code on the job. What comments do you want? The code is simple and obvious. What data structures to explain? If you are too stupid to understand them immediately, then you shouldn't be programming. What lack of error checking? What scenario do you suggest where error checking would help?

Your last sentence is a totally unfounded, vicious attack on the intellectual honesty of the man. It's disgusting. Unless you have any evidence for it, you should apologise.

Comment: Re:Technically C++ (Score 1) 176

by gnasher719 (#49619147) Attached to: Singapore's Prime Minister Shares His C++ Sudoku Solver Code

Well... probably more accurate to call that C code. It's compilable under a C++ complier, but offhand I didn't spot anything that really made it C++-specific. Not a knock on the Prime Minister, but it might even be a little more geek cred to call it a Sudoku solver in C.

Extra points then to him for writing code to solve a problem, and not writing code to demonstrate his cleverness. Which is what the worst of C++ programmers usually do.

Comment: Re:Hahah (Score 2) 243

Arson isn't a stupid mistake. Arson can kill people. Whenever arson happens, there might be people at the place that is put on fire, who might die. Whenever arson happens, firefighters put themselves into danger. Even if nobody gets killed or hurt, huge damage can happen. A fifteen year old can understand these things.

Comment: Re:Try again... 4? (Score 1) 224

by gnasher719 (#49593981) Attached to: Grooveshark Shuts Down

Copying a piece of music is not stealing because it does not suddenly disappear from the hard drive of the musician or render the musician unable to perform it.

It is not stealing. You are absolutely right. It is copyright infringement. Punishable with fines up to $150,000 per work (unless the copyright holder can prove that the actual damage is higher).

Comment: The lesson (Score 2) 398

by gnasher719 (#49585601) Attached to: Tattoos Found To Interfere With Apple Watch Sensors
If you want a tattoo on your wrist, either put it on the wrist where you wouldn't wear a watch, or go to some competent tattoo artist who will be able to advise you what kind of ink will affect your skin more or and which one will affect it less; consider that the Apple Watch is just the start of wearing things around your wrist. .

Comment: Re:Why do they not have the paper as backup? (Score 1) 263

by gnasher719 (#49578951) Attached to: Crashing iPad App Grounds Dozens of American Airline Flights

What I'm wondering is what would have happened had this iPad crash occurred during the flight post-takeoff. Why do they not carry the paper manuals as a backup in case this sort of thing happens?

Nothing would have happened. The pilot knows how to take off from A. And he knows how to land at B. However, due to unforeseen circumstances, he might not be able to land at B but might get redirected to any of a large number of airports. And for that, he has this huge set of maps that describe exactly how to start/land at each of those airports.

Comment: Re:So no paper backup anymore? (Score 1) 263

by gnasher719 (#49576811) Attached to: Crashing iPad App Grounds Dozens of American Airline Flights

What happens if the iPrecious crashes mid flight? And if they do still have the old maps, why the delay? Who thought it was a bright idea to create cascading chaos in daily airtraffic just for pilot convenience

If the iPad (I assume you were just trying to make a stupid joke there) crashes mid flight, you reboot it. Then you take the co-pilots iPad.

The information is there in triplicate. Pilot's iPad. Co-pilot's iPad. Bag of papers. As a passenger, you are safe with one copy. The rules say that three copies must be there when the plane takes off, to guarantee that at least one is there when it is needed. The delay happened because there were no three complete and up-to-date copies.

Comment: Re:Before we start blaming or laughing at Apple... (Score 2) 263

by gnasher719 (#49576761) Attached to: Crashing iPad App Grounds Dozens of American Airline Flights

Let's see these AA iPads and the software for what they really are: pieces of business-critical software / hardware. Which means that they have to treat it like any other combination of business critical software and hardware. The entire configuration is frozen, software, OS, patches and all, and any change is thoroughly tested before it is pushed to the production devices.

So what happened? One news item hints at a recent update causing the issue. Where did the update come from? Was iOS updated, or the app? Was this update tested before being rolled out?

They can't freeze the configuration unless they freeze all the airports. These devices carry maps. Maps need to be updated all the time.

What happened here wasn't that an update caused a problem. What happened was that two iPads in a cockpit didn't manage to receive an update that they should have received, so they had to take the iPads into the airport, and the data update worked just fine. Obviously this took time, so the flight got delayed.

Comment: Re:You can't control the class, so you've failed. (Score 1) 353

by gnasher719 (#49571659) Attached to: University Overrules Professor Who Failed Entire Management Class

All it takes for this strategy to fail is that the most disruptive students being in some way "special". And I'm not even meaning that they're retarded or belonging to some minority and failing them could get the PC crowd breathing down your neck. All it takes is that the parents of such an asshole student are "important" because they donate money into the school's coffers, basically buying their precious little dud a degree.

That is assuming that rich parents donating to schools actually want to buy their little boy or girl a degree. Plenty of people are rich because they worked hard for it (maybe with a little luck added, but still..) and are not really keen on them just relying on their parents instead of their own work.

Comment: Re:"$38.3 milllion for equipment to span Californi (Score 2) 100

by gnasher719 (#49567357) Attached to: A Cheap, Ubiquitous Earthquake Warning System

The gov't should convince insurance companies to band together and pony up the cash.

Insurance companies won't be interested. This doesn't save expensive buildings. It gives people a chance to get out of buildings just in time. For an insurance, dead people are cheap.

Comment: Re:Lifehacking (Score 1) 140

by gnasher719 (#49567187) Attached to: New Privacy Threat: Automated Vehicle Occupancy Detection

Couldn't this system be easily defeated by using an inflatable person or maybe even just a stick with a cut out of Bill Oddie's face glued on the top, resting on your passengers seat?

You're asking "couldn't I defeat this by committing fraud"? Quite obviously if you get caught, you won't be fined for driving in the carpool lane, but for driving in the carpool lane and committing fraud to get away with it. I could easily see you getting a criminal conviction.

Comment: Re:I will never understand (Score 5, Interesting) 104

by gnasher719 (#49552207) Attached to: Vizio, Destroyer of Patent Trolls
Simple way to level things is what is used in Germany - fees are limited to a fixed small percentage of the value being argued about, but if you demand a large amount and get only a small amount, you actually count as the loser (so a large corporation suing you for 100 million dollars and awarded $100 would actually pay 99.9999% of the total cost).

In the case of patent trolls demanding huge money, even if they are rewarded a small amount, they would have to pay all the cost.

System going down at 1:45 this afternoon for disk crashing.

Working...