Live data from Hacker News

Steve Yegge: Notes from the Mystery Machine Bus

plus.google.com

21–30 of 186 posts

Re: Steve Yegge: Notes from the Mystery Machine Bus

#21

before it started I knew it was going to be another typing rant. I think you continue to present a false dichotomy on typing, as well as missing some of the reasons people desire it. In particular, I like typing as machine readable documentation, that makes IDEs simpler and more accurate in code navigation and refactoring. Dart in particular shows this false dichotomy really well, but having a type system for human a…

In the examples given, Dart with its optional type system (and with type-checking that only triggers warnings) would actually fall in the liberal camp. You can bet that the Mars Curiosity rover isn't using a garbage collected dynamic language It's using 2.5 million lines of C. C is not a strongly typed language. C can't really be classified as dynamic or static. C is just low-level assembly with some structure attach…

1. Dart is less liberal than JS. For example, it is early bound. This fact alone allows the IDEs to do a much better job with less complexity.

As I mentioned, Carmack and Sweeney make engines, the artist interface is UnrealScript, or Lua, etc. But that's besides the point: performance matters. Carmack isn't trying to build yet another Box2D casual game (the Iphone Angry Birds uses a C implementation of Box2D, and Lua for game logic)

For someone like John Carmack, they are trying to push the state of the art, and starting off implementing say, idTech 7 in Python would yield unrealistic data if you're trying to see how feasible a given new rendering technique works on the large scale.

C is a typed language, there's no getting around it. It is in fact, a manifestly typed language, the types aren't optional. The fact that you can freely cast your way out of any situation doesn't really make it a dynamic language, anymore than Java reflection or bytecode rewriting makes Java a dynamic language.

The basic fact remains, the Mars rover is a highly performance critical piece of software with hard real time requirements, and it's simply not going to be written in a language that doesn't allow precise control over numeric types and memory allocation behavior. It's really those guarantees that many people associate with strongly typed systems programming languages, not the compile time checking.

Game programmers are very liberal, they want to escape straight jackets, and get deterministic and low level control over everything, often breaking the rules of the system. And in this regard, dynamic languages often taken away some freedom -- the freedom to control memory, stack, and cache behavior. They are conservative in a way.

Re: Steve Yegge: Notes from the Mystery Machine Bus

#22
Clojure is tied very strongly to the Java toolchain (note "toolchain" rather than "ecosystem"). The packaging system and package managers use Maven and Java jars instead of a clojure-based one.

This means that promising projects like Clojure CLR have no chance of taking off the ground, unlike say Ruby vs Jruby vs Ruby EE vs Rubinius.

Re: Steve Yegge: Notes from the Mystery Machine Bus

#23

before it started I knew it was going to be another typing rant. I think you continue to present a false dichotomy on typing, as well as missing some of the reasons people desire it. In particular, I like typing as machine readable documentation, that makes IDEs simpler and more accurate in code navigation and refactoring. Dart in particular shows this false dichotomy really well, but having a type system for human a…

In the examples given, Dart with its optional type system (and with type-checking that only triggers warnings) would actually fall in the liberal camp. You can bet that the Mars Curiosity rover isn't using a garbage collected dynamic language It's using 2.5 million lines of C. C is not a strongly typed language. C can't really be classified as dynamic or static. C is just low-level assembly with some structure attach…

> I don't think that Tim Sweeney or John Carmack are prematurely optimizing ...

Well, this is where the rant misses the mark, I think. Whether some programming thing is Liberal or Conservative really depends on the context, how much is at stake and where you're currently pushing the envelope.

The code for the Mars Rover has to be ridiculously safe and conservative, since it cost billions, is deployed in a harsh environment and if it crashes you've lost the lot.

If you're hacking and validating some startup idea, then something that's bloated and poorly tested is fine, since it's likely to be wrong at first, and speed of development is more important than safety.

Both of these are safe choices, and they're the choices that you'd make, but they're at opposite ends of the spectrum... but you're the same developer.

He has 9 points for each side, but my take is that they're all true.

Re: Steve Yegge: Notes from the Mystery Machine Bus

#24
My project is accomplishing this lofty and almost insanely ambitious goal through the (A) normative, language-neutral, cross-language definitions of, and (B) subsequent standardization of, several distinct parts of the toolchain: (I) compiler and interpreter Intermediate Representations and metadata, (II) editor-client-to-server protocols, (III) source code indexing, analysis and query languages, and (IV) fine-grained dependency specifications at the level of build systems, source files, and code symbols.

So this is the project that Yegge mentioned would turn "all code [...] into Wikipedia." Man, my ongoing project is more similar to it than I thought.

I find it curious that he would even bother to mention (IV) though. (IV) falls right out if you start from the correct data representation, which I would have assumed from (A). I wonder if he's still listing dependencies explicitly.

