bread-z


Jeremy:

If you have to summarize your overall system architecture with this app – we've touched on Symfony, on your ORM – I already forgot the name of it again...

Alena:

Doctrine.

Jeremy:

Doctrine, right.

Alena:

For overall architecture, my site is a LAMP application. It is running with Ubuntu, Apache, PHP 8.1 and PostgreSQL. In your typical LAMP stack, the M usually stands for MySQL, but in this case, I'm running with PostgreSQL. And there are other components that are not web server components. There is an asynchronous queue system that is at play as well which processes all of the background work.

Jeremy:

What's that? referring to queue system

Alena:

That is another Symfony component. It's the Symfony Messenger component.

Jeremy:

Messenger.

Alena:

Messengers - You could think of it as a system where there's a database table of queued jobs to do, and a worker process just sits there listening, saying, “Check the database. Do I have any work to do? Do I have any work to do?” And when any new rows end up in the jobs table, the queue worker says, “Oh, there's work to do.” It grabs the row out of the queue, processes it, runs the job, and continues checking out work until there's no work left to do. This kind of enables an asynchronous style of programming that currently is not a native language feature of PHP at this point. In PHP, you can't really create a bunch of promises and await all of those promises to finish like you would in Javascript. So, having a queue worker system allows you to build asynchronous features with a slightly different approach. In this case, it would be more of a system where you dispatch work to the queue, and your queue worker, who's sitting there listening in the background, will pick it up and work on it. When writing code for a web server, you usually want web requests to finish as quickly as possible because you have a user who's sitting there who's either clicked a button, or who's refreshed the page, and they want to see something come back as soon as possible. You should send a response back to the user within a few hundred milliseconds or more to give the confirmation of saying, “Hey, the thing has been queued up to be worked on” or “We're working on it”. That can give a sense of confidence or a sense that your app is speedy or that things are working to the user. Whereas if your page sat there for five, ten seconds while something really long is running - that's something that, as far as user experience goes, is something you don't want the user to be stuck waiting for.

Jeremy:

Of course, got to reassure the users that progress is happening, things are moving along. I like the way you work around the lack of native async functionality. It's interesting to think about. The whole concept of workers is really cool; [it's] something that goes under discussed. When I learned programming [the field] was all [about] object-oriented this and that. It's wild to think how far things have come around. I know there's that one language that has workers as its fundamental core construct of doing anything. I forget what that one's called. [Editor's note: It's Erlang/OTP.]

Alena:

You'll have to mention that one to me. I'm curious.

Jeremy:

Oh, yes, I will. It's not OCaml. It's another one of those weird, niche, functional languages. It's not Clojure either. I forget; I'll get back to you on that. I know that on the web these days you have web workers, which you can use to run stuff outside of the main process. I'm pretty sure that's how those work. I don't quite remember... but it's cool that [there are] parallel approaches to the same problem.

Alena:

You bet.

Jeremy:

Just because you're lacking in a feature async/await doesn't mean you don't have a robust system in place.

Alena:

Correct. You can still do the same kind of asynchronous/multiple things at a time approach with a queue worker system. Because... a single worker can only do one thing at a time, true, but you can also spin up multiple workers, so that you can process multiple pieces of work at a time. Theoretically, an app with a worker approach, depending on how many workers you've spun up, could be much faster than a single process application that has asynchronous components. But that's all something that could be heavily, heavily debated about what approach is best for what thing.

Jeremy:

Right, right. But you always have to factor [in] scaling if you want your app to be used by anyone. These are good conversations to have early.

Alena:

Exactly. There's no one best tool out there. There are so many different tools and they are all equally well suited for different things.

Jeremy:

That sounds just about right. Well, I know that there's a worst tool for everything and it's the official KDE tool 🤡 No, I'm just kidding!

Alena:

There's a lot of KDE bashing going on. 🤨

Jeremy:

I'm a huge KDE aficionado; I love KDE, and so... as a hardcore KDE user, I reserve the right to trash KDE for free.

Alena:

Ya trash them because ya love them. 🥰

