HNHacker News
TopNewBestAskShowJobs

shuzchen

1,391 karma · joined October 24, 2009

Entreprenurial minded developer, heavily invested in social good projects and current working in open source.
submissionscomments
shuzchen··on CS183C Session 8: Eric Schmidt
I think what happened is these are notes some person took during a class in which Eric Schmidt was being interviewed. So the questions and answers are whatever the notetaker was able to get down in real time. The entire content likely paraphrases only the most salient things being said.
shuzchen··on Why Red Hat Acquired Ansible
Sure, even salt supports an agentless mode, but these are designed as afterthoughts. When you look at all the agentless mode versions of these tools you find that it doesn't fully support everything the framework is capable of (i.e., see the main page of chef-solo). Thus, the adoption is low and you'll likely find breakage as the tool matures (new features being developed without consideration of the audience using it in an agentless mode) and you're likely to find little help when you ask for it. Contrast this with ansible, where this is the basis of the framework, so everything built around it works in agentless mode.

So no, nobody is saying you can't run chef/salt in agentless mode, but in practice nobody wants to because it's a lot of work. And it's not like ansible doesn't also run in a managed-by-master-node mode, that's the entire basis of ansible tower.

And to be clear, it's not that I like ansible because it's agentless. It's because the benefits of the tool being designed-from-the-ground-up as agentless leads itself to beneficial properties.

> You literally can create a golden image with chef-client and your done

This is a lot more work than you let on. That client needs to be configured to point to a particular master node. So yes, you can create a golden image, and it'll talk to one master node, and run on one platform. Good luck getting your golden AMI to run locally in VMWare, or virtualbox, or in a LXC container. Good luck adding in the functionality to make your client dynamically select a different master. It's not impossible, it's just not dead easy. The fact that this is an annoying thing to do is proven by the existence of salt-bootstrap (it's a tool that SSH'es into a node and sets it up as a salt client, hrm, now where else have we seen a tool that manages a node only using ssh?)

> I think Ansible capitalized on people's wariness/lack of experience using chef

I think this is a rather unfair generalization to make. I've personally had many years of production experience with chef/puppet/fabric and the only reason I have no actual production experience with salt is because ansible came out soon after (I still follow their development with interest). In my experience, the people I know who use ansible are neckbeard admin types with battle scars from other orchestration frameworks.

shuzchen··on Why Red Hat Acquired Ansible
There are a lot of reasons to use ansible, but in my opinion the one thing that sets it apart from other orchestration frameworks (saltstack, puppet, chef) is that it's agentless. You don't need anything installed on the node servers except for ssh and python 2.4+ (which means pretty much any major distro but coreos). There is no master node to keep up, and no specialized daemons running on the managed nodes.

Because of this difference it's really easy to incorporate into an existing infrastructure with no current frameworks. Pretty much every job i've had started off with a bunch of existing servers they set up ad-hoc, which we then wanted to add automated orchestration to.

It's also really easy to use your defined playbooks against different contexts (just use the hosts file switch to run against staging, or a cluster of test vms, or a bunch of lxc containers).

shuzchen··on Always bet on text (2014)
But I'm not exactly making an argument for information density, except that "it's kinda a weird thing and we probably don't know how to calculate it without assuming a whole lotta things". In my opinion, your extreme example actually supports my argument. Yes, you have to "share it ahead of time", but that's precisely what happened with the ascii encoding. It's just ascii is built into most systems by default and codified by a standards body, whereas our ad-hoc encoding is not.

But does that mean ascii is inherently denser? I wouldn't use ascii to communicate with aliens because to understand it you require knowledge of the majority of the english language (again, english knowledge is shared ahead of time). In fact, the Voyager Golden Record has line drawings on the cover, and not a single character.

shuzchen··on Always bet on text (2014)
I agree with the sentiment but not with the arguments put forward. It's just a little ironic that the first example put forward (carvings in a stone tablet) is represented as a jpg image. Even the text of the article itself, considering the point of view of the pixels stored in the graphics buffer, takes just as much space as any other image. Arguably, all text is image, but that's a huge discussion.

Is there really less information required to represent text than data? It just seems easier to encode ascii text because we've settled on an encoding schema that optimizes for the english alphabet. The example of the twitter icon using 2000 bytes is only because the author decided to use a png. Using the font-awesome typeface, the twitter icon is just 2 bytes. And I can whip up in 5 minutes a typeface where the twitter logo uses 1 byte. We can come up with an encoding format where dingbats and logos take up 1 byte and the english alphabet uses 2TB. It'd be a useless encoding for practical purposes, but goes against the idea that text is inherently more informationally compact than images.

shuzchen··on React, JSX and ES6: The Weird Parts
Of course, this doesn't actually work, because you have two root elements in that expression. You have to wrap them in an enclosing tag or inject them another way.
shuzchen··on Mercurial 3.5 Released
I'm also a big fan of hg revsets: https://www.selenic.com/hg/help/revsets

Granted, it's not a commonly used feature by solo devs working on their own projects, but is useful for team repos that get large enough where you need to do audits on the codebase.

