Golang Sri Lanka Meetup – JFrog Speakers on Go Topics

errgroup Package Overview & Designing for Go Developers

February 5, 2022

2 min read

Golang Sri Lanka February Meetup

errgroup Package Overview in Go
According to: https://pkg.go.dev/golang.org/x/sync/errgroup, Package errgroup provides synchronization, error propagation, and Context cancelation for groups of goroutines working on subtasks of a common task. In this lightning talk the Golang NYC User Group Meetup, Dima Gershovich walks us through errgroup use cases for you to maximize its uses in your everyday programming life.

Designing as a Developer in GoLang
Gone are the days when Software Engineers can assume the User Experience (UX) and User Interface (UI) is somebody else’s problem. The disconnect between Design and Development can often be a fatal one, with the success of your software implementation potential in jeopardy. In this talk, we look at The 7 Facets of User Experience by Peter Morville and how to consider them from a technical development point of view. We will also look at the “whys” of a design, so you can build a product that excels in functionality without compromising the designer’s vision.

Dima Gershovich is a Senior Software Engineer for the JFrog Security Team, and he has 5 years of experience programming in Go

Sushrut Athavale is a Software Engineer a JFrog on the Partner Engineering Team. He is a Full Stack Web Developer who is skilled in object-oriented languages including GoLang, Python, C++, and Java. He also has a passion for UX & UI design principles. When he is away from the keyboard, Sushrut loves to perform in the theater as opportunities arrive, and he considers himself a movie buff.

and Hosted by Chamod Shehanka Perera

#golang #golangsrilanka #gosrilanka #gdgsrilanka #jfrog

View Slides Here


Dima Gershovich

Software Engineer - Xray Team

Sushrut Athavale

Software Engineer- Partner Engineering

Sushrut Athavale is a Software Engineer at JFrog on the Partner Engineering Team. He is a Full Stack Web Developer who is skilled in object-oriented languages including GoLang, Python, C++, and Java. He also has a passion for UX & UI design principles. When he is away from the keyboard, Sushrut loves to perform in the theater as opportunities arrive, and he considers himself a movie buff.

Video Transcript

