HNHacker News
TopNewBestAskShowJobs

daliwali

653 karma · joined June 6, 2012

sperging out online

https://daliwali.neocities.org

submissionscomments
daliwali··on Angular 4.0.0 Now Available
There is probably a non-trivial amount of astroturfing here, but also software developers are people too, and people get dogmatic about their opinions.

I probably won't ever use Angular unless I find myself desperate for work and can't find anything else. The problem I see inherent in frameworks is that they are all dogmatic about their opinions, and thus criticism of frameworks often do boil down to "I don't agree with their opinion", sometimes with rationalizations mixed in.

Preferences aside, Angular is objectively one of, if not the most, heaviest frameworks for web front-ends. It is not just a matter of bandwidth to the end user, but also a lot of magic under the hood that developers have to deal with. Consider the Java mindset that may have inspired Angular, people don't want to deal with that level of verbosity and enterprise mentality.

Unfortunately, there are increasingly few employment options if you want to use anything other than React or Angular. So rather than framing this argument in terms of framework hate, consider it a problem that lots of developers are forced to use these frameworks in order to be more like easily replaceable cogs in a machine, or be unemployed.

daliwali··on Angular 4.0.0 Now Available
Emphasis on the past tense -- "was" :)
daliwali··on Modern JavaScript for Ancient Web Developers
Disagree -- the web platform itself is pretty solid. Websites made decades ago are still accessible. The tooling that exists today will probably last much shorter.
daliwali··on Dawson – A Serverless Web Framework for Node.js on AWS
Spoiler alert: serverless is made of servers.

But seriously what they mean is that you rent an allotted amount of resources on a server farm to run your application for a short period of time, and then the resources are freed again. Not all applications will fit this environment, such as any embedded databases, persistent connections, and so on.

daliwali··on Dawson – A Serverless Web Framework for Node.js on AWS
Not sure why one would decide on using a framework because it is integrated with a few vendors that are popular at the moment. There is significant lock-in, and just because it is open source does not make it free. Lots of companies right now release client libraries that work only with their own remote server under a liberal license, giving the illusion of freedom.
daliwali··on Ask HN: Will front end development ever move away from JavaScript?
There is work on WebAssembly to add DOM support [1] but for now it is speculative. This is the main limiting factor since other languages have to use JS as a compile target instead of WASM if they want to interact with a web page.

[1] https://github.com/WebAssembly/design/blob/master/GC.md

daliwali··on Ask HN: Best tiny JavaScript framework?
Shilling my own library here: http://simulacra.js.org

No template syntax to learn, one function API, 5kb gzipped.

daliwali··on Refactoring Legacy JavaScript Code to Use Classes
Hahaha, no. Every time the argument for "maintainability", or some other subjective quality like "readability" is mentioned, another question must be answered "to who?" The class keyword was added a few years too late to accomodate the horde of desktop Java/.NET developers moving to the web platform, who simply did not grok prototypal inheritance. Now they don't have to.

>`Array.forEach` and `Object.keys` were new features in ES5, should people just leave their old `for` loops anyways?

Emphatic yes, people should keep using their "old" loops. They do less and are much faster.

daliwali··on Refactoring Legacy JavaScript Code to Use Classes
All of a sudden, perfectly working JS becomes "legacy" code due to the introduction of a new feature in the spec. There's that saying, only the software industry is more driven by trends than the fashion industry.
daliwali··on Snap Tumbles Below IPO Opening Price as Analysts Say Sell
The average Snapchat user isn't going to think about the process of uploading a picture to a central server which is then relayed to the intended recipients and then deleted on the proprietary client-side application (which can be worked around, the problem is that third-party may retain data indefinitely). The average consumer is not that technically literate, consider the people who think Facebook = Internet.
daliwali··on Snap Tumbles Below IPO Opening Price as Analysts Say Sell
This IPO is yet another indicator of a civilization in decline.

Snapchat watches people in their most private, most intimate moments, who are unaware that all of their data passes through centralized servers. Why should states even bother with intrusive surveillance anymore, when people freely offer to surveil themselves?

