Rules of OOP in Pictures with Ivan Nemytchenko - RUBY 668

Rules of OOP in Pictures with Ivan Nemytchenko - RUBY 668

Released Wednesday, 8th January 2025
Good episode? Give it some love!
Rules of OOP in Pictures with Ivan Nemytchenko - RUBY 668

Rules of OOP in Pictures with Ivan Nemytchenko - RUBY 668

Rules of OOP in Pictures with Ivan Nemytchenko - RUBY 668

Rules of OOP in Pictures with Ivan Nemytchenko - RUBY 668

Wednesday, 8th January 2025
Good episode? Give it some love!
Rate Episode

Episode Transcript

Transcripts are displayed as originally observed. Some content, including advertisements may have changed.

Use Ctrl + F to search

0:05

Hey Hey everyone, welcome to another

0:07

episode of Ruby of I'm David

0:09

I'm and today on our panel

0:11

we have on our panel we have John Epperson.

0:13

Hello? And Luke Sutter's? today we are

0:15

talking with a special guest, Yvonne Jeanco.

0:17

Hi guys, Hi for thanks for inviting

0:20

Yeah, so do you so do you

0:22

mind telling us a bit about

0:24

who you are, some of

0:26

the things you're working for and

0:28

all that good stuff? that good

0:30

course. Of These days these days I'm freelancer,

0:32

also consulting from time to time, But

0:35

I started to use to use

0:37

Ruby and Rails in 2006,

0:39

a since then I was

0:41

doing a lot of

0:43

different stuff. I was two agencies,

0:46

founder of two agencies, a

0:48

organizing all the different a lot,

0:50

and all the different stuff.

0:52

up to lately? have you been

0:55

up to lately? and some

0:57

consulting, some consulting, also a

0:59

decent amount of teaching, of

1:01

course. And we had you

1:03

come on to talk about

1:05

one of the talks that

1:07

you gave at that you gave at

1:09

Abstract, called less abstract Rules effects

1:11

of expressing rules in

1:13

or of object oriented

1:16

visual way. Yeah, in a visual way. In

1:18

In pictures, right. Would you

1:20

mind giving us a highlight us

1:23

of that talk? Sure. talk?

1:25

The whole thing started

1:27

as a conversation. I

1:29

I guess a year ago it's another

1:31

conference in in Petersburg and

1:33

me and some other people

1:36

who are also involved in teaching

1:38

in teaching rubies. We had we had a discussion

1:40

that sometimes it's very

1:42

hard to explain. some some

1:44

abstract concepts to the

1:46

newcomers. And there was was one

1:48

rhetorical question, which was said,

1:50

It sounded like, like, Wouldn't be

1:53

great if we could

1:55

illustrate, let's say, dependency injection

1:57

with just one picture picture

1:59

so that everyone can... understand it

2:01

and understand it in the correct

2:03

way. the correct way. So yeah, that

2:05

was just a rhetorical question

2:08

as I said, I

2:10

but later later I was

2:12

teaching another pack of students.

2:14

And I was drawing drawing

2:17

picture to them and those pictures

2:19

were like pictures of

2:21

little dudes dudes those those

2:23

picture were meant to be

2:25

classes. So I was was playing in

2:27

OOP them. them. And then I

2:30

this this question I thought I

2:32

thought, what could be like

2:34

the next steps to illustrate

2:36

more stuff of the OOP in a way?

2:39

And I started drawing I started

2:41

to those dudes and I

2:43

thought, all right. and

2:45

I thought, all right, let's methods

2:47

in our code, and

2:49

then our code. more and

2:52

more and more and more and

2:54

more and to develop to develop

2:56

of of language. to

2:59

express what's going on in

3:01

your code. code. So yeah, something like this.

3:03

I like this. I mean,

3:05

your pictures are awesome. you. Did

3:07

you you. Did you come to a

3:10

conclusion, you did you measure that this

3:12

works? So in my talks, I my talks,

3:14

I was just excited that it

3:16

all makes sense. of the

3:18

of the fact that it's still all

3:20

all weird. I was And I was

3:22

excited about it and wanted

3:24

to present this this to basically to show

3:27

that. But I I think it was helpful.

3:29

for me in several ways. First

3:32

of all, I was able to

3:34

explain. some concepts of

3:36

my students. to my Secondly,

3:38

I was using it

3:40

in my my freelancing as

3:43

well. as well. So found

3:45

it useful when you have some.

3:47

you have some complex case

3:49

where you where you don't

3:51

know how to model it correctly or

3:53

you you just have some. complicated

3:55

set of classes when you're

3:57

solving some specific problems.

4:00

What I did I did I, let's

4:02

say I had five or six or six

4:04

glasses I I didn't like

4:06

the design. design. I just. I just decided

4:08

to draw all of them. all of using

4:10

this visual language. And

4:13

from that, I started

4:15

gaining from that I started method

4:17

is duplicated in several

4:19

places in several so on

4:21

and so on and

4:23

so on and so on. it was

4:25

useful was in my my

4:27

well. as well. I'm not

4:29

sure how to share it

4:31

with more people and how

4:33

to make it more useful, but

4:36

that I had some attempts in that

4:38

as well. I thought it

4:40

was a really interesting idea because

4:42

a lot of people can do

4:45

it, you know, just the of

4:47

passing the arguments, but I arguments, but they

4:49

don't really have an understanding of

4:51

it. And I think getting that

4:53

visual model in your head really

4:55

goes a long way. way. Did

4:57

you find that people reacted well

4:59

to it? well to it? people usually

5:01

like it a lot because

5:03

it's a very surprising way of

5:05

thinking about the code for

5:07

them. the code for them. So yeah,

5:10

people are really excited, but

5:12

I don't think many

5:14

of them find it very

5:16

practical so far. I I

5:18

it's it's of the drawing of

5:20

the rails the mountain of learning

5:22

rails. of learning rails. Yeah. This is,

