HNHacker News
TopNewBestAskShowJobs

mike1o1

1,643 karma · joined March 19, 2014

Senior dev, interested in React, React Native and Elixir.

I blog (very infrequently) at https://www.mikewilson.dev if you want to get a hold of me!

submissionscomments
mike1o1··on Rhizome – A pedagogical example of a JIT for Ruby, implemented in Ruby
I really appreciate the recommended reading order mentioned in the repository. Many times when looking at a repository as a learning resource it can be pretty daunting to know where to start, so I'm glad to see that in the readme.
mike1o1··on HashiCorp Nomad 1.1 Beta
I agree. I love the idea of it, but as a relative newcomer to the space, some of the documentation and examples definitely felt a bit "draw the rest of the owl".

I think a lot of that lies in the fact that all of the pieces stand-alone, which is a selling point, but it makes it difficult to see how they all join together to create the bigger picture.

I'd love to see a good tutorial on setting up a complete environment, with Vault, Consul and Nomad (and Waypoint!) with best practices. Something like "here's how to deploy your rails app with Nomad and Vault" would be great to see the big picture.

mike1o1··on What nobody says about startup moms
The phrase "the days are long, but the years are short" has taken on a new meaning for me after having a child.
mike1o1··on Building React and Vue Support for Tailwind UI
This comes up almost every time, but it's not "basically inline CSS". The best thing about Tailwind (and utility classes in general) is that it forces you to use consistent measurements across your app.

"Shoot, was this 13px padding or 14px padding on the other page?" Don't worry about it, just use "p-4, p-6, etc.". Thinking in these terms becomes really powerful.

Another great thing as that you just simply don't have to think about what to name things! I find that so liberating, to be honest, and I don't have to keep switching back and forth between my markup and my css. I don't have to worry about coming up with semantically descriptive names. I just use "text-gray-500". Was this .authorrole? Or was it .authoremail? Hmm, now I want to display an author nickname. Do I just repeat "authorname" class? I find it so freeing to basically not have to worry about this stuff at all.

mike1o1··on Building React and Vue Support for Tailwind UI
I guess for me I have trouble visualizing all of the elements and classes just by looking at the code snippets. Looking at them in the DOM allows me to see them in context, and I find to be easier to use than looking at the underlying code snippet.
mike1o1··on Building React and Vue Support for Tailwind UI
Tailwind and Tailwind UI are really great. Tailwind UI as a series of blueprints is exactly what I'm looking for and I love how often they're updating and adding new blueprints to their list of components.

This part from the blog post kind of confused me a bit, though.

"The promise of Tailwind UI is that it's just a code snippet"

Am I the only one who never looks at the code snippets/tab for Tailwind UI, and instead jumps straight into inspect element? As blueprints the components are great, but I almost always want to make some small tweaks or changes to fit my application. Are there other people out there actually copying/pasting the snippets as they are?

mike1o1··on Blender 2.92
I did the same, but then recently picked up Davinci Resolve which feels a lot friendlier to use. It also has a free/lite version, though it's not OSS like Blender.
mike1o1··on Blender 2.92
I started learning in November/December or so. It's a little tough to get over the initial curve, but the Blender Guru donut tutorial is really helpful, as well as the free beginner tutorial on cgboost.com.

Is it helpful as a software dev? Who knows, but it's been an enjoyable hobby for now. I particularly have enjoyed the motion tracking and adding some special effects to videos of my young daughter.

mike1o1··on Ask HN: Are you/anyone you know actually *thriving* under lockdown, WFH? How?
The biggest benefit for me has been working from home. My wife stayed home with our young daughter before the pandemic, and this has reinforced that decision. Being able to work from home and seeing her go from 6mo to 16mo and being present for all those milestones has been a blessing, especially with an accommodating workplace. It hasn’t been easy as we live in a small home, but we do what we can.

So, I wouldn't say we're necessarily thriving, but we're doing the best we can to see the silver linings and I’m thankful that I’m able to work at home.

