Live data from Hacker News

There's never been a better time to build websites

simeongriggs.dev

51–60 of 337 posts

Re: There's never been a better time to build websites

#51

Earlier quoted context omitted.

> just wrote actual SQL in files with .sql at the end and load them at run-time I like this idea, but I'm interested to learn how you are handling dynamic queries -- e.g., when you want to change the order-by field? You can use CASE in some situations, but it has limitations. Another option is to construct the dynamic query in SQL rather than in your outside-the-db application code. Just curious how you approached an…

Sorry if reply is shorter than I would like due to hand, but the dynamic aspects I have encountered have been solved by case when as mentioned, boolean expressions on parameters (where $1 is true or id = $2), or in the worst cast just not caring about DRY in this scenario. Also I use json_agg etc for ORM-like mapping to arrays and objects. I do some other tricks too like bypassing a bunch of redundant and slow parsin…

Thanks for writing what you have. These all sound like reasonable approaches. Just to add some extra options/thoughts because I’ve been thinking about this lately, for cases where CASE doesn’t work well on order by, you can use dynamic queries to construct the final query in SQL. Another option might be to include a splash of templating to your .sql files, and parse them at run time, or use them to generate the final .sql files beforehand so that they can be tested directly via something like pgtap (repeat yourself via templates instead of by hand). The main reason I like the sound of including the queries in separate .sql files is precisely so that they can be easily and directly included in tests. The downside is the query isn’t included next to the code that uses it, so a little hunting needs to be done to find it (always tradeoffs!).

Re: There's never been a better time to build websites

#52
post #27

Earlier quoted context omitted.

Is that not something you can learn by picking up any number of good books in the area in much less time? I am just getting into TypeScript programming, and I am really having fun. I learnt about the details of how Javascript works, and it is quite cool to have a static layer over a dynamic one. For learning JavaScript, I like "The Good Parts" and the "You don't know JS" series. It took me a while to learn how to cre…

> Is that not something you can learn by picking up any number of good books in the area in much less time? I'm shocked that you believe this. Work at a moderate or higher sized tech company. The juniors, mid levels and seniors all make the same mistakes and slowly grow out of making them. If it were the case that everyone could stop making the same mistakes and choosing the wrong abstractions simply by reading a boo…

> you grow into someone with more experience who stops making them.

or at least fewer, and sometimes more complicated mistakes.

Re: There's never been a better time to build websites

#54
post #9

sanity.io sounds and looks awesome! I didn't know about it until now. I'm wondering if Sanity would be a good fit for creating static websites for other non-technical people but still give those people the power to update the content themselves. I've been trying to acomplish that with Airtable but I quickly ran into annoying limitations. For example, I'd like to create a gallery website for my artist brother (somethi…

Yes, it's actually the main use case for these "headless" CMS systems like Sanity, Contentful, Strapi, etc. Even Wordpress can be used as an editor only with content pulled via API into some other system or build process so that the website/frontend is completely separated from the content.

Search for "headless cms" and you'll find countless articles about this.

Re: There's never been a better time to build websites

#56
post #27

Earlier quoted context omitted.

Is that not something you can learn by picking up any number of good books in the area in much less time? I am just getting into TypeScript programming, and I am really having fun. I learnt about the details of how Javascript works, and it is quite cool to have a static layer over a dynamic one. For learning JavaScript, I like "The Good Parts" and the "You don't know JS" series. It took me a while to learn how to cre…

> Is that not something you can learn by picking up any number of good books in the area in much less time? I'm shocked that you believe this. Work at a moderate or higher sized tech company. The juniors, mid levels and seniors all make the same mistakes and slowly grow out of making them. If it were the case that everyone could stop making the same mistakes and choosing the wrong abstractions simply by reading a boo…

Of course you need experience as an engineer. But knowing which Javascript libraries to pick is the easy part. I was not saying that you don't need experience, but you don't need much Javascript / Typescript experience. This can be done in a few months.

Re: There's never been a better time to build websites

#57
I expected the section titled 'CSS is a solved problem' to talk about modern CSS features like CSS Grid and variables. Instead, the article declares the popular framework Tailwind CSS to be the 'solved' solution.

CSS will never be nice (tolerable at best), but modern CSS makes it much easier to create layouts in modern browsers - rather than having to rely on horrible CSS layout hacks from the past.

In short, CSS is not 'solved', but modern CSS is more powerful and capable than it has ever been. If you want to take advantage of it, you simply need to put aside some time to learn it.

Re: There's never been a better time to build websites

#58

Earlier quoted context omitted.

Is that not something you can learn by picking up any number of good books in the area in much less time? I am just getting into TypeScript programming, and I am really having fun. I learnt about the details of how Javascript works, and it is quite cool to have a static layer over a dynamic one. For learning JavaScript, I like "The Good Parts" and the "You don't know JS" series. It took me a while to learn how to cre…

Not really. You can't replicate experience. Everything you just wrote about with data types, invariants, and decorators is just flavor which you only have control over in your own personal code however as soon as you interact with web browser APIs, nodejs, and 3rd party libraries all that goes out the window and you end up conforming to other people's patterns. In my honest opinion Typescript is a fad. You're still j…

Web browser API's usually do keep their invariants. I wouldn't use libraries which don't. Libraries which do not support TypeScript will vanish. See, all your experience (in a limited field) is telling you the wrong thing.

And it is quite obvious to me that you need to know BOTH TypeScript and Javascript, of course, you cannot just learn TypeScript, because it is just a thin layer on top of Javascript without many runtime guarantees otherwise.

Re: There's never been a better time to build websites

#59
I started "developing" websites with my AOL account around 1995. I registered my first domain 1996.

Now that most of the "web standards wars" have been fought and most of the new kids not even heard about Blue Beanie Day[1], to this day my best advice for single (!) amateurish developers is: a website is, what a browser interprets as such. Simply put or hack in your code and enjoy.

There is no right or wrong, only creative geniuses who put a lot of creative thinking into how to design browsers. Kudos to Zeldman for inspiring me. And kudos to all the people who simply hack in code and do not care about conventions.

[1] https://en.wikipedia.org/wiki/Blue_Beanie_Day

Re: There's never been a better time to build websites

#60

I'm also developing for 25 years, I also really really like websites and coding, but not for the reasons the OP sums up. For me, it's not about all kinds of solved or unsolved technical questions. Today is a very good time to build websites, because a good website is the only way to push back to Big Tech and it's practices. Your website can be build on techniques invented in a time where the dream of the internet was…

> Oh, and RSS is not dead. Not at all (thanks WordPress, for putting a feed on every instance). RSS is the only workable way to make the web social again.

What we need, IMO, is more experimental protocols to enrich the web, which maverick developers can use to good effect, the same way we did originally with RSS. More browsers forking Chromium or Servo to add support for these new features. Hell, maybe even something that doesn't resemble the Web at all. David didn't beat Goliath and nor did Heracles beat the Hydra by using 'the same old weapon but better'. The only thing that wins is a paradigm shift.

Post reply on HN