Live data from Hacker News

You can serve static data over HTTP

ignore.pl

111–120 of 127 posts

Re: You can serve static data over HTTP

#112
post #80

Earlier quoted context omitted.

To be fair, I would also say the mainstream IDEs have contributed to this situation to a certain extent, since they lower barrier of entry. That's a very good thing, but also sometimes bad. Here's what I mean. There's a difference between: * Using an IDE knowing what you want to do but you just like the convenience. You know what the IDE is doing for you, but you want your tool to do it for you quickly and get out of…

> I understand this is an inevitable consequence of lowering the barrier of entry and making programming more accessible, and it doesn't matter if we're talking about npm, IDEs, programming languages, or anything. Pretty much this. Anybody new to the field will be using an IDE, it's extremely unlikely that someone new will be using vim/emacs. So IDE users will be a mix of newbies and experienced people, but since the…

> I wouldn't attempt to pre-judge anyone's ability based on if they use an IDE or not.

Neither would I, but I will certainly judge them as lacking if they can't write a nontrivial program without using code completion or looking things up on SO/Github/etc.

Re: You can serve static data over HTTP

#113

Not from a modern developer. You need to jump down the rabbit hole of the history of solid and proven solutions. Indeed. I've noticed an increasing number of people who call themselves "developers" and appear to create software, but all they can do is follow step-by-step tutorials to glue together some massively bloated thing that they have absolutely no understanding of, much less the skills to debug it when somethi…

You might not want them in your team maybe, but isn’t it really cool we reached a state where you can actually do this? Democratization of software engineering is a great good!

Is it a great good if it reduces the quality of what our industry produces?

Re: You can serve static data over HTTP

#114
post #97

Earlier quoted context omitted.

Cargo cult programming is a starting point. Plenty of people won't go any further, but when what you're putting together is all source code, it's mostly transparent boxes you're putting together. You can look inside and see the secrets whenever you want, if you ever want. Sure, maybe there's some design principles to share that aren't obvious. But it's hard to share and teach those before someone has experience with…

I'd say it's more the opposite. What characterizes cargo cult development is having too many principles and rules, rather than lacking them, they're rules without any real understanding of why they exist and what they're for or when they're applicable. As long as you adhere to the strictures, good code emerges somehow. The way to bring a cargo cult developer into the light typically involves debunking or contextualiz…

Maybe you and I have a different definition of cargo cult developers than I do. I'm thinking cut and paste from stack overflow (or now chatGPT) without much understanding or consistency.

Knowing how to apply design principles and rules despite not fully understanding them is a different level, in my mind.

Re: You can serve static data over HTTP

#115
post #80

Earlier quoted context omitted.

> I understand this is an inevitable consequence of lowering the barrier of entry and making programming more accessible, and it doesn't matter if we're talking about npm, IDEs, programming languages, or anything. Pretty much this. Anybody new to the field will be using an IDE, it's extremely unlikely that someone new will be using vim/emacs. So IDE users will be a mix of newbies and experienced people, but since the…

> I wouldn't attempt to pre-judge anyone's ability based on if they use an IDE or not. Neither would I, but I will certainly judge them as lacking if they can't write a nontrivial program without using code completion or looking things up on SO/Github/etc.

> without using code completion or looking things up on SO/Github/etc.

Does this arbitrary bar extend to language and library documentation as well?

Re: You can serve static data over HTTP

#116

Not from a modern developer. You need to jump down the rabbit hole of the history of solid and proven solutions. Indeed. I've noticed an increasing number of people who call themselves "developers" and appear to create software, but all they can do is follow step-by-step tutorials to glue together some massively bloated thing that they have absolutely no understanding of, much less the skills to debug it when somethi…

You might not want them in your team maybe, but isn’t it really cool we reached a state where you can actually do this? Democratization of software engineering is a great good!

[deleted]

Re: You can serve static data over HTTP

#117

There is https://github.com/typicode/json-server that is really useful for that matter

For a 'fake' API, I can't overstate just how powerful this is.

I once spent an entire month building a proper API server out of this. Then one day while tweaking some DTOs for some POST endpoints, I realised what I was doing and switched to Postgres.

Re: You can serve static data over HTTP

#118

Earlier quoted context omitted.

> I wouldn't attempt to pre-judge anyone's ability based on if they use an IDE or not. Neither would I, but I will certainly judge them as lacking if they can't write a nontrivial program without using code completion or looking things up on SO/Github/etc.

> without using code completion or looking things up on SO/Github/etc. Does this arbitrary bar extend to language and library documentation as well?

Of course not, and the bar isn't arbitrary. That you ask this tells me that I was insufficiently clear as to my stance. My stance is that programmers should understand how to write programs, not just copy/paste them together.

Re: You can serve static data over HTTP

#119

KISS is good... until it isn't. At my work I struggle with the opposite: all problems are being squeezed into "let's put it into static JSON on the CDN" - which ends up with a complex custom JSON based language (schema) to support sharing information between apps, subsetting information (ie. search) etc - ie. implementing an ad-hoc one-file database. Ahh... and don't forget about complex CI/CD pipelines and Git setup…

The situation at your workplace isn't KISS. It's the opposite.

The fuller version of KISS is "keep it as simple as possible, but no simpler".

Re: You can serve static data over HTTP

#120
post #48
post #5

Rails, by default, will put a “.json” suffix on json routes. This is so supremely useful if you have a Rails api app, speaking to some over complicated front end that might need a quick and dirty mock for something. Just serve your /api/thing.json from somewhere. Only issue is with HTTP verbs other than GET, but usually at that point I need a lot more than this 15second mock. Good for testing little things though.

This also lends itself to easy caching with a versioning key and proxy servers, just like with static files. …I guess that was kind of the point of REST in the first place but it’s easy to forget. REST has a wonderful simplicity to it. I’m yet to hear about an equivalent caching solution for GrqphQL APIs for example.

Let me tell you about hypermedia controls and discuss simplicity then? CRUD data API’s are simple, until some level of complexity.
Post reply on HN