5:24

yeah, I wish you should tell about

5:26

it, yeah, this is a interesting

5:28

thing. thing. What is

5:30

at the top? What

5:32

is at the top of the of

5:34

the rails So I would say it's

5:36

not a say it's not a rails mountain,

5:38

it's a cycle you know, not

5:41

a cycle, but well, let's

5:43

say say life every

5:45

rails developer. So it's also

5:47

model I developed for

5:50

another talk in Ukraine. talk

5:52

in Ukraine. I I simply spotted

5:54

that many many of developers

5:56

go through the same

5:58

steps. steps and I... I was

6:00

on many of them as well.

6:02

So the first step first love you love

6:04

rails, when you believe in rails in

6:06

rails way, and you in love, fell

6:08

in love. on you Then

6:10

later on, you some getting some

6:13

problems and you fixed them with

6:15

some with some magic. And after several

6:18

attempts to fix stuff with

6:20

might you might get disappointed

6:22

in rails way. And then then you

6:24

switch to another step

6:26

where you start learning

6:29

about all the alternative

6:31

approaches approaches like solid, dryer, be, I

6:33

don't know, trailblazer, know, service

6:35

objects and so

6:37

on, so on, of course, patterns.

6:39

Then you can of course You

6:41

can, of course, find where you

6:43

feel where you feel comfortable.

6:46

because like your projects over

6:48

a specific size or like

6:50

you just found just

6:52

found your way

6:54

of managing complexity

6:56

in web applications. But many people

6:58

they decided that, all right, right,

7:01

something is wrong with the something

7:03

might be wrong with

7:05

the way we develop

7:07

applications. they started to leave, and they

7:09

to leave. that they should try

7:11

that they should try other

7:13

approaches. And this is other

7:16

approaches. four, like the this is the

7:18

top of the mountain, is the final, the

7:20

top of the mountain is when you

7:23

in to learn from all those

7:25

approaches in different ecosystems. And

7:27

you, well, on the stop level, it's level,

7:29

it actually doesn't matter for

7:31

what technology you use. you

7:34

use, you can return to Ruby and

7:36

you can return to Rails with all this

7:38

knowledge. rails with you've broken the

7:40

matrix. and you've broken the to

7:42

do stuff. now So

7:44

that's the final step. that's

7:46

the for me getting

7:48

up to that me broken

7:50

that matrix's broken place. It originally

7:52

came from me learning rails

7:54

I learned Ruby. Ruby. That That was

7:57

probably one of the biggest mistakes that I

7:59

made. that just I just dove. right into rails without

8:01

understanding how Ruby classes

8:03

how to create true plain

8:05

old Ruby objects. And so

8:08

I would have fat

8:10

fat controllers with super

8:12

fat models, things were

8:14

not maintainable, they were

8:17

not manageable, I had

8:19

zero unit tests on

8:21

my old applications applications and I

8:23

thought that, man, Rails isn't really

8:26

all that intuitive. It's not

8:28

all that great. So it really

8:30

really was, I'm maybe I'm just

8:32

a bad programmer. which is kind

8:34

is in of rails disciple way. So for

8:36

So it me, it was getting

8:38

up to that peak of

8:40

the mountain by actually

8:42

learning Ruby. up on some up

8:45

on some Ruby techniques

8:47

like or just just creating

8:49

Ruby objects instead of

8:51

just relying what Rails

8:53

provides. So So a better

8:56

Ruby developer made me understand

8:58

a lot more and become a

9:00

better Rails developer essentially. a better Do

9:02

you think essentially. Do

9:04

you think that faster

9:06

with Ruby Ruby and

9:08

it's so good. good

9:11

at accelerating you through the early

9:13

stuff. For me, I would say, was

9:15

a I was a pretty horrible

9:17

developer for a long time, Mostly

9:19

because I was because I was just

9:21

trying to do things by

9:23

myself. I wasn't including other people

9:26

in my work and that

9:28

inherently limited me on what I

9:30

was able to do. seeing a

9:32

pattern here that you I feel like I'm

9:34

seeing a pattern here, that you are

9:36

taking these abstract concepts and putting

9:38

them into pictures. part, like, the most part,

9:40

getting good seem to be getting good

9:42

reception of it, like connecting connecting with

9:45

this kind of stuff. feel like I feel

9:47

like it's kind of analogous to, you know that.

9:49

that one dude that you know you know that like

9:51

makes good analogies all the time all the

9:53

of thing. of I feel like it's

9:55

kind of like that, kind of like that kind of

9:57

a person tends to be able to be able to.

10:00

maybe it's a skill of a teacher. I

10:02

don't know exactly where I'm going with this,

10:04

but I feel like there's something here, which

10:06

is I think what you're coming to tell

10:08

us. like there's maybe I don't have a system. I

10:10

I haven't measured it yet, coming to tell the

10:12

beginnings of one. hey, Is that where

10:14

you feel like you are in the process I do you

10:16

feel like you're further measured it yet, I

10:18

do a lot of

10:20

teaching one. Is that where you feel lot

10:23

of my relatives are teachers,

10:25

or so I feel like you're further along?

10:27

something this. And yeah, these things I'm things

10:29

I'm talking about here and

10:31

there, they are kind of

10:33

a part of a bigger

10:36

system that I have in

10:38

my mind. in And also, I've

10:41

tried to write a

10:43

to write a book. call Painless

10:45

Rails, but yeah, it's yeah,

10:47

it's already two years after

10:49

I started writing it. right

10:51

now postponed state, but state.

10:55

But like the bigger, the

10:57

goal for me is to

10:59

make development using

11:02

joyful again. Because I'm

11:04

a freelancer I I'm a

11:06

freelancer, I I usually... switch

11:09

from from project to

11:11

project, and I see

11:13

that a lot of

11:15

people, they inventing their own own

11:17

bicycles. I mean mean, remember

11:19

those times when we

11:21

had we had like single rails way

