Long time developer, really promising but what are some example workflows on how to use this?

Keep in mind I have experience with nix, containers and Kubernetes. I have seen this link: Share your development workflow (link removed limit on two links)

Keep in mind I use both “playgrounds” and “work stuff” … I realize this is a huge preference on development but let me give some super simple use cases:

1. Use Case 1: Work stuff

A very simple example of a larger application:

  • Setup

1 I have a very simple “base design system” … using probably Hugo or something. Think Uber Base Design System or Shoelace Components.

  1. I assume it’ll be scaffolded out per project, branded to the product and 99% of the things are communicated via e-mail or ideally a CMS type structure, think the Foundation layer.
  • Day-to-Day
  1. More importantly the UX designer will update a component say a Button Shoelace Example, Uber Button.

  2. Most likely the Shoelace example is easier and will probably be used but it’ll be updated in Figma, or whatever design tool and marked as “done” to the designer. How that happens I don’t know, but I want the designer to basically version without having to know how to version, play with the button and through a plugin or a native API basically go from draft to “done”

  3. A feature branch is created as is an ephemeral environment.

  4. A ticket is created in the ticketing system with relevant information. This include a message to a Slack/Teams channel too.

  5. If done “right” something should scaffold at lot of what you see on the Shoelace example, but even if it wasn’t layered right or something is missing it doesn’t matter. Something even if not 100% right gets submitted to the button component (likely screenshots and a version change in a drop down, hopefully with a changeset message on the page). So at the very basic level you get screenshots and a scaffold page for a developer to update the code.

  6. Developer updates the code for the button in a base component library. Again, the simpler example is the Shoelace and it should pick up this change, try to auto-generate everything needed based on the code commit. But might need some hand holding.

  7. When the developer is done he or she would mark the ticket for review. On pre-commit it’d run tests, etc. and really every commit should update the button on every page in the ephemeral environment.

  8. All that passes, you’d assign it to a developer(s) for review and the designer for UAT. Again pushing a message through Slack/Teams too on this with a squash commit or whatever of what the designer did and the developer did with a link to the button site design site, the ephermereal environment (button-1-5-6.feature.myapp.com or whatever). That way they can see the ticket, the commits, the link to the page with the screenshot and button code, the changeset, and the app where the button is used.

  9. Normal accept/reject process with omni-channel notifications, environment stays up, CI/CD is invoked into production and new feature is sent to x% of visitors and goes up as statistics of what “working” is dictates.

  10. Lastly now that I have a complex environment I can more easily describe and deploy I can add things. We often have a LOT of 3rd party analytics. I’d like to not change buttons, add scripts or ID tags or whatever. 99% of my applications use React or Next or lit Components around these. Create observable analytics: slack.engineering/creating-a-react-analytics-logging-library Gave me the idea of instead of creating and manipulating tags and forms for things like Salesforce or Google or LaunchDarkley or “flavor of the month a VP thinks will help” is there a way I can use Kafka or something similar to create an observable, send data over to that then using Kafka or Airflow? Is there a name for this? It would save me a lot of time and frankly errors as marketers setup stuff that assumes a component is loaded when its not. Some of these tools do A/B testing client side but I’d rather change that on my end with a response , for example using Slack’s example I can wait for a response from Optimizely (A/B testing) and then maybe inject the DOM? Is there a name for this? Especially would be helpful for when marketing teams dump Salesforce forms with hidden fields all over the place then complain they have to change IDs for campaigns in rich text fields on every page. Here we could have a nice form and I can make an API call using an observable back-end. Just trying to see if there’s a name for this type of approach. Being “cloud native” locally will certainly go along way to getting me to show these things without justifying AWS costs or spinning up a custom solution.

2. Use Case 2: Work but Playground Stuff

This is harder to define but I want to play around with things like ML in real-world settings, so it doesn’t need to have necessarily JIRA tickets associated with it but I’d like to a sample retail website and show how different models interact (e.g., a content banner is created based on off real time data relating to the product, creates content related to the brand, using unsupervised learning I can show that it isn’t as simple as rating a movie but I have a lot going on (I don’t know “Y”), user might be engaged by content created that’s relevant but not necessarily leading to conversions like product bought and is more like brand awareness and not product recommendations. So it would be multiple models stacked on top a demo site to show how these all work out and maybe use LIME to show prediction scoring for non-technical (yes I know it has issues with unsupervised learning).

Summary:
So I’m not looking for solutions for the problems, I have ways of doing it, I’m just looking how to use this new infrastructure to set things up for a dev friendly way so I can share it out. And will reduce my “setup time” and where I can focus on features. Some of the ideas seem overly complex (like using JOSH to symlink monorepos), and I realize there’s no one way to do this what it comes down to is I have a set of “modules” I want to mix and match and reuse or better yet, reuse the base module and customize it for my current project. I’m just really confused how to dip my toes in this without getting into an automation rabbit-hole. Any suggestions?

Pretend like I’m a dumb golden retriever and what might be a best place for me to start. I don’t want to immediately get into bad habits and abandon it, and I know there’s a lot of personal preference there, so I’m just looking how to wrap my mind around the infrastructure. I haven’t seen any good use articles on this because some is traditional programming with workflows built in (pre-commit, etc).

I’m really excited about this but lost at the same time. I’ve been programming for >20 years so some of this is exciting (terminal creates exactly what I need! create apps with network meshes and hostnames set!) and some of it is skepticism.

Thanks all! I will open source all this :smiley: and explain how I did it if I can get some guidance.

1 Like

Would this help? Or deviates too much from your workflow?

Take a look at the video with Hashimoto opening his bag of tricks.

That looks great my workflow can change and I can explain that to to team members. I was just explaining how I do things currently. I want to devs to start making features and not get caught up in automation workflow. I’ve made this mistake myself.

I have devs from outside my company who can barely understand react let alone nix, or determinate systems. So I’m trying to craft something along the lines of a boot camp. It sounds stupid but that’s the way it is.

Ah I get it now. So I choose a Nix OS via Ptyxis (or customize whatever). Then let’s get rid of monorepo for now but I can have different folders with different setups (golang backend, typescript, etc.). Use flakes for what I want to do for “infrastructure” and have each self contained. Like a main where’s tools I need for my base vm, then each folders the toolset that makes sense given the language and what needs to happen. Essentially I’d be giving an OS container to the other devs and if they want to not use vim they could I guess checkout a nix2container build.

Ideally my dev environment is very abstracted from production but that’s okay. I could create my-app vm off a template then have the microservices in different folders, or vms in vms. In the end I know most my colleagues will look at me funny as they are used to VSCode and repos that suck and assume you MySQL installed globally. To each their own, I want to make them as unaware of nix and DX as possible.

I think I’m down the right path, I’ve had enough pain with CI pipelines being restricted by different teams want to avoid that overhead and get dev environments working and pass off politics to someone else. Hey you need legal/architecture review? I have it all working we got it out 90% faster doubt anyone cares we didn’t set it up like your cert exam said we should.

1 Like

Yes. That’s the idea. Easy as pie.
In that regards, that differs a bit from using devcontainers + vscode + docker. Mind you I am not a professional developer or cloud wizard but I am borrowing a lot from them to make my life easier.
I am still reading how this whole workflow closes the circle though.
In favor of Docker and containers, I read last night that the Docker image generation can be also be defined/declared via a Nix script, so it acquires reproducible characteristics.

That is almost exactly what Mitchel Hashimoto said in the interview about his colleagues when they skeptically wonder about how he does things so fast and efficiently.