HNHacker News
TopNewBestAskShowJobs

daliwali

653 karma · joined June 6, 2012

sperging out online

https://daliwali.neocities.org

submissionscomments
daliwali··on The sad state of web app deployment
I think that the vast majority of web apps could be deployed via shell script that calls out commands to the particular system. I'm not too optimistic about Docker since it is vastly more complex than the alternative (VM + shell).
daliwali··on Show HN: Fortune.js – High-level I/O for web applications
There are a few companies using it in production (and I use it for my work as the author of it), I just haven't bothered to ask for permissions etc. I discussed with one of the ember core team about replacing ember-cli's http-mock/fixtures with fortune, it seems doable by reusing ember data models in the backend. since they both support JSON API standard, the interaction should be frictionless.
daliwali··on Show HN: Fortune.js – High-level I/O for web applications
I'd say it's a bit more similar to ActiveModel + ActiveModel::Serializer, or Waterline & JugglingDB in the Node.js realm, in that they can be used for the same purpose but go about the problem differently.

Looks like axiom is coupled to RDBMS, while fortune tries to abstract away the data store (there are mongodb & postgres adapters) by providing a contract for reading/writing data. virtus looks very similar to the implementation of record type in fortune, has some extra features such as type coercion and lacks some features such as foreign keys.

if you're interested in query implementation have a look at how the postgres adapter maps the adapter contract to sql: https://github.com/fortunejs/fortune-postgres/blob/master/li...

daliwali··on Facebook PathPicker
Is there a reason why this is named Facebook PathPicker instead of PathPicker? It seems that the original author is giving up rights of their software to Facebook (it says copyright Facebook right in the license).

What troubles me is that this tool seems completely unrelated to Facebook's business so why must they assert ownership of their employee's side project? On the other hand, it could be the author's intent to give up their rights to Facebook, which seems dumb, there's nothing the author could gain from that other than the Facebook brand in front.

daliwali··on New Hacker News Guideline: Avoid Gratuitous Negativity
I was thinking that the only possible effect that this policy could have is the complete removal of outsiders (I consider myself one, rarely chiming in on HN), and eventually even insiders will simply migrate elsewhere for meaningful discussion that is not happening on this website.
daliwali··on A standard for building APIs in JSON
Now that you bring it up, the JSON API specification does not even mention REST or hypermedia actually. What I was trying to get at is that media types don't have to be coupled to the protocol. One can exchange an HTML document over HTTP just as easily as one could transmit that document over another protocol.

Some media types do consider their applicability over multiple protocols, for example: http://amundsen.com/blog/archives/1151

daliwali··on A standard for building APIs in JSON
Oh boy, cue the haters. I'd like to address a few things that JSON API gets right, and where it fails horrendously (just in time for 1.0!)

The good:

- It opens a path for standardized tooling among API clients. Rather than having a whole mess of JSON-over-HTTP clients with a hard-coded understanding of the particular API, one could theoretically use a hypertext client to interact with any API using this standard.

- It establishes a baseline of what an API server must implement.

The bad:

- It tries to control not just the media type, but the protocol (HTTP) and server implementation. This is problematic because it dictates how your server must implement its routes, and is tightly coupled with HTTP.

- It tries to be very prescriptive, but it cannot cover all edge cases without being exhaustive. This comes at a heavy burden for implementers to get every part of the specification correct. Despite this, some extremely basic features are missing, such as providing an index document so that a client can enter the API knowing only a single entry point (as it stands now, clients must have a priori knowledge of what resources exist on the server).

The ugly:

- Since so many parts of the base specification are optional MAYs, and there is no prescribed mechanism for feature detection, there is no way to figure out if a server supports a particular feature of this spec without trying to do something and failing.

- The spec has made many breaking changes on the road to 1.0 (as other commenters have mentioned, and there is still room for breaking changes).

At this point, I think that this project gained traction due to the clout of the original authors (Yehuda Katz and Steve Klabnik) and the promise of no-more-bikeshedding, though I would argue that the bikeshedding has just shifted from particular APIs to the spec. Disclosure: I authored and maintained some libraries that implement this spec, and authored another media type for hypertext APIs.

daliwali··on Build and Customize Your Own Hacker News, Reddit, or Product Hunt
As a front-end developer, I cringed when I saw how much Telescope (or is it Meteor?) relies on global scope. To see what I mean, inspect the window object in their first example site http://crater.io/

  Object.keys(window).filter(x =>
    window[x] instanceof Function &&
    !/native code/.test(window[x].toString()))
120 user-defined global functions, and that is not counting all global variables... yikes!