11:23

when we all on the

11:25

step. one of this mountain. We all

11:28

were enjoying the enjoying

11:30

the process. And then

11:32

we started more approaches

11:34

approaches all grew our all

11:36

grew, our projects and bigger and

11:39

more complex. We need it. other

11:41

some other methods to manage

11:43

complexity, we but we ended

11:45

up having dozens of of

11:47

different approaches there there is

11:49

no single unified way of

11:51

doing that that now. I I

11:53

think ideally we should

11:55

have one unified

11:58

approach again. would

12:00

fit to 90% of all of all

12:02

projects. Of Of course,

12:04

like the domain models lot of

12:06

specifics is different, is

12:08

but I'm still pretty

12:10

sure that for 90 %

12:12

of 90% of 90% of for

12:14

90 % of functionality, of

12:17

90 % of all

12:19

Rails projects web web projects

12:21

on Ruby. Ruby. we can

12:23

develop a single unified way.

12:25

imagine if we could

12:27

measure if we could measure a different

12:29

approaches. like a different approaches,

12:32

like with trailblazer, we

12:34

ratio of, I don't

12:36

know, of, I don't know, five, and some

12:39

another metric of, I

12:41

don't know, 10. know, ten.

12:43

for another, like, when you'll rail, we

12:45

have like those numbers

12:47

of seven and six.

12:49

six. And we could just

12:51

compare those approaches. approaches. And

12:53

let's say, and this, approach is

12:55

optimal. is optimal. And it

12:58

it sounds pretty, like, fantastic,

13:00

I would say, I still I

13:02

would say. it's I still think it's

13:04

doable. Man, I can explain it.

13:06

take some time. gonna take some time. So

13:08

from my perspective, I think that right right

13:10

there, that motivation to sort of like of

13:13

like get. the I don't I don't know that there's,

13:15

at this I look at this as sort

13:17

of being a thing that thing that there's a

13:19

perfect thing out there all we're all trying

13:21

to go get it, right? all We're all

13:23

trying to seek it. And I feel

13:25

like that is sort of like the motivation

13:27

that drives drives like half of the things that

13:29

you see out in the world. the You

13:32

know, somebody's upset about rails.

13:34

know, now we have have what Sinatra and

13:36

army I mean I mean, they're even

13:38

on your mountain, right? Like

13:40

they're so popular. popular like they're exactly competitive

13:42

much, but. but but it's competing

13:44

against pieces of it, right? like we have these

13:46

we have these things where somebody's like,

13:49

I'm going to try and seek that

13:51

one thing, right? Or, right or you

13:53

know, in in world, we have this, we

13:55

have like we have we have have you somebody's

13:57

gonna come out with another. with another you

13:59

know, framework. I mean, angular is is

14:01

kind of like sort of

14:03

on the and embers basically kind of

14:05

gone. know, we're You know, we're not even

14:07

talking about the the generation before that, that

14:09

are Like that are just gone now.

14:11

Like people are always like to recreate this

14:13

bicycle to achieve that one place. that

14:15

I don't know that we I don't know that

14:17

that stop that cycle. I I

14:20

think there's always going to be

14:22

more churn in the front the

14:24

back the That end. in my wasn't

14:26

my conclusion, but you're welcome to

14:28

make that conclusion. conclusion. So let me

14:31

explain what I mean. I mean, and

14:33

And why I think it's at

14:35

least at least theoretically. So

14:37

first of all, this all,

14:39

this approach. in pictures

14:42

of in pictures of

14:44

little dudes. our code

14:46

we ways to analyze our code

14:49

coverage, have right now? So

14:51

we have have coverage, for example,

14:53

we have some complexity with

14:55

Flock or some other stuff with

14:57

Ruby Critic, but those are

14:59

just numbers. just numbers. say

15:02

you have a class of

15:04

500 lines of code. code, and

15:06

right, you have a metric that

15:08

your class has your of something

15:11

like, I don't know, of something like,

15:13

I don't know, 15. And doesn't give you

15:15

like a lot of information a

15:17

can work with. And

15:19

you can of And

15:21

I think of the tools give us...

15:24

very low level hints on

15:26

code quality. And we

15:28

tend to think that tend to

15:30

think that Rubikov about code quality.

15:32

quality think those are just are

15:34

just about code style they can't show

15:36

you that something is wrong.

15:38

something is wrong but they give

15:40

you a high high-level hints

15:43

and now let's say let's say

15:45

we take the same class

15:47

of 500 lines. to express

15:49

it to express it with a picture

15:51

of little dudes we can have like like Here's

15:53

our guy and this guy, all

15:56

all the are methods, let's

15:59

say we have. seven methods so

16:01

our guy has seven arms

16:03

and we arms this we see

16:05

like this. my talk I was showing like the

16:07

my talk, I was showing too long then

16:09

if the method is too long,

16:12

then the arm is kind of

16:14

long and wavy. you And

16:16

from that picture, you already see that

16:18

it's not very have good to have such

16:20

an arm. It's not very convenient. and

16:23

for for another method,

16:25

you have have seven have seven

16:27

arguments there. there and arguments are

16:29

seven fingers. are seven fingers

16:31

fingers is not with

16:33

seven fingers is not on,

16:35

and so on, and so on.

16:37

and now you have this and now

16:39

you have the properties of

16:42

the the properties one little

16:44

compact picture, in and your

16:46

brain is picture and your brain

16:48

is actually works with

16:50

visual objects much

16:53

better when with text.

16:55

and it takes you less

16:57

time to understand of

17:00

this picture. And actually there

17:02

is a thing

17:04

called channel faces and it's used, you can

17:06

you can Google for it, and this

17:08

is a technique when when

17:10

people faces with

17:12

different with different expressions

17:14

to show multidimensional data. For example,

17:16

you have a table with

17:18

a lot of columns. with a and

17:21

you have to and you have to, like

17:23

I don't know, know, it's something.

