As a rule, any mention of religion on an online forum degenerates into a religious argument. Why? Why does this happen with religion and not with Javascript or baking or other topics people talk about on forums?

What’s different about religion is that people don’t feel they need to have any particular expertise to have opinions about it. All they need is strongly held beliefs, and anyone can have those. No thread about Javascript will grow as fast as one about religion, because people feel they have to be over some threshold of expertise to post comments about that. But on religion everyone’s an expert.

For people who complain about #Generics in #Golang

Let’s say we want to some integers from a file. Well, we can’t use InputStream directly, but we can use FileInputStream, a class which inherits directly from InputStream. Unfortunately, FileInputStream doesn’t do any buffering. So if we want to do a lot of small reads, it may not be very efficient, because each of those reads will turn into a syscall.

Well, that’s no problem; we can use BufferedInputStream. BufferedInputStream extends FilterInputStream, which wraps one input stream in another input stream. In the case of BufferedInputStream, the outer stream does buffering.

However, we still do have a problem. BufferedInputStream doesn’t let us read integers; it only lets us read bytes and arrays of bytes. In order to get something that reads integers, we need another wrapper: DataInputStream.

So far our program looks like this:

FileInputStream fos = new FileInputStream("myfile");
BufferedInputStream bos = new BufferedInputStream(fos, 16384);
DataInputStream dos = new DataInputStream(bos);
int foo = dos.readInt();

Well, it might be a little verbose, but at least it’s safe, right? We know that whatever operation we call on our InputStream will be well-supported.
Well… not quite. One operation defined by InputStream, mark, is only supported by some InputStreams, and not others. It so happens that FileInputStream doesn’t support it (and will misbehave at runtime if you try to use it). BufferedInputStream does. Our DataInputStream does, but only because it wraps our BufferedInputStream– DataInputStream itself does not support mark.

(read the rest here)

Most computers today, for all of their potential speed, are largely a mistake, based on the provenly unscalable Von Neumann architecture, controlled with one of the most shortsighted languages of all time, x86 assembly. They are almost unfathomably inefficient. Their processors have close to a billion transistors, most of which sit idle while a tiny fraction of a fraction of them perform some operation. Three quarters of a processor may be devoted to the quagmire of cache memory and its demands. All of this brute force horsepower gets stacked in an ever higher tower of babel in the relentless race to perform more sequential calculations per second. If people only know what engineering was required to implement branch prediction and 20 stage deep pipelines… It’s like seeing being the walls of a meat packing plant. You just don’t want to know.

My point is that the syntax is the easy part of learning a new language, just look it up in the manual. It is learning the semantics of the new language and how to use it efficiently to solve your problems which are the major difficulties. How do I structure my solution to best make use of the language and its environment? This is where major rethinks will occur. This is what takes time to learn and understand. Not in what it looks like.

I admit: I couldn’t keep up. Just learned Backbone.js and only found out it’s already out of fashion, I probably should have used ember.js. Trying to get a hold of ember.js, someone told me to use Meteor, oh, no, no, should be Angular, um, Tower.js is the current hottie (based on node.js). As for HTML template, I should use handlebars, not mustache, wait a second, DOT.js, seems better, wait, why use a HTML parser in a browser? Is that the browser supposed to do? Thus, no need to use HTML template? Yes, use DOM snippets, wait, are you talking about web components? Isn’t that W3C for? Or you are talking about developing web apps in plain Javascript like what Google does? Bullshit, I only need CoffeeScript, it performs very well, so why not CoffeeScript? Or use Coo, LiveScript, DART, GWT? OK, that’s too many to choose from, I might as well go back to Ruby on Rails. No? Ruby on Rails is clunky and not extensible? How about Grails, Groovy, Roo? Too simple to use? All right, how about node.js? Not extensible as well? But, it enables me to write code for both client side and server side, oh, even MongoDB in one language – Javascript. No, don’t like Javascript? How about PHP? I hear ya, it’s not thread-safe. Are you joking? All right, let’s go back to server-side programming. Back to Java? No good? Lisp, or Clojure? Great, it has a bridge/protocol buffer/thrift, in this way even Haskell programmers can come on board to write web apps. Or use Scala/Lift/Play, they are the best framework came into being, because FourSqure is using them so they must be good. Of course, we shouldn’t use SOAP and will use JSON RESTful services, only banks and Walmarts use SOAP, and (for persistence) certainly no SQL DB, since they are not flexable.