Learning from chatGpt
Power of the world and mind » Devlog
The biggest help from chatGPT has been in the form of discovering how to write what i already know, differently.
Lets take a list of items that holds multiple components
later in the code, i have a single imageComponent and need to find a matching list item. Usually I would loop through the list with foreach and match the list item with an if statement. like this
But if i ask chatGPT to do it, i get this
I've never heard of the function FirstOrDefault. Also never had the privilege or the need to use the default return type.
Using Lambda callback as your function parameter makes it unnecessary hard to read in my opinon. But it's sure is nice to discover new ways to code.
Power of the world and mind
Use the power of the brain for complete world domination
More posts
- Soooo much work, it's killing meApr 19, 2024
- Using AI as a consultant for UIApr 19, 2024
- Starting the projectApr 14, 2024
Leave a comment
Log in with itch.io to leave a comment.