(edit: if you're using Chrome, `Object.keys(window).length` gives you 260)

daliwali··on Microsoft adopts first international cloud privacy standard
Should there ever be any reason to trust your privacy to proprietary software running on a third party's server? Or is this "privacy standard" they are conforming to just another form of security theatre?
daliwali··on Curmudgeon's Guide to REST
Not at all, and I did not mention SOAP. Most APIs on the web are not really RESTful, and the problem with the cowboy coder approach is that they appear productive but create tons of technical busy work that can't easily be automated.
daliwali··on Screw motivation, what you need is discipline
I find that I can force myself to do a task that I extremely dislike, that is discipline. But an important prerequisite is motivation.

Case in point: I could force myself to improve upon a real-time bidding algorithm, resulting in more winning bids and targeted advertisements to appear on a largely captive and passive audience. Perhaps aspects of the bidding system could be improved to use less CPU cycles, memory, saving cost on the infrastructure to run it. I could get into the finer details of the time-complexity of every operation.

But why should I be expending my effort, a part of my lifetime, on helping to sell something people don't need? To the benefit of big corporate brands while they pay me a pittance of their enormous profits? A major problem with this "screw motivation" philosophy is that it encourages more mindless work in favor of the status quo. The quintessential codemonkey churning out code as if that is its purpose to follow orders from above. http://en.wikipedia.org/wiki/Little_Eichmanns

Another misconception the author has is that someone has to be in the right emotional state to be motivated to do something, to which I reply emphatically FUCK NO. Things don't just get done out of an emotional urge to do things. I am not always feeling enthusiastic about my side projects but I am highly motivated to do them even if it involves dry reading of technical specs. With lots of discipline and little motivation I could plod through the boring parts and forget about what I was trying to do (and this is what I feel most schools optimize for).

daliwali··on List of Computer Science Courses
Passing basic HR filters is necessary for most job listings, and "equivalent experience" is harder to quantify than having a degree in the field from a name brand university. Also it is hardly a selling point to claim that one took an online class and did not receive credit for it.
daliwali··on List of Computer Science Courses
These are great tools to learn foundational computer science from outside of a classroom, but not an adequate substitute for a computer science degree (and I say this with no formal CS background myself). One could reasonably pace themselves through the class materials presented here, attempting the homeworks and tests while honestly assessing oneself, but employers especially want to see proof, and a degree carries far more weight than doing the same work but without the degree to show for it.

Pedigree and pedantics have taken precedence over hacking and creative problem solving, particularly in the Silicon Valley where a Stanfordcal degree and Googfacetwit work experience is expected.

daliwali··on Tesla Model S JSON API
This API documentation has already been posted here twice today [1].

I remarked how non-RESTful this API is, which may have been the motivation for the title of this submission [2].

[1] https://news.ycombinator.com/item?id=7961944

[2] https://news.ycombinator.com/item?id=7962260

daliwali··on Jeremy Bentham's revolutionary views on sex
"Bodily passion was not just a part of Bentham's life: it was fundamental to his thought... Of all enjoyments, Bentham reasoned, sex was the most universal, the most easily accessible, the most intense, and the most copious – nothing was more conducive to happiness."

Yep, this is someone who tech nerds can honestly relate with. Easily accessible. Uh huh.

http://www.damemagazine.com/2014/05/23/amazon-killing-my-sex...

daliwali··on Tesla Model S REST API
This more closely resembles a RPC (Remote Procedure Call) API, rather than adhering to REST principles. For example, making GET requests should only retrieve data and not mutate state, whereas in this API, there's GET requests to honk the horn, unlock and lock doors, setting AC temperature, etc. Query parameters in the URL are also misused to pass information to be saved on the server.

Stop labelling every API that operates over HTTP as a REST API, this one clearly isn't.

daliwali··on What 4chan thinks of HN
There are assholes everywhere in this world, including HN. Your point?

>Some folks probably should feel tied down by their reputation/ego.

I'm pretty sure that implies that you don't want the "bigots" in your worldview to be able to express themselves anonymously.

daliwali··on What 4chan thinks of HN
So you are saying that we should abandon freedom of expression and attach IDs to anyone who has anything to say, in order to instigate retribution against those who disagree with your worldview? How will this not lead to censorship (and self-censorship) and hugboxing? If you don't want to participate in an anonymous discussion, that's your choice, but don't try to deprive others of it.
daliwali··on What 4chan thinks of HN
Doesn't matter, it's about expressing oneself without fearing retribution.
daliwali··on What 4chan thinks of HN
I love how anonymity engenders such honest commentary. When people aren't tied down to their reputation/ego, they are free to say what they really think.
daliwali··on Fortune.js - RESTful, HATEOAS APIs made easy
Ah, by the way, you shouldn't need to serve the front-end app from the same server as the API. By default, Fortune gives you CORS (Cross Origin Resource Sharing), so that clients from any domain can consume it.

Also, Fortune should work out the box with Ember Data and my JSON API adapter: https://github.com/daliwali/ember-json-api . Not to say that you should ditch Angular, but it will probably need quite a bit of modifications to its data layer to get it working with the JSON API spec.

I will be working on a full, non-trivial example of what an Ember.js + Fortune.js application can be in the coming week(s). There is a current implementation that's in production at my company, but its unfortunately closed-source.

daliwali··on Fortune.js - RESTful, HATEOAS APIs made easy
Actually, one of my motivations to build this stems from Sails.js. Its ORM, Waterline, currently doesn't support associations between resources, so I built a persistence layer that does that myself. This is crucial because in order to fully support the concept of HATEOAS, resources need to be able to link to each other.

In the future, I might actually cut out Express from this framework, but still accept Connect middleware. The reason for that is because I don't want the user to be concerned about routing or having to manually set routes, so a thinner router might be in order.

daliwali··on Show HN: Highlighting Efforts of Creation from Hacker News
Thanks for taking the time to compile this. I had debated with myself whether or not to post my project to HN this week, expecting that either the comments would be very harsh on a v0.0.1 release, or that it would whiz by the "new" feed with no upvotes. Seeing my project, Fortune.js, on this list is very encouraging.
← PreviousPage 8 of 8