$30 off During Our Annual Pro Sale. View Details »

Code Search with Laravel and Sourcegraph

Code Search with Laravel and Sourcegraph

Learn to navigate and get onboarded to Laravel codebases faster with Sourcegraph. Find code easily with the click of a button!

UnStack Africa, November, 2021

Otemuyiwa Prosper

November 08, 2021
Tweet

More Decks by Otemuyiwa Prosper

Other Decks in Programming

Transcript

  1. Code Search With Laravel
    &
    Sourcegraph
    https://sourcegraph.com/search

    View Slide

  2. Prosper Otemuyiwa
    Co-founder, Eden Life
    Developer Advocate, Sourcegraph

    View Slide

  3. Question for you!
    ● How do you currently search for open source code?
    ● How do you search for private code?
    ● How do you get code intelligence outside of your local
    editor?

    View Slide

  4. What is Laravel?
    https://laravel.com

    View Slide

  5. Laravel - An artisan’s framework
    ● A Full Stack PHP Framework
    ● An API Backend
    ● A Vibrant and powerful community
    ● Plethora of developer tools e.g Nova, Cashier,
    Forge, Envoyer, Valet, Telescope, Scout,
    Telescope, Sanctum, etc
    ● Educational Platforms e.g Laracasts.com,
    dailylaravel.com, laravel.io etc

    View Slide

  6. Before we continue...

    View Slide

  7. What’s your Sourcegraph Temperature?
    ● I’ve never heard of it.
    ● I’ve heard of it but don’t understand it.
    ● I understand it, but I don’t see how it’s useful.
    ● I see how it could be fun for senior developers, but not for me.
    ● It’s becoming more useful for me.
    ● I use it all the time.
    ● I could not imagine life without it.
    ● Seriously, people are living without it? How?

    View Slide

  8. Enter code search ...
    https://sourcegraph.com

    View Slide

  9. Sourcegraph - Simple & Advanced Code Search

    View Slide

  10. What is Sourcegraph’s Value To You?
    ● Search over 2.1M open source & public
    repositories across GitHub & Gitlab.
    ● Search private code across several repositories
    ● Precise code intelligence
    ● Automation of large scale code changes via Batch
    changes.
    ● Code monitoring
    ● Code insights (still in beta)

    View Slide

  11. Sourcegraph - Code Search Patterns
    ● Literal
    ● Regular expression
    ● Structural

    View Slide

  12. Sourcegraph Search - Literal

    View Slide

  13. Sourcegraph Search - Literal

    View Slide

  14. Sourcegraph Search - Regular Expression

    View Slide

  15. Sourcegraph Search - Regular Expression

    View Slide

  16. Sourcegraph Search - Regular Expression

    View Slide

  17. Sourcegraph Search - Structural Search

    View Slide

  18. Sourcegraph Search - Structural Search

    View Slide

  19. Use Cases you’ll love ...

    View Slide

  20. Reviewing Pull Request on GitHub - How do I get code intelligence
    easily?

    View Slide

  21. Pull Request on GitHub - Hover information

    View Slide

  22. Pull Request on GitHub - Find All References

    View Slide

  23. Find Secrets & Vulnerabilities in your codebase

    View Slide

  24. Find exact dependencies that may be vulnerable.

    View Slide

  25. Find deprecated function calls in your organization’s codebase.

    View Slide

  26. Recap: Why you need Sourcegraph?
    ● Developer velocity - Help all your developers to move fast.
    With code intelligence & great search, code discovery is a
    walk in the park. You don’t need to keep cloning repos to
    effectively search through them!
    ● Onboarding new developers to a codebase - The faster
    developers can understand your massive codebase, the
    better.
    ● Codebase refactors (batch changes) - as codebase grows, you
    need to refactor the codebase more intelligently.

    View Slide

  27. Sourcegraph Search Parameters Recap

    View Slide

  28. Learn more about code search
    https://learn.sourcegraph.com

    View Slide

  29. Sourcegraph Resources!
    ● learn.sourcegraph.com
    ● docs.sourcegraph.com
    ● dev.to/sourcegraph
    ● about.sourcegraph.com/blog
    ● info.sourcegraph.com/dev-tool-time
    ● about.sourcegraph.com/podcast

    View Slide

  30. Twitter: @unicodeveloper
    GitHub: @unicodeveloper
    Thank You & Please reach out!

    View Slide