u/Global-Examination-6

My Advice to Google for Gemini 3.1 Pro at coding

I primarily use Claude Opus, but I also have two Google Pro subscriptions across 2 google accounts, so I test Gemini 3.1 Pro frequently for coding inside Antigravity.

It’s a mess.

Tool calling feels inconsistent, context handling is weak, and it often just “goes with the flow” instead of reasoning properly through the task. Something Opus might take 2–4 minutes to carefully build, Gemini finishes in 30 seconds with significantly worse results.

That said, Gemini 3.1 Pro is still a very capable model. It powers Veo, Nano Banana, and several other upper-layer Google AI products, so clearly the core model has strong potential. I think the issue is that Google’s AI team is trying to make one general-purpose model handle too many things at once.

My suggestion: build a dedicated coding-focused branch.

Models like GPT 5.4 in Codex, Qwen 3.5 Code, Claude Opus 4.7 in Claude code and GLM feel far superior for programming workflows because their entire stack is optimized around coding, tool use, context management, reasoning flow, and developer experience. A specialized coding interface would probably make Gemini much more competitive.

reddit.com
u/Global-Examination-6 — 13 days ago

Saw a YouTube video about getting a free Oracle Cloud VM (Ampere/A1 Flex), so I set up a GitHub Actions workflow that retries every 25 minutes, checks if a VM is already running, and triggers a Resource Manager apply job if not.

Ran it on the Singapore region for 3 straight months. Never got one. Always out of capacity.

If anyone's chasing the free tier ARM VM right now — it's extremely hard to get. The YouTube tutorials make it look way easier than it is. You're basically gambling against thousands of other people running the same retry scripts 24/7.

Sharing the workflow below in case anyone still wants to try (works on any region, just set your GitHub secrets):

yaml

name: Retry Oracle VM Creation

on:
  schedule:
    - cron: '*/25 * * * *'   # every 25 minutes
  workflow_dispatch:          # manual trigger anytime

