5 ms·
We can all poke at this person for doing things incorrectly, but one has to wonder what mindset could lead to any programmer ever thinking that: 1) parsing a
by johnklos 4y ago
We can all poke at this person for doing things incorrectly, but one has to wonder what mindset could lead to any programmer ever thinking that:
1) parsing a web page shouldn't be considered incredibly fraught with problems
2) that reloading web pages should be part of (1)
3) that this should ever possibly be run without validating the list of files that would be deleted
So forget the specifics. Where are people learning these things, and what do we do to teach them better things?
- dboreham 4y agoCollege? Parents? In my experience it runs pretty deep so not sure it can be easily trained out. This mindset is probably quite useful in evolutionary terms: rush at the attacking bear without thinking, for example.
- plonk 4y ago> rush at the attacking bear without thinking, for example Would that work? I don’t see a bear backing down and I don’t see the human winning either.
- dncornholio 4y agoSome mistakes can only be learned by making them. Sometimes you can tell someone a hundred times something, they won't learn until they experience it. The point is not to prevent these mistakes, but to keep the consequences low. Have backups, have version control, etc.
- ufmace 4y agoTrue, and worth remembering why. Most of us are constantly getting warned about the dire potential consequences of huge numbers of things, most of which are either massively unlikely to ever happen or not actually that bad, or both. It's very difficult to tell which of the things we get warned about are actually high risk until something bites us.
- qayxc 4y ago> Where are people learning these things, and what do we do to teach them better things? Learn to learn and learn to work carefully. It starts in school and should be part of a proper college/university education or vocational training. There's several ways of learning the specifics: by experience on-the-job, which can be hard if mistakes can get you fired; or by putting in the work in your free time. If your job is to work with certain web frameworks and you're not very experienced, either ask senior devs to assist/review before going live with critical changes. Alternatively, practice at home. Unpopular, but you need to get experience from somewhere. OSS projects are a great way to do that - be that by creating your own or by contributing to an existing one.
- Mo3 4y agoSeriously.. also, looking at these code snippets... If someone delivers code that looks like that, especially if intended for a production system, I'm firing immediately. It's a miracle nothing has happened sooner.
- ziddoap 4y agoFrom the article: >I'm a Junior Developer with less than one year of actual experience. >The bad news is that this was on Friday, and we needed to have the videos back up at most for Tuesday morning. You say: >If someone delivers code that looks like that, especially if intended for a production system, I'm firing immediately Fire immediately? What a miserable sounding place to work.
- Mo3 4y agoIn this case - seeing how they let them have direct access to production - I agree on the miserable sounding place to work and repeat myself - It’s a miracle nothing happened sooner
- ziddoap 4y agoI was referring to your workplace.
- Mo3 4y agoAt least we don’t let junior developers with close to zero experience anywhere near production.. I didn’t quite read the part about his experience in the article, I agree firing over that wouldn’t be fair, but that just raises other questions.
- bsder 4y ago"rm -rf" blowing you foot off is a Unix Right of Passage(tm). You will do it at least once in your career. If you're old enough you will do it twice. If you're really old, you get the joy of doing it a third time. The subtlety increases each time because you do learn.