Today's episode of the technology on our podcast is
proudly sponsored by emergence. The Journal of business agility.
This quarterly publication brings you inspiring stories
from the most Innovative companies and explores the
themes of the new ways of working reclaiming management
and humanizing business. It brings together a curated
selection of exclusive stories by great, thinkers and
practitioners from around the globe that can broaden your
horizons and Spark. Your creativity.
Each issue is hen Illustrated. And contains 100% pure content,
use the promo code tekhelet eech leads2results been percent
discount on your annual subscription.
Visit business agility, dot institute's less emergence, to
get your addition and support the publication supporting your
podcast. Here's the link One More Time.
Business agility, dot Institute, / emergence.
The idea of the Fievel is that seriously, good software is not
too soft for the works. That it's not just soft word
that satisfies its functional requirements.
So it does the right thing but it also does it in the right
way. And the first, there's many
different ways to measure how fit and how good your software
is I think what needs to be more Focus.
Both motivation and in some Industries or non-functional
Bolton's things that are not immediately visible outside.
Box are still very important for the future evolution.
One of the software or for its performance.
Hey everyone. My name is Henry Surya.
We Robin. And you're listening to the
tekhelet Juno, the show will be bringing you the greatest
technical leaders practitioners and thought leaders in the
industry to discuss about their Journey ideas and practices that
we all can learn and apply to build a highly performing
technical team and to make an impact in your personal work.
So let's dive into our Journal. Hello again, to all my
listeners, welcome back to another episode of the
technology, you know, podcast. Thank you for spending your time
with me today, listening to this episode.
If you haven't, please subscribe to technology, you know, on your
favorite podcast apps and also follow our social media channels
on LinkedIn, Twitter and Instagram, you can also make
some contribution to the show and support the creation of this
podcast by subscribing, as a patron at technology.
No, dot f / Patron, and Help me to continue producing, great
content every week. For today's episode.
I'm happy to share my conversation with Marco Fila.
Marco is an associate professor at the University of Naples and
the author of seriously good software as what the title says.
This week. We are going to go back to the
basics and discuss the important things that define good software
quality in this episode. Marco explained what he means by
seriously good software looking at the software quality from
Different perspectives, such as internal versus external
qualities and functional versus non functional qualities.
We then dive deep into several of those software qualities,
with some practical tips on how software Engineers can improve
their craft in order to produce high quality software.
Some of those qualities that we discussed our time and space
efficiency, reliability, readability, reusability, and
thread safety towards the end. We also touch on the concept of
minimum viable code. Why?
Why it is important for us to have an idea of what the ideal
code should look like while still being practical in,
finding the right compromise to produce.
Good software. I enjoyed going back to the
basics and learning about the different software qualities
from my conversation with Marco, and I hope that you will enjoy
this episode as well. Consider helping the show by
living it a rating or review on your podcast app and you can
also leave some comments on our social media channels, though.
It may seem trivial, but those reviews and comments.
One of the best ways to help me get this podcast to reach more
listeners and hopefully they can also benefit from all the
contents in this podcast without further Ado.
So let's get this episode started.
Hey everyone, welcome back to another episode of the tech
lead, you know. So today I have with me Our
Guest named Marco phyla, so he's an associate professor of
computer science at the University of Naples in Italy.
He also does a lot of research in terms of computer science.
He's a passionate Teacher and a programmer.
He's been teaching Advanced programming class for the last
13 to 15 years and he published quite number books as well.
So one of it is seriously good software, a book, published by
Manning publisher. So Marco is really a pleasure to
have you in the show today. Looking forward to talk about
all the programming stuff today. Thank you.
Thank you so much for having me. So Michael maybe in the
beginning, for people who don't know you yet.
Could you introduce yourself? Maybe telling us more about your
career Journey, any kind of highlights?
Turning points in your career. Yes, so I was born hearing
evidence, often deeply, and I did most of my studies here in
University of South Alabama. That's in the South for legally.
So I did my bachelor master and PhD level during my PhD and then
move to the US and spent a couple of years at the
University of California, Santa Cruz, which we saw great things.
It's a great town. It's a great campus in salt.
Oh, the forest. It's really beautiful.
I spent three to four years. They're finishing, my PhD.
And then as a post law, that was really changing experience of
many powerful experience. Probably the most productive
time in my career. So I have a broad time born when
I fight for a permanent position back home ill.
So on back home boy and became an assistant.
Professor at University of Naples.
That's the biggest city in southern Italy.
Like to visit the u.s. From time to time whenever we
can, obviously not this latest two or three years, but I tried
to visit why recline? And then I was promoted as an
associate professor of a couple years ago.
That's pretty much my career, topic wise.
My research is actually in theoretical computer science.
So I nibble double life academically speaking because my
research is reticle, but on the other hand University asks me.
Me to teach practical programming topics, but on the
other hand, I really like it. So loo, like both words, both
the theory world and the Practical programming world.
So I really enjoy teaching Advanced programming for 15
years and also a variety of different types of programming
classes, like teaching low-level programming C, programming and
low level operating system, Unix system, programming, and pulse
source and software engineering philosophy.
So, A broad spectrum for programming topics from this
variety of topics. I came up with we will probably
only mysterious we could talk to Allah.
Thanks for sharing your journey. So one thing I notice is that
you spend most of your life in the education industry, right?
So becoming a professor doing a lot of research and also
teaching a lot of students. So one thing that I always have
in mind personally is that in this modern era of software,
engineering. What is the actually the role of
Education in your point of view because there are a lot of of
mixed opinions about this. Some people say you don't
actually need computer science to be a software engineer, but
there are also people saying that okay, you need some
fundamentals that you can learn only through studies.
So what's your view on this being in the academic for quite
a while? So of course, my view is going
to be quite biased. First.
My whole journey has the in Academia and some Educators.
So I'm practically bound to think that education is really
important and I do think that I'm aware of the discussion.
Also believe that there's many exceptions, many cases where
smart people have one break things without completing their
education or perhaps even without any formal education.
I think that's even rarer that less likely.
But of course, it can happen. On the other hand.
I think that regular formal education path is just safest
and most likely weeks to get into To the business and into
the industry, on progress, into the industry.
And start with the right buttons to start with a good foundation,
is the best way to fry in the industry and to be flexible and
ready to adapt to new and changing Technologies.
So in this sense, for example, a lot of people also saying the
education curriculum, the things that we have pot in the
university for example, are probably not so much.
Relevant in the modern day. Israel of startups are driving
and they use a lot of cool Technologies modern
Technologies. And somehow I think the
curriculum for some universities, probably do not
catch up with that. So in your view, what has
changed in the last few years, in academics, can we now rely on
University to produce a good quality software, engineer,
WhatsApp or false, your mom? I will heart.
Before picture. I can talk about my own
experience. And of course, that's somewhat
cynical than perhaps needed to. Special lease or a particular
base newer. So in my old one.
I think we do a pretty good job of teaching a good mixture of
foundational and practical up today.
Topics. For example, we are in
partnership with local companies and local IT company in
swinging, send our students to. So we have agreements with local
companies or Bachelor students. Spend a couple of months at the
end of their Mega spend a couple of months inside working there.
So we are in touch with their supervisors.
And we talked with them about the requirements.
What technologies they use? And of course, we do go all the
way to teach specific Frameworks because we think that's not our
job, but we tried to design a path on educational path that
goes in the right direction. So, for instance, with the right
programming long book to us up to date.
It with modern versions of both languages and modern constructs,
for example, on usually the Java.
So I will update the reaper own to include the recent
directions. That Java is taking like more
functional stuff or the stream Library.
More concurrency. We introduced Android as a
relatively newer operating system and ecosystem and stuff
like that. So since you have been a
professor for quite a while Do you have any message for those
students who are still studying? Maybe their undergrad or maybe
their post-grad? What message do you want to tell
them to make use their time during the university?
Perhaps I'd like to turn it down and to try to enjoy their time
there during their education to and door and try to enjoy even
the more theoretical or the stuff that looks not immediately
after Coble because I think Adams most of it is still going
to be useful. Or at the very least so think
more clear need to develop abstraction.
You are feeling for obstruction and structure even topics like
physics and math. Even if they're not directly
related to your future of programming or software,
engineering job. They still helpful to you into
the right ring, working for right mind salt.
So, let's move on to your book itself, which is titled
seriously, good software, the term serious.
Lee here, I think must mean something, right?
So maybe can tell us a little bit more.
What do you mean by seriously? Good software.
So, what I mean by that even though the vehicle was Manning,
the idea I was going for more functionally like exercises in
style because many of the book is to present the same small
class. So in small, toy example, in
many different ways of optimizing for different
software qualities, maybe we've all talked about V.
Do so Manning came up with this cycle.
It's probably more flashy. I trust them were great.
We'll have a great marketing department.
So I'll Trust, they're feeling. So, the idea of the title and
the idea of the book is that seriously, good software is not
too soft for the works. That it's not just software that
satisfies, its functional requirements.
So it does the right thing, but it also does it in the right
way. And the first, there's many
different. Ways to measure how fit and how
good your software is. For example, you have loyal
readability so which is a non functional quality because the
end user is not aware of whether your software is readable or
not, but it's still a very important role because he
perfects maintainability Soul software is certainly going to
Hive box. It's certainly going to need to
be modified standard and for what you have read.
Probably was it's going to be easier or harder to fix it or
modify to evolve it in general. So that's just an example of a
non-functional quality that since often undervalued.
So, at least once again, from my educational point of view,
mostly focus on functional or this medication, but I think
there needs to be more Focus both in education and in some
Industries or non-functional qualities things that are
Immediately visible outside parks are still very important
for the future evolution of the software or for its performance.
To speaking about not just about functional requirements and not
just whether it works or not, whether it gives you the right
output. But there are also other
qualities, which probably will discuss a little bit further,
but obviously, there are so many software Engineers or maybe not
just software Engineers sometimes because of the demand
from either like the business people or from the Company to
Just Produce software as fast as possible.
What do you think we can do maybe as a profession, or a
software engineer? What we should do in terms of
personal situation. If we are about to write these
kind of software. How should we convey the message
that actually, the things that matters is not just about
whether it's working or not based on an input and output.
I think you can accrue to the problem at different levels.
For example, if you are a junior programmer, so then maybe you
don't have the Our snow by. So you're just being a deadline
and you have to do your best and you cannot move the bad one.
You probably cannot even argue for different objectives.
Infants requirements. So what can you do as a junior
programmer, as Junior programmer?
I think you should. First of all, develop an
awareness of the different ways. You could be programming your
little function, or your little class, or your large subsystem.
And of course, this comes naturally with the experience,
but maybe my book and give a little out there.
Cultivate nice, awareness. That there's also some different
ways to program. Even a little units, even a
small class. Sometimes even a small fortune.
You could do that, that five some different ways, and maybe
they'll take the same time to you.
So, it's not that you have to think before a month to find the
best one. But if you just hold 28, these
awareness of the possibilities of the variety of ways.
I'm you'll get used to it. Then many in that short.
Find that you are given. You can do something better.
You can evaluate different possibilities in your mind
weekly, you might want to spend a lot of time going forward.
If you're used to it, the different possibilities.
Just come naturally to your mind.
One of those experienced programmers.
I think you're naturally going to that state, but Junior,
programmers need to actively pursue this mine salt.
I would say and then In your little since then in young,
people find that your Giver, you can do something better.
You can evaluate different person, you know, this and pick
the right balance, and let me also add that the right balance
between different qualities, balance between performance and
readability, and so on, and robustness and zones.
For, and right amount of testing Etc.
Describe Palace depends on the compost.
So you should be aware of the possibilities and the same time
aware of the context of your application.
And depending And on the type of product you're making you should
emphasize one software quality over the hours.
So speaking about software quality.
I know that you have this quadrant, that you mentioned in
the book, which is quadrant about internal versus external
qualities and also functional versus non functional qualities.
If we can, you give us a little bit of overview.
What do you mean by all these different quadrants?
Yes. I have.
This tool used to distinctions, of course their classical
software engineering. Particle result will come up
with them. So, the first one is internal
versus external qualities, and this is the distinction between
qualities that the end user can actually see, and these are
called external qualities. So, for example, correctness, of
course, functional correctness of the program does, what it's
supposed to do? It provides the right
functionality. That's an external quality.
And The Time Performance is mostly an external quality.
So if your program takes one second for 10 seconds to perform
its actions, that's Very visible to the user on the other hand.
So the distinction is not so clear cut because if your
program takes one millisecond or two milliseconds, you can argue
that it's visible or not. Well, it depends.
If it's a user fees in program. Then it's not action to be
visible because it's exactly the same for the end user.
On the other hand. If it's lost service that's
going to be used inside a larger program.
It may be fun feasible that single action.
The one versus two millisecond action is To be taken one, we
and fights in a row, then we'll pour see the funds least call.
So that's the first distinction. The other way to distinguish
software qualities is functional versus non functional.
Once again, functional means what's the problem boss like
correctness was lonely remarks, and non-functional means how it
performs the past. For example, how much memory
takes? How much Network bandwidth it
requires. Those are non-functional, all
this. The readability, which I
mentioned earlier is, one of the major non-functional qualities
people's. It's both internal and no
functional. But it's still working for
Concordia is always mentioned, are you?
So, when you construct this Squadron, right, for example,
you have maybe internal and functional and internal
non-functional and receive a sir.
So, in your view on this a there, any quadrant that is more
important than the others, or how should we read this
quadrant? Because there are probably
different qualities that recite in.
Got the quadrant either. Think that in principle any
quadrant is more important than others.
I just think it's so useful. Mental tool to have also on
think once in some occasion and some Industries.
They perhaps could too much weight on some of these
quadrants of degree. They put too much weight on
external and functional qualities and too little weight
on the others. Whereas I think principal
they're all equally important or if you want to be more precise
and more specific in different contexts and different
Industries, one for them to maybe more important than others
but not in general, really depends on the campus.
So speaking about some of the important software qualities.
I know you mentioned in the books.
There are couple of them. In fact, you break it down in
different chapters in which there are multiple exercises.
For each of the chapter that people can do.
Following the toy project that you They're so let's go through
maybe one by one, starting with speed or time efficiency.
I think most people probably understand this, but maybe can
you describe further about speed and time efficiency?
Yes. So let me just take one minute
to explain, again, the structure of the book.
There's the single coin example, which is a single class.
It's a water container example, we were all a bunch of water
containers. You can pour water into them and
you can connect them. And that's it.
Very simple class, we method. It's the unique idea about this
log is to carry this example over and over with different
software qualities and optimize it.
Each final team has eight will be different objective.
And if it was for me, I would have done like a shorter book,
only one this example, the then my main wisely suggested to
Upward examples and exercises, a the book called of need to
narrow the road, probably, right?
And so that's not the only example in book.
So in each chapter, I treat the software:.
I've show out that main example would be optimized for that
quality, and then I'll talk about some other examples.
And then, as you said, there's also exercises at the end.
When you can apply both optimizations to a different
example on different checked, some solutions at the end.
And so, I have a chapter for each 7 software fullness.
The first one is time, efficiency, as you said.
So time efficiency, I think is one of the qualities that all
software Engineers have in mind. Most of the time it's not Not
one of those qualities where you rehab to stress some point for
size, but still, I think it's a very nice example, on the shows.
How sample course, theoretical foundations that I was talking
about. All year, can really make the
difference. So, for example, on this simple
water for cleaner. Example, Global Hub, in the
book, in this chapter have different simple.
Implementations with different data structures.
Represent this water containers with sets of lists and From
paired, then from different points of view, particularly
from fine performance. And if you check the box, you'll
see that if you use a more specialized deeper structure,
which is based on trees, then you can be up to two orders of
magnitude speed in a typical use case on this photo container.
So if you go 100 times faster, if you mul the right data
structure, I think that's a great point to prove the
usefulness or formal education where you learned.
Some specialized data structures.
It may seem to you that you're not going to use them.
But then also showing the bulk even such a simple example,
where if you look at the specifications of this water
containers, I think you would never guess that such a
specialized data structure is called Union.
Find trees. You would never guess that.
Such as data, structure will be so helpful.
In this case, speaking about data structure.
I think that this is also one of the most fundamental theory that
I think as a software engineer we need Will be exposed to as
many as possible. Obviously, not all data
structures are used frequently. So most probably people are
familiar with Lisette map dictionary.
But yeah, I agree that so many software Engineers, probably
rely too much on just this Primitives and in fact,
different implementation of for example, this also matters for
example, link this forces array list and things like that.
So I think. Yeah, thanks for emphasizing
that again, that actually just by implementing a correct data
structure. You could gain a lot of for
example, time if Efficiency right, just by changing a
magician. So moving on to the second
quality, which is about memory or space usage.
This is also probably something less emphasized probably than
speed but I think it's also important because these days
computer so cheap you can get a lot of ram.
You can put things on the cloud, so stay sometimes, it's not
really a size, a lot, but maybe from your view, what should we
care about in terms of space and memory?
Yeah, you're absolutely right. So space efficiency, even if
it's like a cars. In full time efficiency is
treated completely different time.
Efficiency is always on your mind towards a developer.
Where's space efficiency? It is really like a secondary or
perhaps sometimes almost considered irrelevant.
And of course as you say we have a lot swap cheap memory these
days ball Ranma and she persisted memory.
So, of course, it's correct to give its loss weight in General
on the other hand. Basically, there's two kinds of
situations for you. You want to check your Solis
Apartments your skin so you can see, they are quite obvious
which is when you have a lot of data or when you have a little
memory, and of course, there's still applications for you have
little memory. For example, to the extreme of
those would be infected microphones for labs.
So embedded, microcontrollers or everywhere.
There's tens or hundreds of them in your car.
There is consoled them in, your holster, in microwave and so on
and so forth is cyborg still has made Four kilobytes of memory.
So if you're going to program for bathroom unique, have to pay
attention to your memory requirements.
At the other end of the spectrum.
We have fun to vacations with a lot of data.
One dimension, one such fever will find more or less familiar
with which is not data analytics.
As you may be thinking. It's video games.
So video games have always had a lot of data.
So it's a very competitive market and the big five valves
in so-called. AAA, they really try to push the
graphics to the Limit? And one way to push the graphics
to the Limit has to have a lot of data, a lot of flex tubes,
one assaults as they're called. You have to squeeze all that
information in your disk and then RAM and your graphic units.
So that's another Big Industry where memory requirements are
big thing for me Falcon interesting that you mention
about video games because a lot of people actually think video
games all these Data is somehow do not see the importance of it,
but actually, as a video game developers actually, all you
need to do is really optimized. All these regarding space
regarding memory and also bandwidth, especially if you
play online games because you don't want to get the or lack in
between your actions. So again, thanks for
highlighting that. Moving on to the third quality,
you mention about reliability through monitoring.
So, actually, this is something that not so straightforward For
Me. Maybe.
Can you explain a little bit about that?
Yes, so I have two chapters on reliability and from goes on.
Very important qualities. It's so important that they
decided to split it into two flavors.
The second one, which maybe we'll talk about later is just
testing and ever course, is very familiar to every one of your
listeners. The other flavor, which is
perhaps less familiar, is what I call reliability, through
monetary know what I mean is it's kind of related to
defensive programming and it's also related to the well-known
design by contract methodology. So let me briefly recall what
I'm talking about. Year, the idea is to start with
block explicit contracts for your methods.
The whole book is focused on small units of product.
So that's why I usually talk about a single class or even a
simple method but then most of these Notions can be generalized
to larger or they choose. Let me talk about small units.
So design by contract up 52. A simple method means having a
clear and explicit contract for that mobile phone ball contract.
I mean, what are the assumptions that the method makes?
It's on its color and what are the guarantees that the method
ensures to its caller? These are also all precondition
and possible vision of this map in the Java world.
This is well established in the jdk.
For example, if you look at the official documentation, jdk, you
would see but it's expressed in a way, which is pretty close to
the design by contract methodology because that's the
most natural thing to do. You say, well, the method
expects from you. So for example, what kind of
Arguments, it's supposed to receive and also in what order
you should all sorts on functions.
Then what the method guarantees were the method actually does.
And what I need to explain in this chapter is how you can Bond
put some of these contracts into the pole.
Basically as assertions. So assertions are well-known
programming technique, most programming language up needs
all strapped. It's very similar to an, if then
else, but with an additional Double ability that you can turn
all these checks on or off at runtime, that will insertion is
if something bad happens. Then raise these exception.
But in such a way that the Run find, you can choose whether to
check these conditions during the execution or not.
The idea is that you should put all kind of assertions in your
program. So once again, it all depends on
the context this applies, especially to safety critical
software working really, really About reliability.
So in addition to testing, it's not an alternative technique.
In addition to fasting, you have these assertions at the
beginning of each method. And if you really want to push
it, you can also add checks at the end of a metal in chat that
the method actually did. What it's supposed to go.
That's the most extreme measure more than T.
So you poke always assertions in and then, during development,
you'll leave these assertions form.
And then once, You have a good feeling that the from to erect
or a few box or left. Then you turn off these
assertions because they're going to cost time and space and you
will want that simple action. So we found them all but they're
still there. They're still there in the cold.
So as soon as your hostel murderer fine, it's a new bug.
You can turn them on. Or you can instructor faster
more to turn these assertions on and these assertions will give
you a more precise feedback on what kind of father.
Was on whether some of your cold is all relating the people
vision of wild functions. And so on a lot of people also
actually approach this in a different ways.
Maybe it's related to the second quality of reliability that you
measure is through testing. Right?
So all these inputs and outputs or some other people probably
put that as a test case instead of inside the method itself,
which is what you call assertion inside the method.
So what's your take about this, which approach that you think is
maybe more relevant in one context over.
The other, I figured complement each other.
So the Aeneid first thing is to actively submit inputs to your
program to see whether what he reacts.
According to specification monitoring on the other hand is
just and reaching your program with periodic checks.
Okay, so nearly complementary to each other.
One is active positive. The other one is passive.
That's why I called monitoring. Both, it's like adding a monitor
on 4 October program and it's not severed.
Unfortunately. It's mixed these mixed in with
your program, is the addition of these assertions in your fault.
But ideally it would be like an added monitor that looks at your
program while it's running and passively checks some condition.
So one is an active process testing is an active process
whereas monitoring and assertions are a passive
observation finder process so they can Complement each other.
So, the idea would be to have both thanks for clarifying.
That so there's another thing that you mentioned inside, the
design by contract, which is the characteristics of invariance.
Can you, maybe explain what is invariant for people who want to
design their method properly? Yes, saw earlier.
I was talking about preconditions and postconditions
and that's the contract for the month.
And then if you look for Boca one method and you have a whole
class, most of the time you can identify.
I some properties that the pass objects should always have.
So, some properties of the data fields of your class.
That should always be true. If you can identify such
Authority, that's all done invariance.
It needs something that doesn't change, or at least it's not
supposed to change. So, it's something that you are
assertions can mount for, they can check that this condition is
all true. For example, that an integer
field should never be negative. So in Java You can have an
unsigned integer 5 integers won't always be negative.
But where you'll find your integer field should never be
mobile. That's a very simple environment
so you can check this environment before and after
each method. If you really want to implement
more hard, monitoring or concrete monitoring.
You can check that. Before enough for its muffled,
fat field is always non-negative.
As soon as it gets - you will basically know who is the
culprit. The baggage because first
assertion with raise an exception and you'll mobile
about. So, moving on to reliability
through testing. So, testing is also a big Topic
in software engineering these days.
In fact, there are approaches, like test-driven development,
quality Engineers, quality assurance anything that you want
to emphasize here in terms of reliability, through testing.
I will have much trouble because I know it's a very big topic as
you saw. World's biggest passions and one
Renewable student development and one of those.
Some stop to see is more socially in recent years.
Maybe this has gone too far. The emphasis on posting is
perhaps too much. I had to say, I don't have a
strong opinion about that. I leave me since passion to be
industry. Insiders album have the
Practical experience to have a solid opinion on this or in the
book. I'll just show a couple of basic
techniques to resign her post plan for of class and Compared
with the other technique, which is the amount of infamy, to be
honest. Of course, it's a to pocket page
for, and as you said, testing is a big topic.
But Time Performance is at least as big a phobic.
So all of the four weeks they've been talking about in the book
are very large involve, an extensive literature.
And so, in every chapter, I had to do a very strict selection of
a few interesting topics from each of these areas.
That's why at the end of the chapter I have A small section
with suggested reading with more books and learning materials or
learn more about that talk. So maybe a little bit deeper
about software testing because there are so many software
Engineers, these day. I noticed in the industries that
sometimes these Engineers do not emphasize really when they start
writing their class their method.
They don't actually think what kind of test cases that they
should do. What they emphasize is on.
Maybe the, you iPod, or maybe the Epi, if they are writing
some kind of apis. So in your view, what should we
do as sir? Engineer to actually inculcate
this practice that whenever you write a class.
Maybe you should think about what kind of test cases that you
should put in mind. Yeah.
Well, of course while standard and the easiest way is just to
and horse certain holding practices, there's code reviews
and in code reviews, you can include review above test cases.
So you can basically enforce that each class should have its
unit costs. It's appropriate to your system
to your kind of software on one review.
Those test cases involve code reviews that everyone iPhone can
l'industrie storm. Right?
So next is actually readability. So, I think for some people,
readability is a big thing for some, I don't really care.
I just want to write lines over lines of code as long as it
works. So what kind of balance in
between that you have in mind when you write this readability
chapter, it is something that the code that is what they say
is beautiful like a narrative when you read.
As a prose or it is something different.
Well, it needs basic form with abilities.
Just that your code should be understandable with middle F4 by
a different person or five yourself, you know, when a
little time has passed since you wrote it because as your
listeners, know, even your own Co-op, if you don't look at it
for a month and then you have to go back to it.
You probably forgot the details. And so you yourself will benefit
if You have written it in or readable manner.
So thinking about humans reading it or not.
Only about the compiler reading, that's the basic idea.
As I was saying in the beginning of YouTube you writing more
readable coal will obviously decrease the efforts to
understand it in the future. That's the immediate
consequence. But the most important found
some points that the long-term or medium and long-term
consequences that are soft for be caps, more maintainable in
the gaps. Circus for policy, defunct
easier to fix them, and especially becomes easier to fix
it in a way, that doesn't create new problems elsewhere.
Because you actually understand what was intended in that poll.
So then if there's a bottle, you can fix it with less fear of
creating new problems, all square.
Those great resources are there for readability, which I like
this, this chapter of on the most important ones to plastic
books, are clean cold. Bye Morgan and cold.
Complete both where my reference new saw him.
There's a lot of great information there.
Well, let me measure also support classic which is related
to mutability misuse their effect for info.
So in this chapter is summarized some of the most important
guidelines and especially adding my for example or the reference
because a lot, nice old war brought back to the same
example, so you can more easily appreciate the difference
between different objectives that Dots between different form
the objectives. So I think one thing I notice in
my experience you will know about readability.
Once you look back to your code and read it.
So, you will understand. Okay, is this code?
Requiring, a lot of a mental effort to actually understand
what it does. Sometimes also method that has a
long number of lines at the answers, are not so readable
because you need a lot of things to put inside your contacts.
Some of the guidelines are really easy to learn like
variable names, right? Needs to borrow.
Balls two functions, he be functions short.
As were say, it just takes only pull beaten some offer to apply
them. But the rules are very good and
I was at that maybe expertise of using the ideas because some of
these ideas, actually allow you to do some kind of shortcut
where you can change your code instantly.
So related, maybe to readability is the reusability concept in a
sense that you want your software, your function, your
method to be reusable, but I understand as well.
There are balanced here, like you probably do.
I want everything to be reusable.
Otherwise, maybe you're suffering becomes too
complicated. So what's your view on this
reusability? Yes, so reusability and used to
be a big selling point for object-oriented languages when
they came out but these days it's a lot less.
And for size. I think it probably was over a
whole size of the beginning because as you said, there's a
cost Heaton, your food more General, it becomes more
complex. More abstract and probably less
efficient and less readable, but you get that single benefit or
heat being usable as you were saying, you really have to find
the right balance. So I think in general you want
most of your colds to be optic chance to see big, not reusable.
You're going to have a few reusable parts and most of the
polls confirm to be abhorrent, fastened, and not reusable.
And this is also connected to the issue of Frameworks.
So Frameworks that prologue where tend to be very general,
like the framework. Like Sting boss, big Frameworks,
why we are like the best part of you zombie.
They managed to give General Services, the very successful
solo. You must have done something
pick the rights on all problems of eating and make it into
useful General framework, but on the other hand, if you rely too
much on these Frameworks, or you can try to avoid, Hope to
General. You'll end up with I caught
these, that's too abstract, and probably less salt in my store
course, probably the last quality that we are going to go
through his about thread safety. I think this is also one source
of sometimes flakiness, or race condition in some of the box
that are popular whenever in your career.
Are you find software that sometimes works sometimes
doesn't work probably is related to try safety.
So what's your view on this? What should an engineer be
mindful? All about whenever they write
software about thread safety. Yes, but for suggestion I make
in the book, more exciting for me.
Interesting to your businesses to establish a clear.
Concurrency policy for your voice.
Once again, a lot to talk about small units of hold because
that's easier to explain to understand.
You should generalize to larger systems, but take a single
place. If you know that your fastest
won't to be useful. I reviewed by different threads.
So, even before rushing to put in new taxes on synchronization
Primitives here and more you should first establish a clear
from currency policy and what s currency policy.
It's a rule, which says, which operation on this class can be
performed in parallel, with no synchronization, because they
affect different data and which operations installed need to be
serialized. So need to be synchronized
because they may affect the same level.
So think about this for a second, for some positives going
to be obvious because objects will be unrelated.
So everything that you do on different objects and going
parallel and everything you'd want.
The same object must be Cielos. That's a very fun case, but in
other cases, including the simple, the Apparently simple
water container example, objects can be connected with each
other. They can form like, route, the
whole pointers to each other and then the situation becomes a lot
more complicated. We have to think about different
currency policy and only, then you can check whether the
co-parents policy that you were aiming at is actually clementa
below and how to implement those and so on and so forth.
This of course, is for those unfortunate cases where you are
programming and low level on. You actually have to worry about
synchronization and fed safety or sale.
On the other hand, a much more General suggestion is to avoid
all these problems just use. Hi.
Higher level, concurrency. Primitives that your language or
your framework is going to offer.
So first of all, we should try to avoid all that mess on your
that synchronization messenger is condition risks and just use
what's gifting in your language or Frameworks.
For example, in Java. You have a thread safe
collections. So both collections take care of
something ization. You don't have to worry about
that about that in Java and what Harold screams since Java 8.
So our will stinks. Higher level kind of Elections
where you can perform. For example, with a single call
in the standard Library. You have parallel sorting
algorithm on the list. So you don't have to hold
anything just from this oral sort.
So, in other words, knowing your standard Library know, your
frame were on, try to stay on style, salsa Bowl in the
abstraction. So that always problems have
need taken care for you. I have been posted and you run a
lot more fewer risks in this form.
There's also another convention about this which I wrapped in
some books as well, which is related to immutability concept.
And that's also one of the big reason why a lot of people
actually suggesting about functional programming.
We're actually have a lot of immutability embedded inside the
construct, so that you can avoid these concurrency problem.
Any thought from you about this. Yeah.
So having objects that you can modify once you create it and
that's what you need to be easy means thoughts or a power pole,
too. All to avoid great conditions
for about a lot of the nasty box of comparison.
See I think that's a great direction.
For example, once again in Java, the Java screens work, best with
the mutable data. On the other hand.
You may have performance costs associated with the sample data
and because sometimes the context of the application
really requires you to change state of some objects, but if
you're mentally into an immutable, Global system.
Every time you want to change something.
You just have to create a new object.
That looks pretty much like the old one except for the change.
And of course this has a performance cost over the
standard imperative way, which is to change that think on the
fly. So you have to balance that so
probably eat you have a lot of fun parent C or if you have a
little concurrency, but you are in a really safe to greet people
occasion, where a fog could have seniors big fonts.
On his own, he 30 anomic funds again for money pain s is or
perhaps Health consequences. If you're working the hub for
technology business. Then glow within it ability.
Only a little performance fast modern about efficient immutable
collections, immutable patterns and would be safer my last
question on this topic, right? So as I'm relating my experience
working in startups, and especially we know this concept
about MVP minimum viable. Product is there such thing as a
minimum viable code, where you have enough quality in place so
that you don't over analyze and make your code.
Perfect. So to speak, is there such thing
in your view about minimum viable code.
Yeah, absolutely. So all of this, everything with
this fast, both are mental problems.
Those our aspirations. Those are AIDS.
You should be your goals. So I think it's wise to a more
to have a desire for the perfect hole.
But on the other hand, have a rough idea of what that ideal
code would look like, that's a poster, but then, of course,
distractible matters, there's deadlines, there's customers.
So, of course, you have to compromise.
I think the more you gain experience be easier for you to
find the right compromise. As I was saying at the
beginning. I have just 24 hours to deliver
something. What's the best trade?
All I can achieve in 24 hours, where And any experienced
programmer in 24-hour levels, right?
Whatever hands I'm in a rush. So, just write whatever comes to
my mind. If the works, I'll be done more
experience and more aware programmer.
If he or she has a little time would still consider different
options and go with the good enough solution.
And even at the end of this short time, 24 hours, he or she
will know what are the pitfalls with are the limitations of Of
these or her coat. That's great.
I mean, it's great to strive for a compromise.
But at the very least, you should be aware of how could be
fool. You didn't have time.
That's too bad. That's love but it's a great
achievement. If you'll go with your wearable
compromise, your thoughts on how you would improve it.
If your boss or your customer gives you an extra week.
You already know how to make it better.
So thanks for the tips actually, darling, the pitfalls of the
work that you just did. So I think it's also Important
thing especially creating an awareness of that pit for, as
well, for other people because sometimes your code is taken
over by others. So Marco has been a pleasure to
talk to you about all this software qualities.
I really learned a lot of things.
Myself, the fundamentals of software engineering, but before
I let you go, normally, I have this one.
Last question that I asked for all my guests, which is to share
about three technical leadership wisdom.
So Michael, would you be able to share your tree technical
leadership system? Yes, I will as my book.
We Are. Intended for a beginner to
intermediate programmer. So they're going to be quite
natural. What's the probability fact
business? The first one is a double
suggestion, which is possible. Try to read the great call.
So go out and look for grade Coke.
It's very easy to find. The first place where you can
find. Great, bold is in your standard
Library. So meaning, whatever your
favorite languages, perhaps you can stop from the things that
you use the most in your stand of laboum.
Maybe you use lists all the time.
Maybe you probably use strength all the time, bowing to the
standard library, and check out how they are implemented behind
the scenes. Let's connect it to in the 70s.
So if you do this, not only you will read with followed by the
same time. You will be looking behind the
scenes of the technology that you're using as another example,
perhaps Europe item person. Check out how python lists are
implemented, because python is very high.
High level language beeps. Hello our I love of build steam
cleaner structures, but if you actually go and check out their
implemented you're going to use it with more awareness.
Once again, I want to emphasize awareness very much.
You will ensure better quality software if you know what's
going on. Planted, finally, third and
final tip. This is connected to find
performance. We were talking about or more
which is value your users time, especially if you're writing
use. Facing software, multiple
occasions or even web applications your user time.
This extremely important like I'm on Twitter and some time
ago. I was reading someone
complaining of em, simple think that?
In Windows if you right click on a file, sometimes it takes 1
second or maybe even a little more than one cell phone to get
that little menu and I think he was absolutely right.
It's frenzy. It's a little delay.
The right people will say, it's just a second.
And I totally disagree with - it's absolutely right to
complain that 1844 GHz machine with 16 gigabytes of RAM of
human user should wait one second to get that menu.
Perhaps things having front since then.
I don't want to be a fair to Windows, but I witnessed this
myself for a couple of times. So really valuable use of time
which means pay attention to a formal.
Well, yeah. So I could relate to that.
So, thanks for reminding us about valuing our user side
because sometimes software Engineers.
We just rushed finishing, the requirements.
That's it. Like we don't really actually
use the system. So that's also another thing,
right? We don't use our system.
Definitely we don't value the time because you never use it.
Thanks again, Marco for this Pleasant conversation.
If people wants to connect with you, maybe talk more about these
stuffs online. Where can they find you?
I think Twitter is the best Channel.
Maybe I can share them for it on the website.
Okay, I will do. So, so, thanks again, Michael.
Thanks for attending this conversation with me.
Thank you very much. Thank you for listening to this
episode and for staying right till the end.
If you highly enjoyed, please share it with your friends and
colleagues who you think would also benefit from listening to
this episode. And if you're new to the
podcast, make sure to subscribe and leave me your valuable
review and feedback. It really, really helps me a lot
in order to grow these podcasts better.
You can also find the full show notes of this conversation on
the episode page at technically journal, the death website.
Cluding, the full transcript, interesting quotes and links to
the resources and mentions from the conversation.
And lastly make sure to subscribe to the show's mailing
list on technology. No, the death to get notified
for any future episodes. Stay tuned for the next
technique Journal episode. And until then.
Goodbye.