84

Having PHP as my most useful skill.

I know various other languages, but they're either too exotic for professional use, or my knowledge about them doesn't have the same depth as with PHP.

People joke about how awful PHP is, and it's not entirely true. The incongruous stuff such as confusing parameter ordering can be fixed with libraries. And PHP7 fixed a lot of the ugly stuff. A good dev can certainly write structured, readable, performant PHP code.

But there is a real hard limit. PHP is missing more complex type definitions present in other languages. A weak type system is like building stuff with popsicle sticks and bits of duct tape, it works fast and perfectly fine for small projects, but the lack of strictness is a problem when you have thousands of classes intertwined in all kinds of complex factory, service and repository patterns. And the simple type hints are still newish and fully optional, which means a lot of people don't use them.

So I regret getting stuck in this self reinforcing loop, where I learn more about a very imperfect language through employment, and keep rolling into jobs using that skill because it's what I'm most experienced with.

Comments
  • 20
    A PHP rant I completely agree with! Wowzers!
  • 9
    Wow OP are you me? I love PHP but would like to have safety net via C or something.
  • 13
    @ojrask Well after php, I would say that both Go and Python are making the rounds lately, specially python with all the machine learning frameworks and such that is quite hot right now
  • 9
    @legionfrontier Yeah I have experience with Go, Rust, Haskell, Ruby, Js/Node/Vue, Python/Django/Numpy/Tensorflow, etc.

    I wrote Haskell professionally for a biochem/material science laboratory for 2 years, but good luck finding Haskell development positions.

    I consider myself good at JS, but while it can be beautifully succinct and functional it does suffer from some of the same scaling & safety issues as PHP, and most JS jobs are react/vue/etc jobs requiring me to learn those frameworks properly as well.

    The problem isn't that I don't want to learn anything new — it's that anything I learn right now will keep scoring lower on the seniority ranking than PHP.

    When you have 20 years of PHP experience, companies pay more for you to whip juniors into shape, to coach and design, write style guides and tests. The other languages will always be no more than peripheral skills.

    Of course it's a luxury problem. I could just switch careers, and accept a lower pay rate.

    Maybe, one day...
  • 5
    The most I know of is C... followed by C++ ( c++ behind because there is so much in new standards 😨 )
    I love C ☺️☺️ and c++ too in cases coz it does reduce code a bit...

    But I can’t get myself to learn other languages since I find em all boring...

    Doing rust right now... THE only other language besides C/C++ which I don’t find boring yet 😊😊😊
  • 2
    @Electrux have you run into things with Rust that feel like you could not implement which are doable in C/C++?
  • 1
    @ojrask not really... I just started it 4 days ago πŸ˜•
  • 3
    @ojrask Rust can fully replace C programs, although in certain cases you might need to wrap some existing c libraries, which can give some trouble in terms of parallelization and memory safety. Not that that wouldn't give you some trouble in pure C...

    The Rust ecosystem for things like Graphics APIs all the way up to DB drivers, parsers and even webservers has been expanding rapidly, but of course it's not as mature as with other languages yet.

    The ONLY reason in my opinion to choose C over Rust for production in my opinion is not language related, but team related: Recruitment would be difficult.
  • 2
    @Electrux ah OK. Been playing around with Rust a bit and hoping to hear from other beginners who have more experience in other "lower level" languages. :)
  • 3
    @ojrask Rust is extremely high level for a systems programming language, which is an advantage in my opinion in terms of code correctness. In C you can easily break things.

    But because it still has to close the gap between man and machine, it also has a very steep learning curve. It can't obfuscate things like other higher level languages do to accommodate the human. It feels like staring *through* strict, succinct, high level abstractions directly at the lower level parts.

    It's kind of like a transparent, high precision clock, where you can see all the gears.

    It's beautiful, it's clarifying, but damn can it be overwhelming.
  • 1
    @bittersweet thanks for the explanation. :)
  • 1
    @bittersweet lol funny enuf I still love c code πŸ˜…πŸ˜…
    Rust most certainly is good... I love it for the language that it is... but c has a place in my heart too... 😊😊
    God I love the fact that I don’t see segmentation fault in rust πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚
    But god, I love those raw pointers too πŸ€—πŸ€—πŸ€—πŸ€—πŸ˜ŒπŸ˜Œ
  • 2
    @bittersweet thank you. This was just beautiful!
  • 2
    I do like using php for some things. Even though I am well aware of https://eev.ee/blog/2012/...
    And that I am fluent in many other languages. Still, some projects gets to be done in php.
  • 2
    @jespersh I think PHP is bad, but not impossible to work with.

    With the right framework and discipline, it can work nicely for a small/medium project, especially in one domain: classic MVC layered applications.

    If you're creating an API-like website, with highly structured CRUD views and routes, mapping through controller actions and an ORM to plain DB tables... you won't run into much trouble.

    But on a large platform website, you eventually need to do "smart" things.

    Some API stuff doesn't map neatly to/from relational tables, they're aggregates or graphs or timeseries events, fed through recommendation engines, connecting through external APIs which may or may not respond, with results in kv caches, etc.

    That's where PHP fails hardest: You can't easily make a dynamic "type" like "a collection of Users" or a "list of (int, maybe string) tuples".

    With hundreds of smart service classes, you really start missing the depth of type checks offered by other languages.
  • 2
    @bittersweet I see your point, but isn’t programming much more about overall experience in building a codebase rather than how many years you’ve been on a certain framework?

    If you’ve been coding longer than the local “experts” in node, etc., you shouldn’t worry about learning those frameworks too late, and trust yourself to see things in them that a junior just wouldn’t.

    Full disclosure, I am a junior dev. But I look up to a lot of senior devs who have this skill— once you’ve seen so many projects and codebases, you have a ton of insight into using the newer tools well. Nobody has to know you learned this last week, they just have to see that you know the way code is supposed to be constructed for best results. That ability is way more important than which particular sets of syntax you usually write with.
  • 0
    @BrokeTheInteger

    Maybe I'm scared to dive into the deep end? I would have to admit that I don't know everything, and that's quite scary. That question has been bothering me for a long time now.

    You're right that it is especially knowledge of patterns and algorithms which deepens with time. The language syntax layer on top of that isn't that problematic. But then there's a pretty hefty framework layer on top of that, and often complex toolchain layers, etc

    To take the worst example: With Javascript its not just understanding closures, promises or generators... you have to get used to the quirks of angular, the weirdness of babel and the hiccups of yarn.
Your Job Suck?
Get a Better Job
Add Comment