HomeНаука и техникаRelated VideosMore From: O'Reilly

OSCON 2010: Rob Pike, "Public Static Void"

921 ratings | 82242 views
http://oscon.com Rob Pike (Google, Inc.), "Public Static Void"
Html code for embedding videos on your blog
Text Comments (49)
caesar bala (2 months ago)
Watching 9 years after talk still make sense
joseph fatur (6 months ago)
Just a beginner's observation, but when I read my forty-some books on Java programming, I see many code examples that are unnecessarily complicated with constructors and tiny methods calling each other, presumably in the name of encapsulation and code reuse. This code could be written easily in a procedural style. I'm led to believe that Brian Will is right: "Object Oriented Programming Is Bad". Why do I need forty books? Because the many ways of doing the same things in Java all need explanation - and I guess they are hard to explain because most of the explanations are poor.
Rob Rohan (7 months ago)
"They think that the way those languages make them think is the right way to think about software. I disagree." So true.
Technical Machine (10 months ago)
C++ came out of Bell Labs. You could have prevented this, Rob.
Purdy Mouth (1 year ago)
public static void it's so depressing innit?
John Balvin (1 year ago)
yep, just look this unreadable code, its looks like make for aliens http://www.tutorialspoint.com/design_pattern/builder_pattern.htm
Тарас Буник (1 year ago)
6:27 What was wrong with old integer 80? ROFL
PetarDambovaliev (1 year ago)
I watched all Rob Pike talks because he is so god damn funny. "What was wrong with the old integer 80?"
Elijah Malaby (2 years ago)
It frustrates me that people keep forgetting that the Lisp community has been slowly working on all of these problems for decades and has solved a lot of them by now... Clojure and Common Lisp, for example, are incrementally compiled (so you can work interactively without loosing performance), optionally statically typed (so, once you've worked out an interface, you can get static type checking, but it doesn't slow you down when you're experimenting), and have great concurrency primitives (CSP, CAS, STM, immutable data structures, etc.). Plus, because of the power of lisp macros, it's easy for libraries to add new features to the language/compiler in a sane manner, so complex code patterns can be easily abstracted away.
kalekold (5 months ago)
Lisp is too old and crusty, we want more fashionable languages with hotness!!!
Brandon H (2 years ago)
funny how he calls Java and C++ very verbose, yet Golang us similarly verbose. Just try to do something close to generics and you'll be writing a crap ton of code in no time. interfaces are a cool idea but they're weird and clunky. and can get really confusing fast. I like Go, but it's far from concise
Elite7555 (6 months ago)
What I don't like about Go Interfaces is that they only support virtual dispatch. Go should be more zero-cost abstraction.
Ali Hammad Shah (2 years ago)
Go is the easiest language ever, and very imperative. I agree it feels too verbose. Rust on the other hand seems more concise with type classes and generics but not many people use it.
krupal shah (2 years ago)
This talk is from 2010 and it proves the things he is talking about. If you see newer programming languages like Swift, Kotlin or ES6; they are all converging to the same language. Still, the software world suffers from those old-aged problems: error prone code, readability and sharing of code, programmer productivity, compilation speed etc. If those languages are very good, why they can't solve for those who write them? After a long time; People will realise this and Go will be very successful because of its simplicity. There is no doubt about it.
Yandry Pozo (2 years ago)
Amen man !!
Peter Turner (4 years ago)
I agree with Rob's general view on patterns. It's brief so he's probably got a lot more to add to that given time, but overall a pattern does indeed highlight a weakness in the language. If something can be so predictably designed/written often enough to have a name, then it should be inherent within the language. The other (main) issue I personally have with patterns is that it gives the impression that there's a stock solution for every possible problem and all a coder needs to do is find the right pattern to apply. From my experience this is usually a result of education where being a good student in programming correlates with being able to regurgitate the most applicable pattern given an exam-type scenario. Over the years in dev (and interviewing coders has been part of that), I've come to the conclusion that patterns remove what is actually the most important aspect of logic/coding - the "grey area" as I call it. A pattern offers the idea that every "real-world" scenario can be resolved by using a method which 100% resolves it and it's just about applying the right pattern. This makes patterns ideal for someone who can "fill in forms" as Rob elegantly puts it. Why doesn't Java/C just have "applyVisitorPattern(Object Visitor, List<Object> Guests)" etc if that is truly a generic solution? The reality of course is this grey area. Hardly any code solution is 100% of one thing - it's probably 30% of business logic, 20% of database design, 20% of memory management, 20% of conscision, 15% of UX considerations, 25% of optimisation, 15% configuration etc And that doesn't add up to 100% which makes a lot of devs uncomfortable if their idea of coding is 100% code using a pattern. In interviews I tend to ask why they want to be a coder, and if the answer is "because I love it" then they have the job. And so far, I've never heard one mention of patterns after 7 years of RnD.
Andrew Thompson (3 years ago)
+Peter Turner "The other (main) issue I personally have with patterns is that it gives the impression that there's a stock solution for every possible problem and all a coder needs to do is find the right pattern to apply." That is well said. I would add that most problems don't fit really well into any pre-made pattern.
foxkroe (4 years ago)
I'm really a fan of Go and use it almost every day now, but Rob said something strange: "Patterns -> Failure of language". Now, in Go there a lot of patterns (error checking for instance). Also, to write "idiomatic Go", one really has to look at the patterns, which make Go idomatic. I know, this talk is pretty old now, but it seems funny, that one of the makers of Go has such a clear opinion about patterns. I think, patterns are absolutely normal and important. Most language make it possible, to do terrible stuff (overwriting builtin stuff like javascript). Patterns can help here to stay clean in the code...
John Balvin (1 year ago)
@Øyvind Skaar you´re right that kind of things are what makes me scare of java thoses patterns is so unnecessary
M G (1 year ago)
foxkroe He is talking about patterns like Model View Controller, Factory Pattern etc. He is like why learn the language then also learn patterns to apply on the language rather than the language implicitly enforcing those patterns by itself and Go does that implicitly. The fact that each method implements an interface automatically embeds Factory pattern and so on.
John Ervine (2 years ago)
foxkroe I tend to agree with you on patterns but I do thing some programmers go looking for GOF patterns as a matter of habit sometimes without thinking if the problem can solved without one
Øyvind Skaar (2 years ago)
+foxkroe Yeah, my thoughts exactly. But, if you look up "Java Patterns" it really is something else than what we think of as "go patterns". In go a "pattern" is usually a concept or a small block of code. In Java it's things like this: http://www.tutorialspoint.com/design_pattern/builder_pattern.htm
noahz (6 years ago)
"False dichotomy between static and dynamic languages." Wish I could give this 100 likes.
tieigisi (7 years ago)
Man this video made me feel like i just drank a glass of cool fresh water after a long walk through the scorching desert. Really well put. Industrial code is REALLY verbose... java does not help either. It seems more like a 3in1 instant coffee: Just pour some code in there, and it will turn into this beautiful cool new app. But we all know it's not exactly the real thing, like a good made arabica espresso.
MrXStark (7 years ago)
Computer Science is like LIFE. You first say that herbs are medicines(medival), then we replace them with incantations(premedival), followed by Unani(5th Century), 17th Century(Allopathy), 21st century we go back to herbs. Similarly, Go is an example that verbosity provided by C++ and Java HINDERS programmers more than it supports them. Python is also another example of why we should have LOVED C.
FlameHue (7 years ago)
D code compiles much faster than Go.
Nick Vellios (8 months ago)
If a tree falls in the forest...
msniemi (8 years ago)
@yudlejoza LOL - Awesome =)
Timwi Heizmann (8 years ago)
I’m amused how the entire talk remains completely oblivious of C#, then describes a niche which C# already fills, and claims that we need Go to fill it again :-D
you238 (8 years ago)
I use C and Python on a daily basis and it works pretty well for the two areas I develop for, very low-level embedded, and dumb apps for my Windows box.
Chaim Krause (8 years ago)
Java 1.2 became Java 2. Will Go version 1.2 become GOTO ?
John Balvin (1 year ago)
Seán O'Nilbud (8 years ago)
10 ? Hello 20 GOTO 10 RUN 0 0 0 0 0 0 0 0
MrStimpy77 (8 years ago)
100% of the examples of "why C++ and Java suck" are C++. Java's not anywhere near that bad. Furthermore, The ECMA open standard language known as C#--brought about by a big, pushy company no different in this space than Google--already had the exact same objectives as Java and now Go had, and it has actually been fundamentally evolving at the core, such as to replace patterns with language features (as seen in lambdas and extension methods). Google just wanted to be INDEPENDENT, typical anti-MS.
hansiraber (8 years ago)
i guess he's right in many ways. just curious he hasn't mentioned scala for more than 2 seconds. they seem to down the exact same road...
Yudle Joza (8 years ago)
the D and Go people should pool their efforts, merge the two and call it 'The GoD Programming Language'
ryan kulla (8 years ago)
his analysis seems right on to me. Language designers are like the people who make James Bonds weapons. Sometimes they make programmers cool and useful stuff and sometimes it's overly complex crap. At least when things are open source, we get some say in it, which is how it should be.
Andrey Rome (8 years ago)
@PALFINTER OMG, You are out of time, sir. Try Mono and MonoDevelop. They are mature now and included in manu Linux distribs by default. >I'm junior scientist and i have little project and there are team about 7 developers. Maybe you are interested in using SIMD also. Mono can do that. tirania. org/ blog/ archive/ 2008/ Nov-03. html C++ and QT is a good choice, but anyway using managed languages is faster for developing.
Andrey Rome (8 years ago)
@farastray1 Are we talking about .net or C# as a language? Because .net has IronRuby and IronPython. >NET apis suffer from the same flaws as Java. That is disputable. I didn't saw in this presentation any mentioning about Java library flaws we could project on .net. >WCF is destroying productivity That is disputable. It is not every way tool. It is pretty small part of libraries. You don't have to use it, right? I also can mention such marvelous project as Nemerle meta-programming.
Christian Toivola (8 years ago)
@XorLavir the .NET apis suffer from the same flaws as Java. Any little thing is a big chore and there's a community culture of accepting -- or shall I even say embracing -- undue complexity. The thing that continues to make Python or Ruby pleasant to work in is that the communities as a whole are pragmatic and will call you out if you write constipated code. This is what .NET needs but suffers from too many years of neglect and bs initiatives - just look at how WCF is destroying productivity.
Andrey Rome (8 years ago)
Btw, in my humble opinion C# doesn't have such minuses. Its syntax is much clearer and "almost" ideal. Plus, lambdas and dynamic make it realy handy. So it is already in that niche. Well, but Google doesn't like MS, so it is obvious why Rob hadn't said a word about .net ;-)
tivrfoa (8 years ago)
verbosity makes programs easier to maintain. Code completion solves programmers laziness. =)
leimy2k (8 years ago)
@rwese Google is using Go in production systems today. I've used it for prototyping some concurrent systems at work, as I'm not yet comfortable adopting it myself yet.
leimy2k (8 years ago)
@owlstead And yet he was easily able to find code like that in the wild...
Maarten Bodewes (8 years ago)
The Java example breaks about every rule in the book. It's static, the constants do not comply to Sun Java coding practices, it uses 1.4 style code instead of relying on boxing/unboxing, well the list goes on. His other example is a stack of Generics and inner classes put on top of each other. That would have been flagged as a gross abuse by any reviewer. I'm not disagreeing on what he says in the talk per se, but those examples were below the belt.
Chilapa of the Amazons (8 years ago)
"Go" is a bit too low level for my uses (I prefer Python), but I certainly agree with Rob about the stupid verbosity of C++ and Java, their hidden pitfalls, the suckiness of their stdlibs and of most commonly used libraries, etc.
Rene Weselowski (8 years ago)
So has GO already made the step from "it's just a project/test and we want to see how it goes", like they said at IO, to a mature language aimed for production?
leimy2k (8 years ago)
@nickik21 The go compiler does make pretty fast code, and it's not heavily optimized. People can go ahead and make an LLVM based Go compiler if they want to. They went with a code base they were really familiar with, which was the Plan 9 C compilers as a basis for the Go compilers. Go is pretty expressive, it's got closures. it's got a nice approach to interfaces and types. It's got concurrency built into the language as well as a CSP like programming model.
leimy2k (8 years ago)
@nwmcsween 1. Because he understands imperative programming, and most programmers know imperative programming vs a declarative or functional style. 3. If it's JIT "compiled" it's not interpreted.

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.