BigO() - VS Code Extension [BETA] v2.1.0
Download Link
https://marketplace.visualstudio.com/items?itemName=MiranAmer.bigo
What This Does?
This VS Code extension allows you to determine the time complexity of a your code (using Big O() notation) and also produces a more optimised version of your code. It does this by sending the code you highlight over to GPT-3, an AI model made by OpenAI. This then sends back the time complexity of the function which is shown in the bottom right of the IDE. If you choose to optimise it, GPT-3 will send back a more time efficient version of your code in a new editor on the right.
Features:
- Get Time Complexity
- Make Code More Efficient - With Respect To Time Complexity
- Debug Code - Removes Errors
- Make Code More Readable By Adding Comments
- Convert Code To Another Language
- Solves Programming Problems By Returning Coded Solution
How To Use The Features:
How To Get Time Complexity
- Reload VS Code After Downloading (may be slow at first as server is starting up)
- Highlight The Code You Want To Evaluate
- Click Ctrl+Shift+P Whilst Code Is Highlighted
- type 'Get BigO() - Time Complexity'
- Select It
- Wait For Result, It Will Appear On Bottom Right
How To Get More Efficient Code (v2.0.0)
- Highlight The Code You Want To Optimise
- Click Ctrl+Shift+P Whilst Code Is Highlighted
- Type 'Optimise Code Efficiency'
- Select It
- Wait For Result, New Editor Will Appear With Faster Code On The Right
NEW: How To Debug Code (v2.1.0)
- Highlight The Code You Want To Debug
- Click Ctrl+Shift+P Whilst Code Is Highlighted
- Type 'Debug Code'
- Select It
- Wait For Result, New Editor Will Appear With Debugged Code On The Right
NEW: How To Make Code Readable (v2.1.0)
- Highlight The Code You Want To Make Readable
- Click Ctrl+Shift+P Whilst Code Is Highlighted
- Type 'Make Code Readable'
- Select It
- Wait For Result, New Editor Will Appear With Readable Code On The Right
NEW: How To Convert Code To Another Language (v2.1.0)
- IMPORTANT: Add A Comment Above Code Snippet With New Language To Convert To
- Highlight The Code, Including The Comment
- Click Ctrl+Shift+P Whilst Code Is Highlighted
- Type 'Convert Code To Another Language'
- Select It
- Wait For Result, New Editor Will Appear With Converted Code On The Right
NEW: How To Solve Programming Problem (v2.1.0)
- Paste In The Problem Statement Along With Any Example Test Cases
- Highlight The Statement, Including The Test Cases
- Click Ctrl+Shift+P Whilst Statement Is Highlighted
- Type 'Solve Programming Problem'
- Select It
- Wait For Result, New Editor Will Appear With Coded Solution On The Right
Tip
If Your Algorithm Takes In A Data Structure As A Parameter, Also Select The Data Structure In The Highlighted Text, Otherwise GPT-3 Wont Know The Length Of The DS.
Example: Don't Do This
DO THIS:
Demo Vid
https://user-images.githubusercontent.com/91673777/213876020-49b30c9d-753d-4770-932f-fab68502e0c3.mp4
Running On Different Algorithms
https://user-images.githubusercontent.com/91673777/213876288-59d3dacd-a76a-4fe5-bbab-fc85621be5f8.mp4
Using Algorithm Names:
https://user-images.githubusercontent.com/91673777/213880495-333aab5c-8f0f-4c2b-9115-57060ba1c7ba.mp4
Using Optimise Code Feature
https://user-images.githubusercontent.com/91673777/213917298-82974a62-c045-4586-9f1d-3fe4b90d6633.mp4
in this case, the time complexity decreased from O(n^2) -> O(n), hence making the solution faster
Debug Code Demo
https://user-images.githubusercontent.com/91673777/213931831-59213dfd-0734-4b5b-b79f-a054e32e6a36.mp4
Readable Code Demo
https://user-images.githubusercontent.com/91673777/213931844-0ccdaa50-97cc-4088-8d6a-eb33b1ac17fe.mp4
Convert Code Demo
https://user-images.githubusercontent.com/91673777/213931855-eda2cbe4-03b6-418b-ba6d-6b471089feac.mp4
Solve Programming Problem Demo
https://user-images.githubusercontent.com/91673777/213931867-0e509b99-0a99-4cfc-8b17-726b39b440ed.mp4
Future Ideas
- Add A Loading Indicator Whilst Result Is Being Fetched
- Provide An Option To Increase Function Speed ( e.g: O(n^2) -> O(n) )
- Store Highlighted Functions