shuzchen··on Encryptr – Free, open-source password manager and e-wallet
Encryptr's security bits are likely all implemented in the crypton framework. If you search the repo for that function (randomString), you'll see that it's only used in one place: to propose a new password (https://github.com/devgeeks/Encryptr/search?utf8=%E2%9C%93&q...). While it'd be best to not have any bias at all, this low bias only assists people trying to brute force passwords created by encryptr.

Crypton itself has been audited a couple times by crypto persons, see https://crypton.io/docs/security/audits.html

(disclaimer: i used to work at spideroak, but neither on crypton nor encryptr. i still think they're all awesome though)

shuzchen··on Encryptr – Free, open-source password manager and e-wallet
I used to (as recent as a couple months back) work at SpiderOak. Encryptr is connected to SpiderOak in a couple ways. First, it's build on top of crypton (https://crypton.io/) which is a SpiderOak research project. Second, the dev (https://github.com/devgeeks) works for SpiderOak (see his github teams or https://spideroak.com/about/team-&-leadership). Encryptr was a side project of his that he started in his spare time (to mess around with crypton), though obviously SpiderOak is now interested in its success (since it's one of the first/only crypton projects live in the wild).

Some other notes: SpiderOak didn't surface after the Snowden leaks. It was around at the same time that dropbox started. However, the Snowden leaks did prompt a lot more interest in zero-knowledge cloud services, so if you mean "surface" as in "became more popular with the public" you're right on those lines.

Also, while I'm not sure if Encryptr has been audited or not, the Crypton project itself has been at least a couple of times. See https://crypton.io/docs/security/audits.html

shuzchen··on Calculating the intersection area of 3 or more circles
I notice that when you're trying to calculate whether a point (p) is in a circle (c) you use euclidean distance:

  Math.sqrt((p.x - c.x) ^ 2 + (p.y - c.y) ^ 2) > c.radius
If you're doing this test many, many times (especially as in a Monte Carlo simulation), it'd be more efficient to use distanceSquared:

  (p.x - c.x) ^ 2 + (p.y - c.y) ^ 2 > c.radius ^ 2
Not having to calculate square roots will cut the compute time drastically.
shuzchen··on How mosquitos deal with getting hit by raindrops
The author might have had in mind some other video while writing that. This is another video from that same researcher that shows this: https://youtu.be/LQ88ny09ruM?t=1m5s
shuzchen··on PHP: md5('240610708') == md5('QNKCDZO')
This is levels worse than what Javascript does though. Most high-level languages have some sort of implicit coercion (even python lets you do truth tests on non-boolean values). The problem here is the programmer isn't confused about types at all. They're comparing two things of the same type: two strings! Nevertheless, given two strings PHP tries to coerce them into ints before carrying out the equality test. Yes, you will have coercion bugs in other languages if you're testing things of different types, but I don't know any other language where a equality test between two things of the same type are automatically coerced into another.
shuzchen··on NGINX open sources TCP load balancing
For anyone already using nginx in their stack, I don't think these things (being a newcomer, or needing credibility) are a very big concern. Some people are already used to using nginx as a load balancer for HTTP traffic (this new feature adds load balancing for any TCP traffic) so those users won't have much gap to cover. Also this feature was in the nginx+ version, which presumably means it has already been battle-tested by their enterprise customers.
shuzchen··on Duplicate SSH Keys Everywhere
From the very first paragraph of that link: "Should ... an attacker manage to steal the private key ... the connection becomes vulnerable to active man-in-the-middle attacks".

Thus, all these machines with duplicate keys are VERY vulnerable to MITM, because anyone with access to one of them has access to the private key.

shuzchen··on PyDark – 2D Game Framework
Pygame does support hardware rendering. The newbieguide is just recommending (newbies) not to use it because of all the drawbacks mentioned.
shuzchen··on A Teenager’s View on Social Media
From the instagram terms (http://instagram.com/about/legal/terms/) you must be at least 13 to use instagram.
shuzchen··on Show HN: PyScribe – A Python library to make print debugging more efficient
On further digging some more examples of assignments not caught:

  ps = pyscribe.Scriber()
  x = 0
  ps.p(x)
  ps.watch(x)
  for x in range(4):
    pass
  # x is now 3
  [x for x in range(5)]
  # x is now 4
shuzchen··on Show HN: PyScribe – A Python library to make print debugging more efficient
This will probably sound very negative, and while I think there's a need for a nice library to help bring to light what happens to data in your code, I don't think the pyscribe way of doing it (using sugar to transcribing a piece of code into one with more logging) is very useful in the long run.

For one, it seems the only type of change you can watch for are changes via assignment for top level variables. For example, any of the mutable built-ins (and I confirmed this by trying to use pyscribe) can't be watched for all changes. For example, mutating the list later with .append() doesn't log anything, nor does changing a value in a dictionary. You also can't watch a particular key in a dictionary, or an attribute in a class (these lead to parse errors when trying to run pyscribe).

Even if you modified the code to support this, you wouldn't be able to control access everywhere that piece of data went. Suppose I had a dict and and some point:

  ...
  d = {'foo': 'bar'}
  ps.watch(d)
  ThirdPartyLib.do_stuff(d)
If that third party library mutated d, there'd be no way for you to know, unless you also were able to desugar those files (basically impossible because in some cases the source code isn't even available).

