Threads for dsh

  1. 1

    I feel like not supporting more verbs is a big miss here? I don’t develop in Java so maybe I’m missing the point of this built-in development webserver but surely the HTTP verbs would be one of the more important features of a server?

    Edit* I am sure they will add more verbs in the future, just odd they would release this with, what I feel, is a big feature hole.

    1. 2

      I was expecting you to be referring to PUT or something and was confused. Then I saw they don’t support POST. lol.

      Hey at least this can be used to develop stateless, static websites?

      1. 2

        JDK follows a cadence release process. This is the very first provisional release after the most recent LTS release. JDK 11 and 17 are LTS releases. 12-16 we’re provisional releases that gave them a chance to refine proposals in public, gather practical feedback, etc. You can think of it like the old Linux odd versions or like rust “unstable” APIs.

      1. 1

        My work laptop is a beefy Thinkpad p15 - i9, 32gb ram, 500gb ssd. My personal laptop is a less-beefy Thinkpad T560 with an i7, 16gb ram, 500gb ssd.

        Both run Xubuntu 20.04 as well.

        1. 14

          PHP isn’t dead. That much is obvious if you look around the industry a little bit. I’ve personally never said PHP was dead.

          However PHP lost my trust years ago. I’ll never write another line of PHP nor will I willingly work on maintaining an existing PHP codebase. Fool me once shame on me. Fool me twice… Well you know how that quote ends.

          1. 7

            I would love to hear more about how you lost trust in a language that has grown considerably in the last couple of years (decade?) to be a more “mature” language with a pretty in-depth feature set. I’ve built a career working in PHP (and other languages too, but mostly PHP), so statements like this always pique my interest.

            1. 7

              This is probably in part because it lost my trust several decades ago. There are so many great languages that I can be employed to write that don’t have any of that historical baggage to deal with. Java, Go, Rust, C#. Why go back to a language that due to backwards compatibility will always have footguns waiting in the codebase for me. Layering on safer ways to do things can improve a language over time but unless you also remove the highly unsafe bits as you go the language will always fundamentally be working against you.

              I have the luxury of not having to choose PHP ever. I’m grateful for it.

              1. 3

                That’s understandable. I began my career with PHP in the early 2000s, migrated towards C/C++, C#, node and eventually Go before coming back to PHP.

                The PHP of today is very much not the language it was ten years ago*, doubly true for 20 years ago. While it’s still my daily driver I do enjoy working in Golang, TypeScript and both React and Vue on the front end.

                1. 1

                  Its very true to look at some legacy PHP codebases and wince in terror at all the bad stuff. I agree as well, that they need to seriously look at removing some legacy from the codebase - but you have to admit its kind of impressive how well they have managed to keep a lot of backward compatibility. I always recommend every PHP developer, especially new ones, read A Fractal of Bad Design to understand how PHP got the reputation it has. But then to also read PHP The Right Way so they can contribute to our larger application codebase efficiently.

                  Like everyone else has said though - the langauge and ecosystem has evolved quite a bit and when you look at it as say, middleware between a client (browser) and other services (databases, queues, what ever), you see it fits nicely as a solution for certain problems. If I’m thinking about building a website, or webapp, or simple RESTful service, I will always grab PHP first but I would never say some one not using is wrong. I don’t care what brand of hammer you use, as long as we’re hitting nails.

                2. 2

                  Seconded. I’ve been working with PHP (but not exclusively PHP) for over a decade and have never experienced anything that would cause me to put down such a statement. Very much interested to hear what happened.

                3. 8

                  I don’t do web programming in general, but I won’t even work for a company that uses PHP. I take that as a sign the company does not make good decisions. Cheers.

                1. 2

                  I don’t use GitHub but this is the first time I’ve heard of Mermaid and honestly I wish I knew about this a few years ago.

                  1. 1

                    Is there not a “batteries included” Node framework like Rails yet? I haven’t had the need to look for one but the Rails pattern has been popular in other languages I’ve used (Like CakePHP, for example). My experiences with Node have been good, but almost entirely been “small script that calls AWS” or “single function execution in AWS Lambda.”, or “small Express application that generated PDFs”.

                    1. 4

                      I don’t think any languages have had breakout all-in-one Rails-style fullstack frameworks since Django. Basically since Sinatra came out (2007!), everything has been Flask or Express-like routers that connect together little pieces. Maybe it’s time for another megaframework to come out, but I sort of doubt it. I think the market has spoken and people want to be able to connect together small pieces instead of getting something omakase.

                      1. 7

                        Pheonix is closer to the “batteries included” mentality IMO

                        1. 4

                          I think the market has spoken and people want to be able to connect together small pieces instead of getting something omakase.

                          JavaScript, and npm in particular, have chosen this as their ethos: lots of little moving parts tied together manually. Think of the typical node_modules directory with 1000+ packages for a “hello world” app. Java has been the same way.

                          The Ruby/Rails ethos has always been more human-focused: we’ll trade RAM/CPU and fine grained control for a developer experience that is fast and easy. Omakase.

                          I agree with you: the JS ecosystem will never see a megaframework in widespread use because it goes against the ethos of the community.

                          1. 4

                            Phoenix in Elixir and most certainly Laravel in PHP both come to mind.

                            1. 1

                              I think the market has spoken and people want to be able to connect together small pieces instead of getting something omakase.

                              I don’t agree - it’s not a market-driven opinion so much as it’s REALLY REALLY hard to both provide a good omakase-style framework AND get the necessary adoption within an ecosystem to reach rails-like status. It’s not that people don’t want it, as evidenced by the continued success of Rails. There’s luck involved in being in the right place at the right time providing the right developer experience - it’s hard to capture that purposefully, and that’s why we don’t see a lot of it. I might be able to twist my perspective into defining that as a market justification, but it’s not because it’s what PEOPLE want, it’s how the market incentives align.

                              1. 1

                                I think the market has spoken and people want to be able to connect together small pieces instead of getting something omakase.

                                I hope so, but given the number of one-page rails apps and rails-like frameworks always popping up (there are several for PHP, several for Haskell, etc) I’m not so confident.

                              2. 2

                                Is there not a “batteries included” Node framework like Rails yet?

                                I’m surprised the author did not address this as well. There are definitely full stack frameworks like Next.js and Alelph for React and Nuxt.js for Vue. Then there are also various DBaaS providers like Supabase and Fauna that can take the place of the back-end of a traditional Rails app. I’m sure I’m missing others. I admit I’ve only tinkered with these batteries-included options myself. I’m not sure what it would be like to use them in production.

                                If the author had reason for dismissing them, I would like to know what it was. Otherwise the comparison is not particularly useful.

                              1. 6

                                As far as I know “0e4” == “0e5” us still true

                                1. 5

                                  Confirmed:

                                  $ php -r 'echo (4 == 5) ? "yes" : "no";'
                                  no
                                  $ php -r 'echo (0e4 == 0e5) ? "yes" : "no";'
                                  yes
                                  $ php -r 'echo ("0e4" == "0e5") ? "yes" : "no";'
                                  yes
                                  $ php -v
                                  PHP 7.4.16 (cli) (built: Mar  2 2021 10:35:27) ( ZTS )
                                  Copyright (c) The PHP Group
                                  Zend Engine v3.4.0, Copyright (c) Zend Technologies
                                      with Zend OPcache v7.4.16, Copyright (c), by Zend Technologies
                                  
                                  1. 2

                                    This is a case where you need the dreaded === (which should be defacto default for most devs these days anyways)

                                    1. 6

                                      I tries to explain the problem to lavarel dev and did not succed to explain the problem see https://github.com/laravel/framework/issues/20141

                                      1. 2

                                        Well it’s certainly not PHP’s fault if people are actively averse to learning how to properly use it.

                                        It’s been a while, but even 10 years ago we would have never accepted someone saying “well 0 and 0 are somehow equal” like one person in the moved bug tracker link does. It’s either a string or an int, otherwise it’s a bug. Just because the language is not strongly typed that doesn’t mean you shouldn’t know with what you’re working inside your application (and not where any input enters the system).

                                        1. 2

                                          Oh wow, did not expect people to not use strict comparisons.

                                      2. 1

                                        And it will never be changed, which is a good thing if you value BC.

                                        1. 1

                                          I mean that == should be deprecated somehow. with a big enough warning

                                          1. 1

                                            BC?

                                            1. 2

                                              Backwards compatibility.

                                              1. 1

                                                Backwards Compatibility. The thing that everyone outside PHP decries so much - e.g. fixing all the needle/haystack and 90% of other “oh if only it were different” things. Because old PHP code is actually really easy to run on modern versions.

                                                1. 2

                                                  I honestly don’t have a horse in this race. But even just at a glance I don’t think it’s an “outsider” vs. “insider” matter. It doesn’t have to be so partisan. Both have upsides & downsides.

                                                  It would be nice, for instance, if there were an option like PHP, but with a balance between BC and solid interface design. Maybe Python or Go represent this, who knows.

                                                  I’m open to other perspectives, but my point is as follows: a decent interface doesn’t have to be made great, but a trashfire interface should definitely be made at least decent before it’s “frozen”.

                                                  1. 2

                                                    I think that’s a valid standpoint, but there’s a reason people today usually make a big fuzz about a 1.0 release from which point on it’s declared stable/non-breaking.

                                                    But if we ignore PHP 1+2 and only look at 4.0 which was released in May 2000 - that’s when the “we don’t break BC” decision was made and it’s been held up since. So that’s why I think “they should’ve” is not so helpful. They didn’t and there are always good reasons for and against.

                                                    In case you’re not so familiar with the history, there historically was a huge problem of getting the web hosts to upgrade DESPITE the massive efforts to keep BC. IIRC on August 8th 2008 there was a huge effort to promote this deadline (4.4.9 was the last PHP 4 version that was released) to get the people to finally move to PHP5, which was released 4 years earlier in summer 2004 and AGAIN so many people didn’t upgrade (webhosts and wordpress was a big factor here).

                                                    I personally would also agree that there was a point (maybe 7.0) where it should’ve been done, but on the other hand I am personally guilty of being one of the people going “our dependency libraries are not available for Python 3, let’s start this massive new project in Python 2 in the year 2014”.

                                          1. 3

                                            Doing a lot of work in Vue.js and would love to pick some one’s brain if they know a lot about the framework about a particular problem we have.

                                            1. 2

                                              Reading through resumes for a developer to add to the team. This is the second round so its a bit disheartening to not find anybody yet. Hopefully this round is more fruitful!

                                              Also slugging along with this major rewrite project that got derailed with a team member leaving the company (hence the hiring).

                                              Hopefully getting enough sleep.

                                              1. 1

                                                In Canada? No. Engineering is a special accredited title that bears a lot of responsibility. Very, very few software developers here are actual engineers.

                                                1. 14

                                                  The article has a whole section on the question of licensing.

                                                  1. 20

                                                    What’s the point of reading the article if you can comment on the title? 🙃

                                                  2. 3

                                                    I call myself a developer. If I could write an SLA and stand by the agreement legally, I would call myself an engineer. Or if I operated a ship, train, or starship engine.

                                                    1. 7

                                                      The post series makes a pretty compelling point that there are traditional engineering disciplines that don’t have anything like an SLA and are still universally accepted as Real Engineering, e.g., chemical engineering.

                                                      1. 4

                                                        As a former working chemist: chemical engineering is not anything like chemistry and you can bet your ass there is stuff like, “use this flow regulator with these pipe fittings or else THE REFINERY WILL BLOW UP, because the chemical reaction will go exothermic “, signed, licenced chemeng

                                                  1. 3

                                                    Its mid-year review season and my first one as a team lead with direct reports so I’m learning how to help people set goals. Its very weird.

                                                    1. 11

                                                      This has been my work philosophy since I started and I’ve been at the same job for four years now with no plans of actually leaving (but still leaving my knowledge behind to avoid the pesky silos)

                                                      1. 2

                                                        Doing some podcast editing (Mr. Rewatch, a Mr. Robot retrospective show), some podcast writing and recording (Kevys Country Breakfast, the stupidest baseball podcast around), and calling my mom on Sunday for Mother’s Day.

                                                        1. 3

                                                          A client was unable to log into their CMS that I was apart of building and migrating. The only way they could log in is if they submitted a reset-password request, and went in through the email to reset the password and subsequently log them in. After a week or two trying to figure it out - I realized my mistake was in the character width of the VARCHAR column in the MySQL database for user’s encrypted passwords. MySQL was silently truncating the data. The reset password hack worked because it did not have to verify the newly set password to start a session for the user - it just stored it and truncated it every single time.

                                                          1. 1

                                                            I’ve been a long-time MK user and while I’m a whiz on the matrix now having something like this is very valuable! Looking forward to the Web MIDI implementation. Thank you!

                                                            1. 4

                                                              I’ve been a professional PHP developer for years and I really like the direction the language is going.

                                                              That being said, I have been working in a lot of legacy C# applications this past year and seeing how PHP is moving towards a very similar. Very welcome new features like Null operators, named arguments, enums and attributes in PHP 8(.1) have existed in C# for a long while.

                                                              Now we just need Generics.

                                                                1. 3

                                                                  This is a great walkthrough and a fun hobby but I just use the hardware mute on my mic.

                                                                  1. 2

                                                                    The HHKB2 Lite. My girlfriend got her hands on a Keychron K6 and I was using that for a while but a decade plus on the HHKB made it a hard transition.

                                                                    1. 4

                                                                      Is there actually a debate about not using DateTime strings in that format? Everyone I have encountered this is good practice.

                                                                      1. 1

                                                                        Building a brand new RESTful API for internal organization use. That’s about it.