hamei wrote:
It doesn't cost any more to write good code instead of the crap we see, so why ? I'm kind of curious.
Lack of skills. Schools still focus too much on memorization instead of teaching the underlying concepts and often jump on the trendy language of the year. It happens way too often that the students only copy&paste snippets from the web together and change them minimally so it sort of works.
The result is that we have a lot of people who barely know one language (Java and C# seem to be popular these days) and nothing else.
I once overheard a conversation about pointers in C... One student asked another how he knows how many asterisks he has to put in a variable declaration and the other proudly replied that he just keeps adding them until it compiles
Sadly, they were final-year BSc students.
It also takes time to properly test software, so most people don't bother. This is especially present in various programs people made for their own amusement and later released as open source.
(I've been guilty of this as well, e.g. with nekopkg.sh, which started as a quick hack that I meant to rewrite but haven't had the time to do so yet.)
From what I've heard, schools don't encourage their students to enable warnings when compiling or to use static code analyzers. This is really bad, because using these tools helps people become better programmers.
I've noticed that the good programmers invest their own time into learning new things and aren't just concerned with passing the classes and getting a piece of paper.
Such people usually end up with well-paid jobs and they have very little competition. Web development is an entry-level job, which explains why some websites are so poorly made.