Hacker News Comments on
Learning From Data (Introductory Machine Learning)
Hacker News Stories and CommentsAll the comments and stories posted to Hacker News that reference this url.
"closures were accomplished with anonymous objects until version 8!"
Java has had closures through inner classes since the beginning, albeit admittedly in a verbose way. This is a quote from page 540 of "Concepts, Techniques and Models of Computer Programming": Full lexical scoping. Full lexical scoping means that the language supports procedure values with external references. This allows a class to be defined inside the ￼￼￼￼￼scope of a procedure or another class. Both Smalltalk-80 and Java support procedure values (with some restrictions). In Java they are instances of inner classes (i.e., nested classes). They are quite verbose due to the class syntax (see the epigraph at the beginning of this section).
But I think this is already enough to do high order programming, given that it effectively allows having functions as values (and hence high order functions), and support all 4 basic techniques high order programming builds upon: procedural abstraction (which relies on closures), genericity, instantiation and embedding .
I have to admit that I am not sure if I understand what you mean by "There is simply no way to infer where a value was set without tracing the entire code, which slows development time by a factor of 10 to 100 over more functional techniques that use methods to derive state instead of values". My (possibly wrong) interpretation is that you are referring to lazy execution, given that this technique associates a variable with a function that creates its value but whose execution is delayed until triggered when the value is actually needed.
Is this correct? If it is, then explicit lazy execution can certainly be accomplished in Java, given that, as I have said before, it allows embedding procedure values in a data structure. Of course, this is not as convenient as implicit lazy execution as in Haskell with its non strict evaluation, but it achieves the main purpose of laziness all the same, which is to optimize resources by allowing consumers rather than producers to drive value creation and hence generate data structures incrementally (as they are needed) rather than eagerly (as in simpler data driven techniques): stream programming; another advantage of laziness is of course purely functional persistent data structures in some cases with good performance ( and ).
"It would also be nice to have the numerical computing techniques from MATLAB"
I couldn't agree more with this. For instance, if possible, for a ML project I think it's better to do as much research/experiments/development as possible in Matlab/Octave, and then translate it to Python or whatever the production language is (would love to hear opinions on this). It would be so nice if such translation could be avoided (maybe a preprocessor could automate it, but still ...).
I believe that the reason is that Matlab is just a much more natural language for mathematical programming. I did the wonderful mooc  in Matlab, and much prefered it compared to the Python solutions I saw.
⬐ charlyslOK, apologies for making such a long post. Here is my point (which has turned out to be pretty long too):
1) I have realized that systematically learning programming concepts, models and algorithms first, and how to apply them through programming techniques is much more important than just keeping on learning new languages and frameworks. For this, I am finding "Concepts, Techniques and Models of Computer Programming" invaluable; it covers an amazing amount of ground, and has an excellent bibliography to know where to learn more of a particular aspect. It is is a successor of SICP, which is very good too, and, I suspect as a tribute, is the first reference in CTM.
2) Learn how to do lightweight design upfront based only on the problem/requirement independently from language; the book above helps enormously, but I also really like the approach in the 2008 version of the MIT course 6.005 (later versions are watered down IMHO) . It reinforces this design approach, and has, AFAIK, the best approach to using Design Patterns properly and systematically: to bridge the gap between design and code, which this way just flows almost automatically from the design. It may not be immediately obvious, but this course has a lot in common with SICP. For this reason I am highly sceptical of TDD, although I love to write the tests first and incrementally.
3) Once you know 1), many aspects of learning a new language and using it well are a piece of cake, because what you learned in 1) transcends any particular language and is timeless; I am now starting to enjoy mapping what I learned in 1) to different languages.
4) if you have to or want to use a language that is lacking direct support for anything in 1), if the language's computing model allows it (and many do, it is amazing how adding just one little concept to a language opens a whole range of possibilities but also problems, i.e. destructive assignment, threads, exceptions, triggers, ports, dataflow variables, etc), you can just build an abstraction or find a mature library that implements it. It is equally amazing how much you can still accomplish even if you remove one of the those concepts from a language, like destructive assignment, if you know the right techniques. It may not be as efficient and convenient as a built in abstraction, but will very likely still be much better than the alternative of implementing a design that is not the right one for the problem/requirement.
5) there is no need at all to be intimidated by a language or system with an enormous amount of features/libraries. Most of the time you only need to select a subset of the language to accomplish your goal efficiently. From 1) you will learn exactly how to do this and exactly why it is crazy to try to use the full power of a language; you should actually do the exact opposite, use as few concepts of a language as you can get away with while still writing a program that has a good balance of all required good properties.
It is starting again on September 17, 2017 though you can access some of the material already. In addition to the quality of the content, one of the most amazing things about previous offerings is just how involved he has been in the forums, directly helping students.