I used NotebookLM to learn a new programming language, and it actually worked

0
I used NotebookLM to learn a new programming language, and it actually worked

I’m a Computer Science student, and it’s currently July as I’m writing this article, meaning I’m on summer break. Though I’m working more than I do when college is in session and catching up on all the Netflix shows and movies that looked ten times more appealing during finals, spending the summer not learning something still feels kind of illegal. A huge part of my major is programming, and it’s something I’ve loved since I was ten years old.

But despite that passion, I’d be lying if I said I know a lot of programming languages. I can currently code well in Python, C, and C++, but I’ve been wanting to get into some mobile development for a while now. Given that I have a fair bit of free time on my hands right now, I figured this was the perfect opportunity to finally dive in.

Since I’ve always been an Apple user, I naturally started looking into Swift. I’ve been using Google’s AI-powered research assistant, NotebookLM, a lot these days, primarily because of its source-grounded nature. I randomly got an idea: why not use NotebookLM to learn Swift? That’s exactly what I did, and the results surprised me.

Related

If I had to start using NotebookLM again, this is what I’d do differently from the start

Learn from my chaos!

Hold up, why use NotebookLM to learn Swift?

Not your typical way to learn a language, I know

Learning Swift using YouTube

I know. Using a “research assistant” to learn a programming language you haven’t ever touched before sounds weird and unconventional. But hear me out. Typically, you have a few different ways to learn a new programming language:

  • Go the traditional route, and learn using a book.
  • Get an over-priced online course, and hope you actually end up completeting it.
  • Binge-watch tutorial videos on YouTube until your brain melts.

Another option is to dive straight into a project and Google your way through it. Now that AI is such a big thing, you can also just “vibe-code” what you want to create with a chatbot open on the side.

Though I do want to learn Swift to build some of the random ideas I have, and I could definitely vibe-code my way through it, I actually want to learn the language. For me, the fun part of programming has always been the actual programming bit. I’m not a fan of just copying and pasting things and crossing my fingers hoping it works. Using AI tools like ChatGPT or Gemini is definitely an option, but I’ve noticed they often give contradicting information.

NotebookLM’s strength, on the other hand, is that it essentially builds a personalized AI that’s trained on the information you feed it. This meant I could create a NotebookLM notebook and add relevant sources like Apple’s official Swift documentation, brief YouTube tutorials, Swift cheat sheets, and more.

Related

5 ways NotebookLM completely changed my workflow (for the better)

Hey Siri, how did I ever survive before NotebookLM?

What I included in my Swift NotebookLM notebook

The sources made all the difference

With any NotebookLM notebook, the most important thing is the sources you add. So, the first step here was to populate my notebook with sources that’d help me learn best. I spent hours browsing through Reddit, reading blog posts, and asking Swift developers what resources helped them the most when they were starting out. Most suggested the official Swift documentation published by Apple, The Swift Programming Language.

Though it was downloadable as an eBook from the Apple Books Store, there wasn’t a built-in way to export it as a PDF so I could add it as a source for my NotebookLM notebook. The documentation was also available on Apple’s Swift docs site. And while NotebookLM does accept website URLs as sources, the documentation was divided across different pages, which meant I couldn’t just upload the link and call it a day. I tried uploading the URL for each page, but it didn’t help either. It kept uploading the same page again and again.

So, I used the Myndo Chrome extension, which essentially converts content you clip into markdown that LLMs like NotebookLM can easily understand. I manually clipped all the pages I needed to get started with the basics of Swift from Apple’s documentation and uploaded it as a source. Since the source is added as a Google Doc, all I need to do is hit the Click to Sync with Google Drive button to avoid the need to remove the Doc from NotebookLM and upload it again every time I update it. This way, once I’m done with the basics and begin clipping more advanced Swift topics using Myndo, all I need to do is sync the existing Doc instead of creating a new one from scratch and uploading it as a source.

Though I found Apple’s documentation good enough to start off with, I also filled up my notebook with a few YouTube tutorials that were highly recommended by people online. Now, NotebookLM obviously doesn’t “watch” the videos you add, but it does pull in their transcripts, and you can interact with those just like you would with any written source. Sure, transcripts aren’t always 100% accurate, but I find using NotebookLM to “watch” YouTube tutorials way better than sitting through hour-long videos and trying to remember what was said halfway through.

Related

If you haven’t tried NotebookLM yet, here are 3 reasons to start now

Seriously, what are you waiting for?

How NotebookLM actually helped me learn Swift

So… did it actually help?

asking notebooklm a programming question

Once the sources are sorted, the fun part finally begins — actually learning Swift. As mentioned above, I started off with a single document that included a few of the clipped pages from Apple’s official Swift documentation, all focusing on the absolute basics of Swift. Given that I do know Python, C, and C++ well, I prompted NotebookLM with the following:

I’m a beginner learning Swift. I know Python, C and C++, but haven’t learnt Swift before. Can you explain the absolute basics to me and give me an idea of the syntax? We can skip the theory, and focus on what would help me code. Keep in mind my existing knowledge of Python, C and C++.

The best part about NotebookLM is it does exactly what you ask, without giving you unnecessary information or hallucinating. It pulled the relevant information from my sources and explained all the basics of Swift to me. It even included examples of how Swift’s syntax differs from the programming languages I already know, which I found really helpful.

NotebookLM comparison of C and Swift

Of course, since Swift is a language I’m completely new to, there were some concepts I hadn’t heard of before and was still confused about. With NotebookLM, instead of having to Google each term individually or watch multiple YouTube tutorials for every confusing concept, I just asked follow-up questions. Since it only pulls from the sources I added, I didn’t have to worry about outdated or contradictory info, which is something I often run into with regular chatbots.

Though I found that NotebookLM’s Audio Overviews feature didn’t help much with this, the Mind Maps feature was a game-changer.

Swift Programming language Mind Map

It summarized all the core concepts in a visual branching diagram, which helped me quickly review the material and understand how different topics were connected, especially when jumping back into learning after a break.

Related

I created an “Everything” notebook in NotebookLM, and it’s one of the smartest moves I’ve made

All it took was one notebook to fix the chaos.

So, would I do it again with another language? Without a doubt.

This was far from my first time learning a new programming language, but using NotebookLM was probably the most engaging way I’ve learnt one so far. That’s because NotebookLM made the process feel less like studying and more like having a tutor that just… gets me and how I learn best.

link

Leave a Reply

Your email address will not be published. Required fields are marked *