Elm Town 87 – Wonder: From machine to mob learning with Sophie Collard

SEPTEMBER 23RD, 2025
|
48:59
Sophie Collard describes her transition from environmental engineering to software, mob programming to teach functional concepts, and building a startup app with Elm.

Details
/
Transcript

Sophie: Elm is the first frontend language that I encountered where I was like, okay, I understand this.

I don't need to spend, you know, six months learning about, an entire ecosystem and an entire build, system and whatnot. It's very simple. I can build a small, you know, UI pretty quickly, and at the same time, it feels like this UI scales very well.

Jared: Hey folks. Welcome back to Elm Town. I'm your host Jared M Smith. We'll be visiting with Sophie Collard today.

[00:00:29] Sponsored by Logistically

Jared: But first, let's talk about our sponsor Logistically. At Logistically, we make intuitive software to help logistics teams make better decisions and improve efficiency. We build the front end for all new features in Elm.

If you're interested in our mission and enjoy writing Elm, please drop us a line Elm Town at Logisticallyinc.com. I'll put a link in the show notes.

[00:00:50] Introducing Sophie

Jared: Now, let me introduce Sophie. From her GitHub profile. She's quote, "an energy and environmental engineer, accidental software developer. She works at Digital Genius as a senior backend engineer.

Has a background in Scala, wrote an app for viewing air quality data from London Air using Elm and Leaflet js. She gave the talk at Lambda Days 2024 "Lessons learnt from writing 10K lines of code in Elm". She published the sophiecollard/jsonpath package. Sophie, welcome to Elm Town.

Sophie: Thanks, Jared. Thanks for having me here.

[00:01:33] Journey to programming

Jared: I'd like to get started by asking you how you got started in programming and what's your origin story there?

Sophie: It's a long story. I think, uh, my first exposure to programming was probably at a very, around the age of 11 or 12. Um, my dad upgraded his, his old PC and I inherited the old one. And, you know, at the time, internet was a, it was a new thing. We had just got it in the home, I think maybe the year before. And the first thing of course I wanted to try and do was I want to build my own website. And so he taught me very, very basic, you know, a little bit of HTML. Most of it was done with a WYSIWYG editor at the time. Um, I think it was called Front Page. Um, but still there's a few things. I, you know, I had to go and look at the source code and edit a little bit, and I think that was my first, you know, my first exposure to, well, it's not really programming, but you know, the first time you look at, some sort of code . So that, that would've been then. And then much, much later, when I was in, in university, I had to do, I had to do, um, like I, I needed to know a, an extra course to get some additional credit for my masters, and Coursera was a new thing at the time, and they had just released this machine learning class that used a language called MATLAB, which I'd had a little bit of exposure to for university. Not too much. So I took this course and I think that was the first, well again, it's not really software development, but it's, you know, using code to, in this case to do some machine learning. And I think that was my proper first introduction to, I would say more, yeah, series programming, getting some more interesting results out of writing some code. Yeah, and I just continued from there.

Jared: Okay. Wow, so you went to school for quite a while before you were kind of, I guess, decided that that was the route that you wanted to take. It sounds like.

Sophie: Yeah, absolutely. I, I didn't train in, uh, software engineering at all. Um, so I did, uh, environmental engineering for my undergraduate degree, and then master's in Renewable Energy, which is more, um, mix of mechanical, electrical engineering. And, yeah, so we didn't really have much programming aside from a little bit of MATLAB, but that's more for like, yeah, numerical simulations, things like that.

That's not really software development per se. And so it was kind of by accident that I fell into first this machine learning class. Um, and then from there it made me, of course, want to learn Python, and slowly, you know, start, you know, discovering the world of actual software engineering, of, you know, building actual web applications and, and so on.

Jared: Yeah. So how did that progress from there? So you, you took the class, you decided, oh, I'm interested in this, I wanna keep doing more. What do you, what all did you do? You learned Python, you mentioned that, but like, how did you get your first job? How, you know?

Sophie: Yeah, I was very lucky. I guess with the first job I found a startup that worked in energy data analytics. specifically something called load disaggregation. So you take, an aggregate consumption signal from, you know, the meter, for example, installed in a household. And you try and identify the individual appliances that are being switched on and off and creating that signal. it was very, I'm, I'm not sure it's still that popular these days, but at the time, I guess Smart Meter were a new thing and it was very, there was a lot of hype around this, um, what you could do with this technology. Um, and so they were quite keen to get someone with, um, experience, you know, or at least some basic understanding of, um, energy usage, um, and various appliances and maybe less demanding in terms of programming background.

Like knowing a little bit of Python, a little bit of MATLAB was okay. yeah, they didn't require that I had a computer science degree or anything like that, and so I managed to get that first job. and I worked there as a data scientist for a couple years. And, you know, the thing that initially drew me to, to data science was I thought I would be doing very interesting math all day.

