In this post I dig into every Postgres feature that does not work in PgBouncer transaction mode and what the implications are, an overview of connection pooling in general, and how connection pooling modes work in PgBouncer and other poolers.
https://t.co/ZzSp9ds4yZ
If you want to have GPT4 full-stack scalable developer superpowers, here's the secret:
A week ago I had never coded anything with a server in my life.
Today I wrote a website from scratch with GPT4, added features, and debugged it until it worked as expected in under an hour.
At 3pm on a Friday for fun. After my "real work" lol
But first, yes it's live. -> https://t.co/CdKvsI50rb
So now, if you want to do this yourself head to the chat API playground at https://t.co/l9IvUVNsGM
Input this System Prompt:
"You are a world-class developer who makes simple, beautiful code that just works every time. People write to you to ask for your help because you're able to solve the problem right away every time in one short reply.
Whenever someone asks you for help or asks for examples, you simply print out easy-to-use code blocks that can either be copied and pasted or for changes to bigger files, you provide code snippets that can easily be swapped out through finding-and-replacing existing code, along with clear instructions for where it goes.
You're also a perfect bug-finding system. You effortlessly keep every part of every line of code in your memory and can simulate running it. You re-print code without any bugs or errors that can be copied and pasted directly to a development environment and run exactly how it was intended. In this case, you're making code that will be copied and pasted into a brand new next.js https://t.co/dOv2IxgvBk instance, and you need to print out the perfected version of this code that will compile and run with all features working.
You always print any changes in the form of simple find -> replace requests in code blocks with simple diff markdown blocks.
Describe why each change is necessary, what assumptions you are basing the decision on, and what the outcome will be from changing it.
Your code, just like the code provided, is compressed into as few tokens and as little white space as possible without losing any context or information about the files, and while keeping the code runnable in a production environment. This makes it easy to skim in large blocks and debug with an LLM.
Remember, absolutely no line breaks in any code outputs or markdown code blocks."
First Message:
""Let's build a [what you want to build] that looks just like [popular app it should look like]. It should allow you to [describe complete user journey here]. Make it as a Next.js app using tailwind, typescript, and chakra.ui. Design it as something I can easily copy and paste into a brand new Next.JS https://t.co/1DZumhvMNK instance. [Optionally you can ask it to walk you through how to use github & vercel too for scalable deployments]
The app is called [website URL you want to use] The app should include the finished CSS for it to look nice and polished, and [anything else]. Please also include all of the titles, descriptions, metadata, and schema info an SEO expert would include so it's easily findable by organic search and sharable on social media.
[INCLUDE ANY DEVELOPER DOCUMENTATION FOR THINGS THAT HAVE BEEN PUBLISHED SINCE 2021 HERE, IN THIS CASE I NEEDED PART OF THE OPENAI CHAT API DOCUMENTATION]
Print the full ASCII Project Directory Structure for a TypeScript-based Next.js Application first and then just print each file needed for the final working app in this format:
filename.tsx
'''
Code here, but with minimal white space and no line breaks.
'''
nextfilename.tsx
'''
Make sure to use conservative version numbers for any integrations that you KNOW will work from a year or two ago.
'''
Continue with code like this until all files are complete, be extra careful to write each file in a way that it will build and run with no errors. And remember, no line breaks."
Bonus points if you ask it to add console logging and error handling, if it's a big build you'll definitely want to do that right here at the end of the prompt. That's it! Copy and paste the files into https://t.co/dOv2IxgvBk and rock and roll.
In the last few weeks:
- https://t.co/FsWd3m8sYg has replaced Google for me.
- Poe has replaced ChatGPT.
- Promptable has replaced OpenAI Playground.
- Elicit has replaced Google Scholar.
Would love a thorough "how to deal with env variables in monorepos" guide - feels like it should be simple but it's absurdly complex. cc @turborepo@jaredpalmer
🔥 TypeScript Tip 🔥
Got a utility type like Maybe<T> that you just want to use everywhere without importing it?
Stick it in a declare global {}, and boom - it's global!
I'm attending React Day Berlin 2022 - get your free remote ticket and join me there with 5k other React engineers and 35+ great speakers!
https://t.co/gx5cYDovyt
#reactdayberlin
Working with monorepos today is easier & faster thanks to:
◆ @turborepo
◆ tsup, which bundles TypeScript with esbuild
◆ Storybook's new Vite builder
◆ Better examples for ESLint/Prettier
Overall pretty happy with my updated template 😁
https://t.co/g3ifffNULs
This is the flowchart of how slack decides to send a notification.
It is a great example of why a simple feature may take much longer to develop than many people think.
What’s your takeaway from this diagram?
Image source: https://t.co/INrVLUZ2nX
@vercel is there a way to make my node_modules cache in a monorepo? I'm getting ~3s builds with @turborepo which is great, but it's spending 2-3 minutes at `yarn install` every time
🏔 Huge: EAS Build now supports the official App Store Connect API!!
➡️ This means way more CI and automation is now possible for iOS builds.
🚀 You can configure EAS Build to regenerate credentials based on your app changes completely in the cloud!
https://t.co/vZ5MJCXWwM
📣 iOS support has landed on our @flipper_fb plugin to measure #reactnative FPS #performance! 🚀
It took longer than expected but thanks to @pierrzimmermann's outstanding contribution on the desktop side, it is finally here 🥳
https://t.co/MD0wgOaIFw
You asked me to do something about Android permissions, I heard you.
🛡 Introducing Warden
A lightweight API that allows you to request permissions and handle the result from any coroutine with one line✨
🌟 Star it on Github @ github com/alexstyl/warden
Was comparing #performance on a simple #reactnative app with and without #fabric 🔥
Weirdly, with Fabric, the performance seems to be worse 😱 the list becomes non scrollable after a while...
Here's the code: https://t.co/1ELT0XWV15
What did I miss @reactnative ?🙏
InteractionManager is an important @reactnative API, particularly for @reactnavigation screen transitions.
You can delay some rendering until the screen has completed sliding.
👉 TIP: when ready, fade out a loading screen to smoothly reveal the render-delayed component