News for hackers. Stuff that matters.
Re:We posed as 100 Senators to run ads on Facebook. Facebook... by warent on Tuesday October 30, 2018 @06:52PM (#18341930)
I imagine one time. Then everything else imports the `MZ_CONST` file which then references the `MK` or `ZBERG` variables.
Re:We posed as 100 Senators to run ads on Facebook. Facebook... by babypuncher on Wednesday October 31, 2018 @02:15PM (#18348027)
I didn't realize Facebook only hired software engineers from the '80s who are allergic to coming up with good identifiers
Re:We posed as 100 Senators to run ads on Facebook. Facebook... by evgen on Tuesday October 30, 2018 @07:17PM (#18342062)
Nah, things just refer to him as fbid 4.
Re:We posed as 100 Senators to run ads on Facebook. Facebook... by Implicated on Tuesday October 30, 2018 @08:04PM (#18342301)
Who are 1, 2 and 3?
Re:We posed as 100 Senators to run ads on Facebook. Facebook... by tylerhou on Tuesday October 30, 2018 @09:54PM (#18342773)
Test accounts which ended up getting deleted before (presumably) auth worked.
Re:We posed as 100 Senators to run ads on Facebook. Facebook... by hawkice on Wednesday October 31, 2018 @07:21AM (#18344758)
Holy smokes I just had flashbacks to working at a place that tested things in production and ended up with a couple of these production-db IDs in the code. Shudders
Re:We posed as 100 Senators to run ads on Facebook. Facebook... by pavel_lishin on Wednesday October 31, 2018 @09:31AM (#18345475)
Your codebase only has a couple?
Re:We posed as 100 Senators to run ads on Facebook. Facebook... by hawkice on Wednesday October 31, 2018 @06:48PM (#18349856)
You're already hitting a database, you can add a column for whatever information you want. I've heard people are spooked by having too many columns, but more spooked than having essentially untestable production IDs in their code? No thanks.
Re:We posed as 100 Senators to run ads on Facebook. Facebook... by beobab on Thursday November 01, 2018 @06:36AM (#18352564)
I remember one place I worked, someone released code which only returned data permissions for the test user (id 5).
Re:We posed as 100 Senators to run ads on Facebook. Facebook... by anticensor on Wednesday October 31, 2018 @08:52AM (#18345208)
fbid 1 is former zuck. fbid 2 is Facebook itself (the software, not the Facebook's own page in FB). fbid 3 is yet another former test account.
Re:We posed as 100 Senators to run ads on Facebook. Facebook... by valarauca1 on Tuesday October 30, 2018 @07:38PM (#18342168)
dog it’s a PHP shop, nobody re-uses code
Re:We posed as 100 Senators to run ads on Facebook. Facebook... by jjeaff on Wednesday October 31, 2018 @01:48AM (#18343604)
PHP's Packagist disagrees with over 1.4m packages and around a half billion package downloads a month. (More than NPM FYI)

https://packagist.org/statistics

Re:We posed as 100 Senators to run ads on Facebook. Facebook... by sah2ed on Wednesday October 31, 2018 @10:35AM (#18346007)
> (More than NPM FYI)

I found your claim hard to believe so I went digging but couldn't find any recent resource on the total number of downloads npmjs.org handles per month.

I could have sworn they used to publish aggregate stats prominently on their home page somewhere ... but can't seem to find it.

Anyway, aggregating* the download numbers of just 12 of the top npm packages comes to about ~504.4m, or half a billion package downloads a month.

*: using September 2018 numbers.

1: https://npm-stat.com/charts.html?package=express - 21m/mo

2: https://npm-stat.com/charts.html?package=body-parser - 24.4m/mo

3: https://npm-stat.com/charts.html?package=lodash - 64m/mo

4: https://npm-stat.com/charts.html?package=async - 64.7m/mo

5: https://npm-stat.com/charts.html?package=debug - 87.6m/mo

6: https://npm-stat.com/charts.html?package=request - 50.8m/mo

7: https://npm-stat.com/charts.html?package=chalk - 64m/mo

8: https://npm-stat.com/charts.html?package=commander - 61.8m/mo

9: https://npm-stat.com/charts.html?package=underscore - 21.5m/mo

10: https://npm-stat.com/charts.html?package=babel-core - 17.8m/mo

11: https://npm-stat.com/charts.html?package=webpack - 16m/mo

12: https://npm-stat.com/charts.html?package=react - 10.8m/mo

Re:We posed as 100 Senators to run ads on Facebook. Facebook... by PunchTornado on Wednesday October 31, 2018 @12:23PM (#18347044)
it cannot be more than npm.

npm is basically 1 line of code = 1 package

Re:We posed as 100 Senators to run ads on Facebook. Facebook... by Bluestrike2 on Thursday November 01, 2018 @10:49AM (#18354381)
Don't forget the dependencies :).
Re:We posed as 100 Senators to run ads on Facebook. Facebook... by osrec on Wednesday October 31, 2018 @01:11PM (#18347482)
lol, made me chuckle!
Re:We posed as 100 Senators to run ads on Facebook. Facebook... by jjeaff on Wednesday November 07, 2018 @02:30PM (#18401579)
I was referring to the number of packages available as being more. It wouldn't be very useful to compare number of downloads since php does need an entire package to do things easily like check if something is an array.
Re:We posed as 100 Senators to run ads on Facebook. Facebook... by woadwarrior01 on Wednesday October 31, 2018 @02:36AM (#18343742)
Facebook recently became the principal sponsor of the Python Software Foundation[1]. Although I don't have any concrete numbers to cite, there's a lot of Python code at Facebook. Calling it a PHP shop would be highly inaccurate and myopic.

[1]: https://www.python.org/psf/sponsorship/sponsors/

Disclaimer: I work there on python runtime optimization, which mostly involves writing C (and C++) code. Also, I've never had to write any PHP/Hack code.