Re: Steve Yegge: Notes from the Mystery Machine Bus

#25
I think that a better parallel dichotomy would be features vs quality, in a world where they are mutually exclusive. However, I think Yegge wasted too much thought on this. It is the software that dictates how conservative a piece of software is: bugs and stability are generally tolerated in user-facing software because at worst the user has a bad experience. However, a database better be as close to 100% reliable as possible, which in turn leads to testing and static analysis, meaning typing... It is not really negotiable.

I think there are way too many variables for a linear scale to provide meaningful comparison.

Re: Steve Yegge: Notes from the Mystery Machine Bus

#26

I think as a Ruby (and occasionally C) programmer I stand firmly in the liberal camp, but is it weird that I sort of like Haskell too? I find the idea of expressing the semantics of my program through types to be useful sometimes. Then again my actually political views tend to span the liberal/conservative spectrum so I suppose this is not surprising.

Ruby is more liberal than c (duck typing)

Haskell is more liberal than ruby (functional programming)

C is more liberal than Haskell (weak typing)

Also, I am apparently a radically conservative programmer, but my political views in real life tend toward radical liberalism. I think any correlation says more about age than it does about politics.

Re: Steve Yegge: Notes from the Mystery Machine Bus

#27
I think I'm a software libertarian.

If you like dynamic typing and can write good, legible code in a language like Python or Lisp, do it. If you like static typing, knock yourself out. If you want to use an IDE, go for it. If you want to use emacs, do it. Hell, if you like object-oriented programming, try it out. I think 95% of "object-oriented" programming (as currently practiced) is junk, but the other 5% is legitimately valuable. If you have the taste to pick from that 5%, go ahead.

What you shouldn't have the right to do is impose complexity on other people. Use whatever environment you like, but if your code depends on your environment, that's bad. If people can't get work done because they're cleaning up your messes, that's bad. Be as liberal and as kinky as you want in your own sandbox, but don't impose your wacky, untested DSL on everyone else.

That said, I like statically typed languages. ML is the only language I've encountered where reading average-case code is enjoyable. (Scala's a great language, but average-case code is ugly due to the Java influence. There's a fair amount of spaghetti code written in it due to the cultural legacy of the SpaghettiFactoryFactory Java culture. I can't speak for Haskell because I haven't seen enough.) I think that's neat and very rare in the programming world. How much code is enjoyable to read? 1 percent, maybe? In Ocaml, that number is a lot higher. Probably around 50%. 50 percent of Java code isn't even legible. Being able to actually read other peoples' code is nice, and it's one thing I miss about working in Ocaml.

I'm probably more in line with the hard-line conservative camp in terms of my view of complexity: avoid it unless you need it. The Unix philosophy works. Religious X-oriented programming doesn't. Big Code leads to fail. Small-program methodology's little programs (Unix philosophy) are written to solve problems: do one thing and do it well. Ambitious projects should be structured and respected as systems, not all-or-nothing, massive single-program megaliths with no clear communication policy among modules. Small-program development works. Big Software is written to get promotions. That produces the next generation's legacy horrors. Also, structuring your company around 17-day "iterations" is stupid. Et cetera.

I also tend to think that a lot of the features that scare typical software conservatives are genuinely worthwhile. Macros in Lisp are important and can be very beneficial-- if used conservatively. Cleverness for its own sake is bad, but there are times when macros are very useful. Document what you're doing, and make sure it's tasteful and makes sense before you let anyone else depend on the work, but go ahead and do it. I wouldn't have learned what not to do with macros had I not made a few mistakes when I first encountered them.

So, with a mix of opinions from the "conservative" and "liberal" camps, I can't say where I fall. I like macros (when used by disciplined people) but I also like static typing. Both turn out to be very useful tools. Consequently, I find that I like a lot of different languages and insist not on a specific one, but on small-program methodology so that people can use the right tool for the job.

I'm conservative because I dislike complexity (I think "software liberals" are OK with complexity as long as it's under the hood-- most metaprogramming involves extremely complex solutions that, when they work and the abstractions don't leak, although this is rare, allow clean interfaces-- whereas I'm not comfortable making that distinction) but I (a) understand that liberalism is essential to driving innovation, and (b) can't classify myself as a conservative because management is inherently conservative and is, in software, almost never the solution to the problem. Usually, it is the problem. Most companies fall to shit not because they have some difficult code-- every codebase has some crap in it-- but because management mandates that they use the bad code (often for political reasons, like the original architect being a crony of the manager) as-is instead of taking the time to understand or replace it. I'd like to see how Valve evolves over the next 5 years, because I think management in software is usually a source of undesirable complexity, rather than the safeguard against complexity that it thinks it is being. If Valve can give us a determination either way on whether software can work without managers in the first place, that'd be incredibly useful information.

