HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
Programming and Scaling: Part 4 of 4 - 2011

da009999 · Youtube · 1 HN points · 2 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention da009999's video "Programming and Scaling: Part 4 of 4 - 2011".
Youtube Summary
HPIK 2011 07 21 01 part 4 podcast
Original file: http://stream.hpi.uni-potsdam.de:8080/download/podcast/HPIK_SS11/HPIK_2011_07_21_01_part_4_podcast.mp4

Quotes:

2:48 "So our particular strain of humanity has been here for but around 192,000 years. Think about that. We've only invented science 400 years ago. That's how dumb we are."
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
Tell me you wouldn't want to avoid this boilerplate:

    public class HelloWorld {
        public static void main(String[] args) {
            System.out.println("Hello, World");
        }
    }

and instead write a nice little main macro, so you may just write:

    (main (print "Hello, World!"))
Do that a few times in an application, and instead of 10 million LoC, you can write it in 100,000 LoC. This becomes much more maintainable!

Also, see: Alan Kay "Programming and Scaling" 2011

    http://www.tele-task.de/archive/video/flash/14029/
    https://www.youtube.com/watch?v=gZmcmdsoAXU
    https://www.youtube.com/watch?v=-UOmItPa4iA
    https://www.youtube.com/watch?v=QlPavndhYxQ
    https://www.youtube.com/watch?v=y9xLi0iJg1g

Also have a look at:

    https://groups.google.com/forum/#!msg/comp.lang.lisp/gsQJOGKYUw4/oLLHW0f4Ce4J
    https://groups.google.com/forum/#!msg/comp.programming/FiNIiSm5cJE/JkF5wa6Ke54J
AnimalMuppet
Sure. And then imagine that you have to take over someone else's 100,000 LoC written with their own, unique, macros, some of which may invoke other macros, and interact with them in surprising ways, depending on what's passed into them. Now you have to be able to keep in your head what all those macros do (including to each other) while you're trying to read those 100,000 LoC.

At that point, you may not find the macros to be so much of an improvement on the boilerplate...

innguest
Imagine you have to take over someone else's 1,000,000 LoC written with their own, unique, classes and methods, some of which may invoke other methods, and interact with instance variables in surprising ways, depending on which method gets called first. Now you have to be able to keep in your head the flow of data (because the methods need not explicitly pass instance variables around) while you're trying to read those 1,000,000 verbose LoC.

At that point, you may not find Objects (aka copyable global scopes where instance variables are globally available to all instance methods of a class) to be so much of an improvement over symbolic computation.

Honestly, what you said never happens in practice (no one is abusing macros like that) but what I said is literally taught by Sandi Metz in her book Practical OOP in Ruby.

Your (common) reaction is just your everyday fear of the unknown. Try it.

thro1237
This. I used to do all my programming in clojure. Now I am going back to python -- because I am not able to figure out a month after writing some code, what these deep recursive, reduce, apply things do.. But it is a good exercise writing it.
thro1237
This. I used to do all my programming in clojure. Now I am going back to python -- because I am not able to figure out a month after writing some code, what these deep recursive, reduce, apply things do.. But it is a good exercise writing it.
That's a good question, and nowadays, it feels indeed quite hard to find such programs, when applications with multi-decamegabyte-sized sources abound.

Furthermore, in general, in practice things get very bad when you have to add input validation, error handling and other special cases.

See http://www.gigamonkeys.com/code-reading/

I guess recent examples of lean and elegant programs could be found in the works of Alan Kay and his team:

http://www.tele-task.de/archive/video/flash/14029/

or

https://www.youtube.com/watch?v=gZmcmdsoAXU https://www.youtube.com/watch?v=-UOmItPa4iA https://www.youtube.com/watch?v=QlPavndhYxQ https://www.youtube.com/watch?v=y9xLi0iJg1g

In general, where you have more abstraction, you will find more elegance and leaner code.

As a microscopic example, check https://news.ycombinator.com/item?id=9211609

    def hamming(a,b)
       return sum(x!=y for x,y in map(None,a,b))
is elegant and lean.

Other implementations involving lower level details, such as computing the length of the vectors and indexing individual slots explicitely, and taking ten times more lines of codes, are clearly not more elegant and definitely not leaner.

Factored over a whole application, this kind of differences grow to an unmanageable hundrend megabytes source monster that is unmanageable by anybody, or a lean and elegant hundred kilobytes source that you can read and start to understand in a week end. Much more maintainable.

Nov 07, 2014 · 1 points, 0 comments · submitted by dkarapetyan
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.