skysight-inc/HackerNews huggingface dataset:
This is in the description of line-numbers:

DEPRECATED. This is a rather silly package that I do not recommend using. It's easier to copy the ~20 lines of code of this package and customize that code, rather than downloading and learning how to use this package.
After spending a few weeks in Europe last year, where tips are not the norm, I realized I LOVE tipping because...people are incentivized to wait on me. Man...not seeing your waiter for 20 minutes sucks.
require('util').format gets you pretty close.
For some reason I misread that as "do one thing and do one thing ugly". Either way, it applies.

Lodash does this (and versioning, and clean code, and tests) really well though.
The idea is that develoers prefer different styles of coding. Some like doThisAction, others prefer do_this_action, others Do_This_Action.

Nim supports all styles. A simple reformatter can be used to transform the code of a project into a normalized form. Such an attempt would be very dangerous in C++.
All this makes me wonder if we should change the whole idea of device, users, business.
Why the downvote? I don't mind but care to elaborate?
Well a bunch of standard libraries have sum defined, right?

JavaScript has suffered from a lack of a standard library for a while. Having a small package like this means that (in theory) everyone is using the same bug free version of summing instead of writing their own.

Honestly having JS start building a standard library at this point would be wonderful.
> Why waste time and lines of code implementing something so trivial when there is already a solution available?

Because it's so trivial? I can't wrap my head around why this is an argument in the first place. It makes no sense to bring in a module from a third party adding yet another dependency and potential point of failure when reimplementing it yourself literally takes as long as it takes to find the module, add it to package.json and run npm install.

People should be trying to limit dependencies where possible. Reproducible builds are really important if it costs you almost no time you should have it in your code base IMO.

People taking the DRY principle to the most extreme degree always makes for the worst code to debug and maintain.
Robert Jordan wrote the Wheel of Time long after Dune.
Oh God yes. After being spoiled in npm-land for a couple of years, I went back and tried to re-release a very small python module I had written before. I simply couldn't do it. Oh well!
> every line of code I write myself is a commitment

That's true. However:

Every dependency you add to your project is also a commitment.

When you add a dependency, you're committing to deal with the fallout if the library you're pulling in gets stale, or gets taken over by an incompetent dev, or conflicts with something else you're using, or just plain disappears. If you add a dependency for just a few lines of code, you're making a way bigger commitment than if you'd just copy/pasted the code and maintained it yourself. That's why so many people are shaking our heads at a 17-line dependency. It's way more risk than it's worth. If you need a better stdlib for your language (some of us write PHP and feel your pain) then find one library that fills in the gaps and use that.
Yeah, it takes a while to get used to scanning QR several times a day.

I installed many apps. I am very curious about their features and how well they worked. It was much better than I expected. It was easy to navigate the features and figure out how to use them. Considering the number of users, their traffic must be very high. They sustained the high load very well. Within my 3 weeks stay, I had only one instance that the service was slow or down. It was China Mobile. All the other services worked very well.

I opened an account in Agricultural Bank of China using USA passport. They did require a residence address in China in my case.
I don't really use Twitter, but I just had a scroll through the feed @TayandYou for kicks.

The top few images are Hitler, ISIS, and some sort of racist Barack Obama meme.

Yeah, that seems sensible.
The co-founder of Gigster is african (Nigerian).
> you all have apocryphal stories of the youngsters being disadvantaged.

The big disadvantage is for youngsters is being utterly unemployed. Notice that in places like highly-unionized France youth unemployment is something like 25%+. That's not apocryphal, that's we-got-tons-of-data.
I don't have an issue with modules or the Unix philosophy, I have an issue with using NPM for all these tiny modules. Hint: you can make your own modules, store them within the project, and add them to your package.json to be required anywhere.
How many people are going to buy a special dropcam to point at their dog...?

How many people are going to want a Basic interpreter for the Altair?

A few points:

- It's $120K

- PG is no longer actively involved (at least with selections or operations)

- They've always been very open about their heuristics for accepting applicants: pick teams that show evidence of being very talented and very determined, working on ideas that may seem laughably trivial now but over 5-10 years have some chance of developing into something huge.

- "The fax machine is nothing but a waffle-iron with a phone attached." But seriously, plenty of very successful products have been generic products tailored for a particular use-case.

PetCube would have been picked because they were able to explain how their silly-looking idea has the potential to transform pet care over the coming decade (using robotics perhaps?)

Remember, everyone including YC knows that the chances of huge success for any individual company are tiny.

But as long as about 1% of the companies they back become huge, YC does very well.
So, in the context of this discussion... you should make use of micro-modules to reduce code duplication, avoid defects, etc. However, don't expect those micro-modules to be maintained or available in the future; so you need to set up your own package cache to be maintained in perpetuity.

