Live data from Hacker News

12 (Really) Controversial Programming Opinions

billthelizard.com

31–40 of 61 posts

Re: 12 (Really) Controversial Programming Opinions

#31

Earlier quoted context omitted.

Ironically C is technically a high level language anyways.

'ish. C exists in the middle territory between high (colloquially right now ) and "original" low-level programming. By all accounts, virtually any language that operates relatively close to the semantics of the machine in terms of operations and memory (pointers are a standard abstraction in assembler) is a low-level language. The only things that detract from C's low-level credentials are that it is more of a hybrid…

"You don't, though"

Interesting, though I'm not sure how my knowledge of C is relevant to the conversation.

Re: 12 (Really) Controversial Programming Opinions

#32

A linkbait, "N Ys that X" content-farmy headline that seems just tailor-made for getting on HN.

Actually I think that it's a more ironic take on the meaningless links that made the front page (twice I believe) a while ago about some (not so) controversial opinions on software development. I certainly hope no one thought any of these were opinions to be taken seriously.

Re: 12 (Really) Controversial Programming Opinions

#33
post #16

guys, >The first language should NOT be the easy one, it should be >one that sets up the student's mind and prepare it for >serious computer science. >C is perfect for that, it forces students to think about >memory and all the low level stuff, as one low-level programmer to another, I hate to break it to you, but "low level programming" is not "serious computer science". the two have very little to do with each othe…

That's pretty true. However, in C, you can actually write interesting data structures and algorithms that come up in computer science. I think that makes for good "theory meets practice"-based learning.

I'm not saying all algorithms classes should incorporate writing C code all the time. But probably every budding computer scientist or software engineer should take at least one such class.

I'm also not saying C is the only language for which this is true. But it's definitely not generally true for interpreted languages.

Also, C is pretty much the language everything higher-level is implemented in. So once again, at least some exposure to C can help someone conceptualize what's happening on the computer at every level.

Re: 12 (Really) Controversial Programming Opinions

#34

Earlier quoted context omitted.

'ish. C exists in the middle territory between high (colloquially right now ) and "original" low-level programming. By all accounts, virtually any language that operates relatively close to the semantics of the machine in terms of operations and memory (pointers are a standard abstraction in assembler) is a low-level language. The only things that detract from C's low-level credentials are that it is more of a hybrid…

"You don't, though" Interesting, though I'm not sure how my knowledge of C is relevant to the conversation.

You made a false assertion about C.

          o
             
     o         o
Connect the dots.

Re: 12 (Really) Controversial Programming Opinions

#35

13. Most programmers think they know what they're doing but actually are "incompetent". (There are Usenet posts going back to 80's documenting this fact.) How am I defining "incompetent"? In my definition it means writing software that any reasonably skilled hacker can cause to "malfunction", i.e. not perform as expected by the programmer, which depending on the program may or may not present a security risk. The num…

This is a narrow view of what software is supposed to do. Are styrofoam cups inferior or are their designers "incompetent" because they break easily? No! That's the whole point--they are cheap and disposable.

The same is true about most software people write--it is also cheap and disposable. Often, having something that works well enough now is better than having something that works well tomorrow. I'm not even talking about being impervious to skilled hackers; even breaking under normal use is not necessarily bad.

Sure, if your software would kill people or destroy things, you have an issue. If your software is very critical and usually above suspicion (like a compiler, say) this would also be a problem. But if you're just writing a web app to share cat pictures or some internal tools or really most any other type of software? It's most often better to be cheap and fragile than good and solid.

My laptop is probably my single most important possession. (Yeah, I'm a student so I don't really have much else :P.) Do I have a Tough Book which is nigh unbreakable? Nope. I have a laptop which is actually fairly easy to mess up. And it is in every practical sense the better choice.