17:25

like showing some some death

17:27

rates some information about

17:29

health in different

17:31

states. And for example,

17:34

death rate is expressed with a

17:36

size of a size of eyes and

17:38

don't know, something else is

17:40

expressed with with the and

17:42

so on and so on. So, so

17:44

and this so on. So and this of

17:47

our brain, of our brain which

17:49

faces. faces. And with

17:51

this, you can get

17:53

very efficient. efficient. found this I

17:56

close close the external faces yeah, And

17:58

what I found. I found... that

18:00

if you use this in in

18:02

Dynamics. so So let's

18:04

say we this picture

18:06

of of 500 lines class and then

18:08

we get a pull we get

18:11

a pull request, which changes this class and

18:13

maybe some others. some we

18:15

can have another

18:17

picture, another picture. is this arm

18:19

is gone, this arm got

18:21

fingers. and this

18:24

arm becomes longer. so

18:26

on and so on and so on. So.

18:28

on. Now you can like, very

18:32

you can

18:34

see differences, what high

18:36

level differences were

18:38

added to your added to

18:40

your system. is... So that would

18:43

be kind of would be

18:45

of of part of

18:47

some kind of continuous

18:49

integration system. Yes, Yes,

18:51

correct. Actually, so two links

18:53

I've sent to you, to

18:56

the the one which... called dudes hub. This

18:58

is a This is a

19:00

prototype which is developed

19:02

by my student. does that,

19:04

which already does that,

19:06

actually. it to your repository and it

19:08

to your posting you and it will

19:10

start little you pictures of those little

19:13

dudes whenever you create Does it work on

19:15

it work on like as It looks

19:17

like it has a on a cat

19:19

cat file. it should work. it should work. I

19:21

didn't have the I didn't have the chance to play

19:24

with it a lot, and I I said, it's

19:26

a prototype, but it should

19:28

work. work. Okay, awesome. See here,

19:30

see here. it Not sure, an

19:32

it looks like an

19:34

app. link right, in link it in

19:36

the stuff or whatever to play

19:39

with. Oh to play with it. Oh, yeah. So the, the,

19:41

is the last one called one called

19:43

DUDT and DUDSP is, yeah, it's

19:45

an app. Basically, it

19:47

should be deployed first

19:49

deployed first to, uh, yeah, but I but

19:51

I think I should just do that

19:53

so that you could be able to

19:55

plug it to it to your Apple. So they

19:57

together or something. or something?

20:00

Unity is a gem that

20:02

you can plug to

20:04

your repository repository I believe it's

20:06

a common line, you

20:08

can say, utility and you can

20:10

say, these classes

20:12

as those. as

20:14

of little pictures you will

20:16

get that. dudes and you will

20:19

get that. Gotcha. the, is

20:21

the. Yeah, it's a library.

20:23

Yeah, it's the core it's

20:25

the core of the whole thing. actually

20:28

draws all those. this can This

20:31

can potentially change

20:33

a way of thinking

20:35

about and of complexity. it

20:38

requires a course, it requires

20:40

a lot of more research and

20:42

I don't know, marketing, I like it

20:45

so it I like it. like what

20:47

it sounds like what you're arguing. here please

20:49

correct me me if I'm wrong. Sounds

20:52

like what you're kind of making an

20:54

argument for of that an you for

20:56

is that if you express

20:59

your code quality in this this

21:01

visual kind of language.

21:04

basically can. two things. One,

21:06

I think two things on

21:08

noise, two, cutting down on

21:10

noise bandwidth because we're using more you're

21:12

increasing bandwidth to we're using more parts of

21:14

our brain to help kind of handle

21:16

this or whatever. you're you're communicating with more

21:18

bandwidth. more Correct, yes. I mean,

21:21

I the amount of information

21:23

you can you can. in

21:25

one place is also important.

21:27

Like, remember Like our brain can

21:29

handle only can handle five to

21:31

seven things in one things in

21:34

one like bite. Like here, of the

21:36

compactness, can you can decent amount

21:38

of decent it in one

21:40

place, and on one picture. in

21:42

one and I think on

21:44

one picture. Yeah, and I think that where

21:46

I like glance the at glance of

21:49

where things where things are at. So I

21:51

guess one of these little little people

21:53

or or as it looks looks like

21:56

they're called, If if one of

21:58

them has 10 different r that

22:01

would essentially be like

22:03

10 different public methods

22:05

that that class has.

22:07

which in a of cases

22:09

if you're creating a poro would

22:12

not be ideal. So right

22:14

off the bat, you can say,

22:16

wow this class has some

22:18

serious complexity because you have 10

22:20

different entry points to be

22:22

able to interact with this class.

22:24

Maybe we should simplify it

22:26

so it only has one arm

22:28

at most two and then

22:30

create other smaller classes to handle

22:32

whatever the other methods, public

22:34

methods were that this class was

22:36

originally housing. Correct Yes.

22:39

That's a good example.

22:41

I did similar thing in

22:43

my talk in at

22:45

RubyConf. I just took another

22:47

talk of Sandy Matz

22:49

where she she was doing exactly that.

22:51

She took one huge class and

22:53

step by step, she split

22:56

it into. something like

22:58

15 smaller classes. and I

23:00

basically illustrated the whole

23:02

thing. So, and yeah you

23:04

can see it in

23:06

the talk itself. I mean.

23:08

kudos to Sandy Metz for like kind

23:11

of basically doing this for

23:13

so long. like and giving

23:15

good talks right on it. But

23:17

yeah I I definitely am coming

23:19

around to the thing here that

23:21

having a visual would make communicating

23:23

about that stuff a lot faster. because

23:25

I think one of the things that I've definitely

23:27

encountered. is that while

23:30

I have spent a lot of

23:32

time. looking at talks like Katrina Owen

23:34

is also really good at this, right? But

23:36

like watching talks And

23:39

reading about stuff and I feel like

23:41