Jeremy:

Exactly.

Alena:

You want them to be great.

Jeremy:

I would feel bad if it was any other projects, but I don't feel bad for KDE. I've put way too much of my life into banging my head against the wall, trying to get KDE software to do what it's supposed to do. Anyway, 😅 was there anything that got you banging your head against the wall working on this project? What were some challenges you ran into? Was there anything that really took some time to get over? This is a pretty big app. There's a lot of code to it. It certainly took a while to make.

Alena:

Yeah, pieces that took quite a large time to get just right is... number one, pulling data in. Pulling data into the app, like the clinics, as well as processing them. This was a problem that took me a while to find the right approach. I knew that I wanted to pull in clinics from Erin Reed's data source, and I did not want any duplicates of them. I wanted to keep them up to date over time. The Erin Reed data source is a user Google Map, which can be exported in KML format, which is kind of like an XML maps format. I was able to write a scraper that would pull down that XML, parse through it, and create a bunch of database objects for each of those clinics. But the hard part is, over time, how do I make sure that I'm not continually re-importing the same ones? I ran into another problem that these clinic or location records did not have any kind of unique identifier about them.

Jeremy:

Oh no.

Alena:

Which is... problematic, because there's not really a great way to check if I have the record already other than taking some of the properties of the clinic and doing comparisons on records, like “do these couple fields match?”, and doing database searches like that. I landed on creating a hash of a couple of the clinic properties and saving the hashes. With the hashes of the clinics I have already, I can compare against the hash of new clinics, so that I can quickly know whether or not I already pulled something in. But what if I pull an updated clinic that has a piece of text slightly changed? Well, the hash is going to differ, of course. So the system is going to pull in that clinic, and now I have essentially two of the same thing, one which is slightly different from the other. Ideally, I don't want three or more copies of the same clinic, as things change over time. So my thought was, well, how can I figure out how to combine all of these duplicates, or flag all of these that are theoretically the same ones? If I'm going to pull in other datasets, like Southern Equality's dataset, I also want to be able to flag which of Southern Equality's clinics and which of Erin Reed's clinics are the same ones. I wanted a process to be able to flag those so I spent a lot of time, a couple weeks, coming up with the right way to check for duplicate clinics. So whenever a new clinic comes in, there's the first piece that determines whether or not it's already in the system and the clinic gets saved if a hash of it hasn't been saved already. Once that happens, a job is sent to the queue worker to say, hey, we need to check for duplicates for this specific clinic. The queue worker will pick up that job, then search the database for nearby clinics using lat-long coordinates as well as checking for clinics with similar names. I spent a bunch of time figuring out how to do geo coordinate stuff with PostgreSQL and with Doctrine, the ORM, because I needed to do database searches on lat long coordinates. I found a PostgreSQL extension, PostGIS, that allows you to store lat long coordinates and the extension will generate metadata that can be used to perform distance checks and more advanced geographical searches. Probably most lat long operations you could think of are implemented in this PostgreSQL extension. In this case, I was mostly interested in just the distance between two points. I was able to efficiently search my data to find what clinics were within a half mile or a mile of the new clinic that was imported. And the next piece was, once I find clinics that are nearby to each other, how do I get as close as I can be, to know if they're duplicates or not? So I landed on a solution with help from my brother. He was very, very helpful in picking out a strategy that I could use to compare two different strings – a comparison technique called Levenshtein. Levenshtein is a method of counting the number of additions, modifications and removals you have to make to a string to make it look like another string. Kind of like the distance between two strings; the changes you have to make, like do you add a character, do you remove a character, do you change a character to make two strings the same? I used a PHP implementation of Levenshtein to do those string comparisons for the final judgment of “How likely are these two clinics to be the same?”

Jeremy:

Your last filter.

Alena:

I've had very good success. I have had very few false positives and have made the system automatically flag duplicates for me to review and then deal with. I added some UI where you could review the duplicates that the system flagged and be able to resolve them by picking one of them to save. So I just have to log in every so often to the system to see if any duplicates were found. There are a couple of resolution steps to do, rather than having to go through all the data either by hand or with a script. [Editor's note: I wonder if you could do this with makefiles and cron jobs.]