I would be, uh, designing all these new exciting algorithms. Uh, and the reality of it is you spend 80% of your time cleaning data, and maybe the remaining, you know, 20 15% at that time doing, um, beautiful graphs for, uh, PowerPoint presentations and, and stuff like that. And so it was very different from, from what I had expected. and at the same time, there was a team right next to me that was the backend engineering team that was talking about this exciting language called Scala. Um, and I started eave dropping, you know, on, on what they were doing, and joining some of their, you know, morning stand ups, trying to understand a little bit what, what was so cool about s Scala, why, what were we doing with it? Uh, and slowly transitioning towards doing more, um, yeah, backend engineering and away from the data cleaning and, and all that.

Jared: Oh wow. Okay. So I wanted to ask about the data cleaning, but let's, let's hold off on that. That's, I think, more, um, related here is, how were you able to kind of, you said you joined the standup, so definitely you learned some things from there, but how were you able to make that transition? What were some of the, the strategies that you took?

Sophie: So I think one thing that helped a little bit was, um, so there was one member of the team that was very, very experienced with Scala, um, that had written already an open source library. The rest of the team was fairly new to it. But that team member, if I remember correctly, I don't know if they were weekly session or I, I don't remember the exact cadence, but he used to do regular session where he would introduce the rest of the team to, particular SC concept. And we would also go through some sort of. Probably one of the best known scholar books is called the the Red Book. Um, it's this manning book, I think that is called Functional Programming in Scala. Um, and also as part of this session that we would go through some chapters in the book. Um, and that, that helps me personally.

'Cause it's very, the, the interesting thing with functional programming is it's so different, I think from, if you've done object oriented or whatnot, that you. You know, everyone in a room, whether it was me with very little experience actually doing proper software engineering, or whether they were an experienced, for example, Java developer coming from object-oriented programming to functional programming.

Everyone was sort of on the same level anyway. Um, all this was completely new to us. And, this session and this approach of, um, going through this book that explains functional programming concepts from the ground up just worked really, really well.

Jared: Okay, so you had a bit of machine learning experience, Python. And then you were sort of at a level playing field, learning functional programming as the paradigm that you, uh, that you were beginning to use as a team, is how I understand it.

Sophie: I, yeah, I, I'd say so. I mean, obviously, you know, there's, there's a whole background in software engineering that I didn't have. Um, but at least when it comes to understanding, yeah, basic concepts like, I don't know, like what we call ADTs in s Scala or, or the idea of using recursion rather than using loops.

You know, I think all of us were, it was new to all of us, and so we were all kind of on the same, same level in that regard.

Jared: Sure. Well, you mentioned. Sort of expecting to be able to write these beautiful algorithms, right? Uh, but uh, that didn't end up being the case. When you got into there and you found that you weren't

weren't creating as many algorithms as you expected, but then you found this functional programming. Was that able to fill like a, something that you were looking for, or how did you feel that, you know, if that kind of rug being pulled out from under what you expected it to be?

Sophie: I guess it's, well, it's, it's obviously very, you know. Very different from, um, looking to machine learning algorithm, but there was something

Jared: I.

Sophie: not it's, it's not. Like, people like to say that functional programming is a little bit like mathematical and whatnot. It's at least the level that I got into it, not really.

Um, the concept is

Jared: Hmm.

Sophie: simple and whatnot, but it was, I dunno, there was something about it that I guess fulfilled, you know, that fulfilled me in a way that the rest of my work didn't. , So yeah, that's, that's what attracted me to it, I suppose. Yeah.

Jared: Interesting. So what kind of things were you building as you were getting into Scala?

Sophie: So the first thing I built, it was a backend, I think, API that I, that was already, mostly built. I think it used the play framework. Um, but as I slowly transitioned into that team, it started, you know, having to, uh. You know, started with very, very basic things. Like someone wants a new endpoint that has a very simple thing, and I'll go and add the endpoint or they'll report a small bug and I'll go and fix that.

It's very progressively, you know, um, getting familiar because again, you know, not having been, um, a proper software developer before, um, yeah, I, you can't completely let me loose on a, on, on a service I have. You have to start with very small tasks, very small steps, but yeah, that's the first thing I started doing is, yeah. Maintaining a backend API, doing small tweaks to various endpoints and whatnot.

Jared: that makes sense. You're sort of learning as you go along and building up a bit of knowledge and functional programming, backend development.

[00:10:35] Learning Elm

Jared: At what point did you learn Elm?

Sophie: Um, much later. Oh, I think I started, I wanna say 2019. I was trying to go through my, my, um, GitHub profile earlier to try and find the very first Elm project that I did, but I, I'm afraid I may have deleted it. but I, I want to say I'm pretty sure it was Elm, zero 19 already. So I wanna say sometime in 2019. Since moving to software engineering, I tend to always have some project that I do on the side. and that can be an open source, not so much. I, I have one, I think, one very recent, um, open source project that I, that I've just released, but mostly there are like either, little startup projects or other, you know, random things that I care about that I wanna make a website for. and, and of course you need a front end for anything, you know, uh, interesting. And so I started around late 2016, early 2017 exploring, um, what sort of framework can I use for, for the front end because I know a little bit of Scala. but that's not necessarily what you're going to use for, for the front end.

And I tried a few different alternatives. I tried Vue.js, I tried Scala.js as well, and none of them I felt. You know, again, this is many years ago. These may, these may have improved significantly since. But I didn't feel really comfortable with either of those. And I think Elm is the first frontend language that I encountered where I was like, okay, um, I understand this.

