Become a fan of Slashdot on Facebook


Forgot your password?
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:What ads? (Score 2) 319

Yes, selfish pricks like you are indeed the reason the ad landscape has become so hostile. Excellent point.

I do not understand. It does not matter if I do not see ads or if I just ignore them, there will be the same zero benefit for the sellers/advertisers, so there is no rational reason for them to be against ad blockers.

If I want to buy something, I will search for it.

Submission + - Global Commission on the Stability of Cyberspace

paavo512 writes: The current global cyberspace often remembers a new Wild West, with few rules and lots of unofficial wars happening between different groups and states. While some large countries see this as a perfect exploitation opportunity to obtain a strategical advantage, smaller countries are calling for tighter cooperation and establishing fair game rules. A year ago, Dutch Minister of Foreign Affairs Bert Koenders came out with a proposal for a new high-level commission, saying: "The internet does not belong to individual states or private companies. We have a joint responsibility to protect it against misuse and safeguard it for future generations."

Now the new commission is about to be launched at the Munich Security Conference this weekend. The members of the committee will include internet founder and pioneer Vint Cerf, author of the "soft power" concept Joseph Nye and annual hacking conference DEF CON founder Jeff Moss, among other high-level opinion leaders and politicians. The goal of the commission is to compile a thorough report in three years regarding what specifically must be done in order to increase the security of cyberspace. The GCSC will offer proposals to the international community — including states, organizations and businesses — which will not be compulsory.

Comment Re:So what? (Score 1) 273

Categorising one of the most important images of the 20th century with child pornography is a problem. A big one.

Except it is not pornography. Pornography is defined as printed or visual material containing the explicit description or display of sexual organs or activity intended to stimulate sexual excitement.

Now if somebody really believes a photo of napalm victims is intended to stimulate sexual excitement, then I agree this person might have some big problems indeed.

Comment Re:Readability wins every time (Score 1) 239

Speaking of readability, here's an entertaining one I've been seeing more of in C:

if (result == SUCCESS) versus if (SUCCESS == result)

The rationale behind the second is that you don't end up accidentally assigning SUCCESS to result (eg, if (result = SUCCESS)). But I know that I find it weird to look at it the other way around. I want to know if the result was successful, not if successful was the result. Maybe it's an english thing.

I know that Xcode has been putting up warnings/errors for code that does assignments in if-statements and saying that if you really want to do that, wrap it in an extra layer of parentheses (eg, if ((booleanResult = Do_Something()))). I'm not sure this is somehow more clear that you're doing the assignment...

In proper C++ this would be

if (bool booleanResult = Do_Something()) {

or more usefully

if (AClass foo = PrepareFoo()) { DoSomethingWith(foo); }

This does not generate those assignment warnings, is in the right order for readability and does not need obscure extra parens.

Comment Readability wins every time (Score 1) 239

In professional software development, the general idea is clear: if any non-functional change in a source code file makes it more readable and more maintainable, then it's good, and vice versa. You write the thing once and it has to be maintained for years. This is actually called code refactoring, which is part of several methodologies.

Code refactoring may mean either adding or deleting code. There ought to be a golden middle point somewhere where the code is neither too verbose nor too condensed.

There is a slight complication in that not every person agrees what is the most readable form for a program, but in general it's best to imagine that you may have a total autobiographical amnesia in the next day and still need to understand what the program does.

Comment Re:Missing features (Score 1) 286

So, memcpy() does not work in C++? Did not know that.

Or strcpy() for that matter? Ah: you want to imply that one should use std::string?

Sorry, regarding buffer overruns C++ is as vulnerable as C.

memcpy() and strcpy() are not found in proper C++ programs (there is no need for them).

Anyway, memcpy is not the cause for buffer overruns. Buffer overruns appear when two pieces of code get confused about what is the actual size of the buffer. In C++, the actual size is stored right there inside the buffer object (e.g. std::vector or std::string), so the probability of confusion is greatly reduced.

strcpy() is vulnerable because it relies on the buffer size stored somewhere else in addition to the buffer management (i.e. malloc()), and these two locations may get inconsistent and cause confusion and bugs. Luckily, there is about zero reason to use strcpy() in C++.

Of course one can compile what is basically C code by a C++ compiler, but this does not mean one could not do better in C++, or that C++ is somehow tainted by allowing C code. One can write buggy code in any language, writing buggy C code in C++ is just one easy way to do that.

Comment Re:Missing features (Score 1) 286

Nevermind managed execution to avoid buffer overruns and other "memtrashing" failures that have been a huge security clusterfuck over the last few decades...

I believe you have mixed up C++ with some other language. C++ does not have any such buffer overrun issues (unless you treat it as "C with classes", of course).

Submission + - Even Einstein doubted his gravitational waves (

Flash Modin writes: In 1936, twenty years after Albert Einstein introduced the concept, the great physicist took another look at his math and came to a surprising conclusion. “Together with a young collaborator, I arrived at the interesting result that gravitational waves do not exist, though they had been assumed a certainty to the first approximation,” he wrote in a letter to friend Max Born. Interestingly, his research denouncing gravitational waves was rejected by Physical Review Letters, the journal that just published proof of their existence. The story shows that even when Einstein's wrong, it's because he was already right the first time.

Comment Re:This is the least of the problems with SO. (Score 1) 303

I was having a debate with several high ranking programmers on SO about needing to mark an INT volatile or having to use Interlocked atomic writes to make sure the class variable gets flushed to memory after the method call finishes.

Indeed, there is no need for that. You need to sync only if something must get visible to another thread.

My argument is that unless the method discards the data or inlines the method call, the method has to eventually flush the data from registers back to memory before returning control.

As written, this statement seems indeed either insane or tautological. I am not surprised SO people were baffled.

Now that .Net code is on GitHub, it turns out Microsoft's own code for stuff like semaphores are written exactly the way I proposed.

A semaphore is a totally different thing than an ordinary user-defined class object.

Comment Re:Bring More Solutions than just One (Score 2) 74

Perhaps you could give an example of Open Source software you think needs a special class of user called "tinkerer"?

Try compiling three year old scientific software written in academia without either a programmer or a sysadmin (either should fulfill the role of "tinkering" with software).

I know the sentiment. The only thing worse than open-source software from academia is closed-source software from academia. We ended up putting it in a separate background process so when it crashes we can try to run it again a couple of times.

Making some program open-source does not magically increase its quality, and being in academia does not magically turn professional scholars into professional programmers. Nothing new here.

Slashdot Top Deals

If you can't get your work done in the first 24 hours, work nights.