# Talk Notes for The End of Localhost (Infobip Shift 2022)

Original: https://swyx.io/end-of-localhost-infobip
Published: 2022-09-19

> I returned to Zadar!

## Slides 

https://docs.google.com/presentation/d/1pvBf4Kw8CrXFef4jcfExpaRds5GuTe6FOnqk5g6vGmk/edit?usp=sharing

## Photos

![image](https://user-images.githubusercontent.com/6764957/191205745-e7bc8f31-2fe3-42e6-99a4-69fa8e59faef.png)

![image](https://user-images.githubusercontent.com/6764957/191205853-0c3a8b94-9ddd-4923-8589-0459ca23f385.png)

![image](https://user-images.githubusercontent.com/6764957/191205896-d510cf2c-f18a-4cbc-bdf8-fcce1640454f.png)

![image](https://user-images.githubusercontent.com/6764957/191205930-161bac60-352e-4860-9f39-709044e6a856.png)

![image](https://user-images.githubusercontent.com/6764957/191205951-1cb4018b-c51f-45a5-80b0-d8536f4c240d.png)

![image](https://user-images.githubusercontent.com/6764957/191205967-d96a45f0-b5ba-4b1d-a9b8-cc6984975ed4.png)

![image](https://user-images.githubusercontent.com/6764957/193697817-25a25e5b-b93a-4cc1-bedf-9542235b4309.png)

![image](https://user-images.githubusercontent.com/6764957/193697861-b4140a53-882e-4718-8ce0-1415c492f422.png)


## Talk Plan

- opening
	- returning to the mainframe
	- personal computer
	- going back to the mainframe
- personal story 1
	- lets say you are a fullstack developer
	- frontend and backend on laptop
	- iteration speed fast
	- 1.0 then you get serverless religion
		- frontend on laptop, backend on cloud
		- redeploy speed slow
	- 1.1 create a local mock server - netlify-lambda
		- ping the mock server
		- CORS - proxy
		- bugs:
			- netlify identity
			- netlify routing
			- env variables
	- 1.2 create a bigger mock server - netlify dev
		- compile netlify routing engine to wasm
		- pull down the env variables
		- more bugs
			- netlify forms
			- netlify build
- personal story 2
	- aws - lambda and database
	- local mock cli
	- very slow deploy
	- trigger only one at a time, and super slow
	- so we built datastore - full clone
	- redeploy was super slow <- look up my modernwebpodcast livestream?  https://www.youtube.com/watch?v=VA3TFymZlW4
	- more broadly
		- database replication
		- faking, seeding
		- stripping out PII
- personal story 3 - temporal
	- docker - works on machine, ship machine
	- dont run docker compose in production
	- ok... k8s?
	- cant run k8s on the laptop
	- wrong version of go, node, need to set up mTLS certs, etc
	- saas service providers
- summary
	- if the browser reduced operating systems to "a poorly debugged set of device drivers", then **the cloud is reducing the dev machine to a poorly maintained set of environment mocks**.
	- sisiphyean battle
	- one clap if you ever worked on a system too big for one machine
	- two clap if you ever had something work in dev and fail in prod
	- three claps if you ever started a project and realized you had the wrong environment
	- four claps if you ever wrote this kind of code - if localhost then x, then y
- end of story time
- start of endoflocalhost pitch
- play clip of sam lambert 
- tweeted this out and got a lot of responses
	- i want to code  on a plane
	- cold dead hands
- Reason 1 - validation by others
	- future is here, just not evenly distributed - list bigcos that have moved to remote dev
	- guillermo ipad photo https://twitter.com/rauchg/status/1274766898530357249
	- ok it works for bigcos but what about me
- Reason 2 - ephemeral, powerful dev machines in the cloud
	- power: resources, saas services
	- bootstrapping: new machine
	- control: locking down what devs do
	- one solution that has all 3
	- access - 2k machine for AI SOTA. get it down to 200 chromebook.
- Reason 3 - cloud eating outer loop vs inner loop
	- deploy previews - netlify, vercel, heroku - useful?
	- CI/CD - done deal (jenkins, circleci)
	- latency: have you heard of the speed of light?
		- outlook -> gmail
		- game streaming, browser streaming
		- movies/TV -> netflix
		- adobe -> figma 
		- sourcegraph, copilot
	- independence
		- food, water, electricity
	- personal preferences
		- having local dev but linking cloud dev
- Solutions that are out there
	- dont forget ivan's codeanywhere
	- entirely in browser
	- remote server, local editor
	- branching environments
- Still not good enough
	- latency of netlify drop, cli
	- branching is still quite new
	- edge compute as the last mile?
	- language server protocol shows you can have client diversity
		- environment branching protocol???
- warnings
	- 
	- new privacy and security concerns
- Closing arguments
	- not selling you anything
	- git -> branches are throwaway
	- branching for code vs branching for environments
	- commoditization of technology
		- from pets to cattle
	- closing meme