I'm pretty good at identifying these things,

23:43

you know And I'll comment on them

23:45

in and things like this. I feel

23:47

like it's a very hard thing even

23:50

for programmers who you know we were

23:52

like, ah, programmers are smarter than the average bear

23:54

and therefore they should be able to. to

23:56

get this stuff, I think

23:58

it's a hard concept. for everyone. Maybe

24:01

visual language would help overcome some of

24:03

those barriers. I know for me

24:05

it definitely would. And

24:07

just take the example, this kind

24:09

of like off topic, but

24:11

related, but like a Kanban board,

24:14

a Kanban board usually has

24:16

three columns To do, doing, and

24:18

done. And that's great for single

24:21

-flow tasks, tasks that don't

24:23

require anything other than a

24:25

to -do, doing, or done. You've

24:27

the most important column, which is

24:30

the won't -do column. Yeah,

24:32

Yeah. yeah, if

24:34

But anyways, my

24:36

problem with that kind of

24:39

style. is that you don't have a

24:41

great visualization. Okay. so this story

24:43

that we have now developed this

24:45

feature on, it's done. What is

24:47

done even mean? Does it mean

24:49

that it has gone through the

24:51

proper code reviews that it has

24:54

past a QA checkpoint that

24:56

it's been deployed, know, what

24:59

does that actually mean? So

25:01

in a CIECD kind of

25:03

world where, or a more

25:05

proper development life cycle world,

25:07

you have many more steps

25:09

than just to do, doing

25:11

and done. And so I

25:13

like my boards actually more

25:15

visual where you do have

25:17

several different columns, each column

25:20

representing the next step for

25:22

that story. So you're able

25:24

to that. see at a glance okay

25:26

all of my work is done

25:28

there's no more expectations for me the

25:30

sprint why don't that pull something

25:32

else in or learn something or do

25:34

something else so that way there

25:36

is no confusion of oh the story

25:39

is done but it's still actually

25:41

waiting for a review and waiting to

25:43

get deployed to our staging environment Something

25:46

like that. So I see the

25:48

visual aspect that we're talking

25:50

about here with the little dudes

25:52

being very helpful in not

25:55

only as a, for new developers,

25:57

but for seasoned developers to

25:59

see At a glance, what is

26:01

the current situation? Where are

26:03

things currently at? How healthy is

26:05

our actual code? actual What's the status

26:07

of our actual story? stories?

26:10

Just that at a simple

26:12

glance view, having knowledgeable

26:15

actionable information. Yeah,

26:17

I think it can be also

26:19

useful if you want pass the

26:21

Pass the knowledge about some

26:23

system you're developing. developing and like, especially

26:25

some part of some of some of

26:28

the system, of the system. you

26:30

can draw it in

26:32

this way. it in this way and

26:34

first of all, you you

26:36

this picture and then you

26:38

explain what it means like, what

26:40

it means. It's this way you

26:42

can get this more way to

26:44

a more things. way to explain

26:47

I guess you can hope that can

26:49

hope that people understand it

26:51

more that's more hope that I work

26:53

this way. work this way. I

26:56

I definitely am really into this image thing. thing. I

26:58

think I also agree with you, Dave, right? you, Dave,

27:00

right? I agree. I I have a small

27:02

critique, I but I must agree the the board

27:04

thing. board thing. would say because my my

27:06

board, I think everyone has a combo

27:08

on board that board make a trade off

27:10

decision between having enough columns to actually

27:12

capture all the states that you care

27:15

about, all know, because my combo on

27:17

board is like You columns my combum board is know,

27:19

seven columns big on. I'm

27:21

focused on. Well, did you get get the

27:23

seven? All All right, so I have the like

27:25

the needs column, right? right the actual backlog.

27:27

know then you have in then you have

27:29

in progress, in I have an which column,

27:31

which means that, else is somebody else is

27:33

supposed to thing at this thing and do,

27:35

you know. and then do something ready to there's

27:38

a ready to deploy column. a completed

27:40

and then of then of course box right because

27:42

you you can't forget the ice box or

27:44

seven. Okay well well that visually, I

27:46

have a large screen here and that

27:48

visually takes up the whole screen. If

27:50

I'm on my laptop screen, screen. I think

27:52

the the column is hidden, you know. hidden,

27:54

you know, that's not good. It's a wide board. ban board.

27:57

Right, but anyway, so I'm not trying

27:59

to get to get too... down in nuts, my

28:01

point is is is visual information

28:03

being. being from this.

28:05

this, but but I think it's a

28:07

stretch. prop, like, this is a This is a

28:09

problem where the illustration is stretched

28:11

too far. far, right? And I think think

28:13

that what is making me really

28:15

comfortable about this code thing so far,

28:18

I least so far right, can't think

28:20

of a way right in which

28:22

this I think Yvonne, I think if

28:24

on like you've captured most of the problems I

28:26

can think of so we're just talking

28:28

about about. a a high bandwidth communication

28:30

solution for something that's a problem

28:33

right now. It's just an easy

28:35

sell, I think. right I

28:37

mean the potential is

28:39

enormous. the potential is and

28:41

I really liked I really in

28:43

your talk bit you talked about

28:45

the exceptions. talked and how

28:48

you visualize exceptions.

28:50

visualize exceptions as a Yeah,

28:52

basically things go wrong

28:54

go wrong and you should should understand

28:56

me, though. me Most of the

28:58

things the things I... haven't even tried

29:00

tried to, it was was not. like

29:03

they really really drive you

29:05

when you you get basically

29:07

of your universe, like you

29:09

basically think, all right, and how this thing

29:12

will look like. thing will look

29:14

like. And it's, it's,

29:16

it's obvious now, now, like,

29:18

something wrong, the should want me. That

29:20

was really evocative. And

29:22

what immediately occurs

29:25

to me occurs to some

29:27

kind of monitoring

29:29

system combined the concept of

29:31

the... regurgitating exceptions

