Summarized using AI

Laziness Driven Development

Alexander Sulim • June 08, 2024 • Hamburg, Germany • Talk

In the talk "Laziness Driven Development" at Ruby Unconf 2024, Alexander Sulim explores how leveraging laziness can enhance software development practices. He defines a productive form of laziness that encourages creating quality software while minimizing repetitive manual work.

Key points discussed in the presentation include:

  • Defining Laziness: Sulim differentiates between traditional laziness, which is seen as avoiding work, and productive laziness that emphasizes efficiency and improved quality in development tasks.

  • Rules of Laziness Driven Development:

    • Avoid Manual Work: Emphasizes automation in processes, especially in testing and repetitive routines, to eliminate the need for manual intervention.
    • Reduce Repeated Queries: Encourages documenting code and creating simpler interfaces to minimize frequently asked questions and improve clarity.
    • Use Standard Toolsets: Advocates for relying on commonly used tools to ease the learning curve for new team members.
    • Avoid Reinventing the Wheel: Suggests utilizing existing solutions instead of creating new ones unless absolutely necessary.
    • Understand Protocols: Encourages developers to build on known patterns, thereby avoiding unnecessary complexities.
    • Minimize Dependencies: Stresses the importance of preferring straightforward libraries over complex frameworks to ease maintenance.
    • Transparency Over Magic: Warns against excessive abstraction which can obscure understanding of software components, advocating instead for comprehensible solutions.
  • Examples of Application: Sulim illustrates his points through practical examples where tasks related to file handling in scripts are managed through standard OS commands to reduce complexity and error handling. By delegating common functionalities to the operating system, he demonstrates how developers can focus on core logic rather than peripheral error management. Additionally, he highlights the importance of providing clear documentation and examples for users of the developed tools to mitigate confusion.

  • Conclusion: The presentation concludes by reiterating that laziness in this context is not about shirking work but about finding ways to do it smarter. It encourages using lazy instincts to identify inefficiencies in one’s workflow to enhance overall productivity and quality of work. Sulim invites developers to embrace laziness as a mindset that leads to better software solutions and more enjoyable work practices.

Laziness Driven Development
Alexander Sulim • Hamburg, Germany • Talk

Date: June 08, 2024
Published: unknown
Announced: unknown

Alexander Sulim: "Laziness-driven development is a set of rules that might help anyone to harness great power of laziness to create better software. Some of these rules are obvious, some might be controversial, but they all are based on personal experience and serve me well for many years already."

Ruby Unconf 2024

