Hacker Newsnew | past | comments | ask | show | jobs | submit | robitor's commentslogin

Naur argues that this view is contrary to the mainstream approach to software development, is that true? Does Google, Facebook, etc... view software development as: "similar to industrial production, the programmer being regarded as a component of that production, a component that has to be controlled by rules of procedure and which can be replaced easily"?


I'm not sure whether his mainstream is similar to today's mainstream, but I think he talks about this distinction between TheoryBuilding and "industrial production" specifically in the "Method and Theory Building" section.

If I understood correctly, TheoryBuilding is rather independent of method — TheoryBuilding is what a programmer would ultimately have to do to succeed, regardless of the exact steps they are asked to take. The exact method they follow is irrelevant in comparison.

I'm not sure mainstream still means the same thing he's talking about, but even in your example of "industrial production", I don't think it's that clear that that contradicts him. He seems to be just saying that whatever that means, it's not enough to fully describe software development. But perhaps competent engineers would end up doing so anyway — in fact, if they follow a similar set of ideas that they carry with them from project to project, they would then have a theory of other people's software that they didn't build themselves, just from being in the same environment.

On the other hand, he does directly say that under the TheoryBuildingView, when the theory of a program is lost, from people being replaced too much, it is really lost, and it is very expensive to reconstruct it. So it really depends on the details of how exactly that "component-based production" works out in practice.

