|
venutolo posted:Would you elaborate on this? What did it involve? I've previously not heard of this practice. Take 3 employees. I wrote code for Function A I had to write a test code for Function B I had to QA test Function C.
|
# ? Jun 27, 2017 06:13 |
|
|
# ? May 17, 2024 22:57 |
|
Pair programming and test-driven development. Alice writes a valid and failing unit test. Bob changes the implementation to make it pass. In some versions of this exercise, Alice writes the next test, whereas in some versions, Bob does. Keep going until all the requirements have tests demonstrating they've been met. This is the only context in which "writing tests for somebody else's code" doesn't make me wary of other problems.
|
# ? Jun 27, 2017 07:03 |
|
JewKiller 3000 posted:on the other hand, having yourself write the tests for the code you just wrote usually means you write the same code again, only backwards The bold part is not true. You write a little bit of code that gives the method input and checks the expected outcome based on that input. You basically write design specs in test format. Because that is what you do, you write tests, not functional code. In fact, as soon as you start writing tests that have a decision flow, you are doing it wrong. See my other posts about test automation in this thread. But I am biased, I do nothing but writing tests for other people's code and make money because nobody else wants to do it while not having to work very hard. There is a lot of side effects in QA such as mentioned but after more then a decade in the field, I got immune to that. Still kind of decided I will move more into "real" developer roles as the demand is even higher, pay is better and it seems devs are not seen as a cost center. Will take me a year or two to get some basic certification and work in a project where I can convince them that I can put that project on my cv as a dev to be able to sell myself as a dev to the next project. Work on OSS stuff in the mean time to get some more experience. The usual :-)
|
# ? Jun 27, 2017 09:12 |
|
I don't know anything about your particular situation, but in my own anecdotal experience, having developers not write their own tests is a great way to ensure all the code on a project is not written to be easily testable, and that test coverage is scattershot attempts at grey-box half-measure "integration tests" that test nothing in particular. It's certainly possible to do it, and get it right, but it definitely requires a strong testing culture and developers who have had lots of experience writing tests even if they're not the ones doing it right now.
|
# ? Jun 27, 2017 15:14 |
|
Vulture Culture posted:having developers not write their own tests is a great way to ensure all the code on a project is not written to be easily testable I feel like this is an often-overlooked benefit of a strong unit testing culture. Even if code-coverage isn't some arbitrarily high percentage or the tests are trivial, designing the code for ease of testing is almost always the way to go. One example from recent experience is a codebase (zero tests) that used property injection instead of constructor injection and multi-level abstract class inheritance. So, properties on the base classes would be injected and in order to attempt to test a method, you'd basically have to untangle all the magic that happened in multiple files without a clear picture of what needed to be mocked. I posit that a unit-test culture would've immediately convinced the developer of that code that what he is doing is stupid and bad. The pain and friction that happens when you go to write tests is a strong indication that you need to rethink what you're doing. If your code is hard to test, it is bad code. Q.E.D.
|
# ? Jun 27, 2017 17:00 |
|
Guy: What don't you like about my code? Me: Well, <long list of carefully thought out criticisms, without trying to personally attack him or his code> Guy: I'm just going to leave it the way it is. I like it because I wrote it.
|
# ? Jun 27, 2017 20:49 |
|
We have zero people dedicated to testing or QA and I would estimate that 75% of my coding time is spent working on tests as a result, but I've literally never gotten any sort of pressure to skimp on that to get features out.
|
# ? Jun 27, 2017 21:25 |
|
You're living the dream.
|
# ? Jun 28, 2017 00:02 |
|
The ability to take as long as I feel I need to get something into a shippable state with only rare deadlines is definitely one of the things I really like about my current job.
|
# ? Jun 28, 2017 00:11 |
|
CPColin posted:You're living the dream. No kidding. Cherish that job.
|
# ? Jun 28, 2017 00:59 |
|
Plorkyeran posted:The ability to take as long as I feel I need to get something into a shippable state with only rare deadlines is definitely one of the things I really like about my current job. Meanwhile: "Hey Che I know we talked about slowing down and doing more deliberate release cycles with builds on UAT/staging environments for a certain amount of time, but we want you to release this new feature as a hotfix because customer wants it and will be annoyed if they don't have it (i.e. The situation for every customer and stakeholder on the planet that will exist until the heat death of the universe)."
|
# ? Jun 28, 2017 01:03 |
|
I work for a consulting company and in between gigs I am on the bench. I still get paid and just work on either personal projects to learn new poo poo, or projects the company needs done. I like the bench. But when you're on the bench you also get sent out on a lot of time wasting interviews. I get to interview at some pyramid scheme makeup company tomorrow (I live in Utah so there's loads of pyramid scheme companies around) for a back-end PHP development position. I told the guy that I only do front end stuff and what little PHP I've done has been really basic. His response "well, it's good to interview anyway, right?" I just know this is going to be one of those "writing code on a whiteboard" interviews where I'm going to end up looking like an idiot because that's just not how I (or anyone, really) write code. I'm wasting my time, the client's time, and the agency's time, and potentially making myself and this guy look like idiots for showing up.
|
# ? Jun 28, 2017 01:55 |
|
GutBomb posted:I work for a consulting company and in between gigs I am on the bench. I still get paid and just work on either personal projects to learn new poo poo, or projects the company needs done. I like the bench. But when you're on the bench you also get sent out on a lot of time wasting interviews. I get to interview at some pyramid scheme makeup company tomorrow (I live in Utah so there's loads of pyramid scheme companies around) for a back-end PHP development position. I told the guy that I only do front end stuff and what little PHP I've done has been really basic. His response "well, it's good to interview anyway, right?" Spend the entire interview telling them PHP is trash and how they should throw out everything and re-write it, and you are the perfect choice for such a task.
|
# ? Jun 28, 2017 02:03 |
For half a second I wondered if there actually were people who show up to an interview and spend the entire time bagging on the company's language/stack choices and then I realized of course there are.
|
|
# ? Jun 28, 2017 04:06 |
|
hailthefish posted:For half a second I wondered if there actually were people who show up to an interview and spend the entire time bagging on the company's language/stack choices and then I realized of course there are. A few months ago, I phone interviewed with one company and when they said they were a ruby shop and would I be okay with it (this was not mentioned anywhere in the job description and they were looking for java). I may have said slightly audibly on call with 3 devs, "Oh gently caress, really?" because all I could think of was this: http://classicprogrammerpaintings.com/post/142737403879/programmers-at-work-maintaining-a-ruby-on-rails
|
# ? Jun 28, 2017 04:20 |
|
How have I never seen that site before? Holy poo poo that's incredible
|
# ? Jun 28, 2017 04:55 |
|
My Rhythmic Crotch posted:How have I never seen that site before? Holy poo poo that's incredible Probably my favorite: Another Developer explaining SEO to marketing
|
# ? Jun 28, 2017 05:45 |
|
Skandranon posted:Spend the entire interview telling them PHP is trash and how they should throw out everything and re-write it, and you are the perfect choice for such a task. Care to elaborate on why this is a common opinion? I'm genuinely curious, I just graduated and interviewed for a PHP position, and the only thing I really knew about the language was "people think it's a trash scripting language." I'm handy with Python, so I figured what the hell. Fortunately, they didn't ask me to code anything, and I accepted a position elsewhere.
|
# ? Jun 28, 2017 05:50 |
|
Smugworth posted:Care to elaborate on why this is a common opinion? I'm genuinely curious, I just graduated and interviewed for a PHP position, and the only thing I really knew about the language was "people think it's a trash scripting language." I'm handy with Python, so I figured what the hell. Fortunately, they didn't ask me to code anything, and I accepted a position elsewhere. There are a whole host of reasons. But this has been the "opinion" for 15 years. You can write good even great PHP. It's just that PHP allows people to write bad code easily. JavaScript is similar in this regard. One of my old favorite examples is SQL scrubbing. There is "mysql_escape_string" but you shouldn't use that one - so instead of fixing the original method, PHP introduced "mysql_real_escape_string" so you know that one is real. Some API issues are just dumb. Needle, Haystack arguments are swapped in some methods. so foo(needle, haystack) for 99% of methods then there is baz(haystack, needle) And that's just the surface. There used to be something like "file.phps" (see: https://top-frog.com/script_src/source.phps ) where including that "s" would expose the PHP source depending on how your hosting situation was setup. God I found so many server and DB connections and if I was a complete rear end in a top hat could have deleted entire databases easily. geeves fucked around with this message at 06:14 on Jun 28, 2017 |
# ? Jun 28, 2017 06:09 |
|
The canonical rant is "PHP: A fractal of bad design".
|
# ? Jun 28, 2017 06:25 |
|
Smugworth posted:Care to elaborate on why this is a common opinion? I'm genuinely curious, I just graduated and interviewed for a PHP position, and the only thing I really knew about the language was "people think it's a trash scripting language." I'm handy with Python, so I figured what the hell. Fortunately, they didn't ask me to code anything, and I accepted a position elsewhere. It's a terrible language cobbled together over the last 15 years. It does nothing better than other languages in the same space. It has really stupid syntax, like using -> to access object properties, and . to concat strings. There is no reason to ever use it beyond "we have 15 years of PHP code our business depends upon". C#, Node.js, Java are all better and have better ecosystems. Hell, I would rather use RoR, and I HATE RoR. Also, it stands for Personal Home Page. A guy wrote it so he could make a crappy blog. Let that sink in.
|
# ? Jun 28, 2017 06:25 |
|
PHP used a philosophy of keeping the same function API as the underlying C lib it was exposing - that's pretty much why you have all the things like mysql_real_escape_string as that is literally what mysql named its charset-aware escaping function. Modern PHP is okay, not my fave language for fun, but the contempt culture around it is pretty bad.
|
# ? Jun 28, 2017 07:29 |
|
hailthefish posted:For half a second I wondered if there actually were people who show up to an interview and spend the entire time bagging on the company's language/stack choices and then I realized of course there are. I had an interviewee jump straight to telling me we were idiots for picking C++ and that we would have to rewrite in C if we didn't want our codebase to inevitably turn into an incomprehensible mess the instant I asked a C++-related question. The guy who said we should rewrite in Rust was a little more tolerable since he at least skipped calling us idiots for not picking it in 2011.
|
# ? Jun 28, 2017 07:42 |
|
My Rhythmic Crotch posted:How have I never seen that site before? Holy poo poo that's incredible Also.
|
# ? Jun 28, 2017 09:07 |
|
PHP is less a programming language, more a Turing-complete set of security vulnerabilities.
|
# ? Jun 28, 2017 10:44 |
|
Volmarias posted:The canonical rant is "PHP: A fractal of bad design".
|
# ? Jun 28, 2017 13:07 |
|
GutBomb posted:I work for a consulting company and in between gigs I am on the bench. I still get paid and just work on either personal projects to learn new poo poo, or projects the company needs done. I like the bench. But when you're on the bench you also get sent out on a lot of time wasting interviews. I get to interview at some pyramid scheme makeup company tomorrow (I live in Utah so there's loads of pyramid scheme companies around) for a back-end PHP development position. I told the guy that I only do front end stuff and what little PHP I've done has been really basic. His response "well, it's good to interview anyway, right?" I can't tell from your post if you've worked for Pyramid Schemes / MLMs before, but my previous job ran off the entire .NET team due to an absolutely poo poo awful MLM client. It's the weird thing where the main users of your website see it as their primary job and source of income and everything you do is ruining their life.
|
# ? Jun 28, 2017 15:28 |
|
Iverron posted:I can't tell from your post if you've worked for Pyramid Schemes / MLMs before, but my previous job ran off the entire .NET team due to an absolutely poo poo awful MLM client. I haven't but I do have major contempt for MLMs because they prey on people and the only people that ever prosper with an MLM are the people running it. I've been exposed to them my whole life because of dumb but well meaning family members who never seem to learn. I don't particularly hate PHP, it's fine for what it is, but it's a huge mess, I've barely scratched the surface of its object oriented stuff and classes, I've never used any of its frameworks, and everything I've ever done with it was simple MySQL driven single page tools. I'm primarily a front end angular 1 guy and have no idea why my account manager thinks it's a good idea for me to go down there and make myself look like a fool and make the company look like it doesn't know what it's doing sending a fool down. If it was just a regular interview for myself I wouldn't care. I'd just refuse to do the whiteboard stuff and offer to let them look at some code on my laptop and walk them through a project I've done instead. But since I'm representing a company now it makes the company look bad if I don't play along and this company gives me money even when I'm not working. Yuck. Most of my dev workflow is this: I'm encountered with a problem. Build poo poo until I get stuck, usually reusing some poo poo I built for a previous project and reworking it. When I get stuck or something doesn't work, google->stack exchange(just reading other people's questions/comments, not like, asking "please write my code for me")->install a library->poo poo works and move on to the next problem to solve. I see people here and at work complain about "I can just google that" at a job interview but isn't that what everyone does? Most people except the most dedicated book learners are going to flounder on a whiteboard with no code insight, no snippets to refer to, no google/stack exchange. Ugh. I got a lovely night of sleep too and I just don't want to do this at all. Edit: found a job listing for this position online. It's a senior php developer. Come on dude. GutBomb fucked around with this message at 15:50 on Jun 28, 2017 |
# ? Jun 28, 2017 15:45 |
|
GutBomb posted:I haven't but I do have major contempt for MLMs because they prey on people and the only people that ever prosper with an MLM are the people running it. I've been exposed to them my whole life because of dumb but well meaning family members who never seem to learn. It'll slowly eat at your soul. Highly annoying clients that you have moral qualms with are literally the worst thing imaginable.
|
# ? Jun 28, 2017 16:40 |
|
GutBomb posted:I haven't but I do have major contempt for MLMs because they prey on people and the only people that ever prosper with an MLM are the people running it. I've been exposed to them my whole life because of dumb but well meaning family members who never seem to learn. Senior PHP Developer === Developer who has realized every other option is better.
|
# ? Jun 28, 2017 16:48 |
|
GutBomb posted:I haven't but I do have major contempt for MLMs because they prey on people and the only people that ever prosper with an MLM are the people running it. I've been exposed to them my whole life because of dumb but well meaning family members who never seem to learn. The problem with just showing off libraries that you wrote is that the interviewer has no idea whether you actually wrote it or not. That's why whiteboard interviews remain popular, even though everyone knows and agrees that it's a terrible way to do things. An interviewer definitely shouldn't be asking you questions that you would need to look up. You should be able to ask them clarifying questions, or explain that you don't remember the exact algorithm for red black trees. The whole thing should be looking for signals. Obviously, "I don't actually know how simple and fundamental data structures actually work" is as big one, but flexibility and intelligence is required.
|
# ? Jun 28, 2017 17:03 |
|
It went better than expected. I went in there, told them my skill level in php, they showed me the project, and it was over within 25 minutes. No whiteboard. Walking someone through my own code instead of whiteboarding worked for me before because when you're walking someone through your stuff in depth it's kind of hard to fake it. At least for me it would be.
|
# ? Jun 28, 2017 18:08 |
|
GutBomb posted:It went better than expected. I went in there, told them my skill level in php, they showed me the project, and it was over within 25 minutes. No whiteboard. OMG what have you done? Now you might actually get hired and have to work with PHP!
|
# ? Jun 28, 2017 18:52 |
|
xiw posted:PHP used a philosophy of keeping the same function API as the underlying C lib it was exposing - that's pretty much why you have all the things like mysql_real_escape_string as that is literally what mysql named its charset-aware escaping function. Not really... "Rasmus Lerdorf creator of PHP posted:Well, there were other factors in play there. htmlspecialchars was a Some names were chosen so there wouldn't be too many hash collisions with the hashing function strlen.
|
# ? Jun 29, 2017 02:17 |
|
quote:Back when PHP had less than 100 functions and the I know literally nothing and even I can tell that trying to hash things by their length is a dumb idea.
|
# ? Jun 29, 2017 02:39 |
|
I don't understand why that would even be a concern. Like really, I don't get it. Why hash your function names
|
# ? Jun 29, 2017 02:51 |
|
KoRMaK posted:I don't understand why that would even be a concern. Like really, I don't get it. Why hash your function names To map function names to implementations in a hash table.
|
# ? Jun 29, 2017 02:54 |
|
PHP is a great language if you dare to use it properly
|
# ? Jun 29, 2017 03:06 |
|
sarehu posted:To map function names to implementations in a hash table. why though? IS it a compiler thing or something?
|
# ? Jun 29, 2017 03:28 |
|
|
# ? May 17, 2024 22:57 |
|
KoRMaK posted:why though? IS it a compiler thing or something? Yes. The short story is that the compiler or interpreter maps functions to locations in memory so that it can easily turn function invocations into jumps to that location.
|
# ? Jun 29, 2017 03:36 |