The Joys Of Programming

fenomas wrote:

From JP twitter:

"Please use a mask."
"How many bits?"
"..what?"
"..what?"

Stealing this.

DSGamer wrote:

It me. I'm that.

The best part was the baseball bat to the macbook.

Funny video, especially the corporate Java spot and fix-my-printer.

The wholesale dismissal of jQuery, PHP, and WordPress rubs me the wrong way, though.

A lot of good people have written fine software with these tools, and many of them have invested a great deal of their precious time and energy into learning/improving their craft with them.

I think the industry would benefit from a lot less perpetuation of attitudes like "PHP sucks, lol".

Agreed. I work for a company that does a lot of WordPress for small businesses and it’s exciting to see these companies (especially right now) being enabled to have great online presences, often with commerce.

It’s putting food on the table for people who would otherwise be laid off right now.

Ted wrote:

I think the industry would benefit from a lot less perpetuation of attitudes like "PHP sucks, lol".

I'm of a couple minds with PHP.

On the one hand, Working Software = Good. Software that exists and solves problems is way more valuable than differences in implementation language. And I'm including large platforms (like WP) that are used to create other software in "Working Software". On top of that, for any individual developer, the most useful language is the one you know.

On the other hand, PHP is so tightly associated with those platforms written in it because, in $CURRENT_YEAR, there is pretty much zero technological reason to write a brand new, from-scratch piece of software in PHP.

Which is fine, plenty of technologies are at the stage where they implemented useful software in the past that is worth maintaining today, but are no longer the best choice for building something new from the ground up.

The issue I see is, PHP seems to have a larger-than-usual community that has never seriously worked in anything else, and can't conceive of the idea that other tools have passed them by. I see a lot of championing of "modern PHP", which by and large is a collection of features copied wholesale from these other technologies and retrofitted into PHP to fill glaring holes. Which is great, and was a smart thing to do to help make PHP better to work in. But even having watched that happen, this subsection of the community seems to still not recognize that progress in languages is happening outside of PHP's borders, as if they think these "modernizations" were invented from within PHP-land. There's just a complete lack of awareness of the rest of the technological landscape that seems to permeate every "PHP defense" discussion.

And while these sort of "why would you use anything else" attitudes exist in pretty much any mature development language, the difference with PHP seems to be a question of scale relative to the language's community at large.

So yeah. "PHP sucks" is definitely not productive, but I see many of those expressions as being a combination of (a) past annoyances from having worked in the language in a previous, more frustrating state, along with (b) communicating with an entrenched, intractable community that seems unaware the extent to which they are those things. (That said, a lot of "X Sucks" comments are more about people trying to stroke their own egos and feel superior, and "PHP Sucks" comments are no exception.)

Part of the reason for the "PHP sucks!" thing is that, for a long time, it was horrendously insecure. Even the documentation had you do things like building database queries directly from user input. Little Bobby Tables loved PHP applications.

And this sort of thing happened over and over... it was a language designed by people with no language experience, and who apparently weren't particularly good programmers to boot. It's been beaten into reasonable shape, but there's an extraordinary amount of bad PHP code out there, and between that and the documentation being actively terrible for about 15 years, the language as a whole acquired a very poor reputation.

Three different freelancers I know have been dragged into other people's Wordpress/PHP nightmares so many times that they independently have reached the conclusion that Wordpress and/or PHP jobs tend to suck so much that they charge more - if they accept the job at all. I'm a hobbyist, but even I got tricked into helping an acquaintance who runs a recipe database site. Eventually I cried uncle as it became far too painful. He was in way over his head, and I determined that the sane solution would be to refactor a ton of somebody else's (not his) spaghetti code. The product and the language aren't inherently bad. However, as Legion and Malor have said, they've been used in awful ways. I don't blame folks for using Wordpress and PHP as scary words for coders.

Malor wrote:

And this sort of thing happened over and over... it was a language designed by people with no language experience, and who apparently weren't particularly good programmers to boot. It's been beaten into reasonable shape, but there's an extraordinary amount of bad PHP code out there, and between that and the documentation being actively terrible for about 15 years, the language as a whole acquired a very poor reputation.