I don't need to spend, you know, six months learning about, you know, an entire ecosystem and an entire build, you know, system and whatnot. It's very simple. I can build a small, you know, UI pretty quickly, and at the same time, it feels like this UI scales very well. You know, like I, I started from a small project, of course, and with some frameworks. Building, you know, the start of your project is very easy to set up, but then as you start growing it, and as you start tweaking things, you run into issues. And I, I, that just never happened with Elm. somehow I was able to grow, uh, the project more and more and more and never run into, um, yeah, the sort of problem.

So I just stuck to Elm, and it was the first, sorry, the third, yeah, UI framework that I tried or framework slash language that I tried. and it was the right one. And at this point I just stopped looking elsewhere. Yeah.

Jared: Okay, so you had tried a couple of other things, first. Vue and Scala.js, and then you ended up settling with Elm, and this was, you said around 2019 and you recently gave a talk last year at Lambda Days 2024, as I mentioned "Lessons learnt from writing 10 K lines of code in Elm". What were those 10 K lines of code in app?

Sophie: as of yet unreleased startup project, um, yeah, which was the first, um, yeah, I, I guess I built, you know, over the years I built a series of small project, but this was the first really, uh. Uh, UI heavy project that got started on, um, the idea was, uh, some sort of travel search engine. Yeah, it's, it's still far from completed. As you can imagine, there's, um, there's quite, yeah, there's, there's quite a lot that you have to do from the UI.

I think the previous projects I had done were fairly simple, um, this one involved having, for example, a map with Leafletjs, it involved web sockets. Um, so that's the first time I had to build like a, something that felt like a substantial Elm project and I felt okay. Now I can start reflecting on what my experience with Elm has been.

Did the previous project felt a little bit more like toy projects and maybe, I didn't feel I had really, you know, pushed the language or, yeah. That I wasn't quite ready to give an assessment of, of what my experience had been until, until I worked on something a bit more, yeah, a bit bigger and bit more complex.

Jared: Sure. Yeah. All right, so then maybe we'll come back to what the, this project was. but

[00:14:30] Questions from Monica McGuigan on learning

Jared: one of the things is, you mentioned using web sockets and there's this question from Monica McGuigan.

She says, quote, Sophie and I used to work together and she ran training sessions for the juniors on our team. We started out writing a Twitter clone in Scala and then ended up doing a few sessions in Elm, There's two questions here, so I'll just put them both out and you can answer them as you want.

First is quote, what are some similarities or differences that helped the most in learning and teaching Elm coming from a Scala background. The second is "when introducing people to Elm, was there any way of explaining Elm that made it click for them or that convinced them of what a nice language it is to write" end quote.

Sophie: Right. Okay. So I'll start with the first. The first one, I guess the similarities are obviously they're both, well, s Scala is not, you can use Scala in many ways. It's not like a pure functional language, but at least the way we used it was purely functional. And so I guess the main similarities, yeah, a lot of the. You know, very simple concept, but again, um, things like pattern matching, things like looking, using recursion instead of loops and whatnot, where things that the audience was already familiar with because they use those things in Scala. and so that's, you know, that's one thing that gets out of the way I guess when introducing them to Elm.

You don't need to explain those things to, to them. It's pretty much just all about. The syntax from that point onwards. And the syntax is very, you, it's, it's very limited In Elm, there's not a whole lot you need to go through, especially if you're not attempting to teach the language, you're just trying to explain some concept, um, using an example in Elm. And I guess what made it easy to, to bring Elmin as an example. Sorry. Is it okay to

Jared: Okay.

Sophie: to repeat the second question again? ' cause I

Jared: Yes. Yes. I.

Sophie: part of it now.

Jared: I will quote when introducing people to Elm, was there any way of explaining Elm that made it click for them or that convinced them of what a nice language it is to write quote.

Sophie: All right. Um, anything that made it click, I'm not sure if it was like, well, or at least, you know, I'm not sure I detected a moment where people seem to like suddenly get it. Um, 'cause we went quite slowly and explained the syntax step by step. But. Yeah, I think the thing that helped is, yeah, you have, you have a very, you know, very limited syntax.

Um, I mean basically walk them through the code base is, okay, here's the syntax for, um, record types and here's the syntax for like, um, some types and, that's it. And the rest of it's the pattern matching all that. Even though it's a slightly different syntax, it's obvious what's going on when you see it.

So there's nothing very complicated there. So I guess the things that helped is, yeah. Like, you couldn't do that I think the other way around. You couldn't pick a room of Elm programmers and be like, alright, let's do a backend example in Scala because there is just so much to um, Scala syntax that it would be, you'd have no chance of going through the basics in one single session. whereas there, I guess, yeah, that, you know, you spend 15 minutes explaining the basics and I think everyone's on the same page and you can actually go through, um, the more interesting parts of the explanation about web sockets.

Jared: Okay. Interesting.

[00:17:41] Mob programming

Jared: So you are doing this mob programming in Elm and Scala, correct.

Sophie: Hmm.

Jared: For this project. So what was that setup like? Was it because you're sort of teaching the language and the concept as you go along? Are you the navigator the whole time? Or I mean, are you following that kind of a thing or is it more of a kind of less formal mob programming session?