If Snapchat disappeared tomorrow, people would just upload their nude photos elsewhere. Nothing of value would be lost, except for maybe the world's largest, most centralized pornography database, with fairly reliable correlation to real identities. That could never lead to abuse of power.

daliwali··on Performance and Evaluation of Lisp Systems (1985) [pdf]
I think one of the reasons why C became popular in industry and Lisp didn't, is because Lisp is harder to translate into efficient machine code. C was closer to how the hardware works. In the earlier days, specialized hardware was built to run Lisp code: Lisp Machines. When computers were sufficiently fast enough, the specialized hardware was no longer necessary.

The software industry could have been vastly different, if Lisp took off instead of C, which I think had more to do with business, culture, & politics than the technology itself.

daliwali··on Problems with RESTful APIs (2015)
I think this article is a big lie, because it's based on the premise that what is being described is in fact REST.

First, it has nothing to do specifically with the mechanics of the HTTP protocol. There was an emergent pattern as people built APIs over HTTP, that they can re-use much of the semantics in common with HTML. HTML over HTTP naturally led to the definition of REST, where forms, semantics, and hyperlinks are not just an optional feature but a necessity.

Formal specifications, meaning hypermedia API media types are just emerging, Hydra[1] and Micro API[2] to give examples. Fielding wrote about REST in 2000 and about a decade later was rediscovered by industry, and I hope that two decades later, people will rediscover its utility for APIs. My interpretation is that Fielding did not "invent" REST, but rather formally described emergent behavior on the web at large. Implementations may have differed wildly but had many features in common.

The problems described in the article are the result of not following a media type suited for APIs. HTML is a wildly successful media type for machine-human interaction, there's no reason why there can't also be one or a few for machine-machine interaction.

[1] http://www.markus-lanthaler.com/hydra/

[2] http://micro-api.org/

daliwali··on Ask HN: How would you turn Twitter around?
Nope, just petty politics.
daliwali··on Ask HN: How would you turn Twitter around?
They can continue doing what they're doing already:

- Suspending accounts for no reason at all.

- Shadow banning users by hiding their replies (they refer to certain users as "low quality").

- Aggressive censorship of alternative opinions.

daliwali··on API Design Guide
Of course, I even write some hobby projects in Common Lisp.

There are data interchange formats that use S-Expressions, namely EDN[1]. But JSON remains the most popular format for its widespread support, and its few data types map to most languages.

[1]: https://github.com/edn-format/edn

daliwali··on APIs, robustness, and idempotency
An "idempotency key" as this article suggests applies to WebSockets as well and is particularly useful for correlating a response to a request.
daliwali··on The Impact Github is Having on Your Software Career
>One of the principles of open source is meritocracy — the best idea wins, the most commits wins, the most passing tests wins, the best implementation wins, etc.

This is so wrong that it's hilarious. Lots of garbage gets popular and there's tons of gems that go unnoticed. The meritocracy myth needs to die.

daliwali··on API Design Guide
>it's so different and you've added so much work to it

With web pages, it's standard and effortlessly handled by the browser. Given a form with inputs specified by the server, a client sends a request with media type application/x-www-form-urlencoded or multipart/form-data. There is a vast number of implementations for practically every language and platform. A machine client can send a form too, or JSON for that matter.

You have it backwards, Facebook is attempting to rewrite web standards by themselves. And that is undermining the open web.

daliwali··on API Design Guide
I am not the authority on what REST is. That would be Roy Fielding, who has explicitly stated that hypermedia is a requirement[1]. So go ahead and tell Mr. Fielding that his definition of REST is incorrect.

I am well aware that REST no longer means what it originally described, which is why I think it should go by another term that is not burdened by being a marketing buzzword.

[1]: http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hyperte...

daliwali··on API Design Guide
The answer to that is really simple: JSON is a widely supported standard in many platforms and languages. Whatever the latter is, is not.

What's better than writing a parser for the latter format, is not having to write anything and just using a library, which exists in practically every language for JSON.

daliwali··on API Design Guide
In reply to fixermark, there is also nothing stopping you from very complicated queries in REST. There is not even a requirement that the server must respond immediately. For example I could request:

POST /queries

