Guessing causes for downvotes can be fraught with peril, but I'll give it a shot:
For your first post, people may have thought the question was not well-posed, but didn't want to give discouraging downvotes to a new user asking their first question.
For your second post, some of those same people may have seen you've now asked two related questions, and didn't feel like your second one incorporated the feedback from the first and made some of the same mistakes. In this case, they were more free with the downvotes
Also, views are not a very good comparison measure. They include multiple views from the same people, and you've posted about your question on Meta and there have been some edits and some comment discussions - likely people including yourself have refreshed that question several times, incrementing the views, but people can only vote once.