News for hackers. Stuff that matters.

bensochar

Re:Tailwind UI on Wednesday February 26, 2020 @03:28PM (#22426960)
For alerts a sharable template is doable. So maybe a bad example, LOL.

But for buttons & heros not so much. I've worked with apps that have a "button" template. I find it overkill.

For one project we have some components rendered both server-side & with Vue.

Other cases I've had are sharing styles across multiple apps and pulling in markup from a 3rd party, like Stripe or a WYSIWYG.

But you're right. Ideally this wouldn't be an issue w/ view templates.

Re:Tailwind UI on Wednesday February 26, 2020 @01:49PM (#22425908)
Its like George Costanza says about sex & parking.

Why should I pay for a Tailwind hero when, if I apply myself, I can get a Bootstrap hero for free?

https://tailwindui.com/components/marketing/sections/heroes https://getbootstrap.com/docs/4.4/components/jumbotron/

Re:Tailwind UI on Wednesday February 26, 2020 @01:47PM (#22425886)
To me this is solving Tailwind's biggest issue: consistency & context.

Comparing it to Bootstrap or Foundation adding the class `alert alert-danger` to a div tells my coworkers that it's an "alert" & it will look like an alert everywhere. If I want to change how alerts look, I change the CSS

With Tailwind you'd have `bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative`. Then I'd have to change my HTML everywhere to update the appearance of alerts & its not always obvious that I'm looking at an "alert" in code. I'd end up with different looking alerts, cards, buttons, etc all over my app

Re:Tailwind UI on Wednesday February 26, 2020 @01:33PM (#22425771)
Another reason Bootstrap > Tailwind is consistency & context. Adding the class `alert alert-danger` to a div tells my coworkers that it's an "alert" & it will look like an alert everywhere. If I want to change how alerts look, I change the CSS

With Tailwind you'd have `bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative`. Then I'd have to change my HTML everywhere to update the appearance of alerts & its not always obvious that I'm looking at an alert in code.

>TEMPORARY, I HOPE HOPE HOPE

https://github.com/chrislgarry/Apollo-11/blob/master/Luminar...

...it was not temporary

Re:Fight back against Google AMP (2018) on Wednesday December 04, 2019 @12:50PM (#21704724)
CDN helps with the page load/latency variable of Google' PageRank but won't equal AMP.

To get AMP-like speed you'd need: CDN, no render-blocking javascript, minimized image files, "lazy-loaded" assets & inlined CSS for "Above the Fold" content. On the server side you want to cache content with something like Varnish & send it over an "Edge" network like Akamai or Fastly. Ideally everything is served over HTTP2 or SPDY.

Doing all that replicates what AMP does.

Re:Pizza robot makes 300 pizzas per hour on Tuesday October 01, 2019 @02:27PM (#21128910)
>There are a few details that may save Picnic’s pizzas from tasting as if a robot made them. For starters, the dough preparation, sauce making and baking — the real art of pizza — is left in the capable, five-fingered hands of people.

The dough making & stretching is still done by humans.

It looks like this robot distributes sauce, cheese & toppings (it only shows one topping, though). Then cooks it.

One of the books I still reread. Its not so much about "abstract thinking" but its very good at teaching you to find the real problem & make a decisions. https://www.amazon.com/Thinkers-Toolkit-Powerful-Techniques-...