8 Burst results for "Martin Fowler"
Talk Python To Me
"martin fowler" Discussed on Talk Python To Me
"You could also do. Just pick one way that seems right at the time. Spend a week on it. If it's not work, if it's not working, it'll refactor to the other, or even throw it away, go the other option. There's a lot of people kind of stuck. And I think embracing the idea of refactoring. Maybe not in the traditional by hand effect of Martin Fowler's original book, but we have tools that do a lot of this automatically or almost right click and ask it to. What are your thoughts? I definitely think people should at least catch the zen of it if not go through the book because the tools will take care of it. Yeah, you still want to know the concepts here. The different techniques has already highlighted the extract method, for example, grouping, comes into enums we have mentioned before. So a lot of actually what we've spoken about so far can be found in this book as well, right? And I think overall the goal of refactoring is to keep that technical depth in check, right? So avoid suffer a rot, they also say. And yeah, as you start to add more code and cover more scenarios and the always changing requirements inevitably what happens. You kind of need to learn. You thought it was one thing, but as you got further into it, you're like, you know, that part's actually that's where the problem is. I didn't think so. But now I know because that's where it's hard, right? As you go. That's a good point. But the people who are stuck, I don't think they internalize that the only way to know where you're going to get stuck further down the road is to go down the road. You can't think about it very well. There are a couple of interesting comments here. With respect to guarding clauses, Alvaro says, you could go and put a search statement at the beginning of functions to indicate some of the assumptions that could be disabled and production and give nice errors on high price. So I test rather. Yeah? Possible. What do you think, bob? Yeah, it starts our grade, but yeah, that's happy that you highlight the caveat that they can be disabled. So you can not always rely on them. I definitely see a place for asserts. And of course, you use them in python all the time to assert different ways your function performs. Yeah. I use most me asserts in python. But I can definitely see a place for this scenario that albero highlights. And then Brandon Natalia has a very realistic problem that people run into is I worked a lot of places where they don't give you the time to do the refactoring and make things better. And so it just builds up until it becomes not ideal as his second comment here implies. That's a good point. That is a real problem. And I'll tell you how I solved it. Bob and maybe we're getting short on time, but you could tell me real quick. How you solved it? For me, when my managers and folks would say, Michael, what is your estimate for how long this is going to take? If I thought I was going to take 5 hours, but maybe I would need to do an hour or two over refactoring. This feature took 7 hours. Do you want it done? It's going to take 7 hours. Because if I'm going to do it, I'm going to do it right because I'm going to have to work on it afterwards. I know it's just going to get worse if I. So I wouldn't exactly lie to them, but I would include the time to make it right, not just make it work. As part of my estimate. Yeah, maybe even double it, right? Because there's the initial version and there's the testing. There's the documentation. There are bug fixes. There are inevitably are requirement changes in the spread meetings. So 5 hours might just be that initial draft almost, but maybe it should then be ten hours, yeah. Yeah, perhaps. But whatever it is, clean code should be part of the deliverable. In my opinion. And it should be part of the estimate. Estimate times three plus two weeks. That's a nice one. Exactly. It is a good one. Very good. All right. Well, we're getting short on time here. Let me do so I want to do some of this kind of different bump. Because I think this is actually, let me share a different thing here. I think that this is something people are going to have to start thinking about as well as maybe an option here. So what about asking AI assistance? Things like Google co-pilot or chat GOP. There might be some cases where people say, here's my code. Hey, could you make it better? So for example, let's do this to close out the show. Okay, bob. Sure. How can we write clean code in python? I'm going to ask you, we have already already covered this. Are you sharing those? Hold on, I thought so. I did, I forgot to add stream. So I'm going to ask chat CP here. And what else does it say? So I gave it all of your tips. And I said, we already discussed that. What else can we do? Paste in the article, as well? No, I didn't give it the article. Just the headings. So it says you can document your code. Keep it simple, which it didn't understand. Follow pep 8. This is an interesting one. Exceptions are for error handling. So anyway, I just thought it might be kind of fun to think about could we ask these things to help us and improve our code? I don't know if you played with any of this, but it could be fine. I have not yet. That's Julian's department. He's giggling. Eking out over the tool, but I'm having on my high on my list to try it out because it's really mind-blowing but what this tool is doing. Yeah.
Talk Python To Me
"martin fowler" Discussed on Talk Python To Me
"Learn more and get started by visiting talk python FM, slash tie pie that's Tai PY. The links in your show notes. Thank you to tie pie for sponsoring the show. And it's right functions that are ten line ten, ten lines long, not a hundred lines long. Now, I like to hear your thoughts on this, but my feeling about all of this stuff is as a general rule this is what you should do. There will be situations where you might, you know, this is just, I can't think of something better or it's way over the top to try to adhere to all of these rules within the small context. I could tell you on the talk python training website, there's a couple of places where it's like 75, 80, 90, lines of code for a single function, just like this is so bad. I wish it wasn't like this, but it's just weirdly unique and but there's, you know, 19,000 other lines of code that are all three lines, 5 lines, type of thing, right? So it's for me, at least this isn't a 100% or you're doing it wrong. It's 98% or 95% of the time. You should be doing this that are maybe some weird case and how do you feel about that in general on these topics? Yeah, as I said before, sometimes you just don't get the resilience and design right from the start. So inevitably you're going to write some longer classes or functions. But then when you break them out and smaller units, the other thing you have to say about that is it gives you an opportunity to do better documents because in this example, if you break this lung function that's doing three things out into three separate functions, parse CSV, build up list, bad name, but you get the point. And print results, then all of a sudden we have three units now and every unit has a name. Hence when you go back after a year and look at that code, which always happens, and you always wonder. How about the heck was I thinking? Now you had a glance just by looking at the function numbers. You have just already a better idea dysfunction. You can give duck strings as well. So at a glance, you have just a much easier time figuring out what this was about. Yeah, I appreciate you actually gave a shout out to me in this first piece here, which I didn't expect, but one of my rules, I see in this article you referenced Martin Fowler's refactoring book. And one of the most important things that came out of that is not all the refactorings, but this idea of code smells, right? And maybe tell people real quick about code smells. Yeah, that's a funny name, right? Code smell. I hope that is smelling and analogy. I came up with. But yeah, basically, it's code that's not following these best practices. And it's just not maintainable, not easy to extend going back to these principles we mentioned. So yeah, not following these guidelines that code can be smelly. It can be as code smell. Well, the idea is it's not actually not working. It's just not nice. You know, you kind of turn your nose up at it when you see it, but you can't say it's broken because it is working. But it's a good point. It smells a little bit off, right? It's not quite broken code, but it's sour. I don't know. And so the reason I bring this up is one of my rules of thumb here that I love. And I think you're kind of hinting that with this little shout out that you gave me in this article is when we come across these code smells often, especially when you're earlier in your career, often the reaction or the first thought is, you know, this part is not nice. This part is complicated. This part is hard to maintain or hard to understand. So I need to put a nice comment. I've been told, comment your code, don't be a jerk, comment it. So I'm going to put a big comment that describes why it's really bad. And all that. And in the code smells sort of world. These code comments can be seen as deodorant for the smell. Like it doesn't remove the smell, but it kind of obscures it's not as bad if you saw the comments saying why the code that follows is bad, but maybe you could just make it not need a comment and a lot of times you just said that's, well, these 5 lines of code need an explanation because they're mixed in with all this. But if they had a function that had a name whose name was basically the comment, well then you don't need a comment because the name is the comet and it's now small and understandable, right? Like there's a lot of these little iterative things that go on. Exactly. Yeah, that's a great point and it's very easy to make that refactoring just turn the comment into a function and we have created another unit we can extend, we can test, et cetera. So yeah, it's interesting because there are kind of mixed feelings about commands. Some people say ferocious commander code but mostly in their literature literature I'm reading that commands are actually not that good and sometimes even labeled as a code smell in the sense that your code should be kind intuitive. I think it's going back to that half of the time when people are actually putting those comments. It's because there's something kind of messy and they're trying to help you get over that mess or deal with that mess. Right. Rather than just fixing the mess, you know? Yeah, it might be an indication of a bad design, right? Yes, exactly. You might even have to go back to the drawing board. Yeah. But that said, I definitely see a place for commands where sometimes you just want to remind yourself. And of course, you're a team members, not what to code is. They can read the code, obviously, but why you took that decision, but there might just be some extra context that you need to give. Yeah. And that's also different than Doc strings, potentially. Which is kind of a form of a comment, but it's meant to talk about the API and not cover up some weird thing you had to do in the middle. Exactly. Yeah, docstrings are basically your API documentation. Yeah. Exactly. All right, well, good stuff, I mean. Even GitHub co-pilot and those things are starting to use these comments as a way to say, well, I'll just make a function that kind of is named what the comment is.
"martin fowler" Discussed on Code Story
"The process they are responsible for. So in terms of the overall company, I think it's really the team that we've built a really strong engineering team with great engineering culture, and that is a small amount me and a lot of the teams efforts to find the right people and to build the right cultures. So I'm pretty proud about that as well. Well, let's flip the script a little bit. So tell me about a mistake you made and how you and your team responded to it. A lot of mistakes that I come to mind. And I think that you're never going to get everything right, especially not the first time as an engineer as a leader as a person in general. So there's a lot of mistakes that I had made in architecture and code and hiring even the key to me about how your team responds to when you do make mistakes as a leader is that you have to take ownership of the mistakes and be transparent with the team and then come with the plan to resolve it. You know, as the leader, the team is looking for you to set out a course to resolve whatever the issue is. They're not looking for you to be perfect, but they do want you to be authentic and I found that as long as I'm upfront and I say, you know, I made this mistake or I made this decision and it was not the right decision. The team is supportive and will help develop a plan to fix it. Well, what does the future look like for the product and for your team? Yeah, we're growing really quickly. We've more than doubled the product and engineering team in the last year. We expect to see growth across the whole organization this year. Today, we're supporting shopping for insurance, plan discovery, and administration of policies, which is actually pretty big surface area to cover. So a lot of the expansion for the company is just in more of these integrations, deeper integrations, supporting more functionality within those integrations. But one area in particular that we're pretty excited about is insights into usage of a user's policy. So this is knowing how much is left on your deductible and being able to surface that through different tools that a user might interact with or someday maybe a little further down the line claims and the status of different claims. So some pretty interesting user experiences that our customers can ultimately build on top of that kind of data. Let's switch to you, Dan. Who influences the way that you work? You name a CEO, CTO and Arctic really any person that you look up to and why? From an engineering perspective, there are sort of the usual suspects, the Martin Fowler's Kent becks kind of of the world that I've spent fair amount of time reading what they write and use that to influence kind of design. But from the real world perspective, I think my biggest influence is the CTO group that peer group through a company called then wise, it's based in New York. Never really great program where we meet every other week anywhere between 6 and ten CTOs in similar stage companies and you just kind of talk about problems you're having, get advice from peers. One of the things in any sort of leadership position that's challenging is you don't always have a peer inside your organization to bounce ideas off of people are looking to you for the answers. It's a great way to get feedback and get ideas from people who are in a simpler situation. So, okay, we talked about a mistake, right? But a little bit different spin. If you could go back to the beginning, what would you do differently? Or where would you consider taking a different approach? From a product perspective, there's not one big obvious thing that stands out. To me, there are lots of little things that we double down on the wrong feature at the wrong, the wrong time or it wasn't the right feature to begin with. There's a lot of little stuff like that. But I think the bigger change I would make is in the way we approach product marketing early on. We were very technology focused and the thing that I've learned in building very Cred is that the way you talk about the technology is just about as important as how well it works. So I think we would have focused more heavily on product marketing sales enablement earlier in the company's journey. Okay, Dan, last question. So you're getting on a plane and you're sitting next to a young entrepreneur who's built the next big thing. The jazz about it, they can't wait to show it off to the world. Can't wait to show it off to you right there on the plane. What advice do you give that person, having gone down this road a bit? For someone just getting started, I think the best advice is to stay really close to your potential customers so you can really understand what their pain points are and what the problem that you're solving is. Because they won't always be able to tell you exactly what it is and you learn a lot by observing them. And trying to get to the underlying issue without necessarily doing exactly what they've asked for. And I think that's trying to do that as far into the growth of the company as you can. At some point, it becomes harder and harder as a company gets bigger, you get more customers, it's hard to spend a lot of time with each individual one. But try to retain some of that because really.
"martin fowler" Discussed on Code Story
"Was when we were required. So everything is growing in our good people in the team and we are by the way all remote companies. So we have engineering, engineer in Germany, developer advocates, teaming UK social architects in the UK and U.S. and engineers in the U.S. and Israel. And product manager has seen both you as an eastern. So we're all abroad. All across. And our next steps in the product is one always be the leader in infrastructure as code security. Two, start handling every other piece of the supply chain of your software. So from scanning only infrastructure code, we are have evolved to also scan open-source vulnerabilities and also see eyes, CDs, configuration, and essentially our goal is to map secure and fix every part of your supply chain. Knowing what's the best place to fix and what's the best fix out there for your code at any step of your pipeline from ID to ci CD version control systems, mission controllers, and runtime. Barack I'm curious, how does bridge crew contribute to improving security around the supply chain? It's obviously an important topic nowadays with a lot of the supply chain issues going on and things out there that you read the news. How does bridge crew really contribute to positively affecting supply chain security? I think that first it is important to mention how do we define supply chain of software. Supply chain software is of the different building blocks that we lead you as a developer team leader. To bring product from inception from the deck phase to a production environment. And that supply chain includes the building blocks of open-source packages. Infrastructure is code, DevOps pipeline, version control system configuration. Docker images and the list goes on. Our software today is built from so many pieces of puzzle. That we really need to invest in every piece of that platform to have a complete picture of a product. And attackers today can utilize different parts of our supply chain. To create a mail function in our product. So if our product was a car, some of our suppliers were suppliers of wheels of engines of electronics. And each one of those suppliers could have created a very bad driving experience for me. And the user. Could have been also a security about a security experience as a driver. Or a passenger. And in software, it's kind of similar. I can have misconfigured pipeline that does not have a secret storage, for example. So my secrets to production environmental gave the pipeline admin access can actually leak into unwanted places to bad actors. And also, my pipelines can have bad defaults in the infrastructure as code or bad packages being used in the pipeline. And we actually have seen a tax like that in the past year. For example, we code call was a famous breach of 2020. Where every code repository out there that used code code, which is a popular tool for code coverage, and did not have a signed artifact of code code. Possibly had a malicious library injected into their pipeline and linking some of the codes or secrets that exist in that pipeline. Cold call have reacted fast and have resolved in patch these issue. But it made all of us security practitioners DevOps practitioners, DevOps practitioners, ask if our pipelines architecture is defined correctly. If the networking we defined correctly is the packages defined correctly. In the pipeline configurations and what bridge crew is introducing these days is a new way to explore every asset of your supply chain in a visualization that allows you to research what are the security risks, enemies configuration in every step of the way. Let's switch to you, Brock. Who influences the way that you work? Name a CEO, a CTO, an architect, really any person that you look up to and why. There are people who have worked with the first one was the first architect of fort skit, the previous startup that I used to work with. His name is gosh, Hasan. And he really taught me how to learn better. So I thought that I knew a lot about software engineering. And he really taught me of if there is something that I don't know or Google doesn't know. What's the best way to approach the research of a new capability that is not documented yet? How to test my code better and how to gradually deploy a software in small chunks that are that can be easily consumed by other team members. And I think that the second architect that most influenced my thought process is Martin Fowler, I have never met him in life, but he has an amazing blog. And amazing, amazing set of webinars. Did I really recommend this as a place to start reading about software architecture and the different advantages of different types of architectures? Well, we talked about a mistake, but a little bit different spin. If you could go back to the beginning, what would you do differently or where would you consider taking a different approach? Think I think that what we what we didn't know at the beginning was how aggressive would be the open-source. Adoption of the tool that we've developed. And it grew really, really fast. And we haven't anticipated it, and we haven't we could have done better work in leading those initial community users to contribute more code. We.
Talk Python To Me
"martin fowler" Discussed on Talk Python To Me
"Yeah. But it also has the mapper registry mapped on it, which is interesting. It has some of its table metadata has not just the table name, but all the calls of information as well. It's interesting, it does have the same type declaration that I was trying to impose upon the traditional SQLAlchemy models. Yeah. That's one form of the data class model. If you scroll down the more inline, embedded one is there. Let me see if that's what it is. Yeah, that's the one that's even crazier, which the data class fields. So you're probably a data class as far as what your IDE sees. But then you have the SQL and the mapping stuff inside. So all of this is, well, it'll time will tell which approach becomes popular one. Yeah. Or people just use SQL model because the people that like data classes are tend to be using SQL novel at pediatric anyway. Maybe they'll just be there. I don't really know. I'm gonna talk to Sebastian Ramirez. Maybe in December or January about SQL model. Google model is interesting because it basically takes identic models and SQLAlchemy and merges them together. And Sebastian has a good feel for what a nice API looks like. So I'm optimistic for this. I haven't done anything with it, but it does look pretty neat. What he had to do was he had to modify identic space class. Because when I first looks, the man may be in this past year, about SQLAlchemy without having two separate models. I was like, okay, this bas class has got a whole thing. A lot of things going on that don't work with python descriptors. So we'd have to change. And I think Sebastian did that basically went in and changed how the network so that it's compatible in more power to them. Too. Awesome. Yeah. I have enough to work on. This is like too much for me to also work on dancing with someone else. Yeah, absolutely. Absolutely. One more philosophy thing that is not it is the one. One more philosophy thing that I want to ask about or let you just speak to because this is a key element of how SQLAlchemy works. There's other worms that work this way. And then there's also this one, I think it's called Django. People might have used a Django or before. That one is more of a traditional Ruby on Rails active record, where I have a thing, and I call save on it. Sure. You went with a thing called unit of work, which is a little more transactional, like I'm going to do a bunch of stuff and then all together, it happens. Maybe just speak to that real quick before we talk about you as well. When I was going to use SQLAlchemy, the main thing that I had worked on a lot at work was a lot of fancy selects. I hadn't done much work with the persistent side, but I read this book by Martin Fowler called patterns of enterprise architecture as well. It was quite an interesting book back then, yeah. And I had actually never, even though I had used hibernate, I had never heard of unit of work. And I was like, wow, that looks cool. I'm going to write that. Because one of the philosophies was like, insert update deletes are really boring. And even saying object that saved is really boring. Because I was working on a content management system for Major League Baseball. And when you work with CMS, do you have a lot of tree based hierarchical structures with lots of self referential stuff when you persist self referential structures to the database with autoimmune primary keys? You've got to get one row, get the primary key back, put it there, put it in everything's got to be done. It's so hard. Yeah, yeah. I tried to call save on this, but that didn't work because I needed to call say first there. And it's like, oh, this is crazy, right? So it's like, why would I want to do what I shouldn't have to do that either? I just had this thing that like, here's everything that transaction just push it, and it took it very long time to get it right. It has a couple of little chinks in the armor. A couple of cases that you might have to drop it to quality plus explicitly. But we never get bugs with the unit of work stuff. I had if you look at the unit of work PY, it hasn't changed in here. Yeah. It took a long time in the beginning and then I wrote it a few times and it was really bad early on. It was very hard to get it right for the summer. A lot of edge cases, right? I can imagine. Because people can do any sequence of things and then you have to make it right. Yeah, mostly that we support these joint table inheritance models were very hard for me to get my head around how to persist that and then just go along. It just took a long time because it grew organically. You know you're coding, you're doing. I'm glad you wrote that instead of me, so thank you. Yeah, I wouldn't be able to do it today. You gotta be deep in it, right? Comment from Brandon brainer. Hey, Brandon. I use SQL model in a demo project, and it was so easy to use. It's very nice. All right. So I think probably the big news over here is two O, or as you like to put it at your recent talk the 1.4 ending. Very early stages are on the site in the library tab as a development thing with development docs are nice. And the current release is a 1.41 .4. It has a lot of these features in there already, right? Yes, all of the just about everything in SQL and the two internally is available in 1.4. We did the hold the internals first and the end of the stuff so that 1.4 could be a transitional release so that all the behind the scenes would be getting tested and people could use the new APIs and transition over is too open to drop some of the older APIs hard. Many, yeah. Okay. Yeah, so people who have looked 1.4 has this big migration thing where if you're on 1.3, which is pretty common, you can go to one at four pretty easily without much problems. But right, when you're on this thing, we had this whole thing that is inspired by the python two to three process, and at the same time tries to not make some of the what I thought were mistakes of the python two three process. So what this is based on is that one type four has an environment variable you can turn on in your console, whatever, a cold SQL can be worn too well, something like that. And when you turn that on, you're now in warnings mode. You will get all kinds of warnings about all kinds of APIs that either have changed or are going away or use this order that one. So a lot has happened, but at the same time, the reason that's maybe not as scary as you might think is that all the APIs that are being deprecated, our APIs that I've already taken out of the docs years ago, the APIs that I've been telling you for years don't do that anymore. We're not going to do that. So it's.
"martin fowler" Discussed on CodeNewbie
"And what are some good resources to get started to learn a little bit more, get more comfortable with the lingo, get more familiar with some of these concepts before jumping in? What are some good places to dig in a little bit? So what I can say is that Mark and faller from thought works would be a great source of inspiration about understanding all this virus types of testing, how they compared to each other. What's the true definition of let's say integration testing? What it means and how it applies. And there is a normal amount of knowledge in his blog, and I definitely recommend everyone who thinks that testing something they want to either learn about where they want to improve their knowledge about testing, my recommendation would be to go for Martin Fowler's blog. And tell me about test containers project, which is something that I believe you are a core maintainer of you and your cofounder build it together. Tell me more about this project. What is it and how might it help people with their testing? So, test containers that was project created by Richard nords, my cofounder and our CTR and start with a simple idea in order to add while he was working on Deloitte digital in order that there is quite some amount of repetitive actions that have required for the testing setup to be done among their customers. You start thinking what they can do to automate the test setup, because they have a test, but one big challenge of integration testing is how to start everything, how to configure your environment how to get the application under the test running how to get the system out of the test running. And back then, 6 years ago, docker was becoming more and more popular. And also people weren't ready to run docker in production yet as compared to today, more folks started relies in the okay. Docker is actually a great obstruction for setting up databases brokers, browsers and literally anything else that can run a docker container and you know where we need this the most testing. So that's what he did. He slides the idea of using docker for testing or setting up your test environment and fast forward to today. You changed how we test software, really, because before docker before test containers, it was common to assume that, okay, the best we can do is some unit testing and maybe tiny bit of integration testing, but then it would require us to install our databases on our developers machines and our CI environments and nobody really wanted to do that. So we knew that that's the right thing to do, integration testing, but we always had this feeling that yeah, it's the right thing to do, but I don't really want to do it because it takes a lot of effort and I would rather have a bright yet another feature that may or may not work. I don't know, I don't know because I'm not writing my tests. But with test containers, it becomes as true as just making sure that you have docker available. You have docker somewhere and docker becomes the only requirement for running integration tasks, and this dramatically improves the situation because it is much easier to convince someone to have docker and their machines as opposed to all this databases that needs to be writing on their computers. And that was 6 years ago and slightly less than one year since it started the project. I was working at zero turnaround depth to his company in Estonia and what kind of had our own task continuous button internally. We had the same idea what if we talked to docker directly from our test and I keep repeating this story, but I really like it. It has this amazing feature like a really really like this feature. It's one of the underappreciated features of GitHub is the networking mechanism where you look at some issue and you see references from some other issues. And this is how you discover other open-source projects. I have so many open-source projects that I'm using daily. Now, that I discard from GitHub just by looking at this references from other vehicles. And I was looking at one of such issues with docker and there was a reference to task containers and I was like, okay, I'm looking for a solution for my docker related problem for testing, and I see a reference to test containers. It does look like something I should check. And I checked it and I was so happy to discover a library because what it was doing is basically the same as what we created, but we created it internally and test containers was an open-source project, and a big fan of open-source. So a few days later, we started contributing to task containers and eventually just migrated fully to task containers. And I've been doing more and more contributions and Richard invited me to join him as a commenter and ever since then, we've been working together and later Kevin join us as well on this beautiful library and when you think about it, it never, ever ever changed since day one. It was always focused on one simple.
The Python Podcast.__init__
"martin fowler" Discussed on The Python Podcast.__init__
"Improvements. The it's the contrast with what's out there is so very close of things like same pipe bomb you can. It helps you to refactoring. You can kind of selective say extract method on this. If i know what i wanna do. Are these ideas that can kind of helped me that and streamline that process if you don't know what to do it's not so suggesting that so i suppose threes kind of suggesting fixes to you. You'd have to go in there. But like i want to do some refactoring now. It's like this natural flow. It's just little improvements. See how the class of tools out that things like lynching tools. Oh formatting thing we did as well limiting is often of picking out little not telling you how to fix them so i that becomes split the things you ignore. We kind of keep on. Pippi still have to manually go in and fix things said if it was. It's automatic whenever we suggests we know something we know what magic for. It's kind of speeding up. If i think back to when i was learning i didn't know the tha refactoring have concerts of rewriting cut to improve it. Initially i made after a year or two. Did i stop understand that. This was a possibility. I'm bad i have scout. Learn how to cyrus. Kent beck books. Martin fowler books when out manually learn how stable these things and i found that fascinating but took time with the to serie Give you these refactoring suggestions that teach you how to improve. Cutty got as well. So you need to not actually convey this. Because i will tell you you mentioned things like glinting and do things like extract a method and as you said there. Are things like lenders or there are tools like pipe bomb or rope. That allow you to manually say i want to do this refactoring when you know that. That's something that you want to do so source refits in this category of automated code review automated assistance kind of tools in there a number of other projects that have come out recently in the past few years to offer similar kinds of approaches. So i'm thinking things like kite by know that there are some other sort of automated review tools and automated sort of code completion where they will scan multiple open source. Repository is in use some of the patterns that they find their to suggest structures where the look on different sorts of key words or logical structure is and say you know. Here's a snippet that you might want to us to be able to perform this action that you're trying to achieve morning if you can give a bit of. A comparison of how sorcery fits within this broderick system of services that people might use to act as automatic assistance while they're programming and some of the differences in terms of the goals and priorities of what. You're building with sorcery versus what are available with these. Other systems is completion. Till's like you mentioned this kaya. We're aware of another couple by kc in top nine and all of those help as you're writing the code in the first place. So you're writing line of code. And now completes on floyd sites like your g mail erupting sentence g mouth suggests the rest of the sentence to eat these tools. Exactly the same except for with souls became difference between sorcery. These tight completion tools. Is they help you. Write the line of code. But you're working on sorcery understands the code that you've already written hombre rice it to improve the structure and improve quality as opposed to being during the codes writing off the eucharistic On it gives you the high quality care that lets you know code. Faster feature old detect bunks quicken feature. Improves the readability. The board arrested the completion asks. You don't care about the quality of the cuts that you're writing. They just care about what is the most likely rest of the line of code that you're working on a study that shows you spend maybe five percent of your time actually typing programming and like seventy time reading and trying to understand it so we're coming from the point of view of not trying to speed up typing but try and improve their ability to code taking gun make changes quickly later at readability is already focusing there are also classes of tools the particularly in python but also in other languages that serve to add things slake constraints to what the function is trying to do so like contract driven programming and then there's type in france and things like that and i'm curious how those types of information are able to feed into factoring decisions. That you're making sorcery we use within the Faces high which i really love became quite fond of strong typing when house think scarlet back in the day and wanted to find something so that the by the is really really exceptional. So in terms of the cut out that the majority of kites doesn't actually use hinson type information at the moment so we tend to the assumption. A bicycle of we analyzed one information available to us. So we try to analyze. It expects him at most veda however we do do some type inference within sorcery that helps us these types of refactoring carried hats type incident. And we'll his just more things to know if it had not talking to okay based in ten is definitely leads machines. Another interesting aspect of what you're building. It sorcery is that you both admitted that python is as you came to later in your career and having a much broader background in a number of other languages and i'm curious why you chose to focus on python as both the tool that. You're using to implement sorcery but also the primary language they are focusing on as far as the refactoring that you're providing and we'll your motivation for investing in python language for building your business on it. So interestingly enough it wasn't actually which was the first target for.
Inside iOS Dev
iOS Interview Questions For Senior Developers in 2020 Part 2
"And today's episode as part two to the previous episode about IOS interview questions for Senior Developers in two thousand twenty. The article that I wrote S- and this is the part two episode where I'm covering article so in this one. I'm going over questions next question. So we'll start with question number four. What is what is NBC? It's a very fundamental question again. Even though it's very basic question senior developers also need to know about and expected to give more detail on the show more depth of knowledge of such basic questions so NBC stands for Model View Controller. Software Design Pattern apple adopted. It came from small talk. Apple adopted its towards their own. Had has has its own reincarnation of it Model is responsible for data controller is responsible or views responsible rendering the dates and getting input from the user and control are supposed to glue views and models together right and be this coordinator control right at the end of the day. Apples flavor of it is More view skewed towards the view. That's why wouldn't really have controllers. Who Have you controllers what you should know? Besides there's this basics That that I just covered you also need to know and understand that model view controller. Nbc is not your application architecture. That's just a design pattern foot of you and if you want to architecture application especially architectures for scale you probably should go for something something else. Something with more flexibility. Something's more advanced at least. I'M VM MVP COORDINATOR. Design pattern or go for a heavy duty architectures such as viper and ribs but again as a as a senior developer. You should be aware of that so erratic flag that could raise here as well simply not knowing what an NBC is right. What what it stands for. And what that's fundamental Basic design pattern of APP Iowa's Apple Development in general I think they use it on all the platforms but nevertheless I again as I mentioned already as a senior. Dev rather the expectation is that you know. Other design patterns and architectures for further reading. Look at Apple. Apples article on their developer portal. It's called model dash view controller Then ABC's Dotto has a great article Cold lighter view controllers. It's from one of their previous issues of Went UP CIO. Had this Monthly I believe issue of their articles. Then there's another article on a con Lou con Lou. I think that's how I say it that come about massive you controller. Kennedy shoes with NBC. Another one is on a Napa soda actual this podcast inside. Iowa's Dev where and I covered the the issues with controller skull the problem with the problems with controllers another article you could read introduction to n. b. b. m. that's also obviously that article And then another episode of this podcast view models to the rescue As far as I recall Andrew in that episode. Goes over a great example of where? Mvp and could could save your bacon in the overblown view controller. Massive you controller code base and another article could read up on a model view presenter. It's MVP by Martin Fowler. It's on his website. March and following dot com. And as usual. You you'll find those links south. Put Him the Up put the link to the article in the show notes and they're in the further reading for that question. You can find links to those articles that I mentioned. The next question is number five. What do you know about? Singleton's where would you use one? And where would you not Singles Singleton Severi? It's very common design pattern. It'S CONSIDERED TO BE CO CORE. Competencies design pattern and it's used everywhere throughout all of the apple examples and They they actually utilizing soon bilton themselves in the API COCA API that they provide a four us. This jar short answer. Singleton Is a class that returns only one. And the same instance no matter how many times you requested what it really means at the end of the day that you have a type but say networking services and you implement a static or property rather. I think that's typically the implementation called shared or something like that instance and then in there you basically cash that instance the very first time. It's accessed you initials it and then you cash it and that's it. And then every other time when the in through that static property the instances rick. The SINGLETON has requested to return the same instance Singled and Sarah unfortunately anti pattern. They have a lot of issues with them and specifically they encourage global states. The they they really did. Sir and there are a lot of issues with dependency injection they. They really don't help at all with it. They make it more difficult. They you have to tie things to specific concrete types instead of relying and interfaces things like that so and in general even though apple promotes it. I do not recommend using singleton's and I know it's a it's a kind of a debatable topic if you will but there are a lot of prominent articles written about by prominence experienced developers Basically kind of debunking if you will the design pattern than explaining why. It's an anti pattern. So the Rad flak for this question as well you should actually know what a singleton the is and how to implement it and how to work with it even though it's a necessary and or unfortunate evil quite often and for further reading to to kind of get into the details of why. I'm saying it's an anti pattern. There are two resources you could go for. One is actually episode of this podcast. Called Y Singleton are evil and another one is actually similar styles. Single single are evil. It's by you can find this article on Viki Dot C two DOT com. They cover it more. They're in in more details in an an unwrap all the issues with singles. So the next questions number six. What's different between delegates and TV? Oh so this is a this is also quite common question on on. Irs INTERVIEWS THE DETAILED. Yar The cute. Let's let's start with What what is Ki? Ki Ki all right cave your sense. Four key valley observation so delicate design pattern and Kiva observation both are techniques for to establish relationships between objects and delegates establishes and declares using the delegates. You declare one to one relationship using protocols delegate protocols and Dan with Kiva labs operation you declare and establish a many to many relationship using other techniques but mostly. It's a kind of declarative key valor. While the that that's in the name Kiva Observation and your keys likely will be there strings or I believe you could use like selectors or something about for