Sophie: So it's, yeah, it depends on the particular session, what we're doing. for, I tried to prepare some, the much of the Elm code was, you know, written in advance and if there were changes to be made, there were very small changes. and I would probably lead on those and just explain as I was making the changes, um, what was happening for the Scala part.

On the other hand, that's when I would hand over to the attendees, um, to try and get them involved and Yeah. 'cause that part they're familiar with. So, yeah. but I, I like to keep the session as interactive as possible. I like to always, you know, I will usually have to, um, just to establish the context, um, what we're trying to do.

I'll usually maybe have the keyboard for the first 10 minutes and start, um, setting up a project or, you know, explaining what we're trying to do. And then at that point I like to hand over a keyboard, um, to someone else and. Just see what happens.

Jared: Yeah.

Sophie: it's, it's usually very interactive. It's, it, it works. I think more programming works brilliantly for that, for teaching, you know, um, teaching to more junior developers or just people who don't have experience in a particular language and want to get more familiar with it. 'cause pretty quickly everyone gets involved. It's not just a person who has the keyboard. Everyone jumps in and starts for suggestions and yeah, it's, it's a great, it's a great teaching medium.

Jared: Yeah. Yeah, it's really nice. And the way that I learned mob programming, and I've told bits of this story before so I apologize to listeners, but, um, I was at Strange Loop and there were a few folks there who had. Um, who had been mob programming already and they already knew Elm and I sort of ended up joining in with that group.

And, and so I definitely, like, I just was a complete beginner and, and knew nothing, but it was really interesting to be in there and to just kind of like see and, and just be a part of it. But I enjoyed it so much that now, uh, we've actually just started doing it with work, again. I've done it a few times through the past, but, um, still using Dillon Kearns' Mobster program.

I don't know if you've used that. It's written in Elm

Sophie: that up. Oh,

Jared: Oh yeah. Mobster.cc I think is, is the URL. I'll put a link in the show notes, but, uh, it's really nice because it taught me how to do proper mob programming as we went along, because it would show each of the different roles and then you could have, it was a learn to mob game. And so it would tell you like, okay, if you are the driver, then you, one of your goals is to only listen to what the navigator says, not to what the other folks are saying

Sophie: Right.

Jared: mob. And then as the navigator, you know, one of your jobs is to filter, uh, the, what other folks are saying. And then if you're one of the mob folks, maybe you are a researcher or you are supporting the, uh, the, a minority voice, something like that. So I just, I don't know. I, I find it a lot of fun to actually use that and to, to follow it and, and to, and to kind of work through. And so, yeah, we've been using Zed, uh, shout out to, to Zed there for the, uh, the pairing, or I mean the mobbing, but like to all work on the same code base.

Sophie: Yeah, I need to look into that. 'cause I've never tried using a, yeah, proper methodology for more programming, what I call more programming, I guess. There's a bunch of people getting around, going around a laptop and, and yeah, it's, there's little, you know, I don't assign roles or anything like that, but that could be like, that's something I'd like to try, actually.

It could be interesting to try and see if, yeah. If we assign proper roles and all that. How different would the session evolve? Um, yeah.

Jared: and it might be similar, I don't know, but it really helped me kind of frame, and I think the other folks too sort of get into it and get into the right, or the, the mindset of each of their roles as they're in that role. So, yeah. Um. Like I said, I'll put a link in the show notes, but so you're, you're in this mob programming, you're teaching folks Elm and, and, and what is it that you were making?

Sophie: Um, so we did, um, a few different projects. So I think the first project we worked on was a Twitter clone. And so the idea was this, this was, I should specify this was in my previous job. I'm unfortunately not doing it, um, anymore, but . Yeah, so we, we had a few interns join the company. We had, um, and a couple of more experienced folks that just hadn't done Scala before. And so the idea was just teaching them well, how, how to do the things that we do day to day. So we build, you know, REST APIs and we have to access, uh, a database, some sort of relational database, you know, Postgres, Oracle, something like that. and. You know, one way to do it is, um, rather than just, just give small bite-size examples, which can be a little bit boring, I felt it would be fun to actually build something end to end like a, a real service.

And why not build, why not build a product that, um, you know. That many people are familiar with, could have been something other than Twitter, which are sim simple enough. Um, yeah. 'cause there's, there's not a whole lot, not a whole lot to it. So you can realistically in maybe a dozen session, you can actually end up with something that is pretty close to, to where at least a prototype of it might have been. Yeah. So that's the first thing we built. And so that allowed us to go through, yeah, how do you build, um, rest and points? How do you decode and encode JSON? How do you talk to a database? All those sorts of things. And then after that I did a few more, um, sessions on specific topics. So I did one on web sockets in which we, um, well, in this case we really needed a ui, so we introduced Elm. I guess this sort of topics. Yeah.

Jared: Okay. Very cool.

[00:23:47] London Air UI

Jared: I'm thinking about your other project. I wanted to, to bring that up, the London Air UI application, the air quality app, and you integrated that with Leaflet, I believe. And so what kind of challenges did you face with that integration? Was there anything that made it, because it's a, a JavaScript framework, not an Elm