29:33

with the can

29:36

assign the regurgitations

29:39

can assign the you can see to

29:41

the dudes so you can see

29:43

which classes are being physically

29:45

sick. I did just look through

29:47

the repo. There's nothing

29:49

about failing the guy in the guy throwing

29:52

up. not not implemented

29:54

yet. Well my my weekend

29:56

gone. In some ways, some

29:58

ways this reminds me of a gym

30:00

that I played around with a

30:02

while ago, several years ago, ago, rails

30:04

ERD, but But this has a

30:07

much better at a glance of

30:09

communicating. data

30:11

in state of of your Rails application. So I

30:13

I think it's really cool. I

30:15

may check this out a bit further.

30:17

a bit I do have some

30:19

problems problems of of the things

30:21

that struck me as odd

30:23

me the methods with too

30:25

many lines of code in

30:27

them were depicted as as arms. So

30:29

the So the methods of

30:31

the arms are ready. And

30:33

when they have too they have too

30:36

in them, they become in them, they

30:38

become not exactly

30:40

like this. exactly

30:43

like is method is

30:45

then then you have a

30:47

long arm. arm and your arm

30:49

swollen if there is

30:51

too many conditional logic

30:53

in it. in it. So it means...

30:56

like you get it, right?

30:58

right a complexity score. It's

31:00

kind of, it's kind

31:03

of so because here

31:05

it's used here it's used

31:08

to to the nature

31:10

of complexity of is

31:12

what we this is

31:14

what what I came to so

31:16

I think. with this

31:18

this approach you can show you can

31:21

show that there are

31:23

two types of complexity. One

31:26

One is internal, where you

31:28

where you have arms, arms,

31:30

long arms methods, and many

31:32

methods and too many

31:34

internal methods. This

31:37

is all internal complexity

31:39

And external complexity is

31:41

where where you have small classes,

31:43

but you have small classes, but you have

31:45

tons of them. the point I was

31:47

making in the point I was

31:49

making in the end

31:51

of my talk, after I

31:53

demands talk, that is that complexity

31:55

actually didn't go away. away. It just

31:58

form. the form. So...

32:00

And so it was all it was

32:02

all internal complexity. It was all in

32:04

one single class. And now we

32:06

have 15. we have 15 classes. the

32:08

complexity is now external, is

32:10

so we managed we in

32:13

this way. but sometimes way.

32:15

But you can have a lot

32:17

of lot of but it's still

32:19

hard to deal with those classes. with those

32:22

it means So it gone

32:24

too far with far your OPE

32:26

or like basically So that's

32:28

the idea. idea. And I think that

32:30

think are saying when we are saying

32:33

that we in like the good code, the whole

32:35

question is the whole question

32:37

is about the balance between

32:39

internal complexity and external

32:41

complexity. So sometimes it's okay to

32:43

have to conditions. Sometimes you have

32:45

to have to into into

32:47

polymorphic classes. but that's

32:49

that's up to you. decide. Yeah,

32:51

I think I think that's That's kind of

32:53

what what I was. Hinting at a little

32:55

bit earlier, earlier, right? Like, I think

32:57

it's very difficult for people to actually

32:59

recognize. to actually and know where

33:02

they've put their complexity, right? right?

33:04

are really quick to recognize, you know.

33:07

you fat controllers and fat models,

33:09

but like but the hood, the

33:11

reason why fat controllers or

33:13

fat models controllers us is because us

33:15

is because of, you know, Okay, I have a

33:17

ton of conditionals in all of

33:19

my methods, all or I have a

33:21

million lines in every method, right? I'm

33:23

basically writing every code inside my OOP

33:26

writing imperative code and maybe

33:28

there's a maybe there's a there's

33:30

a different way to put that, right? Like maybe this

33:32

method is super hard to test or something, right? Like

33:34

there's a lot of reasons why you a want to

33:36

move it out. way to feel like. right? We're

33:38

like, look, if we can write easy

33:40

is super then. to test, or is pretty good code

33:42

and I can maintain it or whatever and

33:44

that's sort of like why way to measure. measure, that

33:46

our complexity isn't out of sorts. But yeah,

33:48

But I think the reason why this tool

33:50

is awesome. The way that I'm way that

33:52

I'm understanding from you, it's awesome awesome because

33:55

it makes it really quick to be

33:57

able to communicate to somebody else. else. This

33:59

is where are all the, this is how

34:01

all the pieces lie, right? Like, Like, okay,

34:03

there's a bunch of skinny long arms or

34:05

there's a bunch of fat long arms or

34:07

there's just fat arms or whatever. Like I

34:10

suddenly am giving you a ton of information

34:12

about where you chose to put your complexity. Exactly

34:15

right. And when I'm

34:17

talking about the optimal way

34:19

of developing using some approach,

34:21

like let's say Rails, I'm

34:24

actually talking about this. So

34:26

we can quantify the way

34:28

we work, like let's say

34:30

if we, like every

34:32

requirement we get from the customer.

34:35

we We can quantify in

34:37

a way like, here should

34:40

add a new entity,

34:42

like here we We

34:44

have a fork in business logic.

34:46

Here we have something else and

34:48

something else and something else. And

34:51

let's say we've done that. And

34:53

also, we can with this

34:56

visual approach, we can

34:58

quantify different approaches like

35:00

trailblazer approach, like dryer

35:02

bee approach, Hanami and

35:04

Rails and I don't know

35:06

Rails know plus service objects.

35:08

For every specific approach, you can

35:10

say that, all

35:12

right, in Rails, I

35:14

just threw another the in

35:17

my controller, and I'll be

35:19

fine. And you

35:21

can visually see that all

35:23

right this arm got got

35:25

bigger or got more Fetter

35:27

and with another approach.

35:29

with Hanami I've had

35:31

it. one repository, one service,

35:34

one class for my action.

35:36

And I see that

35:38

I've added another kind of

35:40

