Code Smarter, Not Harder: AI-Powered Dev Hacks for All
Discover how to harness AI-powered tools for everyday tasks like code generation, documentation writing, and collaborative programming with AI assistants
In this video, Dan Vega takes you through his recommended best pracises as well as some do's and dont's when it comes to coding smarter, not harder with AI.
Dan starts off with a question that we've all heard and I get a lot as well - "Will AI replace developers?"? I agree with Dan's response but he put it much more eloquently - “AI won’t replace developers, but developers who use AI will replace those who don’t".
Dan sets the scene by remining us that most developers enjoy creating things, rather than typing each character and AI has brought him much joy when he’s being hacking around, something I can definitely identify with! AI is never having a bad day.
Dan's Tips
1 - Learning how to talk to robots (effectively) We've all heard the phrase prompt engineering and this is where clear communication comes in. For me, this is similar to how we all learned to use Google effectively, it's the next stage. Dan points out how we need to be clear, structured, give context and howe we can think of it as teaching, not commanding. We need to be specific and then iterate and refine the response.
2 - Prompting with your voice I was surprised by this tip but it makes total sense. Dan suggests having a good microphone and using your voice rather than typing in a huge (specific) prompt following the best practises he just outlined in prompt engineering. I am definitely going to try this one - just chatting rather than crafting the perfect prose!
3 - Learning software development We all have to start somewhere and Dan stresses that junior developers can use AI to break down concepts. For example they can use prompts such as "Explain this to me". This approach scales too, you could use it for learning new code bases too. For more senior developers, they can use AI for performance checks and enhancement, generate ideas and learn about architectural differences.
4 - Reading code As many of us know, we spend way more times reading code than writing it. Dan suggests that we can supply AI with the context we want to understand and then ask questions such as "What does it do?", "What design patterns are in use?", "Break down these functions?". Whilst I'm here, if you haven't already, check out this blog post on how to learn a new programming language with AI.
5 - Writing documentation This tip is very close to my heart and Dan has loads of great tips here. Firstly, if there’s a lack of inline documentation you can use AI to generate some and this is a way to contribute to the product right away. You can also use AI to create usage examples and sample code which has the wonderful side effect of helping others on their journey.
6 - Building tools We all love creating stuff as Dan touched on, it's fun! Dan offers that we can automate things to make our lives easier. All types of tools such as data process, development workflows, API and testing tools, and more.
7 - Working with data This one is a pain point at times for all of us. Have you considered that AI can help you transfer data? What about transforming data to code? That's another popular use case too in many languages. Sometimes we need to generate fake data too and again Dan proposes that we can use AI for this manual labour.
8 - Running models locally Privacy is never far from our minds when it comes to AI and Dan talks about some of the potential pros for running models locally. You can use Ollama to download a model to your local machine (system requirements depending) or you can use Docker Model which is jut on macOS for now and needs Docker Desktop as well. I might just have to ask the boss for a more powerful laptop!
9 - Guiding AI tools Finally, Dan gives us a great overview of the difference between standalone chatbot assistants, inline IDE assistants. and agentic AI IDE environments. I'm definitely guilty of mixing these terms up now and again so check it out to learn more as there’s tonnes of useful information here to help you pick the right one for your job.
Dan's Summary
- You are the pilot not a passenger (review nad refactor)
- Bugs: AI can and will generate incorrect and inefficient code
- Apply the same rigorous testing to AI-generated code as you would your own
- Provide clear, specific, and detailed prompts to the AI model
- AI models train on vast datasets, including open source code with various licenses
- Take the time to understand why the AI suggested a particular piece of code
- AI may suggest outdated information
Dan's Take Aways
- Design with documentation and code review tasks
- Use AI for learning new technologies and concepts
- Integrate AI tools into your existing workflow gradually
- Develop a collection of reliable prompts for common tasks
I hope this article has generated some ideas for you and I look forward to hearing how you've applied Dan's tips for working with AI to your workflow. Drop your comments below!