Snapchat do certificate pinning for it's main API domain. I am not exactly sure why analytics domain are different and why not have certificate pinning. (I thought analytics go through the same API domain, but it must be wrong then).
I have a deep admiration for Steve Jobs and the revolutionary impact Apple had on the computing world. They truly had the potential to push the boundaries of innovation even further. However, it's disappointing to see how they have clamped down on innovation under the guise of security. By turning against hackers, who were once their allies, they have stifled the very spirit of creativity and exploration that once defined them.
In contrast, I'm grateful for my Android phone. Despite its own set of issues, it still allows me the freedom to root it and truly own my device. This openness fosters a community of innovation and experimentation, something that Apple seems to have moved away from. It's a reminder that while security is important, it shouldn't come at the cost of stifling innovation and user freedom.
I really was hoping that tailwind was a fad which died but like everything JavaScript it's here to stay sadly
I recently found myself staring at a button element with more classes than I have ever seen like <button class="bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-md shadow-md">Click me!</button>.
It’s like the eccentric artist who insists on using every color in the palette. After been forced to use it for almost 2 years I still don't see the point. Your HTML files? Bloated. Your sanity? Questionable. And those cryptic class names? Why God did we have to do this.
The point is that it’s ridiculously fast to build and extremely easy to maintain. It’s also not hard to read after, idk, a week of working in it? The only people I’ve seen struggle beyond that are people who dug in their heels and dogmatically decided to struggle with it.
FWIW for a Button, your engineer should just encapsulate all the “ridiculous” styling into a <Button /> element.
I strongly disagree on the maintainability. Mistakes are easy to make and have been made when comparing a list of 20 class names across a dozen elements. Its only "maintainable" if you ignore the class list when reading. I review my local evangelists' tailwind code and from their mistakes its clear they're not reading the class list.
It reminds me of how some people claim they're great at multitasking and can text & drive with no issues - meanwhile not even being aware of what they're missing.
Tailwind has its uses, but it should not be the default choice.
I’ve experienced the exact same thing. Most TW evangelists I know are admittedly not that great at CSS. Those who are generally prefer a library like MUI instead, which offers the same maintainability benefits, a far more consistent UI, but with a higher learning curve.
That's what I like about tailwindcss - unlike MUI and co, it lets you follow sane design rules laid by tailwind and yet make the website look different from the rest.
Consistency of UI entirely depends on the user of tailwind.
As an end user (not developer) I'd take just about any design system over MUI. It's so clunky/heavy, has an abundance of useless white space, and just feels really outdated.
I'd love to love MUI, but in my experience: MUI + React + Typescript just moves the toil of doing anything away from the style concerns and makes it a purely Typescript puzzle.
Strongly disagree, Tailwind should be a first choice for anyone reaching for their first utility/css framework. Tailwind imposes a very minimally opinionated styling system, that can easily be broken out of when a developer needs to.
> FWIW for a Button, your engineer should just encapsulate all the “ridiculous” styling into a <Button /> element.
Sure thing.
What I don't understand though is why not put a Button.css file next to the Button element file, and describe all the button styles in there. What's so hard about building or maintaining that?
Soon after, you're going to need slightly adjust that button, you will add some helper classes. Then there will be a case when base style of that button doesn't work with new button style, and now you have 2 bases for a button. You might have semantically named those buttons, but 3 months later that no longer makes sense, and now you're afraid to rename it.
Tailwind lets you style elements in the same file as the element, you don't have to switch between `button.<whatever you use>` and `button.css` to know what is going on.
> Soon after, you're going to need slightly adjust that button
The proper thing to do, in my mind, is to gradually set up a collection of such buttons (and other components), and document their properties. A design system, if you will. You shouldn't have that many button variations.
This should also help with the "3 months later" case. Once you've catalogued your buttons, you can reason about them, update their styles, rename them as you please, and so on, while maintaining consistency of buttons across your site.
You lost me at ‘maintain’. It’s definitely not easier than just updating a single .button class, and I’m not going to create reusable components out of everything in my project, the <Button /> approach doesn’t work for everything.
You’re assuming I’m going to create a component out of any element on the page that needs styling. In my project I could just have a small handful of these scattered across hundreds of files:
<table class=“datatable”>
If I used tailwind utility classes, how do I update my data table styling without having to search and replace across all of my files? Assuming you could even search and replace, the utility classes could be in a different order. Not saying it’s not doable, but it seems like a real pain in the ass. What am I missing?
Open the browser tools, select the element, view the styles and look what class cause the problem. Nothing else would you do, if you had a problem in styles css file.
Then I’m failing to see why it’s “bad” other than the verbosity/visual noise, which does in fact go away if you hide it (this is the point of abstraction in general, of course)
It's adequate for some folks who work in the same codebase, and define their own style of work. It's been a real pain for me who comes in to various codebases for short periods of time and have to read/digest/learn every single project's unique take on buttons.
class="btn btn-primary" is also pretty easy to read. But in the last couple weeks I've have to deal with both class="bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-md shadow-md" style buttons and <LinkButton4 /> and <LinkButton7 /> components, both of which still seemed to be affected by another wrapping container that decided to "text-xs" everything below it, but which wasn't obvious. Trying to simply add a 'button' that had the same styles around it was far more work than it should have been.
No doubt, I'm somehow in a minority of switching between projects/codebases more often than other people. But this was much less of a problem with bootstrap and related definitions.
> your engineer should just encapsulate all the “ridiculous” styling into a <Button /> element.
When you want, say, most things to share some common color/style definitions, you will still end up repeating a lot of stuff (same long string for buttons, and for headers, etc). The tailwind system gives you the option of @apply, but the tw docs are also relatively strongly against it, for ... I can't really understand the reason why.
> If you’re going to use @apply, use it for very small, highly reusable things like buttons and form controls — and even then only if you’re not using a framework like React where a component would be a better choice.
There's some reasons listed on that page justifying "don't use @apply!" but... they don't ring all that useful to me. They do say "well, you could do it for reusable things like buttons", but those are the very things that most tailwind examples use longhand examples for.
> Yes, HTML templates littered with Tailwind classes are kind of ugly. Making changes in a project that has tons of custom CSS is worse.
There's a balance between the 'ugly' (their words) and 'tons of custom css'. Everyone's balance is different, I get it, but I'm usually having to come in after someone who was jazzed about tailwind has moved on and left me the 'ugly' (their words) mess. If every link should have "text-dark font-bold font-xs"... @apply that with an understandable name. Or document your design decisions...? But that conflicts with "ridiculously fast to build". Documenting them in an '@apply' way would let me see how you want some styles grouped together without having to scan through dozens of your components looking for a pattern.
> without having to scan through dozens of your components looking for a pattern
Wouldn't you have to scan disparately located CSS files anyway? How many projects have you seen with nonsensical or clobbered classnames or conflicting rules?
Really for a lot of designs I think you can just eyeball it. If `px-4` looks about right, then use it. Otherwise you can find a similar component and hijack the exact padding if you want, or get it from the design.
You probably think @apply makes more sense because you know and like traditional CSS. You want to apply tailwind classes and condense them into a single reusable one. Tailwind asks you to think in a different way. The classes are aptly named (mostly) and granular (one class per css directive), so my knowledge of CSS felt very transferable.
<LinkButton4 />
Imo should be
<LinkButton variant={"homepage"} />
Leveraging something like Class Variance Authority or more simply:
Again, at least part of the core issues I have is coming in to other projects where each person thinks in a 'different way'. And almost all of them are simply copy/pasting loads of tailwind extended strings of stuff, then semi randomly tweaking until something looks 'ok', then moving on.
> scan disparately located CSS files anyway
usually, I encounter CSS in one of two ways:
1. a main base css file or set of files (from a framework, maybe), and then an override css file. Single override file can get hairy to look through, admittedly, but it's typically in one spot. I rarely come across projects with dozens of standalone css files.
2. 'style-in-components' - primarily in vue, because vue sfc encourages scoped styling - structure, code, style in a single file. Whether that's bootstrap styling ('btn btn-primary', etc) or tailwind doesn't make too much of a difference.
Where I've hit more maintenance issues is coming in to projects with tailwind in say, react or vue - with the 'style in components' - is that "text-xs px-1 rounded-sm bg-gray-200 inline-block text-gray-600 mb-1" repeated across multiple components, is harder to find when I want to replicate something vs just "class='tooltip'"
Of course, we're all doing it wrong, and if we all just 'think different' all the time, and spend loads of time rewriting "wrong" stuff from other people - things will be just fine. But the world I live in, and the world I see a lot of people in - is not greenfield, but brownfield, and we have to live with the decisions others made. Tailwind does not make my life any easier that way, and generally introduces more cognitive overhead earlier in a project when it comes to visual stuff.
Every time something with tailwind is posted there is always a rehash of this response. I believe most of this frustration comes from using tailwind in the raw. There are a few essential libraries available that amplify the power of tailwind by magnitudes: tailwind-merge for last-specified wins, and class-variance-authority to reduce your class declarations in coherent reusable variants.
Tailwind empowers the expressiveness of styling. I steadfastly counter that the statement that it is the eccentric artist who insists on using every color in the palette. By design, tailwind implements constraints on what can be utilized by it's configuration file. Sure, you can absolutely break out with arbitrary classes but the spirit is akin to a Crayola box of 64 crayons and you have to work with what you have in front of you.
The largest benefit is that I can read my JSX/HTML and understand the presentation of the elements. Nothing is cryptic. I don't have to dive into another file where I can lose cognitive load. DX is enhanced. Critically stated: tailwind has been nothing but a massive boon for web dev since its inception.
Your last argument is a perfect reason why tailwind isn't a fad. Its a standard where, if you've worked with it, you know exactly what these classes will do.
Saying "the classlist becomes long" is not an argument to avoid using tailwind, especially if you already have a component based framework. I'd rather read a tailwind classlist than having to spend time setting up my own half-arsed class list.
Yes, CSS variables. Defining a preset of variables on :root for sizes and color ranges goes a long way.
The design philosophies behind Tailwind are sound, but like so many I dislike the technical implementation. I feel like there is a lot of halo effect happening with Tailwind where judgement of technical merits is influenced by judgement on visual merits.
You may use CDN build of UnoCSS (16k GH stars) https://unocss.dev/integrations/runtime which generates styles on the fly for 80% of benefits with 0% build steps (even with regular HTML)
It does have quirks compared to build variant, so if you use a framework, using it in a build step may be better, it'll still be much lighter then tailwind
They’re as cryptic as ls, cat, pwd. They have well defined semantics, sensible default, and tooling that can warn if your properties are conflicting.
In fact, with regular css you need to target elements by coming up with arbitrary class names, like .banner-main-content. Those are more cryptic imo, and completely arbitrary. (Naming things is problem #2, remember)
Do I wish there was a better way than space-separated attrs inside the human hostile xml-like format that is html? Yes. Do I want to go back to having to write custom selectors? No. 80-95% of the time utility classes is a better fit, especially with component based frameworks.
Have you used MUI before? No need for utility classes, no need for writing custom selectors, everything ties back to the theme, and everything is consistent. I don’t believe that “80-95% of the time utility classes are better” when super popular alternatives like MUI exist.
Tailwind introduces some solutions while introducing other problems. It has its place when used correctly, but I’ve never seen a single TW codebase implemented properly.
I’ve been writing CSS for 25 years and have gone through just about everything at this point—inline/attribute styles, CSS, SCSS/SASS, LESS, stylus, Bourbon, Tailwind, Bootstrap, Ant, Semantic UI, MUI, etc. And tbh, MUI is the closest I think we’ve gotten towards rapid iteration while solving specificity issues, the problem of selector generation, proper a11y and state styling (e.g. button focus styling), and inconsistency issues, but again—only when architectured correctly.
No, React-specific? Keep in mind Tailwind is not bound to a specific component engine and works fantastic in e.g. Svelte which I'm using.
That said, it looks good I guess? But I fail to see what's so unique. Tailwind is just a lower level preprocessor that can be used with unstyled components (which is definitely not unique - there's lots of traction outside the React ecosystem as well..) From what I can see, it looks like MUI also has a utility class type of approach, or is it baseUI?
In either case, my point is that plain CSS with class selectors is not great, and that very often it makes more sense to bundle markup and styles. Well-thought-out interactions between the component- and style/theming systems is also an important part, and Tailwind clearly plays well with different component systems in the ecosystem. Other than that I don't have any interest in dying on some Tailwind-specific hill. I'm happy to see it improve or be superseded, should that be necessary.
> Tailwind [...] has its place when used correctly, but I’ve never seen a single TW codebase implemented properly.
Yes but ironically that's not necessarily a bad thing. That's the expected result of tech that is flexible enough to let you do what you need, including painting yourself into a corner. The most common mistake in framework design I've seen is "one to rule them all" - where you have to play according to restrictive rules within, or suffer greatly to break out. Tailwind is a la carte, incremental, and plays nice with other paradigms, which isn't to be underestimated.
Last commit was four years ago and it has some weird bugs, eg this page tells me "Warning: Your browser does not support WebComponents" when Mobile Safari most definitely does. https://www.muicss.com/docs/v1/webcomponents/buttons
MUI (and Joy UI) is a lot different than a utility CSS framework. It has <Box>, which is a utility CSS component, and sx, which is a theme-aware way of doing inline styles.
The difference is that it comes with a <Button> component (and of course more), which has different variants, and you can set default props and default styles at the theme level.
So where an outlined button in a utility CSS world is class="... ... ... ...", or figuring out a way to be able to express that with class="button button-outlined", in MUI and Joy it's <Button>
So that’s a mid blue button that gets slightly darker on hover, with bold white text, it’s got a little more horizontal padding than vertical padding and has slight corner rounding and a slight drop shadow.
And I can see all of that in context where the button is declared rather than having to go look at another file and see what everything is. Oh and I know that none of those TW classes conflict or over write any properties, unlike two in house styles.
A few points on that. First, in 25 years of front end dev at scale I can't think of a time when a site I've worked on has ever actually made a site wide change to the styling without it being a big deal. It's always a lot more work than just changing some CSS because you have to consider things like whether you actually want to change every button, what background color the buttons are sat on, what text color it has, whether the color you choose should be applied everywhere or just in dark|light mode, and so on. Site wide changes are a big deal and the actual code is a relative small part of that.
Secondly, with the componentization of web apps this is largely quite simple from a code perspective. All the other complexities remain but changing a Tailwind styled button isn't much hard than changing a CSS class.
Lastly, designers are moving to design tokens applied in Tailwind config or CSS vars. This decouples the colors from the classes and turns them into config that's exported from an app like Figma, with tools to automate that export as a git PR if you're feeling technical.
These things were hard to do. People in front end tech have thought about that and built tools to make it a lot easier.
There are solutions of course. But they quickly break down when you're iterating quickly, copying in code from libraries like flowbite, etc and want to go back and restyle later.
A better approach that doesn't seem to exist would be some after-the-fact automated cleanup that could at least restructure the class list on attributes to e.g. sort class names alphabetically, replace where you copied text-blue-* instead of text-primary-* to fix issues like that, or other tools to aid refactoring.
Having just dipped my toes into tailwind and getting back up to speed on CSS, its shortcut syntax to base CSS. Putting all of that right on the element makes it easy for anyone to understand what is going on.
After seeing web tech come and go over the years, I have a distaste for most tech that transpiles or similar things. In my experience, transpiling increases the likelihood of painting yourself into a corner eventually. It complicates the tech stack by adding more dependencies and it appears a goal with a lot of frameworks is to avoid actually writing HTML and CSS. Sure the goal of using techniques so you don't have to repeat code is there too but how many abstractions are actually necessary to achieve that?
Some time ago i thought the same, but using it a while change my mind. You can create and edit quick things, especially if some elements should have another styling. I don't miss the times when you specify every elements styling, especially nested components where you have to be carefull.
Whether web-app or website, nobody create them in 2024 from scratch without any tools. And these tools can render your HTML with minimal classnames and optimize you css-file with needed tailwind styles.
Primary i use it in web-app, and i don't care about dozens of classnames. The tools optimize it.
> I really was hoping that tailwind was a fad which died but like everything JavaScript it's here to stay sadly
I feel with Tailwind it's worse somehow.
At least heavy javascript frameworks are commonly ridiculed by back-end or full-stack developers here on HackerNews; but with Tailwind, they embraced it just as firmly as front-end developers have. It is common to hear from back-end or full-stack dev that all they need is just jQuery or plain vanilla; but far more rare to hear same sentiment expressed about plain old (or rather plain new) CSS.
I would say I have basic skills (and interest frankly) in web dev, and I find all the HTML and CSS to look pretty messy anyway. At least with Tailwind I can have the mess in one place and try and understand it there, rather than needing to track down and interpret which CSS class is causing what and how to modify it without breaking something else.
Speaking as an amateur programmer, is this like Laravel's livewire or intertiajs with inline blade component? (but in Elixir). Or is this something else?
imitators use long polling to periodically check for updates. liveview spins up a dedicated vm process for each active user and can push updates over websocket to update things. This process can do things like listen for serverside events as well.
It may be redundant but I think its always important to note that processes as listed above are not like os processes here -- but an extremely lightweight internal VM thread like thing in the BEAM VM. In is not uncommon to have many millions running in the beam VM. Very much lighter than threads or OS processes.
Color is nice but it should never be required to determine widget state. there should always be indicators showing on and off and what state the widget in in.
And... most of the sliders shown fail miserably. come on guys you are not helping my perception that design is a sick profession.
I am not yet "very old" (still not 40 :), but I've been called that by much younger folk, and I even joke about being "very old" in different social settings.
It's obviously a relative term, so I would hope this isn't considered "rude" more generally.
Even objectively, if life expectancy is 75 in a region, saying that someone 70+ is "old", or someone 85+ is "very old" sounds "correct" rather than rude. Is "very young" rude as well?
Is it rude to say that someone is very short or very tall? I mean, that 6ft basketball player is very short.
Yes, some will take offence at any objective statement of fact, and some of these are cultural (tall is good, short is not; young is good, short is not), but if your point is not to denigrate, then you are not rude imho.
My laptop is old but I really want to try this. What options do I have to use this? Speaking as a total n00b can I install and run this on a EC2 instance? What is the minimum instance type (like c4.xlarge, etc) recommended for running this?
I wish there was a ready-made way to get access to the UI with all the options enabled and a fixed monthly price with hopefully a RESTful api. This is so amazing. Great work!
Having just purchased copilot and a user of Tabnine in the past (using Phpstorm) here is my own personal opinion. The suggestions offered by Tabnine weren't anywhere good as copilot - not even by a long shot (at least for PHP and Javascript).
But almost an year has passed since I used this so I don't know if they have had a major update and the results are improved, but previously 1 out of 10 tabnine suggestions were barely useful, compared to 9 out of 10 with copilot.
Since it's a paid offering now I really hope they've upped their game.
Hi, Tabnine's DevRel here.
The past 12 months have been quite a journey, and a lot has changed. To make a long story short: We've trained 12 standalone models that are now used to serve highly accurate code completions based on current project & file context. I encourage you to give it another go.
No, I don't want to cobble together an office suite, email server, user auth, identity management, file sharing, meeting scheduling, and messaging system from scratch and then train users how to use this Frankenstein system and also support it. Because you know vendors never blame each other.
I'm talking about it like someone who has used alternatives and came to like it after many years. It allows me to manage 250 users comfortably with 1 admin in a decently high turnover environment and spend my time actually getting work done rather than fiddling with APIs and random connectors. I don't have to even think about it and it's worth every penny.
What exactly is your problem with Microsoft? Are you just an edgy "I use Linux guy?" I use Linux too, it's my daily driver. But when you're managing office workers and sales people that have to interface with regular people inside and outside the org, your OSS utopia falls apart. I'm making some assumptions here, but clearly, you don't work in a space where the average person (non tech) needs to collaborate. You drive a car. I drive a school bus.
This is going to really make me sound like a real ass, but I dont own a car! I ride a bike everywhere. Haha. West coast is turning me into a hippy.
And yeah, Im afraid I dont buy your perspective that only Microsoft can do everything. Seems to me like that can't do anything without being shitty in some way - from their very inception (stealing and suing). I personally think the world would be better without mega corporations that act like bad citizens like Microsoft, Google, Facebook and especially Apple. Since I can't have that, I mostly wish they werent allowed to advertise everywhere all the time.
I never said only Microsoft can do everything. The provide the easiest solution that just automatically ties everything together. My company builds actual things, we don't want to spend time fiddling with custom software integrations.
Feel free to elaborate -- this is hacker news not script kiddie news. Excess cynicism aside, while I think there's always plenty to be critical of I think between Leslie Lamport, Excel, and Windows XP I'd say it's not all bad.
It's not cynical to dream of a world where giant brutal monopolies don't spew PR at every turn. Its optimistic. Like walking down a main street after they pass a no advertising law. Magical.
I was hoping to like this but the pricing is a total deal-breaker for me.
Personally, AWS' and Google's pay-as-you-go plan win every time regardless of the "better" and "cheaper" claims IMO. You must introduce pay-as-you-go plans if you really want some good traction. I really like the Entrepreneur voice (the professor sounds like Jordan Peterson)
On more thing, I think in the comparison you have sampled the AWS non-neural voice while using the price of neural voice for the price comparison - this does not sound like a fair comparison to me (but please correct me if I'm wrong and I'll edit my comment).
I agree and I'm saddened that it's a deal breaker for you. Unfortunately, we do not have infrastructure to offer pay-as-you-go (actually pretty challenging ops). We're forced to target a smaller niche today and expand in the future (i.e. offer pay-as-you-go).
But for those who are already spending, let's say, $250+ a month on TTS, this is a sweet deal. They are my initial target customers.
A lot of things can be learnt using books and mentors but as far as selling is concerned you might as well be asking "how did you learn to swim?"
It's the same answer.. you learn to swim by swimming. You can ask all the people jumping into the water on which technique is best and what hacks are the best.. but even after all the advice you will get shocked and struggle with it when you jump in the first time and it will take a lot practice before you do the first lap.
So depending on the type of profession there is no better way to pick up the phone, write that email or start connecting with the right people (irl or online) and just get started to learn it.