3 ms·
You realize that this poster is Google employee #7, responsible for "Don't be evil" (along with Paul Buchheit), and wrote the first prototype for Google Instant
by stcredzero 16y ago
You realize that this poster is Google employee #7, responsible for "Don't be evil" (along with Paul Buchheit), and wrote the first prototype for Google Instant back in 1999?
Why, are you arguing from authority on his behalf? In that case, I say he should know better! (That's a stand worth burning some karma on!)
tl;dr - If you are going to criticize language X, first take the time to learn the best practices of language X. If you don't, you're just creating more clueless noise of a kind which already exists online by the ton. Also, it seems quite lazy. All you have to do is get on IRC and ask, "Hey, I've been playing around with X. What about when this happens?" You might even learn something this way.
EDIT: Google employee #7? Makes me wonder if dozens of Google programmers have said something like, "Arrrgh, why did he have to name it that!? Did Amit write that code?"
- nostrademons 16y agoNo, I'm arguing against the ad hominem that forms the second half of your original post. The first half of your post was great. It addresses the arguments directly, and I completely agree. In the second half, you then go on to make assumptions about the programmer's experience and aptitude - assumptions that I've shown are quite false. If you want to debate the merits of an argument, debate the merits of an argument, don't assume that everyone who argues with you is stupid. There's a very good chance that they aren't, and then you look like a fool. Edit: On a regular basis, I whine about Craig Silverstein or Jeff Dean or Marissa Mayer's code. "Why did s/he have to write it like that? It's cost us untold thousands of hours in coding around their nasty hacks and poor design decisions." However, I recognize the context they were operating in: they were a tiny startup of about 20 people, trying to organize the world's information. They were working basically round the clock, and they changed the world. Sometimes, building something that works for users and won't crash your datacenter is worth the price of maintainability. You have to survive before you have the luxury of hiring people that will call you stupid. Tradeoffs. They come with every hard problem.
- deleted 16y ago[deleted]
- deleted 16y ago[deleted]
- euccastro 16y agoAd hominem is disqualifying an argument based on attacks to the one making it. The comment you refer to is drawing (perhaps wrong) conclusions about the author of the OP from what he says. Warranted or not, it's not fallacious.
- deleted 16y ago[deleted]
- stcredzero 16y agoActually, you should re-read the "why articles like this are incorrect" part. There's nothing essential to the argument that depends on the expertise of the author. Primarily, it's a description of articles of this type, and the particular things they lack. Which, in addition to drawing incorrect conclusions and ad hominem, is also circular reasoning. Triple fallacy. Nice try, it sounded good, but you're just blowing smoke here in defense of your friend.
- stcredzero 16y ago"Why did s/he have to write it like that? It's cost us untold thousands of hours in coding around their nasty hacks and poor design decisions." However, I recognize the context they were operating in: they were a tiny startup of about 20 people, trying to organize the world's information. Yes, but if you're lucky enough to be Google Employee #7, you should now have time to do things like actually do your homework before you post about Lisp. Just because you're big company coder [single digit] doesn't mean you're necessarily an expert. I actually expect a lot of startup code to be half-baked. Large swathes of the Smalltalk base image code is still egregious, and people have had decades to do something about it and haven't. There were also lots of sophmoric Java API decisions when it first came out. I don't mistake seniority for expertise, and seniority or friendship with you or anyone in particular doesn't earn anyone a pass with me. If he knows about but doesn't subscribe to Don't Repeat Yourself then he does a good job of sounding like he just doesn't have a clue and is in the practice of writing lots of boilerplate code. To me, that is a merit of a programming language argument. (In this case demerit.) Please explain how you can read this post and think the author has a clue about careful name selection? Basically, his major point is predicated on clueless naming in dynamic languages.
- nostrademons 16y agoI've already said I agree with your basic thesis, but here's the tradeoff. Let's leave special forms out of this, on the assumption that any decent Lisp programmer will have them memorized, much like language keywords in other languages. Say that you create a naming scheme for macros - maybe you require that every macro start with "macro-", or you require that they start with "def" and "with-", or whatever. You've now pretty much completely solved the problem Amit points out, that you can't tell whether any given expression will be evaluated or how many times. But you've introduced another tradeoff: verbosity. If you prefix every form with macro-, your code looks a lot like C or JavaScript code that tries to use name prefixes to simulate namespaces, or (shudder) Java code with its AbstractFooBeanBuilderFactoryFactories. And if you use more natural prefixes like def or with-, you limit the flexibility of your macros. Where would aif from On Lisp fit in here? In fact, if you're willing to prefix your names with a unique prefix, you can trivially build a macro system in Python. Here it is: gensym_counter = 0 def gensym(): gensym_counter += 1 return "__gensym%d" % gensym_counter def macro-aif(cond, body): return macroexpand(""" %(gensym)s = %(cond)s if %(gensym)s: it = $(gensym)s %(body)s """ % { 'gensym': gensym(), 'cond': cond, 'body': body) def macroexpand(program): def execute_macro(match): try: return globals()[match.group(1)](*match.groups()[1:]) except KeyError: return match.group(0) return re.sub('(macro-\w+)\((?:(.+?)(?:,\s+|\))\)', execute_macro, program) This doesn't handle the case where macro arguments might themselves contain commas, but that can be done through invoking the Python parser (which is included in the standard library) instead of doing a regexp substitution.