Podcasts about model view controller

Software design pattern

  • 42PODCASTS
  • 52EPISODES
  • 49mAVG DURATION
  • 1MONTHLY NEW EPISODE
  • Sep 29, 2024LATEST

POPULARITY

20172018201920202021202220232024


Best podcasts about model view controller

Latest podcast episodes about model view controller

Programming By Stealth
PBS 171 of X: MVC in XKpasswd-js

Programming By Stealth

Play Episode Listen Later Sep 29, 2024 78:54


We have a bit of a changeup for today's lesson. While Bart Busschots is in attendance for this episode, he is not be the instructor, he is a student like me. Our instructor today is the delightful Helma van der Linden and she's going to teach us about how she applied the Model View Controller pattern to our project XKPasswd. You can find Helma's fabulous tutorial shownotes at pbs.bartificer.net. Join the Conversation: allison@podfeet.com podfeet.com/slack Support the Show: Patreon Donation PayPal one-time donation Podfeet Podcasts Mugs at Zazzle Podfeet 15-Year Anniversary Shirts Referral Links: Parallels Toolbox - 3 months free for you and me Learn through MacSparky Field Guides - 15% off for you and me Backblaze - One free month for me and you Setapp - One free month for me and you Eufy - $40 for me if you spend $200. Sadly nothing in it for you. PIA VPN - One month added to Paid Accounts for both of us CleanShot X - Earns me $25%, sorry nothing in it for you but my gratitude

Programming By Stealth
PBS 170 of X: Model View Controller (MVC)

Programming By Stealth

Play Episode Listen Later Sep 15, 2024 54:23


We're back from our summer hiatus (actually scheduled for the first time ever instead of accidentally happening!) In this week's episode, Bart takes on the task of explaining the philosophy behind why having a framework for software development is useful and even crucial as projects get bigger and more complex. We chose this topic because the XKPasswd project has already started using a framework called Model View Controller. We get the barest understanding of MVC in this explanation from Bart, and the next episode of Programming By Stealth will be the wonderful Helma van der Linden explaining the details of her implementation of MVC for the XKPasswd project. In the first episode of its kind, I won't be the only student in the class - Bart and I will be learning together. You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net. Join the Conversation: allison@podfeet.com podfeet.com/slack Support the Show: Patreon Donation PayPal one-time donation Podfeet Podcasts Mugs at Zazzle Podfeet 15-Year Anniversary Shirts Referral Links: Parallels Toolbox - 3 months free for you and me Learn through MacSparky Field Guides - 15% off for you and me Backblaze - One free month for me and you Setapp - One free month for me and you Eufy - $40 for me if you spend $200. Sadly nothing in it for you. PIA VPN - One month added to Paid Accounts for both of us CleanShot X - Earns me $25%, sorry nothing in it for you but my gratitude

Latent Space: The AI Engineer Podcast — CodeGen, Agents, Computer Vision, Data Science, AI UX and all things Software 3.0