complexity. I've added three

35:42

more classes. And this

35:45

way you can compare. So you can

35:47

see that here we added internal

35:49

complexity, here we added external complexity. And

35:52

now with this approach we can measure.

35:54

for every typical feature we're

35:56

developing. think, of course, we

35:58

can, we can, we should. really simplify

36:01

this, but for

36:03

theoretical weights, it it should

36:05

be enough. this way, this way,

36:07

we amount of amount of

36:09

internal complexity, this amount of

36:11

external complexity, and we

36:13

can now compare those numbers.

36:15

those those numbers are. those

36:18

if we can. if we those

36:20

numbers, those numbers, we we

36:22

can find this balance.

36:24

We could find that optimal

36:26

approach optimal approach which would add...

36:28

optimal amount of internal complexity

36:30

and the optimal amount of

36:32

external complexity. This is what

36:34

I was talking about This is

36:36

I was talking that when

36:39

I think that it is

36:41

still is to find an

36:43

optimal way of managing

36:45

complexity in Rails applications in

36:47

whatever web applications. web applications

36:50

in bit. and Ruby. Well,

36:52

any language in any language because it's

36:54

its usage to usage to

36:56

the language itself. Sure, assuming

36:58

we put a value

37:00

to like a dude versus a fat a

37:02

fat arm, for example. we have

37:04

we have those values, then we should be able to compare them.

37:06

to compare them, right? what we're getting

37:08

at here. we're getting at yeah, you

37:10

basically you all the trade -offs you're

37:13

doing. trade-offs you're doing, changing this

37:15

thing for that thing. that This

37:17

is what you get. what you a fascinating

37:19

idea. I still think the think

37:21

the complex methods, the arms are

37:23

big, big. people might like that

37:25

because they like to have

37:27

big arms. arms so they think

37:29

that that these aren't swollen methods

37:31

of muscular. kind of muscular

37:34

Well, if you if you few

37:36

more segments to the

37:38

term, you will not like

37:40

not much. much yeah go look at uh

37:43

go get look at the go get, look

37:45

at the images on duty

37:47

or whatever. They look a lot

37:49

less like swole arms it like more

37:51

I don't know, have or like,

37:53

like those images those diagrams of of

37:55

in like biology class of of like

37:58

I don't know, know the she's wrapping

38:00

around your nerves or whatever that's called.

38:02

don't look like called. You don't Yeah, of

38:04

course, spool I said, it's a prototype.

38:06

It's a very simplistic It's

38:09

a very but still

38:11

able to express the initial idea, I

38:13

think. Oh, the initial I'm not critiquing. I'm

38:15

saying that I don't think you have

38:17

to worry about people confusing them for

38:19

swall arms. I think we're good. think. Oh, yeah,

38:21

I think I'm gonna add this to

38:23

a project I'm saying that I have a project have

38:25

a project out there right now that

38:27

I'm kind of working on on. And you

38:29

know, I'm running I'm running and Rail's best and

38:31

Rails Best Practices on it. I mean, it's a you

38:34

know, the mean, it's a pain in the

38:36

butt to test all three. to probably need

38:38

the dude's hub saying, but yeah, I bet we could, I

38:40

bet you could do this. you could do

38:42

this. be great. Yeah, and please be great.

38:44

some feedback. yeah, if give me some

38:46

feedback. you and see what you're doing

38:48

online, if people want to follow you

38:50

and see what you're doing online, where should

38:52

they go? N, N, N, N, N, N, N, N, N, N, N,

38:54

N, N, N, N, N, N, N, N, N, N, N, N, N,

38:56

N, N, N, N, N, N, N, N, N,

38:58

I guess. N, N, N, And yeah, I think

39:00

it's a good I think If a

39:03

good point. If you wanna

39:05

see other stuff I was

39:07

working on, it's can see some other

39:09

projects you can see some

39:11

other projects of mine. And probably,

39:13

of that's gig thanks on of

39:16

course, my I was working I

39:18

was working on as well.

39:20

ahead and let's go ahead and move on

39:22

to some you want do you want to

39:24

start us off? off? My pick, because

39:26

I've been doing it all

39:28

week, all week, is is Linode, the the

39:30

hosting company. I've been

39:32

watching some of their videos from last

39:34

year. from was, I

39:36

think, their 19th anniversary. their

39:39

And the founder was

39:41

pointing out that was

39:43

is an older company. older

39:45

Amazon web services for

39:47

cloud hosting. So check

39:49

them out. hosting. So check them out,

39:51

Linode Linode Linode.com.

39:54

I do my first one is sort

39:56

of a mixed PSA. PSA

39:58

slash know. know rediscovery, whatever. whatever,

40:01

back when I was like

40:03

super poor college you know,

40:05

working out was too

40:08

expensive. you know, I

40:11

did push -ups and sit -ups like all the time.

40:13

That was the same that I did. And, you

40:15

know, now. that you have to be

40:17

at home. you know, just like reminded,

40:19

I've been doing my push ups and sit again.

40:21

I've actually been doing it for a

40:23

few months, but I'm but just like

40:25

of how awesome a choice that is

40:27

since I can't go out to work

40:29

out anywhere else. So yep, That

40:32

was pick number one. I've got to ask,

40:34

how many push -ups can you do? How

40:36

many can I do or how

40:38

many do I do every day? Cause

40:40

those are completely different numbers. Well,

40:42

I want to note both the numbers.

40:44

Okay. Well, I can do about.

40:47

50 or 60 in one go. Which

40:49

is, I don't know, it's God. you're

40:51

going end up looking like one of Ivan's method

40:53

people. I feel like if I looked like one

40:55

of Ivan's method people would be harder for me

40:57

to do those push and sit -ups. But,

41:02

But, you know, I do I

41:04

do 20. in two sets every

41:06

day. So because you

41:08

don't want to go to your limit. whatever.

41:11

Anyway, I should I should be jumping

41:13