mike1o1··on DHH – Building Hey with Hotwire
I've been looking forward to this episode since the announcement of "new magic". The DHH interviews by Adam are some of my favorite episodes.

https://fullstackradio.com/32 Is another great episode that I re-listen to once a year, even if it is a bit old.

mike1o1··on Nomad v1.0 release – workload orchestration
I really like the idea of Nomad as a simpler alternative to Kubernetes. The documentation is great and provides a lot of examples, but I wish I could find a starter guide on how to deploy a complete application with it and Consul. Something like, here’s how to deploy a Rails app with Sidekiq workers and database migrations.

This along with Waypoint seems like a great solution for smaller side projects.

mike1o1··on Stimulus.js 2.0
One benefit is when combined with Turbolinks there is a need to bootstrap the Vue/React component. The Stimulus controllers respond to mutation observers and always work.

If a new HTML element is added to the DOM and has a controller, it just works and is now active. This might not be the case with React or Vue, as you'd have to then bootstrap the component.

This makes Stimulus a really good combo when used with Turbolinks or partial Javascript responses.

mike1o1··on Stimulus.js 2.0
Stimulus has a very small surface area, but I find it really enjoyable to use when combined with Turbolinks.

My only complaint/comment is that some of the HTML that I need to generate ends up being littered with so many data attributes, especially when combining multiple Stimulus controllers/behaviors.

Has anybody found a clean way around that in Rails templates?

mike1o1··on Blender 2.91
I haven't done 3d modeling in about the same amount of time and would love to get back into it. Were there any particular resources you found helpful for getting up to speed?
mike1o1··on Bringing the browser developer tools to Visual Studio Code
This looks great. The lack of the network and inspect element is the main reason I end up not using the built-in debugger with VS Code.
mike1o1··on Reporters are leaving newsrooms for newsletters
Ever since getting an @hey.com email address I've found myself subscribing more and more to newsletter. I guess I could have done the same thing with gmail and filters, but getting newsletters as part of The Feed and out of my Inbox has made me really enjoy weekly newsletters compared to before.
mike1o1··on The evolution of HEY: from humble beginnings to a multi-platform email service
I thought this was a pretty interesting read, especially about how they used Jekyll as a prototyping tool. It's always great to see the different variations of a product, especially a new one, as it takes shape.
mike1o1··on The evolution of HEY: from humble beginnings to a multi-platform email service
It takes some getting used to, but for me I ended up not keeping certain newsletters in The Feed. The general idea is that The Feed can be read anytime, and to just "let it flow". There are certain newsletters that I like to keep on track of, so I just keep those in my Imbox.
mike1o1··on Kubernetes 1.18
https://www.ansibleforkubernetes.com/

I've found this pretty good starting point. Keep in mind the book is still a work in progress. Note, I haven't actually run k8s in production, but this book has helped me get something up and running in VM's pretty quickly using Ansible on top of kubeadm.

mike1o1··on Tailwind UI
This already exists and it's great!

https://tailwindcss.com/docs/extracting-components#extractin...

  .btn {
    @apply bg-blue-500 text-white py-2 px-4 rounded;
  }
mike1o1··on Tailwind UI
They are variables in that they're specified in your Tailwind configuration file, which is what generates the utility classes that are generated. If you really wanted to you, you can extract it out as a variable if you wanted to use that color elsewhere, such as part of a box-shadow or background color or something like that.

  .custom-bg-color {
    background-color: theme('colors.gray.500');
  }
mike1o1··on Tailwind UI
Because I don't want that cognitive overhead of even thinking about what the selector should be. Then what if I have another sub-sub text? Do I make that an h3? An h4? I don't want to have to think about that. I just make it "text-xs" and move on.

I don't even need to move over to my css file at all - I stay within my template and stay within my flow.

It seems crazy and counter-intuitive at first, but I find that it makes me a lot more productive.

mike1o1··on Tailwind UI
Sure, but the colors from Tailwind aren't determined through an algorithm like this. They are handpicked from a designer, which I feel like most design systems do as well.
mike1o1··on Tailwind UI
Typically the "text-sm text-gray-700" would be a one-off styling while I'm developing a page or a component, not necessarily something that will be repeated a hundred times.

