In Harry Potter and the Goblet of Fire, Harry Potter is the fourth, though underage and unwilling, contestant in the Triwizard Tournament, a competition between three wizarding schools: Hogwarts, Beauxbatons, and Durmstrang.
The tournament consists of three tasks: stealing an egg from a dragon, rescuing something that was taken – one thing for each contestant – from the black lake, and finding the Triwizard Cup that is lost in a maze filled with dangerous magical elements.
However, there’s a twist. The new Defense Against the Dark Arts (DADA) professor, Alastor Moody, is actually Barty Crouch Jr, who disguises himself by drinking a Polyjuice potion.
Crouch, a devoted follower of Voldemort, helps Harry through his trials with the sole purpose of bringing him to Voldemort, who had bewitched the Triwizard Cup into a portkey. This portkey leads Harry to Voldemort’s location, the Riddle estate, where he uses Harry to bring him back to life.
The key difference between Dobby and Neville
In both the book and the movie, Harry is provided with gillyweed in order to help him complete the second task, a plant that allows him to breathe underwater. However, there’s a distinct difference between the two.
In the book, Harry is given the gillyweed by the house elf he’d freed during Harry Potter and the Chamber of Secrets, Dobby. While in the movie, he is given it by Neville Longbottom.
So, the question is, why the change? The movie was directed by Mike Newell and released in 2005 and, to be honest, this change was exactly what the movie (or rather book) needed. Though both characters, and their scenes, have good and bad aspects.
Dobby
Dobby’s a sweet and devoted house elf. He cares strongly for Harry, even to the point of risking injury to him in order to save him. And he tries yet again to save him with the gillyweed.
On one hand, Dobby is more likely to naturally know what plant, or item in general, would help Harry the most in the new task, considering he’s a magical creature. There’s the benefit that Dobby is able to tell Harry just what he’d be rescuing in the lake - Ron Weasley.
However, the book gives no information on just how Dobby got the gillyweed in the first place to give to Harry (one could reasonably assume that he stole it from Professor Snape, but that idea has its own complications).
He also doesn’t have a very positive track record when trying to help Harry. Consider the above statement, where Dobby risks injuring Harry to save him, such as the bludger during the Quidditch game. Although Dobby may be a trustable character, Harry would still be taking a risk.
In the long run, Dobby just isn’t the right person (or magical creature) for the job.
Neville
At this point in the series, everyone knows that Neville is a bit reserved and there is quite a bit of focus on his weaknesses. When Newell chose to use Neville as the character who gives the gillyweed to Harry, it shows the strengths Neville has and gives that a spotlight.
One being his passion and effortless skill in herbology. His love of plants makes it very likely that he would know of gillyweed. A good guess is that he learned about the plant from the book he was given by “Moody” after being taught about the Unforgivable Curses.
And even if you take away that “Moody” gave him a book on plants, it’s just as believable that Neville may have learned it on his own at some point.
On top of that, Neville’s friendship and care for Harry becomes much more obvious through this interaction and his reaction when Harry took the gillyweed at the lake.
That being said, there are some downsides. Considering what we know about Neville by now, and the fact that he’s usually quite scared - especially of Snape, as shown in Harry Potter and the Prisoner of Azkaban when learning Boggarts from Professor Lupin - it’s unlikely he would have had the courage to steal the gillyweed from Professor Snape.
So even with Neville, we have the question of how the gillyweed was obtained in the first place.
Neville also didn’t know anything about the duration or effectiveness of the plant.
Still, Neville wins
Regardless of the pros and cons of each character, it’s simply a better use of character development and showcases the connection better between the two characters, for Neville to be the one to give Harry the gillyweed.
Usually, the books are better than the movies. But I think in the case of, at least this scene, in Harry Potter and the Goblet of Fire, the movie did it better.