it up to 25 soon, I think. and

41:15

I'm not feeling it yet. Okay, so

41:17

the second thing that I was trying to,

41:20

But my second pick is, So

41:22

I have an acre and a quarter. and

41:25

I'm backed up to some woods and the

41:27

whole area around me is very woody

41:29

and stuff. So I have lots of brush,

41:31

things that are hard to mow around.

41:33

I live on a hill. You

41:35

know, so, like, I can't,

41:37

I can't mow that hill, at

41:39

least not on a riding

41:41

lawn mower. so I do, I

41:43

have, you know, a pretty heavy duty

41:45

weed whacker, you know, and I've just

41:47

like, you know, I don't

41:49

know, I bought the thickest string that

41:52

it could handle or whatever, cool, great. But

41:55

it, it's just what, I don't know, it just

41:57

broke all the time and everything. So anyway, the

41:59

thing that I'm picking picking is bought a

42:01

head to replace it. that I could

42:03

not only use sticker stick or string

42:06

but that I bought bought a head I

42:08

cut off these cut off these eight

42:10

inch strings and just stick in in of

42:12

having having like a reel that bumps and bumps and

42:14

then like, I don't know, stops

42:16

working for whatever reason. Anyway I've been I've

42:18

been super happy with the fact that

42:20

I like replaced my head. So

42:22

I'm not saying you should do exactly

42:25

what I did, but I what I

42:27

up online looked stuff worked how the stuff came

42:29

away. came away. I bought a head, head,

42:31

replaced it on my weed whacker. wacker,

42:33

and now, instead of taking two and a

42:35

half hours, a it takes two. it

42:37

takes lot of time, a about a half

42:39

hour, but that's a half hour of me

42:41

being pissed because my string broke. hour of

42:43

like me being totally worth it. my

42:46

it's just been a better experience. So yeah,

42:48

I know, find it. Yeah, head that works

42:50

for you. a That's my pick. So

42:52

yeah, I don't know. do you have

42:55

any picks? wacker head that works for

42:57

didn't prepare anything. Cool. But

42:59

well, I would say I would

43:01

you never tried If you using

43:04

if you're into if code

43:06

and try using using

43:08

VS Code remote I switched to

43:10

this way of working like

43:12

several months ago. months I

43:15

start new projects, I no

43:17

longer set it up on

43:19

my local machine. up on I

43:21

simply spin machine. I

43:23

simply spin up another virtual on

43:25

Leno, on Scale Way, on Amazon,

43:27

Amazon stuff, set up my

43:30

stuff my stuff

43:32

there. and simply

43:34

work. VS Remote, work as it's

43:36

in my local, as it is

43:38

on my local as it is

43:41

on my local machine. tried that, I if you

43:43

never tried that, I highly recommend it.

43:45

And I'll jump in with jump

43:47

in with a few So

43:49

So the first pick is the

43:51

discount code learned from home. on a

43:53

a site that I run Drifton

43:55

which is a series of I

43:57

believe I'm up to over 230.

43:59

230. now. So learn from home. And a from

44:01

home. as far a second pig,

44:03

as far as just talking

44:05

about code quality and stuff,

44:07

a a pretty cool gym

44:10

called Reek, which will give you

44:12

a nice of of more

44:14

of a table visualization similar to

44:16

what SimpleCov does of all the

44:18

all the different complexity issues that

44:20

you might have within your application. And

44:23

a a third pick, which is kind

44:25

of more of an anti an anti-pick, it's

44:27

a is I've been really diving a

44:29

lot more into a lately. and

44:31

it's a lot of fun. and it's been

44:33

having some enjoyment doing it,

44:36

and then also a lot

44:38

of frustration. also a lot of kind

44:40

of a So that's kind of a pick,

44:43

have another episode on have another

44:45

stuff on that that you can that

44:47

about how your views have evolved

44:50

or not evolved or not evolved. Well, so I will say

44:52

I am I will say, I am

44:54

working on a pretty cool templating

44:56

thing going I'm going to start. my

44:58

new all my new applications, not the

45:01

ones that I do for Druchmaroo because

45:03

I because I but any application that I

45:05

do personally, it's going to

45:07

have the is going to have the

45:09

file built into the

45:11

new Rails app. It's going

45:13

to then also generate

45:15

all of the files for

45:17

deploying that application over

45:19

to a Kubernetes cluster that

45:21

that enabled. So all you

45:23

have to do is

45:25

deploy it to create a

45:27

whole new environment. create a whole new

45:29

environment. So that quite a bit lately.

45:31

with that quite a bit but also Cool.

45:33

give a thumbs up for Reek a I do

45:35

use it and I do love it, right? I

45:38

do love it. just hate having

45:40

multiple. code quality checks in

45:42

one tool, and I also don't want to

45:44

go out there. to go out for one either.

45:46

pay for one I think there's

45:48

another one called one called something

45:50

like that, which will actually

45:52

do all of the the changes

45:54

for you. And it's a

45:57

pretty safe one. think safe one.

45:59

I think test double makes it. Remember, it's been a while

46:01

since I've seen it. I've seen vaguely recall it,

46:03

I'm just checking checking out. It is that

46:05

is the same. I beat. That is the same. Yep.

46:07

All right, well. Yvonne, I Yvonne, I appreciate

46:09

you coming on and talking with us.

46:11

us and that's a wrap. a wrap. guys. Thank you

46:13

guys. Thanks for inviting me. for for

46:15

coming. Yeah, thanks. thanks. That was really, really

46:18

interesting.

Rate

Join Podchaser to...

  • Rate podcasts and episodes
  • Follow podcasts and creators
  • Create podcast and episode lists
  • & much more

Episode Tags

Do you host or manage this podcast?
Claim and edit this page to your liking.
,

Unlock more with Podchaser Pro

  • Audience Insights
  • Contact Information
  • Demographics
  • Charts
  • Sponsor History
  • and More!
Pro Features