Sophie: absolutely. Yes. And I could not find, again, that might have changed at the time. I could not find a library, um, to do that. I think, I think the main challenge was, um, you know, the first temptation is for every JavaScript method, um, to have a port in Elm and try and do that, um, that, that, that's what at first seems like the most natural thing to do. the problem with that is you're going to, you know, you're only gonna call. One port, you're gonna, you're gonna send one command to one port at a time, and then you have to, you know, wait to get something back before you can do something else. And the way J JavaScript API has been designed is you don't, you know, you have to chain multiple, you have to like, yeah, do multiple things, one after the other to actually s. Um, you know, take a particular action like add a new, um, say a new pinpoint on your map or draw a line or something like this. So it was actually trying to move away. Like it took me a, a little while to realize, okay, I have to move away from that model. Um, I'm going to have to define ports that accomplish particular actions such as, yeah, draw this line between these two particular sets of coordinates or, or put this particular flag on the map. And then. I'll have to actually write, you know, a JavaScript function for that that maybe calls multiple method in the Leafletjs API. But I shouldn't try and do a one-to-one mapping, which was, I guess, what I'd originally assumed, which would make most sense. But but I think aside, aside from that, it was, it was surprisingly easy, to be honest, I wasn't entirely confident when I started on it that I would be able to get it to work, um, being, you know, neither an experienced JavaScript developer, nor nor an experienced Elm developer. But, you know, eventually I got it to work. So that was, uh, yeah, that was quite a good surprise.

Jared: Yeah. Yeah, I, I checked it out. It's, it seems nice. Seems to work well. It's interesting you used, uh, ports for that. I ended up, I had to use leaflet for work and I ended up using custom elements. For the, for the way that I integrated. So I'm, I wanna check out and see your, because that source code is on GitHub, so I'm gonna Yeah.

Have to look at that and, and see, um, I'll put a link to that in the show notes if folks wanna check out the, the London Air Quality app and, and see how that's done. So Yeah.

Sophie: I'm not actually familiar with custom element. That might make a lot more sense. I just, yeah, it's not something that I've come across or looked into.

Jared: Yeah.

Sophie: Um.

Jared: Yeah. Um, I think it, it made a lot of sense for this one for me, but, um, I, yeah, I definitely wanna see. Maybe, maybe it would be, I think if it were using ports, there would be, yeah, some different trade offs with the way that you set things up. The way that I did it, it would pass properties through so you would encode.

Uh, the, into the, the custom element, which properties, you know, like where you wanna plot different things, whatever you want to do. And then, um, that in JavaScript would then call out and, and make those individual little, you, like you said, like each of the little properties within the JavaScript API to, uh, to make that work.

It's been a while since I've done it, so. I'm trying to remember, uh, off top of my head how that worked, but yeah, I don't know. It, it seemed to work fine as well. So, yeah, I, I guess the, maybe the takeaway is that there are multiple ways you could accomplish that and

Sophie: Exactly.

Jared: yeah. Very cool.

[00:27:48] Railpackers

Jared: you mentioned the 10,000 line application that you wrote. Uh, do, are you ready to share any of that? The what that is, the,

Sophie: Uh, oh, I, I can absolutely share yeah. What it is,

Jared: yeah.

Sophie: it may be released. I, I have no idea. It's

a

Jared: Sure.

Sophie: In progress. Um, but yeah, it's basically, it started as a flight free travel search engine, which is really to say a, um, rail travel search engine. Um, at least in Europe, that would be the most viable alternative. yeah, because I've started, you know, I started trying to, um, travel by rail as much as I could. Um, interestingly, when I went and give that talk on Elm, it was in, in Poland, and I actually managed to do the trip from London to Krakow, uh, by train. It just took three days each way. Uh, but it is doable if you have the time for it. but yeah, but when I started, you know, trying to travel more. As much as I could by train rather than flying. I realized the existing search engines are really not very well designed for that, uh, like a design for shorter trips, and I suspect they are pretty much, you know, I suspect somebody took the, the kind of algorithm and user interface that you would have for maybe a local transit system. Um, which is just used by commuters. And just scaled that up to the European Rail network because if, for example, I run a search for trains from London to Krakow um, the results that we'll get will be, oh yes. Um, you can travel in 25 hours straight. You will change trains in the middle of the night, um, in some place in Germany and you'll have, you know, 15 minutes, uh, to catch a connection.

Which if you, if you have taken German trains recently, you should know not to leave 15 minutes between connections. 'cause they're at least an hour late. Um,

Jared: Yeah.

Sophie: so, yeah. So I thought this, yeah, there's, I, I couldn't find, you know. A search engine that is, that gave me the sort of results I wanted to do.

And so I always find myself when I'm planning a trip, um, having a bunch of spreadsheets and manually trying to join the different parts of the trip together. Uh, and I thought, well, I'm, you know, I'm an engineer. I have this particular problem, surely I should be able to go and solve it. Um, and, and that's how. I guess I fell into a sort of a rabbit hole because it is not a simple problem to solve, unfortunately. I thought it would be very easy. and I thought that two years ago and I'm still working on it. But yeah, hopefully, you know, hopefully there is a solution to it and it will come across, um, that at some point.

