Recent submissions

Comment · 6 years ago
Comment · 6 years ago
Comment · 6 years ago
I personally, would've overridden the equal function of record (or made an equality helper function).

so the code would become

if(!record.isBuiltIn() || !user.canChange(record) || !record.equals(oldRecord)){ // can't save / or no need too }

and if no one can change a builtin, then a user certainly can't change it.

so it becomes:

if( !user.canChange(record || !record.equals(oldRecord))){ // can't save / or no need too }

Comment · 6 years ago
maybe it's because of Pascal. I remember even Cormen used to have pascal style pseudo-code.
Comment · 6 years ago
in that case, there should be a court order that prevents them from exercising such occupations.
Comment · 6 years ago
and why can't bob find a job even if he was a pedophile or a murderer or whatever?

why is extrajudicial punishment allowed?

Comment · 6 years ago
> If we can start from an assumption and perform a series of logical deductions and reach True, then we know our original assumption is True, that it is provable

is this a difference between mathematical and natural language?

my understanding is if you deduce something true from an assumption it means nothing.

you need to deduce something false and thus the negation of your assumption is true.

Comment · 6 years ago
>As Tim explained to me, first off, the reason why VB does this seemingly bizarre “find the first character match, then check if query is a prefix of source” logic is because the skipto method is not written in the naive fashion that I showed here. The skipto method is a single x86 machine instruction.

oh my bad then, from this text it sounded like it was written in assembly.

Comment · 6 years ago
Imagine that the intern didn't dare to ask such questions.

a - he could've gone out thinking that performance doesn't matter. but it certainly does in a piece of code being used daily by thousands of devs.

b - he could've thought that the simple implementation is faster but missed the fact that skip is implemented in assembly.

c - he could've realized both but missed the why.

and these failure scenarios are likely to happen because this is an intern we're speaking about.

One or two tricks up your sleeve do not matter but repeat this a 100 times which one do you think would be a better programmer?

I think the willingness to challenge authority figures and to be (often) proven wrong and to learn from it is an essential part of becoming better.

Maybe Tim was understanding because he himself challenged people older than him and in-process learned form them.

Advice like "don't reinvent the wheel", "avoid premature optimization", "write boring code" promote exploitation. which is the optimal strategy for older agents.

but for newer agents, a higher level of exploration is needed otherwise they would converge into a suboptimal strategy

Comment · 6 years ago
Comment · 6 years ago
While the holocaust did give the Israeli project one last political boost, I think the creation of Israel was not because of it but despite it. The tragic loss of millions of potential citizens had a significant impact on the demographic feasibility of the country. Ben-Gurion himself says: "For many of us, anti-Semitic feeling had little to do with our dedication [to Zionism]. I personally never suffered anti-Semitic persecution. Płońsk was remarkably free of it ... Nevertheless, and I think this very significant, it was Płońsk that sent the highest proportion of Jews to Eretz Israel from any town in Poland of comparable size."

I mean the Balfour declaration was in 1917. Herzl's "a land without a people for a people without a land" only makes sense if you read it through the eyes of a colonial European.

in reaction to the united nations partition plan ben-Gurion says: "The total population of the Jewish State at the time of its establishment will be about one million, including almost 40% non-Jews. Such a [population] composition does not provide a stable basis for a Jewish State. This [demographic] fact must be viewed in all its clarity and acuteness. With such a [population] composition, there cannot even be absolute certainty that control will remain in the hands of the Jewish majority... There can be no stable and strong Jewish state so long as it has a Jewish majority of only 60%"

a democratic and Jewish Israel was and still is impossible without the expulsion (ethnic cleansing*) of a major part of its Arab population. (regardless of the incompetence of the Arab leaders and their stupid war)

I would argue that this is not really unexpected from a country built on Deir Yassine, king David's bombing and the assassination of a UN negotiator. Acts committed by the Irgun, which was the political predecessor of Israel's right-wing Herut (or "Freedom") party, which led to today's Likud the current ruling party.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton