Of course, but the site guidelines are clear about how to do so:
"Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something."
https://news.ycombinator.com/newsguidelines.html
It's also worth checking out the Show HN guidelines:
Be respectful. Anyone sharing work is making a contribution, however modest.
Ask questions out of curiosity. Don't cross-examine.
Instead of "you're doing it wrong", suggest alternatives. When someone is learning, help them learn more.
When something isn't good, you needn't pretend that it is, but don't be gratuitously negative.
https://news.ycombinator.com/showhn.html
The current post wasn't a Show HN, of course. But the same spirit applies.