27
leksyib
6y

Babel-preset-php

Comments
  • 0
  • 1
    @Alice converts more shit into shit
  • 1
    Js haters be like: "the language encourages it".
  • 3
    📌 this might actually be useful
  • 3
    @AlexDeLarge I can understand writing in a "better" language (Haskell/Fay, Elm, Typescript) and converting to "worse" language (compatible JS).

    But who is actually thinking "damn this is so beautiful, I wish I could do fullstack PHP"?
  • 0
    Moar cancer in web dev!
  • 1
    @bittersweet @AlexDeLarge: @D3add3d thinks that i guess.
  • 1
    @daintycode no... I just said it might be useful because I got hired to refactor a project that is a mix of PHP, HTML, CSS and jQuery in one file and I don't know PHP that much so converting the PHP to JS might be helpful in understanding the logic because nothing is commented, I would not use such thing in production or even in dev, JS and PHP are both just terrible and I just happen to know one of them better than the other one.
  • 1
    @D3add3d

    1. You are a Java dev, so you can probably easily read PHP within a few days. If a framework was used, read up a bit on the organization used for routing, controllers and database access.

    2. If you can not read the code within two days of browsing, converting it will not help. You should move the project to an empty USB drive and throw it in a volcano.
  • 0
    @bittersweet you really don't want to see the code... And yes, I know PHP - in fact PHP was the first language I have ever learned but I find it hard to read and especially in this project... DRY is something that the person who has made this project never heard of... There are like 10 PHP files named bag.php, bag1.php, bag2.php..., then another 5 named show.php, show1.php... and I have no fucking clue what's in these files or what are they even supposed to do because the moron forgot to include a db dump or an SQL query to create the required structures... And what's even worse is that in each file there are <script> tags randomly dispersed through each file and some are even echoed, there is also a script at the end of each file containing at least 100 $(document).ready(function(){ ... }); with each one containing $("#something").on("something", function(){ one line of code });, there are thousands of IDs on each page, all used more than once named randomly without any sense [1/??]
  • 0
    @bittersweet [2/??] and in the same fashion as the files, so #something1, #something2....In each file there are 5000 lines of CSS in <style> tag with default rules explicitly declared, 0px, 0% and other bullshit like that used extensively while still using style="" attribute on most elements... Indentation is fucked beyond comprehension (although that got fixed really quickly thanks to IntelliJ IDEA's excellent reformatting tool)... Everything is duplicated, I feel like when this dude was lazy to find something in this trash that he created he just wrote it again to override the previous code... I am terrified to even touch this code without wearing a hardhat and a pair of really thick gloves
  • 0
    @bittersweet oh and not to forget, there is no such thing as organization in this mess... there is no framework, there is no MVC, it's just spaghetti with sharp hard rocks, shards of broken glass and piss as a sauce and shit as a side dish, all of that sprinkled with some razors
  • 2
    @D3add3d Run away
  • 0
    @bittersweet This is what I am working with...

    I told the client that this is going to be a complete remake because it is impossible to salvage this clusterfuck
  • 1
    @D3add3d Devrant should remove the 1h post limit for you... you're going to need it.
Add Comment