Hacker Newsnew | past | comments | ask | show | jobs | submit | Capaverde's commentslogin

I suppose Hacker News is not interested in Mentifex...


> Is imperative programming more intuitive to people than functional programming? If so, is it because it matches the way our brains are configured, or because it’s simply the most common form of programming?

(I think) It's not because of brains or abundance, it's because of the human language.

> How far should we go to match people’s natural processes versus trying to change the way people think about programming?

Economically, it is your time (of one person only) versus the time of potentially thousands of users. What do you think?

> How impactful are comments in understanding a program? Variable names? Types? Control flow?

Ideally, I think, comments would not be contained in the source code, polluting the general vision of its structure, but would be placed outside, as documentation.

For variable names, as long as its meaning/use is made immediately clear on first sight, without needing to figure out its frequency pattern or see its declaration to figure it out (maybe placing it in a separate place from the code, again), the variable name shouldn't matter much (as long as its not purposefully unrelated or obscure).

I think it would be useful to have something like a "live documentation" in a REPL (commands like man commands documenting each part of the language (and program), each word an entry, non-sequentially accesible). That is something I would do if I were to design a programming language, a structure called a "dictionary" documenting each and every reserved/defined word in the environment.


> Ideally, I think, comments would not be contained in the source code, polluting the general vision of its structure, but would be placed outside, as documentation.

I believe Donald Knuth, who introduced Literate Programming, would disagree with this.

"According to Knuth, literate programming provides higher-quality programs, since it forces programmers to explicitly state the thoughts behind the program, making poorly thought-out design decisions more obvious. Knuth also claims that literate programming provides a first-rate documentation system, which is not an add-on, but is grown naturally in the process of exposition of one's thoughts during a program's creation."

https://en.wikipedia.org/wiki/Literate_programming

https://www-cs-faculty.stanford.edu/~knuth/lp.html

I have not used full-fledged Literate Programming, but I find having part of documentation interleaved with code helps improve both and reduces cognitive load required to search for relevant documentation elsewhere.


I've done it a few times. I'm now firmly of the opinion that ideally the only language you should see in code is a programming language. If you can not express the intent clearly in the programming language, then you should work at it until you can. It's not always possible and I write comments when I have to. Some languages are not very expressive, either, which makes it difficult.

The main problems I've had with literate programming are:

- It has a very high risk of being very slow going. If you have to change something, then you will often find that you need to change a lot of prose.

- Because of the previous point, there is a tendency to do a lot of up front design and spike a lot of code to "get it right" before you commit to writing the prose. There's no particular problem with that except that it places a very high cost on change. There is considerable incentive to accept a sub-optimal situation because changing it will be extremely expensive.

- It is quite difficult to write prose in a reference style. Generally speaking, one is encouraged in literate programming to write your code in "presentation order". In other words, the order that you would discuss things. This is fantastic if someone is sitting down and reading your code from scratch. It makes it difficult to find the wheat in the chaff when you are debugging, though.

- Because of that, I find that I'm more often reading the undocumented code rather than the documented code -- because once I understand what's going on it's far easier and faster to just read the source code. Jumping around between the generated code and the presented code is often frustrating.

Having said that, I've found that I really like programming in a literate style when I'm writing a blog post, or the like. Because I'm thinking more in prose than in code, it works extremely well.

My personal suspicion is that Knuth had great success using literate programming for TeX precisely because he was more concerned about describing algorithms for typesetting than he was about writing a great typesetting system. I love TeX (and I'm one of the few people who actually has considerable experience using TeX without LaTeX), but it is a horrible language that works exceptionally well. In many ways I think that it demonstrates the issues that I've had with literate programming.


Lol I'm not impressed by anything at this point. I thought it was clear from the start, they don't care about you, you're the "useds" of facebook, as Stallman would say. But still, every new evidence that comes up confirming this must make into a separate headline, and we'll keep on getting plenty of those until... I don't know. Until it either dies or rebrands itself well enough to pretend all of this never happened, I suppose.


I have been on a reduced calorie diet (one meal a day) since the start of february and have lost over 10 kg of both fat and muscle.


10KG? in 6 weeks? that sounds like a dangerously high amount of weight loss.


I went from 66 kg to ~55kg, eating only one lunch a day plus some fruits. I think I've gotten way too thin, that around 58 kg would have been better, and that's why I'm thinking of starting to supplement. I also have kept on exercising plenty, muay thai and boxing, and that might be why I've lost this much weight, even though I wasn't obese when I started.


It's really fast, but it depends what the starting point was. A lot of it could have been just water, if they were obese to begin with.


Has cynicism gone too far? In bureaucratic jobs maybe you can fake your way through, but in many other positions any charade eventually is exposed.


Why this fad with naming apps as persons? Found this: http://fortune.com/2014/12/22/startup-names-human/


Anna is a hummingbird. Known for its fastest relative speed.


Why this fad with naming birds as persons?


This is basically combinatorial contextless. A method of ranking and sorting the generated ideas is needed.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: