Changes between Version 1 and Version 2 of SOPs/AIcodingTools


Ignore:
Timestamp:
02/19/26 15:11:18 (43 hours ago)
Author:
xinlei.gao
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SOPs/AIcodingTools

    v1 v2  
    1 Why AI for coding?
     1== '''Why AI for coding?'''
    22• Efficient: automatic code/documentation generation
    33• Speed: accelerate data analysis pipeline development
     
    66
    77----
    8 What is an AI Coding Assistant?
     8== '''What is an AI Coding Assistant?'''
    99• Definition: Large language model (LLMs) trained on massive code datasets.
    1010• Key capabilities: Code generation, code completion, Documentation, Language translation (e.g., python to R)
    1111
     12'''Set Clear Expectations'''
    1213
    13 ----
    14 Key Features of AI Coding Assistants
     14AI is a pair programmer, not a replacement for developer judgment. It accelerates work but requires human oversight.
     15
     16'''Key Features of AI Coding Assistants'''
    1517||=Feature=||=Description=||
    1618||Code suggestions||Provides code suggestions based on comments and file context||
     
    2830
    2931
    30 ----
    31 Popular Tools for AI coding
     32
     33'''Popular Tools for AI coding'''
    3234• Chat-based (ChatGPT, Gemini, Claude) Best for: reasoning, debugging, learning, prompt iteration
    3335• IDE-integrated (Github Copilot, Cursor, Claude Code) Best for: writing code faster inside existing projects
     
    3537
    3638----
    37 General guidelines when using AI for coding
    38 1. Clear Problem Definition
     39== '''General guidelines when using AI for coding'''
     40'''1. Clear Problem Definition'''
    3941* Best Practice: Before asking ChatGPT for help, clearly define the problem or task. A well-defined question improves the quality of the response.
    4042
    4143* Example: Instead of saying “Fix my code,” provide context such as “I'm trying to optimize this Python function that clusters the sequence alignment positions in proximity recursively, but it's too slow for large inputs. How can I improve it?”
    4244
    43 2. Break Problems into Smaller Chunks
     45'''2. Break Problems into Smaller Chunks'''
    4446* Best Practice: For complex tasks, break the problem down into smaller, manageable steps. Ask about each step individually to get focused and accurate assistance.
    4547
    4648* Example: Rather than asking for a full solution in one go, ask for help with specific functions, then how to test them, and finally how to integrate them into your larger project.
    4749
    48 3. Iterate and Refine Your Questions
     50'''3. Iterate and Refine Your Questions'''
    4951* Best Practice: If the initial response isn’t quite right, clarify your question and ask for refinement. ChatGPT often improves its responses based on follow-up queries.
    5052
    5153* Example: “The solution works, but it doesn't handle edge cases where the input is negative. Can you adjust it?”
    5254
    53 4. Ask for Explanations, Not Just Code
     55'''4. Ask for Explanations, Not Just Code'''
    5456* Best Practice: Don’t just request code; ask for an explanation of how and why it works. This helps you learn and apply the knowledge in future problems.
    5557
    5658* Example: “Can you explain why you're using a heuristic search algorithm here and how it improves the time complexity?”
    5759
    58 5. Use ChatGPT for Code Reviews
     60'''5. Use ChatGPT for Code Reviews'''
    5961* Best Practice: Ask ChatGPT to review your code for potential improvements in readability, performance, or best practices.
    6062
    6163* Example: “Can you review this Python function for any inefficiencies or suggest improvements for readability?”
    6264
    63 6. Leveraging ChatGPT for Debugging
     65'''6. Leveraging ChatGPT for Debugging'''
    6466* Best Practice: Provide the exact error message and a concise description of what the code is supposed to do when asking ChatGPT for debugging help.
    6567
    6668* Example: “I’m getting a TypeError in this Python code when trying to perform a log transformation. Can you help me identify why this is happening?”
    6769
    68 7. Specify Language, Framework, and Version
     70'''7. Specify Language, Framework, and Version'''
    6971* Best Practice: Always mention the programming language, framework, and version you're using to avoid receiving outdated or incompatible code.
    7072
    7173* Example: “I have a Python script created by Python 2.7. Could you please modify it to be compatible with Python 3.8?”
    7274
    73 8. Request Test Cases
     75'''8. Request Test Cases'''
    7476* Best Practice: Ask for test cases when getting help with functions or algorithms to ensure the solution is robust.
    7577
    7678* Example: “Can you provide a few test cases to verify that this sorting algorithm works with edge cases like empty lists or lists with duplicate values?”
    7779
    78 9. Use ChatGPT as a Learning Tool
     80'''9. Use ChatGPT as a Learning Tool'''
    7981* Best Practice: Don’t just use ChatGPT to get answers—use it as a learning resource. Ask it to explain new concepts or techniques introduced in its responses.
    8082
    8183* Example: “You used dimentionality reduction in this solution. Can you explain what that is and when it should be used?”
    8284
    83 10. Understand Limitations and Double-Check Critical Code
     85'''10. Understand Limitations and Double-Check Critical Code'''
    8486* Best Practice: ChatGPT might not always produce the optimal or correct code, especially in complex scenarios. Always review and test the code yourself.
    8587