Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 internet speed test! ×

Comment Re:null? (Score 1) 413

I didn't get the thing with nulls either. Maybe it's a Java thing. I vaguely remember such issues with Java since there are so many pointers and object allocations. If you forget just one, there's a null pointer exception waiting to happen. I suppose the lack of explicit pointer syntax might also help / make it worse since you may think about your variables as values and not as pointers.

It doesn't happen in C++ as much since you use heap allocated values more often and perhaps pay more attention to dynamic allocation, when it happens. I have accidentally created null pointers of course but it really isn't a major concern.

in Python, it's even less of an issue even though it should supposedly be a bigger issue since any pointer can point to any value, not just nulls. My guess is that the ease of writing unit tests more than makes up for whatever is lost from not having static type checking. Static type checking can't detect accidental nulls anyway but unit tests can.

Having said that, yes, I do hate nulls and I try to avoid them as often as I can. An empty string or empty list is often a better "empty" value than a null pointer.

Maybe avoiding Java and replacing nulls by empty values is enough to not consider them a menace.

Comment Re:Uncertainty principle! (Score 1) 415

It would still be strange since the memory allocation would depend on the precision the simulated person decides to request. I think you have to go for a full QM explanation to understand it and that probably isn't memory efficient,

A fun though: Something that would definitively prove we lived in a simulation would be if some amounts or numbers conformed to IEEE 754. Measure the weight of 1kg of water and add 1e-16 kg of water 1,000,000 times and then measure again. Then add 1e-10 kg to 1kg of water directly. If the first experiment shows no increase in weight but the second does, we may live in a 32 bit float world. That would be convincing.

Comment Re:Absolutely wrong: it did differentiate! (Score 1) 123

That is good but insufficient. Non-drinkers ARE a very special group. Drinking is pretty much the norm (especially in the UK) and people who never drink often have a reason. Apart from previous alcoholism, reasons may be strong religious belief or health problems. Also, non-drinkers have different habits. They probably don't drink or eat nothing at parties or romantic dinners. There may be increased consumption of soft drinks or fatty foods. Hell, it could even be that people stay in bad relationships for longer because they don't crash and burn while drunk... The possibilities are endless.

Non-drinkers are special in many ways. It would be almost impossible to take all possible factors into account in a large study such as this one. RCTs would be great but impossible due to the lengths involved and possibly unethical if we believe a bit of alcohol is good.

It would be interesting to see studies from countries or populations where drinking is not the norm.

Comment Re:Uncertainty principle! (Score 1) 415

No, limited precision would correspond to quantization. That is, you can't take a smaller step than 1e-308 meters or such.

Heisenbergs uncertainty principle would rather be like using a deallocated pointer. Sometimes you get the same result as before but if the computer has reused the space for something else, you may get a different result. Still, that would be random and buggy behavior while Heisenbergs principle is very specific about the limits.

Quantum behavior would be tricky to simulate. I guess a strong argument against simulations would be that the world we perceive is very much classical and Newtonian which is extremely simple compared to Relativity and QM. Why would any sane programmer add such ridiculous complex systems both at the very small and very large scale? Job security?

Comment Re:Picking one at random (Score 4, Insightful) 234

You are responsible for reading and learning. You are responsible for staying up-to-date with the industry and the technology. Too many programmers feel that it is their employer's job to train them. Sorry, this is just dead wrong. Do you think doctors behave that way?

I just can't stop thinking about the stupidity of this.

Doctor: Hey, patient, would you like to try some new meds I read about on the internet yesterday while my kids were screaming? I haven't tried them or read any scientific studies and I am unsure about the use-case compared to existing drugs but they are very popular in some facebook groups.

Navy Officer: Hey, we're getting a new aircraft carrier next year so I expect all of you to go home and read up on it and start practicing at home. We'll call you when there is a war and your skills are needed. You'd better be self-trained experts by then!

University head: What's all this "research" I keep hearing about? Take some responsibility for your own careers and stay up to date in your spare time! Now, go back to work. We need more folded napkins!
     

Comment Re:Picking one at random (Score 1) 234

I sort of agree but I think you're being a bit too defensive. It is the job of the professional to explain the importance of clean code, fixing bugs etc to your boss. After you, as a technical specialist, has explained the importance of doing things the right way, it is up to your boss to make the business decision of playing safe or taking a risk. Often, risks are not just in the code. If the release is delayed (again), the customer may loose confidence (again) and leave. It is the job of the boss to weigh risks against each other. (Yes, I am well aware many many bosses do not understand what bossing is about and are tragically unable to understand the concept of risk).

I agree the initial list is idealistic bullshit but it is the responsibility of a professional to explain the importance of best practices anyway. If you'd add a "try" to every sentence, the list would be much better. See:

Professionals try to take responsibility for the code they write. They try not to release code unless they have good reason to believe it works.

Professionals try to avoid big bug lists.

If you are a professional, then you try to be responsible for your own career. You are sorta responsible for reading and learning. You are maybe not responsible for staying up-to-date with the industry and the technology. Not enough programmers understand that it is their employer's job to train them. Sorry, this is just dead zombies. Doctors behave that way

