HNHacker News
TopNewBestAskShowJobs

zardeh

342 karma · joined December 29, 2013

submissionscomments
zardeh··on Two's complement – You beauty
The python result should be expected. Python's integer type isn't sized, that is python will happily give you factorial(100), despite it being much larger than 64 bits. It can't then give you twos complement, because it can't know the size with which to complement the two.
zardeh··on Braess’ paradox
Oh actually that's a really good point and I think makes the difference clear (there isn't such a train/test divide in the driving example).

Thank you :)

zardeh··on Braess’ paradox
I think that you could consider the co-adaption as a form of greedy local optima (I think this is a very handwavy explanation, though, and I'm having trouble forming it better, so take with that what you will). Dropout prevents that by not allowing the 'greedily optimal paths' to form, since sometimes they don't exist, so you can't rely on them too much.
zardeh··on Alphabet’s Waymo Cuts Cost of Key Self-Driving Sensor by 90%
Minus the part where it isn't a lidar. Sure its a great sensor, but if you need a lidar, then you can't use a kinect. And alternatively, if you need 360 degree fov, etc. an actual lider is often better.
zardeh··on Alphabet’s Waymo Cuts Cost of Key Self-Driving Sensor by 90%
That site really enjoys saying that the outlook of things is sketchy. Apparently being redesigned is a sign of a sketchy future (blogger), as is the site owners not being aware of a recent redesign (sites). They also ignore a whole lot of other things that google has (nexus is dying because of pixel, but oddly pixel isn't on the site as its own line), etc.
zardeh··on Alphabet’s Waymo Cuts Cost of Key Self-Driving Sensor by 90%
I think you messed up at the end of your post. Are you missing the word "not" here?

>I become convinced that Google (or a subsidiary via Alphabet) is going to end up being much of a player in the space.

zardeh··on Braess’ paradox
That's what I assumed, it feels like there should be an intuitive connection (both are kind of situations where a local optima is avoided by removing the greedily optimal path on a graph structure), but I may be wrong, i dunno.
zardeh··on Braess’ paradox
Someone who is perhaps better versed in machine learning:

Is there some sort of intuition here that would connect this paradox to the effectiveness of dropout in deep neural networks, or am I drawing connections where there aren't any?

zardeh··on Dropped (2014)
> You're vulnerable to hacks who can impress the public with easy tricks and are a hundred times or a thousand times less talented than you, and who don't even work hard.

This I think has led to something interesting. Most proficient (and by proficient in this case I mean capable of juggling more than 5 balls) jugglers are either young, or relatively old. The top 10 this year were all born after 1990, and some are significantly younger (<18).

zardeh··on Dropped (2014)
If you're interested in seeing the state of juggling now, the top 40 jugglers of 2016 just came out [1], this was the first time since the list started (in 2003) that Anthony Gatto was not on the list.

[1]: https://www.youtube.com/watch?v=M22bYjTWJw0

zardeh··on Awesomo Python: A list of interesting open source projects in Python
Did you scroll down?

>The Jupyter Notebook is a web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, machine learning and much more.

zardeh··on Grumpy: Go running Python
That was a typo. I meant pseudo. I don't actually know that there is any difference in this case. I made that statement hastily. It transpiles, nothing pseudo about it.
zardeh··on Grumpy: Go running Python
Even outside of that, I can override the bitrate in some instances. But yeah, I was mainly talking about the necessary replication, cache, and transcoding (and I actually forgot about the multiple codecs, which they also provide, in addition to multiple resolutions/bitrates)
zardeh··on Grumpy: Go running Python
You could perhaps write a feature-bare clone. Here's some basic features:

    - search (the various search pages)
    - trending
    - channels
    - subscription
    - video uploads
    - history
    - comments
    - likes
    - upload
    - video editing (most of this is in browser, but still)
    - livestream
    - video analytics
    - payment and ad management
    - video comment review and moderation
    - translation
    - captioning
    - video replication, multiscaling, caching, and resolution management based on network speed
    - video recommendation
    - cards, overlays, annotations, etc.
    - music and sound effect search
    - antispam
    - dmca and copyright tooling
And that was 5 minutes of poking around.
zardeh··on Grumpy: Go running Python
Pypy still has a gil. Pypy is experimenting with non-GILed versions, and in fact there are people actively working to remove the GIL from pypy. But the same can be said of cpython (the gilectomy), and yet I don't think that you'd say "not strictly true" to "cpython still has a GIL".
zardeh··on Grumpy: Go running Python
Pypy still has a GIL. GIL-free seems to be one of the explicit goals of this project.
zardeh··on Grumpy: Go running Python
It seems to be that it pesudo-transpiles python to go and compiles that down using a normal go toolchain.
zardeh··on Debriefing Facilitation Guide [pdf]
I've skimmed it, looks like a guide on leading a blameless postmortem of an event (ie. an accident). That is, a postmortem where the goal is to figure out how the systems in place allowed people to make the mistakes that caused the problem, instead of placing blame on people who (may or may not have) made the mistakes that led to the problem.
zardeh··on How (Not?) to Use Python’s List Comprehensions
That's because there's an argument to be made here that the blog poster here is misusing the comprehensions syntax.

While what he does works, it can just as easily be written as

    list(itertools.chain(*[[x for x in sublist if x%3 == 0] for sublist in nested_list]))
Which uses a bit of magic to massage the end result, but it is much clearer for the inner portions, and much similar to your 'lispy' style. (`itertools.chain(` is equivalent to a 1-level flatten)

You can do the same thing in the bigger case, and you end up nesting your structures such that you get something like

    results = [[[[[[[[[[[[[[[(a, b, g, d, e, z, et, th, i, k, th, mu, n, xi, o, pi, r, s) 
    for th in range(1, 27) if (2*(th**2) + o**2 + r**2 == 1000) and ((th**2 * z**2 * (s - z) + s**2) == 7225)]
        for o in range(1, 27) if (b**3 + z**3 + n**3 + o**9 == 1997)]
            for r in range(1, 27)]
                for z in range(1, 27)]
                    for n in range(1, 27) if F(a, k)**2 + F(b, n)**2 + F(d, xi)**2 + F(e, pi)**2 + F(et, mu)**2 + F(i, s)**2 == 6]
                       for b in range(1, 27)]
                           for e in range(1, 27)]
                               for s in range(1, 27)]
                                    for (a, mu) in ((4, 1), (2, 2), (1, 4)) if a*(a+pi) == 4 * g]
                                        for pi in range(1, 27)]
                                            for g in range(1, 27) if (g-1)**2 + d**2 + xi**2 - xi == 600]
                                                for d in range(1, 27)]
                                                    for (et, i) in ((xi-7, xi-11), (xi-11,xi-7), (xi+7, xi+11), (xi+11, xi+7)) if 0 < et <= 26 and 0 < i <= 26]
                                                        for xi in range(1, 27)]
                                                           for k in (3,4)]
Which admittedly isn't
better*, but you can build up over time (ie. you can start with [f(k) for k in range(3, 4)], and then provide f(k) in a closure, and repeat, to build this up over time.
zardeh··on Be Careful with Python's New-Style String Format
The security issue here isn't with f strings, which oddly enough, don't have this flaw (because they are literals only). This has to do with new style string formatting, which does not have access to globals.
zardeh··on Why I close pull requests
You're exactly correct. Outside of 20% time, I can't see that example being really realistic (at least not at Google for an android launcher, there are other companies where I've heard of 10+ competing internal libraries for the same problem developed by different teams).

In the case that you're asked to implement a project from 'above', they're still useful, for practically the same set of reasons (maybe minus #5, but plus 'other people who you impact can provide feedback to reduce future friction')

zardeh··on Why I close pull requests
Really?

Everything I'm familiar with has approval and review on everything in government, bureaucracy is synonymous with government to many people for exactly this reason.

zardeh··on Why I close pull requests
Why do you think those two things are impossible to do at the same time. Most companies also have hierarchical structures, and most governments use some kind of bureaucratic process to approve major new projects, I'd expect it to be more bureaucratic than at most businesses.
zardeh··on Why I close pull requests
> internally open,

Internally open does not mean that everyone can always see everything though.

>Applying lots of formal rules to good developers just makes them unhappy.

I'm not sure I agree with this. I'm a developer, and I'm happier when there are formal rules about human code review, code style, automated testing, and minimal test coverage.

I'm happy about those things because they are a small inconvenience (if one at all) that save me time and effort down the line, and insulate me from lazyness, and mistakes on the part of developers (myself included!).

I see design documents as an extension of this. My pay in is that I occasionally need to write a document outlining my thought process w.r.t. a new (large-ish) feature I'm implementing. In exchange for this, I know that I will not waste my time reinventing things and, more importantly, when other people intend to make changes that will potentially negatively impact me, I will be able to provide feedback before those changes go live.

zardeh··on Why I close pull requests
I missed this earlier, for reference, with this specific problem, I was intentionally modifying part of the continuous build pipeline, specifically, I was working on a tool to autogenerate certain tests in certain contexts. This was eventually possible, but the first request as to how I solve the problem would have been bad.

Feedback from a team that worked with another tool we used in the testing process informed me of the potential for the problems. To be clear, this would have eventually happened anyway, its unlikely that a PR breaking the CI system in this way would have gotten approved, but there would have been much wasted effort on my part in the interim.

zardeh··on Why I close pull requests
>Also, why are both teams working in isolation for a month? If both teams check in code, the checkins themselves can provide an indication that other people are working in the same area. Incidentally, it's this effect that makes me strongly dislike feature branches. It's better to develop unstable code behind a feature flag, where the code is visible even if not active, than in a feature branch, where nobody can see it.

I chose my example carefully, the 'new' launcher being developed officially was part of a new, unannounced product, and therefore likely secret prior to release. On the other hand, the new version developed by the two people was a top to bottom revamp, which might mean an entirely new application, or something that can't easily be done behind a feature branch.

>Personally, I'd rather see two teams work toward our improved hypothetical launcher than to see zero teams do that work because process imposed too high an "activation energy" on the launcher experiment.

And again, I chose my example carefully: one team would always have created this new launcher, it was creating something as part of a much larger initiative.

>I'm not suggesting that communication is bad. I'm objecting strenuously (perhaps stridently) to the design document as a step in a rigid process and a requirement imposed from above.

Indeed, but if nothing else, a design document is a formalized process for this type of communication. To be clear, my understanding is that Google also has best practices in place for objections and blockages to things proposed through design documents.

The result is that when you are planning to create a feature that is large enough that it is, shall we say, statistically likely to break things or cause someone else serious aggravation, there is, if you are following policy, a formalized process for informing the people who your change might impact, a way for them to provide feedback, and a formalized way to resolve conflicting opinions when each engineer thinks that their workflow or feature is the most important.

This goes back to the other example I gave, which was a real one, where my design documented project could have, if implemented, created a situation where, until rectified, breaking changes would have gone undected by automated tests, and instead shown themselves in the tests for unrelated changes, which would have been an annoying bug to track down, and would have caused some other team a lot of stress and time. They would never have been notified until final review, and conceivably could have been months of wasted effort on my part.

zardeh··on Why I close pull requests
>Who looks at design documents? Your own team.

At least where I work, no. Your team, your manager, and anyone who you think will be affected, and depending on the scale of the change, you inform everyone that uses your tool or works on your product so that anyone can provide comments and feedback.

zardeh··on Why I close pull requests
I think the point is that every company that works at this scale does more or less the same thing out of necessity.
zardeh··on Why I close pull requests
(to be clear, this is all made up)

Well let's put it this way, let's say that I'm a googler, I work on the android team and I want to rewrite the launcher from the ground up because I have some whiz-bang idea. This falls under my general purview of stuff that my team works on, so I grab my coworker, and for a month we hack away at it and have a good MVP. It has great improvements over the existing homescreen.

We've been working and reviewing each other's code, and so after a month we submit the big change that touches bunches of files out for review by all of the various owners of various affected components. One of them shoots me an email a few minutes later and says that this work is all wasted because another team has been secretly working on an updated launcher for the release of Google's new flagship phone, the Pixel, it already has some of our features, but also has many others, and has been in development for 6 months already.

So now my coworker and I have wasted 2 man-months of employee time on something. That's tens of thousands of dollars that goes poof when someone closes the pull request. And those 10s of thousands of dollars could have been saved with a 2 page document and a 1 hour meeting.

The goal of these things is to not waste developer time, because you or I can't be aware of everything going on in a company, so writing a design doc allows other people to see what you're doing and

1. provide insight and feedback from their experience with similar problems

2. provide prior art from within the company

3. remind you of things you might have forgotten about

4. give you insight into how these changes will affect others

5. most importantly, give you information about other activities the company is doing in this direction that are related to your proposal, so that if you can avoid destructive interference, and potentially have constructive interference.

Otherwise you end up with repeated work, wasted effort, and fragmentation.

zardeh··on Why I close pull requests
Right, a single book has on the order of 4-500 pages, longer ones have more, but we'll take the average, and an average book has....30 lines of text per page, so 13500 lines per book. That makes the kernel ~1000 books, which is a lot of books, but avid readers do read 50+ books per year (my father probably does close to double this). That makes reading the entire source absolutely possible, in the order of 10s of years, which is a long time, but then, the kernel has been around for what, 25 now? So there are a number of maintainers who have been around long enough to have read through the entire kernel.

Compare that to google, where[1] there are almost as many unique source files as the kernel has lines (though to be fair, many are autogenerated).

[1]: http://cacm.acm.org/magazines/2016/7/204032-why-google-store...

← PreviousPage 2 of 6Next →