But yeah.

Jared: Yeah. Well, I think it's, uh, a useful thing to have for sure. I know other folks have expressed interest in being able to travel, not through airlines, in order to, to get different places. And so yeah, that would, that'd be nice. Um, of course, you know, for me it would be difficult to, to go, to some of those places without, A boat or a, what I mentioned on one of the previous episodes was a blimp. Maybe, maybe we could take that instead of a,

Sophie: Yeah.

Jared: an airplane. But, but, um, but yeah. So you're traveling, um, through rail a lot. You, you found a problem and you, you kind of wanted to figure out if you could solve that, and you're, you're working through that.

So are there challenges that are related to the front end with Elm at all, or are they all. Sort of related to figuring out how to, uh, efficiently and correctly put people in on different trains and.

Sophie: Um, I would say the, the challenges are no unfortunate, well, unfortunately they're not, they're not Elm challenges because those might be interesting challenges to look into. Um, yeah, the. all the, I guess the challenges that I had on the UI side, I managed eventually, you know, like how, how do I, display a map with Leafletjs. I managed to eventually solve those challenges. The, the challenges are mostly on the data, and data quality side of things and having to integrate with. Basically with every different rail operator, there's no unified API. Like you would have for, for airlines, for example. This, there's no such thing. they, that quality is very variable. Uh, it's not always dependable. So some operators will publish to a particular. End point, and then one day they'll decide to start publishing to a new one. And, and there's no way for you to know unless you go and check

Jared: No.

Sophie: that they've done this. And it's, yeah.

It's, it's not unfortunately very interesting problems, but it's, um, I suspect, yeah, it's, where the bottleneck is, at least for me. Um, yeah, it's the to data cleaning, I suppose. And yeah, back to this sorts of, of issues.

Jared: Sure. Yeah. Well that sounds like, uh, a solvable problem with enough, you know, uh, grit and grind on it.

Sophie: think if you throw enough hours at it and yeah, eventually, you know you

Jared: Yeah.

Sophie: but it's just not very pleasant work sometimes.

Jared: Sure. Yeah. Or finding a, a way to develop a, a standard and then getting everybody to follow it.

Sophie: Or if you can do that, but yeah, I, I'm not sure how realistic that is in this case. Yes. Maybe I should come up with a, my own data standard. The,

Jared: Yeah.

Sophie: data standard

Jared: Right. Yeah.

Sophie: these things.

Jared: We need one standard rule them all. Oh, now we have 13 standards. Right? What's that? Yeah. Um, so, okay. That's, uh, and that's the name of that application is Rail Packers. Correct that,

Sophie: Correct.

Jared: yeah.

Sophie: there is. Uh, unfortunately at the moment, all there is is a signup page, so you can sign up and in, you know, 2030 or wherever. Whenever it gets released, I will send you an email to announce it. Um, but yeah, not

Jared: Yeah.

Sophie: to see for the time being.

Jared: Well, that sounds great. something to look forward to

[00:33:51] The Jackson guitar project (Chushin Gakki)

Jared: and with, uh, your open source projects. There's another one that I noticed is this, uh, guitar directory, Jackson's guitar. You wanna talk about that?

Sophie: Interesting. I I did not know if you'd come across this one. Yes. Um, so I, I suppose that is the other type of project that I do, aside from startup ideas, is if I have a random, very niche interest in this case. It's very, very specific. It's Japanese made Jackson guitars that were made at a specific factory in Japan from around the late eighties to 2011. they're excellent guitars for, you know, anyone who plays and it's not always easy to find information about them, in particular, ' cause some models were only released in Japan. And so I spent a few years, you know, um, going on, Yahoo Auctions and other Japanese websites and, uh, collecting catalogs, to, you know, gather as much information as I could about those. and now I've managed to find a little bit of time to try and build website, you know, to, just just to catalog those. Um, and of course Elm was a natural choice for that. it's interesting you bring it up actually because I started building this as, um, a regular Elm project, I guess even though most of the content really is static content. and so one thing I really want to look into at some point is elm-pages, which I understand would allow me, to kinda mix. You have the same as part of the same application. Some parts that are. I guess more static, like rendered on the server side, whereas some parts could be, uh, dynamic. I have not had a chance yet, look into it, but, you know, hopefully if we have a, well, not hopefully, but at some point if we have a rainy weekend where I have no plans, I might, uh, dig into that and try and refactor that project using, um, pages.

Jared: Yeah, yeah, I'd say check it out because it's, uh, it's a lot of fun. I use it for the Elm Town website and for my, uh, personal, uh. Website as well. And, uh, yeah, it's, it's a lot of fun to, to use, um, my personal website's on version two, but with v3, you can also do server side rendering if you, if you so choose.

So there's some, some really interesting things that you can do with it. Um, I still don't use that with the Elm Town website. I don't have to, but, um, it's mostly static with the exception of I think, the homepage because it. Has, uh, the interactive little logo thing on there, but, um,

Sophie: Right.

Jared: But yeah, so, um, yeah, the, the idea of these data sources and how you can use those are pretty cool. And I think you would probably, uh, be interested in, in seeing how that, uh, works out. And it seems, it seems like it would make a lot of sense for this as well with the, this directory of. Of guitars, so, uh, to maybe, uh, a little bit different avenue here.