If it turns out that later down the line I realize that "every card should have that size and color for the card title", then I'll pull it out to a separate class or part of a partial or something like that.

The idea being at that point then I have more context around when and how that particular section of a component should be displayed, so I have more context about what I should name the class (i.e. "card-subtitle").

I feel like the documentation explains it fairly well if you're interested in reading more about it:

https://tailwindcss.com/docs/extracting-components#extractin...

mike1o1··on Tailwind UI
If I wanted to change all links from gray to blue/underlined, the best practice there would probably be to use a different utility class (text-blue-500 and underline) and update my templates/partials/whatever.

I think for your specific example, I would use the `@apply` directive to apply certain utilities to all links.

I've used Tailwind on large, complex apps with around 50 screens (so far), and using extracted components or partials hasn't been a problem at all with keeping things in sync.

``` a { @apply text-gray-700; }

// now becomes a { @apply text-blue-500 underline; } ```

The documentation goes over this pretty well, I think.

https://tailwindcss.com/docs/extracting-components#extractin...

mike1o1··on Tailwind UI
No, "gray-700" doesn't mean it's 70% gray. The term "700" is just referring to a color on a scale. I don't even need to name it "700", I can name it "dark" or whatever I want (which is what previous versions of Tailwind used).

i.e. "text-gray-dark", or "text-gray-700", would have a class with a single css property:

color: #4A5568;

By default Tailwind comes with a default color palette with hand picked colors. They were hand picked by a designer, not determined through an algorithm.

https://tailwindcss.com/docs/customizing-colors#default-colo...

mike1o1··on Tailwind UI
"text-sm" is just font-size and text-gray is a color code, so the order of the classes doesn't matter either.

The biggest benefit of this over inline styles is that if I decide to change the color of "gray-700", since those colors come from a configuration, I only need to change it in my configuration.

It takes some getting used to of the rules, but after a day or two I don't even need to think about what the class names are.

mike1o1··on Tailwind UI
Tailwind has been great and I've been looking forward to this for months. I fought Tailwind as a concept pretty hard at first, but after hearing Adam and a few others raving about it I gave it a shot. It takes some getting used to at first but I can't imagine developing without it anymore.

To me, the biggest benefit of Tailwind and utility classes in general is that it removes the cognitive overheard of having to think of class names while designing a new page.

For example, if I'm working on a card and I want some text below the main text to have a smaller, gray font size. What do I name that class? "card-sub-text", "card-sub-title"? No - don't even worry about it - "text-sm text-gray-700" and move on.

Later on, if I end up repeating that combination in a number of places, I have more context of what that class name really should be, and I can extract the utility classes to a specific class name.

Really powerful stuff that has helped to increase my velocity quite a bit.

mike1o1··on Ask HN: Solo devs, how do you plan your development?
I've been a fan of regular github issues and milestones and labels.

I'll typically have milestones for the next 2 or 3 releases, and then use labels for tracking bugs, features and future items and nice-to-haves. I like this because it makes it easy to keep the code linked to issues the way I'm used to with my day job.

The nice thing is it lets me wear two separate hats. Some days I don't have the mental bandwidth to code, or I'm feeling extra creative when it comes to coming up with roadmap ideas, so I'll go into the issues and just write. On other days, I just open the issues, filter by bugs or features and grab an item and get to work.

I've tried Trello and Basecamp, but having that separate from the code just made too much overhead to keep track of. Having everything under one roof makes it so I actually end up adhering to the list of tasks.

mike1o1··on Angular v8.0
I've really enjoyed Angular. Typescript is a no-brainer now, and now that I'm starting to explore RxJS a bit more, it's impressive how powerful it can be once getting over the large learning curve. Being able to subscribe to an observer, and make a web request, and make sure that only the latest request is taken, and being able to do so out of the box is really, really nice.
← PreviousPage 3 of 4Next →