jobs:
  create-vm:
    runs-on: ubuntu-latest

    steps:

      # ── 1. Install OCI CLI ──────────────────────────────────────────
      - name: Install OCI CLI
        run: |
          curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh -o install.sh
          bash install.sh --accept-all-defaults
          echo "$HOME/bin" >> $GITHUB_PATH

      # ── 2. Write credentials + auto-convert key format ─────────────
      # Required GitHub Secrets:
      #   OCI_CONFIG       -> contents of your ~/.oci/config file
      #   OCI_KEY          -> contents of your OCI API private key (PEM)
      #   COMPARTMENT_ID   -> OCID of the compartment to check for VMs
      #   STACK_ID         -> OCID of the Resource Manager stack to apply
      - name: Configure OCI credentials
        env:
          OCI_CONFIG_CONTENT: ${{ secrets.OCI_CONFIG }}
          OCI_KEY_CONTENT: ${{ secrets.OCI_KEY }}
        run: |
          mkdir -p ~/.oci

          # Suppress OCI warning globally
          echo "SUPPRESS_LABEL_WARNING=True" >> $GITHUB_ENV

          printf '%s\n' "$OCI_CONFIG_CONTENT" > ~/.oci/config
          printf '%s\n' "$OCI_KEY_CONTENT" > ~/.oci/key_input.pem

          echo "=== Raw key line count ==="
          wc -l ~/.oci/key_input.pem
          echo "=== First line ==="
          head -1 ~/.oci/key_input.pem
          echo "=== Last line ==="
          tail -1 ~/.oci/key_input.pem

          # Strip everything outside the PEM block
          python3 -c "
          import re
          with open('/home/runner/.oci/key_input.pem') as f:
              content = f.read()
          match = re.search(r'-----BEGIN[^-]+-----[\s\S]+?-----END[^-]+-----', content)
          if match:
              with open('/home/runner/.oci/key_input.pem', 'w') as f:
                  f.write(match.group(0) + '\n')
              print('PEM block extracted cleanly')
          else:
              print('ERROR: No valid PEM block found!')
              exit(1)
          "

          echo "=== After clean - first line ==="
          head -1 ~/.oci/key_input.pem
          echo "=== After clean - last line ==="
          tail -1 ~/.oci/key_input.pem

          # Convert PKCS#8 to RSA if needed
          if grep -q "BEGIN PRIVATE KEY" ~/.oci/key_input.pem; then
            echo "Converting PKCS#8 to RSA..."
            openssl rsa -in ~/.oci/key_input.pem -out ~/.oci/key.pem 2>&1
          else
            echo "Already RSA format"
            cp ~/.oci/key_input.pem ~/.oci/key.pem
          fi

          chmod 600 ~/.oci/key.pem
          chmod 600 ~/.oci/config

          echo "=== FINAL key first line ==="
          head -1 ~/.oci/key.pem
          echo "=== FINAL key last line ==="
          tail -1 ~/.oci/key.pem

      # ── 3. Test OCI auth ────────────────────────────────────────────
      - name: Test OCI Auth
        env:
          SUPPRESS_LABEL_WARNING: "True"
        run: |
          echo "=== Testing OCI API auth ==="
          $HOME/bin/oci iam region list --output table
          echo "Auth successful"

      # ── 4. Check if VM already running ─────────────────────────────
      - name: Check for existing RUNNING VM
        id: check_vm
        env:
          SUPPRESS_LABEL_WARNING: "True"
        run: |
          echo "Checking for existing RUNNING compute instances..."

          RUNNING=$($HOME/bin/oci compute instance list \
            --compartment-id "${{ secrets.COMPARTMENT_ID }}" \
            --lifecycle-state RUNNING \
            --output json 2>&1)

          echo "=== Instance list response ==="
          echo "$RUNNING"
          echo "=============================="

          COUNT=$(echo "$RUNNING" | python3 -c "
          import sys, json, re
          raw = sys.stdin.read()
          match = re.search(r'\{.*\}', raw, re.DOTALL)
          if match:
            try:
              data = json.loads(match.group(0))
              print(len(data.get('data', [])))
            except:
              print(0)
          else:
            print(0)
          ")

          echo "Running VM count: $COUNT"
          echo "running_count=$COUNT" >> $GITHUB_OUTPUT

      # ── 5. Skip if VM already exists ───────────────────────────────
      - name: VM already running - skip
        if: steps.check_vm.outputs.running_count != '0'
        run: |
          echo "VM is already RUNNING. No action needed."

      # ── 6. Trigger Resource Manager apply job ──────────────────────
      - name: Trigger Resource Manager Apply Job
        if: steps.check_vm.outputs.running_count == '0'
        id: trigger_job
        env:
          SUPPRESS_LABEL_WARNING: "True"
        run: |
          echo "No running VM found. Triggering Resource Manager stack job..."

          JOB_RESPONSE=$($HOME/bin/oci resource-manager job create-apply-job \
            --stack-id "${{ secrets.STACK_ID }}" \
            --execution-plan-strategy AUTO_APPROVED \
            --output json 2>&1)

          echo "=== RAW JOB RESPONSE ==="
          echo "$JOB_RESPONSE"
          echo "========================"

          # Strip warning lines before parsing JSON
          JOB_ID=$(echo "$JOB_RESPONSE" | python3 -c "
          import sys, json, re
          raw = sys.stdin.read()
          match = re.search(r'\{.*\}', raw, re.DOTALL)
          if match:
            try:
              data = json.loads(match.group(0))
              print(data['data']['id'])
            except Exception as e:
              print('')
          else:
            print('')
          " 2>/dev/null)

          echo "Extracted Job ID: $JOB_ID"

          if [ -z "$JOB_ID" ]; then
            echo "Failed to create Resource Manager job."
            echo "Likely out-of-capacity - will retry in 25 minutes."
            exit 1
          fi

          echo "job_id=$JOB_ID" >> $GITHUB_OUTPUT
          echo "Job created: $JOB_ID"

      # ── 7. Poll job until success or failure ───────────────────────
      - name: Poll Job Status
        if: steps.check_vm.outputs.running_count == '0' && steps.trigger_job.outputs.job_id != ''
        env:
          SUPPRESS_LABEL_WARNING: "True"
        run: |
          JOB_ID="${{ steps.trigger_job.outputs.job_id }}"
          echo "Polling job: $JOB_ID"
          echo "Checking every 30 seconds for up to 15 minutes..."

          for i in {1..30}; do
            sleep 30

            RAW_STATE=$($HOME/bin/oci resource-manager job get \
              --job-id "$JOB_ID" \
              --output json 2>&1)

            STATE=$(echo "$RAW_STATE" | python3 -c "
            import sys, json, re
            raw = sys.stdin.read()
            match = re.search(r'\{.*\}', raw, re.DOTALL)
            if match:
              try:
                data = json.loads(match.group(0))
                print(data['data']['lifecycle-state'])
              except:
                print('UNKNOWN')
            else:
              print('UNKNOWN')
            " 2>/dev/null)

            echo "Attempt $i/30 - Job state: $STATE"

            if [ "$STATE" = "SUCCEEDED" ]; then
              echo "VM CREATED SUCCESSFULLY!"
              exit 0
            elif [ "$STATE" = "FAILED" ]; then
              echo "Job failed - likely out of capacity. Will retry in 25 minutes."
              exit 1
            elif [ "$STATE" = "CANCELED" ]; then
              echo "Job was canceled."
              exit 1
            fi
          done

          echo "Timed out waiting for job. Will retry in 25 minutes."
          exit 1

Required GitHub Secrets: OCI_CONFIG, OCI_KEY, COMPARTMENT_ID, STACK_ID

I would suggest go for any cheap VM there are plenty options or just purchase an oracle VM.

reddit.com
u/Global-Examination-6 — 25 days ago