HN user

jhck

85 karma
Posts4
Comments23
View on HN

Congrats on launching the early access! I'm familiar with data-oriented programming from Clojure and F#, and I'm interested in seeing how you approach it in Java, so I just picked up a copy (ebook). Wish you all the best on completing the book!

Role of Algorithms 3 years ago

I think it's a fine place to start for the following reasons:

* It has a large selection of problems with many good starter problems.

* Once you've solved a problem, you can see how others have solved it (wish more sites had this feature).

* You don't have to write I/O code, so you can just focus on the problem.

Role of Algorithms 3 years ago

I share that sentiment. I've been practicing Competitive Programming off-and-on for some years now. I still struggle a lot with it. But sometimes I manage to come up with a nice solution, and that makes it all worth it to me.

When I make no progress at all, I take comfort in an anecdote I once read about the statistician Jimmie Savage [1]:

"Jimmie had what he called 'a long-standing neurosis about Pólya-Szegö' (the most famous and long-lived problem book in analysis). Even when he was working on his first (and major) book in Paris, he was spending evenings on that neurosis. 'Pólya-Szegö humiliates me', he wrote. 'I never really know what's going on, but I can now work quite a few of the problems and seem to learn thereby some things of general interest.'" [2]

[1] https://en.wikipedia.org/wiki/Leonard_Jimmie_Savage

[2] Quote from Paul Halmos's Automathography

You're right that the searching and sorting methods discussed are elementary, but note that the article is about how to prove the correctness of the methods (validity and termination); so it's not just the usual fare about binary search and insertion sort - the article's treatment of those methods actually builds on the transition system theory developed at the beginning. That said, this note is indeed used for CS 101 at Aarhus University - more specifically, it's used in the "Algorithms and Data Structures" course that first year CS students go through.

Those are some very nice insights, thanks for sharing them! Can you recommend a good resource on writing a parser by hand that doesn't bail on the first error? Or would you instead suggest studying the source code for e.g. the rust-analyzer parser?

I felt the same way when I first wanted to try the language (have to use Windows for work). I went to clojure.org only to find the message:

  Installation on Windows: Not yet available - see Leiningen or Boot instead.
That was a disappointment to me, seeing as the language has been around for more than 10 years now. Also, when I went to try the Leiningen route I found that the installer wouldn't work on Windows 10:

https://github.com/technomancy/leiningen/issues/2412

So I decided to try another language instead... But eventually I returned to Clojure and managed to get it up and running by using the fix that's suggested in the GitHub issue above. I'm really enjoying the language, but I fully agree that it can be frustrating to install on Windows.

Tao's Analysis I is fantastic. There's a review available from the MAA: https://www.maa.org/publications/maa-reviews/analysis-i-0

The book doesn't touch on applications. Since you're studying applied math, you might want to supplement it with something like "Calculus with Applications" by Peter Lax and Maria Terrell.

On YouTube one can find lecture videos from a real analysis course given by Francis Su (former president of the MAA): https://www.youtube.com/playlist?list=PL0E754696F72137EC

In a book review from 1988 [1, p. 892] the mathematician Underwood Dudley claimed:

First-semester calculus has NO applications.

That said, the central ideas of calculus are firmly grounded in daily life (as Strang points out in the video): Differential calculus is about investigating speed (or, more generally, rate of change), and integral calculus is about investigating area.

[1] http://www.maa.org/sites/default/files/0002989051112.di99173...

To cite Brian Goetz (Java language architect) [1]: "It is totally in Oracle's self-interest for Java to remain vibrant. We have billions of lines of Java code. We have tens of billions of dollars a year in revenue from Java-based products. We employ 10-15 thousand Java developers. If Java were to become irrelevant we wouldn't be able to hire new developers, we would have to pay a lot of money to retrain those developers, we would have to rewrite billions of lines of code. Much better to make sure that Java remains a productive platform for development. And if it happens to benefit the rest of the world that's collateral damage."

[1] https://youtu.be/Dq2WQuWVrgQ?t=56m14s

It's a shame that the "piracy is a matter of convenience" argument is dismissed so quickly. Living in the US you can easily get legal access to lots of creative content through the web, but for people outside of the US it's a different story.

No, Knuth's version doesn't handle those words either. Here's how he defines a word in his literate program:

Let's agree that a word is a sequence of one or more contiguous letters; "Bentley" is a word, but "ain't" isn't. The sequence of letters should be maximal, in the sense that it cannot be lengthened without including a nonletter.

I was introduced to formal reasoning about programs in an introductory course on algorithms and data structures in March. Most of the curriculum was from CLRS,[1] which presents proofs of correctness for many algorithms but doesn't explain how to develop such proofs. The curriculum for the last two weeks of the course, however, was a handout titled Transition Systems,[2] which I found to be an excellent introduction to the subject.

Since that time I've been interested in the idea of proving programs correct. On weekends I'm currently making my way through David Gries's The Science of Programming. Similar books include

- A Discipline of Programming by Dijkstra

- The Evolution of Programs by N. Dershowitz

[1] http://mitpress.mit.edu/algorithms/

[2] http://www.cs.au.dk/dADS1/daimi-fn64.pdf

So it was easy to check that you couldn't add a int to a strongly typed list of strings, but only in source. (I think, I'm not as well read as javac / JVM internals)

You're right. Here's Jim Waldo's explanation from Java: The Good Parts:

"the inability to change the VM or bytecodes [due to requirements of backwards compatibility] meant that parameterized types could occur only in the source code. The type system of the runtime hasn’t changed, and doesn’t include generics or parameterized types. What we see in our code as a Set<Player> is seen in the bytecodes as simply a Set of objects."