good evening all we are super excited to
have you all all here today we have the
truck dima and subscribe from jfrog team
chief traveling
today uh titra oh to you
hi everyone
we are excited to be here today so my
name is chitra i’m on the jfrog
we are excited to be part of uh your
meetup community tonight we have uh two
great talks uh from some of our jfrog
spookers for today first i will share a
little bit about jfrog we are the devops
software company
known best for artifactory which is
considered by many as the gold standard
for managing your artifacts and
dependencies in fact jfrog has a free
cloud version of artifactory for the go
community to use
it seamlessly with the uh go package
manager also if you are working for
docker as i know many of you are jfrog
cloud subscription is capable of
functioning as a pull through cache for
your docker hub and with our free
version uh you will be exempt from the
docker rates rate limits on pulls from
free and anonymous accounts also another
bonus for tonight we want to give you a
chance to win jfrog go t-shirts it will
be sent to you within three working days
three business days
i will drop the link for the
raffle soon in the chat box as well
i would like to share the screen
just give me a moment please
i hope you can see my screen
it try to receive it
yes so this is a
bonus for tonight what i was talking
about so we want to give you a chance to
win a free
go t-shirt which will be sent to you in
three business days so you can enter the
raffle by scanning the qr code or the
bitly link which i’ll share in the chat
as well
there will be a place for you to put
your address and also your t-shirts
t-shirt size on the form
so thank you thank you chamoth for this
opportunity we have two wonderful
speakers from jfrock for today so all
over to you
thank you
i can begin the presentation
yeah sure
all right let’s see tell me please if
you see my screen
can you see
yeah yeah it’s visible now okay great
okay hello everyone
i’m going to talk today about the error
group package
i’ll present an overview of this package
so just couple of words about me
i’m a software engineer in jfrog in
jfrog security team the x-ray product
i’ve been working in jeffree for the
last five years
all those years i’ve been working as a
go developer
so let’s jump right into it and before
presenting the package i’ll present the
first of all i’m sure that
all or most of you are familiar with the
weight group
weight group is a mechanism for a
synchronization of goal routines
the way it works is we define
this parameter
weight group
when we run
our go routines
before running the go routine
we add increment
the work group and after the go routine
completes running we make sure to call
done on the work group
and in the end like outside of calling
the goroutine we call the method weight
what this does is that weight will
block here on this line until all go
and then it can continue
so this way we can ensure that when we
exit weight
we know that all the workers done
are done with their job
so this is a very
very common pattern in go
but what is missing
there is something very very common that
we do in a go but
not clear
how to implement it
not obvious
what happens if we have some error
when running when our go routine of the
fails for some reason how do how do we
deal with it
maybe if the go routine fails we
want to fail the whole operation
right to say that if some worker failed
this operation didn’t succeed
so the regular way to implement it would
to pass to the worker some channel
some error channel and then we should
listen on it from outside and
treat it
but actually
there is a
very nice wrapper
this wrapper is called air group
it is not a part of the go standard
you should import it explicitly as a go
model but it it is official it comes
from google
and it actually it provides this
where it it is wrapper around the scene
and the implementation is quite
symmetrical so
instead of defining the sync weight
we initialize an air group object
then instead of explicitly running it
like that inside the go routine go with
the function
we’re calling the
go method on the air group
no need to to increment and no need to
dig to decrement anything it happens
and in the end when after we call g.wait
it will return the error to us if some
error happened here
then the error will be returned
so the jigo it
the signature is that it receives a
doesn’t get any parameters and returns
an error so if any of the workers
has an error
what happens is that the
air group
will also return an error
and this way we’ll know that
something happened here
some something bad happened by the way
this slide contains a bug
is anyone here
can anyone tell me what this bug is
is it allowed for the listeners to
participate by the way or they’re muted
can you hear me
yeah i think uh yeah participant can uh
comment in the chat so let’s see what
you guys comment i’m just curious if you
find the bug
in this slide
it’s a super common bug
okay i’ll just share it with you
if no one sees it or maybe people are
shy or still didn’t see
i’m sorry it’s kind of embarrassing this
bug but
it’s also a good opportunity to talk
about it
actually what happens here is that this
method starts asynchronously
and if it starts asynchronously then
variable is actually a reference
so this i it will actually be the same
if i’m not mistaken please
better to check it but as i see it
instead of using it as as is what we
should have done is that we should put
another variable called j say j equals i
because this i it is actually saved as
reference and this
way this way of definition of the
it is a closure
dima i think you need to re reshare your
screen oh i’m so sorry i need to share
my screen sorry guys
just a second yes
let me find this
share my screen
right so i’ll repeat
now we can
yeah so what happens in this example is
that this definition in inline
definition is actually a closure
when we define the closure that runs
asynchronously in the go routine means
that it actually captures this variable
the i variable
it captures it
and then actually it will be a reference
to this variable even when the variable
changes its value
the many go routines they will actually
have the same reference
this is another common goal pitfall so
in order for this not to happen we
probably should
put another local variable inside the
loop call it j and then no reference
will be called because j will always be
like copied it will not be reference
anymore but
this is another another topic so i’m
sorry for this bug
okay so this is a very similar to the
sync weight
but has the additional benefit of roping
returning there to us
so this is nice
i would also like to extend
to extend this example and maybe say
that if we are running
and we introduce an error maybe we would
like to cancel the whole operation so
maybe we have like 10 workers running
and we want to say
if some of them failed let’s single to
signal to everyone to stop the
and maybe there is even a more complex
scenario when we have some producer or
several producers and several consumers
and if in any of them some error
then we want to stop everything
i actually did implement this
without any air group
like by myself
and it took me a while to get it right
it’s not completely obvious how to get
it right and i was very proud of myself
but then i told some colleague and he
did you try their group package
and then i remem re-implemented it with
the ergo package and it looks much less
impressive now the implementation much
and actually
from one side i was a little bit
disappointed but from the other side of
course it’s much better because anyone
can do it and
there is no need to get into any
intricacy to get it right anymore
so i will be glad to share with you
this example
okay so
uh before we go into it the ergo package
is uh
it has very small interface
it has only three methods with context
go and wait the methods go and wait we
already seen these methods
it’s called the go routine and its
weights on the goal routines to continue
to complete
the last functionality that i’m going to
present to you now is exactly the
functionality that supports the
and it happens
with context
and so
we are going to see it right now
so here is the example
let’s take the example of a pipeline
how does it work we have some go routine
that generates the tasks task generator
we have workers that are processing the
tasks similarly to what we saw before
and the requirements are that
tax generate generates tasks sends the
tasks to the workers and after it
completes to generate all tasks
there is a limited number of tasks after
it completes its signals to
all the other workers that it finished
it finished after all available tasks
have been generated already
in case error some error happens either
in the task generator
or in one of the workers we expect all
the processing to stop to complete both
generating and processing
and our main process it waits for all
the subroutines to complete for the
generator from the workers
and it returns an error in case some of
the subroutines has failed
so how can it be implemented with air
we are using the with context
functionality if you remember before
our previous initialization was like
that just a new method
but in order to support the cancellation
we initialize it this way air group with
context we give some context here i
didn’t have any previous context so i
used context background
but if i have
i could
test the other context so like that i
initialized now i have
the context that can be cancelled that i
can i can listen on
we prepare some channel on which we will
be sending the tasks
and we have here one go routine for the
task generator
and we have several go routines for
the workers
here this call is totally fine no
i guess because it is passing the
parameter is not closure anymore
this value is being copied and not
passed as reference
so here it is fine
we’re calling
the go routine for each of the workers
and in the end of the process we wait
if some error happened either here or
here we will get the error
but how do we deal with the cancellation
how do we deal with
if here we fail or here we fail
then everything stops
so the way to approach that i’ll share
with you both the code of the generator
and the code of the
and this will be the end of our example
so this is the code of the sender of the
generator that generates the tasks
this is just a pseudocode right it’s not
a whole example but suppose that
from somewhere it gets a list of updates
and for every update it generates the
tasks so it runs on
in on this collection of updates calls
the method generate tasks january task
it can potentially fail let’s assume
and if it failed it returns an error
if everything is okay it tries to send
the tasks
the task on the channel
this is the same channel that the worker
will be receiving from the
the task generator sends the tasks on
the channel and the worker read from
these tasks now a common goal pattern
says that
the generator after it completes
sending all the tasks on this channel it
closes the channel
closing the channel signals this
operation in the first line that because
we are calling defernet we ensure that
it happens no matter what this call will
be called eventually after we complete
the iteration it ensures that
it sends the signal to our
workers that they should stop processing
how it works i’ll be back to the
generator slide in a minute i just want
to show you how it works in the workers
side so in the worker side
we’ll go over we receive tasks from the
channel using this
we’re running
ranging over the channel and then
automatically go no go notes to break
off this loop when the channel is closed
so as long as this channel has not been
closed yet it will block waiting for the
next task to arrive takes it does
something with it tries to receive
another task
once the channel has been closed we are
breaking the goal breaks from this loop
so this way we we can signal the
generator signals to the workers that it
completed generating the test until now
not using functionality of ergo at all
where air group comes into play
in this context done
so when the con
when the context have has been cancelled
uh the done
will be closed
context has a done channel and we
receive from it so here we have this
block that is called select
in this block
it randomly chosen like the first
channel that we can receive from it will
be chosen so either there is some
worker that is ready to receive a new
task that is listed on the channel or
someone signaled to us that all
processing has been stopped that the
context has been cancelled this is done
by listening to the done
so this way
when context done will be called air
group calls it automatically when some
error happened
either when we finished waiting or when
some error happened so if some of the
worker fails
the done channel will be closed and then
the sender will know to close it
to break from the loop
because it will receive on the done that
everything was completed
while it doesn’t happen we keep trying
to send
so we have
two ways to finish this
either we can we complete
iterating over all the updates and then
we exit and we close the tasks channel
or some error happens
and then we exit here context done this
is the generator the sender side
what happens on the receiver side
the receiver side we have the same
concept of this select block
and two conditions
we range over our tax channel as i
explained before
and either we just receive we receive a
task and then either we are processing
something happened the context was
cancelled and then we
break break off we exit
in the regular flow we’ll just
never enter the done
never enter it is done in condition we
will always go to default process task
default process tests continue
but if some error happens we will exit
on the done stage
so this way we will be able to satisfy
all the conditions
we have generator we have processing
workers if some error happens
it will be returned by our main process
we will know about that and more
moreover when error happened we will
know immediately to exit both in the
generator and in the workers
and that’s all
that was my presentation
great if you have question please ask
them in the chat
have ever
lost me
there was some period when i was not
sharing the screen
yeah something was not clear
see too
he loves the fast pace
i never talked about fast tests
it was not part of this presentation and
i’m actually very curious about fast
test but
it’s not
nws okay
no questions what is nws
ah this means uh no worries
okay so uh thanks tima for informative
session actually dima
is a senior software engineer from
jayfox security team and he has five
years experience programming in go he is
from israel
so now it’s time to move to our next
speaker sushrut uh he’s a software
engineer from also from jfrock uh he’s
working on the
partner engineering team
and he’s a full stack web developer who
is skilled uh in object-oriented
language including goal and python
and c double brush and java
and he uh he also has a passion for ux
and ui design principal
over you
thank you
good evening good evening everybody uh
my name is sushrut
am a like you said a software developer
at jfrog
uh my role in the partner uh
sorry give me a second i need to
enable permission so that my
google chrome can is can share my screen
oh and google chrome will not allow me
to share my screen until i restart so i
will be right back
meanwhile uh till sushruth is back
i just wanted to reiterate it again uh
please go ahead and get an opportunity
to win a go t-shirt i have dropped the
links on the chat box you can fill the
and also we have provided a link for the
artifactory free tire which which you
can try for free so please go ahead and
register now thank you
you’re on monday
sorry about that everyone i am back um i
needed to restart my chrome so that i
could share my screen
um but yeah i should be able to share my
screen now yes and let’s um
share this
so uh
talking a little about designing
developer with some examples in goaling
just a little bit about me first my name
is susha otole and i’m a software
engineer at jfrog i’m a devops developer
and if you want to follow me there’s my
twitter handle right there
so unlike the last talk which was very
technical my talk is more broad stokes
about um design and development uh in
general and how we can become a be we
can become
better developers by um learning more
about the design process and so my talk
learning is how we as developers can
learn about ui ux and design to improve
our products and our value as developers
and i’m going to be talking with some
examples and go
about this idea
so the main the thesis of this talk is
this uh is this line right here that the
disconnect between design and
development can often be fatal
i worked at amazon for a bit um a few
years ago
and one of our projects at amazon uh was
a front-end project and
i was a developer and we had designers
on our team
and the designers would often tell us to
do x thing in in y way they would say we
want a window here that does this
and i would go and make a window here
and does this and our entire team would
do that
um eventually uh we as our product kept
rolling it’s we realized that there was
things weren’t quite working as well as
they should have um according to the
designer’s vision and
what the tools we had as developer they
also weren’t working as well and we
realized there’s some major uh
disconnect or error happening where
what the developers could build and what
the designers could imagine uh wasn’t
lining up to each other and it ended up
causing the product to fail um in a
pretty big way
uh and we had to re really go back and
look at it and and see what was wrong
with it
and that’s where i that’s one of the
first places i learned about this idea
of hey maybe it is useful for a
developer to know design principles
when working
because then a developer will uh be able
to create a product that a customer
would really like
and they’d be able to understand and
implement a designer’s vision in a way
uh that
would be
that it will really add value to the
product and adding value to the product
adds value to yourself as a developer
so the idea behind this is to teach some
basics of user experience uh so that you
can add value to a product and to
yourself um when when developing so when
you can design your own products
in a way that a customer
will be able to use it
so we will be going through these seven
facets of user experience
this term was these seven facets were
coined by this man named peter morville
who writes some blog posts and books
about user design but these ideas have
been around for a while um
and and are are fairly universal
so our first facet where i want to talk
about is usefulness uh
this one is fairly self-explanatory
um your the things you make should be
um and so this includes
and and
the the key caveat for something being
useful is that
you shouldn’t lose sight of your end
goal or what you’re trying to build uh
as developers especially with go uh
there’s a lot of cool things we can
build like there’s a lot of servers we
can build we can do some awesome things
with concurrency
uh but the things we build aren’t always
useful to uh your colleagues to your
customers to your product managers and
it’s important to know where you’re
spending your time so that you are
building useful things i know that when
i first learned bash for example it was
my first scripting language and i
would spend time scripting everything i
could because i just wanted to learn it
and it was useful to me to do those
tasks but one time i ended up spawning i
ended up spending four hours automating
a work task that only takes five minutes
to do
and it really saved me those five
minutes but in the end the four hours of
work wasn’t a useful work
um i have an eye of the beholder here uh
it’s a nintendo game
because usefulness in that sense is in
the eye of the beholder uh useful
something that is useful to you may not
used to be useful to someone else and it
is important to
consider that when you’re going to take
a large time commitment to do something
maybe something isn’t worth the time to
build if it’s not going to be useful and
if you can save yourself that time
you’re saving your company that time and
you’re increasing your value as
the next facet of user design is
usability or
usable unlike useful which is a very
similar word
uh useful means that something is uh
something can something can be used that
something is uh needed by a customer
whereas usable means a customer is able
to operate or able to use that
product very easily
so an example would be
a taxi service is very
useful for a customer to have people
love to ride taxis rickshaws anything
it’s not very usable to use taxis uh
you when you need it especially in the
u.s like there’s uh it’s hard it used to
be really hard to get a taxi in the
right spaces etc and you don’t know the
price of a taxi before you went
so uber for example was some was a very
usable uh app that came out that really
disrupted its market uh on a pure
usability basis
because uh
and and and really entrenched itself and
so two other apps that were really
usable that
operated an existing market and
uh made its
first successes on usability were
robinhood and venmo
venmo disrupted the
the banking market it disrupted uh
peer-to-peer transactions peer-to-peer
transaction uh services existed before
venmo there was paypal for example
but by making it into a mobile app and
making it very easy
uh to send money from each other fenmore
really entrenched itself in the space
the same thing would happen with robin
hood where robin hood investing was
something that everyone could do before
but robin hood
enabled the masses to do it it’s a
consumer investing app this uh
logo on the left
so it’s really important to make things
usable um and it can really
making something that already exists
usable uh is very good for for making
new products as well
by the way i’m going kind of fast if you
have any questions please leave it in
the chat i will answer it at the end or
i will stop in the middle to answer it
okay findable
so this is the third facet
uh and this is we’re starting to get to
some more
exciting facets of user design
when you’re making a product
it is really important
it’s very very important that a user
can find the things you’re building that
they can find uh
they can figure out how to use your
product itself like if you have a
feature they should be able to find
where that feature is
this is also known as discoverable by
the way if you’re looking at this up
online afterwards
um a great example of this is uh a
command line interface you can build
some really robust command line
interfaces and go and command line
interfaces have a very simple way of
making uh their your commands findable
you just run a help command and they’ll
all of the commands you can run at the
time uh
in a nice neat little list with a
description for each but imagine if that
that that uh help menu wasn’t there then
the features you spent a long time on
for a command line interface wouldn’t be
findability is interesting because it
doesn’t have to be as explicit as a help
one really
interesting way to make something
is to make it uh
is to follow a metaphor or an industry
um so in this case uh
i i’m a devops engineer so i spend a lot
of time uh
building stuff with kubernetes and a big
uh part of kubernetes is a is a command
line interface built on go called coop
the coupe controller and kubernetes have
a very specific way
have a very specific language and how
interact with objects within it so coop
cuddle will always do coop cuddle the
command the command line controller then
it will say
a verb
like create expose run or set
and then it’ll have the object it runs
at so cuddle create pod
some other command line and interfaces
will do
we’ll do it the other way they’ll have
the object and then the verb they want
on the object like you were speaking in
english it’s noun and then verb but coop
cuddle does verb in the noun
so then you’ll find that most people who
are building
command line interfaces that deal with
kubernetes and i did work and i built a
command line interface that was built
off of kubernetes
uh they’ll follow the same format as
kubernetes and they’ll do a verb and
then the object that it’s operating on
so when you’re building something in go
for example and you’re working in an
established industry really pay
attention to what other people in the
industry are doing especially
uh bigger companies and if you copy
their design and their formatting
you’ll find that customers will be
saying like wow you’re i’m using your
product because it’s more easy it’s
because it’s easier to use
and that’s something that a designer or
a product manager
is probably not going to coach you on uh
it’s gonna have to be coming from you
and if you can naturally be like wow
this developers programs are much easier
to find their customers are reviewing
them higher uh in usability and
findability um i really like it then you
can you can be like hey like this is a
skill i have um
and and it’s it’s very good
so that’s findable
the next facet is credibility
when you’re building a product you want
people to trust that your product will
work well if you say you’re gonna do
something you want your you want your
customers to trust that you are going to
do something
uh a lot of these facets are um easy to
measure by the way like usability is
easy to measure uh and i’ll get the uh
we can talk that’s more of a topic for
another day but
credibility is not a as measurable as
findability usability or usefulness you
can get metrics up like clicks you can
look at um and how often people are
using things etc and so the first three
are easy to measure credibility is very
hard to measure
and it’s very hard to know if you’re
doing right
so it can be very difficult in that way
and credibility is important and it’s
very easy to lose
facebook for example
has lost a lot of its credibility in
recent years due to these
data and privacy
issues that they’re having in the media
how do you build credibility credibility
then how do you know if you’re doing it
if it’s something that is difficult to
measure well
one easy way to do it is professionalism
when you’re when you’re presenting
information or your product make sure
there’s no typos like really pay
attention to how everything is spelled
have it the presentation be clean and
and that’ll help a lot
another easy way to build credibility is
again follow industry standards
something is standard in the industry
usually because it
has credibility and it feeds off of
one example of that is documentation
documentation used to come in books it
used to come in a downloadable pdf uh
that you could download and read through
for your your javadocs and stuff like
that is no longer the optimal way for
most developers most developers if they
saw they had to download a pdf to learn
how to use their product aren’t going to
download that pdf and going to say
this product doesn’t have good
documentation so you shouldn’t give a
pdf download
as your main source of documentation
anymore because it’s not a very credible
there is this
not framework or library package called
and it is a
it’s a it’s a big set of commands
basically that allows you to build um
clies and goaling it’s open source if
you look it up online and you can build
some really nice command line interfaces
with cobra
cobra is really useful and a lot of
people use it because it directly builds
off of the paradigms that go sets it
built its credibility
based off of what go
advertised it as
itself as so if cobra basically took the
paradigms of go and did whatever they
want with it and
and didn’t follow them at all then um
people wouldn’t use it so for example
the some of the paradigms would go is
that it’s object oriented it’s
imperative um and it’s uh it’s
and it’s concurrent um and most
importantly go is easy to use uh that’s
one of the that’s another one of their
paradigms they want to be easy to use
there’s no ternary operators and so
cobra also falls at things you can do
concurrent command line interfaces et
cetera et cetera et cetera and it built
its credibility
uh off of that
okay sorry just uh taking a breath there
all right so the next facet of user
design is desirable uh this one is
another uh
is another one that’s hard to measure
you can do surveying and stuff like this
and it’s another one that is um
harder for you for a go developer to
implement but uh
you’re all already
participating in desirability
by being at a go meetup
the hired report in the us does a um
does a report on the state of software
engineers every year and they look at
what software engineering is going what
the standards are in the industry who’s
learning what what languages are
increasing in popularity and what not
and they found that go had a 2.3 times
increase in interview requests
in 2021 as opposed to the previous year
uh for for go developers it had the
highest increase people really want go
developers right now
and one and the reason behind that is is
that go has set itself
to be extremely desirable
and a lot of that has to do
with brands aesthetics identity and
other things other languages do what go
does go does it better in my opinion go
has it go
goes uh
innovations and concurrency and uh
simplicity in that sense really helps
set it apart in my opinion but other
languages can do what go did before
the reason why go is um
is doing so well in my opinion is it’s
backed by google it’s the hot new thing
it’s the new mercedes the new mustang
that’s uh that’s out on the street and
it it really helped brand itself from
the get-go using uh
using google’s brand as well um
so desirability is everything about a
design that that it makes it more
desirable um
versus a competitor it’s the shiny new
paint in on the house it’s the
it’s the nice user interface
and it really does matter if you have
two equivalent products people are gonna
go to the one that has the better
aesthetic the better brand uh and it’s
really worth paying attention to
um as to and and so
yeah and so that’s desirability
okay this is my favorite facet to talk
i love talking about accessibility
is very broad
and it is often overlooked when people
are are designing things
accessibility can mean um
a lot of things
at the basic level to make something
more accessible is to make something uh
more is to make something
is to make your product be able to used
by lots of different groups of people
one example of accessibility is to add
language options to your product so that
english speakers can use it
hindi speakers can use it marathi
speakers can use it uh french speakers
can use it and that will
really globalize your product for
accessibility can also mean someone who
who has some sort of disability and
can’t use your product because you
haven’t designed for that disability
and in that sense accessibility is
really important because a lot of your
potential users uh have some sort of
thing that’s blocking them from using
your product in a normal way
statistics for americans for example is
that twenty percent of americans suffer
from some sort of ability that’s one in
five americans who can’t use uh a a lot
of things that other people can’t
of their disability and if you can
design for that disability you are
increasing uh your
customer base to that many more people
and the accessibility
accessibility design has a lot more
benefits as well one great example of
accessibility design is subtitles um
subtitles are originally added um to
movies and film and tv as a way for
people who were deaf um to be able to
enjoy the film they could just read the
subtitles instead
but very quickly um uh
movie movie creators and tv television
creators realized a lot of people just
like having subtitles on it’s easy to
understand if you don’t understand the
language that well if you are hard of
hearing but not deaf if i use subtitles
at home when i’m trying to like play the
tv quiet and not have my uh my family uh
wake my family up at late at night
and so
and it it’s it made for a better
customer experience overall
another example of accessibility design
is the ternary operator
this question mark ternary operator that
appears in a lot of languages like c
plus plus and python does not exist and
the go creators very intentionally left
out the ternary operator from their
language because they felt that it was a
confusing piece of code if you want to
use if you want to do what a ternary
operator does then you should be using
an if else statement
that is clear that it does the same
thing and there’s no need for a
programmer to do it on online it was a
very intentional choice by the go
developers to follow their paradigm of
braving an easy to use language um
and uh i it’s it’s uh
it’s an example and accessibility design
and then this bottom um
this bottom uh
picture here is the accessible xbox
controller from microsoft that allows a
lot more people to play games so
accessibility is really important
for all the reasons i just ate
so the last facet
touched on this
it’s kind of similar to being useful
but uh valuable
should make a product
people want to spend money on
um otherwise
why would the user come to you like why
otherwise why are you building the
product if uh
if it’s not valuable it doesn’t always
have to be spending money you should use
a product that people want to use even
if you’re building it for free
making something valuable isn’t just at
the base thing like hey i’m i’ve made a
peer-to-peer transaction app that is
valuable or hey i’ve made a back-end
server in go that is valuable
the one of the easiest example of
something valuable of something
incredibly simple that was valuable was
awesome search engine by google they
built their entire
company based off of one search bar
but value can also be measured in terms
of cost and i think this is the most
important um part of this facet
as a developer
the way we can increase value for our
company and for our products
is by reducing the cost
that is what we as a developer have the
most control over
because the cost of developing a product
is directly correlated to how long it
takes us to build that product for
so when we’re considering designing
something you should consider the cost
of um building that product if a product
manager or someone comes to you and says
hey i want to build this and you have
two options on how to build it
you should look at what option is
cheaper as well
and if you can make that recommendation
recommendation to your manager and say
hey i can make it both ways but i think
we should make it this way because it’s
cheaper uh and you end up saving the
company money that looks really good on
you maybe you can use that to be like
hey can i can i have a promotion
uh but
because you have a direct control over
of the cost of a product uh this is how
how this is how you directly create
value uh
for your company
so that’s all seven facets
at a glance i i talked a lot um but they
are all uh
uh they are all um pretty simple in the
end credible findable usable useful um
desirable accessible and valuable
a hard part comes when you’re trying to
them both together something that is
accessible may not always at the same
usable or are useful right
something that
something that you make easily findable
may make your uh
your system less desirable a great
example of this is an airplane cockpit
an airplane cockpit has a lot of buttons
and every every button has a
one use and it’s very
very usable for someone who has a lot of
experience in it it’s findable for
someone who has a lot of experience in
it but in that sense it isn’t usable
and also in that sense it’s not really
desirable it doesn’t have a brand or an
aesthetic or a marketing thing
and so when you’re designing a product
often you’re you’re sacrificing one for
the other and a lot of the future
learning comes from understanding when
each facet is more important than
another um
and and that that’s the that’s the hard
part that’s the real kicker but in
general if you think about these facets
as a whole uh you’ll find you’ll be
making better products and
when you’re making better products and
with better designs you’re
you should be
you should be good
so that is my talk for today uh if
you’re more interested in design or some
of the things i’ve talked about today
you can read some of these books by
peter mourville and he goes into more uh
about it in each of these search
patterns information architecture into
there’s this blog post is where a lot of
the content for this talk came from by
peter marvel
and then something that is talks about
designed broadly as opposed to uh just
design in a technical standpoint is this
book called the design of everything’s
design of everyday things
uh and this book is one of my favorite
books on design i highly recommend the
design of everyday things they talk
about doors and coffees and trains and
how all these things are designed
in our everyday lives and what would be
like if they were designed poorly like
some of our software is and it really
expands your brain there
but yeah if other than that
if anyone has any questions please let
me know and i’ll be happy to answer them
the question uh
uh asked is who is the most priority
developer designer and
you’re that’s that is a question i
forgot to answer it’s a question i posed
at the beginning of the talk
developer and designer the disconnect
cat is fatal that’s what i said at the
beginning but um
the idea that someone has more priority
than the other is where the disconnect
uh starts in the first place a designer
and develop a
the best developer is someone who can
understand what the designer gave him
what are the things that the designer is
looking for
uh which i
i hope you know is some of these facets
and when he understands what the design
is looking for the developer should be
able to
consider his design with the development
limitations of the language such as go
and be able to implement something
that fits the uh
the design priority with the developer
so in that sense the the designer has
priority on what it should look like and
the developer has has the actual hand to
make it and they should be working
together like um
like a like a hand
but yes
if that if that made sense
if that did answer if that didn’t answer
your question um feel free to ask it
okay well um
if you have more
questions approach
another one
yeah so um
i mostly use go programming um
personally for the the
it’s that’s a broad go question um that
maybe fema can also answer but uh
personally i use go programming for
command line interfaces and
command line interfaces concurrent code
and back-end servers is what i use go
for um and all of those things
uh may not
scream like oh like why do you need
design for that but you do need design
for that people are going to be using
the people using your command backend
such as your colleagues will appreciate
good design
and command line interfaces are actually
a front end um
let me ask uh let me ask a question uh
how you usually uh deploy your code
i mean the usc like how you reduce it
most of my code deployments are i mean
it depends on on what i’m deploying
because i’m on the partner integrations
team a lot of my code deployments are
just like we build a go package uh and
the go package will run on a cloud node
somewhere so we deploy the pack we store
an artifactory and then we deploy each
package um using our go by nerdfighter
dima might have a different way
we go to another question
go is a general purpose development
it is a natively compiled so very easy
to deploy you have one executable
yeah and one binary file
we use it for microservices backend
it’s a very common usage in a devops
world devops tools command line tools
but it’s general purpose so you can
use it for ever everything really
yeah that’s why uh docker cali and
github cli is built
with golem
we got another question from sithu he’s
asking most of the time they are
on the same page
that’s an interesting question uh i know
i’m comfortable enough in my knowledge
of design that i feel that i can change
it most of the time if i am changing the
design of something i am talking to the
designer first i’m saying hey
uh designer you wanted you wanted
something to look this way and we’re on
the same page about that but because of
the limitation with my language uh in
this case go because of the limitations
of how go works sometimes uh i can’t
design i can’t build it exactly how you
but because i know what you’re actually
what your end goal is i can build it in
this other alternative way and if you
can come to the designer with that
alternate plan um
it’ll help things run a lot smoother uh
in the long run
so yes
i hope you have the freedom to change it
but communicate
aravind is asking the goal
this golem is faster than all
go is a statically typed language it is
faster than dynamically typed languages
but it also uses garbage collection
languages without garbage collection
they generally are considered better
suited for very very high performance
so for very high performance c is
usually used
or c plus plus like embedded etc but for
just the regular backend applications it
is considered very very good like on par
with java
okay okay seems like no more question
wait for another two minutes for the
yeah sure
so meanwhile yeah thank you so much
thank you for the opportunity and thank
you sister and dima for your time it was
great insights
yeah and uh
and thank you very much it
sustained and jfrog for sponsoring
today’s meetup
it is our pleasure to sponsor golang sri
we are hoping to get more talks in
golang shelanka soon
i think there are no more questions
thank you thank you golang community it
was great talking to you all and also i
hope everyone has filled the form for
the raffle as well as you can
try the artifactory free tire as well
so meet you soon thank you so for the
opportunity take care bye-bye
thank you for everyone who attends
today’s college meetup stay safe see you
in uh golden sri nakama