Not surprisingly, software politics also has a lot of individual inconsistencies and hypocrisy. Corporatism (in politics, not software) is neither socialism nor capitalism but a system designed to give the best of both worlds to a well-connected elite and the worst of both to everyone else. (Consider air travel as a microcosm: Soviet experience and service quality and comfort, mean-spirited and capricious-- but very capitalistic-- pricing.) I think the same exists in software politics and the typical managerial conservatism. People and organizations can identify in name with liberalism or conservatism, but tend to pick and choose as suits them. (For an example of this inconsistency: Google, a bastion of software conservatism, allowed GCL to exist.) What makes 90 percent of software jobs so fucking miserable isn't those rock star, "undisciplined" Rails liberals or stodgy gray-haired conservatives. Rather, it's a corporatist "crony capitalism" state where people who win managerial blessing get liberalism (i.e. the autonomy to do whatever they want and freely impose complexity downstream) while the rest of the drones get stonewalled with a supposedly stiff-lipped conservatism (e.g. "you can't [fix that codebase | use that language | pursue that side project] because we can't afford the risk") that is presented as principled, although the drones see managerial favorites getting through that wall on a daily basis, so they aren't fooled.

Re: Steve Yegge: Notes from the Mystery Machine Bus

#28
As much as some commenters are (weirdly?) railing against this classification scheme I think the underlying idea that software conservatism is about risk aversion is essentially accurate.

Perhaps another way of framing this is to ask the question: are you optimizing for the best case or the worst case? This ultimately is a form of risk management. And I'm not talking in the algorithmic sense, meaning complexity expressed as the asymptotically worst case. I'm talking about people, software and ecosystems.

Let me illustrate this idea with Java.

- C++ has operator overloads. Java does not? Why? Because people might abuse them. That's optimizing for the worst case (ie bad or inexperienced programmers). Properly used, operator overloading can lead to extremely readable code;

- Java has checked exceptions and uses them liberally (pun intended). C#, as one example, only has unchecked exceptions. Why? Philosophically the Java language designers (and many of its users) feel that this forces callers to deal with exceptions. Pragmatically (IMHO) it does not and leads to more cases of exceptions being simply swallowed. But again this is optimizing for the worst case ie programmers who should deal with a particular error condition but won't;

- Java has no multiple inheritance. Same story: it can be abused ("it is known"). But also mixins can be a powerful metaphor.

- Rinse and repeat for duck typing, extension methods, etc.

Putting Python two steps from Ruby strikes me as an interesting choice. I'd say the difference is at most one.

I'll also agree that Google as a company (based on my own much more limited experience than Yegge's) is firmly conservative. The style of writing Javascript that he refers to is about writing Google Closure code with all sorts of directives to aid the Closure Compiler (I describe Closure as putting the Java back into Javascript).

I also see a lot of Python code that isn't really Python. It's Java expressed in Python syntax rather than idiomatic Python and that is kind of sad.

Which isn't to say that any of this is necessarily bad (or good). It's just a (software) political viewpoint you need to be comfortable with (or at least can tolerate) or (to quote the South Park meme) "You're gonna have a bad time".

One of the comments linked Worse is Better [1], which is worth a read too.

[1]: http://www.stanford.edu/class/cs240/readings/worse-is-better...

Re: Steve Yegge: Notes from the Mystery Machine Bus

#29
I'm trying to think of what anti-macros Clojure talk by a "key presenter" he might be referring to. I'm only familiar with the talks from Clojure/conj, so the only one that I can think of is Christophe Grand's (not= DSLs macros) talk from 2010[1]. If so, I think his summary mischaracterizes the content of that talk, but it could be another talk he's thinking of.

[1] http://blip.tv/clojure/christophe-grand-not-dsl-macros-45407...

Re: Steve Yegge: Notes from the Mystery Machine Bus

#30

before it started I knew it was going to be another typing rant. I think you continue to present a false dichotomy on typing, as well as missing some of the reasons people desire it. In particular, I like typing as machine readable documentation, that makes IDEs simpler and more accurate in code navigation and refactoring. Dart in particular shows this false dichotomy really well, but having a type system for human a…

> that makes IDEs simpler and more accurate in code navigation and refactoring

IMHO, that's one the OP's main arguments, that for example there is a whole class of (liberal?!) people to which IDEs don't matter at all, so that someone (a conservative?!) arguing "hey, this static typing thingie makes IDEs more easy to use" doesn't matter. So it makes sense to at least know on which side of the fence each of us sits, so that we won't argue as much :)

(just to be clear, I'm trying to use the concepts "liberal" and "conservative" as they're defined in the article)

Post reply on HN