3 ms·
And this is another reason why everyone regards PHP developers as being a tinsy bit crap at developing software. It's a broken solution to a problem that shoul
by sandfox 14y ago
And this is another reason why everyone regards PHP developers as being a tinsy bit crap at developing software. It's a broken solution to a problem that shouldn't really be there. Ignoring why the race condition is happening, what is wrong with something like Redis or heaven forbid semaphores/shared memory for locking. There are billions of ways of doing atomic updates right and this is not one of them
--EDIT
I hadn't even got as far as the disk i/o section, after reading no words can do justice to the complete lack of understanding shown here with regards to filesystems, caching, SSD's and linux.
- Gigablah 14y agoNot to mention you wouldn't even have a need for this so-called "optimization" in production, since you'd have your templates precompiled and cached (and turned the compile check off).
- mootothemax 14y agoAnd this is another reason why everyone regards PHP developers as being a tinsy bit crap at developing software. It's a broken solution to a problem that shouldn't really be there. Very much agree with you. When I was first starting out programming commercially, one of the best bits of advice I received was something along the lines of "Take a step back and think about why you're using these crazy constructs - chances are there's a much simpler way of doing things." The lesson being: if you're having to write code like this, chances are it's because you're creating a mess. Take a step back and work out a simpler solution.
- xd 14y ago"And this is another reason why everyone regards PHP developers as being a tinsy bit crap at developing software." Replace "PHP" with "Jewish" and would you find that comment of yours acceptable? Edit: I can only assume that the down voters find discrimination acceptable behavior in this community.
- sandfox 14y agoTrollolol much? The religion of the author (is he even jewish? - I have no idea nor really care) seems fairly irrelevant here. In the context of the article the author is acting as a PHP developer. Therefore his actions will viewed as such and any opinions will on his work will (I assume) most likely become referenced to 'PHP developers'. If there was a seemingly large correlation with being jewish and producing crap software, and this article just made that correlation stronger, then yes I would make that comment.
- xd 14y agoYou missed my point, big time. It was your sweeping comment lumping all PHP developers as being regarded as crap developers I was getting at. You wouldn't make comments like that about any other groups of people and find it acceptable .. or do you find discrimination acceptable?
- sandfox 14y agoI am a PHP developer (amongst other things), and incase you hadn't noticed we are frequently regarded by developers of other languages as being at the comedy/clown end of the development spectrum too often. I didn't say all PHP developers are crap (although I think there are lots that are beyond dire), i said we are observed as being crap, to paraphrase. I would happily make comments about any group based upon observation or information I felt to be true. Furthermore - there is no discrimination in my post that I'm aware of. Even if there was, discrimination by itself is not a 'good' or 'evil' thing, it is what that discrimination is then applied to or for that introduces any ethical/moral dimension.
- xd 14y agoI wasn't aware you were a PHP developer and were making the comment from the point of view as one; something you might have wanted to mention really with an implication such as the one I took issue with. Either way, I stand by my comments.
- thejosh 14y agoYeah, but you get these somewhat popular outdated libraries pop up and people point at them and say "this is shit!". It is. There are better ways to do PHP... and there is bad PHP code examples and also good PHP code examples like there is in any language.
- sandfox 14y agoVery valid point, whilst some evils are necessary, I think it might be responsible of the author to point out the greater context of what he is doing and why so people don't start doing this willy-nilly. As a contrived example, an article about "How I replaced my engine using a crowbar" might lead people to believe that is the ideal way to replace engines and have mechanics groaning everywhere. If however the article was "How I replaced my engine using a crowbar whilst stuck in the desert with no other tools to hand" then everyone would understand a) don't do this in normal circumstance, b) there is another way to do it in less normal circumstances.