Editor's note: One of the top reasons we have hundreds of companies and thousands of AI Engineers joining the World's Fair next week is, apart from discussing technology and being present for the big launches planned, to hire and be hired! Listeners loved our previous Elicit episode and were so glad to welcome 2 more members of Elicit back for a guest post (and bonus podcast) on how they think through hiring. Don't miss their AI engineer job description, and template which you can use to create your own hiring plan! How to Hire AI EngineersJames Brady, Head of Engineering @ Elicit (ex Spring, Square, Trigger.io, IBM)Adam Wiggins, Internal Journalist @ Elicit (Cofounder Ink & Switch and Heroku)If you're leading a team that uses AI in your product in some way, you probably need to hire AI engineers. As defined in this article, that's someone with conventional engineering skills in addition to knowledge of language models and prompt engineering, without being a full-fledged Machine Learning expert.But how do you hire someone with this skillset? At Elicit we've been applying machine learning to reasoning tools since 2018, and our technical team is a mix of ML experts and what we can now call AI engineers. This article will cover our process from job description through interviewing. (You can also flip the perspectives here and use it just as easily for how to get hired as an AI engineer!)My own journeyBefore getting into the brass tacks, I want to share my journey to becoming an AI engineer.Up until a few years ago, I was happily working my job as an engineering manager of a big team at a late-stage startup. Like many, I was tracking the rapid increase in AI capabilities stemming from the deep learning revolution, but it was the release of GPT-3 in 2020 which was the watershed moment. At the time, we were all blown away by how the model could string together coherent sentences on demand. (Oh how far we've come since then!)I'd been a professional software engineer for nearly 15 years—enough to have experienced one or two technology cycles—but I could see this was something categorically new. I found this simultaneously exciting and somewhat disconcerting. I knew I wanted to dive into this world, but it seemed like the only path was going back to school for a master's degree in Machine Learning. I started talking with my boss about options for taking a sabbatical or doing a part-time distance learning degree.In 2021, I instead decided to launch a startup focused on productizing new research ideas on ML interpretability. It was through that process that I reached out to Andreas—a leading ML researcher and founder of Elicit—to see if he would be an advisor. Over the next few months, I learned more about Elicit: that they were trying to apply these fascinating technologies to the real-world problems of science, and with a business model that aligned it with safety goals. I realized that I was way more excited about Elicit than I was about my own startup ideas, and wrote about my motivations at the time.Three years later, it's clear this was a seismic shift in my career on the scale of when I chose to leave my comfy engineering job at IBM to go through the Y Combinator program back in 2008. Working with this new breed of technology has been more intellectually stimulating, challenging, and rewarding than I could have imagined.Deep ML expertise not requiredIt's important to note that AI engineers are not ML experts, nor is that their best contribution to a tech team.In our article Living documents as an AI UX pattern, we wrote:It's easy to think that AI advancements are all about training and applying new models, and certainly this is a huge part of our work in the ML team at Elicit. But those of us working in the UX part of the team believe that we have a big contribution to make in how AI is applied to end-user problems.We think of LLMs as a new medium to work with, one that we've barely begun to grasp the contours of. New computing mediums like GUIs in the 1980s, web/cloud in the 90s and 2000s, and multitouch smartphones in the 2000s/2010s opened a whole new era of engineering and design practices. So too will LLMs open new frontiers for our work in the coming decade.To compare to the early era of mobile development: great iOS developers didn't require a detailed understanding of the physics of capacitive touchscreens. But they did need to know the capabilities and limitations of a multi-touch screen, the constrained CPU and storage available, the context in which the user is using it (very different from a webpage or desktop computer), etc.In the same way, an AI engineer needs to work with LLMs as a medium that is fundamentally different from other compute mediums. That means an interest in the ML side of things, whether through their own self-study, tinkering with prompts and model fine-tuning, or following along in #llm-paper-club. But this understanding is so that they can work with the medium effectively versus, say, spending their days training new models.Language models as a chaotic mediumSo if we're not expecting deep ML expertise from AI engineers, what are we expecting? This brings us to what makes LLMs different.We'll assume already that our ideal candidate is already inspired by, and full of ideas about, all the new capabilities AI can bring to software products. But the flip side is all the things that make this new medium difficult to work with. LLM calls are annoying due to high latency (measured in tens of seconds sometimes, rather than milliseconds), extreme variance on latency, high error rates even under normal operation. Not to mention getting extremely different answers to the same prompt provided to the same model on two subsequent calls!The net effect is that an AI engineer, even working at the application development level, needs to have a skillset comparable to distributed systems engineering. Handling errors, retries, asynchronous calls, streaming responses, parallelizing and recombining model calls, the halting problem, and fallbacks are just some of the day-in-the-life of an AI engineer. Chaos engineering gets new life in the era of AI.Skills and qualities in candidatesLet's put together what we don't need (deep ML expertise) with what we do (work with capabilities and limitations of the medium). Thus we start to see what Elicit looks for in AI engineers:* Conventional software engineering skills. Especially back-end engineering on complex, data-intensive applications.* Professional, real-world experience with applications at scale.* Deep, hands-on experience across a few back-end web frameworks.* Light devops and an understanding of infrastructure best practices.* Queues, message buses, event-driven and serverless architectures, … there's no single “correct” approach, but having a deep toolbox to draw from is very important.* A genuine curiosity and enthusiasm for the capabilities of language models.* One or more serious projects (side projects are fine) of using them in interesting ways on a unique domain.* …ideally with some level of factored cognition, e.g. breaking the problem down into chunks, making thoughtful decisions about which things to push to the language model and which stay within the realm of conventional heuristics and compute capabilities.* Personal studying with resources like Elicit's ML reading list. Part of the role is collaborating with the ML engineers and researchers on our team. To do so, the candidate needs to “speak their language” somewhat, just as a mobile engineer needs some familiarity with backends in order to collaborate effectively on API creation with backend engineers.* An understanding of the challenges that come along with working with large models (high latency, variance, etc.) leading to a defensive, fault-first mindset.* Careful and principled handling of error cases, asynchronous code (and ability to reason about and debug it), streaming data, caching, logging and analytics for understanding behavior in production.* This is a similar mindset that one can develop working on conventional apps which are complex, data-intensive, or large-scale apps. The difference is that an AI engineer will need this mindset even when working on relatively small scales!On net, a great AI engineer will combine two seemingly contrasting perspectives: knowledge of, and a sense of wonder for, the capabilities of modern ML models; but also the understanding that this is a difficult and imperfect foundation, and the willingness to build resilient and performant systems on top of it.Here's the resulting AI engineer job description for Elicit. And here's a template that you can borrow from for writing your own JD.Hiring processOnce you know what you're looking for in an AI engineer, the process is not too different from other technical roles. Here's how we do it, broken down into two stages: sourcing and interviewing.SourcingWe're primarily looking for people with (1) a familiarity with and interest in ML, and (2) proven experience building complex systems using web technologies. The former is important for culture fit and as an indication that the candidate will be able to do some light prompt engineering as part of their role. The latter is important because language model APIs are built on top of web standards and—as noted above—aren't always the easiest tools to work with.Only a handful of people have built complex ML-first apps, but fortunately the two qualities listed above are relatively independent. Perhaps they've proven (2) through their professional experience and have some side projects which demonstrate (1).Talking of side projects, evidence of creative and original prototypes is a huge plus as we're evaluating candidates. We've barely scratched the surface of what's possible to build with LLMs—even the current generation of models—so candidates who have been willing to dive into crazy “I wonder if it's possible to…” ideas have a huge advantage.InterviewingThe hard skills we spend most of our time evaluating during our interview process are in the “building complex systems using web technologies” side of things. We will be checking that the candidate is familiar with asynchronous programming, defensive coding, distributed systems concepts and tools, and display an ability to think about scaling and performance. They needn't have 10+ years of experience doing this stuff: even junior candidates can display an aptitude and thirst for learning which gives us confidence they'll be successful tackling the difficult technical challenges we'll put in front of them.One anti-pattern—something which makes my heart sink when I hear it from candidates—is that they have no familiarity with ML, but claim that they're excited to learn about it. The amount of free and easily-accessible resources available is incredible, so a motivated candidate should have already dived into self-study.Putting all that together, here's the interview process that we follow for AI engineer candidates:* 30-minute introductory conversation. Non-technical, explaining the interview process, answering questions, understanding the candidate's career path and goals.* 60-minute technical interview. This is a coding exercise, where we play product manager and the candidate is making changes to a little web app. Here are some examples of topics we might hit upon through that exercise:* Update API endpoints to include extra metadata. Think about appropriate data types. Stub out frontend code to accept the new data.* Convert a synchronous REST API to an asynchronous streaming endpoint.* Cancellation of asynchronous work when a user closes their tab.* Choose an appropriate data structure to represent the pending, active, and completed ML work which is required to service a user request.* 60–90 minute non-technical interview. Walk through the candidate's professional experience, identifying high and low points, getting a grasp of what kinds of challenges and environments they thrive in.* On-site interviews. Half a day in our office in Oakland, meeting as much of the team as possible: more technical and non-technical conversations.The frontier is wide openAlthough Elicit is perhaps further along than other companies on AI engineering, we also acknowledge that this is a brand-new field whose shape and qualities are only just now starting to form. We're looking forward to hearing how other companies do this and being part of the conversation as the role evolves.We're excited for the AI Engineer World's Fair as another next step for this emerging subfield. And of course, check out the Elicit careers page if you're interested in joining our team.Podcast versionTimestamps* [00:00:24] Intros* [00:05:25] Defining the Hiring Process* [00:08:42] Defensive AI Engineering as a chaotic medium* [00:10:26] Tech Choices for Defensive AI Engineering* [00:14:04] How do you Interview for Defensive AI Engineering* [00:19:25] Does Model Shadowing Work?* [00:22:29] Is it too early to standardize Tech stacks?* [00:32:02] Capabilities: Offensive AI Engineering* [00:37:24] AI Engineering Required Knowledge* [00:40:13] ML First Mindset* [00:45:13] AI Engineers and Creativity* [00:47:51] Inside of Me There Are Two Wolves* [00:49:58] Sourcing AI Engineers* [00:58:45] Parting ThoughtsTranscript[00:00:00] swyx: Okay, so welcome to the Latent Space Podcast. This is another remote episode that we're recording. This is the first one that we're doing around a guest post. And I'm very honored to have two of the authors of the post with me, James and Adam from Elicit. Welcome, James. Welcome, Adam.[00:00:22] James Brady: Thank you. Great to be here.[00:00:23] Hey there.[00:00:24] Intros[00:00:24] swyx: Okay, so I think I will do this kind of in order. I think James, you're, you're sort of the primary author. So James, you are head of engineering at Elicit. You also, We're VP Eng at Teespring and Spring as well. And you also , you have a long history in sort of engineering. How did you, , find your way into something like Elicit where, , it's, you, you are basically traditional sort of VP Eng, VP technology type person moving into a more of an AI role.[00:00:53] James Brady: Yeah, that's right. It definitely was something of a Sideways move if not a left turn. So the story there was I'd been doing, as you said, VP technology, CTO type stuff for around about 15 years or so, and Notice that there was this crazy explosion of capability and interesting stuff happening within AI and ML and language models, that kind of thing.[00:01:16] I guess this was in 2019 or so, and decided that I needed to get involved. , this is a kind of generational shift. And Spent maybe a year or so trying to get up to speed on the state of the art, reading papers, reading books, practicing things, that kind of stuff. Was going to found a startup actually in in the space of interpretability and transparency, and through that met Andreas, who has obviously been on the, on the podcast before asked him to be an advisor for my startup, and he countered with, maybe you'd like to come and run the engineering team at Elicit, which it turns out was a much better idea.[00:01:48] And yeah, I kind of quickly changed in that direction. So I think some of the stuff that we're going to be talking about today is how actually a lot of the work when you're building applications with AI and ML looks and smells and feels much more like conventional software engineering with a few key differences rather than really deep ML stuff.[00:02:07] And I think that's one of the reasons why I was able to transfer skills over from one place to the other.[00:02:12] swyx: Yeah, I[00:02:12] James Brady: definitely[00:02:12] swyx: agree with that. I, I do often say that I think AI engineering is about 90 percent software engineering with like the, the 10 percent of like really strong really differentiated AI engineering.[00:02:22] And that might, that obviously that number might change over time. I want to also welcome Adam onto my podcast because you welcomed me onto your podcast two years ago.[00:02:31] Adam Wiggins: Yeah, that was a wonderful episode.[00:02:32] swyx: That was, that was a fun episode. You famously founded Heroku. You just wrapped up a few years working on Muse.[00:02:38] And now you've described yourself as a journalist, internal journalist working on Elicit.[00:02:43] Adam Wiggins: Yeah, well I'm kind of a little bit in a wandering phase here and trying to take this time in between ventures to see what's out there in the world and some of my wandering took me to the Elicit team. And found that they were some of the folks who were doing the most interesting, really deep work in terms of taking the capabilities of language models and applying them to what I feel like are really important problems.[00:03:08] So in this case, science and literature search and, and, and that sort of thing. It fits into my general interest in tools and productivity software. I, I think of it as a tool for thought in many ways, but a tool for science, obviously, if we can accelerate that discovery of new medicines and things like that, that's, that's just so powerful.[00:03:24] But to me, it's a. It's kind of also an opportunity to learn at the feet of some real masters in this space, people who have been working on it since it was, before it was cool, if you want to put it that way. So for me, the last couple of months have been this crash course, and why I sometimes describe myself as an internal journalist is I'm helping to write some, some posts, including Supporting James in this article here we're doing for latent space where I'm just bringing my writing skill and that sort of thing to bear on their very deep domain expertise around language models and applying them to the real world and kind of surface that in a way that's I don't know, accessible, legible, that, that sort of thing.[00:04:03] And so, and the great benefit to me is I get to learn this stuff in a way that I don't think I would, or I haven't, just kind of tinkering with my own side projects.[00:04:12] swyx: I forgot to mention that you also run Ink and Switch, which is one of the leading research labs, in my mind, of the tools for thought productivity space, , whatever people mentioned there, or maybe future of programming even, a little bit of that.[00:04:24] As well. I think you guys definitely started the local first wave. I think there was just the first conference that you guys held. I don't know if you were personally involved.[00:04:31] Adam Wiggins: Yeah, I was one of the co organizers along with a few other folks for, yeah, called Local First Conf here in Berlin.[00:04:36] Huge success from my, my point of view. Local first, obviously, a whole other topic we can talk about on another day. I think there actually is a lot more what would you call it , handshake emoji between kind of language models and the local first data model. And that was part of the topic of the conference here, but yeah, topic for another day.[00:04:55] swyx: Not necessarily. I mean , I, I selected as one of my keynotes, Justine Tunney, working at LlamaFall in Mozilla, because I think there's a lot of people interested in that stuff. But we can, we can focus on the headline topic. And just to not bury the lead, which is we're talking about hire, how to hire AI engineers, this is something that I've been looking for a credible source on for months.[00:05:14] People keep asking me for my opinions. I don't feel qualified to give an opinion and it's not like I have. So that's kind of defined hiring process that I'm super happy with, even though I've worked with a number of AI engineers.[00:05:25] Defining the Hiring Process[00:05:25] swyx: I'll just leave it open to you, James. How was your process of defining your hiring, hiring roles?[00:05:31] James Brady: Yeah. So I think the first thing to say is that we've effectively been hiring for this kind of a role since before you, before you coined the term and tried to kind of build this understanding of what it was.[00:05:42] So, which is not a bad thing. Like it's, it was a, it was a good thing. A concept, a concept that was coming to the fore and effectively needed a name, which is which is what you did. So the reason I mentioned that is I think it was something that we kind of backed into, if you will. We didn't sit down and come up with a brand new role from, from scratch of this is a completely novel set of responsibilities and skills that this person would need.[00:06:06] However, it is a A kind of particular blend of different skills and attitudes and and curiosities interests, which I think makes sense to kind of bundle together. So in the, in the post, the three things that we say are most important for a highly effective AI engineer are first of all, conventional software engineering skills, which is Kind of a given, but definitely worth mentioning.[00:06:30] The second thing is a curiosity and enthusiasm for machine learning and maybe in particular language models. That's certainly true in our case. And then the third thing is to do with basically a fault first mindset, being able to build systems that can handle things going wrong in, in, in some sense.[00:06:49] And yeah, the I think the kind of middle point, the curiosity about ML and language models is probably fairly self evident. They're going to be working with, and prompting, and dealing with the responses from these models, so that's clearly relevant. The last point, though, maybe takes the most explaining.[00:07:07] To do with this fault first mindset and the ability to, to build resilient systems. The reason that is, is so important is because compared to normal APIs, where normal, think of something like a Stripe API or a search API or something like this. The latency when you're working with language models is, is wild, like you can get 10x variation.[00:07:32] I mean, I was looking at the stats before, actually, before, before the podcast. We do often, normally, in fact, see a 10x variation in the P90 latency over the course of, Half an hour, an hour when we're prompting these models, which is way higher than if you're working with a, more kind of conventional conventionally backed API.[00:07:49] And the responses that you get, the actual content and the responses are naturally unpredictable as well. They come back with different formats. Maybe you're expecting JSON. It's not quite JSON. You have to handle this stuff. And also the, the semantics of the messages are unpredictable too, which is, which is a good thing.[00:08:08] Like this is one of the things that you're looking for from these language models, but it all adds up to needing to. Build a resilient, reliable, solid feeling system on top of this fundamentally, well, certainly currently fundamentally shaky foundation. The models do not behave in the way that you would like them to.[00:08:28] And yeah, the ability to structure the code around them such that it does give the user this warm, reassuring, Snappy, solid feeling is is really what we're driving for there.[00:08:42] Defensive AI Engineering as a chaotic medium[00:08:42] Adam Wiggins: What really struck me as we, we dug in on the content for this article was that third point there. The, the language models is this kind of chaotic medium, this, this dragon, this wild horse you're, you're, you're riding and trying to guide in the direction that is going to be useful and reliable to users, because I think.[00:08:58] So much of software engineering is about making things not only high performance and snappy, but really just making it stable, reliable, predictable, which is literally the opposite of what you get from from the language models. And yet, yeah, the output is so useful, and indeed, some of their Creativity, if you want to call it that, which is, is precisely their value.[00:09:19] And so you need to work with this medium. And I guess the nuanced or the thing that came out of Elissa's experience that I thought was so interesting is quite a lot of working with that is things that come from distributed systems engineering. But you have really the AI engineers as we're defining them or, or labeling them on the illicit team is people who are really application developers.[00:09:39] You're building things for end users. You're thinking about, okay, I need to populate this interface with some response to user input. That's useful to the tasks they're trying to do, but you have this. This is the thing, this medium that you're working with that in some ways you need to apply some of this chaos engineering, distributed systems engineering, which typically those people with those engineering skills are not kind of the application level developers with the product mindset or whatever, they're more deep in the guts of a, of a system.[00:10:07] And so it's, those, those skills and, and knowledge do exist throughout the engineering discipline, but sort of putting them together into one person that is That feels like sort of a unique thing and working with the folks on the Elicit team who have that skills I'm quite struck by that unique that unique blend.[00:10:23] I haven't really seen that before in my 30 year career in technology.[00:10:26] Tech Choices for Defensive AI Engineering[00:10:26] swyx: Yeah, that's a Fascinating I like the reference to chaos engineering. I have some appreciation, I think when you had me on your podcast, I was still working at Temporal and that was like a nice Framework, if you live within Temporal's boundaries, you can pretend that all those faults don't exist, and you can, you can code in a sort of very fault tolerant way.[00:10:47] What is, what is you guys solutions around this, actually? Like, I think you're, you're emphasizing having the mindset, but maybe naming some technologies would help? Not saying that you have to adopt these technologies, but they're just, they're just quick vectors into what you're talking about when you're, when you're talking about distributed systems.[00:11:03] Like, that's such a big, chunky word, , like are we talking, are Kubernetes or, and I suspect we're not, , like we're, we're talking something else now.[00:11:10] James Brady: Yeah, that's right. It's more at the application level rather than at the infrastructure level, at least, at least the way that it works for us.[00:11:17] So there's nothing kind of radically novel here. It is more a careful application of existing concepts. So the kinds of tools that we reach for to handle these kind of slightly chaotic objects that Adam was just talking about, are retries and fallbacks and timeouts and careful error handling. And, yeah, the standard stuff, really.[00:11:39] There's also a great degree of dependence. We rely heavily on parallelization because, , these language models are not innately very snappy, and , there's just a lot of I. O. going back and forth. So All these things I'm talking about when I was in my earlier stages of a career, these are kind of the things that are the difficult parts that most senior software engineers will be better at.[00:12:01] It is careful error handling, and concurrency, and fallbacks, and distributed systems, and, , eventual consistency, and all this kind of stuff and As Adam was saying, the kind of person that is deep in the guts of some kind of distributed systems, a really high, high scale backend kind of a problem would probably naturally have these kinds of skills.[00:12:21] But you'll find them on, on day one, if you're building a, , an ML powered app, even if it's not got massive scale. I think one one thing that I would mention that we do do yeah, maybe, maybe two related things, actually. The first is we're big fans of strong typing. We share the types all the way from the Backend Python code all the way to the to the front end in TypeScript and find that is I mean We'd probably do this anyway But it really helps one reason around the shapes of the data which can going to be going back and forth and that's really important When you can't rely upon You you're going to have to coerce the data that you get back from the ML if you want if you want for it to be structured basically speaking and The second thing which is related is we use checked exceptions inside our Python code base, which means that we can use the type system to make sure we are handling, properly handling, all of the, the various things that could be going wrong, all the different exceptions that could be getting raised.[00:13:16] So, checked exceptions are not, not really particularly popular. Actually there's not many people that are big fans of them. For our particular use case, to really make sure that we've not just forgotten to handle, , This particular type of error we have found them useful to to, to force us to think about all the different edge cases that can come up.[00:13:32] swyx: Fascinating. How just a quick note of technology. How do you share types from Python to TypeScript? Do you, do you use GraphQL? Do you use something[00:13:39] James Brady: else? We don't, we don't use GraphQL. Yeah. So we've got the We've got the types defined in Python, that's the source of truth. And we go from the OpenAPI spec, and there's a, there's a tool that you work and use to generate types dynamically, like TypeScript types from those OpenAPI definitions.[00:13:57] swyx: Okay, excellent. Okay, cool. Sorry, sorry for diving into that rabbit hole a little bit. I always like to spell out technologies for people to dig their teeth into.[00:14:04] How do you Interview for Defensive AI Engineering[00:14:04] swyx: One thing I'll, one thing I'll mention quickly is that a lot of the stuff that you mentioned is typically not part of the normal interview loop.[00:14:10] It's actually really hard to interview for because this is the stuff that you polish out in, as you go into production, the coding interviews are typically about the happy path. How do we do that? How do we, how do we design, how do you look for a defensive fault first mindset?[00:14:24] Because you can defensive code all day long and not add functionality. to your to your application.[00:14:29] James Brady: Yeah, it's a great question and I think that's exactly true. Normally the interview is about the happy path and then there's maybe a box checking exercise at the end of the candidate says of course in reality I would handle the edge cases or something like this and that unfortunately isn't isn't quite good enough when when the happy path is is very very narrow and yeah there's lots of weirdness on either side so basically speaking, it's just a case of, of foregrounding those kind of concerns through the interview process.[00:14:58] It's, there's, there's no magic to it. We, we talk about this in the, in the po in the post that we're gonna be putting up on, on Laton space. The, there's two main technical exercises that we do through our interview process for this role. The first is more coding focus, and the second is more system designy.[00:15:16] Yeah. White whiteboarding a potential solution. And in, without giving too much away in the coding exercise. You do need to think about edge cases. You do need to think about errors. The exercise consists of adding features and fixing bugs inside the code base. And in both of those two cases, it does demand, because of the way that we set the application up and the interview up, it does demand that you think about something other than the happy path.[00:15:41] But your thinking is the right prompt of how do we get the candidate thinking outside of the, the kind of normal Sweet spot, smooth smooth, smoothly paved path. In terms of the system design interview, that's a little easier to prompt this kind of fault first mindset because it's very easy in that situation just to say, let's imagine that, , this node dies, how does the app still work?[00:16:03] Let's imagine that this network is, is going super slow. Let's imagine that, I don't know, like you, you run out of, you run out of capacity in, in, in this database that you've sketched out here, how do you handle that, that, that sort of stuff. So. It's, in both cases, they're not firmly anchored to and built specifically around language models and ways language models can go wrong, but we do exercise the same muscles of thinking defensively and yeah, foregrounding the edge cases, basically.[00:16:32] Adam Wiggins: James, earlier there you mentioned retries. And this is something that I think I've seen some interesting debates internally about things regarding, first of all, retries are, can be costly, right? In general, this medium, in addition to having this incredibly high variance and response rate, and, , being non deterministic, is actually quite expensive.[00:16:50] And so, in many cases, doing a retry when you get a fail does make sense, but actually that has an impact on cost. And so there is Some sense to which, at least I've seen the AI engineers on our team, worry about that. They worry about, okay, how do we give the best user experience, but balance that against what the infrastructure is going to, , is going to cost our company, which I think is again, an interesting mix of, yeah, again, it's a little bit the distributed system mindset, but it's also a product perspective and you're thinking about the end user experience, but also the.[00:17:22] The bottom line for the business, you're bringing together a lot of a lot of qualities there. And there's also the fallback case, which is kind of, kind of a related or adjacent one. I think there was also a discussion on that internally where, I think it maybe was search, there was something recently where there was one of the frontline search providers was having some, yeah, slowness and outages, and essentially then we had a fallback, but essentially that gave people for a while, especially new users that come in that don't the difference, they're getting a They're getting worse results for their search.[00:17:52] And so then you have this debate about, okay, there's sort of what is correct to do from an engineering perspective, but then there's also what actually is the best result for the user. Is giving them a kind of a worse answer to their search result better, or is it better to kind of give them an error and be like, yeah, sorry, it's not working right at the moment, try again.[00:18:12] Later, both are obviously non optimal, but but this is the kind of thing I think that that you run into or, or the kind of thing we need to grapple with a lot more than you would other kinds of, of mediums.[00:18:24] James Brady: Yeah, that's a really good example. I think it brings to the fore the two different things that you could be optimizing for of uptime and response at all costs on one end of the spectrum and then effectively fragility, but kind of, if you get a response, it's the best response we can come up with at the other end of the spectrum.[00:18:43] And where you want to land there kind of depends on, well, it certainly depends on the app, obviously depends on the user. I think it depends on the, feature within the app as well. So in the search case that you, that you mentioned there, in retrospect, we probably didn't want to have the fallback. And we've actually just recently on Monday, changed that to Show an error message rather than giving people a kind of degraded experience in other situations We could use for example a large language model from a large language model from provider B rather than provider A and Get something which is within the A few percentage points performance, and that's just a really different situation.[00:19:21] So yeah, like any interesting question, the answer is, it depends.[00:19:25] Does Model Shadowing Work?[00:19:25] swyx: I do hear a lot of people suggesting I, let's call this model shadowing as a defensive technique, which is, if OpenAI happens to be down, which, , happens more often than people think then you fall back to anthropic or something.[00:19:38] How realistic is that, right? Like you, don't you have to develop completely different prompts for different models and won't the, won't the performance of your application suffer from whatever reason, right? Like it may be caused differently or it's not maintained in the same way. I, I think that people raise this idea of fallbacks to models, but I don't think it's, I don't, I don't see it practiced very much.[00:20:02] James Brady: Yeah, it is, you, you definitely need to have a different prompt if you want to stay within a few percentage points degradation Like I, like I said before, and that certainly comes at a cost, like fallbacks and backups and things like this It's really easy for them to go stale and kind of flake out on you because they're off the beaten track And In our particular case inside of Elicit, we do have fallbacks for a number of kind of crucial functions where it's going to be very obvious if something has gone wrong, but we don't have fallbacks in all cases.[00:20:40] It really depends on a task to task basis throughout the app. So I can't give you a kind of a, a single kind of simple rule of thumb for, in this case, do this. And in the other, do that. But yeah, we've it's a little bit easier now that the APIs between the anthropic models and opening are more similar than they used to be.[00:20:59] So we don't have two totally separate code paths with different protocols, like wire protocols to, to speak, which makes things easier, but you're right. You do need to have different prompts if you want to, have similar performance across the providers.[00:21:12] Adam Wiggins: I'll also note, just observing again as a relative newcomer here, I was surprised, impressed, not sure what the word is for it, at the blend of different backends that the team is using.[00:21:24] And so there's many The product presents as kind of one single interface, but there's actually several dozen kind of main paths. There's like, for example, the search versus a data extraction of a certain type, versus chat with papers, versus And each one of these, , the team has worked very hard to pick the right Model for the job and craft the prompt there, but also is constantly testing new ones.[00:21:48] So a new one comes out from either, from the big providers or in some cases, Our own models that are , running on, on essentially our own infrastructure. And sometimes that's more about cost or performance, but the point is kind of switching very fluidly between them and, and very quickly because this field is moving so fast and there's new ones to choose from all the time is like part of the day to day, I would say.[00:22:11] So it isn't more of a like, there's a main one, it's been kind of the same for a year, there's a fallback, but it's got cobwebs on it. It's more like which model and which prompt is changing weekly. And so I think it's quite, quite reasonable to to, to, to have a fallback that you can expect might work.[00:22:29] Is it too early to standardize Tech stacks?[00:22:29] swyx: I'm curious because you guys have had experience working at both, , Elicit, which is a smaller operation and, and larger companies. A lot of companies are looking at this with a certain amount of trepidation as, as, , it's very chaotic. When you have, when you have , one engineering team that, that, knows everyone else's names and like, , they, they, they, they meet constantly in Slack and knows what's going on.[00:22:50] It's easier to, to sync on technology choices. When you have a hundred teams, all shipping AI products and all making their own independent tech choices. It can be, it can be very hard to control. One solution I'm hearing from like the sales forces of the worlds and Walmarts of the world is that they are creating their own AI gateway, right?[00:23:05] Internal AI gateway. This is the one model hub that controls all the things and has our standards. Is that a feasible thing? Is that something that you would want? Is that something you have and you're working towards? What are your thoughts on this stuff? Like, Centralization of control or like an AI platform internally.[00:23:22] James Brady: Certainly for larger organizations and organizations that are doing things which maybe are running into HIPAA compliance or other, um, legislative tools like that. It could make a lot of sense. Yeah. I think for the TLDR for something like Elicit is we are small enough, as you indicated, and need to have full control over all the levers available and switch between different models and different prompts and whatnot, as Adam was just saying, that that kind of thing wouldn't work for us.[00:23:52] But yeah, I've spoken with and, um, advised a couple of companies that are trying to sell into that kind of a space or at a larger stage, and it does seem to make a lot of sense for them. So, for example, if you're trying to sell If you're looking to sell to a large enterprise and they cannot have any data leaving the EU, then you need to be really careful about someone just accidentally putting in, , the sort of US East 1 GPT 4 endpoints or something like this.[00:24:22] I'd be interested in understanding better what the specific problem is that they're looking to solve with that, whether it is to do with data security or centralization of billing, or if they have a kind of Suite of prompts or something like this that people can choose from so they don't need to reinvent the wheel again and again I wouldn't be able to say without understanding the problems and their proposed solutions , which kind of situations that be better or worse fit for but yeah for illicit where really the The secret sauce, if there is a secret sauce, is which models we're using, how we're using them, how we're combining them, how we're thinking about the user problem, how we're thinking about all these pieces coming together.[00:25:02] You really need to have all of the affordances available to you to be able to experiment with things and iterate rapidly. And generally speaking, whenever you put these kind of layers of abstraction and control and generalization in there, that, that gets in the way. So, so for us, it would not work.[00:25:19] Adam Wiggins: Do you feel like there's always a tendency to want to reach for standardization and abstractions pretty early in a new technology cycle?[00:25:26] There's something comforting there, or you feel like you can see them, or whatever. I feel like there's some of that discussion around lang chain right now. But yeah, this is not only so early, but also moving so fast. , I think it's . I think it's tough to, to ask for that. That's, that's not the, that's not the space we're in, but the, yeah, the larger an organization, the more that's your, your default is to, to, to want to reach for that.[00:25:48] It, it, it's a sort of comfort.[00:25:51] swyx: Yeah, I find it interesting that you would say that , being a founder of Heroku where , you were one of the first platforms as a service that more or less standardized what, , that sort of early developer experience should have looked like.[00:26:04] And I think basically people are feeling the differences between calling various model lab APIs and having an actual AI platform where. , all, all their development needs are thought of for them. , it's, it's very much, and, and I, I defined this in my AI engineer post as well.[00:26:19] Like the model labs just see their job ending at serving models and that's about it. But actually the responsibility of the AI engineer has to fill in a lot of the gaps beyond that. So.[00:26:31] Adam Wiggins: Yeah, that's true. I think, , a huge part of the exercise with Heroku, which It was largely inspired by Rails, which itself was one of the first frameworks to standardize the SQL database.[00:26:42] And people had been building apps like that for many, many years. I had built many apps. I had made my own templates based on that. I think others had done it. And Rails came along at the right moment. We had been doing it long enough that you see the patterns and then you can say look let's let's extract those into a framework that's going to make it not only easier to build for the experts but for people who are relatively new the best practices are encoded into you.[00:27:07] That framework, , Model View Controller, to take one example. But then, yeah, once you see that, and once you experience the power of a framework, and again, it's so comforting, and you can develop faster, and it's easier to onboard new people to it because you have these standards. And this consistency, then folks want that for something new that's evolving.[00:27:29] Now here I'm thinking maybe if you fast forward a little to, for example, when React came on the on the scene, , a decade ago or whatever. And then, okay, we need to do state management. What's that? And then there's, , there's a new library every six months. Okay, this is the one, this is the gold standard.[00:27:42] And then, , six months later, that's deprecated. Because of course, it's evolving, you need to figure it out, like the tacit knowledge and the experience of putting it in practice and seeing what those real What those real needs are are, are critical, and so it's, it is really about finding the right time to say yes, we can generalize, we can make standards and abstractions, whether it's for a company, whether it's for, , a library, an open source library, for a whole class of apps and it, it's very much a, much more of a A judgment call slash just a sense of taste or , experience to be able to say, Yeah, we're at the right point.[00:28:16] We can standardize this. But it's at least my, my very, again, and I'm so new to that, this world compared to you both, but my, my sense is, yeah, still the wild west. That's what makes it so exciting and feels kind of too early for too much. too much in the way of standardized abstractions. Not that it's not interesting to try, but , you can't necessarily get there in the same way Rails did until you've got that decade of experience of whatever building different classes of apps in that, with that technology.[00:28:45] James Brady: Yeah, it's, it's interesting to think about what is going to stay more static and what is expected to change over the coming five years, let's say. Which seems like when I think about it through an ML lens, it's an incredibly long time. And if you just said five years, it doesn't seem, doesn't seem that long.[00:29:01] I think that, that kind of talks to part of the problem here is that things that are moving are moving incredibly quickly. I would expect, this is my, my hot take rather than some kind of official carefully thought out position, but my hot take would be something like the You can, you'll be able to get to good quality apps without doing really careful prompt engineering.[00:29:21] I don't think that prompt engineering is going to be a kind of durable differential skill that people will, will hold. I do think that, The way that you set up the ML problem to kind of ask the right questions, if you see what I mean, rather than the specific phrasing of exactly how you're doing chain of thought or few shot or something in the prompt I think the way that you set it up is, is probably going to be remain to be trickier for longer.[00:29:47] And I think some of the operational challenges that we've been talking about of wild variations in, in, in latency, And handling the, I mean, one way to think about these models is the first lesson that you learn when, when you're an engineer, software engineer, is that you need to sanitize user input, right?[00:30:05] It was, I think it was the top OWASP security threat for a while. Like you, you have to sanitize and validate user input. And we got used to that. And it kind of feels like this is the, The shell around the app and then everything else inside you're kind of in control of and you can grasp and you can debug, etc.[00:30:22] And what we've effectively done is, through some kind of weird rearguard action, we've now got these slightly chaotic things. I think of them more as complex adaptive systems, which , related but a bit different. Definitely have some of the same dynamics. We've, we've injected these into the foundations of the, of the app and you kind of now need to think with this defined defensive mindset downwards as well as upwards if you, if you see what I mean.[00:30:46] So I think it would gonna, it's, I think it will take a while for us to truly wrap our heads around that. And also these kinds of problems where you have to handle things being unreliable and slow sometimes and whatever else, even if it doesn't happen very often, there isn't some kind of industry wide accepted way of handling that at massive scale.[00:31:10] There are definitely patterns and anti patterns and tools and whatnot, but it's not like this is a solved problem. So I would expect that it's not going to go down easily as a, as a solvable problem at the ML scale either.[00:31:23] swyx: Yeah, excellent. I would describe in, in the terminology of the stuff that I've written in the past, I describe this inversion of architecture as sort of LLM at the core versus LLM or code at the core.[00:31:34] We're very used to code at the core. Actually, we can scale that very well. When we build LLM core apps, we have to realize that the, the central part of our app that's orchestrating things is actually prompt, prone to, , prompt injections and non determinism and all that, all that good stuff.[00:31:48] I, I did want to move the conversation a little bit from the sort of defensive side of things to the more offensive or, , the fun side of things, capabilities side of things, because that is the other part. of the job description that we kind of skimmed over. So I'll, I'll repeat what you said earlier.[00:32:02] Capabilities: Offensive AI Engineering[00:32:02] swyx: It's, you want people to have a genuine curiosity and enthusiasm for the capabilities of language models. We just, we're recording this the day after Anthropic just dropped Cloud 3. 5. And I was wondering, , maybe this is a good, good exercise is how do people have Curiosity and enthusiasm for capabilities language models when for example the research paper for cloud 3.[00:32:22] 5 is four pages[00:32:23] James Brady: Maybe that's not a bad thing actually in this particular case So yeah If you really want to know exactly how the sausage was made That hasn't been possible for a few years now in fact for for these new models but from our perspective as when we're building illicit What we primarily care about is what can these models do?[00:32:41] How do they perform on the tasks that we already have set up and the evaluations we have in mind? And then on a slightly more expansive note, what kinds of new capabilities do they seem to have? Can we elicit, no pun intended, from the models? For example, well, there's, there's very obvious ones like multimodality , there wasn't that and then there was that, or it could be something a bit more subtle, like it seems to be getting better at reasoning, or it seems to be getting better at metacognition, or Or it seems to be getting better at marking its own work and giving calibrated confidence estimates, things like this.[00:33:19] So yeah, there's, there's plenty to be excited about there. It's just that yeah, there's rightly or wrongly been this, this, this shift over the last few years to not give all the details. So no, but from application development perspective we, every time there's a new model release, there's a flow of activity in our Slack, and we try to figure out what's going on.[00:33:38] What it can do, what it can't do, run our evaluation frameworks, and yeah, it's always an exciting, happy day.[00:33:44] Adam Wiggins: Yeah, from my perspective, what I'm seeing from the folks on the team is, first of all, just awareness of the new stuff that's coming out, so that's, , an enthusiasm for the space and following along, and then being able to very quickly, partially that's having Slack to do this, but be able to quickly map that to, okay, What does this do for our specific case?[00:34:07] And that, the simple version of that is, let's run the evaluation framework, which Lissa has quite a comprehensive one. I'm actually working on an article on that right now, which I'm very excited about, because it's a very interesting world of things. But basically, you can just try, not just, but try the new model in the evaluations framework.[00:34:27] Run it. It has a whole slew of benchmarks, which includes not just Accuracy and confidence, but also things like performance, cost, and so on. And all of these things may trade off against each other. Maybe it's actually, it's very slightly worse, but it's way faster and way cheaper, so actually this might be a net win, for example.[00:34:46] Or, it's way more accurate. But that comes at its slower and higher cost, and so now you need to think about those trade offs. And so to me, coming back to the qualities of an AI engineer, especially when you're trying to hire for them, It's this, it's, it is very much an application developer in the sense of a product mindset of What are our users or our customers trying to do?[00:35:08] What problem do they need solved? Or what what does our product solve for them? And how does the capabilities of a particular model potentially solve that better for them than what exists today? And by the way, what exists today is becoming an increasingly gigantic cornucopia of things, right? And so, You say, okay, this new model has these capabilities, therefore, , the simple version of that is plug it into our existing evaluations and just look at that and see if it, it seems like it's better for a straight out swap out, but when you talk about, for example, you have multimodal capabilities, and then you say, okay, wait a minute, actually, maybe there's a new feature or a whole new There's a whole bunch of ways we could be using it, not just a simple model swap out, but actually a different thing we could do that we couldn't do before that would have been too slow, or too inaccurate, or something like that, that now we do have the capability to do.[00:35:58] I think of that as being a great thing. I don't even know if I want to call it a skill, maybe it's even like an attitude or a perspective, which is a desire to both be excited about the new technology, , the new models and things as they come along, but also holding in the mind, what does our product do?[00:36:16] Who is our user? And how can we connect the capabilities of this technology to how we're helping people in whatever it is our product does?[00:36:25] James Brady: Yeah, I'm just looking at one of our internal Slack channels where we talk about things like new new model releases and that kind of thing And it is notable looking through these the kind of things that people are excited about and not It's, I don't know the context, the context window is much larger, or it's, look at how many parameters it has, or something like this.[00:36:44] It's always framed in terms of maybe this could be applied to that kind of part of Elicit, or maybe this would open up this new possibility for Elicit. And, as Adam was saying, yeah, I don't think it's really a I don't think it's a novel or separate skill, it's the kind of attitude I would like to have all engineers to have at a company our stage, actually.[00:37:05] And maybe more generally, even, which is not just kind of getting nerd sniped by some kind of technology number, fancy metric or something, but how is this actually going to be applicable to the thing Which matters in the end. How is this going to help users? How is this going to help move things forward strategically?[00:37:23] That kind of, that kind of thing.[00:37:24] AI Engineering Required Knowledge[00:37:24] swyx: Yeah, applying what , I think, is, is, is the key here. Getting hands on as well. I would, I would recommend a few resources for people listening along. The first is Elicit's ML reading list, which I, I found so delightful after talking with Andreas about it.[00:37:38] It looks like that's part of your onboarding. We've actually set up an asynchronous paper club instead of my discord for people following on that reading list. I love that you separate things out into tier one and two and three, and that gives people a factored cognition way of Looking into the, the, the corpus, right?[00:37:55] Like yes, the, the corpus of things to know is growing and the water is slowly rising as far as what a bar for a competent AI engineer is. But I think, , having some structured thought as to what are the big ones that everyone must know I think is, is, is key. It's something I, I haven't really defined for people and I'm, I'm glad that this is actually has something out there that people can refer to.[00:38:15] Yeah, I wouldn't necessarily like make it required for like the job. Interview maybe, but , it'd be interesting to see like, what would be a red flag. If some AI engineer would not know, I don't know what, , I don't know where we would stoop to, to call something required knowledge, , or you're not part of the cool kids club.[00:38:33] But there increasingly is something like that, right? Like, not knowing what context is, is a black mark, in my opinion, right?[00:38:40] I think it, I think it does connect back to what we were saying before of this genuine Curiosity about and that. Well, maybe it's, maybe it's actually that combined with something else, which is really important, which is a self starting bias towards action, kind of a mindset, which again, everybody needs.[00:38:56] Exactly. Yeah. Everyone needs that. So if you put those two together, or if I'm truly curious about this and I'm going to kind of figure out how to make things happen, then you end up with people. Reading, reading lists, reading papers, doing side projects, this kind of, this kind of thing. So it isn't something that we explicitly included.[00:39:14] We don't have a, we don't have an ML focused interview for the AI engineer role at all, actually. It doesn't really seem helpful. The skills which we are checking for, as I mentioned before, this kind of fault first mindset. And conventional software engineering kind of thing. It's, it's 0. 1 and 0.[00:39:32] 3 on the list that, that we talked about. In terms of checking for ML curiosity and there are, how familiar they are with these concepts. That's more through talking interviews and culture fit types of things. We want for them to have a take on what Elisa is doing. doing, certainly as they progress through the interview process.[00:39:50] They don't need to be completely up to date on everything we've ever done on day zero. Although, , that's always nice when it happens. But for them to really engage with it, ask interesting questions, and be kind of bought into our view on how we want ML to proceed. I think that is really important, and that would reveal that they have this kind of this interest, this ML curiosity.[00:40:13] ML First Mindset[00:40:13] swyx: There's a second aspect to that. I don't know if now's the right time to talk about it, which is, I do think that an ML first approach to building software is something of a different mindset. I could, I could describe that a bit now if that, if that seems good, but yeah, I'm a team. Okay. So yeah, I think when I joined Elicit, this was the biggest adjustment that I had to make personally.[00:40:37] So as I said before, I'd been, Effectively building conventional software stuff for 15 years or so, something like this, well, for longer actually, but professionally for like 15 years. And had a lot of pattern matching built into my brain and kind of muscle memory for if you see this kind of problem, then you do that kind of a thing.[00:40:56] And I had to unlearn quite a lot of that when joining Elicit because we truly are ML first and try to use ML to the fullest. And some of the things that that means is, This relinquishing of control almost, at some point you are calling into this fairly opaque black box thing and hoping it does the right thing and dealing with the stuff that it sends back to you.[00:41:17] And that's very different if you're interacting with, again, APIs and databases, that kind of a, that kind of a thing. You can't just keep on debugging. At some point you hit this, this obscure wall. And I think the second, the second part to this is the pattern I was used to is that. The external parts of the app are where most of the messiness is, not necessarily in terms of code, but in terms of degrees of freedom, almost.[00:41:44] If the user can and will do anything at any point, and they'll put all sorts of wonky stuff inside of text inputs, and they'll click buttons you didn't expect them to click, and all this kind of thing. But then by the time you're down into your SQL queries, for example, as long as you've done your input validation, things are pretty pretty well defined.[00:42:01] And that, as we said before, is not really the case. When you're working with language models, there is this kind of intrinsic uncertainty when you get down to the, to the kernel, down to the core. Even, even beyond that, there's all that stuff is somewhat defensive and these are things to be wary of to some degree.[00:42:18] Though the flip side of that, the really kind of positive part of taking an ML first mindset when you're building applications is that you, If you, once you get comfortable taking your hands off the wheel at a certain point and relinquishing control, letting go then really kind of unexpected powerful things can happen if you lean on the, if you lean on the capabilities of the model without trying to overly constrain and slice and dice problems with to the point where you're not really wringing out the most capability from the model that you, that you might.[00:42:47] So, I was trying to think of examples of this earlier, and one that came to mind was we were working really early when just after I joined Elicit, we were working on something where we wanted to generate text and include citations embedded within it. So it'd have a claim, and then a, , square brackets, one, in superscript, something, something like this.[00:43:07] And. Every fiber in my, in my, in my being was screaming that we should have some way of kind of forcing this to happen or Structured output such that we could guarantee that this citation was always going to be present later on that the kind of the indication of a footnote would actually match up with the footnote itself and Kind of went into this symbolic.[00:43:28] I need full control kind of kind of mindset and it was notable that Andreas Who's our CEO, again, has been on the podcast, was was the opposite. He was just kind of, give it a couple of examples and it'll probably be fine. And then we can kind of figure out with a regular expression at the end. And it really did not sit well with me, to be honest.[00:43:46] I was like, but it could say anything. I could say, it could literally say anything. And I don't know about just using a regex to sort of handle this. This is a potent feature of the app. But , this is that was my first kind of, , The starkest introduction to this ML first mindset, I suppose, which Andreas has been cultivating for much longer than me, much longer than most, of yeah, there might be some surprises of stuff you get back from the model, but you can also It's about finding the sweet spot, I suppose, where you don't want to give a completely open ended prompt to the model and expect it to do exactly the right thing.[00:44:25] You can ask it too much and it gets confused and starts repeating itself or goes around in loops or just goes off in a random direction or something like this. But you can also over constrain the model. And not really make the most of the, of the capabilities. And I think that is a mindset adjustment that most people who are coming into AI engineering afresh would need to make of yeah, giving up control and expecting that there's going to be a little bit of kind of extra pain and defensive stuff on the tail end, but the benefits that you get as a, as a result are really striking.[00:44:58] The ML first mindset, I think, is something that I struggle with as well, because the errors, when they do happen, are bad. , they will hallucinate, and your systems will not catch it sometimes if you don't have large enough of a sample set.[00:45:13] AI Engineers and Creativity[00:45:13] swyx: I'll leave it open to you, Adam. What else do you think about when you think about curiosity and exploring capabilities?[00:45:22] Do people are there reliable ways to get people to push themselves? for joining us on Capabilities, because I think a lot of times we have this implicit overconfidence, maybe, of we think we know what it is, what a thing is, when actually we don't, and we need to keep a more open mind, and I think you do a particularly good job of Always having an open mind, and I want to get that out of more engineers that I talk to, but I, I, I, I struggle sometimes.[00:45:45] Adam Wiggins: I suppose being an engineer is, at its heart, this sort of contradiction of, on one hand, yeah,

Develpreneur: Become a Better Developer and Entrepreneur
Model-View-Controller : A Pattern Based on Functional Area

Develpreneur: Become a Better Developer and Entrepreneur

Play Episode Listen Later Feb 1, 2022 16:27


The Model-View-Controller pattern is one that is common and often seen in frameworks.  It provides us with a nice place to "hang" our code. The Model-View-Controller Pattern Defined We have another pattern that contains three parts.  In this case, we have the model, the view, and the controller.  These each has an area of functionality they contain and are intended to act without regard to the other areas.  The effect is not unlike other patterns that divide and delegate functionality.  The MVC pattern divides by interaction with a user.  We have the View that displays information to the user.  Then, we have the Controller that handles input.  Finally, we have the Model that addresses the core functionality and data. Clearly Defined Boundaries The power of this pattern is that we can focus on the work at hand.  We trust that the other areas will be properly designed and implemented.  This approach is useful in many cases.  However, it becomes almost invaluable in modern software solutions where there are numerous specialists involved in a given solution and as many technologies.  We also get to detach application logic from the interactions.  That allows us to have multiple delivery devices for our application and focus on each.  This pattern is perfect for the solutions where you need a web interface, and a mobile device, and a watch.  We also are free to add devices in the future without having to touch the core functionality.  Not only is this valuable for saving implementation time, it allows us to provide major updates without risk of breaking the core code.  We also reduce the regression test load for our changes and can focus those on the updated areas. Challenges The model-view-controller pattern suffers from many of the weaknesses we see in other delegation patterns.  The design and implementation must be done with the intention of placing code in the correct area.  It is not uncommon to see core logic in the view or the controller.  Likewise, the code to generate the view needs to be completely separate from the controller.  Overlap of code across the layers can break the entire pattern and render it useless for our purposes.

Fronteiras da Engenharia de Software
18: Aprendizado de Máquina em Engenharia de Software, com Maurício Aniche (TU Delft)

Fronteiras da Engenharia de Software

Play Episode Listen Later Nov 17, 2021 63:47


Neste episódio, conversamos com Maurício F. Aniche,  professor na Universidade Tecnológica de Delft (TU Delft). O tema foi Aprendizado de Máquina em Engenharia de Software. A página do Maurício é https://www.mauricioaniche.com/. Ele está no Twitter como @mauricioaniche. Artigos mencionados: Jeroen Castelein, Maurício Finavaro Aniche, Mozhan Soltani, Annibale Panichella, Arie van Deursen: Search-based test data generation for SQL queries. ICSE 2018. Ludewig, M., Mauro, N., Latifi, S. and Jannach, D.: "Performance Comparison of Neural and Non-Neural Approaches to Session-based Recommendation". In: Proceedings of the 2019 ACM Conference on Recommender Systems (RecSys 2019). Copenhagen, 2019 Henk Grent, Aleksei Akimov, Maurício Aniche: Automatically Identifying Parameter Constraints in Complex Web APIs: A Case Study at Adyen. ICSE (SEIP) 2021. Casper Schröder, Adriaan van der Feltz, Annibale Panichella, Maurício Aniche: Search-Based Software Re-Modularization: A Case Study at Adyen. ICSE (SEIP) 2021. Jeanderson Cândido, Jan Haesen, Maurício Aniche, Arie van Deursen: An Exploratory Study of Log Placement Recommendation in an Enterprise System. MSR 2021: 143-154 Bart van Oort, Luis Cruz, Maurício Aniche, Arie van Deursen: The Prevalence of Code Smells in Machine Learning projects. WAIN@ICSE 2021 Mauricio Finavaro Aniche, Gabriele Bavota, Christoph Treude, Marco Aurélio Gerosa, Arie van Deursen: Code smells for Model-View-Controller architectures. Empir. Softw. Eng. 23(4): 2121-2157 (2018) Maurício Aniche, Frank Mulder, Felienne Hermans: Grading 600+ Students: A Case Study on Peer and Self Grading. ICSE (SEET) 2021: 211-220 Nossa equipe é formada por: Leonardo Fernandes (IFAL) Gustavo Pinto (UFPA) Fabio Petrillo (UQAC) Danilo Monteiro (Zup Innovation) Adolfo Gustavo Serra Seca Neto (UTFPR) - co-host deste episódio Ingrid Nunes (UFRGS) - co-host deste episódio Nosso site é https://fronteirases.github.io/. A edição deste episódio foi feita pela Zup Innovation. --- Send in a voice message: https://podcasters.spotify.com/pod/show/fronteirases/message

Reversim Podcast
416 State Management in React

Reversim Podcast

Play Episode Listen Later Aug 8, 2021


[קישור לקובץ mp3] שלום רב וברוכים הבאים לפרק מספר 416 של רברסים עם פלטפורמה - התאריך היום הוא ה-27 ביולי 2021, ואנחנו נפגשנו ביוקנעם באולפן הבייתי יחד עם יונתן ואסף - היי חבר'ה, מה נשמע? - יונתן, מה שלומך? מתאושש מהג'ט לג הקטן? - (יונתן) כן, הבאתי לך טובלרונים לאחרי . . . (רן) איזה כיף זה הטופי הזה שנתקע בין השיניים . . . - אז אסף - ברוך הבא! (אסף) תודה רבה(רן) היום אנחנו נדבר על נושא Frontend-י - אנחנו לא מדברים הרבה על נושאים Frontend-ים, אבל היום אנחנו נקדיש את כל הערב הזה ל-Frontend - ובעיקר, באופן ספציפי - ל-State Management ב-Frontend.אז עם זה אסף מגיע אלינו - אז אסף, בוא נכיר אותך: מאיפה אתה בא? מה אתה עושה? ספר לנו קצת עליך וקצת על החברה שלך.(אסף) אז אסף קרינצה, אני בא מתל אביב עד לפה ליוקנעם . . .אני מתכנת - התחלתי לתכנת מקצועית בערך לפני עשר שניםהתחלתי את הקריירה ב-CheckPoint, הייתי שם בהתחלה בתחום שהוא יותר Security, אחרי זה עברתי להיות מתכנת ואז ראש צוותאחרי זה עבדתי ב-Microsoft וב-Soluto [עדיין טרי - 413 GitOps with Yaron from Soluto]לאורך השנים עבדתי גם ב-Backend וגם ב-Frontend - וב-Frontend יצא לי להתעסק בהרבה State Management Solutions: לחוות אותם ב-Production, לעבוד איתם בצוות - וגם בפרוייקטים בבית התנסיתי בכל מיני.אחרי Soluto - בעצם בספטמבר האחרון - עזבתי את העבודה, אני ועוד שני חברים טובים שהם גם שותפים, אחד מהם עבד איתי ב-Soluto ואת השני פגשתי עוד ב-CheckPoint - והקמנו חברה בשם livecycle.כש-livecycle זו חברה שעוסקת במוצר עבור צוותי פיתוח - אנחנו מרימים סביבות - Preview Environments - מתוך ה-Source Code של הלקוחות שלנובעצם, הרעיון הוא שעבור כל Change, כל Commit - אנחנו עושים תהליך שהוא דומה לתהליך CI, של לבנות - לעשות Build - למוצר, ואנחנו גם עושים לו Running, בענן.בעצם, יש “סביבה חיה ובועטת” של כל גרסא של המוצר - בענן - שאפשר לשתף אותה.מעבר לזה, On top that - אנחנו שמים כלי קולברציה (Collaboration Tools)לדוגמא, אפשר לדמיין שיש מעצבת בצוות, ומתכנתתהמתכנתת עשתה שינוי בקוד - ושולחת למעצבת, שאולי עיצבה את הפיצ'ר הזה - לינק.המעצבת תוכל להיכנס ללינק, לראות גרסא חיה שלו - ממש גרסא של המוצר, לא איזה Mock - וגם תוכל להגיב שם, עם הכלי קולבורציה שלנוהיא תוכל לשנות CSS - נגיד “ה-Margin לא מספיק טוב”היא תוכל לעשות Screenshot ישירות, בלי Tooling חיצונילהקליט וידאוכל הדברים האלה באים “בחינם” - בלחיצה של לינק . . . וכל זה רץ לו על הדפדפן.(רן) אז אתה אומר - יצרת Pull Request או Merge Request, תלוי באיזו פלטפורמה אתה משתמש - ואז באופן אוטומטי נוצר לך איזשהו Preview link שאותו אתה יכול לשלוח, עוד לפני שעשית Merge, זאת אומרת - אתה לא צריך ללכת ועשות Deploy כדי שהסיפור הזה יעבוד, ופה חוסך זמן ומייעל את ה-Cycle . . .(אסף) נכון . . .(רן) בסדר . . . אצלכם, דרך אגב, יונתן - יש פתרונות בסגנון הזה?(יונתן) Preview כזה אין לנו . . . יש לנו סביבות Pre-Production, שלשם אנחנו מעלים גרסאבאמת בדרך כלל אחרי Merge, כמו שאתה תיארת.(רן) כן, אוקייאנחנו בעצם נפגשנו פה כדי לדבר על State Management ב-Frontend.עכשיו, אני מניח שכל מי שמפתח Frontend בעשור האחרון מבין על מה מדובר, אבל בוא נחבר גם את מי שהוא לא מפתח Frontend, זאת אומרת - למה צריך State Management?יש לי CSS, יש JavaScript, יש HTML . . . על איזה State בדיוק אנחנו מדברים פה? למה צריך State Management?(אסף) אחלה . . . אז אפשר באמת להתחיל מלהגיד מה זה State, ומה זה בעצם עושה באופן כללי, וספציפית באפליקצית Web.אז אפשר להגיד ש-State זו איזושהי “פיסת אינפורמציה”, שמגדירה איך נראית האפליקציה בכל רגע נתוןאיך היא נראית ואיך היא מתנהגתלדוגמא - זו הדוגמא הקלאסית, כשמדברים על State Management, יש כזה את ה-”Hello World” שזה ה-To-Do Applications - כשיש לך רשימת To-Do's כזאת, ה-State יכול להיות האינפורמציה, Array של To-Do's, כשכל אחד מה-Item-ים ברשימה יכול להיות אובייקט - שיהיה לו Title ויהיה לו “?Is Completed”, האם המשימה בוצעה או לא.זה ה-State.עכשיו, יש לנו את האפלקיציה - היא לוקחת את ה-State הזה, ומרנדרת (Rendering) איזשהו View.אפשר להסתכל על זה כמו איזושהי Pure Function, שעבור כל State תייצר אפליקציה אחרת, ועבור אותו ה-State תייצר בדיוק את אותה אפליקציה.הרעיון של ה-State Management זה איזה-שהם כלים וקונספטים שעוזרים לנו לנהל את הדבר הזה.(רן) הזכרת מקודם View - אז יש את המודל הקלאסי, ואולי קצת ישן ומאוס, של Model-View-Controller - אז באלגוריה הזאת, ה-State הוא למעשה ה-Model?(אסף) נכון - ה-ה-State הוא למעשה ה-Model, ה-View זה יכול להיות . . . אם זה נגיד, MVC שמתרדנר (Rendered) בשרת, כמו Ruby-on-Rails או PHP או Laravel או כאלה דברים, ה-View הוא HTML, שהשרת מחזיר ללקוח - והדפדפן “מצייר” מזה אתר.(יונתן) אני חושב שפעם, בעצם . . . יש מעיין Shift כזה ל-Frontend . . . פעם, ה-Database באמת היה ה-Database, ה-Server היה עושה את הלוגיקה, מרנדר אפילו JSP וכל מיני כאלה - וה-Browser היה רק מציג.עכשיו, יש Shift כזה שמאלה ל-Frontend, ששם כבר הלוגיקה - ולכן חסר שם איזה משהו . . .(רן) כן, אני מסכים - ככל שיותר לוגיקה עברה ל-Frontend, ככה נדרש יותר תחכום, ולכן גם נדרש איזשהו State Management - וכנראה שעוד הרבה דברים אחרים. לא רק זה, אבל זה לגמרי אחד מהם.עכשיו - State Management גם מגיע עם רכיבי View בדרך כלל, נכון? יש איזשהו קשר הדוק - אני מניח, למשל, שכל מי שכתב אי-פעם ב-React, כנראה גם מכיר את Redux ואולי גם עוד כמה חבילות.למה . . . נשאל את השאלה הזאת ככה: האם באמת “הצימוד” הזה הכרחי? מה המוטיבציה לצימוד הזה? מה אנחנו מרוויחים מהצימוד הזה? או לחילופין - האם אפשר להפריד ביניהם, לצורך העניין - להשתמש ב-Redux עם Angular או Whatever, והאם אפשר להרוויח מזה משהו פה?(אסף) אחלה - אז כמו שאמרתי, יש פה שני דברים שונים: אחד - זה האם כשאתה משתמש ב-React, צריך להוסיף לזה, On top of that, גם Redux?; והשני זה “האם Redux עובד גם עם דברים אחרים?”.אז אם אני אענה על השאלה השנייה קודם - Redux הוא לא Coupled ל-React: זו ספרייה שיכולה לעבוד עם כל מיני ספריות, והיא יותר High-Level.יש Binding מ-Redux ל-React - זה נקרא React Redux, שזה מצמד את React ל-Redux, אבל באופן די גורף - לרוב ישתמשו ב-Redux עם React, וזו גם הספרייה פופולארית ביותר.אני הסתכלתי לא מזמן ב-npm, ב-Weekly Downloads, ו-Redux הוא 90% בערך מהנפח של הספריות שהסתכלתי עליהן.אני לא יודע כמה קורלציה יש לזה לשימוש אמיתי, אבל אם זה אומר משהו, אז Redux היא סופר-סופר פופולארית.(רן) כן - ואני חושב, דרך אגב, ש . . . מי שמפתח Frontend בודאי מכיר, אני אתרגם רק למי שאינו מפתח Frontend כנראה - אחד הדברים שהכי קוסמים ב-Redux זה הפשטות שלהזו ספרייה שהיא (א) מאוד מאוד קטנה ו-(ב) יש המון המון Tutorials על איך לכתוב Redux בשביל עצמך - מתוך מטרה שהמפתחים יבינו באיזה כלי הם משתמשים.אז לא כל ספריות ה-JavaScript פשוטות, אבל Redux זו שפה פשוטה - אבל אלגנטית, וזה היופי שלה.אבל Redux זה חדשות של לפני . . . כמה? 6-7 שנים?(אסף) 2014 זה היה, אם אני לא טועה [2013?] . . . זה היה ההרצאה של Dan Abramov, שבה הוא הכריז על הספרייה.(רן) כן, אז 7 שנים, אולי יותר - ומאז הרבה מאוד דברים קרו - אז בוא נדבר על מה קורה היום . . .ביום-יום - מה אתה עושה? אתה הולך ופותח פרויקט ו . . . ? דבר ראשון אתה מביא Redux? איך זה נראה?(אסף) אז זו שאלה מצויינת, ובאמת זה תלוי מאוד בצרכים שלך, של האפליקציה עצמהצריך לשאול מה עושה האפלקיציה? מה המורכבות שלה? האם בכלל צריך State Management?אפשר אפילו לקחת קודם צעד אחורה - ולשאול האם בכלל יש State? לא לכל אפליקציה יש State, כמו שיונתן ציין.פעם, אם אנחנו הולכים ממש אחורה, ל”תחילת האינטרנט” - אז אתרים זה היה משהו מאוד פשוט: זה היה הטקסט, התמונות, מדי פעם היה איזה Form . . . אבל זה מה שקרה.וככל שעבר הזמן, הדפדפן ניהיה דבר מאוד מורכב, מעיין “מפלצת” - זה היום חזק כמו מערכת הפעלה שלמה כמעט, אפילו דפדפנים יכולים היום להריץ Server-ים . . . אני ראיתי ש-StackBlitz מריצים את Node בתוך הדפדפן - אתה יכול להריץ Node Server שמרים לך Web Server, וחושף IP שאתה יכול, דרך הדפדפן שלך, להיכנס ל-IP שהדפדפן מרים . . . זה די Mind-blowing.(רן) רקורסיה . . . זו הכותרת.(אסף) בדיוק . . . אז דפדפן זה משהו מאוד חזק, ואפשר לעשות איתו דברים מטורפים.אבל קודם כל, השאלה שצריך לשאול, בכלל לפני ששואלים איזו בספרייה משתמשים, זה האם צריך ספרייה כזאת?אם החלטנו שאנחנו משתמשים ב-React, כספרייה - כי גם את זה אנחנו לא חייבים - אז גם React, לכשלעצמה, יש לה פתרונות לניהול State.כי React באה עם כמה APIs נוחים לניהול State - אני מדבר ספציפית על . . . אפשר לעשות את זה בכמה דרכיםאו בצורה הישנה, שזה דרך ה-Classאו דרך Hooks, שזה משהו קצת יותר חדש.אני אדבר על ה-Hooks, כי זה קצת יותר נוח, אבל אותם עקרונות בדיוק אפשר לעשות גם ב-Classes . . .(רן) נעשה פה רגע איזו עצירה - יונתן, דיברנו קודם זה שלפחות היסטורית, רוב ה-State היה נשאר בצד של השרת והיה מוחזק ב-Database-ים, והייתה איזושהי שכבת Rendering - שגם היא הייתה נמצאת הרבה פעם בצד של השרת.ואז הזכרת - אסף - שהדפדפנים היום הם דווקא די חזקים, ושאפשר לעשות בהם כמעט הכל - ובין השאר, יש בהם גם Database-ים.ועכשיו, נשאלת השאלה - האם יש קשר בין ה-State, שעליו אנחנו מדברים, לבין ה-Database-ים שקיימים היום בדפדפנים? לצורך העניין - האם הם שומרים ב-Database-ים המקומיים שלהם את ה-State, או שזה State שהוא מתדנדר (Rendered)? זאת אומרת - ברגע שאתה עושה Refresh לדף, הכל נעלם ומתחילים מחדש?(אסף) ה-State שאני אוהב וה-State-ים שאני מדבר עליהם - הם לרוב נשמרים ב-RAM, בזכרון, וזה אומר שזה יתנדף ברגע שירפרשו (Refresh) את העמוד.כמובן שאפשר את כל ה-State הזה להעביר אל ה-Local Storage או עם פתרונות Database-יים מקומיים שיעשו את זה Persistent over time.זה במיוחד יהיה יותר קל ויותר נעים עם ספריות כמו Redux, ששומרים הכל במקום אחד - אתה עושה לו פשוט Dump וטוען אותו בחזרה.בדרכים אחרות, אם אתה שומר את ה-State שלך בצורה קצת יותר מבולגנת ב-RAM זה אולי יהיה קצת יותר קשה, אבל אם אנחנו הולכים, נגיד, על משהו כמו Redux, או Recoil, שגם לו יש Snapshot ו-Store שמסדר הכל במקום אחד - או MobX-State-Tree, שזה גם פתרון כזה - יהיה מאוד קל לעשות Dump של הזיכרון הזה אל ה-Local Storage, לדוגמא, שזה Persistent Storage, כמו Database - ולטעון את זה בחזרה כשטוענים את האפליקציה.(רן) “מאוד קל” במובן הזה שזה פשוט String JSON, ואתה יכול לכתוב ולקרוא אותו לעשות Serialization או De-Serialization?(אסף) כן - בגלל שכל ה-State נמצא בעצם באובייקט אחד, אני יכול לעשות לה סריאליזציה (Serialization) ל-JSON, לשמור אותו כ-String ב-Local Storage, לטעון אותו, לעשות לו דה-סריאלזיציה (De-Serialization) - ולהשתמש בו שוב.(יונתן) אם אני, נניח, מתחיל לכתוב אפליקציה חדשה, ואני עוד לא יודע כמה היא תסתבך, כמה גדול זה יהיה . . . - האם היית ממליץ לי, מההתחלה, להשתמש ב-State Management, או לחכות שזה ממש “יצעק”?(רן) זה לא כמו השאלה על Unit Testing? . . . “אני מתחיל משהו קטן, איזשהו פרויקט-צד קטן, לא נראה לי שזה הולך להיות מסובך, אני לא כותב טסטים” . . . מפה לשם - אחרי שנה אתה לא מוצא את הידיים ואת הרגליים . . . (אסף) כן, לגמרי . . . אז זה עניין של גישה.אני, כשאני מתחיל משהו חדש, אני אוהב להתחיל את זה עם כמה שפחות Boilerplate וכמה שפחות דברים, הכי נקי שיש, וכשאני צריך עוד ועוד דברים - אני עושהאני אבין בעתיד, כנראה, גם מה הצרכים שלי, ואני אדע לבחור איזה מהפתרונות State Management . . . כי שוב - זה לא סטנדרט . . . אין סטנדרטיזציה בנושא, אז יש כל כך הרבה ספריות וכל כך הרבה דעות, וזה מסוג הדברים שמתכנתים אוהבים להיות מאוד דעתניים כלפיו.(יונתן) אז המיגרציה (Migration) הזאת, מלהיות בלי State Management לעם - למשהו ש . . . זה מסובך לעשות את זה? זה re-factor ש”ישכיב” את הצוות או שזה “מכה קלה בכנף”?(אסף) אז אני חושב שזה תלוי מאוד ב- State Management solution שאתה בוחר בולדוגמא, MobX זו אחת הספריות הפופולאריות - כנראה השנייה-הכי-פופולארית אחרי Redux - זה מאפשר לך לעשות את ה-Transition הזה בצורה די נוחה, כי זה משתמש באיזשהו “קסם” שמאפשר לך לעטוף אובייקטים רגילים של JavaScript ולהפוך אותם ל-”React-ביים”.מה זאת אומרת -”React-ביים” [חוץ ממשהו שממש קשה להעביר לטקסט ככה?] - זאת אומרת שאם ה-State הזה מעודכן, אז ה-View שלנו גם יתעדכןזאת אומרת ששינינו . . . נגיד בדוגמא של ה-To-Do List, שינינו את ה-Data, את ה-Array הזה של ה-To-Dos? - והקומפוננטות (Components), ה--ים האלה, שמציירות את זה על המסך, תתעדכנה גם כן.ובגלל שזה משתמש באיזשהו “קסם”, שנקרא Proxy Object של JavaScript או Getter ו-Setter של ES5 - אלו שתי דרכים לעשות את זהזה בעצם “דורס התנהגות” של מה שאנחנו עושים, De-reference לאובייקט, כשאנחנו ניגשים אליו.אז מאחורי הקלעים, אתה משתמש בזה כמו אובייקט רגיל, אתה עושה State.ToDos[7].Title - ועורך את זה.ומאחורי הקלעים, MobX עשתה לך Subscription כשהשתמשת בזה עבור הקומפוננטה (Component) שמשתמשת בזה, והיא תדע לעדכן את הקומפוננטה בכל פעם שעדכנת את ה-State.אז זה יהיה מאוד מאוד נוח . . . יכול להיות שכתבת את הדבר הזה כאובייקט JavaScript רגיל, ואתה רק מוסיף MobX ועוטף את זה בכמה פונקציות שהספרייה מביאה לך - ואתה די מסודר, יש לך State Manager . . . בספריות אחרות, נגיד Redux, זה משהו שהוא הרבה יותר opinionated, והוא קצת יותר מורכב.אתה צריך לנסות הרבה יותר דבריםוזו גם אחת הביקורות הכי גדולות שיש על הספרייה הזאת - זה שצריך ללמוד הרבה, ושאתה צריך לכתוב הרבה קוד בשביל להשתמש בזה.(רן) בוא נחזור רגע ל”קסם” - כי קסם זה כיף: אז יש Attribute - אתה אומר נגיד, ToDos[1].Value = “לאסוף כביסה”, ואז, בעצם, אתה אומר שיש איזשהו רכיב שעשה איזשהו Subscription ל-Setter הזה, והוא עושה “Hijacking” לקריאה הזאת או עם Proxy או טכנולוגיה אחרת שהזכרת את שמה, והוא בעצם “תופס” את הקריאה הזו, ואולי הוא עושה Set ל-Value - אבל הוא גם מפעיל איזושהי שרשרת של קריאות, שבסופו של דבר מפעילה את ה-UI.עכשיו, זה נחמד ברמת השימושיות . . . השאלה, אם אתה מכיר את הקונספט הזה, מה שנקרא The Fallacies of distributed systems - שבעצם זה בא ואומר שכאילו אתה מפעיל איזושהי קריאה, ואתה לא יודע שהקריאה הזאת רצה על איזשהו שרת מרוחק, ולכן אתה גם לא יודע מה כל הדברים הרעים שיכולים לקרות בדרך . . . אז אתה לא מטפל נכון בשגיאות, אתה לא יודע כמה זמן זה יקח, אתה . . . זאת אומרת - זה נראה קל, אבל אתה בעצם “מחביא” מאחורי זה הרבה מאוד דברים שגם יכולים להשתבש, ואם אתה לא מבין שזה מה שיקרה, אתה יכול לטעות, זאת אומרת - יהיה לך UI שהוא Sluggish ועוד כל מיני כאלה תופעות . . . אולי לא תטפל נכון בשגיאות וכו'.אז איך . . . יש פה איזשהו Trade-off בין פשטות השימוש לבין היכולת שלך לשלוט בהתנהגות בצורה שהיא Fine-grained . . . (אסף) נכון מאוד . . . MobX, כספרייה, זה משהו שהוא יותר Tool, שהוא נורא לא Opinionated.הוא מאפשר לך איזושהי יכולת, שנותנת לך לעשות Subscription ו-Reactiveness ל-State, בלי לעשות הרבה Boilerplate - אבל זה לא אומר שאתה חייב להשתמש בזה בצורה הכי פשוטה.אתה יכול לעטוף את זה בדברים שיעזרו לך לפתור את הבעיות שציינת - של Observability ושל Debugging יותר נוח.האמת שהיוצר של MobX כתב עוד ספרייה, שקוראים לה MobX-State-Tree, שהיא כן Opinionated, ומשתמשת ב-MobX בתור כלי, מאחורי הקלעים, לעשות את הפעולות היותר . . . של ה-Reactivness.אבל היא מאוד Opinionated - יש שם Store, ל-Store יש Type-ים שאתה רושם אותם, איזשהו מודל . . . אתה רואה בכל פעם לאן כל דבר הולך ואתה יכול ליצור, מתוך זה, Snapshots - בדומה ל-Reduxזאת אומרת - זה משלב, באיזשהו מקום, את הכיפיות והקסם של MobX, אבל את ה-Rigidness וה”נוקשות” הזאת של -Redux, שגורמת לך גם לדבג (Debug) קוד בצורה יותר נוחה וגם להבין מה קורה כשדברים משתבשים.(רן) כשדיברנו בטלפון, בשיחה המקדימה, דיברנו על ספרייה שנקראית Recoil, שהזכרת את שמה מקודם - מה מעניין בה? מה מיוחד בה? מתי אני ארצה להשתמש בה ולא באחרות?(אסף) אחלה, אז Recoil . . . אולי לפני שנדבר על Recoil, נדבר טיפה על קונטקסט, כי הרבה מהדברים שם הם סוג של פותרים דברים שהיה בעייתי עם קונטקסט, עם New State.אז אם מסתכלים רגע על ה-API ש-Redux מביא איתו Built-in, בלי להתקין שום ספרייה חיצונית, אז יש לנו שני דברים עיקרייםיש לנו useState, או useReducer, שזה תחליף ל-useStateויש לנו את Context.עכשיו - useState ו-Context עושים שני דברים קצת שונים - useState מאפשר לכל קומפוננטה (Component) לשמור State לוקאלי עבורה, שהוא Persistent בין Render Callsזאת אומרת שאם אני אקרא ל-Render עוד פעם, יהיה לי את אותו State.ובנוסף, זה נותן לי את ה-Reactiveness הזה, כמו שדיברנו - זה מרכיב חשוב בכל State Management.ברגע שעדכנתי את ה-State, עם פונקציה שה-Hook הזה מחזיר לי - ה-setState - אז React ידע לקרוא לי ל-Rendering - אם ה-State המחודשזאת אומרת שברגע שאני מעדכן את ה-State - אני יודע שה-View יהיה “טרי”, הוא יצייר לי את מה שאני רוצה עם ה-State “הטרי” והחדש.(רן) זאת אומרת - כאילו יש את המצב הראשוני, ואחר כך, על כל שינוי, יקראו לך ותעשה Rendering מחדש.(אסף) בדיוק - אני יכול . . . React מבטיח לי את זה, שזה אחלה, זה מעולה.הבעיה עם useState זה שדברים . . . שאפליקציה, כשהעץ-קומפוננטות של React מתחיל לגדול ולגדול, אני רוצה לפעמים להתחיל לשתף State בקומפוננטות שלפעמים הן גם במיקום רחוק בעץ . . . שני עלים שיש להם אב-קדמון משותף, נמוך ביותר, שהוא כמה רמות מעל.ואז זה אומר . . . .(רן) אוקיי - אז אני מסתכל על רשימת ה-To-Do - אז אתה רוצה, נגיד, להציג איזשהו View אחד גדול עם ה-To-Dos, ואולי מימין-מלמעלה גם איזשהו תקציר של הרשימה, נגיד כמה אייטמים נשארו un-checked . . . (אסף) בדיוק - כמה אייטמים נשארו un-checked, ואולי עוד סטטיסטיקות . . . מעיין כזה Dashboard, זו דוגמא מעולה.ובאמת, כדי ששתי הקומפוננטות הללו תכירנה את אותו State - כי אנחנו לא רוצים לשכפל את ה-State, אנחנו יכולים, תיאורטית, לשכפל את ה-State, אבל אז נוצר מצב שבו אני צריך לטפל בעדכון של שני State-ים שונים, וזה יכול ליצור באגים וזה קשה להבין . . . (רן) מה הבעיה? תיקח ספרייה, בטח יש אחת כזאת שעושה את זה, לא? . . .(אסף) יש ספרייה . . . ב-JavaScript יש ספרייה לכל דבר, לכל שורה של קוד יש ספרייה . . . (רן) ראיתי לא מזמן איזשהו API שנקרא is-odd - שמחזיר לך אם המספר זוגי או אי-זוגי . . .(אסף) יש את הסיפור המפורסם של left-pad, שזו ספרייה שהקריסה את כל npm, הקריסה מלא עבודה של מלא אנשים בכל העולם, בגלל שהשתלטו עליה ועשו שם כל מיני דברים . . [היה לא מזמן ב-398 with Danny Grander from Snyk](רן) בסדר - אז אתה לא רוצה לשכפל את ה-State וזה, אני חושב, ברור - אבל אתה אומר שיש פה בעיה עם ה-Set . . .(אסף) כן, ומה הבעיה? יש פה שתי בעיות - אחת זה שאם אני רוצה ששתי קומפוננטות, שנמצאות במיקום מרוחק בעץ, ישתפו את אותו State, אני צריך להתחיל להעביר את ה-State הזה ממקום למקום - זה נקרא Props Drilling, “קדיחת Properties” . . . זה לא נוח, זה אומר שבכל פעם שאני רוצה להוסיף State אני צריך להוסיף את זה בעוד “מיליון מקומות”, קשה לעקוב אחרי זה, מאיפה זה בא . . .(רן) כן, אתה צריך לקודד . . . למעשה, אתה צריך . . .עכשיו כשאתה אומר, אני נזכר שעשיתי את זה, וזה היה מה-זה מעצבן . . . בכל מקום אתה צריך ללכת ולעשות . . . “לפעפע” את ה-Attribute הזה למטה ולמטה ולמטה . . . .ממש עבודה ידנית מעצבנת . . . (יונתן) וזו בעיה גם לפעמים בקוד של ה-Server, נכון? כשאתה מאתחל איזשהו Bin, או איזשהו אובייקט, ורק למטה למטה אתה צריך להעביר אותו . . .(אסף) נכון, Dependency Injection כזה . . .(יונתן) ואם אתה “מתפתה”, אז אתה שם איזשהו משתנה גלובאלי או Database או משהו כזה, ואז אתה . . (רן) זה כשאתה מתכנן להתפטר . . . וכשאתה מתפטר אז אתה לא מגלה . . .(יונתן) אז מה האלטרטיבה ל-Props Drilling הזה? . . . (אסף) אז רק אני אגיד שבנוסף להעברה הזאת, זה גם עניין של Performance, זה בעייתי - כי איך ש-React עובד, ברגע ש-Props משתנה, הוא קורא ל-Render מחדש . . .הוא קורא ל-Render כש-Props משתנה וכ-State משתנה.וכשכל תת-העץ הזה, שבכלל לא משתמש ב-State - כל מה שהוא עושה זה להעביר את זה מפה לשם כשמתרדנר (Renders) - זה פשוט בזבוז של חישוביות . . .אבל באמת כדי לפתור את זה יש איזשהו API שנקרא Context - ו-Context מאפשר להגדיר איזשהו State . . .(רן) הנה המשתנה הגלובאלי שחיפשת, יונתן . . . (אסף) בדיוק . . . אז זה משתנה גלובאלי, שבעצם פותר את העניין של ה-Drilling, כי אני יכול להגדיר את זה ב”אב הקדמון” המשותף הזה, אני יכול להגדיר שם את ה-Context, וזה אומר שכל חלק בתת-עץ, שהוא צאצא של האב הקדמון המשותף הזה, יכול להשתמש ב-Value של ה-Context.וזה מאפשר לי לפתור את ה-Props Drilling - וגם עם זה יש קצת בעיות . . . אחת - גם פה יש קצת עניין של Performance, כי אם אני, נגיד . . . לרוב, מה שעושים זה שעושים Provider כזה, ובתוך ה-Provider הזה זו קומפוננטת React רגילה - שהיא בעצמה משתמשת ב-useState שדיברנו עליואז כדי לעדכן את ה-Value, אני מעדכן את ה-Value איפה שאני שם את ה-Provider, והוא ירדנדר (Render) את כל תת העץ.הוא עדיין ירנדר אותו - כי ככה זה עובד: כי ברגע שהתרנדר אב-קדמון, הוא מרנדר את כל התת-עץ.אפשר לפתור את זה בדרכים שונות, כמו נגיד עם React.memo שהופך קומפוננטות, שמשווה באופן Shallow את ה-Properties, ומרנדר את זה רק אם הם שווים - אבל זה מעצבן, כי אני עכשיו חייב לעשות את זה, גם יש בזה Overhead . . . יכול להיות שזה לא כזה מעניין, ברוב המקרים, תכל'ס, זה לא מעניין - כי זה לא שווה את ההתעסקות, כי זה לא משנה באמת את חוויית המשתמש, האופטימיזציות האלה.אבל כשיש אפליקציות ענקיות, ש-Rendering הוא מאוד יקר, והדברים האלה מתחילים להציק - אז זה מתחיל להיות בעיה, ואז מתחילים לחשוב מה לעשות.(רן) אבל זה כן משנה את חוויית המפתח, זאת אומרת - או שתצטרך לעשות Props Drilling, או שתצטרך להשתמש ב-Context, שזה - בוא, בינינו - זה משתנה גלובאלי, עם כל המעמסה שבאה עליו.אז כן - למפתח זה אומר איזשהו נטל תחזוקתי(אסף) כן, לגמרי . . . (רן) אז זו הבעיה . . . הבנו - האקדח מהמערכה הראשונה . . . . בסדר.אז Recoil היא זו שתיקנה את הבעיה הזו?(אסף) Recoil תיקנה חלק מהבעיות האלה, כן . . . ב-Recoil, זה התחיל מהרצאה שהייתה ב-ReactEurope, שזו אותו כנס ש-Dan Abramov עשה בו את ההרצאה המפורסמת על Reduxאז זה בחור מ-Facebook, שסיפר שיש להם כלי ב-Facebook, שהם עושים כל מיני סטטיסטיקות על user-ים.הוא סיפר שם על כל מיני דרישות שהיו להם מהמוצר הזה - והוא רצה להשתמש ב-State וב-Context אבל נתקל בכל מיני בעיות - אחת מהבעיות הייתה . . . עוד בעיה שלא הזכרנו בנוגע ל-Context זה שאם אנחנו רוצים שה-User ייצור באופן דינאמי State - בוא נדמיין לדוגמא שזו הדוגמא שהוא מביא - אז לדוגמא, יש לי אפליקציה שאני יכול לצייר בה צורות - אני יכול לצייר בה עיגול, אני יכול לצייר בה מרובע, וה-User יכול פשוט להכניס עוד צורההוא יכול גם לעשות לזה Drag, או לשנות לזה את ה-Size . . . אפשר לדמיין מעיין Photoshop כזה . . . עכשיו - לכל אחד כזה הוא רצה ליצור State משלו - והסיבה שהוא לא רצה את זה ב-State משותף זה בשביל Performance, דיברנו על זהכי אם יש State משותף אז זה ירדנדר את כולם, וכשאתה מתחיל לעשות דברים כמו Dragging, וזה קורה 60 פעמים בשנייה, אז זה כבר מתחיל לכאוב . . . אתה כבר לא יכול, אתה צריך להתחיל לשחק פה עם Performance Optimizations.אבל הוא אמר “אולי נשתמש ב-Context, ועדיין העניין ב-Context הוא שזה סטאטי, ואתה חייב לדעת מראש כמה Context-ים את צריך ליצור . . . אתה לא יכול ליצור Context באופן דינאמי מתוך קוד.וזו בעיה ל-Use Case שכזה . . . זו אחת הבעיות . . . וכמובן יש את כל הבעיות שדיברנו עליהן מקודם.אז מה שהם עשו ב-Recoil . . . הם עשו כמה דברים מאוד מעניינים - אחד - בניגוד לספריות אחרות, ברוב הספריות - זו ספרייה שהיא מאוד Coupled עם React - אתה לא יכול להשתמש ב-Recoil ללא Reactבניגוד, נגיד ל-Redux או ל-MobXויש לזה כמה יתרונות נחמדים, כי ה-API של זה מאוד מאוד פשוט, והוא מאוד דומה ל-API של React, אז במקום useState, אתה תשתמש ב-useRecoilState, וזה יחזיר לך את אותו הדבר - יחזיר לך State ו-setState - וזה מאוד Familiar למי שמכיר את React, אתה לא צריך ללמוד הרבה, בניגוד ל-Redux וגם ל-MobX, שצריך ללמוד דברים.והקונספטים מאוד פשוטים - יש בעצם את ה-State הכי פשוט, שנתנו לזה שם די טוב - קוראים לזה- Atom, כי זה משהו אטומי . . . ובו אתה מגדיר State.עכשיו, אתה מגדיר את זה באופן נפרד, במודול אחר, שהוא לא יושב בתוך הקומפוננטה שלך, ולכן אתה יכול לשתף אותו עם קומפוננטות אחרותפשוט עושים לו Import . . . אתה לא צריך לעשות איזשהו Provider שיושב בעץ-למעלה.כל אחד מהם יכול לעשות לזה Import בנפרד, מבלי שיש את התלות הזאת בעץ.(רן) אוקיי . . . אבל זה דווקא . . . זה לא משהו שיכול לקרות ב-Run-time - ה-Import קורה בזמן הפיתוח, נכון? אתה לא יכול להחליט Ad-hoc ש . . . אתה יודע, בזמן ריצה, לעשות Import למשהו, נכון? זה קצת מזכיר את הבעיה שהייתה עם ה-Context . . . (אסף) נכון - בגלל זה יש משהו אחר שקיים ב-Recoil ונקרא atomFamily - זו “משפחה של אטומים” . . .אתה מגדיר atomFamily, והוא מייצר לך Atom-ים באופן דינאמי . . . אתה נותן לו ID, והוא יביא לך את ה-Atom המתאים ל-ID, וככה אתה יכול, ב-Run-time, בלי לדעת מראש, אתה יכול ליצור עוד ועוד Atom-ים ולשתף אותם.(רן) אז למעשה, הוא נותן ל-JavaScript לפתור את הבעיה . . . הוא אומר “תעשה Import, אני לא רוצה לנהל לך את המצב” - תעשה Import, ואם יש לך State משותף, תעשה לו Import משני קבצים שונים או משני רכיבים שונים - ובכלל שעשית Import לאותו רכיב, אז ה-State ישמר . . . זה הקונספט.אוקיי, JavaScript . . . אני שואל את עצמי האם יש פה סכנה ל-Race Conditions למיניהם . . . אם שני אובייקטים מחזיקים . . . טוב, זה כנראה לא קורה ב-JavaScript כי זה רץ בסביבה נפרדת, אז יש לנו פה Event Loop וזה לא יכול לקרות.(אסף) כן . . . גם בנוסף, בדומה ל-Redux, האובייקטים האלה הם Immutable - הם לא יכולים להשתנות לעולם, מרגע שהם נוצרו.(רן) אז איך אתה מעדכן State, אם זה Immutable?(אסף) אתה יוצר חדש . . . בכל פעם שאתה מעדכן State אתה לא משנה אותו - אתה יוצר אובייקט חדש, למעשה.(יונתן) תזכור ש-State is Evil . . . אז . . .(רן) כן, אבל דיברנו על . . . . אז בוא רגע נחזור לדוגמא שבה יש לנו רשימת To-Dos . . . יש לנו בחלק המרכזי של הדף את הרשימה המלאה עם ה-Check-box-ים לידה, ולמעלה מצד ימין אני רוצה להחזיק רק את מספר האייטמים שעדיין לא סיימתי, אוקיי? אז אני כן רוצה לעדכן פה איזשהו State, נכון? אני רוצה שלשניהם יהיה single source of truth - אבל אתה אומר שזה Immutable, אז מה אני עושה? איך אני מעדכן?(אסף) מעולה, אז בוא נלך על הדוגמא שאמרת - אם אנחנו משתמשים בפתרון שהוא mutable, כמו נגיד -Redux או Recoil, אז יש פה שני דברים - א - יש פה את ה-Counter הזה, של כמה אובייקטים הם Completed - זה מה שנקרא Derived Data: זה Data שאמרנו שאנחנו לא רוצים להחזיק אותו פעמיים, אז אנחנו רוצים לחשב אותו, אנחנו רוצים לחשב אותו מתוך ה-Data האמיתי, שזה ה-Array הזה של ה-To-Do List.גם פה יש עניין של “אנחנו לא רוצים לחשב את זה יותר מדי פעמים, אנחנו רוצים לחשב את זה רק כשדברים ישתנו”, כי זה יקר לחשב דברים, אבל אם נחזור לשאלה הזו, רגע, של “איך אנחנו מעדכנים את זה?”, אז בעצם כדי לעדכן את . . . כדי להוסיף To-Do חדש, אני צריך להוסיף Array חדש, כי אחרת ה-State לא השתנה . . . עכשיו, למה זה חשוב ב-Redux? כי ב-Redux, הוא משתמש בעניין הזה של mutability בשביל ליצור Reactiveness . . . דיברנו על Reactiveness, שזה מתי . . . איך אני יודע שכשה-State משתנה, אני צריך להודיע על הקומפוננטות שמשתמשות בו.אז -Redux משתמש ב-mutability כדי לעשות Shallow comparison - הוא לוקח את ה-Reference של האובייקט, ומשווה את זה - כי זו השוואה מאוד מאוד זולה, זה להשוות שני מספרים - הוא לא צריך לעשות Deep Comparison, ולעבור אובייקט-אובייקט ולראות שזה בדיוק אותו Value, הוא רק משווה את ה-Reference.ולכן, אם אתה עושה את זה Immutable, זה מאוד פשוט ליצור את ה-Reactiveness הזה.כשאתה רוצה לשנות את ה-State, אתה צריך ליצור אובייקט חדש.עכשיו, הדבר הזה הוא נושא ב-Redux, שהוא קצת שנוי במחלוקת . . .כי שוב, דיברנו על Boilerplate - בכל פעם ליצור אובייקט חדש זה יכול להיות מאוד מעצבן, וזה גם יכול ליצור באגים, כי יכול להיות שבטעות שינית את ה-State, כי JavaScript היא שפה שהיא Stateful, אתה יכול לשנות State, הוא נותן לך את זה ואתה יכול לעשות את זה בטעות - ואז זה ייצור באגים, כי בטעות עדכנת את ה-State במקום לעשות State חדש . . . ואז ה-Comparison לא יעבוד, ואז תקבל View שהוא לא Fresh, הוא Stale, וזה לא יעבוד לך ואתה לא תבין למה, ואז אתה תחפש בקוד ועד שתמצא את זה . . . זה נורא מעצבן.(יונתן) זאת אומרת שהייתי יכול לקחת את המערך של ה-To-Dos, ולהוסיף עוד איבר ברשימה - וזה לא היה מרנדר את הקומפוננטות כי React לא היה מודע לזה . . .(אסף) בדיוק, לא היית רואה את זה - והיית שובר את הראש “למה זה קרה לי?”.(רן) דרך אגב, בניגוד למה שאמרת קודם על MobX, שבו אם היית משנה משהו, אז בסופו של דבר כן ה-UI היה עושה לזה רפלקציה (Reflection).(אסף) נכון - ב-MobX, הוא משתמש ב-mutability, והוא בעצם משתמש בהתנהגות הזאת כדי ליצור את ה-Reactiveness.(רן) וב-Redux או ב-Recoil זה למעשה Anti-Pattern - אם אתה מפתח שעובר מ-MobX לאחד מאלה, הולכים להיות לך כמה חודשים קשים בהתחלה . . . (אסף) נכון . . . אבל יש חדשות טובות! אותו בחור שעשה את MobX ואת MobX-State-Tree - הוא עשה גם ספרייה שנקראית Immer, שהיום היא באה בתוך Redux -בגלל ש-Redux . . . אחת מהביקורות הכי גדולות זה כל ה-Boilerplate וכל העבודה שצריך לעשות, Redux עבדו קשה בשביל להוסיף לתוך הספרייה כל מיני כלי-עזר שיעזרו לך עם זה.אחד מהם זה Immer - שמשתמש באותו “קסם” שמשתמשים ב-MobXזה גם אותו בנאדם שהשתמש בקסם הזה ב-MobX . . . כדי לעשות Immutable state - אבל בצורה שנוח יותר לאנשים לעשות את בצורה של mutable . . . מה זה אומר? זה אומר שאתה יכול להשתמש ב-API המוכר של JavaScript, של לעשות State.משהו.משהו = . . . לשנות את האובייקט הקייםבדוגמא שנתנו מקודם - להוסיף איבר למערךאבל מאחורי הקלעים, באמצעות אותם קסמים שדורסים את ההתנהגות של האובייקט, הוא ייצור לך אובייקט חדש, עם רפרנס חדש, וה-Shallow Reference Comparison יעבוד והכל יהיה כיף!אתה לא צריך ליצור Spread . . . מה שקורה הרבה פעמים זה שאתה יוצר Spread-Operator כדי לעשות Spread לאובייקט הקודם מתוך אובייקט חדש - וזה גם, פעם לא היה את זה, זה חדש, קיים רק כמה שנים, פעם היה צריך לעבוד עוד יותר קשה . . . אז זה עושה API ממש ממש כייפיהיום, Redux זו חווייה הרבה יותר כייפית ממה שהיה כשאני השתמשתי בזה . . . כשהתכוננתי לפודקאסט, ראיתי שהם עשו שם המון המון עבודה כדי לטפל בבעיות האלה.(רן) אני כבר מצליח לדמיין את הפרסומות - “להרגיש Stateful ולהיות Stateless!”, אבל טוב . . . [יש מצב . . . פרסומות הרבה פחות מוצלחות מזה כבר רצות היום על איילון]מעולה, מגניב - אז בוא נעשה רגע סיכום: בגדול, דיברנו על מה זה State Management, ולמה בכלל צריך את זה בצד של ה-Clientדיברנו על זה שלוגיקה עברה לצד של ה-Client, ולכן זה . . . הדברים מתחילים להיות מסובכים וצריך איזושהי דרך, ככה “לסדר את הקוד”, זה לא יכול להיות הכל ספגטי - jQuery Spaghetti, למי שיצא התענוג . . .אז קשה מאוד לנהל קוד כזה, ולכן נולדו ספריות של State Managementדיברנו קצת על React, דיברנו על MobX, שיש להן גישות שונות ובסופו של דבר על Recoilאז תודה רבה! כמה מילות סיכום?(אסף) היה לי ממש כיף, אפשר להמשיך לדבר על הנושא הזה עוד המון-המון-המון - זה נושא מאוד Debatable . . . יש המון פתרונות, כל הזמן קמות ספריות חדשות, זהו . . . תודה רבה!תודה לך אסף, ושהיה בהצלחה ב-livecycle. להתראות! האזנה נעימה ותודה רבה לעופר פורר על התמלול!

2Devs - Desmistificando o mundo da programação

No episódio de hoje falamos tudo sobre MVC. O que significa, como e quando surgiu e muito mais!Sigam a gente!2DevsPodcast Facebook2DevsPodcast Twitter2DevsPodcast InstagramRachid YoutubeRachid InstagramThiago YoutubeThiago InstagramThiago TwitchSe InscrevamRSS (para nos acompanhar em qualquer aplicativo)

Outspoken with Shana Cosgrove
At The Table : Cathy King, Software Developer and Project Manager at 20/10 Solutions

Outspoken with Shana Cosgrove

Play Episode Listen Later Jun 15, 2021 31:57


In this episode of The Outspoken Podcast, host Shana Cosgrove talks to Cathy King, Software Developer and Project Manager at 20/10 Solutions about the power of being a working mother. Shana and Cathy discuss growing up together as next door neighbors, the impact of Nyla's wise words, and the value of geeking out with coworkers. Cathy imparts advice on a wide range of topics from staying relevant in your field to making time for your children as a working parent. QUOTES "I just remember one time - and this stuck in my head - Nyla said, ‘Hey Cathy, you know that you could be a mother, but you can also have a career. You know that don't you?'” - Cathy King [03:53] “I felt, ‘Am I going to be able to do this?' and then it clicked. And that was like, ‘I can do this'. I was probably about your age then. ‘I can learn this,' and I did.” - Cathy King [20:30] “You have to pat yourself on the back because I don't think people get what you do, and it's like that with a lot of things. You know, I don't know how airplanes fly, I just get on it and want it to work. When you put something together, especially if you're doing web programming, there can be no errors.” - Cathy King [22:43] TIMESTAMPS  [00:04] Intro [00:53] Meet Cathy King [02:45] Cathy and Shana's Mother [05:29] When Cathy First Realized that she Excelled at Math [06:47] Interest in Computer Science [08:26] How Cathy put Herself Through School [08:56] Life After Graduation [09:42] McDonnell Douglas [11:00] Talking Salary [11:29] Meeting her Husband [12:39] Leaving Pittsburgh for California [13:28] Life as a Working Mother [16:33] Software Advantage [18:45] Keeping up with Technology [21:20] Cyber-Security Coding [21:37] Geeking out With a Friend [23:04] Working for her Brother [23:59] Careers of Cathy's Children [25:13] Book Recommendation [26:16] Being Strong [26:43] Best Advice Cathy Ever Received [28:08] Tips on Being Working Parents and Marriage [29:54] Love of Sports and Basketball [30:18] Shana on how Cathy Inspired her [31:34] Outro RESOURCES https://pittsburghspeech.pitt.edu/PittsburghSpeech_Dictionary.html#:~:text=Definition%3A%20Nosy%2C%20snoopy%2C%20inquisitive,or%20snout%20of%20an%20animal. (Definition of Nebnose) https://www.amazon.com/Five-People-You-Meet-Heaven/dp/1401308589 (The Five People you Meet in Heaven) by Mitch Albom https://www.sru.edu/ (Slippery Rock University) https://titleix.harvard.edu/what-title-ix (Title IX) https://www.pitt.edu/ (University of Pittsburgh) https://en.wikipedia.org/wiki/McDonnell_Douglas (McDonnel Douglas) https://www.microsoft.com/en-us/microsoft-365/access (Microsoft Access) https://www.adobe.com/products/coldfusion-family.html (Cold Fusion) https://dotnet.microsoft.com/apps/aspnet (Asp.net) https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller (Model-View-Controller) https://www.visitingangels.com/ (Visiting Angels) https://www.amazon.com/Rainbow-Comes-Goes-Mother-Life/dp/0062454951 (The Rainbow Comes and Goes) by Anderson Cooper and Gloria Vanderbilt RELEVANT LINKS https://2010solutions.com/ (20/10 Solutions) https://www.linkedin.com/in/cathy-king-62727187/ (Cathy Warner on Linkedin) https://nylatechnologysolutions.com/ (Nyla Technology Solutions)   I'd love to hear from you -- your feedback is important to me and I read all of it. If you enjoyed the podcast, I hope you'll give us 5 stars. I'll be sure to thank you via email. If not, let me know what you think we should do differently. Don't forget to hit “subscribe” so you'll receive notifications about guest interviews and other topics that drop every Tuesday. Live well, Shana

#LearnToCode
I completed a NodeJS project on my own

#LearnToCode

Play Episode Listen Later Mar 26, 2021 37:06


And today I released this site in production Colegio Montessori de la Vera Cruz it's a NodeJs web app that runs on Heroku. I talk about: My experience developing an entire web development project on my own. Using the Model View Controller design pattern. Deploying it to Heroku. I'm starting a new job at Accenture. Buying a new laptop for Linux Fedora. Plans for the future. Twitter: @JorgeEscobar YouTube: Jorge Escobar

.Net Core Learning
What is MVC

.Net Core Learning

Play Episode Listen Later Jan 17, 2021 3:56


First, we need to understand what is Asp.net MVC? MVC stands for Model-View-Controller, MVC is a design pattern that describes the shape of an application. The MVC pattern emphasizes the separation of concerns, where areas of functionality are defined independently. The controller is working as a mediator and control model and view. Early versions of the MVC Framework were built on the ASP.NET foundations that were originally designed for Web Pages, which led to some awkward features and workarounds. With the move to .NET Core, ASP.NET became ASP.NET Core, and the MVC Framework was rebuilt on an open, extensible, and cross-platform foundation. The MVC Framework remains an important part of ASP.NET Core, but the way it is commonly used has changed with the rise of single-page applications (SPAs). In a SPA, the browser makes a single HTTP request and receives an HTML document that delivers a rich client, typically written in a JavaScript client such as Angular or React.

SPICYDOG's TechTalks
SPICYDOG's TechTalks EP 25 - Model-View-Controller (MVC)

SPICYDOG's TechTalks

Play Episode Listen Later Dec 4, 2020 71:27


คุยกันเรื่องกระบวนการออกแบบและพัฒนาโปรแกรมให้เป็นระบบระเบียบเรียบร้อย ด้วยการจัดโครงสร้างโปรแกรมแบบ MVC

Python Podcast
Python 3.9 und Design Patterns (Teil 1)

Python Podcast

Play Episode Listen Later Oct 20, 2020 123:16


Wir unterhalten uns heute mit Christian über die neue Python-Release 3.9 und Design und Softwarearchitektur-Patterns. Mehr Einführungstext? YAGNI!   Shownotes Unsere E-Mail für Fragen, Anregungen & Kommentare: hallo@python-podcast.de News aus der Szene Python 3.9 / Real Python Podcast Episode zu den neuen Features PEP 617 neuer PEG Parser für Python - yacc / lex Podcast.__init__ Episode zum neuen PEG Parser PEP 622 -- Structural Pattern Matching PHP: a fractal of bad design Djangocon Europe Talks Python Software Verband FrOSCon 2020 Talks Black und isort vertragen sich jetzt Yapf - Alternative zu black Lex Fridman & James Gosling Java, JVM, Emacs, and the Early Days of Computing Lex Fridman & Chris Lattner The Future of Computing and Programming Languages Lex Fridman & Jim Keller Moore's Law, Microprocessors, and First Principles Design Patterns Revenge of the Nerds | Man braucht Patterns -> die Sprache hat versagt Design Patterns Gang of Four (GoF) Software design pattern mit mehr als GoF Entwurfsmuster Python Design Patterns Builder: lxml builder builder module Borg Pattern Zope Flyweight für kleine ints in Python Observer Pattern YAGNI Model View Controller Decorator Pattern Active Record Data Mapper Pattern SOLID Clean Code Cosmic Python Repository Pattern Unit of work Öffentliches Tag auf konektom

Headless { Creator Podcast }
E8 | A Conversation about Vue.JS | Robert Mion

Headless { Creator Podcast }

Play Episode Listen Later May 31, 2020 36:20


In today’s episode, I have a great conversation all about Vue.JS with my guest Robert Mion, a designer, writer, coder and Vue JS expert who teaches web development in virtual 1 on 1 sessions. ******************************* Questions Asked ******************************* Tell us about your background. What attracted you to front end development instead of backend development? What is Vue.js? How does Vue.JS compare to JQuery? What attracted you to Vue? Explain what is the MVC, Model View Controller, paradigm? What's the minimum knowledge you need to have before you jump into Vue.JS? Why choose Vue over React? Explain the difference between a library and a framework Is Vue a framework or library? What are some of the challenges with Vue.JS? What are some good resources for Vue? Isn't there a documentary about Vue.JS? What is the virtual DOM in Vue.js? What is the difference between the virtual DOM and the real DOM? Explain the life cycle of a Vue app? What is one way data flow? What is two way data binding? What is reactivity? Can you use GraphQL with Vue.JS? Does Vue work with REST APIs? What are components in Vue and how does data flow between them? What's the parent child relationship between components like? What is a slot? What is a scope slot? What is Vuex? Can you use Vuex to transfer the state of a web app to its companion mobile app? What are mixins? What are filetrs in Vue.js? What are directives in Vue.js? Can you create your own filters?

.NET in pillole
ASP.NET Core #2 - Razor Pages vs MVC

.NET in pillole

Play Episode Listen Later Nov 11, 2019 17:10


Continua la serie dedicata ad ASP.NET Core, ed in questo episodio vediamo qual'è la reale differenza tra le Razor Pages ed MVC.Le prime per uno sviluppo basato sul concetto di pagina, e l'altro che segue alla lettera il pattern Model-View-Controller.

The History of Computing
Smalltalk and Object-Oriented Programming

The History of Computing

Play Episode Listen Later Sep 29, 2019 12:22


Welcome to the History of Computing Podcast, where we explore the history of information technology. Because understanding the past prepares us for the innovations of the future! Today we're going to cover the first real object-oriented programming language, Smalltalk. Many people outside of the IT industry would probably know the terms Java, Ruby, or Swift. But I don't think I've encountered anyone outside of IT that has heard of Smalltalk in a long time. And yet… Smalltalk influenced most languages in use today and even a lot of the base technologies people would readily identify with. As with PASCAL from Episode 3 of the podcast, Smalltalk was designed and created in part for educational use, but more so for constructionist learning for kids. Smalltalk was first designed at the Learning Research Group (LRG) of Xerox PARC by Alan Kay, Dan Ingalls, Adele Goldberg, Ted Kaehler, Scott Wallace, and others during the 1970s. Alan Kay had coined the term object-oriented programming was coined by Alan Kay in the late 60s. Kay took the lead on a project which developed an early mobile device called the Dynabook at Xerox PARC, as well as the Smalltalk object-oriented programming language. The first release was called Smalltalk-72 and was really the first real implementation of this weird new programming philosophy Kay had called object-oriented programming. Although… Smalltalk was inspired by Simula 67, from Norwegian developers Kirsten Nygaard and Ole-johan Dahl. Even before that Stewart Nelson and others from MIT had been using a somewhat object oriented model when working on Lisp and other programs. Kay had heard of Simula and how it handled passing messages and wrote the initial Smalltalk in a few mornings. He'd go on work with Dan Ingalls to help with implementation and Adele Goldberg to write documentation. This was Smalltalk 71. Object oriented program is a programming language model where programs are organized around data, also called objects. This is a contrast to programs being structured around functions and logic. Those objects could be data fields, attributes, behaviors, etc. For example, a product you're selling can have a sku, a price, dimensions, quantities, etc. This means you figure out what objects need to be manipulated and how those objects interact with one another. Objects are generalized as a class of objects. These classes define the kind of data and the logic used when manipulating data. Within those classes, there are methods, which define the logic and interfaces for object communication, known as messages. As programs grow and people collaborate on them together, an object-oriented approach allows projects to more easily be divided up into various team members to work on different parts. Parts of the code are more reusable. The way programs are played out is more efficient. And in turn, the code is more scalable. Object-oriented programming is based on a few basic principals. These days those are interpreted as encapsulation, abstraction, inheritance, and polymorphism. Although to Kay encapsulation and messaging are the most important aspects and all the classing and subclassing isn't nearly as necessary. Most modern languages that matter are based on these same philosophies, such as java, javascript, Python, C++, .Net, Ruby. Go, Swift, etc. Although Go is arguably not really object-oriented because there's no type hierarchy and some other differences, but when I look at the code it looks object-oriented! So there was this new programming paradigm emerging and Alan Kay really let it shine in Smalltalk. At the time, Xerox PARC was in the midst of revolutionizing technology. The MIT hacker ethic had seeped out to the west coast with Marvin Minsky's AI lab SAIL at Stanford and got all mixed into the fabric of chip makers in the area, such as Fairchild. That Stanford connection is important. The Augmentation Research Center is where Engelbart introduced the NLS computer and invented the Mouse there. And that work resulted in advances like hypertext links. In the 60s. Many of those Stanford Research Institute people left for Xerox PARC. Ivan Sutherland's work on Sketchpad was known to the group, as was the mouse from NLS, and because the computing community that was into research was still somewhat small, most were also aware of the graphic input language, or GRAIL, that had come out of Rand. Sketchpad's had handled each drawing elements as an object, making it a predecessor to object-oriented programming. GRAIL ran on the Rand Tablet and could recognize letters, boxes, and lines as objects. Smalltalk was meant to show a dynamic book. Kinda' like the epub format that iBooks uses today. The use of similar objects to those used in Sketchpad and GRAIL just made sense. One evolution led to another and another, from Lisp and the batch methods that came before it through to modern models. But the Smalltalk stop on that model railroad was important. Kay and the team gave us some critical ideas. Things like overlapping windows. These were made possibly by the inheritance model of executions, a standard class library, and a code browser and editor. This was one of the first development environments that looked like a modern version of something we might use today, like an IntelliJ or an Eclipse for Java developers. Smalltalk was the first implementation of the Model View Controller in 1979, a pattern that is now standard for designing graphical software interfaces. MVC divides program logic into the Model, the View, and the Controller in order to separate internal how data is represented from how it is presented as decouples the model from the view and the controller allow for much better reuse of libraries of code as well as much more collaborative development. Another important thing happened at Xerox in 1979, as they were preparing to give Smalltalk to the masses. There are a number of different interpretations to stories about Steve Jobs and Xerox PARC. But in 1979, Jobs was looking at how Apple would evolve. Andy Hertzfeld and the original Mac team were mostly there at Apple already but Jobs wanted fresh ideas and traded a million bucks in Apple stock options to Xerox for a tour of PARC. The Lisa team came with him and got to see the Alto. The Alto prototype was part of the inspiration for a GUI-based Lisa and Mac, which of course inspired Windows and many advances since. Smalltalk was finally released to other vendors and institutions in 1980, including DEC, HP, Apple, and Berkely. From there a lot of variants have shown up. Instantiations partnered with IBM and in 1984 had the first commercial version at Tektronix. A few companies tried to take SmallTalk to the masses but by the late 80s SQL connectivity was starting to add SQL support. The Smalltalk companies often had names with object or visual in the name. This is a great leading indicator of what Smalltalk is all about. It's visual and it's object oriented. Those companies slowly merged into one another and went out of business through the 90s. Instantiations was acquired by Digitalk. ParcPlace owed it's name to where the language was created. The biggest survivor was ObjectShare, who was traded on NASDAQ, peaking at $24 a share until 1999. In a LA Times article: “ObjectShare Inc. said its stock has been delisted from the Nasdaq national market for failing to meet listing requirements. In a press release Thursday, the company said it is appealing the decision.” And while the language is still maintained by companies like Instantiations, in the heyday, there was even a version from IBM called IBM VisualAge Smalltalk. And of course there were combo-language abominations, like a smalltalk java add on. Just trying to breathe some life in. This was the era where Filemaker, Foxpro, and Microsoft Access were giving developers the ability to quickly build graphical tools for managing data that were the next generation past what Smalltalk provided. And on the larger side products like JDS, Oracle, Peoplesoft, really jumped to prominence. And on the education side, the industry segmented into learning management systems and various application vendors. Until iOS and Google when apps for those platforms became all the rage. Smalltalk does live on in other forms though. As with many dying technologies, an open source version of Smalltalk came along in 1996. Squeak was written by Alan Kay, Dan Ingalls, Ted Kaehler, Scott Wallace, John Maloney, Andreas Raab, Mike Rueger and continues today. I've tinkerated with Squeak here and there and I have to say that my favorite part is just getting to see how people who actually truly care about teaching languages to kids. And how some have been doing that for 40 years. A great quote from Alan Kay, discussing a parallel between Vannevar Bush's “As We May Think” and the advances they made to build the Dynabook: If somebody just sat down and implemented what Bush had wanted in 1945, and didn't try and add any extra features, we would like it today. I think the same thing is true about what we wanted for the Dynabook. There's a direct path with some of the developers of Smalltalk to deploying MacBooks and Chromebooks in classrooms. And the influences these more mass marketed devices have will be felt for generations to come. Even as we devolve to new models from object-oriented programming, and new languages. The research that went into these early advances and the continued adoption and research have created a new world of teaching. At first we just wanted to teach logic and fundamental building blocks. Now kids are writing code. This might be writing java programs in robotics classes, html in Google Classrooms, or beginning iOS apps in Swift Playgrounds. So until the next episode, think about this: Vannevar Bush pushed for computers to help us think, and we have all of the worlds data at our fingertips. With all of the people coming out of school that know how to write code today, with the accelerometers, with the robotics skills, what is the next stage of synthesizing all human knowledge and truly making computers help with As we may think. So thank you so very much for tuning into another episode of the History of Computing Podcast. We're lucky to have you. Have a great day!

しがないラジオ
sp.62a【ゲスト: onigiri_】楽しい元大手通信事業者のネットワークエンジニアが語るフロントエンドエンジニアへの転職

しがないラジオ

Play Episode Listen Later Jun 10, 2019 97:16


おにぎりマンさんをゲストにお迎えして、東日本大震災、パチンコ、某通信事業者、海外での仕事、1回目の転職、などについて話しました。 【Show Notes】 ラグナロクオンライン - Wikipedia エンジニアのキャリアを語るMeetUp【しがないラジオ×kiitok】 - connpass 「エンジニア転職の今〜転職ブログと本音〜 Engineer Next Lab #4」で最近のエンジニア転職について学んできた - #がみぶろ MATLAB - Wikipedia マスタリングTCP/IP 入門編 | Amazon IaaS - Wikipedia MVC - Wikipedia Marionette.js SPA - Wikipedia #しがないラジオmeetup 3 - connpass 配信情報はtwitter ID @shiganaiRadio で確認することができます。 フィードバックは(#しがないラジオ)でつぶやいてください! 感想、話して欲しい話題、改善して欲しいことなどつぶやいてもらえると、今後のポッドキャストをより良いものにしていけるので、ぜひたくさんのフィードバックをお待ちしています。 【パーソナリティ】 gami@jumpei_ikegami zuckey@zuckey_17 【ゲスト】 おにぎりマン@onigiri_ 【機材】 Blue Micro Yeti USB 2.0マイク 15374

Cross Cutting Concerns Podcast
Podcast 108 - Chris Woodruff on ASP.NET Core WebAPI

Cross Cutting Concerns Podcast

Play Episode Listen Later Feb 10, 2019 17:13


Chris Woodruff is building web APIs with ASP.NET Core. This episode is sponsored by Ivacy. Show Notes: Chris Woodruff.com JetBrains Model View Controller IIS web server Dependency injection in ASP.NET Core Check out episode 94 with Jeremy Miller on Lamar for more discussion about dependency injection Check out episode 22 with J. Tower on .NET Core for more about .NET Standard. Identity Server Auth0 / Okta Chris’s baseball API InfoQ stuff: The InfoQ eMag: .NET Core Advanced Architecture for ASP.NET Core Web API How to Test ASP.NET Core Web API Chris Woodruff on InfoQ Project Rider from JetBrains Chris Woodruff is on Twitter. Want to be on the next episode? You can! All you need is the willingness to talk about something technical. Want to be a sponsor? Check out my sponsorship gig on Fiverr

Python Podcast
PP02 - Django

Python Podcast

Play Episode Listen Later Dec 19, 2018 106:32


Willkommen zur zweiten Episode unseres Python-Podcasts. Diesmal dreht sich alles um das Thema Django. Shownotes Unsere E-Mail für Fragen, Anregungen & Kommentare: hallo@python-podcast.de Django Web-Framework Tutorial Two Scoops of Django Model View Controller (in Python) einfach erklärt am Beispiel von Legosteinen Cookiecutter für Django Commandeer - command line interface für Pythonpogramme Django-Imagekit - Bildgrössentransformationen etc. für Django

Inside iOS Dev
The Problems with View Controllers

Inside iOS Dev

Play Episode Listen Later Oct 1, 2018 23:53


Andrew describes & discusses the various problems with view controllers. Find Paul Hudson (@twostraws) at https://www.hackingwithswift.com/ Wanna chat with other smart iOS developers? Sign up for our free forum: https://forum.insideiosdev.com Need to prepare for an iOS Engineer Interview? https://iosinterviewguide.com/?promo=inside-ios-dev-ref Connect with us: https://twitter.com/insideiosdev

Inside iOS Dev
Evolving Mobile Architecture at Reddit

Inside iOS Dev

Play Episode Listen Later Sep 14, 2018 21:57


Andrew talks about the recent architectural refactoring work he did at Reddit. He explains how the iOS team moved from an MVC architecture to a Model View Presenter (MVP) architecture. He also talks about Texture -- an async layout framework for fast scrolling feeds. This episode was originally recorded March 2018. Wanna chat with other smart iOS developers? Sign up for our free forum: https://forum.insideiosdev.com

Inside iOS Dev
One Year Anniversary Episode - Podcasting, learning, architecture, & JavaScript talk!

Inside iOS Dev

Play Episode Listen Later Jun 27, 2018 76:03


For their one year anniversary, Alex & Andrew let loose, have some beers and enjoy some free flowing chat. They talk podcasting, learning, architecture, & JavaScript! Wanna chat with other smart iOS developers? Sign up for our free forum: https://forum.insideiosdev.com Have an iOS Engineer Interview? https://iosinterviewguide.com/?promo=inside-ios-dev-ref

Inside iOS Dev
App Architecture with Florian Kugler

Inside iOS Dev

Play Episode Listen Later May 21, 2018 34:03


Florian Kugler, co-founder of the popular objc.io, joins us to discuss his new book "App Architecture". We discuss the five architectures covered in the book: Model-View-Controller, Model-View-ViewModel + Coordinator, Model-View-Controller+ViewState, ModelAdapter-ViewBinder, and The Elm Architecture. We also touch on the VIPER architecture and why it wasn't included in the book. Finally, we close out with some advice from Florian. Want to read the new "App Architecture" book? https://amzn.to/2KJfJPT https://www.objc.io/books/app-architecture/ Wanna chat with other smart iOS developers? Sign up for our free forum: https://forum.insideiosdev.com

Fatal Error
62. Convergent Swift Evolution

Fatal Error

Play Episode Listen Later Mar 30, 2018 47:00


This week, Chris and Soroush discuss Soroush's efforts to implement BigDecimal in Swift, recap Teki Con, and take a detour into evolutionary biology. Teki Con talks krzysztof zablocki michael ayers dave delong Fatal Error Episode 2: View Models Model-View-Controller Applications Programming in Smalltalk-80™: How to use Model-View-Controller (MVC) Lexicographical order Georgia Aquarium Whale Shark Convergent evolution BigInt in the Swift Git repository Prototypes in the Swift Git repository Swift Advanced Operators (Overflow Operators) addingReportingOverflow dividingFullWidth Matt Gallagher - Cocoa With Love: Partial functions in Swift, Part 2: Catching precondition failures Matthew Green: On the NSA (see the first footnote) the cryptopals crypto challenges khanlou/BigDecimal on GitHub Decimal Degrees Wide Area Augmentation System and Local Area Augmentation System

Inside iOS Dev
13 - View Models To The Rescue

Inside iOS Dev

Play Episode Listen Later Jul 25, 2017 24:36


An iOS design / architecture talk. Andrew & Alex introduce and discuss view models. What are they? Should you use them? How do they help solve the malignant Massive View Controller problem in iOS? Wanna chat with other smart iOS developers? Sign up for our free forum: https://forum.insideiosdev.com

Ruby Rogues
RR 316 Learning Rails 5 with Mark Locklear

Ruby Rogues

Play Episode Listen Later Jun 27, 2017 70:54


RR 316 Learning Rails 5 with Mark Locklear On today’s episode, we have Learning Rails 5 with Mark Locklear. Mark works for Extension.org. The discussion ranges from the introduction of Learning Rails 5 to the strategies that most successful students have for learning Rails. Stay tuned! [00:01:30] – Introduction to Mark Locklear Mark Locklear works for Extension.org, a USDA-funded or government-funded organization. He serves the Cooperative Extension Service but a lot of people know about 4-H Youth Group. They got a handful of websites that they maintain that are mostly Ruby on Rails-based. He has been with Extension.org for about 3 years. He is also a staff at a community college mostly doing Rails and IT things. He is also an adjunct instructor at the same community college. He was mostly doing quality assurance and testing work but moved into development work in the last 7-8 years. Questions for Mark Locklear [00:03:00] – You authored Learning Rails 5? It was an actually an update on an existing book – Learning Rails 3. Mark is an adjunct instructor and used that book. He contacted the developers or the original authors in O’Reilly so he can update the book. He updated a lot of the syntax and rewrote a couple of chapters. He also wrote the authentication chapter from scratch. [00:04:15] – What’s unique about your book? For Mark, there are all kinds of learners out there. There’s nothing necessarily unique about this book. It approaches Rails from a standpoint of having really no development skill at all. The only assumption would be that reader knows some HTML and basic things like for loops and conditional statements. [00:05:30] – Has Rails gotten more complicated? That was one of the challenges with this book. The original version of the book didn’t have any API stuff, any Action Cables, or anything like that. But now, we’re looking on adding chapters on those things. Mark doesn’t think Rails is hard to learn now. It’s been pretty backward compatible over the years. It looks very much like it did 5 or 10 years ago. Dave thinks Rails started to standardize a lot of things and with Convention over Configuration, a lot of it is taking care of it for you. The also added a lot of new features like Active Job (Rails 4), Action Cable (Rails 5), Webpack (Rails 5.1). He think that when someone gets accustomed to it, it’s almost second nature. Thanks to Convention over Configuration and the support for the community. According to DHH, Rails is not for beginners. It is a toolkit for professional web developers to get stuff done. But Brian disagrees that it’s not for beginners. It’s not so much that it’s harder to learn but it’s just a little harder to get started with. There’s just lots of different ways you can do in a Rails application by using RSpec, Cucumber, etc. [00:12:20] - What are the core fundamental things to know in order to write Rails apps? Mark spends a week on testing in his class. He focuses more on the Model View Controller paradigm. He also used RSpec and the basics of CRUD. Those things are transferable across whatever framework that they choose to work in. He also want to hit testing, sessions in cookies and user authentication. [00:18:30] - Is there an approach for people to enhance their experience as they learn Rails? Jerome believes in the “just keep it simple” methodology. When it comes to Rails, just learn Rails. Just focus on CRUD apps. Focus on the entirety of the framework, and not only on Rails, focus more on Ruby. Another suggestion from Brian is to start cracking open the Ruby source code, Rails source code and see how things work under the hood. Look at things and see if you can reproduce them or write your own implementations as you learn. [00:24:30] – What are the strategies of your most successful students that you’ve had for learning Rails? In Mark’s class, they have final projects with very strict requirements, basically going back and incorporating everything that they’ve learned. The app has to have a user authentication. It has to have sessions and cookies. And students who are most successful want to solve some problems and have the passion. One of the things that Brian have always seen that separates people who are high performers from the rest is that they’re doing a lot of practice. Spend a lot of time practicing and building apps. Dave encourages the listeners to work on some personal projects that they are passionate about. Deal with someone else and get some experience with some peer programming. Try to see what it’s like working with other developers on the same application, you’ll find that your codes much cleaner because you have to take into account multiple users working around the same code set. Jerome suggests to find a mentor, someone who’s willing to spend time to help with your programs. The students who are talking to their mentors every week usually come to be the strongest. And mentoring is a rewarding two-way street. [00:40:05] – Are there any other aspects of learning or teaching Rails that we should dive into? Mark says you should be uncomfortable every once in a while in implementing new technology. It puts you in the same mindset as your students becomes sometimes it’s becoming incredible overwhelming. And when teaching, Brian does not start with complex examples.  He starts with simple ones. A faculty mentor has to observe Brian in his teaching. The mentor will say, “Just a reminder. You are the guide on the side, not the sage of the stage. You’re not there to tell them everything. You’re not there to make everyone think that you’re the coolest person up there. It’s your job to guide someone to the solution.” [00:49:25] – If I’m a Rails 3 developer, how do I learn Rails 5?            Mark thinks that the approach is probably the same if you’re doing Rails 3 to Rails 4. The questions you will start asking yourself is, “Okay, what areas do you want to dig deeper? Do I have to use Active Job or something like that? What are my mailers? Are there additions to the framework?” Whenever Rails releases a new version, Dave reads the blog which highlights the new features that were added in. Pinpoint those features, do a little bit of independent research and think how you could incorporate them into your application. Use them as guiding tools to upgrade your older Rails application to a more current version. [00:52:15] – Two Writing Assignments for New Programmers Mark wrote a Medium article entitled “Two Writing Assignments for New Programmers.” In his class, they have two writing assignments. One of it is on diversity and technology. They also use Moodle as the learning management system where they can post questions. He got some push back from students but his explanation was that, part of being a developer is to be an effective communicator. Brian agreed and said, “Your job as a software developer is 20% coding, 80% dealing with people, their problems and their requests.” You have emails to read. You have emails to write. Brian always asks, “What are the most important skills you want our students to have?” The top 3 are always soft skills like communication, work ethics, etc. Mark adds that if you can’t do writing, if you can’t show up to work on time and communicate with your colleagues, then, none of your technical skills matter. However, if you can’t past the technical hurdle, you’ll never get a chance to use your soft skills. Dave also adds that if he can’t get out of these people what they’re envisioning, then, they’re going nto develop the wrong things. Picks Dave Kimura Gruvbox Brian Hogan Keys to Great Writing by Stephen Wilbers Rails Jerome Hardaway Rails 5.1 Loves Javascript (Medium article) Hackerrank Charles Max Wood Castle Clash railsmentors.org Mark Locklear Grammarly History of Pi by Petr Beckmann Sierra Nevada’s West Coast Stout Github @marklocklear Site locklear.me

All Ruby Podcasts by Devchat.tv
RR 316 Learning Rails 5 with Mark Locklear

All Ruby Podcasts by Devchat.tv

Play Episode Listen Later Jun 27, 2017 70:54


RR 316 Learning Rails 5 with Mark Locklear On today’s episode, we have Learning Rails 5 with Mark Locklear. Mark works for Extension.org. The discussion ranges from the introduction of Learning Rails 5 to the strategies that most successful students have for learning Rails. Stay tuned! [00:01:30] – Introduction to Mark Locklear Mark Locklear works for Extension.org, a USDA-funded or government-funded organization. He serves the Cooperative Extension Service but a lot of people know about 4-H Youth Group. They got a handful of websites that they maintain that are mostly Ruby on Rails-based. He has been with Extension.org for about 3 years. He is also a staff at a community college mostly doing Rails and IT things. He is also an adjunct instructor at the same community college. He was mostly doing quality assurance and testing work but moved into development work in the last 7-8 years. Questions for Mark Locklear [00:03:00] – You authored Learning Rails 5? It was an actually an update on an existing book – Learning Rails 3. Mark is an adjunct instructor and used that book. He contacted the developers or the original authors in O’Reilly so he can update the book. He updated a lot of the syntax and rewrote a couple of chapters. He also wrote the authentication chapter from scratch. [00:04:15] – What’s unique about your book? For Mark, there are all kinds of learners out there. There’s nothing necessarily unique about this book. It approaches Rails from a standpoint of having really no development skill at all. The only assumption would be that reader knows some HTML and basic things like for loops and conditional statements. [00:05:30] – Has Rails gotten more complicated? That was one of the challenges with this book. The original version of the book didn’t have any API stuff, any Action Cables, or anything like that. But now, we’re looking on adding chapters on those things. Mark doesn’t think Rails is hard to learn now. It’s been pretty backward compatible over the years. It looks very much like it did 5 or 10 years ago. Dave thinks Rails started to standardize a lot of things and with Convention over Configuration, a lot of it is taking care of it for you. The also added a lot of new features like Active Job (Rails 4), Action Cable (Rails 5), Webpack (Rails 5.1). He think that when someone gets accustomed to it, it’s almost second nature. Thanks to Convention over Configuration and the support for the community. According to DHH, Rails is not for beginners. It is a toolkit for professional web developers to get stuff done. But Brian disagrees that it’s not for beginners. It’s not so much that it’s harder to learn but it’s just a little harder to get started with. There’s just lots of different ways you can do in a Rails application by using RSpec, Cucumber, etc. [00:12:20] - What are the core fundamental things to know in order to write Rails apps? Mark spends a week on testing in his class. He focuses more on the Model View Controller paradigm. He also used RSpec and the basics of CRUD. Those things are transferable across whatever framework that they choose to work in. He also want to hit testing, sessions in cookies and user authentication. [00:18:30] - Is there an approach for people to enhance their experience as they learn Rails? Jerome believes in the “just keep it simple” methodology. When it comes to Rails, just learn Rails. Just focus on CRUD apps. Focus on the entirety of the framework, and not only on Rails, focus more on Ruby. Another suggestion from Brian is to start cracking open the Ruby source code, Rails source code and see how things work under the hood. Look at things and see if you can reproduce them or write your own implementations as you learn. [00:24:30] – What are the strategies of your most successful students that you’ve had for learning Rails? In Mark’s class, they have final projects with very strict requirements, basically going back and incorporating everything that they’ve learned. The app has to have a user authentication. It has to have sessions and cookies. And students who are most successful want to solve some problems and have the passion. One of the things that Brian have always seen that separates people who are high performers from the rest is that they’re doing a lot of practice. Spend a lot of time practicing and building apps. Dave encourages the listeners to work on some personal projects that they are passionate about. Deal with someone else and get some experience with some peer programming. Try to see what it’s like working with other developers on the same application, you’ll find that your codes much cleaner because you have to take into account multiple users working around the same code set. Jerome suggests to find a mentor, someone who’s willing to spend time to help with your programs. The students who are talking to their mentors every week usually come to be the strongest. And mentoring is a rewarding two-way street. [00:40:05] – Are there any other aspects of learning or teaching Rails that we should dive into? Mark says you should be uncomfortable every once in a while in implementing new technology. It puts you in the same mindset as your students becomes sometimes it’s becoming incredible overwhelming. And when teaching, Brian does not start with complex examples.  He starts with simple ones. A faculty mentor has to observe Brian in his teaching. The mentor will say, “Just a reminder. You are the guide on the side, not the sage of the stage. You’re not there to tell them everything. You’re not there to make everyone think that you’re the coolest person up there. It’s your job to guide someone to the solution.” [00:49:25] – If I’m a Rails 3 developer, how do I learn Rails 5?            Mark thinks that the approach is probably the same if you’re doing Rails 3 to Rails 4. The questions you will start asking yourself is, “Okay, what areas do you want to dig deeper? Do I have to use Active Job or something like that? What are my mailers? Are there additions to the framework?” Whenever Rails releases a new version, Dave reads the blog which highlights the new features that were added in. Pinpoint those features, do a little bit of independent research and think how you could incorporate them into your application. Use them as guiding tools to upgrade your older Rails application to a more current version. [00:52:15] – Two Writing Assignments for New Programmers Mark wrote a Medium article entitled “Two Writing Assignments for New Programmers.” In his class, they have two writing assignments. One of it is on diversity and technology. They also use Moodle as the learning management system where they can post questions. He got some push back from students but his explanation was that, part of being a developer is to be an effective communicator. Brian agreed and said, “Your job as a software developer is 20% coding, 80% dealing with people, their problems and their requests.” You have emails to read. You have emails to write. Brian always asks, “What are the most important skills you want our students to have?” The top 3 are always soft skills like communication, work ethics, etc. Mark adds that if you can’t do writing, if you can’t show up to work on time and communicate with your colleagues, then, none of your technical skills matter. However, if you can’t past the technical hurdle, you’ll never get a chance to use your soft skills. Dave also adds that if he can’t get out of these people what they’re envisioning, then, they’re going nto develop the wrong things. Picks Dave Kimura Gruvbox Brian Hogan Keys to Great Writing by Stephen Wilbers Rails Jerome Hardaway Rails 5.1 Loves Javascript (Medium article) Hackerrank Charles Max Wood Castle Clash railsmentors.org Mark Locklear Grammarly History of Pi by Petr Beckmann Sierra Nevada’s West Coast Stout Github @marklocklear Site locklear.me

Devchat.tv Master Feed
RR 316 Learning Rails 5 with Mark Locklear

Devchat.tv Master Feed

Play Episode Listen Later Jun 27, 2017 70:54


RR 316 Learning Rails 5 with Mark Locklear On today’s episode, we have Learning Rails 5 with Mark Locklear. Mark works for Extension.org. The discussion ranges from the introduction of Learning Rails 5 to the strategies that most successful students have for learning Rails. Stay tuned! [00:01:30] – Introduction to Mark Locklear Mark Locklear works for Extension.org, a USDA-funded or government-funded organization. He serves the Cooperative Extension Service but a lot of people know about 4-H Youth Group. They got a handful of websites that they maintain that are mostly Ruby on Rails-based. He has been with Extension.org for about 3 years. He is also a staff at a community college mostly doing Rails and IT things. He is also an adjunct instructor at the same community college. He was mostly doing quality assurance and testing work but moved into development work in the last 7-8 years. Questions for Mark Locklear [00:03:00] – You authored Learning Rails 5? It was an actually an update on an existing book – Learning Rails 3. Mark is an adjunct instructor and used that book. He contacted the developers or the original authors in O’Reilly so he can update the book. He updated a lot of the syntax and rewrote a couple of chapters. He also wrote the authentication chapter from scratch. [00:04:15] – What’s unique about your book? For Mark, there are all kinds of learners out there. There’s nothing necessarily unique about this book. It approaches Rails from a standpoint of having really no development skill at all. The only assumption would be that reader knows some HTML and basic things like for loops and conditional statements. [00:05:30] – Has Rails gotten more complicated? That was one of the challenges with this book. The original version of the book didn’t have any API stuff, any Action Cables, or anything like that. But now, we’re looking on adding chapters on those things. Mark doesn’t think Rails is hard to learn now. It’s been pretty backward compatible over the years. It looks very much like it did 5 or 10 years ago. Dave thinks Rails started to standardize a lot of things and with Convention over Configuration, a lot of it is taking care of it for you. The also added a lot of new features like Active Job (Rails 4), Action Cable (Rails 5), Webpack (Rails 5.1). He think that when someone gets accustomed to it, it’s almost second nature. Thanks to Convention over Configuration and the support for the community. According to DHH, Rails is not for beginners. It is a toolkit for professional web developers to get stuff done. But Brian disagrees that it’s not for beginners. It’s not so much that it’s harder to learn but it’s just a little harder to get started with. There’s just lots of different ways you can do in a Rails application by using RSpec, Cucumber, etc. [00:12:20] - What are the core fundamental things to know in order to write Rails apps? Mark spends a week on testing in his class. He focuses more on the Model View Controller paradigm. He also used RSpec and the basics of CRUD. Those things are transferable across whatever framework that they choose to work in. He also want to hit testing, sessions in cookies and user authentication. [00:18:30] - Is there an approach for people to enhance their experience as they learn Rails? Jerome believes in the “just keep it simple” methodology. When it comes to Rails, just learn Rails. Just focus on CRUD apps. Focus on the entirety of the framework, and not only on Rails, focus more on Ruby. Another suggestion from Brian is to start cracking open the Ruby source code, Rails source code and see how things work under the hood. Look at things and see if you can reproduce them or write your own implementations as you learn. [00:24:30] – What are the strategies of your most successful students that you’ve had for learning Rails? In Mark’s class, they have final projects with very strict requirements, basically going back and incorporating everything that they’ve learned. The app has to have a user authentication. It has to have sessions and cookies. And students who are most successful want to solve some problems and have the passion. One of the things that Brian have always seen that separates people who are high performers from the rest is that they’re doing a lot of practice. Spend a lot of time practicing and building apps. Dave encourages the listeners to work on some personal projects that they are passionate about. Deal with someone else and get some experience with some peer programming. Try to see what it’s like working with other developers on the same application, you’ll find that your codes much cleaner because you have to take into account multiple users working around the same code set. Jerome suggests to find a mentor, someone who’s willing to spend time to help with your programs. The students who are talking to their mentors every week usually come to be the strongest. And mentoring is a rewarding two-way street. [00:40:05] – Are there any other aspects of learning or teaching Rails that we should dive into? Mark says you should be uncomfortable every once in a while in implementing new technology. It puts you in the same mindset as your students becomes sometimes it’s becoming incredible overwhelming. And when teaching, Brian does not start with complex examples.  He starts with simple ones. A faculty mentor has to observe Brian in his teaching. The mentor will say, “Just a reminder. You are the guide on the side, not the sage of the stage. You’re not there to tell them everything. You’re not there to make everyone think that you’re the coolest person up there. It’s your job to guide someone to the solution.” [00:49:25] – If I’m a Rails 3 developer, how do I learn Rails 5?            Mark thinks that the approach is probably the same if you’re doing Rails 3 to Rails 4. The questions you will start asking yourself is, “Okay, what areas do you want to dig deeper? Do I have to use Active Job or something like that? What are my mailers? Are there additions to the framework?” Whenever Rails releases a new version, Dave reads the blog which highlights the new features that were added in. Pinpoint those features, do a little bit of independent research and think how you could incorporate them into your application. Use them as guiding tools to upgrade your older Rails application to a more current version. [00:52:15] – Two Writing Assignments for New Programmers Mark wrote a Medium article entitled “Two Writing Assignments for New Programmers.” In his class, they have two writing assignments. One of it is on diversity and technology. They also use Moodle as the learning management system where they can post questions. He got some push back from students but his explanation was that, part of being a developer is to be an effective communicator. Brian agreed and said, “Your job as a software developer is 20% coding, 80% dealing with people, their problems and their requests.” You have emails to read. You have emails to write. Brian always asks, “What are the most important skills you want our students to have?” The top 3 are always soft skills like communication, work ethics, etc. Mark adds that if you can’t do writing, if you can’t show up to work on time and communicate with your colleagues, then, none of your technical skills matter. However, if you can’t past the technical hurdle, you’ll never get a chance to use your soft skills. Dave also adds that if he can’t get out of these people what they’re envisioning, then, they’re going nto develop the wrong things. Picks Dave Kimura Gruvbox Brian Hogan Keys to Great Writing by Stephen Wilbers Rails Jerome Hardaway Rails 5.1 Loves Javascript (Medium article) Hackerrank Charles Max Wood Castle Clash railsmentors.org Mark Locklear Grammarly History of Pi by Petr Beckmann Sierra Nevada’s West Coast Stout Github @marklocklear Site locklear.me

Drupalsnack
Drupalsnack 78: Din första D8 modul

Drupalsnack

Play Episode Listen Later May 29, 2017 47:12


Fredrik och Kristoffer sitter ner och pratar om hur man skriver en Drupal 8 modul. Vi pratar skillnader mot Drupal 7, vilka hooks fungerar fortfarande eller har det ändrats? Enkelt beskriver vi även hur du skapar din egen Hello world modul med både info-fil och controller kod. Detta poddavsnitt sponsras av Websystem Det här poddavsnittet sponsras av Websystem. Länkar till moduler, webbplatser och tjänster vi pratade om i detta avsnitt: Dagens avsnitt Hook menu alter i D8 Preproccess i D8 hook_form_alter i D8 Libraries / Attached i D8 Colorbox Cache tags A “Hello World” Custom Page Module .info.yml Basic Controller MVC PSR-4 BigPipe Bootstrap layouts Mollom End-of-Life Announcement | Mollom 2bits Antibot

The Frontside Podcast
056: Ember vs. Elm: The Showdown with Philip Poots

The Frontside Podcast

Play Episode Listen Later Feb 3, 2017 39:42


Philip Poots @pootsbook | GitHub Show Notes: 00:53 - What is Elm? 03:45 - The Essence of User Interface 07:59 - “Messages” 08:31 - Scalability 14:04 - Error Handling 18:47 - The Business Case 22:35 - Where is Elm on the curve of scalability? 28:36 - Learning From Elm 32:32 - “Whole Meal Solutions” Resources: Philip Poots: Elmber @ Wicked Good Ember 2016 Cycle.js Functional Reactive Programming Evan Czaplicki Test-driven Development (TDD) NoRedInk The Elm Mailing List Try Elm Elm Guide elmtutorial.org Elm For Beginners by James Moore Transcript: CHARLES: Hello, everybody. Welcome to The Frontside Podcast Episode 56. I am Charles Lowell, a developer here at The Frontside. With me is Jeffrey Cherewaty, also a developer here at The Frontside. JEFFREY: Hey-o! CHARLES: We're going to be talking today with Philip Poots, who is a fantastic individual, who I have known over the Twitters, over the e-mails, interacted with at conferences, seen him speak on at least one occasion and today we're actually going to be talking about the thing that I saw him speak at Wicked Good Ember last June. It was actually one of my favorite talks from that conference. It was on Elm for Ember developers. Thank you very much for being on the show, Philip. Why don't you tell us a little bit about what Elm is and how you came to find out about it and really kind of dive deeply into it? PHILIP: Yeah, sure. First of all, pleasure to be on the show. The Frontside is one of my favorite podcast, if not my favorite, given a cross-section of the Dadcast, the love of programming and balancing that with the business of programming. That's right, I'm an independent developer. I started off with Rails then got into the Ember quite early on. Last year, I think around January, that's when I started really investigating Elm in detail. It's actually a funny story how I came about because I was at Ember Amsterdam and it was a night where we had three members of the core team: we had Erik Bryn, he gave a talk, Alex Matchneer, gave a talk and Igor also came over because he's based in Europe. Alex always loves to investigate new things and one of the things he was getting into was Observables. I'd never heard about Observables at all so after the talk, I kind of pulled him aside and I asked him some very stupid questions. He was gracious enough to bear with me and to dive a little deeper into this stuff. Alex is kind of a quiet member of the core team, unless he's got his drum sticks but he's the guy that rewrote the [inaudible]. That was no mean feat because I got into Ember just before that moment and the way he managed to make that incredibly easy was fantastic so I kind of had an extra ear open to what he had to say. I went on this Observables talk. You know, you start off with React that was the framework that was using Observables the most. That brought me to Cycle.js -- CHARLES: Cycle.js? I haven't heard of that. Is Cycle.js a framework built on top of Observables? PHILIP: It is. There's a guy called André Staltz or André Medeiros but he uses Staltz as his name. It's largely based off the same principles as React. Cycle, basically one of his inspirations or at least one of the things which cycle is most like was the Elm architecture. He calls it Model-View-Intent. We have Model-View-Controller and Elm was model update view but essentially, the same principles. You know, I'm the kind of guy that likes to get stuck in, to go deep and where I started with Observables then I ended up at Elm. I started playing around with that, I started looking into it and I loved what I saw. The thing above all that really attracted me to it was the pure simplicity of what was going on. It was almost like they boiled down the UI paradigm to its essence and removed all the extra cruft and you just saw what you meant what you wanted and it gave you these, what I thought at the time, composable way to put things together. CHARLES: Can we unpack that just a little bit? I really love that idea of it boiled down to the essence of UI. I assume there are certain coordinating mechanisms that Elm employs. It's interesting to hear you say that Cycle.js has used Elm as an inspiration. I also understand that Redux is inspired also by the Elm architecture. I'm very curious, what are those kind of essential mechanics that drew your attention? PHILIP: I think you can look at it from two points of view. The first is, which I didn't actually learn until later but the first is essentially boiling down functional programming. You're decoupled, you're using functions and not only functional programming and there's a lot of arguments over this term but functional reactive programming. The idea of functional programming is stateless. Therefore, time is kind of the beast that you have to deal with. But FRP, then essentially boils time into the concept of values that can change over time so you have a reference to one value but in JavaScript that's an Observable. In Elm, in the beginning, when I was getting into it, that was signals. That's not all kind of hidden underneath so you don't really need to get over that conceptual hurdle anymore. Then the boiling down to the essence, I guess that's more from a code point of view with Ember. Especially at the beginning, there were a ton of different concepts that were thrown at you to begin with. It was billed as an MVC framework. It was sold as an MVC framework but you had helpers in there, you had components, you had views model controller. You had this cluster of things. You could see MVC in there but there were enough things surrounding it to kind of think, "Where does this piece of code go? Where does that piece of code go? Where should I do this?" CHARLES: There are a lot of blog posts trying to explain what exactly is the view, is the template the view? Is the controller the view? What's the difference between a view and a controller? PHILIP: The way I think about frameworks is they give you buckets to put your code. The buckets are kind of all connected together. I'm thinking at a really simplistic level. I need to write this feature, I need this bit of code, I need this bit of logic, where do I stick it? A framework says you should stick it here or you should stick it there. It's solves the need of having to think about the broader architecture and how things interact because those things have been solved for you. Now with Elm, it was just so straightforward to say, "This goes here: all the data, the model. It lives in this record, which is equivalent to a JavaScript object, we can say on a simple level. Anything you need to do with state, happens there. Then you've got the view and the view is simply a function, which takes that data structure and then you tell it how to render it to HTML and then all of the action, everything that happens in your application is also defined in one place in your update function. That's it, like no more than you need and no less than you need. CHARLES: Yeah, I love that. I feel like it is very much as 'data down, actions up' kind of boiled down to the essence. It's almost better at that paradigm than Ember is in itself, with having your view as just a function. Your state transition or your update is just a function. Then your model is just unadorned data. That's all it is. PHILIP: The type system as well in Elm, also made it really straightforward. My model is a record. That's it. My view is HTML in the beginning but then it moves to HTML, which contains messages. Essentially, I've got HTML and in the HTML, there are events or actions and those actions will send messages and really straight forward. Then the update function, I take in the current model, I take in the message and I decide via pattern matching what I want to do. There are a few extra bits and pieces around there but that's the essence of it. CHARLES: Now, when you say messages, I'm thinking this is a way of declaring what actions you will take when certain HTML elements, like events happen, like you declaratively mapping an event to the dispatch of an action. PHILIP: That's correct, with any extra data so a message is itself. Like the actions hash in Ember essentially and along with the parameters for that action, which would passing through the HTML. CHARLES: Some might argue that if something is simple to get something working, I can have a pure function that's a view, I can have a simple data structure which is my model. I can have a pure function which is my update or my state transition, how I change my data or affect changes to the model. Some might say, "That's very simple," but simple is great for simple cases. But then there's the question of scalability. As my application becomes more complex and has the interactions become more complex, does that simple paradigm actually scale? What has been your experience there? PHILIP: Straightforward answer -- it's a learning curve to scale. Why? Because it's so new and also because the things that you would have reached for in the past aren't available to you. When I think of Ember scaling, the scale is built into the framework. You need another component, you just add another component. You need another model, you add another model. There's a clear story or there's a clear way that you deliver a new feature. I think that's a fantastic aspect of Ember that you also say no. I can remember being at Wicked Good Ember and just realizing how many of the people that were speaking and how many of the people that I was talking to work for bigger companies -- Heroku Dashboard, you had LinkedIn and the fact that Ember scales across a large team size, it's a real testament to Ember, which is slightly different for the reason why I got into Ember. Also you know I had a few issues just on a side project with a friend, the pace of Elm's change meant that when you only have a limited time to devote to the project, then you don't want to be spending that time for going out where you should be in terms of the upgrade process, etcetera. That's a known path and I think that's a really clear advantage of Ember over Elm. The path in Elm is not as well-fleshed out and there's a bit of tension between Elm as a single page application and then Elm as an application that you stick on every page of your server generated app, for example. The main people who use Elm NoRedInk could employ Evan Czaplicki, the creator of Elm, there up at the minute is a Rails up. I think in Elm up for every page, I believe that certainly was the case, whether that's [inaudible], I don't know. It's not an area where it's like here's the path, go for it because the scalability of Elm, everyone came into Elm thinking, "I know react. I know Ember, the components system, 'data down, actions up'," and in React, you're really encouraged to make a component for the smallest thing on the page as a component. Then you have container components, you make your way out of the onion skin and hope you don't cry on the way. [Laughter] PHILIP: But the thing about Elm was everyone jumped in and tried to do it this way. I certainly got the impression when I was beginning that the Elm architecture was infinitely Nestable Russian dolls. It is in a way but the difficulty is then passing into component communication between parent and child and people had been figuring it on a weird ways with signals to do it but then became obsolete. The main encouragement is basically go so far with a single component that you can and then once you had problems, try not to create new components or new bits of UI but to extract the bits you need into modules. This is actually one of the things that really attracted me to Elm is that you're encouraged to lean on your programming skill set, rather than learning a whole new frameworks way of doing things so that the things that work in functional programming will work in Elm. But that's also a down side because all of a sudden, you have to exercise your programming chops. Let's be honest, a lot of the stuff we're building we're like gluing things together. We're not thinking up new architectures or ways of doing things. That's definitely a learning curve and that's definitely a struggle or something that I find difficult. CHARLES: Yeah, I feel like that touches a lot on the messages you get from the FP community. I know certainly in the interactions I've had with the Clojure community, they're very big on that and it's like, "Let's have very powerful primitives." They have that term 'decomplecting', like let's get at the core. It's like understand that essence so if we can compose and we can enable composition of these low level functions and allow you to compose the data, then you don't have to worry so much about everything else. There will be a way. I think the counterpoint to that is that you end up with a lot of different ways because there are a lot of different ways that you can compose a very small set of primitives. PHILIP: Yes, that's right. But I think one of the advantages of Elm over maybe other FP languages and this is where the similarity with Ember comes in as well. It tries very much to cement simple convention but not only by convention but actually baked into the language so people that are coming from more powerful functional programming languages often come to Elm and think, "Why can't I do that? Why do I have to write all this boilerplate code," and the reason is because then it's not going to be simple enough anymore for people to use it. Also the goal of Elm, which is this long term maintainability of large code bases, you kind of shoot yourself in the foot a bit just like you said, Charles. CHARLES: Yeah, I think that's actually a great point. It's actually one of the things that was most memorable, I think about your talk at Wicked Good was -- just a quick anecdote. I remember in 2007, when iPhone came out, I had an iPhone and my father in law came over from Finland and this is a guy who was a Nokia partisan. I mean, part of Finnish pride was everybody own -- JEFFREY: National phone of Finland. CHARLES: Yeah, exactly. Everybody owned the Nokia mobile phone. He came over, He visited me and I had an iPhone and he was like, "Can I see it?" He took it, he had the swipe to unlock and he swiped it and it unlocked and all the app icons just kind of came right into the screen and he was like, "I want one." [Laughter] CHARLES: That was all it took. I've never seen a sales process so utterly complete and so rapid in its realization. For me, I think that moment when I saw you talk was when you made a mistake like where you were trying to match against an improper attribute on the model inside the update function. The first thing that happened was that Elm caught it before you could even compile your program and the error was just beautiful. It put its finger right on and it's like you need to fix this right here so there's much tied up into that because I feel like it addresses a lot of the learning curve problems that we have in Ember. PHILIP: I don't think that's Ember specific -- CHARLES: No, it's not, it's -- PHILIP: That's the JavaScript thing, isn't it? CHARLES: Yeah. PHILIP: In many ways, I think of JavaScript as a very low level substrate. It's like sand, it's very granular and it's very hard to put together well without falling apart, whereas in Elm gives you bigger blocks, so to speak but it also defines a way through the type system where if you don't put those blocks together in the right way, it's going to tell you. That's why despite some of the ignorance of how best to do Elm apps, that's why people continue to use it because it gives them this delightful experience. CHARLES: Yeah, it was fantastic where when you fail, it picks you up, dust you off and sets you right back on the right track. I think one, that's just a freaking awesome feature and I think also two, the thing that struck me when I saw that was like, "Wow, this community has a different focus than other FP communities that I've come into contact with because I have encountered that exact same error message in Haskell and it left me puzzling and wondering what to do. It's like, "No instance for type class blah-blah-blah for class blah." Then if you're an experienced Haskeller, it does point right to the problem in the same way that like you've learn the parse Perl stack traces. You know, you see a Perl stack trace and you understand it. But they could have gone that way with Elm but the other thing that it demonstrated, it has kind of a different focus there. PHILIP: Absolutely and that really comes down to Evan Czaplicki, the creator of Elm. I was able to get over to London in October a couple of years ago or a year and a half ago now to do a workshop with him at the Code Mesh Conference. You know, just seeing him teach this stuff and saying go into this and talk about the things in a bit more detail, it was very clear. First of all that he'd had a negative experience picking up Haskell, I think it was and he just thought, it doesn't have to be this hard. The things aren't actually that hard. It's the way that we're explaining them that makes it hard. The things that are actually under the surface is really simple. He has a blanket ban on this kind of technical jargon. In the Elm community, he prefers to get things really straightforward names. I think he said to me that one of his thesis advisors or his university professor said, "Evan, that's what you get when you put a usability specialist into a programming language creator's shoes," that he does have this focus where he understands the benefits of static-type systems but he also deeply cares about the experience of not only picking up the language and learning it but also the day you solve it and that's something that just shines through. I think even if Elm never makes it into the pantheon of great programming languages like that in itself and the influence of that had already on other communities, this is fantastic. It's the tide that lifts all boats in many ways and we all benefit from that. JEFFREY: We kind of touch on this a little bit earlier. We've been talking about the ergonomics of being an engineer working with Elm or Ember. What about the business case? We've mentioned how Ember has prevent a scale fairly well in large organizations. What's Elm's path to being able to do that and where is the niche to that it fits in right now? PHILIP: I definitely think Ember comes out of Apple, I believe with sprite core. That's where it started and it's interesting to see that that's also where it's gone in terms of the focuses and making it easy to build these rich applications. I think also that Elm has a similar genesis in the sense that Evan, I believe he did an internship at Microsoft and one at Google and I think there's a conference talk as well from large JS or elm lock or something, millions of lines of code. It's definitely gunning for the CM area which is applications which are large and hairy and trying to make the maintainability a lot better by bringing the strengths of the static type system to bear and bring the simplicity that that enables. That means that the learning curve maybe is a little sharper at the beginning, in a similar way, also that Ember was and is. But then you should reach this point where the maintainability of the app outweighs the time spent in learning. I think about it a bit like test driven development. I remember back when I was doing Rails and DHH had baked TDD into the Rails itself and there was the years of the testing discussions whether to test all the time, test everything, 100% coverage or even full circle tests are a waste of time. but it's a similar philosophy in that if the tests are doing what they should be doing, which is giving you great feedback, the time it takes to get up to speed in testing, the time it takes to set up testing, the time it takes to write the tests, they pay off further down the line and that's not music to the ears of the people who want to get something into production immediately. But it's definitely music to the ears of people who will be spending a long time on maintenance in an application. That NoRedInk application is huge. They have millions of users. They've build software for teaching grammar and skills in the US and they talk all the time about the benefits of Elm. Mainly, in the sense of confidence, I have the confidence to go in and change this code. All of bits or majorities of our code bits, which are things that we've rather not like to touch. We kind of section them off. If a feature request comes in and instead of saying, "Yeah, we can do that," you try and slowly push it out the door. Elm is supposed to give you then the confidence to be able to go to any part of your code base and to change it without the fear that you're going to break something or break everything because the type system, the compiler will tell you, "You change this type, you change the signature of this function, here's where it's broken and as soon as you fix the compiler errors, functionally it works, you'd probably have a few tests to test the actual business logic of it." Probably not so with technical stuff but it's a huge time saver. That's where we want to be as developers and our relationship with our tools. We don't want to be fearing our tools. We don't want to be anxious every time we open our editor. We don't want to fear the feature requests coming in. We want to be in control of our environment and we want to be able to deliver the business value. I think that's certainly the promise of Elm. That's certainly where it wants to be. CHARLES: I love that. It sounds like that is where they want to shoot for is these big applications and they do want to scale massively. Let me ask the question then. Where is Elm do you think right now today on that curve of scalability? PHILIP: To put it in Ember terms, that's maybe the best way I can describe it. If anyone remembers the early days of Ember, I definitely feel that they're in 0.9 approaching one rather than later than that. One of the things as well, I think it's important to note is that Evan is not rushed. It just blew my mind when I heard him speak about it and it wasn't anything big or anything but just the whole kind of tenor of the conversation of the way he was teaching of how he was talking about Elm was so in contrast to the JavaScript type machine. In contrast to a new framework every month, he was like, "If Elm is going to be around in 10 years, then this is the decision that I'm going to make." In that sense, where is Elm in that journey. I'd say it's still pretty early on. I'd say also, Evan is really focused on use cases so if there's not a use case for something, there's no reason to add it. This is actually quite frustrating maybe for people who are coming out of JavaScript ecosystem and they think of a feature that they want and they submit a pull request and it just gets closed or it get set, is there use case for this? Why do you need it? Is this generalizable to everyone? Will it make sense to add this to the language? Can you do it in a library? Then figured out later, can you do it in JavaScript with port, instead of having to bring it into Elm? He's definitely building it very slowly but that may sound like a down side right now but the upside is we're going to come up with something at the end, hopefully that is battle-tested, that fits the use case and a good example of that was the URL handling at the navigation. It didn't live in Elm. Do we actually need it because he's building single page applications? Can you give me your experiences? There are a couple of libraries also built. Then the things from those libraries were then taken a little bit like Ember as well, where you use the add-on ecosystem to try new things and then things may get brought into core or make it kind of the official stamp of approval. But it's a lot slower and not as committee-based. Evan is the benevolent dictator for life. CHARLES: I really like that approach. I don't withhold my opinion from the benevolent dictator versus kind of the oligarchy that you see elsewhere. But I was thinking as you were describing it that maybe the framework really, and this is me, I'm kind of a little bit of a tree nerd, mostly in and around the trees that grow in central Texas but I love trees. Unfortunately, it sounds like oak or maybe redwood would have been like a more appropriate name because those are very slow growing, have a very hard wood, whereas in Elm, it's actually fairly short lived and has a softer wood. JEFFREY: And you also don't want cedar because that will come back and bite you -- highly allergic and toxic to humans. [Laughter] CHARLES: Right. Named Elm but slow growing hardwood that you can build a house out of. But I like that. It's so important to get things right the first time because that's where you realize exponential gains. Unfortunately, there is no substitute for exponential gains, rather than deep thought. At least that's been my experience. You can realize gigantic short term gains with taking cut corners but in terms of long term exponential, ultimately those will taper off. PHILIP: I think as well, what we've seen in Ember's experience is the decisions that you take to open up a private API or not to make something private. They limit you because all of a sudden, everyone starts using those APIs. A year down the line, you realize, "Oh, hang on. We don't want to design it in this way. We want to do it in that way," but given the commitment that Ember has to stability, you have to deal with that. Sometimes, the dealing with that actually takes more energy, more time, more effort in education, in actual code, in maintaining two branches, all of that kind of stuff then actually takes away from the time that you could have had to think up better solutions and it's a danger, you know? It's almost like as soon as you throw this into the water that it becomes firm. As soon as you throw it into the crowd, the crowd will take it and they will use it and your chance to change it or mold it will have gone. Evan talks a lot with language designers and at least I got that impression that he opens up channels of communication with people who've done this before and he thinks very deeply. He's not closed off to the idea of adding more powerful features to Elm but he would only do it when it's right to do it. It's not just is this feature right but is this the right time for this feature? That as well is just the kind of mind blowing like who thinks about this stuff, who cares about this stuff? CHARLES: Yeah, because certain features become accessible once other features are in place. I feel like it would have been as feasible to have an entire compiled language as an acceptable option before people started transpiling CoffeeScript and then with Babel, transpiling future versions of JavaScript back into JavaScript. If those intermediate steps happened, if CoffeeScript and Babel would have happened, would people be as receptive to things like Elm or things like PureScript? it's definitely there is kind of the zeitgeist of the development community really informs what features are even possible or appropriate tomorrow, even though they might have some ejectively sound qualities out to them. JEFFREY: They want to make sure they're not too far ahead of their time. CHARLES: Right, exactly. Folks got to be ready for it. Then the other thing that I wanted to ask was given the trajectory of where Elm is, some people are using it in production. You said it was around like a 0.9, 1.0. if we are actually quite happy with our current code bases, whether we're using Ember, whether using React, whether using some other framework, what are things that you can learn from Elm that you can bring home with you to your own town, wherever that is to use and make your own life better, as you develop code, to kind of increase that confidence, as you say? PHILIP: This is very relevant to my suggestion because in the past couple of months, I haven't had a chance to do any Elm but what I find is after kind of my deep dive, I've come out the other end and I feel like I've come out a better programmer. I feel like Elm is simple enough conceptually to learn quicker, faster, at least the basics more than maybe even to JavaScript framework. I think that the things that you will learn in that process are tremendously beneficial, even if you don't ever end up using Elm in a professional capacity. The thing I think that grabbed me most is because of the way the type system is, you have to deal with every error and this is something when writing Ruby or when writing Ember, you always focus on the happy path. Then once you've got the happy path in place, often the business will say, "That's done. Let's move on." Your better instincts say, "No, we haven't actually made this robust enough." But sometimes the value is also not the great in kind of shoring up all those cases. But what Elm does because of the way it's build is it forces you to deal with failure. The classic no runtime errors in production, the reason that is it may have taken you a bit longer to write your code in Elm. But you come out of it with a confidence that if something explodes, it's either something incredibly rare or it was JavaScript and not Elm. Just the forcing like, "How can I think better about how this code can fail," means a bit of extra mental effort when you do it in a language that's not Elm but it's definitely something that's worth doing, if you want to build good software. Another thing related to the failure stuff is maybe the idea of what's called an abstract data type or a union type or an enum, like the fact that you can encode different states in one object, that you deal with all of those states in a cohesive way. One of the things actually, I think it was Jack Franklin of JavaScript Playground who brought this back from Elm into Java Script was when you have a screen, you want to load some data via Ajax or Fetch, instead of just loading the page, sending off the request, getting the request back, deciding what to do with it, it's like, "Why don't we encode those states in our code." We have the waiting state, we have the find state but we have find but it was an error, we have find and it worked, we have find and it actually has no values. Instead of just dealing with those on the fly, if statements like why don't you create an object that encodes the states that your UI can be in and then you react and the UI will know what to do and you write the code to do that. But in some ways, at least to me that's a lot better than kind of hit and hope when we got an error. That's, "If do this, if do that, let's nest some callbacks or let's chance some promises." The sheer act of taking a step back and this is something Elm forces you to do because the way it is, like thinking about the domain and thinking about how best to model the domain. To be honest, it's probably just good programming practice but how often do we not do it? CHARLES: Absolutely. It seems so obvious, except it's only obvious when you're put into a system that you can't slide on it. What you're describing reminds me of this concept that I came across in the Haskell community. They talk about wholemeal solutions versus piecemeal solutions. Most of the time, they talk about wholemeal solutions as kind of finding the most general set of abstractions that solve a problem for all cases. But I hadn't applied it to this concept of that all the potential states kind of envisioning your application. As you execute your code, you'll only come across one state of the time but kind of thinking of your code as all of these sort of quantum states of your application existing at once and you need to account for them all and draw that whole picture. PHILIP: This is a really stupid analogy but I don't know if anyone's played Age of Empires or any other kind of war-based game where you have a map, you've got the fog of war and you can only see a few meters around you and you have to send out your scouts and you need to find them -- CHARLES: Yeah, yeah. PHILIP: -- Different tactics. You shore up your base and you concentrate on where you are, you send your scouts into the far ends of the map. In terms of seeking out of the unknown, I feel like Elm forces you to know the map where is when I'm programming in JavaScript or in Ruby, it's more like, "I'm here. I need to do this. I do it," and you don't necessarily force yourself to think of all the potential states or all the potential things that can happen, the events that can happen, whereas with Elm, if you don't have those, then it will tell you that those things in place. [Laughter] CHARLES: Yeah, I love that analogy. Like actually sent out your scouts to know the map. PHILIP: Yep and I think as a person, and this is maybe why it appeals to me it's like I like the feeling that I haven't left a stone unturned. I like shipping something that I'm confident in and I know it won't bite me or if it does bite me, it's purely because it was an unknown-unknown. It's like doing your due diligence. As I'm saying this, Elm is not the silver bullet. Elm is not the panacea. Elm will not solve all of your problems. But speaking in terms of contrast with JavaScript or Ruby and more dynamic languages than Elm, these are the things that happen. I think that kind of leads me on to another point which is Evan in the mailing list conversations and the decisions that he takes with Elm, I don't know if this are stages of maturity as a developer but you find your tool, you love it, it's the only thing that can do the job and then you realize other people are doing jobs pretty well, doing their other stuff, I guess each to their own. But I feel like there's another stage where it's like what are the tradeoffs involved in taking this decision or using this tool and what are the tradeoffs involved in taking this decision or using that tool. Just the way of thinking in terms of tradeoffs, instead of absolutes I find really, really valuable and that's definitely something that I've been able to apply and what are the benefits of this decision. Not only from a code point of view but from an organizational point of view, from a team point of view, from a long term point of view, from a short term point of view, having a wider arena to make those decisions, it has been really helpful for me, valuable on both side of them. CHARLES: I can see it. I believe you and I think we're coming to the end of our time here, I think I'm going to make the same recommendation that I made to everybody last week when we were talking with Toran about Redux and that is you should go out and you should try Elm. It's really easy to get started and it will guide you. The guides are excellent. The air handling is excellent and yes it is quirky and weird but it supports you. There's going to be some big functional programming boulders thrown at you but it gives you a [inaudible] to deal with them. JEFFREY: I think you need a suit of armor so we can stick with the Age of Empires metaphors. [Laughter] CHARLES: Yeah. Go out there, try it and experience the things that Philip is talking about because I feel like they are very real and they will have a good effect on you, whatever it is that you do the next day or the next week or the next month. PHILIP: They'll challenge the way you think, they'll give you new perspective and they'll give you a good counterpoint as well. You know, elm is not for everyone but only if you try it will you understand that. I think that's one of Evan and everyone in the Elm community is try it yourself. I'm not going to say Elm is right for you, Elm is right for your business. Rewrite everything in Elm, not at all, try it out, try it on a side project, try it to just having fun hacking around. If you do want to make the jump to using it in your company or whatever, don't take a decision to rewrite everything. Take one very small part of your app and do it in Elm and see how it goes. If you don't like it, you can take it out. If it works, you can build another small thing. This kind of gradual approach were far too quick to jump on a bandwagon: trash the old thing, do the new thing. Especially now, when we are building applications that are going to be maintained, when we are building applications that are going to be around for a few years, it's also just not feasible and sometimes it's not right. You just got to make that decision maturely rather than I want to use this or I want to use that, which can be tough. But ultimately, you want to deliver the value. Try Elm at Elm-lang.org/Try. You can try on the browser and see how you go. The official guide is really good. There's also Elm-Tutorial.org, which is kind of a complement to the official guide. Pragmatic Studio have released recently an updated course for learning Elm. James Moore at KnowThen.com. He has a couple of Elm courses, one is free introductory and then there's a paid course, which goes into deeper topics, whether text or whether video, whatever your thing is, there's resources available to get you to the point where you'll be able to make a decent decision. CHARLES: Well, fantastic. I'm certainly excited. I haven't dip my toes in Elm for a while and I'm actually, after this conversation pretty stoked to get it on again. I hope everybody else does. Thank you so much, Philip for coming on to the podcast. This was just a fantastic and enlightening conversation. PHILIP: Not at all. It's been an absolute pleasure. Thank you. CHARLES: All right. That's it from The Frontside. Remember to get in touch with us at Frontside.io, if you're interested in UI that is engineered to make your UX dreams come true.

Mobile Couch
80: Just Like Everything in Programming

Mobile Couch

Play Episode Listen Later Apr 3, 2016 47:30


Many developers work with things like views and view controllers, but might not have any idea about how these things all fit together. Ben introduces Jelly to the Model-View-Controller pattern, and explains what each part of this concept is and how they come together to make an app work.

Kodsnack
Kodsnack 146 - Model-view-controller i kaffekoppen

Kodsnack

Play Episode Listen Later Mar 8, 2016 68:44


Fredrik snackar med Erik Svedäng, en av skaparna av kodäventyret else Heart.Break(), om just else Heart.Break(). Vad spelet är, hur det kom till och allting runtomkring. Inga spoilers. Lite om hur gemenskapen kring indiespel ser ut. Ett stort tack till Cloudnet som sponsrar vår VPS! Har du kommentarer, frågor eller tips? Vi är @kodsnack, @tobiashieta, @isallmaroon och @bjoreman på Twitter, har en sida på Facebook och epostas på info@kodsnack.se om du vill skriva längre. Vi läser allt som skickas. Gillar du Kodsnack får du hemskt gärna recensera oss i iTunes! Länkar Erik Svedäng CIGG - Consortium of independent game developers in Gothenburg else Heart.Break() Niklas Åkerblad - koncept, animation och 3D Oscar Rydelius - ljud Johannes Gotlén Tron: evolution - ett spel vars framtoning inspirerade Erik Hack ‘n’ slash Notch - mannen bakom Minecraft ox10c - ymdskeppsspelet Notch påbörjade och lade ner Halting problem - problemet att avgöra om ett program kommer att avslutas eller köra för evigt Skyrim Kartan Niklas ritade vid projektets start (skall beundras i så stort format som möjligt!) Language implementation patterns Structure and interpretation of computer programs Erlang Unity - spelmotor Sprak på Github - programmeringsspråket som används i spelet Green thread Eva Wieselgrens första och andra inlägg om else Heart.Break() Det påbörjade Unix-operativsystemet inuti spelet Secret arcade jam Blueberry garden - Eriks första spel Grapefrukt-Martin och Twofold No more Sweden - gamejam arrangerat av Erik och Martin Indiespel GBG på Facebook Titlar En simluerad värld Väldigt inspirerad av Göteborg En Tolkien-grej att göra Vi ville bygga en stor plats Vi simulerar hela världen i bakgrunden På engelska låter allting coolt Om muggen kraschar Model-view-controller i kaffekoppen Spelet klarar sig själv Global copy-paste för ditt liv

Fragmented - Android Developer Podcast
011: The Fowler Road to a Clean Architecture

Fragmented - Android Developer Podcast

Play Episode Listen Later Jul 14, 2015 67:21


In this episode - Donn and Kaushik dive into a topic that is very near and dear their hearts - application architecture. They talk about how Martin Fowler has inspired a lot of their architectural decisions and how they're moving towards defining what a clean architecture means to them and other developers. They talk about Model View Presenter, Model View Controller and many other topics that surround these two common patterns. Take a listen and go for the ride on architecture train ... all aboard!

Between | Screens Podcast
Darren Jones | Sinatra | MVC basics | MVC in Sinatra | Model | View | Controller

Between | Screens Podcast

Play Episode Listen Later Dec 10, 2014 11:02


Show notes: http://betweenscreens.fm/episodes/15

PHP Town Hall
Episode 29: Dont Mention PHP 6 v PHP 7

PHP Town Hall

Play Episode Listen Later Jul 30, 2014 79:35


This week Ben and Phil are joined by long distance target shooter Paul M. Jones and the handsome man that is Daniel Lowrey, to talk about a whole bunch of PHP relating things. Paul has recently been talking a lot about “Action Domain Responder” which is billed as a more representative replacement of the often mis-used “Model View Controller” architecture. Luckily he does a good job of ELI5 so we don’t get too lost, and we talk a bit about how ADR helps with putting content negotiation in a logical place. Daniel then goes on to talk about a few awesome topics, including some of the OpenSSL changes in 5.6, and a HTTP server he is working on built entirely from PHP. It’s async, non-blocking and web-scale. We cover HTTP 2 and its effect on PHP, give some thoughts on PSR-7 HTTP Message, talk about Aura and finally when Phil could hold it no more, we had a big rant about PHP 6 v PHP 7 which - at the time - was still being voted on. The end result is of course that PHP 7 won. I know I said no further comment, but I’m definitely gonna keep posting funny shit I see about this. Article 1. pic.twitter.com/cznAZLKiSd— Phil Sturgeon (@philsturgeon) July 30, 2014 Anyway. Here are a few extra links. PHP RFC: Improved TLS Defaults PHP RFC: TLS Peer Verification Aura PHP Components Modernize Your Legacy PHP Application The PHP League Mailing List

Devchat.tv Master Feed
037 iPhreaks Show – MVC

Devchat.tv Master Feed

Play Episode Listen Later Jan 9, 2014 47:04


Panel Jaim Zuber (twitter Sharp Five Software) Pete Hodgson (twitter github blog) Charles Max Wood (twitter github Teach Me To Code Rails Ramp Up) Ben Scheirman (twitter github blog NSSreencast) Discussion 01:32 - Model View Controller (MVC) and Model View Presenter (MVP) Ruby on Rails Model View ViewModel (MVVM) MFC Knockout.js 14:20 - Implementing MVC in iOS Apps 16:46 - Designing Models Alistair Cockburn: Hexagonal Architecture Domain-Driven Design: Tackling Complexity in the Heart of Software by Eric Evans Ruby Rogues Episode #78: Hexagonal Rails with Matt Wynne and Kevin Rutherford Ruby Rogues Episode #61: Domain Driven Design (DDD) with David Laribee 28:32 - Models and the Controller Notifications 31:00 - Key-Value Observing (KVO) 35:48 - Delegates and Blocks Picks Mattt Thompson: Key-Value Observing (Pete) Alistair Cockburn: Hexagonal Architecture (Pete) Saul Mora - Design Patterns for Mobile Apps (Pete) New Spring: The Novel (Wheel of Time) by Robert Jordan (Chuck) Freelancing Q&A (Chuck) Next Week OS X Transcript PETE: I can’t believe I beat Ben Scheirman today. CHUCK: With a stick? PETE: No, he’s in the wrong state for that. CHUCK: Hey everybody and welcome to episode 37 of the iPhreaks Show. This week on our panel we have Jaim Zuber. JAIM: Hello from Minneapolis, where it’s a balmy 4°. CHUCK: Pete Hodgson. PETE: You just totally stole my thunder. I was going to complain about being cold in San Francisco, but it’s a lot warmer than that. Hello from not-so-frigid San Francisco. CHUCK: How cold is it in San Francisco? PETE: [Chuckles] Like, 32°. I don’t know, it feels like it’s freezing, but it’s probably not even 32°. Probably warmer than that, just cold for San Francisco. CHUCK: Charles Max Wood from DevChat.tv and it’s also 4° here. PETE: Okay, I’ll stop complaining. JAIM: Really? Or is it just dry cold? CHUCK: Yeah, it’s just dry cold here, too. We did get some snow. JAIM: There we go. PETE: It all makes sense now. JAIM: A little bit nicer. CHUCK: Yeah. Gives you something to do – go shovel snow, go skiing – we’re making people jealous now, I'm sure. PETE: I think I've been here once in San Francisco when it snowed, and it was like two or three flakes on the top of Twin Peaks, which is like the only really tall bit of San Francisco, and people drove their cars up there in the middle of the night to see these snowflakes fall [chuckles]. But it wasn’t like snowball fights; it was like four snowflakes. It was really exciting; it made my year. No skiing that year for us at San Francisco. CHUCK: Oh, come on. Alright. Anyway, so today on our [inaudible] we have MVC. JAIM: Alright, we’re talking MVC – an MVC extravaganza of sorts, I think. CHUCK: Yup. [Chuckles] PETE: Maybe we should start off with a definition. CHUCK: [Chuckles] A definition. Thanks, Josh. JAIM: That might take the entire episode, I think. PETE: With MVC, I always get really confused. So I know what MVC stands for: Model-View-Controller. And I kind of understand the principles quite well. But what I don’t get is the difference between MVC and MVP, and then it gets really confusing when you start talking about some of the other things out there. This is a long shot. Do either of you two know the difference between MVC and MVP? Because I definitely could not answer that if I have to save my life. CHUCK: I have a very vague idea of what it means, so I'm not even going to venture to try because I’ll probably get it wrong. One thing that I can say, though is that I've come to iOS programming from a very strong Rails background, and MVC in Rails and MVC in iOS are not the same. JAIM: Yup. CHUCK: I tend to think of iOS as more of an MVVM, because –. JAIM: I forgot about that one. CHUCK: The controller acts more like a view model or a view controller than it does, you know, a full-on controller.

The iPhreaks Show
037 iPhreaks Show – MVC

The iPhreaks Show

Play Episode Listen Later Jan 9, 2014 47:04


Panel Jaim Zuber (twitter Sharp Five Software) Pete Hodgson (twitter github blog) Charles Max Wood (twitter github Teach Me To Code Rails Ramp Up) Ben Scheirman (twitter github blog NSSreencast) Discussion 01:32 - Model View Controller (MVC) and Model View Presenter (MVP) Ruby on Rails Model View ViewModel (MVVM) MFC Knockout.js 14:20 - Implementing MVC in iOS Apps 16:46 - Designing Models Alistair Cockburn: Hexagonal Architecture Domain-Driven Design: Tackling Complexity in the Heart of Software by Eric Evans Ruby Rogues Episode #78: Hexagonal Rails with Matt Wynne and Kevin Rutherford Ruby Rogues Episode #61: Domain Driven Design (DDD) with David Laribee 28:32 - Models and the Controller Notifications 31:00 - Key-Value Observing (KVO) 35:48 - Delegates and Blocks Picks Mattt Thompson: Key-Value Observing (Pete) Alistair Cockburn: Hexagonal Architecture (Pete) Saul Mora - Design Patterns for Mobile Apps (Pete) New Spring: The Novel (Wheel of Time) by Robert Jordan (Chuck) Freelancing Q&A (Chuck) Next Week OS X Transcript PETE: I can't believe I beat Ben Scheirman today. CHUCK: With a stick? PETE: No, he's in the wrong state for that. CHUCK: Hey everybody and welcome to episode 37 of the iPhreaks Show. This week on our panel we have Jaim Zuber. JAIM: Hello from Minneapolis, where it's a balmy 4°. CHUCK: Pete Hodgson. PETE: You just totally stole my thunder. I was going to complain about being cold in San Francisco, but it's a lot warmer than that. Hello from not-so-frigid San Francisco. CHUCK: How cold is it in San Francisco? PETE: [Chuckles] Like, 32°. I don't know, it feels like it's freezing, but it's probably not even 32°. Probably warmer than that, just cold for San Francisco. CHUCK: Charles Max Wood from DevChat.tv and it's also 4° here. PETE: Okay, I'll stop complaining. JAIM: Really? Or is it just dry cold? CHUCK: Yeah, it's just dry cold here, too. We did get some snow. JAIM: There we go. PETE: It all makes sense now. JAIM: A little bit nicer. CHUCK: Yeah. Gives you something to do – go shovel snow, go skiing – we're making people jealous now, I'm sure. PETE: I think I've been here once in San Francisco when it snowed, and it was like two or three flakes on the top of Twin Peaks, which is like the only really tall bit of San Francisco, and people drove their cars up there in the middle of the night to see these snowflakes fall [chuckles]. But it wasn't like snowball fights; it was like four snowflakes. It was really exciting; it made my year. No skiing that year for us at San Francisco. CHUCK: Oh, come on. Alright. Anyway, so today on our [inaudible] we have MVC. JAIM: Alright, we're talking MVC – an MVC extravaganza of sorts, I think. CHUCK: Yup. [Chuckles] PETE: Maybe we should start off with a definition. CHUCK: [Chuckles] A definition. Thanks, Josh. JAIM: That might take the entire episode, I think. PETE: With MVC, I always get really confused. So I know what MVC stands for: Model-View-Controller. And I kind of understand the principles quite well. But what I don't get is the difference between MVC and MVP, and then it gets really confusing when you start talking about some of the other things out there. This is a long shot. Do either of you two know the difference between MVC and MVP? Because I definitely could not answer that if I have to save my life. CHUCK: I have a very vague idea of what it means, so I'm not even going to venture to try because I'll probably get it wrong. One thing that I can say, though is that I've come to iOS programming from a very strong Rails background, and MVC in Rails and MVC in iOS are not the same. JAIM: Yup. CHUCK: I tend to think of iOS as more of an MVVM, because –. JAIM: I forgot about that one. CHUCK: The controller acts more like a view model or a view controller than it does, you know, a full-on controller.

FileMaker Talk - Just talking about FileMaker
Court Bowman talks about ccPivot 2.0 and MVC Development

FileMaker Talk - Just talking about FileMaker

Play Episode Listen Later Mar 1, 2013 60:17


Matt and Court talk for an hour about the new features of the amazing ccPivot solution from Cleveland Consulting, and get into the MVC model (Model-View-Controller)

Java Pub House
Episode 12. Giving the Model a Controlling View (The Model-View-Controller pattern)

Java Pub House

Play Episode Listen Later Jan 5, 2012 35:35


In this podcast we talk about the Model-View-Controller pattern (and is prettier cousin, the Model-View-Presenter), and go over how to go about implementing the MVC/MVP Pattern (really, what to instantiate first, and how to wire the whole thing). We also cover the caveats of implementing the MVC, including escaped references in construction, and making the view alway update from the model state. Lastly we talk about where to store view information (such as window size and colors, etc. Hint: not in the model). In all, if you ever needed to touch MVC code, this will help you light the path to awesome interaction! (and ease of unit testing) http://googletesting.blogspot.com/2009/02/with-all-sport-drug-scandals-of-late.html(Google reference to the MVP pattern) Questions, feedback or comments! comments@javapubhouse.com Subscribe to our podcast! (http://javapubhouse.libsyn.com/rss) ITunes link (http://itunes.apple.com/us/podcast/java-pub-house/id467641329) Java 7 Recipes book! (http://www.amazon.com/Java-7-Recipes-Problem-Solution-Approach/dp/1430240563)

Programmeren 2
GUIs en events

Programmeren 2

Play Episode Listen Later Aug 4, 2011


Grafische componenten; Java GUI toolkits (AWT en Swing); aansturing door events; events afhandeling; observer patroon; Model-View-Controller patroon

Devchat.tv Master Feed
002 RC Model View Controller (MVC)

Devchat.tv Master Feed

Play Episode Listen Later Mar 18, 2011 10:24


This is a brief explanation of how Rails implements the MVC design pattern to create such an awesome framework for building websites. In a nutshell, when a request comes to a Ruby on Rails website, it's handed the dispatcher. The dispatcher consults the routes provided in the application to determine which Controller and action to pass the request to. A Controller is a class which has methods called actions on it. The request is handled by a particular action on a controller. The Controller may then respond by gathering data from the database through the Models. I can then convert the Models' data into text or pass it to a template called a View to return the response. Most HTML responses (web pages) are returned by rendering Model data in a View. Download this Episode

Rails Coach
002 RC Model View Controller (MVC)

Rails Coach

Play Episode Listen Later Mar 18, 2011 10:24


Developing Apps for iOS (HD)
1. Introduction to Cocoa Touch, Objective-C, Tools, and MVC (September 21, 2010) - HD

Developing Apps for iOS (HD)

Play Episode Listen Later Sep 28, 2010 47:50


Paul Hegarty starts the quarter with an introduction to Cocoa Touch, Objective-C, and the Model-View-Controller concept. (September 21, 2010)

Developing Apps for iOS (SD)
1. Introduction to Cocoa Touch, Objective-C, Tools, and MVC (September 21, 2010) - SD

Developing Apps for iOS (SD)

Play Episode Listen Later Sep 28, 2010 47:50


Paul Hegarty starts the quarter with an introduction to Cocoa Touch, Objective-C, and the Model-View-Controller concept. (September 21, 2010)

Intertech Oxygen Blast .NET, Java, and XML Presentations

Understand the whys and hows behind the ASP.NET MVC Intertech's Oxygen Blast Podcasts include coverage of Java, .NET, XML, and all that is software development.

Intertech Oxygen Blast .NET, Java, and XML Presentations

Understand the whys and hows behind the ASP.NET MVC Intertech's Oxygen Blast Podcasts include coverage of Java, .NET, XML, and all that is software development.

iPhone Application Development (Winter 2010)
6. Designing iPhone Applications, Model-View-Controller, View Controllers (January 21, 2010)

iPhone Application Development (Winter 2010)

Play Episode Listen Later Jan 25, 2010 49:53


Alan Cannistraro discusses designing iPhone applications, why the MVC model should be used and how to implement it, and ends with view controllers. (January 21, 2010)

iPhone Application Development (Winter 2010)
4. Building an Application; Model, View, Controller; Nib Files; Controls and Target-Action (January 14, 2010)

iPhone Application Development (Winter 2010)

Play Episode Listen Later Jan 20, 2010 55:44


Alan Cannistraro covers the application lifecycle, MVC design, Interface Builder and Nib files, control and target-action; and demonstrates HelloPoly. (January 14, 2010)

Hanselminutes - Fresh Talk and Tech for Developers
ASP.NET Model View Controller, MVCContrib and MonoRail

Hanselminutes - Fresh Talk and Tech for Developers

Play Episode Listen Later May 2, 2008 27:14


Scott sits down with Phil Haack, ASP.NET Microsoft PM, Dru Sellers, Contributor to the Castle Project, and Jeffrey Palermo, of the MVCContrib project and talks about the ASP.NET MVC Project and Microsoft's changing attitudes towards Open Source.

Mensch-Maschine-Interaktion - WiSe 2006 / 2007
Implementing Interactive Systems I

Mensch-Maschine-Interaktion - WiSe 2006 / 2007

Play Episode Listen Later Jan 17, 2007 89:42


.NET Rocks!
Phil Haack on Model View Controller

.NET Rocks!

Play Episode Listen Later Jan 1, 1970 60:24


Phil Haack from Microsoft catches us up on his latest goings-on in The Collective, and talks about the ASP.NET MVC Framework.Support this podcast at — https://redcircle.com/net-rocks/donations