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 Mbloom’s first investment is in themselves?
Hard to see how this passed anybody's internal alarm that warns them of impropriety and conflict of interest. As a developer living in Hawaii that dreams of building my own company one day (and dreams of building that company in Hawaii), this doesn't look good for our ecosystem.

Cached version here: http://www.alohastartups.com/2014/07/12/wtf-mblooms-first-in...

Other writeups on this issue: http://www.hawaiiweblog.com/2014/07/10/mbloom-funds-mbloom http://www.civilbeat.com/2014/07/civil-bytes-is-there-a-conf...

shuzchen··on Show HN: Vex, a new way to run things in Python's virtualenvs
Similarly, anything you've installed in that virtualenv that installs itself in a bin folder (pip, mercurial, django-admin.py, etc) will be in that bin folder, and calling them from that directory will execute them in the context of that virtualenv as well.
shuzchen··on Cayley – An open-source graph database
Depending on the data model there are a few ways to deal with cycles. My project involved a friendship graph, and doing queries like "find friends of X", or "find people who like X, who are within 2 degrees of friendship-separation from Y". These are problems where it was okay to have cycles in the graph, as the traversal depth was hard limited. You'll have more problems if you're doing questions like "find the cheapest path from A to B", although there is certainly a way to cope with cycles there as well.
shuzchen··on Cayley – An open-source graph database
Actually you can have a graph database in postgres as well! Look into queries using "WITH RECURSIVE", and you can do pretty much anything a graph database could do. From the specific use case I had, there was actually no difference in performance between neo4j and postgres. I really enjoyed using cypher, and it was a pain to translate a query written in a graph-specific query language to a postgres equivalent with "WITH RECURSIVE", but because postgres was already a part of the stack I stuck with it.
shuzchen··on Lapis – A Lua, Moonscript Framework built on OpenResty
As a person that uses Django to make a living (at my full-time job, and for my freelance work) and who has tinkered with a lapis/openresty site on my spare time (http://graphcake.com), I'd say productivity is on the side of Django. There are too many included batteries (form validation, django ORM more powerful than lapis ORM, staticfiles) and high quality 3rd party libraries (task queue (celery, python-rq), image processing, caching) that I'd hate to reimplement.

That said, performance is totally on the side of lapis/openresty. The performance of my side project totally depends on how fast postgres responds to the needed queries.

shuzchen··on Paperpile
When my wife (then girlfriend) was doing her masters, I set her up with I, Librarian (http://www.bioinformatics.org/librarian/). At that time, it was (from the dozen or so that I tested) the best open source reference management software that I was able to deploy and make small customizations to. This was some time ago, nice to see the domain is still active.
shuzchen··on Webservers shouldn't have direct access to keys
How easy it is to hack the server itself really ranges from super simple to extremely hard. Is your target is a home server exposed to the internet, admin'ed by someone who installed apache from following online tutorials? Sure, you're better off just getting root access on the server. However, if your target is a server run by properly trained people who live and breath security practices, your best bet is to use a subtle bug in their stack that escaped their notice, extra bonus if it leaves no audit trail (e.g., heartbleed). I don't think this post is meant for an audience of the former group, but for those of the latter group.

I work at a pretty security conscious company (this might be an understatement, we're pretty big on security), and even as a developer on the inside I'd have to get pretty creative to get access to our production servers.

shuzchen··on Poachbox – Recruit Startup and Tech Talent
I'm not certain but from the copy it sounds like they'll be using that same pixelated cartoon no matter who the candidate is. Also, it doesn't appear like the signup form has a field to attach a photo.
shuzchen··on Websites Must Use HSTS in Order to Be Secure
You can't go back in the sense that random end-users that visit your site will likely have that cached. In chrome, you can always visit about:net-internals and clear the HSTS cache. Probably not useful for random users, but good to know if you've found yourself locked out of something after messing around with settings.
shuzchen··on SQLite now supports recursive CTEs
Yes, on the queries that I've done (mostly friendship graphs, and doing queries like getting friends of friends) postgres was pretty much on par with neo4j. I'm way more familiar with tuning postgres though, so there's that.

I really liked the cypher query language of neo4j, it was super easy to learn and is way simpler to express complex traversals across a graph. Writing a query in postgres to traverse a graph isn't as straightforward, and unless you're doing it often will take a long time to get used to.

shuzchen··on SQLite now supports recursive CTEs
This is awesome. I've used WITH RECURSIVE in postgres to do graph traversals (even replaced neo4j with postgres), and now this is also available with sqlite. I can see running tests in development becoming a whole lot easier.
shuzchen··on Python web scraping
People who write (python) crawlers use BeautifulSoup because it was created with invalid input in mind. If you're crawling the wild wild internet, chances are you'll find a wide range of invalid markup and lxml barfs on those (it's got recover=True, but that's not supported for all things lxml does).
shuzchen··on Kimsufi: the affordable dedicated server
Any reliable VPS offering should support custom kernels -linode, prmgr, and ec2 do. While it's not "any OS you want", they support any kernel that runs under Xen, which pretty much opens the door to most distros you'd want to run a server with. Really, the only thing you're technically locked out of is Windows.
shuzchen··on Plan 9 released under GPLv2
I really liked the criteria that http://www.gnu.org/licenses/why-not-lgpl.html outlines regarding lgpl or not. It's the same criteria I use to decide whether to use a strong copyleft license or not:

>The most common case is when a free library's features are readily available for proprietary software through other alternative libraries. In that case, the library cannot give free software any particular advantage, so it is better to use the Lesser GPL for that library.

>This is why we used the Lesser GPL for the GNU C library. After all, there are plenty of other C libraries; using the GPL for ours would have driven proprietary software developers to use another—no problem for them, only for us.

>However, when a library provides a significant unique capability, like GNU Readline, that's a horse of a different color. The Readline library implements input editing and history for interactive programs, and that's a facility not generally available elsewhere. Releasing it under the GPL and limiting its use to free programs gives our community a real boost. At least one application program is free software today specifically because that was necessary for using Readline.

shuzchen··on Python with Braces
I'm mostly surprised that they went into the actual parser/compiler and modified that. If I were crazy enough to do this, I'd probably just write a pythonb-to-python compiler.
shuzchen··on Python with Braces
Let's first forget that this is a crazy idea:

This is doable since dictionaries and blocks show up in different contexts. A block never follows =,:, ;, or (, so with a context sensitive grammar this can be accomplished. I guess it depends how they intend to support anonymous functions (def{}?)

shuzchen··on Show HN: thedaywefightback.js
The problem with this widget is the majority of the widget contents are stuck in an iframe. The js code mostly just does time detection and places the iframe on the site.

So even if you can audit and fix the js code you're running, you're still including content served straight from someone else's machine.

When we did this similar thing for sopa blackout (https://github.com/sirpengi/sopablackout), our widget was entirely self-contained (and under 200 LOC). And if you didn't trust our server you could host it entirely yourself.

shuzchen··on AMD reveals its first ARM processor: 8-core Opteron A1100
Assuming they've already compromised the crypto bits of the chip there's nothing to gain in avoiding them since the non-crypto bits could just as well have the same compromises. Might as well just take the time/energy savings.

Tampering with the RNG probably provides the best value for an attacker, and is harder to detect.

shuzchen··on AMD launches Kaveri processors aimed at starting a computing revolution
In my personal experience (I have a thinkpad x120e with a E-350) it used to be the case that I needed the proprietary drivers to get anything respectable. However, things have changed recently (in the last year or so) and I've been getting good performance out of the opensource drivers.
shuzchen··on Cards Stolen in Target Breach Flood Underground Markets
Now you have a different problem, fearing breaches at Paypal (and their record isn't clean on this front either)
shuzchen··on Google Compute Engine is now Generally Available
People looking to test this out might want to try apply for the starterpack (https://cloud.google.com/developers/starterpack/ promo code brdo-in). I know a few people with pretty vague ideas that still got accepted, although I'm not sure if they'll be more selective now that the service is generally available.
shuzchen··on Lessons from 2 months of remote working
Look around for hackerspaces or co-working spaces. They are generally inexpensive, and put you in working proximity with local talent and like-minded road warriors.
shuzchen··on Salesforce hackathon comes under attack from devs
This hn comment links to a few places where people complained: https://news.ycombinator.com/item?id=6779036

The link that specifically shows people complaining that nobody viewed their app or looked at their video is this: http://salesforce1million.challengepost.com/forum_topics/264...

shuzchen··on Coin
In my case, I actually did think of this idea! Just never had the hardware knowledge to even know where to get started (and I was worried about the trouble it'd cause as card skimmers used it to easily clone cards - hopefully we'll learn more about how coin solves that problem). I'm mostly glad they're trying to make this a reality, because I'd really like to get rid of all these membership/point cards that stuff up my wallet.
shuzchen··on “The Right Tool For The Job” Isn't
Failing together usually only make sense for the simplest of apps, not for anything that has a lot of moving parts. If my pub-sub message queue falls over, I'd rather the web workers still stay up so visitors can see the site - they'll just be without realtime notifications. If the background workers die, those tasks should stay on the queue, but everything else still runs as normal.

So really, the math works out such that if you fail together, you'll have X amount of downtime. If you fail seperately, you'll have X*3 amount of degraded service.

shuzchen··on Show HN: transcode.io
If that's the case with the resolution setting then my concern there isn't as major, although users might still be at risk if their webservers are configured a certain way.

I'm not concerned about users uploading files to someone else's server, but sometimes servers are configured to rewrite certain urls, or to do redirects, and attackers might be able to take advantage of that to rack up some user's bill. For instance, some cache-busting schemes rewrite /d/_somehash_/file or /d/file._somehash_ to the same /d/file and your service has no idea they're actually the same file. In this case, some attacker can just make up random hashes to make false transcode jobs, even though they all return the same video file.

Does your service treat /d/file and /d/file?v=1 as separate files? If so that can also be used as an attack vector as someone can add whatever parameters they want to the url, and most webservers silently ignore those. You can close this by ignoring those parameters, but then you exclude sites that serve files through some script (like /cgi/get-file?f=somefile)

Does your service whitelist file extensions? Or stream in file headers first to decide whether any file is a valid movie, otherwise stopping the download? Otherwise, any site that hosts other large files (say, linux ISOs) can force you to download really large files and waste bandwidth and resources.

With that in mind, I think if you also make it so your clients must also provide a subdirectory (for example, I could set it so only files within /static/videos/ are valid, as that's where I've decided to put my videos) then most of these issues will be taken care of. Your clients would then just need to make sure they don't have rewrite enabled for that subsection of their site, and make sure other large assets live outside that subdirectory.

shuzchen··on Show HN: transcode.io
I'm not sure how that helps any. The issue isn't access to the raw movie file source, but access to the url, userid and eventual customization variables necessary to start a transcode job. All of this is readily available to any website visitor on a page that has a video utilizing this transcoding service.
shuzchen··on Show HN: transcode.io
One thing you could do is involve HMACs. Basically, give the user a key that they use to sign the request (basically sign a hash containing the url, user id, requested options). You can then use the HMAC to verify that the user did request a video be transcoded, and website visitors cannot fiddle with the request parameters without invalidating the HMAC.

The problem is that this has to be done server side because the key needs to be secret (thus, this can't happen in javascript in the client), which breaks the whole idea you're selling (API-less transcoding).

You could also provide your clients with urls by having them submit the request on your site (obviously, behind a login). The user would then use that url in the src of their video tag. Again, this method goes against your selling point.

shuzchen··on Show HN: transcode.io
Doesn't strike me as very secure, since everything here happens through the url and anyone can just go in and grab the required values to spoof a transcode request. It's mostly mitigated by the necessity of file upload access, but even with that this can still be taken advantage of, especially if there are rewrite rules on the file server that might expose the same file through different urls (also if this service follows 3xx redirects that's even more vectors of attack).

In case resolution choice is added as an option, what's to keep any random Joe from requesting videos with various resolutions (or very huge resolutions) and racking up the bill for me?

shuzchen··on Ask HN: What are you working on and why is it cool?
It'll use standard algorithms, although the MVP will only have one available (using pearson currently). My goal is to make various alogrithms eventually available, and perhaps some mechanism to select the best automatically (e.g., selecting the best method based on how sparse or dense the graph is).

As for bulk export, yes in the sense of "download all the calculated recommendations" (perhaps you want to dump that to a local db to access that data directly, rather than rely on hitting my api every time you need something), but not "download all the data exactly as I put it in". For the most part, the data you put into my service should already exist in your own database (what products your users have purchased, what products your users elected as liking). In addition, you'll likely want to use a one-way hash to hash sources (especially if you use usernames or email addresses to uniquely identify users).

I probably won't launch with the ability to add weights to edges, although that's probably one of the first post MVP features on my todo list.

← PreviousPage 4 of 13Next →