No, sorry. That didn't work out. It is still pretty dumb. Big bug lists are fine if the bugs are non-essential. You should work on what is important to your users; if they don't mind bugs in the "About" window, don't fix them. Clean and bug free code is an ideal that we strive toward but it is an ideal and not reality. If you've ever had to fix bugs or add functionality to a decade old bowl of spaghetti bolognese, it won't be clean, you won't be proud of your work and you know it will fail again.

Comment Re:Tau is greater than pi (Score 1) 133

I would like to disagree. I don't know how many times I've lost a 2 somewhere in the calculation. Either because of brain malfunction like "right angle = pi/4", forgetting a 2 in 2*pi*r or even adding a 2 in pi*r^2/2 just because the integral of r = r^2/2. I think most engineers and mathematicians have made similar mistakes.

Making sound choices to prevent stupid mistakes is important. Pi is an unnecessary evil.

Also, we should switch to base 6. People make too many mistakes with 6,7,8 multiplication.

Comment Re:Perhaps a better method... (Score 1) 1001

Yes! The point of the test should be to see an example of problem solving. Not to check for static knowledge like "yes, I have heard that name before and memorised the meaning.".

For example:
You: Write an algorithm to sort a list of names.
[Candidate writes down some simple sort or uses std::sort]
You: Well done. The list of names has now grown a lot and your sort algorithm is a bottleneck. Can you make it faster? Discuss.

The first questions shows they know at least a bare minimum of programming, The second question shows if they can solve a simple "realistic" problem by taking the given constraints into consideration.

Also, a candidate who writes a recursive bucket sort after the first question fails by overcomplicating things.

Comment Re:What brand of hammer? (Score 1) 149

Programming languages are as interchangeable as toolboxes.

If you've ever tried to repair something at a friends house, you know what I'm talking about. You say "That's easy to fix, just get me some tools" and they bring you a shoe box with twine, paper clips and a flat screwdriver. Sure, it's possible to remove phillips screws with a flat screwdriver but it's annoying as hell. Mending stuff with twine and paperclips is better than nothing but if you know of glue guns and rope, it can be a very frustrating experience.

I had exactly the same feeling when writing numerical code in C#. Everything had to be improvised or created from scratch since there were no relevant libraries and the existing ones could not be applied (sure, there was a binary search but it threw an exception if the element wasn't found. I needed something like upper_bound in C++). Anyway, this was 10 years ago. Maybe things have changed but back then it was definitely the wrong toolbox for the job.

By, the way, I counted the hammers in my toolbox at home: 5. Very small, small, regular, small sledgehammer and rubber mallet.

Comment Re: Change the law (Score 1) 1430

If it was Hitler (R - authoritarian nationalist) vs. Stalin (D - communist), most would still cling to the idea that a third-party candidate was a wasted vote and choose their candidate by party.

This! The really scary thing about this election was that it was such an ordinary election despite extraordinary candidates. About 90% of traditional republicans voted for Trump and about 90% of democrats for Hillary.

Voting for a third candidate IS a waste because of the way your system is constructed. Why didn't Trump go as an independent? Because the right wing votes would have been split between him and the republicans and basically given the democrats the presidency. He would never have won as an independent despite having the same ideas, policies and interesting retorics.

There are so many things wrong with the system. The electoral college is one but the presidency itself is another. The presidency is a winner-takes-all competition where voting for a third party only increases the chance that your worst enemy becomes president instead of the dude you just dislike.

Switching to popular vote isn't enough. Candidates should be allowed to form coalitions after the vote is cast. That is, let all candidates run and if no one gets more than 50%, they can join forces and whatever group gets a majority decides on the presidency. Third, fourth and fifth candidates are not actively discouraged and all votes count. Having only two choices, isn't much of a choice at all. Especially when choosing between Stalin and Hitler.

  A two party system is only one party away from being a dictatorship.

Comment Re:FTFY (Score 1) 87

How is this different from a Google search? Google spends a lot of time trying to figure out how sites and searches are related to one another. Mozilla thinks they can do it better because they can "harvest" data directly from the browser? I doubt it. And, that's ignoring the privacy issue of sending my full time stamped browsing history to a private company...

Comment Re:100 (Score 1) 249

That was precisely my thought. It is of course a bullshit article but it raises so many interesting questions:

Where did they get country based IQ data? Is it normalised to 100 over the entire sample?

Why do most countries in their scatterplot have an IQ less than 100? The only counterweight of significance is China.

Who did they test? China has higher IQ than pretty much the entire western world. I very much doubt that since china is HUGE and mostly rural.

What IQ test did they use? Note that five countries have scores of about 70 or below. Are they really suggesting about 90 million people in Nigeria (NGA) are mentally retarded? There's 180M people in Nigeria, half should be above 70 and half below, i.e. mental retardation (assuming normal distribution). https://en.wikipedia.org/wiki/Intellectual_disability

Slashdot Top Deals

"In matters of principle, stand like a rock; in matters of taste, swim with the current." -- Thomas Jefferson

Working...