This is, coincidentally, why I think the cynical view of "planned obsolescence" is somewhat shortsighted. Sure, in a sense it's bad that electronic gadgets fall apart after a couple of years. But there's no cynical force behind all this: the simple fact that you wouldn't pay twice as much for a phone which is only more sturdy--but not more capable--is what drives the markets. If you were really worried about it, you would have bought a purpose-built device that would hold up better; instead you bought something cheaper which will break sooner. And this is a perfectly reasonable compromise to make!

Re: 12 (Really) Controversial Programming Opinions

#36
post #33
post #16

guys, >The first language should NOT be the easy one, it should be >one that sets up the student's mind and prepare it for >serious computer science. >C is perfect for that, it forces students to think about >memory and all the low level stuff, as one low-level programmer to another, I hate to break it to you, but "low level programming" is not "serious computer science". the two have very little to do with each othe…

That's pretty true. However, in C, you can actually write interesting data structures and algorithms that come up in computer science. I think that makes for good "theory meets practice"-based learning. I'm not saying all algorithms classes should incorporate writing C code all the time. But probably every budding computer scientist or software engineer should take at least one such class. I'm also not saying C is th…

Hmm, can you give an example of a typical "learning CS" level algorithm that you can't implement in, say, JavaScript?

Re: 12 (Really) Controversial Programming Opinions

#37

I do sort of agree with the try/catch criticism. I know what it achieves and why we need it but I don't agree that it's the best or even most intuitive error handling mechanism. I personally prefer returning error messages in place of or alongside expected data structure outputs, such as the common paradigm in JavaScript where async functions return error info (or null) as the first parameter in the supplied callback…

I don't. Exceptions in general FORCE a developer to deal with the problem. They can slap a developer in the face if they're abusing the API. Error codes on the other hand can be ignored. PutLionInCage(); PokeLionWithStick(); I'd rather PutLionInCage() throws if there is a problem.

Exceptions in general FORCE a developer to deal with the problem.

There are good arguments in favour of exceptions, but I don't think this is one of them. If Java has taught us anything, it is that trying to force someone to handle exceptions just causes a lot of code that says:

    catch (Exception e)
    {
        // silently ignore e
    }

Re: 12 (Really) Controversial Programming Opinions

#38

13. Most programmers think they know what they're doing but actually are "incompetent". (There are Usenet posts going back to 80's documenting this fact.) How am I defining "incompetent"? In my definition it means writing software that any reasonably skilled hacker can cause to "malfunction", i.e. not perform as expected by the programmer, which depending on the program may or may not present a security risk. The num…

Knuth's code has bugs. NASA's code has bugs. I don't think our species has produced even one nontrivial correct program, much less a programmer who's competent (which I take to mean a large portion of their work is 100% correct). Our profession is passing through the mercury-and-leeches phase medicine once went through. Someday our descendants will look back from their error monad formal proofs or something and cring…

>I don't think our species has produced even one nontrivial correct program

Off the top of my head: seL4, a correct microkernel...pretty nontrivial!

Re: 12 (Really) Controversial Programming Opinions

#39
post #33

Earlier quoted context omitted.

That's pretty true. However, in C, you can actually write interesting data structures and algorithms that come up in computer science. I think that makes for good "theory meets practice"-based learning. I'm not saying all algorithms classes should incorporate writing C code all the time. But probably every budding computer scientist or software engineer should take at least one such class. I'm also not saying C is th…

Hmm, can you give an example of a typical "learning CS" level algorithm that you can't implement in, say, JavaScript?

B-Tree indexes in JavaScript

Re: 12 (Really) Controversial Programming Opinions

#40
post #33

Earlier quoted context omitted.

That's pretty true. However, in C, you can actually write interesting data structures and algorithms that come up in computer science. I think that makes for good "theory meets practice"-based learning. I'm not saying all algorithms classes should incorporate writing C code all the time. But probably every budding computer scientist or software engineer should take at least one such class. I'm also not saying C is th…

Hmm, can you give an example of a typical "learning CS" level algorithm that you can't implement in, say, JavaScript?

Not an algorithm, but used in many. Pointers.
Post reply on HN