Live data from Hacker News

The ideal tech stack for a personal developer blog in 2020

vriad.com

241–250 of 275 posts

Re: The ideal tech stack for a personal developer blog in 2020

#241

Earlier quoted context omitted.

Web browsers are terrible plain text readers. Especially mobile browsers. The problems are manifold. If your plain text document has line breaks to enforce some column width it will rarely match a browser's viewport width. This means the browser will break lines to fit in the viewport but still respect line breaks. So you get lines broken by the viewport and then line breaks a few words later. The text does not flow…

No one is going to read your blog with netcat or just curl into a pager. Idk, maybe we should revive the world of information served raw over TCP or telnet. HTTP is out of control.

In what way do you think HTTP is out of control?

Before you reply please keep in mind JavaScript web apps don't have anything to do with HTTP.

Re: The ideal tech stack for a personal developer blog in 2020

#242

"I literally have zero memory of how we used to build forms in the pre-React times" Don't mean to pick on the author, but these sorts of comments scare the shit out of me. React is fine for what it was originally billed as (a library for building UI components), but the way people use it to take over the entire web stack is bananas. Definitely not needed for a static blog, LOL. P.S. Use LitElement anyway, not React.…

The meme about Web Components being the future is older than React at this point.

I was/am pro web components but the likelihood of it "being the future" seems extremely grim. No one's happy about front end tooling, but for the moment it still beats the alternatives. Shadow dom is hellish to work with at scale - I think what a lot of the critics may miss is that much of the "why" of modern front-end is that it scales with team size.

Re: The ideal tech stack for a personal developer blog in 2020

#243