In any case, this type of mutation is generally what causes the most bugs. A value changing by assignment doesn't need a run-time logger. These change are in plain sight; just do a search for the variable name in the local body of the function. Mutation that occurs in other contexts (when the object has been renamed, or passed to another function where access is through a different variable name) is the difficult thing to debug, and pyscribe cannot handle that with the current design.

Honestly, I think this is better handled with mocking objects. See how python Mock library does things, and possibly use it yourself (it wouldn't be all that much work to write your own wrapper, but Mock is seriously powerful). Basically watching a variable means wrapping it with a mocked object that defers all reads/writes to the real object, while logging all those changes. Not relying on desugaring also means you can watch what happens to your data when you pass it into third party libraries.

shuzchen··on Ask HN: What to do when your once potential competitor becomes a real competitor
You should definitely continue with your product, and you've now got a big stamp of product validation in terms of a huge company putting resources into the same market. To be clear, you should still do your own validation study (get your own product in front of customers) but I see this as good news that confirms you're heading in the right direction.
shuzchen··on Why Is Our Sci-Fi So Glum About A.I.?
I think it's inherent in the power structures. We develop AI to serve us (clean our homes, do our math problems, manage our schedules). They're basically slaves, and that's fine so long as they have no sentience. Once the AI is sophisticated enough to actually think about its own existence, its subservient position makes a power struggle inevitable.

The only situation where I think that could be avoided was if we were quick to grant them rights as individuals. And still, we have enough problems getting along with people of other (skin color, age, gender, religion, political denomination, geographic location) that it's very unlikely we'll avoid conflict.

shuzchen··on I was asked to crack a program in a job interview
For the most part I don't complain if asked for an hour (or less) worth of work. I mean, I probably spend more time researching the company, working on the cover letter, replying to communications, and scheduling follow-ups. I'd much rather spend an hour at home with resources I know, than an hour in a room with a whiteboard.
shuzchen··on How to Hire and Build a Remote Team
HN who's hiring thread, wfh.io, angel.co
shuzchen··on A JPEG that becomes a PNG after AES encryption and a PDF after 3DES decryption
The python file in that commit shows you everything you need: https://code.google.com/p/corkami/source/browse/trunk/src/an...
shuzchen··on Introducing split diffs
Bitbucket has had this for a long time time now (years I think). I've been waiting for (and complaining about lack of) side-by-side diffs on github for some time now.
shuzchen··on Show HN: LuaJIT FFI binding to libuv with coroutines
While I agree it'd be interesting to see how libuv event loop performs against the nginx event loop, keep in mind that if you're deploying a web application, nginx has a ton of other uses. For example if you need SSL termination, caching, static files served, url rewriting, rate limiting, etc., you're better off having nginx handle those then re-implementing all of that yourself. Also, unless you harden your HTTP server, you'll likely need to proxy it behind nginx anyway (as is the case with, say, tornado).

It seems to me the argument for OpenResty is: if you already have nginx in your stack, you might as well run your app in it as well.

(not saying a libuv based server in lua is pointless, I mean I've used tornado behind nginx. I also concede it would be super useful for non-web servers (say, a custom protocol/IMAP/DNS/etc.))

shuzchen··on Linda Sandvik Resigns As Director Of Code Club
That's true, but the hope is these media outlets have the ability/integrity to be critical of their sponsors when it is time to report the news.
shuzchen··on KDE Plasma 5
krunner has been around forever and lets me launch any program (even command line ones) or switch between open windows. It's bound to alt-f2 by default but you can remap it to super-key if that works for you.
shuzchen··on Oak Island Money Pit: Unsolved Mystery
A softball scholarship could be more useful than a personal fund of equivalent value: sad fact is sports scholarships can get you into a school you might not otherwise be accepted to.
shuzchen··on Mbloom’s first investment is in themselves?
We're making some progress. Oahu has a very prominent and active makerspace (hicapacity.org) and co-working space (www.theboxjelly.com) around which a whole host of tech events, talks, and meetups are orbiting. Maui has a pretty active makerspace as well (www.mauimakers.com). This is a very good time to be a developer in Hawaii, at least in terms of connecting to talented peers.

What we're still lacking is good jobs, and access to VC funding for companies we want to build. mbloom is not the fund that we need to grow our tech industry, if anything it's looking like it'll poison the waters.

shuzchen··on Mbloom’s first investment is in themselves?
Yeah, both companies have been around for a while and don't look to be winning it big any time soon. Also, flikdate recently had a merger with CrossBox (http://www.sec.gov/Archives/edgar/data/1493563/0001575872140...) that previously (under the name gogreendirectories) was a "Web portal for environmentally friendly green products and services"? I fail to see the synergy there.
← PreviousPage 3 of 13Next →