Why these, you said they're high quality guitars, but it seems Yeah, very niche. And I didn't even know how to pronounce this, so I just said this Jackson Guitar Directory.

Sophie: Right. I mean, I don't know how, if, if we wanna get into the discussions, I have a few of them myself. I bought the first one when I was 19. I, I dunno, I guess I should, I should ask first, like, do, do you play guitar? How familiar are you with, with Jackson Guitars or.

Jared: I play guitar, but not familiar with Jackson Guitars.

Sophie: Okay.

Um, so I guess the long story short is, I wanted a custom guitar. I wanted a guitar that they didn't have as part of the regular production series. Now there's one way that everyone knows of to do that. There's a custom shop in the USA. which is rather expensive for a 19-year-old, and takes about, you know, it can take up to two years to get your instrument delivered.

Um, 'cause obviously they

Jared: Hmm.

Sophie: huge, you know, back level of orders to go through. and at the time, something that was not very well known, but in Japan, the Japanese factory had a miniature version. Of the custom shop, so they could do, they could take some custom orders. Um, the choice was far more restricted than what you had with the USA custom shop.

But, you know, it, could do what I wanted. and it was a lot cheaper. I got my guitar five months after placing the order. Um, it was, I think, not intended for international customers, but if you, you know, if you contacted a Japanese, um, store and they were happy to place the order for you, it worked.

Jared: Great.

Sophie: Um, and so that's, that's how I, I, you know, that's how I got my first one and that's how I, I, I suppose, you know, uh, I caught the bug.

I became obsessed with those guitars and started yeah, collecting a few of them. Yeah.

Jared: Okay. Yeah. So you were, you were searching for a custom guitar and I guess you just searched online and happened to find this, or, or how did you, yeah. What was your sleuthing?

Sophie: It was internet forums at the time,

Jared: Yeah,

Sophie: than, you know, social media

Jared: yeah.

Sophie: Yeah. And a few people in the new, I suppose a couple people based in Japan let the word out, um, that if you placed order with certain stores, you could, you could get this kind of, you could place this kind of order and, yeah.

Jared: Very cool. Yeah, that's neat. And, and do you know how to pronounce this? What is the, I don't even wanna try.

Sophie: Oh gosh. Um, my guess would be Chushin Gakki, but I have, I have no idea. I do not speak Japanese.

Jared: Okay.

Sophie: I, I don't know. It may be way off the mark.

Jared: Yeah, but,

Sophie: Yeah. I

Jared: but that spelled C-H-U-S-I-N and then. G-A-K-K-I is is the, um, and that's on your GitHub profile, so if folks wanna check out that, um, that app, there's a link to it from there. And so what kind of guitar are you talking about playing? I mean, I, I also wanna talk about what this guitar looks like because, uh, I looked at some of them, uh, and they were pretty unique.

Sophie: have, I, I, I, I, I would have to go and get it from the, I can send you a picture afterwards if you want. Um, but it is, um, so the, the model is called a Randy Road, which is, you have to imagine it's, it's a vha but it's an asymmetric, um, V-shape, uh, guitar and, well, the, the band that I was really into at the time. Um, the lead guitarist had one like this, so of course I had

Jared: Uh

Sophie: well.

Jared: ah. Yes.

Sophie: yeah, and he had certain specifications on it that you couldn't get on the regular models. You had to go custom shop, like it had 24 frets instead of 22. And at the time, yeah, it had to be custom made to have that. Um, yeah.

Jared: Very cool. What band, if you don't mind.

Sophie: a Finnish band called Children Of Bodom.

Jared: Okay.

Sophie: Um, yeah,

Jared: Interesting.

Sophie: very popular back in the mid two thousands, I suppose.

Jared: Okay. I don't know that one. I'll have to check it out. so we talked about, uh, a bunch of different things here. We've talked about how you came from a background in environmental engineering and in, uh, Scala and becoming a backend engineer through machine learning. And then. Uh, ultimately discovering Elm.

We talked about the mob programming, which I, I think that that seems like a, a really fun way to teach people. And I, I definitely recommend that and enjoy it, uh, just as a way to build up, uh, working in remotely. I don't go into the office, so it's really nice to kind of be able to do that as just a way to build camaraderie as a team. And, uh, we talked about the London Air Quality App. Rail Packers, the Jackson Guitar directory.

[00:41:41] sophiecollard/jsonpath

Jared: I think there's one other thing I wanted to talk about before we finish up here, and that is the jsonpath project that you recently published. You wanna tell us about that?

Sophie: Sure. I actually had to, it's, it's something I first had to do in s Scala as part of my current job. Like long story short parts of, so part of a code base involves running little snippets of codes on AWS Lambda. Maybe I should introduce what the company does first.

