18 ms·
A messy experiment that changed how I think about AI code analysis
- patrickhogan1 2y agoThis is great. More context is better. Only question is after you have the AI your code why would you have to tell it basic things like this is session middleware.
- JoeAltmaier 2y agoPretty impressive. But for the part about nitpicking on style and uniformity (at the end) the results seem useful. Btw I thought, from the title, this would be about an AI taught to dismiss anyone's work but their own, blithely hold forth on code they had no experience with, and misinterpret goals and results to fit their preconceived notions. You know, to read code like a Senior Developer.
- svilen_dobrev 2y ago> to read code like a Senior Developer. you mean, as in "code written by someone else == bad code" ?
- dearing 2y agoIts being cute but speaking about politicking at code review.
- jerpint 2y agoI think there will be lessons learned here as well for better agentic systems writing code more generally; instead of “committing” to code as of the first token generated, first generate overall structure of code base, with abstractions, and only then start writing code. I usually instruct Claude/chatGPT/etc not to generate any code until I tell it to, as they are eager to do so and often box themselves in a corner early on
- rmbyrro 2y agoaider.chat has an /architect mode where you can discuss the architecture first and later ask it to execute the architectural decisions works pretty well, especially because you can use a more capable model for architecting and a cheaper one to code
- namanyayg 2y agoI didn't know about this, thanks for sharing
- thegeomaster 2y agoThis is literally chain-of-thought! Even better than generic chain-of-thought prompting ("Think step by step and write down your thought process."), you're doing a domain-specific CoT, where you use some of your human intuition on how to approach a problem and imparting the LLM with it.
- j_bum 2y agoYes I frequently do this too. In fact I often ask whatever model I’m interacting with to not do anything until we’ve devised a plan. This goes for search, code, commands, analysis, etc. It often leads to better results for me across the board. But often I need to repeat those instructions as the chat gets longer. These models are so hyped to generate something even if it’s not requested.
- Kinrany 2y agoWe already have languages for expressing abstractions, they're called programming languages. Working software is always built interactively, with a combination of top-down and bottom-up reasoning and experimentation. The problem is not in starting with real code, the problem is in being unable to keep editing the draft.
- qup 2y agoNot a problem with the correct tooling.
- 2y ago
- jalopy 2y agoThis looks very interesting, however it seems to me like the critical piece of this technique is missing from the post: the implementations of getFileContext() and shouldStartNewGroup(). Am I the one missing something here?
- thegeomaster 2y agoReading between the lines, it sounds like they are creating an AI product for more than just their own codebase. If this is the case, they'd probably be keeping a lot of the secret sauce hidden. More broadly, it's nowadays almost impossible to find what worked for other people in terms of prompting and using LLMs for various tasks within an AI product. Everyone guards this information religiously as a moat. A few open source projects are everything you have if you want to get a jumpstart on how an LLM-based system is productized.
- iamleppert 2y agoNo, the code he posted sorts files by size, groups them, and then…jazz hands?
- layer8 2y agoYeah, and in the code bases I’m familiar with, you’d need a lot of contextual knowledge that can’t be derived from the code base itself.
- whinvik 2y agoSounds interesting. Do you have documentation on how you built the whole system?
- namanyayg 2y agoI'll write something up, what are you curious about exactly?
- JTyQZSnP3cQGa8B 2y ago> Do you have documentation on how you built the whole system Or any actual "proof" (i.e. source code) that your method is useful? I have seen a hundred articles like this one and, surprise!, no one ever posts source code that would confirm the results.
- namanyayg 2y agoI have been trying to figure out how to publish evals or benchmarks for this. But where can I get high quality data of codebases, prompts, and expected results? How do I benchmark one codebase output vs another? Would love any tips from the HN community
- JTyQZSnP3cQGa8B 2y agoThat's the problem with people who use AI. You think too much and fail to deliver. I'm not asking for benchmarks or complicated stuff, I want source code, actual proof that I can diff myself. Also that's why the SWE is doomed because of AI, but that's another story.
- techn00 2y agothe implementations of getFileContext() and shouldStartNewGroup().
- theginger 2y agoWhat is with the font joining the character c and t on this site?(In headings)
- escape_goat 2y agoIt's not joining it in a kerning sense, that's just the remarkably serif nature of EB Garamond, which has a little teardrop terminal on the tip of the 'c'. It's possible that you have font smoothing that is tainting the gap, otherwise it's your eyes.
- teraflop 2y agoNo, the heading font is Lato, not Garamond, and it's definitely some kind of digraph that only shows up with the combination "ct". Compare the letter "c" in these two headings: https://i.imgur.com/Zq53gTd.png https://i.imgur.com/Zq53gTd.png
- deleted 2y ago[deleted]
- escape_goat 2y agoThis should be upvoted. Thank you, I hadn't realized that OP was referring to the heading font or scrolled down to see what is yes, quite a remarkable ligature. It appears to be Lato delivered from <https://brick.freetls.fastly.net/fonts/lato/700.woff https://brick.freetls.fastly.net/fonts/lato/700.woff> The ligature appears due to discretionary ligatures being turned on. h1, h2, h3 { font-feature-settings: "kern" 1, "liga" 1, "pnum" 1, "tnum" 0, "onum" 1, "lnum" 0, "dlig" 1; font-variant-ligatures: discretionary-ligatures; }
- eichin 2y agoActually, EB Garamond has c_t and s_t ligatures.
- codesnik 2y ago
- HardMax71 2y ago[flagged]
- advael 2y agoI read to like the first line under the first bold heading and immediately this person seemed like an alien. I'll go back and read the rest because it's silly to be put off a whole article by this kind of thing, but what in the actual fuck? I was probably not alive the last time anyone would have learned that you should read existing code in some kind of linear order, let alone programming. Is that seriously what the author did as a junior, or is it a weirdly stilted way to make an analogy to sequential information being passed into an LLM... which also seems to misunderstand the mechanism of attention if I'm honest I swear like 90% of people who write about "junior developers" have a mental model of them that just makes zero sense that they've constructed out of a need to dunk on a made up guy to make their point
- dnadler 2y agoWhile that wasn’t my experience as a junior developer, this is something that I used to do with academic papers. I would read it start to finish. Later on, I learned to read the abstract, then jump to either the conclusion or some specific part of the motivation or results that was interesting. To be fair, I’m still not great at reading these kinds of things, but from what I understand, reading it start to finish is usually not the best approach. So, I think I agree that this is not really common with code, but maybe this can be generalized a bit.
- disgruntledphd2 2y ago> reading it start to finish is usually not the best approach. It really, really depends on who you are and what your goal is. If it's your area, then you can probably skim the introduction and then forensically study methods and results, mostly ignore conclusion. However, if you're just starting in an area, the opposite parts are often more helpful, as they'll provide useful context about related work.
- Aurornis 2y ago> this is something that I used to do with academic papers Academic papers are designed to be read from start to finish. They have an abstract to set the stage, an introduction, a more detailed setup of the problem, some results, and a conclusion in order. A structured, single-document academic paper is not analogous to a multi-file codebase.
- OzzyB 2y agoSo it turns out that AI is just like another function, inputs and outputs, and the better you design your input (prompt) the better the output (intelligence), got it.
- shahzaibmushtaq 2y agoYou got that 100% right. The title should be "The day I told (not taught) AI to read code like a Senior Developer".
- jprete 2y agoThe Bitter Lesson claimed that the best approach was to go with more and more data to make the model more and more generally capable, rather than adding human-comprehensible structure to the model. But a lot of LLM applications seem to add missing domain structure until the LLM does what is wanted.
- mbaytas 2y agoImproving model capability with more and more data is what model developers do, over months. Structure and prompting improvements can be done by the end user, today.
- do_not_redeem 2y agoThe Bitter Lesson pertains to the long term. Even if it holds, it may take decades to be proven correct in this case. Short-term, imparting some human intuition is letting us get more useful results faster than waiting around for "enough" computation/data.
- Philpax 2y agoThe Bitter Lesson states that you can overcome the weakness of your current model by baking priors in (i.e. specific traits about the problem, as is done here), but you will get better long-term results by having the model learn the priors itself. That seems to have been the case: compare the tricks people had to do with GPT-3 to how Claude Sonnet 3.6 performs today.
- 2y ago
- risyachka 2y ago>> The AI went from: >> "This file contains authentication logic using JWT tokens" So what was the initial prompt? "What's in this file?" And then you added context and it became context-aware. A bit of an overstatement to call this "Holy Shit moment" Also , why is "we"? What is "our AI"? And what is "our benchmark script"? And how big is your codebase? 50k files? 20 files? This post has very very little value without a ton of details, looks like nowadays everything "ai" labeled gets to the front page.
- dijksterhuis 2y ago> looks like nowadays everything "ai" labeled gets to the front page. it’s been this way for like a year or more. hype machine gotta hype.
- sgt101 2y ago[flagged]
- namanyayg 2y agoIt's my personal experience for now. Have some experiments and further study planned. It's difficult to set up evals, especially with production code situations. Any tips?
- sgt101 2y agoYeah, it is hard. The principal you need to work to is that you need to create evidence that other people will find compelling and then show that you have interrogated your results to show that you have checked that it's really working better than chance and not the result of some fluke or other. Finally you need to find a way to explain what's happening - like an actual mechanism. 1. Find or make a data set - I've been using code_search_net to try and study the ability of LLM's to document code, specifically the impact optimising n-shot learning on them*, this may not be close enough to your application, but you need many examples to draw conclusions. It's likely that you will have to do some statistics to demonstrate the effects of your innovations so you probably need around 100 examples. 2. Results from one model may not be informative enough, it might be useful/necessary to compare several different models to see if the effect you are finding is consistent or whether some special feature of a model is what is required. For example, does this effect work with only the largest and most sophisticated modern models, or is this something that can be seen to a greater or lesser effect with a variety of models? 3) You need to ablate - what is it in the setup that is most impactful? What happens if we change a word or add a word to the prompt? Does this work on long code snippits? Does it work on code with many functions? Does it work on code from particular languages? 4) You need a quantitative measure of performance. I am a liberal sort , but I will not be convinced by an assertion that "it worked better than before" or "this review is like an senior, I think". There needs to be a number that someone like me can't argue with - or at least, can argue with but can't dismiss. *I couldn't make it work, I think because the search space for finding good prompting shots (sample function)is vast and the output space (possible documents) is vast. Many bothans died in order to bring you this very very very (in hindsight with about $200 of OpenAI spending) obvious result. Having said that I am not confident that it couldn't be made to work at this point so I haven't written it up and won't make any sort of definitive claim. Mainly I wonder if there is a heuristic that I could use to choose examples a-priori instead of trying them at random. I did try shorter examples and I did try more typical (size) examples. The other issue is that I am using sentence similarity as a measure of quality, but that isn't something I am confident of.
- cloudking 2y agoSounds like OP hasn't tried the AI IDEs mentioned in the article. For example, Cursor Agent mode does this out of the box. It literally looks for context before applying features, changes, fixes etc. It will even build, test and deploy your code - fixing any issues it finds along the way.
- batata_frita 2y agoHave you tried cline to compare with cursor? I haven't tried Cursor yet but for me cline does an excelent job. It uses internal mechanisms to understand the code base before making any changes.
- cloudking 2y agoI'll give it a go, I've also heard Windsurf is quite good. Personally I've been very impressed with Cursor Agent mode, I'm using it almost exclusively. It understands the entire codebase, makes changes across files, generates new files, and interacts with terminal input/output. Using it, I've been able to build, test & deploy fullstack React web apps and three.js games from scratch.
- yapyap 2y agohaha man, some of yall really talk about AI like it’s some baby with all the knowledge in the world, waiting to be taught common sense
- _0ffh 2y agoVery sceptical of "Context First: We front-load system understanding before diving into code". The LLM sees the whole input at once, it's a transformer, not a recurrent model. Order shouldn't matter in that sense. Ed. I see some people are disagreeing. I wish they explained how they imagine that would work.
- Workaccount2 2y agoJust like training data, the more context and the higher quality the context you give the model, the better the outputs become.
- scinadier 2y agoA bit of a disappointing read. The author never elaborates on the details of the particular day in which they taught AI to read code like a Senior Developer. What did they have for lunch? We'll never know.
- namanyayg 2y agoCredit goes to "You Suck at Cooking" for their genius smash burger recipe [0] for my lunch that day [0] https://www.youtube.com/watch?v=nq9WnmCGoFQ https://www.youtube.com/watch?v=nq9WnmCGoFQ
- quantadev 2y agoIn my Coding Agent, I ended up realizing my prompts need to be able to specifically mention very specific areas in the code, for which no real good syntax exists for doing that so I invented something I call "Named Blocks". My coding agent allows you to put any number of named blocks in your code and then mention those in your prompts by name, and the AI understands what code you mean. Here's an example: In my code: -- block_begin SQL_Scripts ...some sql scripts... -- block_end Example prompt: Do you see any bugs in block(SQL_Script)?
- mdaniel 2y ago> for which no real good syntax exists for doing that Up to you, but several editors have established syntax which any code-trained model will likely have seen plenty of examples vim (set foldmethod=marker and then {{{ begin\n }}} end\n ) https://vimdoc.sourceforge.net/htmldoc/usr_28.html#28.6 https://vimdoc.sourceforge.net/htmldoc/usr_28.html#28.6> JetBrains <editor-fold desc=""></editor-fold> https://www.jetbrains.com/help/idea/working-with-source-code.html#custom_folding_regions https://www.jetbrains.com/help/idea/working-with-source-code... Visual Studio (#pragma region) https://learn.microsoft.com/en-us/cpp/preprocessor/region-endregion?view=msvc-170 https://learn.microsoft.com/en-us/cpp/preprocessor/region-en... (et al, each language has its own)
- quantadev 2y agoThe great thing about my agent, which I left out, is that it extracts out all the named blocks using just pure Python, so that the prompt itself has them embedded directly in it. That's faster and more efficient than even having a "tool call" that extracts blocks by name. So I needed a solution where my own code can get named block content out of any kind of file. Having one syntax that works on ALL types of files was ideal. UPDATE: In other words it's always "block_begin" "block_end" regardless of what the comment characters are which will be different for different files of course.
- qianli_cs 2y agoI thought it was about LLM training but it’s actually prompt engineering.
- namanyayg 2y agoI'm thinking about training next! But deepseek is so good already
- voidhorse 2y agoTo me, this post really just highlights how important the human element will remain. Without achieving the same level of contextual understanding of the code base, I have no clue as to whether or not the AI warning makes any sense. At a superficial level, I have no idea what "shared patterns" means or why it logically follows that sharing them would cause a race condition. It also starts out talking about authentication changes, but then cites a PR that modified "retry logic"—without that shared context, it's not clear to me that an auth change has anything to do with retry logic unless the retry is related to retries on authentication failures.
- dimtion 2y agoWithout knowing exactly how createNewGroup and addFileToGroup are implemented it is hard to tell, but it looks like the code snippet has a bug where the last group created is never pushed to groups variable. I'm surprised this "senior developer AI reviewer" did not caught this bug...
- crazygringo 2y agoI'm fascinated by stories like these, because I think it shows that LLM's have only shown a small amount of their potential so far. In a way, we've solved the raw "intelligence" part -- the next token prediction. (At least in certain domains like text.) But now we have to figure out how to structure that raw intelligence into actual useful thinking patterns. How to take a problem, analyze it, figure out ways of breaking it down, try those ways until you run into roadblocks, then start figuring out some solution ideas, thinking about them more to see if they stand up to scrutiny, etc. I think there's going to be a lot of really interesting work around that in the next few years. A kind of "engineering of practical thinking". This blog post is a great example of one first step.
- Terr_ 2y ago> But now we have to figure out how to structure that raw intelligence into actual useful thinking patterns. My go-to framing is: 1. W've developed an amazing tool that extends a document. Any "intelligence" is in there. 2. Many uses begin with a document that resembles a movie-script conversation between a computer and a human, alternatively adding new lines (from a real human) and performing the extended lines that parse out as "Computer says." 3. This illusion is effective against homo sapiens, who are biologically and subconsciously primed to make and experience stories. We confuse the actor with the character with the scriptwriter. Unfortunately, the illusion is so good that a lot of developers are having problems pulling themselves back to the real world too. It's as if we're trying to teach fashion-sense and embarrassment and empathy to a cloud which looks like a person, rather than changing how the cloudmaker machine works. (The latter also being more difficult and more expensive.)
- afro88 2y agoAnother cherry-picked example of an LLM doing something amazing, written about with a heavy dose of anthropomorphism. It's easy to get LLMs to do seemingly amazing things. It's incredibly hard to build something where it does this amazing thing consistently and accurately for all reasonable inputs. > Analyzing authentication system files: > - Core token validation logic > - Session management > - Related middleware This hard coded string is doing some very heavy lifting. This isn't anything special until this string is also generated accurately and consistently for any reasonable PR. OP if you are reading, the first thing you should do is get a variety of codebases with a variety of real world PRs and set up some evals. This isn't special until evals show it producing consistent results.
- namanyayg 2y agoThat's exactly what I want to do next. Any tips on how should I get codebases and real world PRs? Are the ones on popular open source repos on GitHub sufficient? I worry that they don't really accurately reflect real world closed source experience because of the inherent selection bias. Secondly, after getting all this, how do I evaluate which method gave better results? Should it be done by a human, or should I just plug an LLM to check?
- deleted 2y ago[deleted]
- jarebear6expepj 2y ago“…should it be done by a human?” Sigh.
- namanyayg 2y agoI'll do it personally in the beginning but was thinking about doing it on scale
- deleted 2y ago[deleted]
- revskill 2y agoThe seniors master more than 2 or 3 languages.
- SunlitCat 2y agoOh my. That title alone inspired me to ask ChatGPT to read a simple hello world cpp program like a drunken sailor. The end result was quite hilarious I have to say. It's final verdict was: End result? It’s a program yellin’, "HELLO WORLD!" Like me at the pub after 3 rum shots. Cheers, matey! hiccup :D
- namanyayg 2y agoRecently I've started appending "in the style of Edgar Allen Poe" to my prompts when I'm discussing code architecture. It's really quite interesting how the LLM comes up with ways to discuss about code :)
- dartos 2y agoI think the content is interesting, but anthropomorphizing AI always rubs me the wrong way and ends up sounding like marketing. Are you trying to market a product?
- zbyforgotp 2y agoPersonally I would not hardcode the discovery process in code but just gave the llm tools to browse the code and find what it needs itself.
- atemerev 2y agoThis is what Aider doing out of the box
- mbrumlow 2y ago> Context First: We front-load system understanding before diving into code Pattern Matching: Group similar files to spot repeated approaches Impact Analysis: Consider changes in relation to the whole system Wait. You fixed your AI by doing traditional programming !?!?!
- _0ffh 2y agoThe context first bit doesn't even make sense. Transformers process their whole context window in parallel, unlike people who process it serially. There simply is no place that gets processed "first". I'd love to see anyone who disagrees explain to me how that is supposed to work.
- danjl 2y ago> Identifying tech debt before it happens Tech debt is a management problem, not a coding problem. A statement like this undermines my confidence in the story being told, because it indicates the lack of experience of the author.
- noirbot 2y agoI don't think that's totally accurate though. It can definitely be a coding problem - corners cut for expediency and such. Sometimes that's because management doesn't offer enough time to not do it that way, but it can also just be because the dev doesn't bother or does the bare minimum. I'd argue the creation of tech debt is often coding problem. The longevity and persistence of tech debt is a management problem.
- danjl 2y agoNot taking enough time is a management problem. It doesn't matter whether It is the manager or the developer who takes shortcuts. The problem is planning, not coding.
- dijksterhuis 2y ago> it can also just be because the dev doesn't bother or does the bare minimum sounds like a people problem — which is management problem. > I'd argue the creation of tech debt is often coding problem. The longevity and persistence of tech debt is a management problem. i’d argue the creation of tech debt is more often due to those doing the coding operating under the limitations placed on them. The longevity and persistence of tech debt is just an extension of that. given an infinite amount of time and money, i can write an ideal solution to a solvable problem (or at least close to ideal, i’m not that good of a dev). the limitations create tech debt, and they’re always there because infinite resources (time and money) don’t exist. so tech debt always exists because there’s always limitations. most of the time those resource limitations are decided by management (time/money/people) but there are language/framework/library limitations which create tech debt too though, which i think is what you might be referring to? usually those are less common though
- shahzaibmushtaq 2y agoAll fresh bootcamp grads aren't going to understand what the author is talking about, and many senior developers (even mid-seniors) are looking for what prompts the author wrote to teach AI how to become a senior developer.
- highcountess 2y agoDev palms just got that much more sweaty.
- brundolf 2y agoPeople are being very uncharitable in the comments for some reason This is a short and sweet article about a very cool real-world result in a very new area of tooling possibilities, with some honest and reasonable thoughts Maybe the "Senior vs Junior Developer" narrative is a little stretched, but the substance of the article is great Can't help but wonder if people are getting mad because they feel threatened
- namanyayg 2y agoFelt a bit more cynic than usual haha.
- jryan49 2y agoIt seems llms are very useful for some people and not so much for others. Both sides believe it's all or nothing. If it's garbage for me it must be garbage. If it's doing my work it must be able to do everyone's work... Everyone is very emotionally about it too because of the hype around it. Almost all conversations about llms, especially on hn are full of this useless bickering.
- epolanski 2y agoI am more and more convinced that many engineers are very defensive about AI and would rather point out any flaw than think how to leverage the tools to get any benefit out of them. Just the other day I used cursor and iteratively implemented stories for 70 .vue files in few hours, while also writing documentation for the components and pages, and with the documentation being further fed to cursor, to write many E2Es, something that would've taken me at least few days if not a week. When I shared that with some coworkers they went into a hunt to find all the shortcomings (often petty duplication of mocks, sometimes missing a story scenario, nothing major). I found it striking as we really needed it and it provides tangible benefits: - domain and UI stakeholders can navigate stories and think of more cases/feedback with ease on a UX/UI pov without having to replicate the scenarios manually doing multiple time consuming repetitive operations in the actual applications - documentation proved to be very valuable to a junior that joined us this very january - E2Es caught multiple bugs in their own PRs in the weeks after And yet, instead of appreciating the cost/benefit ratio (something that should characterise a good engineer, after all, that's our job) of the solution, I was scolded because they (or I) would've done a more careful job missing that they never done that in the first place. I have many such examples, such as automatically providing all the translation keys and translations for a new locale, just to find cherry picked criticism that this or that could've been spelled differently. Of course it can, what's your job if not being responsible for the localisation? That shouldn't diminish that 95% of the content was correct and provided in few seconds rather than days. Why they do that? I genuinely feel some feel threatened, most of those reek insecurity. I can understand some criticism towards those who build and sell hype with cherry picked results, but I cannot but find some of the worst critics suffering of Luddism.
- ianbutler 2y agoCode context and understanding is very important for improving the quality of LLM generated code, it’s why the core of our coding agent product Bismuth (which I won’t link but if you’re so inclined check my profile) is built around a custom code search engine that we’ve also built. We segment the project into logical areas based on what the user is asking, then find interesting symbol information and use it to search call chain information which we’ve constructed at project import. This gives the LLM way better starting context and we then provide it tools to move around the codebase through normal methods you or I would use like go_to_def. We’ve analyzed a lot of competitor products and very few have done anything other than a rudimentary project skeleton like Aider or just directly feeding opened code as context which breaks down very quickly on large code projects. We’re very happy with the level of quality we see from our implementation and it’s something that really feels overlooked sometimes by various products in this space. Realistically, the only other product I know of approaching this correctly with any degree of search sophistication is Cody from SourceGraph which yeah, makes sense.
- kmoser 2y agoI wonder how the results would compare to simply prompting it to "analyze this as if you were a senior engineer"?
- jappgar 2y agoI do this all the time. Actually, I tell it that I am a senior engineer. A lot of people tinkering with AI think it's more complex than it is. If you ask it ELI5 it will do that. Often I will say "I already know all that, I'm an experienced engineer and need you to think outside the box and troubleshoot with me. " It works great.
- Arch-TK 2y agoI am struggling to teach AI to stop dreaming up APIs which don't exist and failing to solve relatively simple but not often written about problems. It's good when it works, it's crap when it doesn't, for me it mostly doesn't work. I think AI working is a good indicator of when you're writing code which has been written by lots of other people before.
- Terr_ 2y ago> I think AI working is a good indicator of when you're writing code which has been written by lots of other people before. This is arguably good news for the programming profession, because that has a big overlap with cases that could be improved by a library or framework, the traditional way we've been trying to automate ourselves out of a job for several decades now.
- joshka 2y ago>I am struggling to teach AI to stop dreaming up APIs which don't exist and failing to solve relatively simple but not often written about problems. Try giving them more context of APIs that actually exist then as part of the inputs...
- mkl 2y agoHow do you do that when you don't know the APIs? AI code assistants seem more useful when you're doing something outside your existing experience: different domain, different libraries, different language, etc.
- joshka 2y agoI use GitHub CoPilot both in and ouside my existing experience. Mostly I'm working with Rust, so access to the API surface of a library is fairly simple (docs.rs/cratename) and something which can be provided to the context by pasting if needed. YMMV for other languages.
- Arch-TK 2y agoIt doesn't help even if I paste the code in sometimes.
- charles_f 2y agoI wondered if there was a reason behind the ligature between c and t across the article (e.g. is it easier to read for people with dyslexia). If like me you didn't know, apparently this is mostly stylistic, and comes from a historical practice that predates printing. There are other common ligatures such as CT, st, sp and th. https://rwt.io/typography-tips/opentype-part-2-leg-ligatures https://rwt.io/typography-tips/opentype-part-2-leg-ligatures
- deadbabe 2y agoThis strikes me as basically doing the understanding for the LLM and then having it summarize it.
- redleggedfrog 2y agoThat's funny those are considered Senior Dev attributes. I would think you'd better be doing that basic kind of stuff from the minute your writing code for production and future maintenance. Otherwise your making a mess someone else is going to have to clean up.
- guerrilla 2y agoToday I learned I have "senior dev level awareness". This seems pretty basic to me, but impressive that the LLM was able to do it. On the other hand, this borderline reads like those people with their "AI" girlfriends.
- riazrizvi 2y agoNice article. The comments are weird as fuck.
- ptx 2y agoWell, did you check if the AI's claims were correct? Does PR 1234 actually exist? Did it actually modify the retry logic? Does the token refresh logic actually share patterns with the notification service? Was the notification service added last month? Does it use websockets?
- stevenhuang 2y agoRelated article on how LLMs are force fed information line by line https://amistrongeryet.substack.com/p/unhobbling-llms-with-knowledge-in-the-world https://amistrongeryet.substack.com/p/unhobbling-llms-with-k... > Our entire world – the way we present information in scientific papers, the way we organize the workplace, website layouts, software design – is optimized to support human cognition. There will be some movement in the direction of making the world more accessible to AI. But the big leverage will be in making AI more able to interact with the world as it exists. > We need to interpret LLM accomplishments to date in light of the fact that they have been laboring under a handicap. This helps explain the famously “jagged” nature of AI capabilities: it’s not surprising that LLMs struggle with tasks, such as ARC puzzles, that don’t fit well with a linear thought process. In any case, we will probably find ways of removing this handicap
- disambiguation 2y agoOP you only took this half way. We already know LLMs can say smart sounding things while also being wrong and irrelevant. You need to manually validate how many N / 100 LLM outputs are both correct and significant - and how much did it miss! Otherwise you might fall into a trap of dealing with too much noise for only a little bit of signal. The next step from there is comparing it with human level signal to noise ratio.
- Jimmc414 2y ago@namanyayg Thanks for posting this, OP. I created a prompt series based on this and so far I like the results. Here is the repo if you are interested. https://github.com/jimmc414/better_code_analysis_prompts_for_AI https://github.com/jimmc414/better_code_analysis_prompts_for... I used this tool to flatten the example repo and PRs into text: https://github.com/jimmc414/1filellm https://github.com/jimmc414/1filellm
- e12e 2y ago> Related PR: #1234 (merged last week) modified the same retry logic. Consider adding backoff." Is this an example of confabulation (hallucination)? It's difficult to tell from the post.
- noisy_boy 2y agoIt stood out to me too - could be from some comment in the code.
- rurban 2y agoI had a similar experience today with Claude. I asked it to come up with a tournament schedule for the upcoming city table-tennis tournament I want to organize, to maybe limit the attendees number or get more tables. The AI came up with totally unusable python class to print the schedule, where I just wanted to know the results,and tradeoffs. Then I reformulated the question for a senior, and it came with the highlevel answer I expected and needed. Ask junior questions, and you get junior code. Ask senior questions and you get the senior answers.