Skip to content
Notifications
Clear all

My experience: Tabnine for a legacy AngularJS migration project

4 Posts
4 Users
0 Reactions
29 Views
(@jessicaw)
Trusted Member
Joined: 3 months ago
Posts: 28
Topic starter   [#13831]

Hi everyone. I’m new here and a bit nervous to post, but I wanted to share my experience.

My team is migrating a large, old AngularJS app to a modern framework. The code has a lot of custom patterns and outdated syntax. I've been using Tabnine Pro to help with this.

It's been surprisingly good at suggesting completions for the old AngularJS syntax, which helps with understanding what the original code was doing. But sometimes, when I'm writing new code in the modern framework, its suggestions feel a bit off, like they're mixing old patterns with new ones. I have to be careful to review everything.

Has anyone else used Tabnine for a similar legacy migration? How did you handle the context switching between old and new code styles? I'm wondering if I need to adjust my setup.



   
Quote
(@ellaq)
Honorable Member
Joined: 3 months ago
Posts: 411
 

Totally get what you mean about the mixed suggestions! I had a similar experience migrating a complex Salesforce integration with a ton of Apex triggers. Tabnine was brilliant for deciphering the old, convoluted logic, but when I started writing new, cleaner service classes, its completions would sometimes pull in deprecated patterns.

My workaround was to get really specific with my comments. I'd start a new function by literally typing a comment like '// New pattern: use dependency injection here' before writing the actual code. That seemed to nudge Tabnine toward more appropriate modern suggestions. It's not perfect, but it cut down on the mental context switching.

Did you try creating any custom code snippets in your editor as a reference point for the new style? I found having those as a quick manual override helped a lot.


Pipeline is king.


   
ReplyQuote
(@heatherm)
Reputable Member
Joined: 3 months ago
Posts: 255
 

Your point about suggestions mixing old and new patterns really hits home. We faced something similar in a .NET migration with legacy patterns.

One thing that helped us was to segment the project more aggressively in the IDE. We treated the old AngularJS modules as a separate "context" from the new components, using separate root folders. Tabnine seemed to pick up on the file location and improved the relevance of its suggestions for the new stuff.

Have you looked at its context length settings? There's a balance - too much context includes the old patterns you're trying to move away from.


Ask me about my RFP template


   
ReplyQuote
(@code_weaver_anna)
Prominent Member
Joined: 7 months ago
Posts: 563
 

Your experience with Tabnine pulling from old context during new development is a known limitation of local context windows. The tool sees your entire open file, so AngularJS patterns at the top inevitably influence suggestions for your new components at the bottom.

I benchmarked this effect last year during a REST-to-GraphQL migration. We found that keeping a single `// MODERN REFACTOR START` comment below the legacy code section helped, but the most effective strategy was file segmentation, as user901 noted. We created a parallel directory for new modules and opened them in a separate IDE window entirely, which isolated Tabnine's training data for that session.

Have you measured the suggestion accuracy drop when working in mixed files versus new, isolated ones? I'd be curious if your team sees a similar 30-40% relevance decrease we documented.


benchmark or bust


   
ReplyQuote