Or, you can implement the functionality yourself (or copy/paste if the license allows) and avoid the hassle.
Sorry to pick on your response, and you're right, a factory reset might be worth a shot, but factory resets on Android are a PITA. The last time I did it (my last 3 phones have been Nexuses), it literally took half a day to get the phone back to the point it was at previously - I had to install OS updates, re-install apps (which also reset to 0 in many apps), re-download music (I admit, I could copy files over from my laptop). It makes setting up a new iPhone for the wife look like magic.

I wouldn't mind, but even with Nexus phones, my experience of issues is that you end up crawling Google, and the answers are the technical equivalent of doing the hokey cokey in the hope of curing a cold: "Uninstalling Snapchat made the problem disappear!"; "Install this app and use it to work around an issue", etc.). And then the last resort - the factory reset. I'm not doing anything particularly exotic with my phone, the thought of the hassle of a factory reset is just depressing.

I bought a Nexus 5X at launch, after my replacement Nexus 5's power button died. And it has been a laggier experience than the 5 (I admit the latest update seems to have improved things (though it's still not equivalent to the 5 IME). But looking for other people with the same problem you see the same responses, like a repeating background in a roadrunner cartoon - "Mine runs buttery smooth"; "Maybe yours is faulty, RMA?"; "Tried a factory reset?". Sorry, I don't enjoy this detective work/maintenance.

I doubt the iPhone experience is perfect, but it can hardly be worse, can it?
Who wanted it is beside the point. It was crushed under political correctness (ie the assumption of unspeakable harm) rather than any actual harm in only a few days.

If anyone did like it I doubt they'd have felt free to speak up.

> I do know people who found it offensive

I find Bros offensive - in my house. But the word? No. "Nazi" is just a word, Nazis are offensive.

> I can see no particular reason not to change the name.

Ditto there's no reason to. Someone went out of their way to take offense which was bounced around an echo chamber and now everyone is offended by something they didn't know existed before today.

That's not something we should reward.
My main argument being that any password manager, be it Lastpass or not, tends to work better on Android because of features like "draw over other apps" which basically means creating a modal window on top of other apps. On Android this action can be initiated by clicking on an icon which lives in the notification drawer, and it can be done in any app, while on iOS it's only possible in an app that supports the iOS 8+ extensibility features (such as Uber)
> There’s a package called isArray that has 880,000 downloads a day, and 18 million downloads in February of 2016. It has 72 dependent NPM packages. Here’s it’s entire 1 line of code: return toString.call(arr) == '[object Array]';

How anyone can deal with JavaScript for more than 5 minutes is absolutely beyond me
The Watchfinder service centre
> I don't see anything wrong with using a pre-made left pad function. Why waste time and lines of code implementing something so trivial when there is already a solution available?

I'll tell you why.

The least important ones is that downloading such trivial module wastes
bandwidth and resources in general (now multiply this by several hundred
times, because of dependency fractal JS sloshes in). I would also spend much
more time searching for such module than I would implementing the damn
function.

More important is that you give up the control over any and every bug you
could introduce in such trivial function or module. You don't make it less
probable to have those bugs (because battle-tested package! except, not so
much in JavaScript, or Ruby, for that matter), you just make it much harder to
fix them.

And then, dependencies have their own cost later. You actually need a longer
project, not a throw-away one, to see this cost. It manifests in much slower
bug fixing (make a fix, find the author or maintainer, send him/her an e-mail
with the fix, wait for upstream release, vs. make a fix and commit it), it
manifests when upstream unexpectedly introduces a bug (especially between you
making a change and you running `npm install' on production installation), it
manifests when upstream does anything weird to the module, and it manifests in
many, many other subtle and annoying ways.
I had a great mentor who taught me all the safety mechanisms.

Start your .sql file with "use xxxxx" (non-existent database name; will prevent execution if you fat-finger F5.)
Always write your deletes as a SELECT first:

SELECT *

-- delete

FROM blah

WHERE blah = 1

Never uncomment the "delete" line; just select the portion of the query after the comment with your mouse and F5 it.

And of course: always design your database with support for soft-deletes, because sooner or later you'll need to add them in.
Bow and Arrow Using Primitive Technology
"oh my zsh" is too slow to be life-enhancing
One can argue that modules are good, but them depending blindly on newer versions like that was bad dependency management.

I say this because I strongly believe that reinventing the wheel is unnecessary and can bring more problems than not.

There are many examples, and I could come up with a made up one, but here's a very real bug that I debugged from another programmer not so long ago:

So, he came up with a JNI for SPSS's C library, applied it correctly, and got haunted for lots of months with an unsolvable bug. The problem? he miswrote the final copy of the file, and sometimes, some bytes where copied twice.

He tried to solve this problem for a long time (and eventually lived with it because SPSS was still resilient to this)

Is this concrete example of a 'module' ridiculously short? yes, but my logic still holds IMO.
I'm more disappointed that it doesn't short-circuit the operation at all. It applies all the functions, THEN it determines whether all of them passed. Even worse, it uses `every` (which does short-circuit) to determine that all the functions are, indeed, functions, but apparently the ability to use that function to determine whether every predicate passes was missed.
There's no hint of pricing that I could find on their page. Do you know about their pricing model?
American ex-pat gone native in Wales. Can confirm "apple" means the same thing here.
I still do not see it asked whether the workers themselves want to move away from tipping. Anecdotally I hear that they believe they can make more in the current system by significantly underreporting their income.
There are lots of useful titbits often left out of a languages corelib.

Back in the day we would have built up various pieces of library code, which we would have utilised rather than continually guessing best practices. For example, the isArray method cited may be trivial but is also non obvious. We'd probably have something like that in our library of useful snippets.

Sometimes we may have shared the code on forums and the like and people would copy and paste the code, sometimes into their own libraries. We would locate them by browsing known locations or inefficiently querying search engines

Now we utilise a central resource and simple tools to have a global library of code. Instead of searching far and wide we query a handful of tools that effectively does the copying and pasting for us.

How that can be considered a bad thing is beyond me. It's not a question of knowing how to code, it's a question of using your time effectively.

Granted, there is the problem of so-called modules being removed and dependencies breaking. This can be alleviated by vendoring your modules, a simple task with most dependency management tools.

Personally I think that published modules should persistent indefinitely based on the license the code utilises, although I'm not clear on the actual legalities of the recent npm issue (although if it's due to a trademark complaint, I don't see how it would ever be enforceable for completely unrelated code in any slightly sane country).
Intercepted during shipping?

How long would an operation like that take? And can't a company with Apple's clout ask the supplier for a spec sheet that lists all the chips and a diagram showing the location of said chips?
I think there's two points related to that:

1) JS is unique in that it is delivered over the wire, so there is a benefit in having micro-modules instead of a bigger "string helpers" module. Things like webpack are changing that now (you can require lodash, and use only lodash.padStart).

2) JS's "standard" library is so small, because it's the intersection of all of the browser implementations of JS dating as far back as you care to support. As pointed out in sibling, a proposal for padLeft is included in ECMA2016. But we'll still need Left-Pad for years after it's adopted.
And the kitchen staff, bus boys? Most restaurants pool tips because there's a lot more service roles than the waitress.
You can get a laptop with a Xeon these days, and dual socket workstations are plentiful. They're getting the 8+ core Xeons in many cases now: http://shop.lenovo.com/us/en/laptops/thinkpad/p-series/p70/

36-core workstation based on Xeons: http://www.mediaworkstations.net/i-x2.html

Makes your MBP look pretty cheesy when you could have something like that under your desk. Then again, for developing rails and angular apps, you don't actually need it, and the PCI-E SSD makes a bigger difference in practice (you can RAID 0 NVME SSDs in workstations too though).
I agree with the points you've made, but I would also posit that adding a dependency using this mutable package manager is making a commitment to maintain the integrity of that dependency, which is arguably more work than maintaining the handful of lines of code.
Do you support IE 8? If not, why not use the one provided by the language, Array.isArray()?
nuance is the new blackberry
OR: you depend on a specific version of the library, that you know that works, and you have none of those problems.
We have. I spent some time optimizing [0] a String.repeat function over at Stackoverflow and I was surprised that many developers today don't know what they are doing, including core team members [1]. Specifically,

function repeatString(str, len) {
return Array.apply(null, {
length: len + 1
}).join(str).slice(0, len)
}

[0]: http://stackoverflow.com/questions/202605/repeat-string-java...

[1]: http://stackoverflow.com/questions/202605/repeat-string-java...
There's already `Array.prototype.reduce()` in most browsers, which will do summing, string concatenation, and any other kind of aggregation:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

If you need something more convenient I highly recommend just adding lodash and getting a whole bag of rock-solid awesome tools.
RHEL is good for large companies using linux, and product developers releasing commercial products for linux.

It is required for support for certain products on linux, like Oracle. Also, RHEL is tested with various distributed filesystems, etc.
Probably they do use that if they need left padding but also have a dependency on another package that thinks 'lodash is too big when all I need is left padding' so we get to this situation
When am I developing some large project for a long time, sometimes I find, that I have reimplemented the same function at several places (few years between implementations).
> I learned that if someone made fun of my shoes, they didn't have very much character.

Isn't that basically learning self-esteem and confidence?
When in doubt, refuse and escalate. It's your systems! Especially with Oracle support, who have a particularly bad reputation.

Honestly, Oracle's reputation is mud. Ever since I saw the Oracle Chief CSO's presentation on security which used biblical parables as principles for securing environments I've been even more wary of accepting any advise on face value from any Oracle employer...
Well npm doesn't use GitHub for hosting of modules so honestly npm would be fine. Bower on the other hand would be completely screwed.
The problem is not that, the problem is depending on unreleased versions, instead of simply depending on the version that was written when u wrote your code.

a Git submodule like approach would be much better
It is the nature of git that most repos on GitHub also exist in many other places.
Formerly 9 dependent modules... but who cares maybe it was a homework assignment or a joke.

I don't use NPM so maybe it doesn't really matter aside from the level of abstraction being implemented being relatively ridiculous.

However, if my build system had to go out and grab build files for every X number of basic functions I need to use, grab Y number of dependencies for those functions, run X * Y number of tests for all those dependent packages, AND then also fell apart if someone threw a tantrum and removed any one of those packages basically shutting me down for a day... then I'd question every single thing about my decisions to use that technology.

[Quick Edit] Basically I'm saying "Get off my lawn ya kids!"
Philistine! You should just be doing i things.
This is entirely dependent upon the establishment in question. In NYC, it's quite common for bars that have multiple tenders behind the bar to split their tips during hours they work together. Further, many restaurants also give BoH a portion of the tips gathered by FoH.

Avoiding taxes by collecting cash tips is also a common practice, though that does end up requiring one to collect cash - sometimes on the order of $10^5 and keeping it in ones apartment, since you can't put it in a bank account and not be taxed on it eventually.
There's more to dependency hell than "oops, the package disappeared." Try updating one of those dependencies because of a security fix, and finding that it now depends on Gizmo 7.0 when one of your other dependencies requires Gizmo < 6.0.
Unless he's on AMD and the processor upgrade was very minor, he almost certainly did.

It's odd when people say "my computer is a decade old and I've only had to replace every single part multiple times over look at how green I'm being". It's the exact same thing as buying a new computer a couple times, just in smaller increments and with parts that are less likely to be recycled on their own.
I don't see it. It returns as many results as the API for patio11 (and for my username as well.)

https://hacker-news.firebaseio.com/v0/user/patio11.json?prin...

I don't know about Patrick but Algolia correctly sorts my highest comments, too. What number are you expecting from patio11's results that you're not seeing?
I find NPM packaging ridiculous. Awhile I go I used NPM on windows, where the folder hierarchy became so deep it broke windows file handling. I could not delete the modules folder. I had install a npm package which allowed me to delete it. I think this is fixed in new versions by flattening the hierarchy, but still.
You have no understanding of the first amendment. It applies, of course, only to the government's response to speech.

I would be curious to know what you think free speech means, if it doesn't mean speech without consequence.

You can say anything you want, and the government won't intervene. That's all free speech means. Other people, groups, and corporations are free to judge you, criticize you, exclude you from their platforms and private events, organize boycotts against you, criticize people who agree with you, criticize people who choose not to exclude you, and so forth. You may dislike that they do those things, but they are free to do so without government interference, because of free speech.

You, in turn, are free to criticize and exclude them in a similar manner. This is dialogue, and a desire to promulgate your opinions but have others not promulgate their opinions (including when they're about you) is the height of hypocrisy.
What if lodash itself was unpublished?
I'm having a hard time drawing a line here, obviously a 10 line function is too far on the bad side of lazy, but I can't tell what is an acceptable dependency.
> 1- Maintaining a mirror of dependencies can be a non-trivial overhead. In this app that I was working on, the previous devs had forked some gems on github, and then added that specific github repo to the requirements. But they did not do it for every dependency, probably they did not have time/resources to do that.

You've precisely identified the trade-off. You basically have three options. You can

1. Maintain a local repo of your dependencies (high effort)

2. No dependencies, include everything as 'first-class' code (lower upfront effort, but v. messy)

3. Rely on third-party repos (easiest, riskiest)
Such a conflict can be resolved easily by qualification (a.user_sort and b.use_RSort). What's the problem?
This problem is solved by mirror dependencies and pinning the versions. Even against a git repo, pinning to a particular sha is something that is possible.

Automatically upgrading versions (i.e. not pinning versions) in a production build is an anti-pattern.

These sound like problems incurred due to a previous lack of software engineering rigor. As an industry, when we encounter challenges like this we should be learning how to solve them without reinventing the wheel. Pinning versions and maintaining mirrors of dependencies (whether that's an http caching proxy for npm/pypi/maven/etc or keeping a snapshot of all dependencies in a directory or a filesystem somewhere) is something that any company requiring stability needs to take seriously.
Meeting people for the first time at a convention is far more easier than in the real world. In a conference you have some common ground to talk about, you’re both there for the same reason. You introduce yourself, ask them what they do and then find some topic to go on. In the real world though it’s a different game altogether. You have to be a master of small talk if you want to meet people out of the blue.