I can already hear the groans. But yes, I use AI and I use AI to help me try and learn about things I don’t know about. This harks back to the early days of Copilot, the artist formerly known as Bing Chat.
The conversational nature of using an AI chatbot over a regular web search has always resonated with me. If I just want to find one specific thing, a web search is fine, but if I want to do some actual research, learn about something, then being able to ask questions, revisit topics easily, is something I enjoy. It feels closer to the experience of speaking to a teacher back in school, having a back and forth, and that’s how I learn best.
Learning about PowerShell has been on my to-do list for quite some time. Not for any reason other than curiosity. So I finally decided to start, deploying various AI tools in my quest. I’ve tried reading books, but I don’t learn best by just reading. I learn best by asking questions, trying things, breaking things, and then figuring them out.
What’s become apparent to me, almost immediately, though, is that AI is no match, at least right now, for human experts. It’s no magic fix, and without someone who knows what they’re doing (which is very much not me) then it’s going to break things. A lot.
To be clear, I’m also not necessarily advocating this as the ‘right’ way to go about this. I’m merely documenting my experience.
Starting small, working through a project
As with any new learnings, it’s always best to start small. So I decided to tackle a PowerShell profile. Even completely fresh, I had a basic understanding of what it’s for – similar in purpose to a .bashrc on Linux. But I had no idea what sort of things might go in there, beyond copy and pasting the code needed to use the Starship prompt that I use everywhere.
So using Google Gemini at first, I simply started asking about PowerShell profiles, looking for some simple suggestions on things that might work for me. I realise I could get the same information through regular web search, but, again, the conversational nature, especially when researching, makes a difference to me. I can still go and read the cited links for more information, but being able to quickly ask about specific points and get an answer I can understand is important.
Eventually I had a small list of things to add:
- PSReadLine history and intellisense
- Invoking the Starship prompt
- Adding Fastfetch at startup
- Adding a cooldown so Fastfetch only appears every so often when launching PowerShell
- A simple word count function for documents that would trigger using the command “wc” instead of the more verbose PowerShell command being needed every time.
Hardly groundbreaking stuff, but, starting small.
Starship is easy because the tool gives you the command you need to add. Everything else I worked through with AI to not only help me generate the commands I needed, but to explain what they do and how they’re used.
Success and failure
Where this process showed me that AI can definitely not turn a complete noob into a pretend expert is that just asking it to generate what I wanted ultimately failed. But I’m also glad it did.
What I ended up doing was working the problem, feeding back specific errors, finding out what the errors were for, and trying to troubleshoot. Did it take time? Sure. But in the process I actually learned a few things. For example, I hadn’t been specific about using PowerShell 7 and not Windows PowerShell, and there are apparently some differences.
I also learned about creating functions, why you might create a function, and how to do it. Again, the process was me asking for help, with explanations on what everything does, trying it, and then going back when the first try didn’t work.
I won’t pretend it’s like debugging code as someone who knows what they’re doing, but the process has been somewhat similar. Things don’t work, work the problem until it does.
The short version is I got to where I wanted to get, I learned about some PowerShell commands and how to create functions along the way, and it works. But not without going round in circles a few times, first.
Human experts are still key
If I were already a PowerShell whiz, I wouldn’t be doing things this way, would I? But equally, even on this very basic project, I couldn’t simply tell AI what I wanted and have it create it. It didn’t work.
Sure, my experience so far has been on the most basic level, but even here, AI hasn’t just been able to magically generate some code that did a thing. It’d be fine if it did, but it’s enough to show me that without a human being that knows what they’re doing, AI will trip up and introduce points of failure.
AI shouldn’t be used to replace coders. Make their lives more efficient? Absolutely. Were I someone in the know using AI to quickly build a function over writing it all out manually, I’d be able to spot the issues with it and rectify. In my case, it took many minutes of back and forth understanding errors and trying to prize the correct answers. And to make sure I understood.
I’m still going to continue down this path, plugging away, using AI to try and learn new skills. But in the bigger picture AI needs to be built to work with us, not replace us. At least, if we value quality.
Oh, and the finished article is here, if anyone wants to add constructive criticism. A man is trying to learn, after all!
Follow Windows Central on Google News to keep our latest news, insights, and features at the top of your feeds!
#learn #PowerShell #good #bad