HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
google
rappor
R2015–2018
google / rappor · Archived

rappor

RAPPOR: Privacy-Preserving Reporting Algorithms

5Distinct people
8Mentions
0Explicit recommenders
868GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

RAPPOR: Privacy-Preserving Reporting Algorithms

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year8 dated mentions

Observed mentions: 2015-03-11 18:13:12 UTC to 2018-08-07 14:36:41 UTC.

01232015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2018

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC202
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC101
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC303
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC202

What Hacker News says

8 sources
I currently work at Google, and from what I know and have seen about how we handle privacy internally I'd be really surprised and appalled if that was the case. Mind sending me more details? My nickname @google.com. Anonymous reporting in Chrome has been one of the leading use cases for differential privacy at Google. See e.g. https://github.com/google/rappor and https://static.googleusercontent.com/media/research.google.c... which specifically mentions the Chrome use case. This seems to indicate the people who work on this do care at least in some amount about privacy. (Given the fact that you use a throwaway account I'm very much not expecting to see anything else than FUD, but hey, I'll give you the benefit of the doubt.)
In What I Learned Burning $14k on YouTube Ads for Candy Japan
Yes I totally get what you are saying. At one point I might not have written the last unix_time() example, but that is my default now, UNTIL say I hit a bug and need to test it thoroughly. GetHomeDir() is a great example that proves that point... if I were trying to be very pure, I would have reified the pwd dependency and environment dependency. One reason to avoid the complication is that I'm using shell scripts for tests. So in shell you already have a test environment. You can set $HOME to whatever, and in theory /etc/passwd, although that's a little trickier. Actually that was one of my motivations for writing a shell :) You can test "one level out" at the OS level. Instead of the "seam" being the language, the seam is the OS. I prefer to test against STABLE INTERFACES, not against things that I made up internally. You don't wa
Read the rest
nt your tests to calcify the structure of your code. I've seen that happen a lot with fine-grained testing, and it's a big pitfall. I would say at the beginning, I write unit tests for tricky parts, but don't aim for 100% unit test coverage. I aim more for high integration test coverage. And then at the end of the project, when you are fixing bugs, that is when you can do fine-grained testing without worrying about making a mess of your code. Here I did parameterize random() (irr_rand), because it's very important to the function of the code and needs to be tested: https://github.com/google/rappor/blob/master/client/python/r... So it all depends on the context. That's why I say it takes some practice. It takes practice to: - not end up with more than 3-4 parameters for each class. - not end up with too many classes. Java code seems to fall into this. A lot of things are just functions with dependencies. Actually this style I think reduces the need for classes -- they are your parameters rather than being your context! - not structuring your code as a deep tree of calls. Instead it should be a relatively flat object graph. A relatively static "Object graph" is really the idea that distinguishes OOP from "structured programming" (i.e. a pyramid). I think I would differ with you in that I don't think DI and functional programming are that different. I think they are trying to get at the same core idea. Things I ALMOST NEVER use in Python: - setters and getters. - Especially, setters for dependency injection. I always pass params through constructors. - decorators. This can always be accomplished with composition of objects. I find that style a lot more readable. decorators are non-trivial code at the global level, when it really should be in main(). - classmethod and staticmethod. Static methods should just be functions. Class method is kind of a hack for singleton-like behavior. - As mentioned, the singleton pattern is banned. Singletons are just classes you instantiate once. I like that this style gets rid of a lot of concepts: thread local (as mentioned above), explicit singleton pattern, and "static/class methods". Also I think it's true that Java's static type system might get in the way a little bit, but I don't have a strong conclusion on that. However, I also wish Python were a little more strict. I don't use 90% of the dynamism of classes.
In A theory of modern Golang
Hm so when I am writing web servers, I typically have a bash script that simply does curl on a bunch of URLs. I just run it by hand and make sure it stops on the last failure with 'set -o errexit'. I divide it up into bash functions so I can run the set of tests I want, and then string them all together with a top level function. It's ultra-minimal, but that is the point. My job is to deliver working software (relatively quickly), not necessarily beautiful tests. And I actually should say I do "system tests" in bash, not necessarily unit tests. But I START with system tests. My workflow is now like this: - write SYSTEM tests in bash first. This helps me plan what I want to get working. - write the code (It's like TDD but with system tests) - sometimes there is some complicated logic I need to test. Then I switch to unit
Read the rest
tests in Python, JS, R, C++, etc. - when I fix bugs later, I tend to reproduce it with a system test. This makes bug fixing easy. Then I write a unit test to zero in on the broken part, and sure it never comes back. I probably save 70% lines of test code, while delivering the same level of quality. A system test can be fast and can substitute for a lot of unit tests, and it helps you not ossify your code structure too early. I don't have an example of that online, but you can see 880 lines of shell in the root dir here: https://github.com/google/rappor Granted, this is more like scientific / batch code than web / backend stuff, but I assure you I follow the same strategy in the latter case. It's basically using Unix as leverage. One thing I would notice about the scripts is how the last line is "$@". That runs the function $0 with the args $1 ... $9. This is a very handy trick that helps keep everything modular and independently executable. I use shell scripts for all these things: - building code (in C, JS, Python, or any language) - testing code (running unit tests in multiple languages, and also system tests, constructing test data) - deploying code - sys admin; setting up servers (e.g. setup.sh in the repo), backup, managing log files - building docs; making static web sites - building config files and data files (e.g. lists of URLs) My assertion is that, combined, these things take up MORE time than actually writing code! If you can speed them up, you will be more productive at "coding" overall. In addition, using the same tool (bash) for all of them makes you more productive (once you have climbed the admittedly substantial learning curve). I'm not a fan of all these language-specific build tools now. I don't even use make that much; my first choice is bash! Here is one concrete example of shell minimalism, which helps you get things done faster. Think about the common situation of having a {star}_test.py files in many directories, and you want to run them all together as a test suite. I am embarrassed to say that at one point I spent 2 or 3 days researching and implementing some kind of Python test runner (this was over 10 years ago). I think people do it now with "nose" or something. Here is my preferred solution: find . -name {star}_test.py | sh -x -e Or if you need parallelism, something like: find . -name {star}_test.py | xargs --verbose -n 1 -P 10 -- sh -c ({star} should be asterisk; HN is not letting me escape those) That's it. It doesn't necessarily give you pretty output, but it's what you need to deliver working software. Add one line to a bash script and be done with it, rather than getting distracted by yak shaving. The shell scripts may not look that impressive until you think about what they actually save -- what common alternatives are. One line CAN actually save you 2 or 3 days of time; this is not the only time I've experienced this. The overall point is that I used to spend a lot of time on tooling and automation (yak shaving), because I wanted a certain level of code quality and iteration speed. But now I do most of those things with a small, sharp tool -- bash -- and I find it saves a lot of time. I get in the zone and don't get distracted from the main task.
In Ask HN: Slow engineers, did you get faster? How?

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.