Jeremy:

Right. That makes sense. Is that what's in the — where do you exactly do that? Is that what's in the admin page? I know [it] exists, but I can't see [it].

Alena:

So yeah, on the admin page, there's a view of how many clinics have been collected in total, how many new clinics have been recently pulled in, and how many unpublished clinics there are. Because when new clinics are pulled in, they don't get automatically enabled in the search. I have to manually review them and say yes to them, as well as the duplicates the system flagged. There's a quick link to just jump to the list of different duplicates.

Jeremy:

Makes sense. Your review queue of sorts.

Alena:

Yeah.

Jeremy:

Certainly quite a struggle. I didn't even think about all the data pre processing that you have to do to keep your dataset up to date.

Alena:

Oh, there's a lot of data pre processing, not even just pulling in the the clinics themselves, but also – how do you pull in the data used to search the clinics? Like if a user wants to search via a zip code or they want to search via a city, how is my system supposed to know what's a city in the world? Or how should a city be converted to lat long coordinates? Or how do you get from a zip code to lat long coordinates?

Jeremy:

😰

Alena:

So I had to look for open data sets of cities in the United States and zip codes. I landed on an open data set called GeoNames that has a couple fairly large data sets. They take about a half hour to fully import. I had to write some console commands to pull down the zip files for them, process all the rows, and actually link everything up. And that takes about a couple gigs worth of data. So it takes about 20, 25 minutes or so.

Jeremy:

Sure. Oh, wow.

Alena:

And so there's not just pulling in the clinics, but also pulling in those data sets to actually have what's needed to do the actual text search, or zip code search.

Jeremy:

Right. Oh, my. 😳 You have to be able to speak the same language, you know? You need one metric by which you can judge things. Getting everything nice and unified like that must be an insane amount of work to do, [especially] invisibly, under the hood.

Alena:

Yeah, when you type in your location, a zip code or a city, your search isn't going to anyone else. My server has all of the locations saved in a couple database tables that I can query in MySQL. I keep trying to say MySQL. I work in MySQL too much. So PostgreSQL queries just run to compare the search to any of the stored locations.

Jeremy:

Hmm, right. I noticed that code. That was really interesting. The code where the users location that they put in gets compared to a distance check. That little query you did in there was really interesting.

Alena:

It's not exactly perfect. The actual city name search needs some work. It doesn't always perfectly translate a search because it's using a likeness check in PostgreSQL to do fuzzy string matches to try to get as close to cities as it can. It works a lot of the time, but try St. Paul, for example. The database is storing it as S-A-I-N-T Paul. But... a lot of times someone who might be searching for St. Paul might just type in S-T dot Paul. That will not pull up the autocomplete on the site. It won't autocomplete to St. Paul, Minnesota right away. So that is one area for improvement, say, abbreviations of city names. Or maybe even there needs to be a component that is able to auto convert those abbreviations into full names. You could get very magical with what's going on to actually convert that user input. I may have just given myself an idea for how to improve that.

Jeremy:

Oh boy! Looks like we need more datasets!! 😆

Alena:

I might need some more collaboration here 😅 This conversation has been helpful 🙂

Jeremy:

That is pretty cool. You know, the search part of it is interesting. If I had to make a suggestion, I think a ranking system of sorts would be a super [useful feature]. I have no clue how you'd implement it, but it would be nice, you know? Because when I type in Minneapolis, the first thing comes up is Minneapolis, Kansas - And I'm like, what? Who cares about Minneapolis, Kansas? 🙄 There should be some kind of metric to [say] “I know what the most important Minneapolis is”. Maybe by population of the city.

Alena:

😂 That's true, that's true. I think I could be wrong, but I'm pretty sure that there are population values in the Geonames dataset. I'm pretty sure that might be something that can be pulled in.

Jeremy:

Well, because of this one single tiny nitpicky flaw, your app is terrible. 😤 Absolutely, you know, worst app ever. Not worth using. And you used PostgreSQL instead of the obviously based, glorious, much better MySQL.

Alena:

Daddy Oracle.

Jeremy:

How dare you? 😠

Alena:

Big Daddy Oracle. 😏

Jeremy:

🤣 [Only] praise [allowed]! I will accept no Oracular slander in this house. Could you tell me more? I know so little about the database side of things. Why PostgreSQL over, say, MariaDB?

Alena:

Honestly, I knew that PostgreSQL is quite big in the open source space. And I kind of wanted a chance to try it, give it a spin. I kind of figured, “Well, if things are not working super well, within the first few weeks or so, it wouldn't be too hard, using an ORM, to switch from PostgreSQL to MySQL, or back to, say, MariaDB. I haven't had any personal experience with MariaDB. I've been told that it's kind of like a drop-in replacement for MySQL, which would be great to have that same kind of syntax and functionality that I expect. Just minus, you know, the Big Daddy Oracle. 😁

Jeremy:

Right. 😆

Alena:

I kinda wanted to take PostgreSQL for a spin.

Jeremy:

Give it a shot. Yeah, why not?

Alena:

So far, I haven't run into any performance or specific lack of functionality that it didn't have compared to other relational database servers. I'm quite happy with PostgreSQL. On another note, on what you said earlier – we should totally make an app called OpenSpores, a mushroom identification app with an open data set, where you can input different mushroom features and narrow down which shroom you're looking at.

Alena:

😂

Jeremy:

You know, maybe some computational photography stuff, although that gets kind of icky and proprietary.

Alena:

😔

Jeremy:

Who knows. Just food for thought and thought about food.

Alena:

Maybe we will have to make our own machine learning model for identifying mushrooms and make our own Friday night hack project of a mushroom identifier.

Jeremy:

Perhaps, perhaps. It's certainly an option. I think there's certainly some intersectionality. Anyone interested in networking should be interested in mushrooms, I think.

Alena:

😆

Jeremy:

Perhaps that's just me. You know, we need more alternatives to these hot technologies. They're so, so proprietary. I really like especially how this app... it feels professional.

Alena:

Oh, thank you. ☺️

Jeremy:

You wouldn't think it was made by a single person.

Alena:

Oh, thank you. 😊

Jeremy:

[You'd think it was made by a] team subdivision of, I don't know, some sort of activist group.

Alena:

Someone told me my app look quite corporate. 🤣

Jeremy:

Oh! 😵 Oh no.

Alena:

And I'm like, oh, no! 😅

Jeremy:

Oh, no, no. I'll make you a style sheet to make it look like a dive bar. I'll add some Web 1.0 flair.

Alena:

Excellent.

Jeremy:

But, you know, it's cool to see this sort of... grassroots free software activism in the place of more traditional, official, state or corporate offerings. And it's kind of a radical model you have here. Do you have any other areas of social malaise that you think would benefit from similar projects like this? from active open source [development]? What do you think needs to be made less proprietary, if you could choose?

Alena:

Things that could be made less proprietary... 🤔 My focus has been tools for the LGBTQ space. I'm sure there could be quite a lot more search tools created for all sorts of different specialized medical care. But for any particular applications, what would I like to see more open source of? hmm...

Jeremy:

I mean, for my money, I talked – like a year ago – to my boyfriend about making a open source gay dating app. But Lord knows [certain reactionary] heterosexual people would riot if they found out that was a thing. 😒

Alena:

😞 I'm sure there's a plethora of great ideas that could be used for that. Just even glancing at my phone – I'm using a proprietary medication tracker app. I'd love it if there was something I could use that had a good hook into a federal medication database, to allow me to quickly add meds without all of the proprietary, nasty tracking features that are probably going on under the hood.

Jeremy:

Mozilla released their report last year – Privacy Not Included – that talked about all these different apps in the Google Play store and how the permissions that the [Play store page] said the app would need had no correlation with the actual privacy policies on the apps' website. I saw an email a few months ago [from them] – they've done updates on this since, and the worst performing section probably shouldn't be any surprise: Mental health apps.

Alena:

Geez.

Jeremy:

People who need care? Tell me all your deepest secrets so that I can monetize them. Doesn't that sound fun? 🤑

Alena:

That's... kind of disheartening to hear. 😞 Well, if anyone has any ideas to make good mental health apps, that sounds like something that could benefit from a new contender in this space, a new free contender.

Jeremy:

For sure. Definitely.

Alena:

Or paid.

Jeremy:

Or paid!

Alena:

I'm not against paid open source applications.

Jeremy:

Yeah. Open core or other models. NOOO!! You must starve for your work. 😈 Absolutely. You know, I'd love to do something similar [to] this – make some kind of contribution to the queer community in my... tech bro way. You know, convince them I'm on their side.

Alena:

Yeah.

Jeremy:

It would be nice to [perhaps] fork this and do something with that, maybe with a different data set. I like the idea of a locator app of things that are mappable. It makes it very tangible, you know.

Alena:

This application is GPL 3.0, sooo have at it! 🥳

Jeremy:

Hey, there we go! Well, it seems like all the work was in the dataset preparation anyway.

Alena:

Reskin it. Go for it.

Jeremy:

All right. Perhaps I will. That could be kind of fun. 🙂

Welcome to Cyberia Chats!

This is the start of an interview series here at Cyberia where I, your host, Bread, will be interviewing members of the Cyberia Computer Club about projects they've been working on. The folks here at Cyberia write some top-notch software – often with little to no recognition! They deserve better. We have an enormous wealth of talent here, just dying to shine.

Hopefully, these talks will inspire folks in Cyberia to contribute to each other's projects, or maybe just take a look at the code, or perhaps just talk to each other a bit more. Here to begin the conversation with me is Alena, the talented developer of mychoicehrt.org, an open source website that trans folks can use to find nearby healthcare centers.

We (meticulously!) edited this interview for clarity. If you'd like to hear the original interview, or see the original transcript generated by Whisper, DM me on Matrix at @breadzeppelin:cyberia.club.


Jeremy:

And hello there! We are live with our very first Cyberia Chat. This is an interview series that I, Bread here, hope to start – where we do deep dives into the amazing projects that all the talented folks in Cyberia are working on and have worked on to try to pick their brains to get a sense of what motivates them – so that they can feel like they're part of the community, that people care about their work, you know? I mean, so much of my whole career is spent doing meaningless bullshit work that no one will ever appreciate, so I'd hope that we developers... [I'd hope that] the stuff that we're doing outside of work gets appreciated, you know?

Alena:

Yeah, it takes a lot of energy to, if you have a full-time job, really put in that same level of effort in another project, because there's always the fear that you're gonna...burn out on that specific type of skill, you know? I feel that it's important to recognize when you're using a skill too much, or pushing yourself too hard – because it's a lot.

Jeremy:

No, what are you talking about? It's easy! It only took you 196 commits... Nooo, it's nothing.

Alena:

😆 You know, over the course of like three months.

Jeremy:

No, whatever!

Alena:

Working full-time on it. I quit my job to do this for three months.

Jeremy:

🤣 Oh my god.

Alena:

😂

Jeremy:

Maybe you'll get some new folks on Ko-Fi or something after this. I hope so, Alena. I've always thought this was a pretty... this was one of those things that when I saw it, I was like, “Whoa! Why is everyone not freaking out? This is crazy! Is no one... what? Is no one...?”

Alena:

I hope that I'll get a small amount of traffic, and I hope that the site has been useful and is working for the folks that have found it.

Jeremy:

I hope so too, you know? I hope you're getting some good user feedback and all that. That'd be cool. I feel like you're making a difference in the community. I guess that is your goal, right?

Alena:

Yeah.

Jeremy:

Could you tell me what drew you to this issue and how you got inspired to start this [project] in the first place?

Alena:

Yeah, so I've been following the whole legislative storm of different bills that are either restricting or completely outright banning certain types of care in the United States. And specifically, I feel passionate about following what's going on with transgender care and informed consent medical care. I've been following an activist named Erin Reed who provides resources for keeping up-to-date on legislation that affects the transgender community. She also maintains a list of about 900 or so informed consent clinics in the US, which is a colossal amount of work for one person to do.

Jeremy:

That's just one person!? 😳

Alena:

Yeah, clinics in the US and a handful of clinics in a couple of other countries too. It's a very large data set that I've been following for a while. My idea was to see if there was a way to help people search it a little easier, to be able to enter just a couple of location details and have it instantly pull up a list of the clinics from the data set – to make using that resource even easier. Since Erin's map uses Google My Maps, it lacks the same features that you would typically think of Google Maps to have, like searches using your location or advanced searches for things near me. If you want to find clinics near to you on the map, you have to know where you are and find your location which involves scanning over the map to find your region or knowing the latitude and longitude of your town. Then it's a process of visually finding what clinics are close enough. So my goal is to remove that step of having to manually search the map and quickly pull up the closest informed consent clinics. The project first started as pulling in all the clinics from Erin Reed's map to catalog them and make them searchable, but it kind of grew a little more from there.

Jeremy:

Ooooh!

Alena:

I was thinking I could also pull in other data sources as well. I added one other data source to my website, which is the Southern Equality Trans in the South list of transgender care providers. My site is only importing their informed consent clinics, but they have a whole lot of other resources not just confined to informed consent clinics. They have a search interface to find more transgender – even general LGBTQ+ friendly – care; they might be a resource to look for.

Jeremy:

Glad you're shouting them out. Pretty impressive. You know, a good amalgamation of very important, relevant data sets, you know, data science and data sets... These are words that sound so abstract, I feel like, to a lot of people – but no, this is useful, you know? And this is the kind of thing where inaccessible, bad UX gets in the way of people, especially with the earlier thing, the Erin Reeds map, you know, Google user map. Poorly integrated, old Google project....

Alena:

😅 Yeah. People could do with a little less Google tracking them, especially when it comes to medical care.

Jeremy:

🤯 Whoa – that's also a good point. Privacy side of things. Better to just have your resource, which, you know, is open source. People can see it [without fear of being tracked]. They can deploy the web app themselves, I guess, in theory. But yeah, that's awesome. I didn't realize that that whole Erin Reed dataset was compiled by [just] that one person.

Alena:

Yeah, Erin is doing an immense amount of work and should be applauded for it - because they are still maintaining that map and still doing very, very good work.

Jeremy:

It's not over.

Alena:

Yeah. The goal is a resource you can quickly find clinics on, quickly find the care you need, all while not having any kind of tracking in the midst. My site's not tracking anyone who comes to it. Well, with the exception of the contact feedback form - Whether HCaptcha is doing any, you know, any particular logging of HTTP traffic when the CAPTCHA handshake is going on – that's the part I'm not as confident about 😬 But at least the main search interface -

Jeremy:

Woooooow. Wooow! 😂 Interview over. Terrible app; not private.

Alena:

Oh no. It's all gone. It's all gone.

Jeremy:

Game over, Alena.

Alena:

It's game over now.

Jeremy:

Why'd you blow it like that? 😆

Alena:

Oh, I know. I know. 😅 I wanted to try to keep bots from spamming my contact form. So I was like, “Dang it! The tried and tested CAPTCHA service.” I suppose one could host their own CAPTCHA. I'm sure there has to be some self-hosted option.

Jeremy:

Doesn't Forrest has his own CAPTCHA service? Maybe you can switch to using that.

Alena:

Ooh, there we go. There we go. Gotta get in contact with Forest.

Jeremy:

Right, see!? 🤩 This is why we need more cross-pollination, you know? We have our own Cyberia toolkits going on.

Alena:

Oooooh – Cyberia CAPTCHA! 😄

Jeremy:

Hey-ooo 🤯

Alena:

Hosted on Capsul. Woo! 🎆

Jeremy:

CAPTCHA on Capsul. Oh snap. Alright, now we're cooking... but let's move on. Glad to hear the grounding here – fighting for something you care about.

Alena:

Yeah :D

Jeremy:

This is a field where privacy really matters. I remember last year when Roe v. Wade got overturned because, you know, we live in a 10th, 11th world country -bottom of the barrel country court system; but I digress. You know, when that was overturned, everyone started freaking out about their period trackers [and] stuff like that.

Alena:

Rightly so, because there's a lot of those medical-oriented applications that are logging all of that data – and while a lot of them might not be blatantly using it for tracking that specific user, those are just goldmines of people's personal health information, too – if those ever get leaked, and if there's anything personally identifiable in them, that's not good, to put it lightly. Yeah.

Jeremy:

Overnight, I feel like, a lot of people went from, “Oh, who cares about my data? Everyone has all of my data,” to “Oh my god, wait, I really need some privacy right now[^1],” especially if you are a woman. <sarcasm> And, you know, trans people, well, lord knows, they're certainly not under attack anywhere. Noooo, no, definitely not. </sarcasm>

Alena:

Yikes. It's a tough time.

Jeremy:

It is – but I think that projects like this are important to show that there is good stuff that can happen in the programming space. A lot of the folks I talk to who care about trans rights are generally non-techie people. They're maybe more bookish, artsy types. [In] general, [the] leftist folks I hang out with are oftentimes Luddites. I don't mean to use that [as] a derogatory term.... [I just mean that they're] skeptical of large tech companies. I get that [concern] – so I think it's important that we have stuff like this to [say], “Hey, we can help! Technology is a tool. We can use it. We can do good stuff with it, even if that tool is PHP.” Could you tell me a bit – *bursts into laughter*😆

Alena:

Ooooh. 🤨 “Even if that tool is PHP”? I feel a little attacked here.

Jeremy:

Attacked!? *poorly feigning ignorance* 🤣

Alena:

😆 You know, PHP is—

Jeremy:

All right, tell me about this terrible— na na na 😆 I've been reading some of the docs for PHP, and it seems that PHP has turned around quite a bit in recent years. A lot of new features have been added to the language. It's pretty interesting, some of the stuff that the [language has] these days. I mean, [it has] just-in-time compilation [now]. They're adding Java style [compilation] to PHP. That must be good for performance, right?

Alena:

PHP is slowly, slowly becoming a more strictly typed, less dynamic programming language. Slowly but surely locking things down – adding a full, strict type system in, if you want to use it. Cleaning up older functions and making them more consistent. Making changes under the hood for performance and things like just-in-time compilation. If you have a web server that's written entirely in PHP, without any use of Apache, features like just-in-time compilation can help immensely with those types of applications. So, yeah, there's a lot of modernization going on in the PHP project. ☺️

Jeremy:

Very cool, very cool. I'm sure it must have changed a lot over the years as you've been working [within the ecosystem]. There was quite a lot of neat little aspects of the architecture [that] I saw, [that] I learned about as I was going through this. Stuff like Symfony, and... what's it called, the ORM that you use?

Alena:

Yes, Doctrine.

Jeremy:

Yep, that one. That was pretty interesting. You know, I am someone who is just learning the PHP ecosystem now. It's kind of fun! This is a fun little peek into the [PHP] world to try to learn it[s mysterious ways~]. What are some of your favorite little – in the PHP zone, the PHP space, the environment – what are some interesting little projects happening that have inspired you, as a developer?

Alena:

Ooh... projects in the PHP space that have inspired me... ...well, I started out doing PHP dev just through work. That's how I kind of started out getting into that zone. And a lot of times in the PHP space, there are quite a lot of projects – particularly ones, you know, that aren't kind of using one of the major frameworks. You know, it's quite a lot of times common to see a PHP project built completely from scratch, without any kind of framework.

Jeremy:

Wow. *impressed*

Alena:

So I came from doing PHP without a framework at the start. I learned the language without a lot of the tools like Laravel and Symfony, and even without an ORM tool like Doctrine, to get started. I'm also thinking, like, how much am I allowed to specifically talk about the code base I worked on in my first job? Since it was a proprietary code base.

Jeremy:

Oh, sure, you don't want to have trouble with your former employer.

Alena:

Oh, that good stuff. But yeah, through getting started with PHP through work, I started investigating the Symfony project for a new JSON API. I've always liked building API applications - specifically APIs paired with some kind of other front end layer; whether you're server-side rendering at that layer, or whether you're using a single page app framework. Since I also came from the Java world before PHP, I was drawn to Symfony because it was very, very close in a lot of syntax and structure to the Spring framework in Java.

Jeremy:

Ahhh!

Alena:

That drew me there because I have familiarity with the Spring framework, and it was kind of like, “Oh, I'm back home, but in a language I like a little bit more”. ,*Both Laugh.*

Jeremy:

Watch your toes with just in time compilation! Maybe PHP is turning into Java. Oh, God.

Alena:

Yeah, just in time compilation. It's an interesting topic, because I really think it benefits specific PHP applications that aren't... well, I should probably back up a little bit — The PHP lifecycle. The classic PHP application being the LAMP stack application, where you're using PHP with something like Apache, where Apache has a module that is a PHP module, and Apache has a series of threads and says, “Okay, a request is coming in, I'm going to send it to PHP; PHP will run the code, process the request, spit out a result, and then PHP's done.” So in that typical lifecycle of PHP, PHP starts up, and then it stops. It's not running all the time. It only runs when a request actually comes in. Now, for a server built entirely in PHP... Swoole is one of those ones out there; I think ReactPHP is also a similar kind of application – where the server is entirely built in PHP... ...that's where just-in-time compilation can be very helpful – because the PHP process theoretically is on all the time; thus, the just-in-time compilation is very useful because the application isn't having to bootstrap all the time. It's able to do the parsing of the code base, compile all of that, and have that at the ready throughout the lifecycle of the server. ... That was just a side note; that's probably not particularly super— 😅

Jeremy:

No! That's cool. It's redefining what PHP is, what it can be used for. It really expands the possibilities, and I think it's a smart feature to add. It's certainly one of the one of the selling points of Java, right? I mean, if I was told I could have Java without public static void main(String[] args)-ass boilerplate, I'd be like, “Sweet! Sign me up!”. You could have easily slipped a PHP into my dev world, like parents slip broccoli into their kids' brownies.

Alena:

,*chuckle*

Jeremy:

I would have ate that up. But yeah, maybe PHP just needs a bit of optics help, perhaps.

Alena:

I think what really doesn't help its reputation these days is... Number one, there's all the existing views of PHP as the old, gross, nasty, WordPressy language. I feel like there's a specific stereotype about PHP in that regard. But then two: I feel like PHP could use some better beginner resources, like those that Python has, for example. If you go to Python's official website, there's a very, very simple tutorial for, “Let's get you started with Python!” immediately on the homepage, to get you started with simple code – whereas there's not really anything like that on PHP's official website. It's kind of like you've got to dive in the docs, you've got to find the Getting Started page, you've got to go through the whole rigmarole of installing a CLI interpreter and all of that... where, with a bit of work, the homepage and the Getting Started resources could be streamlined and improved a whole lot. In fact, there is another project, I don't remember the exact name, but there is another project that is working to try to make a better Getting Started guide for new PHP users.

Jeremy:

No way.

Alena:

Yeah, it's a work in progress, I think.

Jeremy:

That's great. I think that's awesome. Accessibility, good documentation, it's the stuff that no dev wants to do if they're doing it for passion, because they just need stuff for themselves. I imagine PHP people often— ...PHP people, there's definitely a recursive acronym you can use for that... But yeah – PHP folks probably think, “Oh, you've been doing this since '97, haven't you? You don't need a beginner's guide.”

Alena:

Oh. 🙃

Jeremy:

I'm glad there are folks who care about that, because that's good, because I've never coded in PHP, and I'm glad I have you [around] to help me out when we get to the next step of this process. That will be pretty cool.