I want to discuss that law, that until you're 17 years old, you may not use magic outside school. When I've discussed it before, people have brought forwards arguements for why it's a good idea. Like most kids probably aren't mature enough to use magic with care, or that muggle parents won't be able to stop magic, if it gets out of hand. And there's also a law, that not even adult wizards and witches may use magic in front of muggles, unless they have to in order to save their own or someone else's life.
But still, come on! Even if Harry had been the one, who had levitated that cake in "Chamber of secrets", what would have been the big deal? He would almost have been expelled from Hogwarts for levitating a cake during the summer? And that it really was Dobby, who had done it, just makes it worse. Those ministry idiots almost wanted to expel a boy from school, not only despite it being a very minor thing, but also despite it not even having been him, who had done it! I'm sorry, but unless they can tell a difference between a wizard's magic and a house elf's magic, they should just butt out.
And then, we have the incident in "Order of the phoenix", when Harry produced a patronus and was almost expelled for that! I mean, shouldn't the ministry have made sure, that all their dementors were where they should be, rather than having a cow over a fifteen-year-old doing magic during the summer? And they also made a big deal out of Harry having done it in front of Dudley, a muggle, even though he was his cousin, who knew about his magic! Harry was lucky to have Dumbledore step in and convince most members of the council, that there actually had been dementors about, so he could be acquitted.
To sum this up, while it might be necessary to have age limits, this underage magic law seems rather weird, and it just seems to be there to give Harry more trouble, as if he needed that. Especially since the ministry can't even tell, if the kid or someone else did the magic, only that magic had been done around him or her, which is just stupid. That way, kids with magical parents can do whatever they want, while someone living with muggles can be accused of something, that a house elf did, and can't even save their cousin's soul from being sucked out of him without almost being expelled from school. And there's another thing too. Why would someone be expelled from school for something, that happened during the summer break? It just doesn't make sense.