Become a fan of Slashdot on Facebook


Forgot your password?

Comment: Re:This is huge (Score 2) 308

"FAO calculates that around half of the world's hungry people are from smallholder farming communities, surviving off marginal lands prone to natural disasters like drought or flood. Another 20 percent belong to landless families dependent on farming"

"there are 842 million hungry people in the world"

Comment: Re:it contradicts the definition (Score 1) 209

If you are really interested. There are some open source programs that do static analysis also. Have a look e.g. at the source code of Cppcheck ( ) to see how it works. E.g. some potential performance issues are pretty easy to detect, e.g. using i++ instead of ++i for objects. Or passing a copy of string instead of a reference.

If you want to know what kind of faults can be found or what do they look at on the source level, here is a list of bugs that Cppcheck has found from open source projects (obviously not everything is listed, but it should give you a pretty good picture):

Comment: Re:ballistics (Score 2) 409

by dvice_null (#42912725) Attached to: Huge Meteor Blazes Across Sky Over Russia; Hundreds Injured

> But we think we've only found about half of the "annihilate a city" 300-m sized ones

Not only that, but e.g. one 400-m sized one might hit the earth in a couple of months, but we don't know for sure whether it will hit or not, because last observation for it was in year 2008. It is very unlikely that it would hit us, but still... we don't know.

Comment: Re:Hah (Score 1) 173


I think you might find this study interesting:

Summary: organizational distance between employees is best known way to predict bugs in a software project. It is even better than code coverage, complexity or pre-release bugs. In best case scenario all employees work for the same boss and you get best quality. In worst case scenario they work for different companies and you get the worst quality.

Comment: Re:fix it later (Score 1) 457

by dvice_null (#42570227) Attached to: Ask Slashdot: What Practices Impede Developers' Productivity?

> You're suggesting I switch my mind and SCM state to this newly spotted thing, fix it, submit it and then come back?

I do this a lot. I have written, reverted and rewritten code sometimes even 5 times before I have been able to commit what I originally was planning to do (yes, I also create patches/branches when suitable). Some might think that I wasted a lot of time there, but every time I wrote the code, I learned something knew that allowed me to make better decisions.

> And even if it goes perfectly, have I been spending my time wisely? Was that newly spotted bug a high priority, urgent job, or a low priority, non time-critical job?

I have seen people spending weeks trying to fix a bug that was caused by a low priority bug they saw instantly, but didn't fix, because they wanted to fix the high priority bug first.

Quite often, fixing something that is very low priority can save millions of dollars for the project, but no-one can see the cost, because it is so well hidden. E.g. every time you add a new text, you have to write it into 4 different files, and sometimes it is forgotten and thus time is wasted both for writing it and then finding&fixing the bug it caused. This is a common hidden cost, caused by a low priority bug (duplication in source code, usually not even marked in the project bug tracker).

If you only fix what is the most important, be sure that you know what it is.

Comment: Re:same as non-programming languages? (Score 2) 238

by dvice_null (#42341753) Attached to: How Experienced And Novice Programmers See Code

> I would say that this is similar to a chessmaster who has solved countless chess puzzles.

Chess masters recognize patterns in chess like they recognize faces. Show them a realistic pattern for a few seconds and they can remember it. Show them a random pattern and they won't remember it.

You can test this with programmers. Create a pattern, e.g. a common for loop:
    print i;

Show this to a person for a couple of seconds and ask them to rewrite it out from their memory. If they can do it, they are more likely experienced. If they can't, they are more likely not experienced. To make the test more fool proof, you should also create a random pattern from those characters and test if the person can remember that. As some people actually have a very good memory even if they are not programmers.

Comment: Learn usability (Score 1) 202

by dvice_null (#41251441) Attached to: Do Tech Entrepreneurs Need To Know How To Code?

I think that usability and user experience are more important that programming. I think usability and user experience should be taught to everyone at school. It wouldn't require that much hours as it is mostly common sense. And because it is common sense, it would be really easy for people to learn, unlike programming.

Imagine doors that people can open to correct direction without a mistake. Imagine books where the information you seek is easy to found. Imagine ovens that are easy to heat and light switches with 10 buttons where you instantly know which button will start which light. That all is reality, if people had a little knowledge about usability.

Imagine alarm clocks that gently wake you up. Imagine a wheelchair that makes you look cool. Imagine an error message that informs you about your own mistake so politely that it makes you feel good that you made the mistake. All this is possible if people had a little knowledge about user experience.

Imagine if all the programmers would read just a couple of books on this subject. Does Entrepreneurs need to know this stuff? No way. But I'm pretty sure that Jobs did.

Comment: Re:Not safe (Score 2) 301

by dvice_null (#41207969) Attached to: California To License Self-Driving Cars

> with 310+ million Americans each would only need to drive 3 miles a year to reach a billion.

With actual numbers:
"There were 190,625,023 licensed drivers in the United States in 2000." [1]
190625023 * 3 = 571875069

So not only are you wrong, but I don't see your point either. Americans drive a lot, but they also have a lot of car accidents. (Feel feel to provide more recent numbers, but you won't get a billion even if you count the whole population.)

To be fair, I think that computer controlled car should be granted the right to drive, if it can pass the driving test, which human drivers need to pass. Should there be an accident, the company that provided the car should pay. That is unfair for the company, but it is to earn the trust of the population and to ensure that cars have as little defects as possible.


Comment: Re:Wolrd Hunger (Score 2) 318

by dvice_null (#40935053) Attached to: For Much of the World, Demand For Water Outstrips Supply

> We have deserts in America, we just don't live in them asshole!

Las Vegas is in a desert. They just put some water pipes there and started living there. In Brazil they have started to grow stuff in places where the soil is poisonous and where nothing grows. They simply investigated what makes the soil so bad and modified the soil to fix it.

On the other hand, people have cut down all trees on some areas and erosion has taken all the soil and places that were full of plants are now deserts. People have had to move out from locations that had fresh water and plenty of food, because their houses are now covered by sand, due to hacking down all the trees.

So neither desert or forest is something stable. You can change the environment. It is just a lot more easy to create a desert than it is to create a forest. That is why it is good that in some countries (e.g. in Finland) it is illegal to cut down forest without planting new trees to replace them and e.g. in China they have the National Tree-planting Day.
