@fuat2mb To be fair, the code I write doesn't usually work first go either, which is why you write a section, test it, fix the errors, test again, then move on to the next bit. It just abbreviates the "write the code" bit, the test/fix cycle is still there (although it can help with that too).
It's marginally better than 'pair programming' and saves me time looking up the functions and constructing the code - but I still have to go through the process of sorting out things like "this code uses sqlite3 but I need to use PHP's PDO libraries instead"
because GIGO