With some raw database query as the payload (please don't actually do this) and the server could respond with HTTP 202 Accepted, meaning that it's going to take some time to process, meanwhile check back at the URL in the Location header when it's finished.

REST does not mandate any upper bound on complexity, that's up to you to decide.

daliwali··on API Design Guide
>it has become very clear to me everyone has a different interpretation of what REST can or should be

This is very true, the term has been abused so much that it has no relation to its original meaning.

We can loosely define REST by one of its key qualities: hypermedia, that is a lot easier to say than HATEOAS. By focusing on this distinction, it rules out 99% of APIs in the wild.

On top of that, hypermedia media types and linked data are important for an API to be self-documenting, so there is a rather high bar for developers to implement.

daliwali··on API Design Guide
>the structure REST mandates.

There is no structure that REST mandates, if there were it would be a specification and not an architectural style. There is nothing that says that you can't query for that:

GET /comments?sort=votes&limit=3

The exact string doesn't matter, what matters is the client can discover this. How HTML does this is by generating query parameters based on form inputs.

daliwali··on API Design Guide
You are correct that in a REST system, every resource has a "primary key", that is the URL.

Where you are wrong is that REST doesn't mandate that a resource can only be accessed by its "primary key". There is nothing stopping me from requesting the following URL:

GET /users/daliwali?fields=name&include=friends,friends.country

Any client would be able to follow that link and get something out of it, whether it's JSON or HTML, without needing specialized tooling such as a GraphQL client. A hyperlink makes that query widely accessible and interoperable with any HTTP client.

daliwali··on API Design Guide
Easy mode: GET /documents?include=comments

Think of how this can be done on a web page. The documents page has a link to follow, "include comments", which links to "?include=comments". The exact query doesn't matter, what's important is that a client can discover new information without needing any out-of-band information.

daliwali··on API Design Guide
What they describe is not REST. Nowhere in this document mentions hyperlinks, a strict requirement of the REST architectural style.

The best analogy would be a simple web page, which usually contains hyperlinks that a client can follow to discover new information. Unfortunately, web developers' understanding of REST ends with HTML, and they re-invent the wheel, badly, every time they create an ad hoc JSON-over-HTTP service.

There is a standardized solution for machine-to-machine REST: JSON-LD [1], with best practices[2] to follow, and even some formalized specs[3][4]. To Google's credit, they are now parsing JSON-LD in search results, which is much nicer to read and write than the various HTML-based micro-data formats.

On a related note, REST has nothing to do with pretty URLs, naming conventions, or even HTTP verbs. That is to say, it is independent of the HTTP protocol, but maps quite naturally to it.

[1]: http://json-ld.org/

[2]: http://json-ld.org/spec/latest/json-ld-api-best-practices/

[3]: http://micro-api.org/

[4]: http://www.markus-lanthaler.com/hydra/

daliwali··on API Design Guide
REST describes relationships very well, via hyperlinks. You navigated to this page via a hyperlink. If your API doesn't do that, it's not REST, this is what people usually mean when they point out that an API isn't complying to the REST style.
daliwali··on Ask HN: What is the worst software that you have to use?
The question asks about software and not specifically applications, so the worst software that I have to use are all of the web developer "tools" and frameworks that I have to deal with.

I can write far more performant applications in a fraction of the time without the bloat that is expected in web apps these days, but I would be hard-pressed to find a job where I can do that.

daliwali··on Ask HN: Can't get a job because poor communication skills
A lot of commenters are going to try to pick you apart, so instead of that I'm going to tell you an anecdote about what's wrong in this world.

I know a guy who literally could not program, he was hired as a HTML & CSS front-end guy. He was extremely arrogant and always tried to act like he knew what he was doing when it was clear he had no clue, any sort of attempt at teaching would be met with a smug "yeah I already knew how to do that" reply. He wasn't even good at HTML or CSS, either. But he really did know how to suck up to HR, his boss, the management, and getting others to help him do his job. From the outside it seemed like he was competent, but in fact he was skilled at playing people. It would be a win-win for everyone if he was a manager, so his co-workers never have to deal with his horrible, bug-ridden code. This is the type of guy that gets ahead in life while brilliant programmers who lack the over-socialization that is expected these days live on welfare, with parents, or on the streets.

← PreviousPage 6 of 8Next →