Please create an account to participate in the Slashdot moderation system

 



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:It has its uses (Score 1) 277

At some point, the complexity of the task the program is executing requires complex code.

This is a more profound statement than it appears at first. I'd say that the minimal complexity of the code necessary to accomplish a task defines the complexity of the task itself.

As for GOTO the issue isn't GOTO per se, but implicitly building other control structures like loops using GOTO as a primitive -- a legacy of the very earliest machine languages in which you implemented algorithms using a very limited instruction set. The flexibility of GOTO makes it a good choice if you have only a few control structures to work with; but that same flexibility imposes the cognitive load of figuring out what the original programmer (possibly yourself) meant.

But even if more structured (i.e., limited) control structures available, there are problems where GOTO is the natural way to express them. State machines for example. I've seen them implemented with long if-then-elseif chains or case conditional constructs, but that's just thoughtless programming that obscures what is going on. A state machine is much more clearly implemented with GOTOs, although tail recursion can be a reasonable alternative.

Comment This reminds me of the nuclear boy scout story. (Score 2) 122

You know, the one where a kid figured out how to refine thorium by reading the Golden Book of Chemistry and turned his mother's garden shed into a Superfund site.

The moral of the story is that even a stupid human being can be pretty smart. Particularly a sufficiently motivated stupid person.

Of course it also helps that intelligence comes in different flavors. Some people are good at spatial reasoning, others are good at verbal reasoning. But we often overlook social reasoning because it's not part of the traditional IQ tests. I think another reason that Social IQ testing hasn't caught on is that there is good reason to believe that social reasoning ability isn't fixed. Changes in attitude can strongly impair or enhance an individual's ability to process social information.

Which leads to the flip side of the stupid people being able to be smart: even smart people can be stupid, particularly in making social judgments.

Comment Re:FSF = not practical (Score 1) 101

But it's still hard to take Stallman seriously because he doesn't provide practical solutions to these problems.

Actually he does: opt out. It won't kill you to only buy entertainment which is DRM-free. So you can't stream the latest episode of Game of Thrones; if you have access to a library you have more alternative ways to entertain your imagination than you'll ever have time to use.

The problem is not being able to buy what the people around them are buying is just too radical for most people.

This is not a practical or tolerable solution for 99% of the population.

This is not anticipated to be tolerable by 99% of the population. They don't actually know, because they'll never try it. Stallman seems to be happy enough without Netflix. But Stallman is a nut. Why is he a nut? Because he's happy enough without Netflix. It's circular reasoning; for all you know you're a nut too, you just don't know it.

This is how powerful corporations control people: by manipulating their unexamined assumptions of what they can tolerably live with. They don't need police power, because people will police themselves.

In a sense this is nothing new, they're just manipulating a longstanding fact about human nature: people are very bad at predicting how things will affect their future happiness. I've recently developed an interest in the old Greek and Roman philosophers called the Stoics. They reasoned more or less thus: if happiness is having all your wants satisfied, the surest path to happiness is to want less. But even they realized that nobody can really adequately regulate their own desires. The best you can achieve is a kind of skepticism about what would otherwise be unchallenged assumptions about what you need. But even though it falls short, it goes a long way toward freeing you from self-afflicted dissatisfaction.

Comment Writing, technical and otherwise (Score 1) 373

Wow, you wrote that entire rant over a single letter. That's pathetic.

Language is an art, like painting. Technical language is an art where miscommunication leads to real world problems, and where evidence of lack of expertise leads to well justified lack of confidence up front.

With language, as with painting, you can paint like a master, or you can finger-paint like an addled child.

Which do you think will carry you further in life and in your career? Which do you think will result in more actual pathos?

Comment structs and fundamental OO (Score 2) 277

Just having higher-order functions doesn't make a language a functional language any more than having structs makes C an object-oriented language.

Structs do, however, make the critical aspects of an object oriented approach practical in c. They can carry data, function pointers, etc., and they can be passed around.

I've been writing my c code like that since the 1980's. There are significant benefits.

Comment Hard stuff is, in fact, hard (Score 3, Insightful) 277

I would add to this that reducing the complexity by turning everything into separate functions tends to also increase what I call "opacity by non-locality."

Not only are some things hard, some things benefit from having the logic right there in front of your face; not in a header, not in some function elsewhere, not in a library.

Benefits in both comprehension, and so ease of construction, but also in execution time and smaller executables depending on just how smart the language is in constructing its own executables.

Comment function dictionaries in Python (Score 1) 277

So, for example, by storing functions as values in a dict you can build complex structures of execution without using any conditional codes .

This is the core mechanism of my text markup language. Once the specific built-in tokens are parsed out, they are immediately accessed via the language's function dictionary. This approach is quick, ultimately low-complexity, trivially extensible, and highly maintainable.

Comment Fluid type manipulation with unions (Score 1) 277

Would you consider unions in c a "means to circumvent the type system" as compared to a language with strong up-front typing?

Unions are certainly a very powerful, useful, and concise tool for manipulating data across type boundaries. If you don't have them, in trying to accomplish similar tasks as those unions make easy, in many languages you're going to be a lot more verbose, and likely a lot less efficient, than if you do.

I am assuming competence. Strong typing is a safety net. The need for such a thing varies with one's skill set. The fewer the participants, the more likely it is that the skill sets can be arranged to be similar. With larger teams, the need for safety nets almost always increases.

Comment Poorly understood? (Score 2) 277

If you're using poor coders to maintain very old code then perhaps the choice of programming style is not your biggest problem.

You may have misunderstood the previous poster's use of "poor coder."

I read it as "unfortunate coder", not "incompetent coder."

I could certainly be wrong. Perhaps clarification will be forthcoming.

Comment Re:What's changed? (Score 4, Interesting) 220

The problem is that social media reduces us to the way we present ourselves. While that certainly is part of who we are, it's not the whole story.

One of the most popular maxims of ancient Greek philosophers was "know thyself", and the reason they considered it important is that it turns out to be a lot harder than it sounds. You think you know yourself, but chances people who spend a lot of time in close physical proximity to you understand you in ways you don't.

But online your identity is mediated by how you present yourself. This is not only inevitably somewhat dishonest (in ways that may be more obvious to others than to yourself), even when you are trying to be honest you at best are presenting who you think you are.

Comment Re:"The science is settled" (Score 3, Insightful) 60

Some of the science is settled, certainly. Methane is a greenhouse gas; nobody expects that to change. Atmospheric methane decays primarily through a long, well-documented chain of reactions starting with oxidation by the hydroxyl radical; the carbon in the CH4 eventually ends up in a CO2 molecule. This is nothing new, and nobody expects it to change.

The precise dynamics by which CH4 interacts with hydroxyl radicals in the atmosphere is far from settled science, and nobody should be particularly surprised that there are things about the process we don't know. Not knowing some things about a process doesn't mean we can't know other things about that process.

But some people obviously do believe it means that. They do not distinguish between not knowing everything and knowing nothing. Implicitly requiring scientists to know everything before you consider science credible makes everything a matter of opinion, and all opinions more or less equally valid, at least as far is evidence is concerned. And it's easy to see the attraction: if everything is a matter of opinion you can believe whatever you find comforting. Why not believe Adam and Eve rode around on dinosaurs? After all scientists don't know everything, which means science is never "settled".

But of course settling questions with evidence is what science is all about. True, there is no science so settled it cannot be attacked; but there *is* science sufficiently settled that claims to the contrary require extraordinary evidence.

Slashdot Top Deals

"Gotcha, you snot-necked weenies!" -- Post Bros. Comics

Working...