00:00:00.199 so I have the honor to announce
00:00:02.560 Alexander who will talk about laziness
00:00:04.720 driven development and we'll open up the
00:00:06.879 very first H the the uncom for today
00:00:09.280 with his talk so give him a warm
00:00:11.799 Applause
00:00:18.560 please so hello everyone and as announed
00:00:21.560 today we're going to talk about laziness
00:00:23.480 driven development but uh at the
00:00:25.840 beginning I need to start my timer so I
00:00:28.400 know when how much time I spend
00:00:31.119 um and we do a round of introductions so
00:00:33.960 you know better uh who I am my name is
00:00:37.480 Alex uh I'm not really active on social
00:00:40.680 media you could always send me an emails
00:00:42.800 I'm an old school guy but I have a
00:00:44.840 profile on
00:00:46.039 GitHub and my personal homepage um I
00:00:49.960 have uh 20 plus something years of
00:00:52.359 professionally uh programming experience
00:00:55.520 which like professional means that I was
00:00:57.879 paid for this offer that I was uh Crea
00:01:01.800 currently I work at bab for the last 6
00:01:04.360 years uh and my current position is
00:01:06.799 principal uh software engineer which
00:01:09.200 should mean that I know something about
00:01:11.520 making
00:01:12.720 software uh and what is Babble bubble uh
00:01:15.720 is an ecosystem of different products
00:01:18.119 that help uh people people uh to learn
00:01:21.240 languages and behind the scenes it's
00:01:24.320 more than thousand of people uh working
00:01:27.439 in in two different offices the one in
00:01:29.119 Berlin one in in New York and as you
00:01:31.759 might guess uh bab is looking for uh
00:01:34.520 Engineers Ruby included so please check
00:01:37.560 this uh this this
00:01:40.040 URL so uh now back to the main topic and
00:01:44.799 it's a laziness driven
00:01:46.840 development um if we talk about laziness
00:01:50.399 I could imagine that we might have
00:01:52.240 different definitions of what it is so I
00:01:55.439 thought it would make sense to uh stick
00:01:57.680 to the one which is close to the
00:02:00.119 laziness D development itself so
00:02:03.000 definitions um the Cambridge Dictionary
00:02:05.880 says that the laziness it's basically
00:02:08.520 our quality that um kind of forces us
00:02:11.879 not to do any work at all right this is
00:02:14.959 very common understanding of what
00:02:16.519 laziness is and this is not this type of
00:02:19.120 laziness we're going to talk today there
00:02:21.599 is another definition of
00:02:23.599 laziness given by Pearl uh glossery and
00:02:27.519 it's a very long definition but uh in
00:02:30.080 summary uh it's the quality that
00:02:32.480 actually uh kind of forces you to work
00:02:35.680 more uh uh and Achieve great better
00:02:38.800 quality of the whatever you you're
00:02:40.640 producing in order not to do work later
00:02:43.599 on this that's the laziness we're going
00:02:45.879 to explore today and that's the laziness
00:02:48.080 I highly recommend to possess at some
00:02:51.440 point so
00:02:53.959 um rules right so rules of laist driven
00:02:57.959 development uh rules number one one is
00:03:01.080 avoid manual work uh you try to come up
00:03:05.920 with the with some with some tooling or
00:03:08.200 with some with some processes that help
00:03:10.760 you not to have uh manual work you also
00:03:13.080 learn how to identify what is so
00:03:15.440 sometimes doing some manual work is fine
00:03:17.040 I'm not saying that you have to avoid it
00:03:19.640 completely
00:03:21.519 uh the the one example is testing right
00:03:24.920 if you have to run test one time it's
00:03:27.239 okay but when it's already thousand
00:03:29.040 times the same
00:03:30.400 uh thing try to automate it right we all
00:03:32.959 love uh writing test for all our
00:03:36.400 applications that's one of the the Ruby
00:03:38.920 strongest uh things um but in order to
00:03:42.360 automate tests uh or testing of of our
00:03:45.400 software uh the software needs to be
00:03:47.799 designed in in a way that it's testable
00:03:50.959 right uh all possible edge cases
00:03:53.599 especially uh they should be covered
00:03:56.239 with tests so we don't have
00:03:58.280 bugs so that means when you design your
00:04:00.760 software and you don't want to run test
00:04:02.400 or you do manual testing with a button
00:04:05.000 clicking or something you try to design
00:04:07.680 uh the code in a way that software could
00:04:10.360 do testing for you uh your routines uh
00:04:15.120 right it's if you have to repeat the
00:04:17.440 same thing all the time let's say when
00:04:19.400 when you deploy something uh or when you
00:04:22.079 do a setup of the project that you just
00:04:24.720 W from GitHub uh try to see what are the
00:04:28.160 things uh that could be scripted and
00:04:31.880 automated uh and again similar to
00:04:34.600 automated testing right these routines
00:04:37.320 they should be designed in a way that
00:04:39.240 they actually scriptable right you could
00:04:41.039 come up with some uh conventions like
00:04:43.759 naming conventions or conventions where
00:04:46.120 you put files uh on on the disk so then
00:04:50.240 you could write scripts and then you run
00:04:51.960 one line uh and everyone is happy and if
00:04:55.000 you work in a project and you're not the
00:04:56.639 only one there and you have uh teammates
00:04:59.120 or you have New Jers from time to time
00:05:02.080 they will be definitely happy so they
00:05:04.680 don't have to run a thousand commands or
00:05:06.479 look in in some uh source code to just
00:05:09.039 run one command and everything works for
00:05:10.800 them and they they could be
00:05:13.919 lazy for the next couple minutes so
00:05:18.639 that's the summary of avoiding manual
00:05:20.919 work doing manual work sometimes it's
00:05:23.840 fine but if you see the pattern that you
00:05:26.080 have to do something multiple times uh
00:05:28.919 look for ways to automate
00:05:31.039 this avoid answering same questions so
00:05:35.720 it is okay to talk to people I'm not
00:05:37.720 saying that you don't have to answer
00:05:39.880 questions but try to uh look for
00:05:44.000 patterns when the same questions about
00:05:46.080 your software comes again and again uh
00:05:49.880 maybe there is a way uh to fix this uh
00:05:53.199 because you don't want to spend your
00:05:54.800 time answering the same question all the
00:05:56.479 time uh the one way or one of the best
00:05:59.680 best ways to avoid doing something is to
00:06:02.360 simplify the thing that to to the point
00:06:05.039 that it it is not possible to have
00:06:07.599 questions right everything is so simple
00:06:10.080 uh so people just don't have
00:06:11.880 questions it's always not always uh it's
00:06:14.840 not always possible uh that's why from
00:06:17.680 time to time we document our code right
00:06:19.919 we try to help people to find answers
00:06:23.759 themselves and the better you document
00:06:26.080 the less questions you
00:06:27.680 have um the next idea is to rely on
00:06:31.680 standard tool sets and the standard is
00:06:33.759 in quotes here in purpose um because
00:06:36.919 standard might mean uh different things
00:06:39.199 in different companies in different
00:06:40.639 teams in different projects but it means
00:06:43.599 something that people don't have to uh
00:06:45.919 don't have to learn right uh because
00:06:48.880 sometimes people don't want to learn so
00:06:50.199 they come to you and say oh I see that
00:06:52.400 you using this this thing how to use
00:06:54.520 it so uh and when it's multiple times uh
00:06:59.720 maybe you would like to switch to
00:07:01.080 another tool which most probably people
00:07:04.120 know how to use and they don't come to
00:07:06.800 you but still talking to people is
00:07:09.400 awesome you have to use
00:07:11.360 this so uh I avoid Reinventing the wheel
00:07:16.360 um this is one of the things that I
00:07:18.800 personally struggle as a software
00:07:21.160 engineer because I love making stuff uh
00:07:24.440 and sometimes when I see something uh
00:07:26.599 like a software tool I say I could build
00:07:28.840 it better right I could make it uh I
00:07:31.360 don't know 5 or 3% better um personally
00:07:35.759 I watch for this for this science this
00:07:37.400 is not not a good science in my case I'm
00:07:39.720 not I don't know about you but um to
00:07:43.599 avoid uh Reinventing the whe because
00:07:45.800 this is the price that you pay next it's
00:07:47.879 of course it's fun to build these things
00:07:49.879 but then you have to maintain them uh
00:07:52.039 and if if it's if the software that
00:07:53.919 you're working now it's just for you and
00:07:55.520 you're the only user do whatever you
00:07:57.560 want uh these rules and the laziness
00:08:00.400 even development development uh is
00:08:03.360 mostly about when you work in the team
00:08:05.039 when you work in the company uh or the
00:08:06.960 project invols more than one person
00:08:09.479 that's why to avoid Reinventing the
00:08:11.479 wheel uh try to use common uh common
00:08:14.280 tools right so people know how to use
00:08:16.800 them and they most probably already uh
00:08:20.080 bulletproof and then there's a history
00:08:22.199 and then all the possible buxs they
00:08:23.759 already discovered so you don't have to
00:08:26.120 do this
00:08:28.120 um Rel on well-known uh protocols and
00:08:32.080 patterns uh again try not to invent yet
00:08:35.760 another or protocol or or GTP or
00:08:38.479 something like this it's great to be uh
00:08:41.159 to be creative uh that's why we have all
00:08:44.240 these protocols but sometimes we have
00:08:46.000 too many of them I think uh so if you
00:08:48.800 really feel the passion that you would
00:08:51.080 like to build uh to to to create a
00:08:53.560 design yet another protocol look around
00:08:56.120 most probably it's already invented but
00:08:58.959 you could still contribute and make this
00:09:00.920 thing better and not uh invent another
00:09:05.120 one so um and again try to uh have as
00:09:09.800 less
00:09:11.040 customizations uh as as possible because
00:09:13.480 then you have to maintain them and uh
00:09:15.880 having something like half per uh
00:09:18.200 different than something else it means
00:09:20.160 that next time when there is an update
00:09:22.720 uh for this for the for the standard
00:09:24.480 tool you have to do extra work uh and as
00:09:28.240 a lazy person you don't want to this
00:09:32.160 right so um this one might be
00:09:36.440 controversial again as talking to people
00:09:38.839 and answering questions I'm not
00:09:40.839 suggesting that you have to uh
00:09:42.680 completely avoid third party
00:09:44.760 dependencies in your projects but you
00:09:47.360 always have to question whether it makes
00:09:49.680 sense or
00:09:50.839 not and there is a good side uh behind
00:09:53.959 behind this so I'll try to prefer uh
00:09:56.880 simple libraries over complicated
00:09:59.480 Frameworks because you need to you need
00:10:01.839 to spend time to learn them and and
00:10:04.959 understand them uh there's a time to
00:10:07.120 support them as well and you're not the
00:10:09.480 only one again uh every new Joiner on
00:10:11.839 your team or your company will have to
00:10:13.560 go through this through this process so
00:10:16.200 that's why uh try to uh if you make
00:10:19.640 decision to take some some third party
00:10:22.320 uh library or framework on board make
00:10:25.040 sure that it's actually uh worth it
00:10:27.600 maybe there is something that could do
00:10:30.000 the same could produce the same results
00:10:32.920 but it's inside of the pro language that
00:10:35.720 they use like Ruby Ruby has a great uh
00:10:38.720 core Library so you could build a lot of
00:10:40.760 stuff just using
00:10:43.079 this and uh again try try to learn and
00:10:47.600 understand what's already comes with the
00:10:49.399 language itself uh in many many cases uh
00:10:53.519 you could find something and I saw
00:10:55.120 examples when people just don't know
00:10:56.720 that something exist in in cor Library
00:10:58.760 one of the devices that I use uh and
00:11:01.000 then give to uh to to my colleagues that
00:11:03.920 every time when I don't know how to do
00:11:07.000 something or I found a new method in in
00:11:11.279 car Library I just look around like
00:11:14.120 within the same module I just read
00:11:15.639 documentation just to get an idea what
00:11:17.399 else is possible and sometimes you could
00:11:19.279 find diamonds there and if you have time
00:11:22.440 look in the source Cod it's also awesome
00:11:24.760 but time box
00:11:27.519 this so uh
00:11:30.360 um I don't want to compete with
00:11:36.160 eile that's why I have a comment on this
00:11:39.000 one try to avoid magic uh what it means
00:11:42.680 um it's there is no magic if you
00:11:45.959 understand things right uh that's why
00:11:48.920 rails has a lot of magic and the magic I
00:11:51.200 mean something that is a uh a method
00:11:54.040 that uh does a lot for you and it's
00:11:56.240 awesome right you don't have to do it
00:11:57.959 hides all the complexity
00:12:00.160 um but you have to kind of dissolve this
00:12:03.240 magic and look inside so you understand
00:12:06.040 so uh if sometime there's a fire on
00:12:10.440 production uh this magic could bite you
00:12:12.959 the magic means that you don't know what
00:12:14.399 it is right you don't know uh what's
00:12:16.920 behind so it's better to know and then
00:12:19.279 there's no magic this is how you avoid
00:12:20.880 it you learn you de inside um and you
00:12:25.000 dissolve the magic this this time so uh
00:12:28.199 in my opinion so the second best cot is
00:12:31.160 the one that you understand the one
00:12:33.399 which is not magical to you uh and if
00:12:36.360 you don't know the best code is the one
00:12:38.560 which does not
00:12:40.120 exist so the one which you don't have to
00:12:42.639 maintain right you don't have to learn
00:12:45.160 and you have to answer questions on this
00:12:47.320 that's like the the pure goal of
00:12:48.839 laziness driven
00:12:50.560 development but it's not possible yet so
00:12:55.480 summary and I spent just 12 minutes so
00:12:58.480 we'll have uh some extra bonus uh
00:13:01.880 laziness driven development it is not
00:13:04.360 about avoiding doing work it's not this
00:13:06.920 this cambrid definition of being
00:13:08.880 laziness and just sit on the couch and
00:13:10.639 watch Netflix it is not it's actually
00:13:12.680 about uh making better things uh like
00:13:16.320 with things with the with the greater
00:13:18.240 quality uh that you don't have uh spend
00:13:21.360 time on on the maintenance uh or you
00:13:23.680 could spend this time that that you uh
00:13:25.600 that you get this this way to do on
00:13:28.000 something more awesome some possibly
00:13:30.160 software spending time with your family
00:13:32.240 something this type of
00:13:34.160 laziness
00:13:35.720 so and uh as we have time I could uh
00:13:39.480 show you an example how this mindset and
00:13:42.480 the Las development and this rules also
00:13:46.519 um they are not super strict uh it's
00:13:48.880 basically a mindset that you apply so
00:13:50.959 every time when you have a problem you
00:13:52.639 apply you try to uh get this this
00:13:55.759 feeling I don't want to do this uh and
00:13:58.720 there might might be reason why you
00:14:00.000 don't want to do this this this laziness
00:14:02.480 speaks to you uh and uh use this use
00:14:06.199 this feeling of being lazy and and not
00:14:09.199 wanting to do something uh to identify
00:14:12.320 how you could do it better how you could
00:14:14.399 automate it or maybe how you could
00:14:16.279 change design of your software uh that
00:14:18.839 you don't have this problem anymore
00:14:20.360 that's that's the best case um so listen
00:14:23.480 to your laziness in a productive way of
00:14:25.880 course so uh task right and let's do an
00:14:30.279 example and talk about the task task is
00:14:33.279 very simple it's it's epimeral just to
00:14:35.959 give you an idea how this uh mindset
00:14:38.240 could be applied let's say you have a
00:14:40.440 task to create a tool uh could be common
00:14:42.759 line U interface like a CLI Tool uh that
00:14:46.560 gets data from from files uh in some uh
00:14:50.279 directory on a disk it passes these
00:14:53.480 files um does some processing and then
00:14:56.560 output results pretty uh common thing so
00:15:01.360 solution that I observe talking to to
00:15:04.680 other people and doing this this kind of
00:15:06.480 stuff myself these are the steps right
00:15:08.560 this is what needs to be done in general
00:15:10.560 right you iterate our files you read uh
00:15:13.120 each file you read data uh do processing
00:15:15.839 and then you output very simple uh if
00:15:20.000 you if you pay attention to the steps uh
00:15:23.040 the paring data and processing that's
00:15:25.360 the core of our task this is the core of
00:15:27.199 the tool that we need to build
00:15:29.639 uh without this like nothing nothing
00:15:32.120 makes sense but these other three things
00:15:36.360 they look to me so when I apply uh this
00:15:39.360 laziness driven development mindset I
00:15:42.000 see that these things they're quite
00:15:43.480 common right if the pro data processing
00:15:46.360 could be very unique to my uh to my tool
00:15:49.480 it's sometimes hard to find something
00:15:51.440 that uh does it for you but you have to
00:15:54.519 there that's important so you don't have
00:15:56.120 to build this tool that would be ideal
00:15:57.759 if there's something which does exactly
00:15:59.639 this just use it uh but let's say there
00:16:02.480 is there is uh nothing existing yet so
00:16:05.440 you have to build it let's um explore
00:16:09.079 these three things which are creating
00:16:10.920 now there something which sounds to me
00:16:13.120 like extra or external stuff
00:16:17.319 uh so we could of course and then people
00:16:20.959 do this that's the first thing that that
00:16:22.600 comes uh to our mind um let's have a
00:16:26.839 dysfunctionality the the uteran of files
00:16:29.240 reading them uh and writing output as
00:16:32.480 part of our program let's say it's a
00:16:34.600 script it's a very simple thing it's
00:16:36.199 just a ruby script uh then U pretty soon
00:16:41.519 you discover that some files might have
00:16:45.240 some some like different permissions you
00:16:47.600 could not read them or they don't exist
00:16:49.480 the directory does not
00:16:51.000 exist um or something something like
00:16:54.920 this uh and then you have to support
00:16:57.519 this in your script right you have to
00:16:59.240 add some reaction the script should be
00:17:01.120 user friendly right it should tell you
00:17:03.040 what needs to be done of course it could
00:17:05.000 just explode but this is not the nice
00:17:07.559 thing because people come with questions
00:17:09.400 and you want to avoid
00:17:12.160 this right uh or if you want to avoid
00:17:15.679 them then you you do this this exception
00:17:17.600 handling but then you have to think uh
00:17:20.360 how to explain people and and and so on
00:17:23.360 uh in your script so we could avoid this
00:17:26.839 uh we could kind of offload this task to
00:17:29.720 something which is standard right uh you
00:17:32.480 could read files and then directories
00:17:35.200 using standard so uh operating system
00:17:38.720 tools uh Ruby is great so it has uh
00:17:42.679 really nice interfaces three from stand
00:17:45.120 on input so the the OS level tools uh
00:17:49.559 like cat uh could read this file for you
00:17:53.480 uh fit it to standard input and then you
00:17:55.960 you just get it from there if there is a
00:17:59.080 problem and file is not readable because
00:18:01.480 uh not enough permissions to access this
00:18:03.919 file there will be of course exception
00:18:06.400 uh but because use standard tool most
00:18:08.440 probably people know already what this
00:18:11.440 uh error mean because they use uh this
00:18:14.080 this these tools so you don't have to
00:18:15.640 explain them you don't have to do this
00:18:17.400 this handling uh in your
00:18:19.799 tool um and the same when you do an
00:18:23.440 output uh of the the the results of of
00:18:26.799 data processing to standard output and
00:18:29.440 not writing this into files or some some
00:18:32.799 path on the dis from your script uh
00:18:36.000 because again um someone might provide a
00:18:38.799 pass but it might not be uh writable
00:18:41.440 right and again it's the same the same
00:18:43.159 story you have to explain uh you have to
00:18:45.480 do error handling just print it to
00:18:48.240 standard output the benefit number one
00:18:51.080 uh for yourself is that you see the
00:18:53.039 output you don't have to read the file
00:18:54.640 you run the script and you see it right
00:18:56.120 away on the screen uh if the the thing
00:18:58.480 does uh uh processing correctly but it
00:19:02.320 also gives a freedom uh for the users of
00:19:05.120 the script to do maybe some post
00:19:07.240 processing or put files where they want
00:19:09.760 to put them uh and it's very simple and
00:19:12.400 again it's already OS level it's kind of
00:19:14.880 out of scope of your application which
00:19:16.799 is great and if there's any problem uh
00:19:20.120 that the OS will tell uh uh about these
00:19:23.240 problems and people know about this the
00:19:25.880 this this errors already so they will
00:19:27.880 most probably handle
00:19:30.039 them uh as a grade developers we do
00:19:34.600 extra steps and the extras that you
00:19:36.880 could add uh to to the tool is to
00:19:40.720 provide uh in RM some copy and pastable
00:19:44.600 examples uh how to run your tool right
00:19:47.400 uh again using this this uh the OS uh
00:19:51.280 utilities uh you could say this is how
00:19:53.440 you read files from this directory and
00:19:55.080 then and fit uh to my tool or this is
00:19:57.159 how you could store them uh and if it's
00:19:59.559 on GitHub you have this nice little uh
00:20:01.679 copy uh button right so you just people
00:20:05.480 click this button and then run your
00:20:07.799 script uh you could add a built-in help
00:20:10.799 so people don't come with questions to
00:20:14.600 you uh and is very additional bonus
00:20:19.000 extra thing um you could write this um
00:20:23.440 this this this tool in the language
00:20:25.080 which compiles into binary um and
00:20:29.240 then for the users of your tool there is
00:20:31.880 no need to add uh Ruby is tricky
00:20:34.400 sometimes that you need Ruby itself and
00:20:36.440 run time um and if it if if this tool is
00:20:40.480 just uh if there is no necessity for
00:20:43.520 people uh for users of your tool to have
00:20:45.919 Ruby around uh something which compiles
00:20:48.159 to Binary is better and I've heard many
00:20:50.880 many from many people that Crystal is
00:20:53.400 really nice for rubby Ruby developers
00:20:56.480 Crystal language I mean
00:20:58.919 so uh profit right you don't need to uh
00:21:03.520 remember how to explain uh and and use
00:21:06.679 the tool you have read me for this uh
00:21:09.080 many this this file operations they
00:21:11.120 already on OS level they're not part of
00:21:13.320 your uh of your tool of your software
00:21:16.480 which means you don't have to test this
00:21:17.960 you don't have to Pro provide
00:21:19.120 documentation for
00:21:20.679 this you don't have to maintain it uh in
00:21:23.520 the future um so and then it also gives
00:21:27.480 you this greater f exibility right uh
00:21:30.039 you give the the users uh in a common
00:21:34.000 line interface of course example you
00:21:36.000 give them flexibility to decide uh where
00:21:39.720 the files are uh and then how they um
00:21:43.640 how they how they tool receive these
00:21:45.360 files and also how these files are
00:21:47.919 stored so it's kind of profit for for
00:21:50.679 everyone and not just for you who is
00:21:52.559 trying to be lazy and then do some other
00:21:55.960 software development so thank you very
00:21:58.720 much we have 9 minutes left so if I'm
00:22:02.480 allowed uh then I'm super happy to
00:22:05.000 answer any
00:22:18.559 questions just raise your hand
00:22:23.120 and hi um can you elaborate a little bit
00:22:27.039 on the question how to decide between
00:22:30.799 don't reinvent the wheel and don't use
00:22:33.000 third party dependencies so for example
00:22:35.440 if I'm trying to build a system and
00:22:37.240 there is a third party dependency that
00:22:40.400 does exactly this um for example yeah
00:22:44.279 like uh one possibility for you in your
00:22:47.400 example would be to use a library that
00:22:50.360 reads and pares uh files for me and that
00:22:53.320 outputs uh nice error messages and all
00:22:55.720 of that if that would exist um so yeah
00:23:00.039 what would you suggest how to decide
00:23:02.080 between the don't reinvent the wheel and
00:23:05.440 don't use external dependencies so if
00:23:08.200 the library so you don't have to
00:23:09.600 reinvent the will in this case if
00:23:13.080 um if the number of functions this this
00:23:15.760 third party provides is very big so it's
00:23:18.240 not just one uh one functionality right
00:23:21.320 it's not just uh I know it does not
00:23:25.679 let's say you want to read files you do
00:23:27.240 some processing you do some output uh
00:23:29.760 and you actually need just the the part
00:23:32.200 that reads the files uh most probably
00:23:34.559 you could implement it yourself if it's
00:23:36.159 not super complex and not something uh
00:23:38.559 exotic right then you uh implement it
00:23:41.039 yourself it's fine but if you actually
00:23:43.799 need all the five things that this third
00:23:45.880 party uh provides then then go for it uh
00:23:49.600 because then you kind of find with the
00:23:51.919 maintenance burden that it that it uh
00:23:54.360 comes automatically and uh necessity to
00:23:58.039 explain how to use uh this this third
00:24:00.440 party for your for your colleagues or
00:24:02.120 for new joiners it's okay avoiding
00:24:04.640 doesn't mean that you don't have to do
00:24:05.960 it at all it means that every time you
00:24:08.799 you ask yourself whether it's actually
00:24:11.039 necessary I'm fine uh to take this
00:24:13.840 responsibility and if the answer is yes
00:24:15.840 then just go for it the same with
00:24:18.240 Reinventing the wheel if there's no
00:24:21.080 nothing existing and you really need to
00:24:23.559 do this and you try to change design
00:24:26.360 that existing let's say uh
00:24:28.919 protocol uh still doesn't fit right you
00:24:32.640 have a some special case and you have to
00:24:35.399 you invent something like unique product
00:24:37.399 which didn't exist before of course
00:24:39.080 there's a chance that uh there's nothing
00:24:42.120 you have to you have to invent so this
00:24:44.360 is not about uh kind of killing
00:24:46.960 creativity completely it's about asking
00:24:50.200 uh I did all the things necessary I and
00:24:53.399 there is no way then yes just go for it
00:24:56.279 but avoid the magic uh if if you took
00:24:58.799 this third party please make sure you
00:25:00.760 understand how it
00:25:04.000 works I you said that you occasionally
00:25:08.200 see software and immediately think or
00:25:10.799 Maybe not immediately but think I could
00:25:12.880 do this better and I can completely
00:25:15.520 relate to this have you ever considered
00:25:18.320 improving on the thing that you think
00:25:20.600 you could do better instead of doing it
00:25:23.520 you know completely new that that's what
00:25:26.039 I try to do myself
00:25:28.960 personally uh and recommend to everyone
00:25:32.120 just to look around most probably the
00:25:34.480 things this thing is already invented
00:25:36.960 and most probably it does even better
00:25:40.000 better uh quality results that that you
00:25:42.720 imagine because uh this tool or this
00:25:45.159 protocol or this thing exist for long
00:25:48.520 time and then people solved all this
00:25:50.120 issue this it's highly recommended look
00:25:52.159 around use the time like the if you
00:25:55.520 would U employ lasz divent development
00:25:58.360 you get some extra time that you could
00:26:00.240 spend on learning and exploring what is
00:26:02.880 possible and then again use this next
00:26:06.600 time when you feel lazy and you don't
00:26:08.840 want to do this you kind of help
00:26:10.360 yourself all the
00:26:12.120 time does this answer the question yeah
00:26:14.440 thank
00:26:15.480 you more questions we have five
00:26:20.799 minutes thank you for your talk I wanted
00:26:23.559 to ask if you have any specific tricks
00:26:25.919 in mind uh to promote laziness in how
00:26:29.640 many how much mental effort do we need
00:26:32.360 to write and understand the
00:26:35.320 code I am not sure if I understand the
00:26:37.559 question how uh um how do you like write
00:26:41.799 the code to decrease the mental effort
00:26:43.960 needed uh to understand it for other
00:26:47.080 programmers and to ah okay so uh this
00:26:49.840 one is tricky I think only with practice
00:26:52.080 so every time when you uh write the code
00:26:55.279 try to imagine yourself uh in
00:26:58.799 half a year or try to imagine yourself
00:27:01.600 being a new Joiner of this company um
00:27:05.360 and then from this position look at the
00:27:07.399 code if it's unclear what it does or
00:27:10.120 especially why it does something uh this
00:27:13.200 way uh try to either change design if
00:27:16.480 it's not possible then uh add
00:27:19.159 documenation right there so people don't
00:27:21.000 have to hunt for this doc Commendation
00:27:23.000 this would help with this with this with
00:27:24.559 the mental burden
00:27:28.679 there was H yeah um yeah so what if you
00:27:32.279 choose like a path between uh inventing
00:27:35.799 the new wheel and using the third party
00:27:39.080 dependency you um you want to actually
00:27:42.640 contribute to a third party dependency
00:27:45.440 with a feature that wasn't there before
00:27:48.279 um but then you realize oh um maybe this
00:27:53.200 is avoiding future work for other people
00:27:55.720 but it's actually adding future work for
00:27:58.200 for me because now people are asking me
00:28:00.600 to maintain the future so where where is
00:28:04.919 the value here like where what would you
00:28:07.279 say on the Spectrum like are you um is
00:28:10.799 the laziness only in your own scope or
00:28:13.600 is the laziness like in a bigger picture
00:28:16.039 of the community you you should strive
00:28:18.000 for for bigger picture of course but if
00:28:21.480 there's a choice between inventing
00:28:22.960 something just for yourself and
00:28:24.200 contributing to something which exists I
00:28:26.480 would probably go for the the the second
00:28:28.880 choice because then you have people and
00:28:31.080 then you also share uh the maintenance
00:28:33.559 with them right if if this change was
00:28:35.399 accepted it means someone also decided
00:28:38.159 to share responsibility with you so
00:28:39.760 you're not the only one uh who has to
00:28:42.440 maintain it uh later
00:28:47.760 on seems like we have no questions
00:28:49.960 anymore thank you very much you're
00:28:51.919 awesome
Explore all talks recorded at Ruby Unconf 2024
+5