I don’t recall the exact bug or function anymore, but I do remember finding a bug report for a fairly major security hole (some sql injection bypass I believe) and the official response from the PHP devs was basically “we don’t care, will not fix, stop whining.” This was probably about 10 years ago as I was transitioning my projects away from PHP. I hope they’ve changed their tune about such issues now but definitely made me feel better about jumping ship - never looked back.

I think they wised up a little bit after that, as I sorta remember that too. But that cemented for me to never use PHP voluntarily.

edit, almost a month later: you know, I'm really not sure we're thinking of the same thing. The bug I remembered was SQL-related, pretty high profile, and handled poorly, but it doesn't sound like yours got the same kind of global attention. Same thing probably happened more than once.

It's really cool when someone takes an interest in your project, but I haven't yet figured out the right way to respond to somebody who, out of the blue, submits a PR against the master branch that converts every file from vanilla JS to ES6+typescript.

That's a lot of work to do unasked. Maybe suggest that they fork the project? Presumably they can work fastest in that language, where you probably can't, so maybe they should do their own variant instead.

You could even drop a link to their version in your README. (eg, "someone ported this to ES6 and Typescript, which isn't the direction I wanted to go. If you'd rather work in that language, their version is over thataway.")

Speaking of projects, and avoiding Javascript at all costs, here's my latest thing:

https://mixolyde.github.io/blaseball...

Built in Dart and using a Dart package called peanut to automatically build the site and commit it to the gh-pages branch.

That's pretty slick, mixolyde. It's got a very nice interface, and the instant updates look great.

I could probably comment more usefully if I knew anything about Blaseball, but since I don't, all I can say is that the UI is attractive and very(!) responsive.

Thanks! That's high praise. I stole most of the html and CSS from playoffstatus.com, but used Dart to make the interactive buttons. Trying to make it a one-page app, basically.
Not much to know about Blaseball other than it's a web-based baseball simulator with absurd rule changes and light horror elements with a super fun fan community.

I also made this: https://twitter.com/BotTyranny

Turns out randomly generated twitter bots can be pretty fun with Tracery. Create a new Twitter account and login to this site to get started: https://cheapbotsdonequick.com. I have seen some that use emoji and unicode characters to make gardens, skylines, and art galleries.

The "source" code, such as it is, is here:

https://cheapbotsdonequick.com/sourc...

Mixolyde wrote:

I also made this: https://twitter.com/BotTyranny

Turns out randomly generated twitter bots can be pretty fun with Tracery. Create a new Twitter account and login to this site to get started: https://cheapbotsdonequick.com. I have seen some that use emoji and unicode characters to make gardens, skylines, and art galleries.

The "source" code, such as it is, is here:

https://cheapbotsdonequick.com/sourc...

Nice.

I got one of my projects to the front page of hackernews!

One of the only two comments is suggesting that I should have just "compiled [different project] to wasm and used that"

fenomas wrote:

:) I got one of my projects to the front page of hackernews!

One of the only two comments is suggesting that I should have just "compiled [different project] to wasm and used that"

Classic Hacker News.

Hexing the technical interview wrote:

Long ago, on Svalbard, when you were a young witch of forty-three, your mother took your unscarred wrists in her hands, and spoke:

Vidrun, born of the sea-wind through the spruce
Vidrun, green-tinged offshoot of my bough, joy and burden of my life
Vidrun, fierce and clever, may our clan’s wisdom be yours:

Never read Hacker News

Reading the articles at HN is sometimes useful and sometimes fun. The commentary is rarely either.

Congrats on getting your project on the front page, though. That doesn't happen often!

So, what was the project? If you don't mind mixing your GWJ and HN IDs, anyway.

Ah sorry, it was wafxr, a sound effect generator for web audio which I think I may have posted here already.

(That project itself is actually just a lightweight GUI; the technically interesting thing is the project underneath wasgen, which is what plays the sounds. But the frontend is more useful to most people.)