I recommended this on another HN post a few weeks ago: use Emvi [1] to write your blog articles and access them on your personal page on a server you control through the API to display them. You can store the HTML and attached files to serve it statically and update it from time to time. Should you decide to abandon Emvi you still have everything in place. I did this for a gaming community wiki (sort of, I don't stor…

Any how-to’s that explain a little more how one might accomplish this with emvi? Eg using it at a front end/cms for a blog?

Re: The ideal tech stack for a personal developer blog in 2020

#244
Here's mine; I'm pretty proud of it. It's JavaScript but the only meaningful dependencies are Express (basic HTTP server) and a markdown parser. It's basically a hand-rolled static site generator + a static file server. Both of those are trivial to do with JS/Node. I over-engineered the static file serving a little bit in hopes of keeping files cached in memory, but that bit can easily be replaced with Express' built-in static file serving middleware.

https://github.com/brundonsmith/website

Re: The ideal tech stack for a personal developer blog in 2020

#245

Earlier quoted context omitted.

> I literally have zero memory of how we used to build forms in the pre-React times. This is honestly quite a disturbing trend with a lot of front-end developers these days. I recently asked a front-end dev why they chose React for a simple app over simple server-side templating, he's reaction was "we don't need SEO, so why do we need React SSR", like how does that argument even make sense. They seem to have forgotte…

> I recently asked a front-end dev why they chose React for a simple app over simple server-side templating I don't really get this argument. What makes "simple server-side templating" better than React components? I'd argue that these React components effectively are templates. If someone is proficient in React, why are we suggesting they have to learn some other random templating language? Not to mention deal with…

The point was that they choose React by default instead of thinking about other tools which might be better suited. There was no reason to make this an SPA, they didn’t even consider not using React.

I agree about learning new things, but this isn’t a new language or syntax. At best you spend 10 minutes at the documentation and you know everything you need to know.

Re: The ideal tech stack for a personal developer blog in 2020

#246

Earlier quoted context omitted.

> I recently asked a front-end dev why they chose React for a simple app over simple server-side templating I don't really get this argument. What makes "simple server-side templating" better than React components? I'd argue that these React components effectively are templates. If someone is proficient in React, why are we suggesting they have to learn some other random templating language? Not to mention deal with…

If the argument is "what makes ERB / JST / some other templating language better than React for server-side rendering" then sure, there's not really much difference. What I suspect was the intent of the original question was "why does a simple app need to be an SPA with an API on the backend", which I do feel is something that adds significant complexity to any project. It's sometimes worth it, but I'll never be conv…

Complexity is one thing, but more importantly is choosing the right tools for the job. There definitely are cases where you want SPA + API, but this wasn’t one of them.

Re: The ideal tech stack for a personal developer blog in 2020

#247

The tech stack for my personal blog is a It's really just a (bad) static site generator, it's just that every static site generator I've run into so far was way more complicated than I need and so it was faster to write my own with only the three features I want than to learn a big complicated tool. I guess I have mixed feelings here. It makes sense to invest time in a complicated setup for a personal website as a ho…

Thanks for the measured response here. I address the fact that the site, as it currently exists, doesn't need any of this currently. I tried to be clear in my "criteria list" that I'm designing for power and flexibility; I don't want to limit myself down the road. I definitely could have verbalized my stance on headless CMSs better. I'm very aware that there are ways to use them without requiring two round trips. But…

I think I misunderstood your comment about markdown and react together, I didn't get that you were referring to nesting them two levels deep like that. It makes more sense that that's a pain - for what it's worth, in my non-web content authoring I do a lot of embedding LaTeX in markdown and it can become a bit of a mess.

The boundary between a 'headless cms' and a 'static site generator' can get somewhat fuzzy. The approach that I usually take here, when it's less of a hobby project, is to use a full-featured-editor-included CMS and then aggressively cache the pages so that behavior is just delivery of static files in the 99% case. This is an extremely common pattern with WordPress, for example---I would never call WordPress a paragon of performance but it is quite fast with the commonly used caching plugin that essentially reverts it to a static site generator for common cases. It's even better to do the caching in a web server or other in-between layer which is generally going to be faster at shuffling files than whatever language your CMS is in.

When it comes to simpler options with TS, I would just write what you need in bare TS. That gets you the advantage of typing without the weight of a framework. It does make it more difficult (though of course not impossible) to rely on framework components but I don't feel that really need them in your use-case.

Finally, totally with you on relying on the file system as a CMS. In my case I actually use the file name verbatim as the post title, one of those things that seemed too simple to work up front but is actually basically fine. The only constraint is that "titles" (e.g. file names) must start with the date because I just sort them to order posts - this is all so that posts can just be plaintext files (or markdown files, but I stick to plaintext as a stylistic decision) without needing to be parsed for any kind of header metadata or something. It is a limitation but I'm pretty happy with it a self-imposed one.

I also, to be fair, have a bit of a negative gut reaction to React in this kind of situation. In my line of works (operations or, to be more fashionable, DevOps), I have had more encounters than I can easily count with "react apps that should be static files" and are significantly more complex to deploy and maintain than they ought to be as a result. There's nothing like fighting with the TypeScript compiler in the build chain for, well, a static file. I'd be less harsh on this if I hadn't also experienced so many cases of developers shrugging when it ends up doing something undesirable, because they don't even understand the React part of it all well.

I'm not really convinced that it can deliver faster development but I'm also not unconvinced. I am pretty convinced that it ends up adding significant complexity that can really bite you when you encounter what ought to be trivial problems, and there's such a large push towards "batteries included" frameworks in JS, combined with the very fast turnover in popular frameworks, that it seems excessively common for developers to be building on top of a framework that they don't really understand well (because they just learned it and it does a lot under the hood) and that just has rough edges to deal with (because it's relatively new). It's enough to make you a little bitter after growing up on Python and, of all things, PHP, where frameworks and libraries tend to stick around for a long time, most developers have longer background with the language and framework, and the build-test-deploy toolchains are generally simpler. Not necessarily easier to use, but simpler---these two do not necessarily come along with each other, see 'create-react-app' and its 'eject'... a solution that is easy to use but so complex that it has a tendency to explode when you look askance at it.

Re: The ideal tech stack for a personal developer blog in 2020

#248

I would amend this blog post's title to be the following: "The ideal tech stack for a personal developer blog in 2020 where the author is a React front end developer who loves TypeScript"

That page of just text is a 1Mb download... Is this what the web has become now? Do we really need 1Mb of boilerplate for 10Kb of text?

This is what happens when you tell new developers php isn't cool anymore.

Re: The ideal tech stack for a personal developer blog in 2020

#249

Earlier quoted context omitted.

This is so ridiculous coming from someone that did front end during the pre SPA days. I don’t event know where to start here . It’s a blog, not a complicated backend solution requiring a stack like this. Just throw in something simple to get the posts from the database and update the dates and you’re done . It’s over engineered and symptomatic of major issues in the front end community.

Having a database for a personal blog seems like overkill.

It allows you to do fun things like save comments, post polls, create news items to load on certain days.

Being able to save anything and retrieve can be useful.

Re: The ideal tech stack for a personal developer blog in 2020

#250

Earlier quoted context omitted.

If I was commissioned to make someone a blog site , quite frankly I would just install Wordpress and call it a day.

You'd be missing out, tbh. Going down the JAM stack route provides a number of opportunities to improve on many of technical aspects common to the development of a CMS backed website. For a start, you'll miss out on opportunities cheaper hosting with 'serverless' deployment. But I think the chance to decouple the frontend from the backend is valuable enough, fwiw.

Ironically serverless is move expensive. For a dollar month you can get wordpress hosting.
Post reply on HN