[Note: maybe I misunderstood the paper or something, don't trust me.]


I don't know what happens in Google, Facebook etc. but one thing I know - there are not mainstream companies. They are just big and successful. Mainstream companies are rather all these small and medium IT firms that make Wordpress based sites (for example).

I think many IT firms nowadays have exactly this kind of approach: programmer has to deliver code according to specifications created by designers and stakeholders. Nobody cares what programmer knows and what theory programmer is building - the most important thing is to bring hot new features and to do it quickly.

Off course one can argue that "features", "stories" or "backlog" are needed from business point of view. Okay. But how to construct theory if there is no time for thinking?


This is from 1985. Things have certainly changed.


nothing changes. I read some time ago Dijkstra article from 1972(!) called "The Humble Programmer" and what he wrote describes perfectly programming in 2015 as well (maybe he had Time Machine? Who knows...).



Why would they choose RPC style endpoints over REST?


Because REST is a superficial standard and people are starting to figure that out? APIs don't need to be complicated. Give me an endpoint to call and parameters to send. I don't need verbs, cool looking URLs, overloaded headers, special versioning schemes, and a never ending debate of what REST is and what it isn't. Also if anyone replies to this with 'you just don't understand REST' I'm going to put another nickel in the jar.


You are apparently me.

I've done REST and "rest" for many years and every single time it starts out really simple. Oh I just need the profile data so let's make a RESTful endpoint just for profile. So easy! Oh wait the profile page need data from X, Y and Z. Well we gotta be RESTful so let's make 4 HTTP calls. Oh, latency sucks on mobile and terrible networks and we have to cut down on HTTP calls? Sorry, can't, we're RESTful...okay fine ONE RPC endpoint for the profile page's information.

I think REST has it's place; it's good if you want a really intuitive way to access a very specific resource. Beyond that? For developing web apps? Almost always have to go down the RPC route and there is nothing wrong with that. Not everything has to be "RESTful" damn it!@


> Oh wait the profile page need data from X, Y and Z. Well we gotta be RESTful so let's make 4 HTTP calls.

There's nothing RESTful about making more HTTP calls. There's no reason that there can't be representations of a resource in a RESTful API that happen to include, in the representation rather than by reference, representations of subresources.

(You probably would want to have authoritative URLs for the subresources in the representation, assuming the media type of the representation is one which supports that.)


Really? I thought REST says you shouldn't assume URLs follow any pattern. So if you want to get product 123, you need to search for it, then find the URL. Instead of doing Concat("/product/", prodId).

Twilio is an interesting case. They claim all REST, yet they encourage people to generate URLs using IDs. (Twilio's API is great, apart from the incomphrensible decision to use IETF style dates, the silly "Mon, Nov 8 2009" format that only made sense in the 70s over obvious year-month-etc. style.)

I'm not sure there are any popular, really REST APIs out there.


> Really? I thought REST says you shouldn't assume URLs follow any pattern.

It does, but that's an unrelated issue to the one addressed in GP, which addresses the condition where the information exists on the server side when the response is sent to know what subresources are part of the composite that is desired.

> I'm not sure there are any popular, really REST APIs out there.

The Web itself is a popular API, which provided both the motivation for defining REST and which was, itself, shaped by REST in that REST was developed in parallel with and influenced the design of HTTP/1.1.


The web itself is hardly REST. Plus it's not really an API as in easily consumed by a machine. Most web pages, or the user agent, really rely on a human driving decisions.

Seriously, what's a popular API used by developers that's actually truly REST? All I usually see is various levels of awkwardness as an RPC message is sorta split up into various bits spread throughout the HTTP request.


> The web itself is hardly REST.

HTTP/1.0 provided the inspiration for REST, which was defined by Fielding in parallel with work on HTTP/1.1 which it informed. The web itself is very much REST, essentially being the defining instance of the architectural style.

> Plus it's not really an API as in easily consumed by a machine.

Yes, it actually is a REST API that is actually made to be, and regularly used as, an interface consumed as hypertext by machines who access requested content by locator, choose how to handle it by identified media type, identify and either directly act on or present user options to act on related content by hypermedia links, etc. Whether this is end-user software (browsers) or unattended software (Googlebot and other spiders), etc.


I think you are really trying to dodge the question. Spiders often employ plenty of AI to try to make sense of stuff. It's not an API in any useful sense. For instance, automating Amazon.com. Humans manage fine because underlying changes and renamed URLs, input fields, etc. are ignored. A spider can't handle that (buying items, updating kindle preferences, etc.)

But for values of API that you know I'm referring to, where is one popular, truly REST API? Say, one that includes an SDK, if you need help with the definition. The fact that no one can really point out a good example means it's irrelevant to program writers.

Also, if you're saying the web is all REST essentially by definition, then so are these POST-only APIs, but they aren't. Or it's a useless tautology.

Plus I don't see any real difference in the web of HTTP1 vs 1.1, so that whole claim is suspect too. Perhaps you can elaborate exactly what HTTP1.1 added that really changed anything except some ease of use (host header, absolute URLs, keep alive).


There's a lot of academic hand-wringing about what makes real REST... but not one complete example of which I am aware. I think we're past the brink of just giving up on dogmatic RESTfulness and ought just apply the term to any reasonably sane JSON RPC-style API with out-of-band documentation for humans.


Look, if the actual REST architectural style isn't what you want, then don't use it. But that doesn't make it useful to use the term to refer to things that aren't using it. If you want to make a JSON RPC API, call it a JSON RPC API, not a REST API.


Agreed. I've no idea why everyone is so hot on saying REST. I think it's just a backlash reaction to SOAP and other complicated things, and they really mean "simpler interface" and RPC makes people think CORBA and DCOM? Or maybe the fact a PhD thesis is involved makes them feel more grown up. Like the backlash of shitty statically typed languages leading to people professing a desire for dynamic types instead of type inference. Or just buzzwordy, like people were saying SOA everywhere and now saying microservice.


The issue is not related to any personal taste or distaste for the REST style, it's that the paucity of idiomatic, complete examples and practical references has permitted the repurposing of the term "RESTful" to mean JSON RPC, and going hand-in-hand with that problem, nobody(?) is trying to implement Fielding-grade REST APIs.


Actual REST may well not be the right solution for quite a lot of the problems people have with APIs, so its good that people should not always feel obligated to use REST.

OTOH, actual REST may well be the solution for other problems, and its a lot easier to talk about solutions if we use "REST" to refer to Representational State Transfer as defined by Fielding and let all things that aren't that get names that reflect what they are, whether its JSON-RPC-over-HTTP or something else.

Its a lot harder to talk about the merits of different approaches if a wide swath of unrelated approaches that are not similar except in not being SOAP+WSDL (or, possibly, in that plus also not being Fielding's Representational State Transfer) all get lumped together as "REST".


> There's nothing RESTful about making more HTTP calls. There's no reason that there can't be representations of a resource in a RESTful API that happen to include, in the representation rather than by reference, representations of subresources.

Sub resources sure but I'm not talking about sub resources because sub resources are dead easy. This is more of a "oh we should also display resource X, Y and Z in these different spots".

If you want to be really "RESTful", TYPICALLY (and I say typically because I think every developer has a different definition of REST, lol), your URLs only align to resources so joining resources means multiple calls.

Google has an interesting solution for batch HTTP requests that could kinda be used in a way to batch RESTful requests but it's not the most intuitive. https://developers.google.com/drive/web/batch


I think some of these problems are solved by HTTP/2 multiplexing.

My experience at least with using REST for APIs seems to agree with yours. REST APIs, like traditional OO programming, seem to only help in a small number of situations. I've seen some really complicated things in the name of "RESTful"ness, like crazy Accept headers for different versions of the API. And like you pointed out, each developer seems to have their own idea of what REST means.

Approaching the API design from the other direction seems better. What is HTTP offering you that is better than just using a socket? It's got a request/response thing with message framing, some handy out-of-band stuff with the headers, there's HTTPS support, it works directly with browsers, and sometimes you can even get it to work through a proxy. HTTP requests are also supported pretty easily (more easily than socket stuff maybe) in most languages.

Then, using features from HTTP where they make sense can be nice (maybe some of the status codes or ETags are useful?), but throwing the whole nebulous REST framework in there without considering how well it matches the problem or how it adds to the complexity of the solution is not a good idea.


> Sub resources sure but I'm not talking about sub resources because sub resources are dead easy. This is more of a "oh we should also display resource X, Y and Z in these different spots".

The profile page is the resource (or a representation of the resource) identified by the URL (Uniform Resource Locator) used to access the profile page. This is true, pretty much by definition.

Whatever is designed as part of that page, and is also a resource, is a subresource.

> If you want to be really "RESTful", TYPICALLY (and I say typically because I think every developer has a different definition of REST, lol), your URLs only align to resources so joining resources means multiple calls.

URLs align to resources in that the fact that a URL is used to access something defines it as a resource. There is nothing in REST which defines resources as only the orthogonal entities in a data mode (e.g., the loose equivalent of entities in the base tables of a relational DB model.)

You certainly in many cases, for maximum flexibility, want your resources to include those kinds of things, but there is no reason -- at least none that has anything to do with REST -- for them to be limited to them.


> The profile page is the resource (or a representation of the resource) identified by the URL (Uniform Resource Locator) used to access the profile page. This is true, pretty much by definition. > Whatever is designed as part of that page, and is also a resource, is a subresource.

No that's not true at all. Your API design should not influence the user experience but the other way around and you're unlikely to change models should you have more optimal ways to presenting things.

On paper? Sure but I've never seen anything able to be split so nicely as you describe.


How do GET If-None-Match and PUT If-Match work? Do you assign an ETag that represents the current state of all those resources, so you can tell me if any have changed behind my back? Do your storages even give you the option of updating them all together atomically?


> Do you assign an ETag that represents the current state of all those resources, so you can tell me if any have changed behind my back?

That would be logical, yes.

> Do your storages even give you the option of updating them all together atomically?

Depends on your backend implementation. There's no reason a composite resource needs to support PUT at all, though (that's one of the reasons that you are likely to want the representation of the composite to include URLs for each component.)


I think we solved the common issues with REST for Schema (https://schema.io) in a way that makes it really nice for developing web apps. For example, to include related resources you can specify an `expand` field in a get request, and if you want to include unrelated resources you can do it with the `include` field.

There are probably good ways to solve most if not all of the problems people typically run into with REST APIs for web apps, but it could take a lot of experimentation to figure them out. It sure took us a while.


The problem with RPC style calls is you can't take advantage of "natural" server features like caching and such. You need to re-implement all this on top of both the client and the server.

I agree with your point about REST though, it's not even a standard. If it was there would be no debate about what REST is and what it isn't. It's a vague set of idea and its author himself kind of said his paper was targeted at "specialists" and not classical "developers".

People keep on telling me "read the spec", well there is no normative spec.


FYI, endpoints that could actually take advantage of caching (e.g. downloading a file, preview, or thumbnail) do support HTTP GET with ETags.


It seems like the only thing Dropbox doesn't have is the verbs.

On the other hand, I've never much cared about the "no true REST" crap that the conversation always seems to turn into. I'm too pragmatic to care if I'm adhering to someone's concept of a convention.


You understand REST.


I've heard the same thing from Philosophy majors though...


I don't think it matters that the Apple watch stands the test of time, the thing about tech is that you can't create "timeless" tech because it will become outdated in a couple of years. The watch will be replaced the the watch 2 so I don't think people are really thinking about this purchase being a long-term investment.


Are you guys interested in hiring new grads?


What are you talking about? I'm looking at their website right now and it does not say that at all: https://www.aa.com/i18n/footer/browserRequirements.jsp?ancho...



why should I care what this one author says? The academic consensus it that there is a gender pay gap.


Well, the truth is somewhere between the two of you. The academic consensus (at least among economists) says that there is a gender pay gap that they cannot account for other than because of discrimination, but that it is in the single-digits, contrary to activists' claims.


I would disagree. I think it can be rationalized, trends reflect the changing tastes of society - and the changing tastes of society reflect how society itself is changing. I think for a lot of art and fashion, the trends can be rationalized from anthropological, sociological, or psychological perspectives. For those ignorant about certain industries however, i'm sure trends can appear arbitrary. (and a lot of people try to follow what's fashionable without understanding why it's fashionable)

iOS 7 for example could have represented how our society has become sufficiently technologically savvy enough to not need the visual clues that comes with skeumorphism, e.g. people don't need the notes app to look like it's real-world counterpart for them to know that you take notes with the notes app. We as a society are so used to touch screens these days that we don't need skeumorphism anymore to remind us how things work.

Of course, there will never be a final design aesthetic as society and technology are constantly evolving. Yes, flat is just a trend, but it wasn't arbitrary.


> the trends can be rationalized from anthropological, sociological, or psychological perspectives

I'm not an inherent skeptic of the worth of the soft humanities, but it's pretty far fetched to claim that these fields can offer anything like a unified or even non-contentious view on design elements, or anything else for that matter. If anything, the virtue of these fields is based on the multiplicity of interpretation they offer. They ain't Newtonian physics, that's for sure.


No, the idea is that there are reasons for trends that have to do with people, culture and society. The fact that trends are a product of our very complex society means that the explanations for these trends can be studied from an academic perspective. Aesthetic trends aren't created by programmers, that's for sure.


I don't understand the connection made here, because calculating the quantum state is NP-hard and is very time consuming, the object cannot exist in the universe? How is that preventing the macroscopic system from existing? How does the complexity class have anything to do with the real world?

For example, a shortest path problem in the real world does not have any use for complexity theory: http://www.johnmurray.io/log/2012/07/10/Real-World-Shortest-...


I don't understand hacker news' dislike of politics... do most programmers not find it exciting?


Actually, I'd say that HN has too much politics. Almost every week or every other week someone brings up Basic Income (for the 500th time) and that spawns a 500-comment thread. Personally, I'd prefer it if Hacker News stayed purely technical (there are other forums where people can bash each other over politics all they want).


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: