News for hackers. Stuff that matters.

prawks

Re:Don’t Do This in Production on Sunday August 19, 2018 @09:00PM (#17797089)
> you dont figure it out for days or weeks?

If it was important and estimates on how long it will take are overrun, then don't wait to follow up on it and find out how it's going.

Unless the problem is more nuanced like a small component of a larger body of work? Like knowingly leaving flaws in an implementation, or something.

Re:ESLint compromised, may have stolen your credentials on Friday July 13, 2018 @08:41AM (#17522408)
Shortly after your post, they did revoke all access tokens:

https://status.npmjs.org/incidents/dn7c1fgrr7ng

> To protect potentially compromised accounts, npm is invalidating all npm login tokens created between 2018-07-11 00:00 UTC and 2018-07-12 12:30 UTC (about 2 hours ago). If you believe your account specifically was compromised we still recommend visiting https://www.npmjs.com/settings/~/tokens to revoke all your tokens.

> Posted about 20 hours ago. Jul 12, 2018 - 16:42 UTC

Then later:

> We have now invalidated all npm tokens issued before 2018-07-12 12:30 UTC, eliminating the possibility of stolen tokens being used maliciously. This is the final immediate operational action we expect to take today.

> We will be conducting a forensic analysis of this incident to fully establish how many packages and users were affected, but our current belief is that it was a very small number. We will be conducting a deep audit of all the packages in the Registry to confirm this.

>Posted about 18 hours ago. Jul 12, 2018 - 18:52 UTC

Re:Advice on Thursday July 05, 2018 @03:04PM (#17465876)
> 30) Existential angst is part of life.

Definitely a 20-30 thing, never even crossed my mind before I was 25.

Re:Learning to program is getting harder on Wednesday February 21, 2018 @08:35AM (#16429307)
Ah yes, makes total sense if you're setting up not just a Python environment, but an entire stack. Very cool.
Re:Physics Makes Aging Inevitable, Not Biology (2016) on Wednesday February 21, 2018 @08:34AM (#16429301)
Interesting. So by that line of thought, aging would be an evolved trait giving certain species an evolutionary advantage over others without aging.
Re:Learning to program is getting harder on Saturday February 17, 2018 @07:52AM (#16400454)
I think I'm in the group that doesn't immediately see the obvious gain of teaching in a Docker container vs. teaching how to install pyenv/virtualenv.

Is it mainly cutting out troubleshooting differences between host OS's while also getting isolated python environments?

Maybe I do see the win there, after all?

Re:Chinese local governments rush to admit fake data on Monday February 12, 2018 @12:51PM (#16360365)
The wiki links to a French article which has quotes from the author of this book: https://www.amazon.com/Maos-Great-Famine-Devastating-Catastr...
Re:Surviving 75 hours alone in the ocean on Thursday January 25, 2018 @01:20PM (#16233112)
Marathon swimmers swim 20+ hours depending on the swim.
Re:Bookbinding: A Tutorial (1995) on Friday December 08, 2017 @02:46PM (#15881406)
Consumer perception, mainly. It depends on the target audience of the page. Modern consumers have come to correlate certain appearances with quality. It's not an awesome cultural development, but you're not likely to gain much traction by fighting against that momentum unless you already have an oversized influence on that readership's expectations.
Re:What is a Source Map on Wednesday November 15, 2017 @09:52AM (#15704124)
I often hear people point to security as a reason to avoid shipping sourcemaps in Production, but it seems like such a non-issue given that anyone can unminify the code shipped out to their browsers. What kinds of secrets are able to be hidden via obfuscation? The answer traditionally is "none" so I'm pretty consistently baffled. We do strip comments explicitly so that devs don't need to be as concerned with exposing anything that way, but aside from that I don't really understand this angle.
Re:Benefits of a Lifestyle Business on Wednesday August 09, 2017 @03:02PM (#14972488)
The winter can be a bit much if you're not used to it for sure, but the upside is that tourists leave and restaurants no longer need reservations :)

Plus, not far from some excellent (downhill and cross-country) skiing, snowshoeing, ice fishing.

Re:JavaScript for People Who Hate JavaScript on Wednesday August 09, 2017 @01:51PM (#14971795)
2 quick points:

- The paradigm shift in writing interactive web pages in the React "write your app like a game that re-renders every frame"-style is extremely compelling. You are correct that there are plenty of largely static sites that do not need JS-based rendering, but for people wanting to develop single-page web apps or other interactive content, that mindset is a godsend.

- We recently re-wrote an ecommerce site with React and it is WCAG 2.0 AA compliant. To our knowledge, and to the independent firms that have audited our application, screenreaders have no problem with it. You still have to go through the diligence of all of the standard a11y-friendly techniques like semantic markup and thoughtful keyboard navigation, but React at least does not get in the way.

Re:Reverse-engineering the Starbucks ordering API on Thursday July 13, 2017 @02:48PM (#14764009)
One funny (ab)use case that may not be immediately obvious: any public API that accepts payment for goods via credit card will sooner or later attempt to be used by carders to test purchased/stolen card lists for validity.
Re:Ask HN: Best Chair for Programming on Friday January 20, 2017 @12:59PM (#13445560)
Ditto, I was able to get a Leap from an office surplus store for my home office and I enjoy its adjustability better than the Aeron I had at my last job. The breathability of the Aeron is nice, but I don't have issues with standard cloth chairs anyway.
I think that's a difficult comparison to make because you can reasonably secure your house against unwanted entry and it's fairly likely that breaches could be detected.

Obviously malicious law enforcement could still circumvent that just as they could a warrant depending on their level of capabilities and your house's security, but there isn't a similar path to securing your water usage data against warrant-less searching. Its security is wholly in the hands of a third party and any security breaches are essentially invisible to you.

That said, we're both painting in broad strokes.

Is anyone aware of repots on the comparative level of security of the various cell providers? I'd be interested to know how providers in various tiers of scale like US Cellular compare to TMobile and Sprint compare to Verizon and AT&T.
Re:Static types in Python on Friday October 14, 2016 @09:06AM (#12707778)
From the mypy docs linked in the article (http://mypy.readthedocs.io/en/latest/duck_type_compatibility...), it seems it supports a small number of built-in duck types currently, and has support for some protocols (http://mypy.readthedocs.io/en/latest/cheat_sheet.html#standa...)

> mypy considers an int object to be valid whenever a float object is expected.

> Use Iterable for generic iterables (anything usable in `for`)

Thus you should be able to get a more broadly correct (though still not 100% if you have your own types implementing __add__ and __radd__) like this:

  from typing import Iterator

  def sum_and_stringify(nums: Iterator[float]) -> str:
      return str(sum(nums))
It also looks like implementing an abstract base class SupportsSum (to check for __add__ and __radd__) may not take a whole lot of work, see `SupportsInt`: https://github.com/python/mypy/blob/d7f6ea617317103534d86686...

http://mypy.readthedocs.io/en/latest/class_basics.html?highl...

Re:Static types in Python on Friday October 14, 2016 @08:42AM (#12707672)
Less aggressively, you may also be inheriting someone else's design.
But... people talk to their phones all the time :) Just hold it like normal when you're talking into it!
Re:Simple Ways of Reducing the Cognitive Load in Code on Tuesday June 28, 2016 @12:23PM (#11995033)
Django's recommended project structure is one that immediately comes to mind. A project is broken down into "applications" each which have their own models, views, and controllers (among other things like forms, tests, etc.). Each "application" is an area of responsibility within the project, like payment or user management.

As it's python, the 'views' module could technically be a folder with multiple files inside it, but they would all be grouped under their respective app.

Re:The Trouble with CloudFlare on Friday April 01, 2016 @01:29PM (#11406721)
It's a problem inherent in any system offering pure anonymity in an unrestricted way.

It's really a shame. An opinionless platform offering anonymity cannot flourish in an opinionated world. At some point if these things want to succeed, they need to play by the rules of the world that they exist in. But I don't think anyone's figured out a common set of systemic restrictions that Tor, 4chan, etc. can implement that avoid taking away their primary affordance: freedom.

"You make your own luck." There were a sequence of events that lead to you getting the opportunity to be in the right place at the right time.

Random luck happens for sure, but how did you get to put on a warm-up for one of the biggest DJs in the world? I'd guess because of some conscious work you did, not because he picked a phone number in the book at random.

You told him about your party after getting the gig. He probably wouldn't have gone if you had not. That kind of networking and effort is a skill just as much as selecting the right music.

http://farlandsorbust.com/

That guy's been doing it for quite a while.

> At the end of that most recent FLoB-ATHON Weekend in 2015 we discovered that I was 2,266,779 blocks in the furthest 'Z' coordinate, the equivalent of 2,266-kilometers from spawn! Amazing, yes, but it means we are still only 18.06% of the way to reaching the Far Lands located at 12,550,820 meters! They don't call them "far" for nothing! INDEED!

Re:Show HN: Turn a Google Spreadsheet into an API on Monday September 21, 2015 @03:44PM (#10254672)
What is the advantage of using this service over hitting Google's RESTful Spreadsheet API directly?

https://developers.google.com/google-apps/spreadsheets

Re:Forgotten Corners of World of Warcraft on Tuesday April 28, 2015 @01:03PM (#9453729)
Miasmata is a great example.
Re:Forgotten Corners of World of Warcraft on Friday April 24, 2015 @03:40PM (#9435601)
> unless you're really into just having fun - which the game mostly does not encourage

This is the exact reason why, no matter how many times I tried over the years to play this game with friends, I could never stay attached for longer than a few hours. There seems to be less and less emphasis put on enjoying the experience of exploration and being in a space in modern online games, and more emphasis on rote activities for the sake of progress.

And thus I return to single-player games, which I certainly do not mind. There is a seemingly never-ending stream of creative ideas coming out of that space.

Re:The Rise and Fall of the Lone Game Developer on Wednesday January 14, 2015 @09:03AM (#8886240)
I think you're looking at a pretty narrow genre (Complex Games) and extrapolating the entire platform's content/potential from it. There are fewer people making as complex games as back then, but saying people are uneducated is a bit silly.
Re:Git client vulnerability announced on Thursday December 18, 2014 @06:57PM (#8770405)
For those wondering about the analogous vulnerability in Mercurial, the patch notes are out for a fix:

http://mercurial.selenic.com/wiki/WhatsNew#Mercurial_3.2.3_....

You'll need 3.2.3 to be secure.

Re:Our 6 TB Hard Drive Face-Off on Tuesday December 16, 2014 @08:58AM (#8757106)
Hypothesizing about how Backblaze stores data: because they likely keep a series of backups, it's more likely they write each delta out separately. I'd imagine it's likely they no not have whole copies of your latest backup on their drives, but they could reconstruct one at will if needed. If that were the case, it would indeed be close to write-once.

Older »