aramej

YT prompt 001

Mar 7th, 2025
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.35 KB | None | 0 0
  1. <Úloha>
  2. Si skúsený obsahový analytik a redaktor špecializujúci sa na tvorbu komplexných, no zrozumiteľných zhrnutí pre širokú škálu videí - od technologických a vedeckých až po recenzie produktov a populárno-náučné. Tvoja analýza sa vždy snaží zachytiť podstatu témy, kriticky ju zhodnotiť a zasadiť do širšieho kontextu. Vďaka excelentnému ovládaniu spisovnej slovenčiny a schopnosti prispôsobiť jazyk a hĺbku výkladu cieľovému publiku sú tvoje súhrny známe svojou zrozumiteľnosťou a prehľadnou štruktúrou.
  3.  
  4. # Hlavná inštrukcia
  5. Pozorne analyzuj prepis videa a vytvor jeho štruktúrované zhrnutie v slovenčine, pričom prispôsob štýl a rozsah analýzy typu obsahu a cieľovému publiku.
  6.  
  7. ## Štruktúra analýzy
  8. Členiť analýzu do hlavných sekcií a označiť nadpismi:
  9.  
  10. ### 1. Základné informácie a kontext
  11. - Uveď dostupné základné údaje o videu: názov, autora, dátum publikovania, dĺžku, kategóriu/žáner.
  12. - V 2-3 vetách načrtni kontext a hlavnú tému videa.
  13. - Identifikuj cieľové publikum a očakávanú úroveň predznalostí.
  14.  
  15. ### 2. Kľúčové myšlienky a posolstvá
  16. - Vypichni 3-5 najdôležitejších myšlienok, tvrdení alebo záverov z videa.
  17. - Ku každej stručne vysvetli, prečo je významná a ako zapadá do celkovej témy.
  18. - Ak treba, podopri krátkymi citáciami alebo parafázami z prepisu (prelož do slovenčiny, anglické termíny ponechaj ak sú zaužívané).
  19.  
  20. ### 3. Detailnejší rozbor obsahu
  21. Pre každú hlavnú myšlienku:
  22. - Rozober nejdôležítejšie súvislosti, dôsledky a implikácie.
  23. - Zasaď do kontextu ostatných častí videa aj širšej témy.
  24. - Ilustruj relevantnými detailami a príkladmi z videa.
  25. - Ak video obsahuje kľúčové vizuály (grafy, schémy, ukážky), v krátkosti ich opíš a vysvetli ich význam.
  26.  
  27. Miera detailov nech zodpovedá typu obsahu - pri technických/vedeckých videách zachádzaj viac do hĺbky, kým pri populárno-náučných sa sústreď na jasnosť a názornosť.
  28.  
  29. ### 4. Zhrnutie hlavných poznatkov
  30. - V 2-4 odsekoch zrekapituluj najdôležitejšie myšlienky a posolstvá.
  31. - Zvýrazni praktické aplikácie a dopady prezentovaných informácií.
  32. - Poukáž na prieniky a súvislosti s inými témami či trendami.
  33.  
  34. ### 5. Kritické zhodnotenie a odporúčania
  35. - Neprikrášľuj, ale ak spozuruješ faktické chyby, nezrovnalosti alebo slabšie miesta argumentácie, taktne na ne upozorni.
  36. - Ak video vyvoláva ďalšie otázky alebo otvára priestor na diskusiu, načrtni možné smery.
  37. - Prípadne navrhni, ako by sa dalo video obsahovo alebo spracovaním ešte vylepšiť.
  38.  
  39. ## Formálne náležitosti
  40. - Štruktúruj text do prehľadných odsekov a sekcií s výstižnými podnadpismi.
  41. - Používaj spisovnú slovenčinu s citom pre terminológiu, ale zrozumiteľnosť nech má prednosť pred odbornosťou.
  42. - Rozsah prispôsob informačnej hustote a komplexnosti obsahu - populárno-náučné videá zhŕňaj stručnejšie, odborné témy môžeš rozobrať detailnejšie.
  43. - Ak vhodne dopĺňa tok textu, použi číslované a odrážkové zoznamy.
  44. - Na záver skontroluj:
  45. 1. Pokrýva analýza všetky kľúčové prvky obsahu?
  46. 2. Sleduje text jasnú logiku a plynule na seba nadväzuje?
  47. 3. Je jazyk zrozumiteľný pre cieľové publikum?
  48. 4. Sú hlavné tvrdenia a závery riadne podložené obsahom videa?
  49. 5. Pôsobí formátovanie konzistentne a zvyšuje prehľadnosť?
  50.  
  51. # Prepis videa
  52. <ContentTitle> [Vibe Coding Tutorial and Best Practices (Cursor / Windsurf)] </ContentTitle>
  53.  
  54. <Transcript> [I've been vibe coding like crazy lately, which basically just means using an AI agent to do
  55. my coding for me. Very little actual writing of code. In fact, basically none. And I'm going
  56. to tell you all of the things that I learned along the way to get the most out of it. Let's
  57. get right into it. All right. So quickly, what I'm talking about with vibe coding or really
  58. agentic coding, whatever you want to call it, is you're using this agent based coding in cursor
  59. or windsurf. And you can see it right here. So there's agent, ask and edit. This is not
  60. your starting to code something. You hit tab and it finishes that piece of code for you.
  61. This is, I am literally trying to get AI to write the entire application end to end. And so it's a
  62. little bit more difficult to do. And there are definitely some limitations. Now, first, what is
  63. my setup? Either cursor or windsurf. And I have almost exclusively been using Claude 3.7 models,
  64. mostly focused on the thinking version. So I'm using Claude 3.7 Sonnet thinking right here.
  65. Now in cursor and windsurf, you can set up really any model that you want. To do that,
  66. you go up to cursor settings. And here it comes with a predefined list of models that you can
  67. choose from, all provided by cursor directly or windsurf. And then you can also add models down
  68. here. The way that you add custom models is essentially, and it's not super clean, is by
  69. overtaking this OpenAI API key here. So you turn it on, you add your key and you can override the
  70. base URL. You can only do that once, which means you can only really have one non-OpenAI API service,
  71. but that's okay. So here I use Grok and I put my Grok key here. Grok is formatted using the OpenAI
  72. API standard. So it just works. Now, whatever model you choose, if you're using it with the agent
  73. feature, you want to make sure that it really supports agentic behavior and function calling
  74. and tool calling really well. Most models don't. Claude 3.7 thinking does. So what I would recommend
  75. doing first is getting a very specific spec written. That just means a very detailed explanation of
  76. what you want built. And so I'm actually using Grok 3 for that. Write a spec for an application
  77. that will be a Twitter clone, be as specific as possible. We're going to be using Python for the
  78. backend. So I'll just hit enter and I work with AI separately to help me write that spec. And here
  79. you can see it writes out all of the not only technical specification, but also how it operates,
  80. how it works, et cetera. And here you can even see it's writing out the database schema. So this is
  81. really complete. Here are the API endpoints. And so once it's done, you basically take all of that
  82. and you paste it into cursor. I'll show you what that looks like. So we have a brand new cursor
  83. window. You're going to come up to the top right and click this toggle AI pane. Here it's going to
  84. open up the chat window. If you have a recent version of cursor, the agent will be the default.
  85. I have Claude 3.7 sonnet thinking as my model. And here's the important part. We're going to paste
  86. our spec in. But before doing that, one of the thing I learned, and this is especially important
  87. as the code base gets larger, is to use rules. Cursor rules are windsurf rules. Both of the IDEs
  88. support rules. And the rules are basically a way to tell AI to tell the agent how you want to code,
  89. what technologies you should use, what workflows you want to use. And this was a huge discovery
  90. for me because frequently I would try to build something and it would build it using some
  91. technology that wasn't already in my stack and it would break other things. If there was a bug and
  92. I was trying to fix the bug, it would try to use a different technology. A good example is I wanted
  93. to use a SQL database for everything. But every time I ran into an issue with SQL database, the
  94. agent would try to fix it by switching to JSON storage in a file. And it was just super annoying
  95. because I would think it was working and then nothing would be appearing in the database and
  96. so on and so forth. All right, so switching back to this is my actual project. I am going to show
  97. you where the rules are. So in cursor settings, you go down to rules. And you can have user
  98. specific rules, which are rules for any project, but I like adding it to project rules. You add a
  99. new rule and it essentially creates this dot cursor folder and within that a rules folder.
  100. All of these dot MDC files are the rules and you can reference them kind of like a system message
  101. for the AI to work with. Thanks to the sponsor of this segment, Mammoth. Access the best generative
  102. AI for just $10 per month. This includes the best LLMs like Claude, DeepSeek, GPT-4.0, Lama models,
  103. Mistral, Gemini, Grok, and reasoning models like DeepSeek R1 and 03mini. And for that same price,
  104. it also includes the best image generation models, Mid Journey, Flux Pro, Recraft, Dolly,
  105. Stable Diffusion, all in one place. And you can create custom Mammoths to help you on your projects.
  106. These are kind of like agents and you give them all your custom context and they will know
  107. what you need them to do. You can install it on any device, Apple, Android, Windows,
  108. Linux. You can do one click reprompting and so much more. So definitely check out Mammoth.
  109. They've been a great partner to this channel. Tell them I sent you links down below. Now back
  110. to the video. So let me show you my coding preferences. This is how it's formatted,
  111. all natural language. Description, you can auto attach different files, but I didn't use that.
  112. Coding pattern preferences. Now let me go through each of these and tell you why I added them because
  113. hopefully it's going to save you a lot of time by just understanding why these things are necessary,
  114. which kind of reflects some of the tendencies that these AI coding agents have that don't really
  115. work all that well. So always prefer simple solutions that speaks for itself. Avoid duplication
  116. of code whenever possible, which means checking for other areas of the code base
  117. that might already have similar code and functionality. What I found is that when
  118. adding new functionality or trying to fix old functionality, it would often duplicate code
  119. thinking that that code did not already exist. So now I'm explicitly saying make sure you check
  120. everywhere, make sure this code doesn't already exist. And if it does fix that rather than adding
  121. new working code. Another thing that I struggled with is the AI agents didn't have a good sense
  122. of the split between dev, test and prod environments. And this was a huge, huge learning for me.
  123. I would make some change, write some tests for it. The tests would affect the dev environment.
  124. The production environment would be trying to use local stuff and it was just a mess. So
  125. now I say, okay, everything you do, you are going to take into account. We want separate dev,
  126. test and prod environments. Here's another issue. You are careful to only make changes
  127. that are requested or you are confident are well understood and related to the change being
  128. requested. Another issue that I ran into is I would ask for a change and one little piece of
  129. code, one little piece of functionality and like three other things would just break for no reason.
  130. And it was just trying to touch other pieces of code. So I'm really emphasizing to make sure only
  131. focus on the thing that I'm asking you to focus on. Again, next re-emphasizing, just focus on
  132. what I'm asking you to focus on. Don't introduce new things. So when fixing an issue or bug,
  133. do not introduce a new pattern or technology without first exhausting all options for the
  134. existing implementation. And if you finally do this, make sure to remove the old implementation
  135. afterwards so we don't have duplicate logic. Again, this is something I would find.
  136. Something would be done one way. It would not work perfectly. I would say fix that. And rather than
  137. fixing it, it would just rewrite it in a different way, completely thinking it was new code. So
  138. hopefully that fixes it. So keep the code base very clean and organized. I would oftentimes
  139. find disorganization in the code. Avoid writing scripts and files if possible, especially if the
  140. script is likely only to be run once. What I found again is that when the agent was testing
  141. something, so let's say one of the API endpoints was broken or one of the pages was broken,
  142. it would write a script to test it, which is fine. But then it would just leave the script in my
  143. code base and I would have a bunch of different one-off scripts that would likely never be used
  144. again. So I want them either to just write the script and execute it in line or when it's done
  145. with the script, just delete the file. All right. Next, this is an obvious one. Avoid having files
  146. over 200 to 300 lines of code. Refactor at that point. Now that's not usually a good hard and fast
  147. rule to have, but for AI, I think it's appropriate. I would frequently find files that were just
  148. absolutely massive. And then I would ask it to refactor it. And by the time I noticed it,
  149. the refactoring would break all the tests and it would just take a long time. So just get ahead of
  150. it. As soon as it looks like you're about to get over that line size, go ahead and refactor the code.
  151. I also found that it would mock data like crazy stub and mock data, which basically just means
  152. have kind of backup fake data, but that doesn't really work in dev or production environments.
  153. So let's say I asked it to go scrape an article and for whatever reason the scraping failed,
  154. it would catch the error and fall back to using mock data and think everything worked,
  155. but it didn't work. That is not what I wanted the behavior to be. What I really wanted is it to
  156. actually scrape the data properly. And so it would always use mock data. It was really frustrating.
  157. So I explicitly said, do not use mock data for dev or prod only in test environments. And I kind
  158. of doubled down and said it again, never add stubbing or fake data patterns to code that affects
  159. the dev and prod environments. Next, I actually found it overriding my .env file. So I had to
  160. frequently get new API keys. So I just said, don't do that. Now, another rule is my stack.
  161. And I could probably even get more detailed with this, but this is just what is your technical
  162. stack? Because again, I would find it using, for example, if the SQL didn't work, it would just
  163. switch to using a JSON store in a file, which was not what I wanted. So I said Python for the back
  164. end, HTML JS for the front end, SQL database, never JSON file storage, separate databases for
  165. dev tests and prod. Again, just reemphasizing that elastic search for search using a hosted version
  166. because I would talk about elastic search and it would think, okay, you want to do that locally.
  167. Sometimes it would do it with a hosted version, but I only wanted it to be hosted and Python tests.
  168. And I'm going to get to testing in a moment. Next, I had my coding workflow preferences,
  169. a little bit of duplicative information here, but hopefully just kind of giving it more guidance. So
  170. focus on areas of code relevant to the task. Do not touch code that is unrelated to the task.
  171. Obviously, you could see I ran into a lot of issues with this. Write thorough tests for all
  172. major functionality. I was doing this manually. I would just have it write some code for me and
  173. then say, okay, now write tests for it. And sometimes I would forget. So now it should just
  174. write tests for all major functionality. Avoid making major changes to patterns and architecture
  175. of how a feature works after it has shown to work well, unless explicitly instructed, it should say
  176. instructed. And so again, I would say, hey, fix this issue. And to fix it, it would basically throw
  177. away the original pattern and rewrite it from scratch using some other pattern or some other
  178. tech. And I didn't want that. I wanted it to just fix what I had already there. And always think
  179. about what other methods and areas of code might be affected by code changes. So those are the
  180. rules. You can add more and just give it as much instruction as you see fit, because this is going
  181. to be really helpful as you go. So now we have that full spec back in grok. So what I would do
  182. is obviously go through it, work with grok on it or whatever other AI you want to use, make sure it
  183. is exactly what you want, make the appropriate changes, copy it all, paste it into here, and
  184. you're good to go. So I'm not going to iterate on this. I'm just going to take it on one shot. I'm
  185. going to highlight it all. I'm going to paste it right into the window and say, build this based
  186. on this spec and let's see. So it's going to go. I'm not going to watch it. Let's just assume it's
  187. going to go. I'll show you what it looks like in a moment, but let me just show you some more best
  188. practices. Okay, so back to my existing code. One thing that you're going to notice and you should
  189. get used to is this panel right here. This is all the context you're giving it. This is important
  190. because at a certain point it becomes too much context and it starts not performing as well. So
  191. you kind of have to be very aware of how much context you're giving it, how long the conversation
  192. is before starting a new chat. And you can see right here in dark gray, start a new chat for
  193. better results. Now this is something you're going to have to just figure out by playing with it. If
  194. you start a new chat, you lose context. You can move some of the context over to a new chat window,
  195. but that's annoying. You want to give it as much context as possible, but if you give it too much
  196. context, it starts performing poorly. So make sure you're playing around with that. All right,
  197. so I'm going to start a new chat. I'm going to click it one more time. So immediately,
  198. the first thing it does is insert workflow preferences, but I want all of my rules in
  199. there every time. So I'll click my stack and coding preferences. And so now it has the context of these
  200. three rules. I don't actually know if it does it automatically, but it seems like I do have to
  201. manually insert these three files, which you know, fine. My next suggestion is stay very narrow with
  202. your requests from the agent, meaning fix little things, add little features, and test as much as
  203. you can. Have it write tests. Now testing is an entire thing of its own. What I have found works
  204. best is end-to-end testing. So testing where it's actually clicking through and attempting to do
  205. what you as a user would be doing rather than unit tests, for example. And keep in mind,
  206. every single time you write something, you're going to run the tests. And if the tests pass,
  207. great. And if the tests don't pass, have it fix the tests. But the fixing of the test is interesting.
  208. You have to keep a close eye on it because sometimes it'll fix tests in a way that affects
  209. production the way you think it should work, where actually just addressing a failure of the test is
  210. really the right way to go. So you kind of got to just keep an eye on it. You don't necessarily have
  211. to code it yourself or manually adjust anything, but make sure the tests pass and then use the
  212. integration tests to confirm or just simply go to the app yourself and test that functionality
  213. yourself. And so if you look right here, we have tons of different tests, tests for everything.
  214. Another recommendation, kind of jumping all over the place, but use a popular stack. Okay,
  215. if you're using some nascent technology, AI is probably not going to do as well because it
  216. doesn't have as much exposure to whatever that coding language is or that stack is,
  217. and thus it's just not going to perform as well. So I would choose really common stacks. For me,
  218. I like Python, HTML and JavaScript on the front end. Keep it very simple. SQL for the database,
  219. Elasticsearch if I'm doing search, but choose very popular technology stacks,
  220. and you'll just have a lot more documentation for AI to go research.
  221. All right, let me show you an example chat, what it actually looks like. So this is an older feature
  222. that I built. So enforce a maximum tag length of 20 characters. Make sure we don't already have
  223. code for this, write tests for this after implementation. Obviously, I'm like reinforcing
  224. over and over again how I want it to code. It can't hurt. Then you send and it starts. So first,
  225. it thinks. Okay, and you can actually read the thought process, which is really nice. Then you
  226. have tool calling. So where you see listed directory, listed directory, read files, search files,
  227. it has a bunch of tools available to it. You can also use MCP servers. If you want to give it
  228. external tools, that's a whole separate issue. I actually didn't use that at all in any of my code
  229. yet, but I need to play around with that some more. So I'll get to that eventually, but that's for
  230. another video. So you can see here, all this stuff happens. You can actually just click through and
  231. really dig in and get a feel for how the agent operates with your code base. So here I'm going
  232. to scroll down. So it grepped right there, read the file, read the file. And then it says based on
  233. my analysis of the code base here is what I found. It tells me what it's going to do. And then it
  234. starts. Now there are three settings for executing things. You can do completely manually, which means
  235. every time it's actually going to make a change or execute something that might affect your files,
  236. it'll ask you and you have to manually approve things every time. For me, I do YOLO mode and
  237. it is literally called YOLO mode. That's the opposite. It just auto executes everything.
  238. And it's risky for sure, because it'll push to GitHub. It'll deploy to production. So if you
  239. actually have a production level code base and people are using it, I would not recommend that,
  240. but for vibe coding something from scratch, go ahead. And then they also have kind of the in
  241. between. I think it's called auto. And that just means it's going to make the determination of
  242. which ones it does automatically and which commands it will ask you to approve. So it makes some
  243. changes. You can see it's running these tests. All the tests pass. Out of all my tests, one test
  244. failed. So we need to fix the failing tests. So it looks at why it failed and it starts changing
  245. the code. And you can see here more mock repository stuff. I couldn't stand that. That really
  246. frustrated me like crazy, which is why I mentioned like five different times, don't use any mock or
  247. stub data at all in dev or production. So continued on all the tests pass. Great. Give me a summary at
  248. the very end of all the things that changed. And then I just continued. But remember the more you
  249. continue, the more the context window just becomes bloated and you want to just start a new chat as
  250. frequently as it makes sense. I know that's not a very prescriptive rule, but you're going to have
  251. to figure out what is best for you. So I really became pretty darn dependent on the agents to do
  252. things for me. I would even say, okay, commit this code, write a good description and deploy it to
  253. Heroku and it would do that. And it really didn't have any problems. The thing is all of this stuff
  254. is pretty slow. Now I feel a little bit spoiled at this point because I'm saying this stuff is
  255. slow, but it's writing more code than I could in a much shorter period of time. But every command
  256. that I would send off, it would take between two and sometimes up to 15 minutes to finish the
  257. iteration cycle. It would test things, try things, run the tests. The test failed, it would fix it.
  258. It would verify things are working. And so it's a little bit slow in that sense. One potential
  259. solution to that is to have different cursor windows open and just let it operate on different
  260. branches and have kind of two branches going at the same time. And you can do that multiple times.
  261. And so, yeah, you can have a lot of different branches that you're working on at the same time
  262. and then merge them all together at the end. I occasionally switch back and forth between
  263. Cloud 3.7 thinking and Cloud 3.7 regular non-thinking. Thinking tends to work best.
  264. It's just a little bit slower. And then occasionally I would just say refactor the code.
  265. I would give it some instructions like find the longest files and refactor that, but make sure
  266. to do low risk refactoring. And I would explicitly tell it that. And so it would just make the code
  267. a little bit cleaner, a little bit more organized without refactoring patterns for the most part,
  268. which I didn't really care to do because that would just break too many things. Now I did reach
  269. a point at which it was really difficult to make any changes. I would make a change and it would
  270. just take so many iterations to get it right, so many iterations to fix a bug. And I think if I had
  271. known all of this stuff beforehand, I would have been able to get a lot further. And I gotta say,
  272. it does become pretty addicting. I'm sitting doing something else. I will come write a command,
  273. build this feature and walk away and just let it work and come back 10 minutes later to see either
  274. it worked or it didn't. I would iterate, walk away, come back. And so it's something you can
  275. almost do asynchronously. Something where you're doing something else and you can just give it
  276. command after command. Now one thing that I do wish I had was this available on my phone. Now
  277. Replit has something like this, but I don't love its coding agent. It's just a little bit more
  278. difficult to use. So I really wish that there was a fully hosted version that I can use on my phone
  279. anywhere because coding, legitimate coding becomes much more feasible when you're using an agent like
  280. this and just typing something out on your phone is super easy to do and you can watch it and you
  281. can iterate on it. And it doesn't require a full screen, a keyboard and a mouse. So it's kind of
  282. opening up an entire world of possibilities with mobile coding. So a couple of last suggestions,
  283. commit often, commit often. I cannot suggest that enough. Make sure that every single change you
  284. make you are committing because you can always roll back if it gets to a state that is just
  285. unfixable. And another version of that is you can actually see the chat history. So you can roll back
  286. to previous chats. So if I just click this one, so I added dark mode, I scroll to the very top and
  287. I can just say restore checkpoint and it will roll the code back for me. So you not only have get to
  288. do that, but you also have this built-in versioning through cursor or through windsurf itself.
  289. So those are all of the best practices that I've learned over about 100 or 150 hours worth of
  290. vibe coding, different applications, a game, and it's been a lot of fun. And I can't wait till these
  291. tools get better. This is the worst that they will ever be. And so all of these problems you're
  292. experiencing now or I'm experiencing now, they're only going to get easier to deal with in the future.
  293. So enjoy, vibe code away. You really need to know very little about coding to build something
  294. incredible. And I encourage you to build. If you enjoyed this video, please consider giving
  295. a like and subscribe and I'll see you in the next one. ] </Transcript>
  296.  
  297. </Úloha>
Advertisement
Add Comment
Please, Sign In to add comment