That would make a a little bit more sense. Uh, we're basically an AI concierge for, for e-commerce. and so what that involves, um, is, you know, doing things such as. When an end user goes to one of our client's websites and asks a question about, well, where is my order? I placed an order three weeks ago, it's not arrived yet. part of that involves executing little custom bits of code to, for example, go and check, um, that order number against the query and then formulating a response, um, to give to the end user. and so we have lots of these little code snippets that so far have run mostly on AWS Lambda. Um, the thing is, in some scenarios, depending on the complexity of the question you're asking, you might have to run like a dozen of them in a row. Um, and that can get quite, you know, quite slow, quite quickly. And so I had to try and reimplement some of these in Scala. And one of them was the, um, this, uh, jsonpath-plus Library, I believe that it's called, is this NPM package. Um, and I couldn't find something that I was satisfied, uh, within Scala.

So I. At least with the constraints, you know, there's some, some constraint to our project. We're still using Scala 2. And um, there's, were some clashes with some dependencies with, um, ready-made Scala jsonpath library that I found. So anyway, I found myself reimplementing some of these in Scala. Um, and I thought that. Would be, I wasn't entirely sure I could take this code and then release it as an open source package in Scala, since it's something that I did as part of my job. I would have to check, you know, first with, with my employer. Um, but I thought I can probably do that in Elm. That's different.

I'll rewrite it from scratch. It's not the same code. and I couldn't find, you know, an existing package. To do that in Elm and it's really, it's one of those libraries that started not so much, it's not like I needed it. I just thought it would be fun to do it since I already had an idea of how to implement, implement it.

And I guess the exciting thing with Elm is, you know. it's still a language that's, um, it's, it's not that young, but, you know, compared, it doesn't have as large as user base as other ones. You sometimes find library ideas that no one yet, you know, no one else has implemented yet. And it's very, it's very exciting when you get to be the first to, to have a go at, at, uh, implementing those.

So, yeah. I didn't want to miss that chance. I'm sure I'll find a use for it at some point, but it was just mostly a very fun project to do over my, my, uh, Christmas holiday,

Jared: Very nice. Okay. Well, yeah, I'm sure there are folks out there who. Are looking for that. And so now it exists and hopefully that fulfills the need there. Yeah.

Sophie: hopefully.

Jared: Very cool.

[00:44:51] Picks

Jared: Well, Sophie, what picks do you have for us today?

Sophie: right. So.

for me, the, the two main resources that really helped me on my, my own journey would be, um. First one would be Elm in Action, um, by Richard Feldman. Um, I think after doing the basic Elm tutorials on the Elm website, you know, I was looking for maybe a slightly more structured explanation of how to put a project together, uh, and, um, to build, you know, slightly bigger and more interesting projects than, than the small examples I found on the Elm, uh, website.

And that's, yeah, that's the first book I went to, I think. It is published by Manning, which is one of my favorite resources. They, they publish excellent books, like usually, um, I, I don't think I've ever come across a book from them that is not very high quality. So it's, it's pretty dependable. If you've released a book on a particular subject that interests me, I will go and get it. and, and yeah, this one was, um, I think it took me, you know, to the next level, to a level where I was comfortable actually starting, to build, like, yeah. At this point I was like, I'm comfortable building the whole front end for my project, you know? I think I, I, the book has showed me enough, has convinced me that yeah, uh, this is a viable option. Um, and then I have a second one, which is Programming Elm by Jeremy Fairbank. Um, also an excellent book, I guess varies a lot of overlap, um, with the previous one, but, uh, that one had a chapter specifically on web sockets, which I was interested in. I thought, alright, even if the content is perhaps already covered in, in Richard's book, um, you have an entire chapter on the topic that, that is very interesting to me because I want to use web sockets, so I will buy this book.

And yeah, it's also an excellent resource. I, um. I, I would be hard pressed, you know, to say, to recommend one, one over the other. would say just look through the list of chapters and see maybe which ones align more closely with, with what you want to do. But yeah, they're both excellent. I.

Jared: Excellent. Those are great picks. I have both of those as well. Yeah, I do. I do like those, those books. And I like the Manning books because I can work them online and then there's like this live book, so it.

Sophie: Right.

Jared: Sort of knows where I'm at and I can add notes and things like that. That's, that's a pretty neat thing.

Um, with Jeremy's book. I like that. Um, in, it's in PDF, so I can, you know, I can use existing readers as well, and so gain some of those resources. So it's, there's different trade offs with each one. Um, I've actually, Jeremy's I liked because I could use it, pull it up from my phone very easily, and it was easy to read.

Sophie: Oh

Jared: Being in that format. But, but yeah, the, the live book on the computer is pretty nice. Um, with Elm in Action by Richard Feldman. Um, yeah. Okay, we'll put links to those in the show notes. I have just one pick today and it is a podcast and a community Future

of Coding and, uh, I've been listening to the podcast now for a few months and sort of.

Just checking in with the Slack channel, uh, seeing what all is going on there and some pretty interesting things. A lot of it is related to a different way of thinking about programming than text-based programming languages. So like, you know, sometimes using a UI to build a program, but, um, and not relying on existing conventions and just rethinking things, um, and challenging those things in programming. So, yeah, uh, I'll put a link to, to that, uh, in the show notes. Well, I wanna say thanks to everybody listening out there, and thanks Sophie for coming to Elm Town.

Sophie: No.

Jared: Au revoir.

Sophie: Very much for having me here. great talking with you.

© 2024 Jared M. Smith