Hacker News new | ask | show | jobs
by mweibel 2713 days ago
I downvoted you because your comment doesn't help anybody and is offensive. Why do you think your example is better?
1 comments

Because the examples given in this "book" teach a bad coding style and explain nothing in detail. If a trainee only used this to prepare for the final exams and I was to ask a more in depth question he would propably fail.

Example: "Why do you use double quotes everywhere?" Most probable answer: "Because I can use variables and the backslash-n thingies everywhere and its more convinient than using single quotes."

Example: "Why do you use '. "\n";' instead of the PHP_EOL constant?" Most probable answer: "What is PHP_EOL?";

Example: "Why aren't you using namespaces anywhere?" Most probable answer: "What are namespaces?"

Altough this might be a german perspective but I would not hire someone that presents me this kind of code. And for anyone saying "But this is only one book to learn the basics?" why not learn it the right way from the start?