Hello everyone. Welcome to the session on Goal. So how many of you are familiar with what Goalang is? I don't know if you've heard of it. Just heard of it. Nice. I guess this presentation then perfectly suits you guys. This is just a basic introduction. There will be very minimal code but nothing scary. So I'll just go through like a give you a high level production what this is all about. And we got Audrey up next. She will be presenting some of her own experiences and some of the cool stuff she built with Goal. Actually we have some problems with Wi-Fi. We'll figure out something. So yeah, after me, Audrey will be presenting some of the actual real-world representations of this language. So let me start. Yeah, I'm Laksham Perira. My Twitter handle is LAKDK. And I work for this company called Nitros.io. So Nitros is, let me give a brief introduction about Nitros as well. Since I guess most of you guys are new to programming, you might find this useful because Nitros is a browser-based coding environment. And yeah, you can start programming on Nitros itself. So if you haven't heard of it before, don't check it out. Nitros got I.O. Okay, so what's GoLang? In simple terms, if you put in programming terms, it's like compiled on current garbage collector and statically typed language. Quite a small pool of words. Which languages are you familiar with? How many of you know about Java? So Java is more like a compiled language. And how many of you know about Ruby? Okay, so Ruby, you can imagine it as a dynamic language, which is like opposite of like a compiled, statically typed language. So it's like dynamic and it's just like an interpreter, which is just run without having to compile the program. So Go is like opposite of Ruby. And it's kind of in the similar domain as C and Java, but it has its own garbage collection. And it has built-in concurrency, which is like you can run multiple stuff together, put it in like really basic place. So that's the general overview of the language. But if you go down for the downlight, you'll hear these days like all these new place languages like Ruby and even Python. And there's all these new languages called Scala, Rust. These languages like a lot of magic like it's pretty easy to get up and running. But Go is like totally opposite of this. It has no magic in it. So it's like, like if you start with this, like you might wonder why I should learn Go. It has no magic. Like it's not this cool thing, style language, like all these cool things like you know, JavaScript, Node.js kind of like. All the way we have these days like everyone building like from interpreters to cool machines with like JavaScript only. And it's totally opposite of that. It has no magic in it. It's like pretty damn verbose language. But it can be highly productive or extremely boring. It's like either decent or either decent. So it depends on your personality. So it may be like highly productive language. But if you grasp it correctly and if it suits your philosophies of like learning the program, I think we'll get to that little bit later with Audrey because she has a cool story to share about these two extremes. So yeah, it can be like that. So a little bit of a history of going. It started as a Google project. So in 2007, Google set up this secret project. They hired these two guys, Ken Thompson and Rob Pye. These were the guys who created like C and Unix back in the day like in 1970s. So they were like the pioneers of like computer programming and both computing architecture we have today. So Google hired them and they gave them some funding to start with a new programming language. So these like ground up like rewrite, it's not rewrite, it's like from the scratch language. So they brought their experiences from C and Unix days and applied it to modern computer requirements and they came up with this language. So in 2009, the first version was released and you can see this cool little mascot, right? This is called the Gopher, like Go Gopher. It's the official mascot of the programming language. So like everywhere you see this, you know it's related to some programming language. It's not like a fancy web app. It's just a programming language. Okay, so who uses Go this page? So it's quite popular. Go was released in 2009.  And a lot of open source projects as well like Docker, Go and Conceal, I don't know whether you guys have good of these projects. But yeah, these are like some of the new open source projects and they are actually using Go. And for the better part like hobbies like us, right? Most of us like started with Go before we had these in other workplaces or anything like just for the fun of this new language.  Here that option is not that great at this moment because still most companies rely on Java or else like some of them use Ruby and stuff. But like yeah, most companies do switch to Go when they discover the bottlenecks of this language. And Nitro is one of them. So we went through this whole Ruby for JS process.   And now like we use Go for our day-to-day work plus hobbies as well. So it's like kind of a good language that balances your hobbies plus actual work. So if you want to get started, how do you get started?  Or else, as I said earlier, you can use Nitro style because we provide a Go box. So if you sign up for Nitro and select a stack, you can select Go and start coding on your browser itself. So once you have your environment set up, I'm not going to go through the environment of setting up all this stuff because it's quite boring. You guys can do it on your own. So if you want to try out even tonight, you just read these two articles. One is like how to write Go code. This is like a pretty basic overview of how the language works and how do you approach and how do you write your first hello world kind of code before. So go check it out. This one, I'm not sure whether the URLs are visible but just Google how to write Go code. This would be the first result. And then there's another document called Effective Go. This is a web page but it's pretty comprehensive. So it's not a book or anything. So it may take like 40 minutes to read the whole thing. But once you're done with that, that's pretty much it. That's the whole language. That's all the concept of the language you have to know to write code. So next option is just to go open your favorite editor and start coding. So it's pretty easy to get started. And the front starts from there. Then you would keep discovering new stuff and journey begins really early. So it's not like you had to read a whole book and allocate like two, three weeks to just get started. It's just instant. You can do it tonight if you want. So let me go through like some of the interesting features in Go which I personally like. It may depend on the person who's presenting but these are like top five features I guess which makes Go kind of special compared to other languages. So first option is Go format.  Like some have this idea like we should use spaces for indentation. And there's this another group saying yeah we should use steps. And then even if they switch to spaces then there would be like another wall. Like we should be using two spaces. No then they would be like no we should be using four spaces. So you would be actually fighting over these conventions rather than coding in most of the projects. At least in most of these open source projects that what happens like you spend like two, three months in mailing list actually to figure out how do you set your format. So Go came up with a really smart solution saying hey you should not fight over this stuff. We'll set the formatting for you. So Go has the built-in formatting tool which like there's the formatting. When you like click save on your editor it will do the formatting for you. So if you enable this option Go format it will format your code. So anyone who has this enabled will have the same formatting for their code. So if you go through like all the open source projects or even like internal projects they use Go format all the code looks same. So yeah so that's the beauty of it. So it's not just your project. This problem is there like for like when you start Python where you have this one format in your code. And when you look at some other project it's like totally alien to you because it uses a different formatting for the variable names. Some have the underscore snake case and some have this convention of using camel case. So Go sets its own format. So you can't overwrite that. So you can but then you will be not considered as a pragmatic Go program. So just stick to Go format and yeah it can be easily go down to your editor. So if you're using like Sublime or WIM or something like that it can run on your save. Like when you save the file it will format your code. Or you can hook it onto your source code control. Like say if you have a source code control system like this you can say that when you do a git push it will do the formatting for you. So easily bookable file environment. So that's one of the cool features. Next up is the standard library. So Go has this pretty cool standard library to get started. So most of the other languages like say for example like Node.js. When I was like coding Node.js so I had to like always go up and look for the best package for this job. So I want to do some AP processing or like I want to connect to an API or something. Then I have to look for API client how to do this work. And I need to have a NPM package for this. And then I have to spend some time reading between different packages which one is the best and which one is actually maintained or not. So Go saves all this hassle for you because it has a pretty comprehensive standard library to get started. For most of the common day-to-day jobs like connecting to an HTTP API or doing the disk window writing to file. These kind of things are like pretty much well covered in the standard library itself. Like compared to other languages where they have the standard libraries not really maintained well or something like that. But in Go it's pretty up to date. And it's also the go-to source for the semantics and the idioms of the language. So you can actually refer to the Go standard library to see how they write the code. And you can copy the same style to your code as well. So it's one of the key features. And it's like the first time I saw a language with a pretty comprehensive standard library. Most of the languages has the standard library as an afterthought. Because once they figure out they will just let the community to decide which package is the best. But after some time they might bring certain packages into the standard library. But instead of doing this, Go has built-in standard libraries. So it's pretty much easy to get started. And also a good part of this is like you have like really minimal external dependencies on your projects. See like if you want to maintain a project for a couple of years, that's another problem you have. You depend on some external library and that library is no longer maintained. And you have some issues down the line like how to get like a security update. How do I get that as like all these issues. But if you stick with the Go standard library, it's pretty easy because it's always updated for you. And it's supposed to be well maintained. So that's another cool feature, the comprehensive standard library. And yeah, this is like the best part of the language that you can do like cross compilation. This means you can write code on Mac or like in a Windows machine. And then you can expect this code to run on Windows or as you would see in our next demo. It can run on Raspberry Pi, stuff like that. So it can work on different architectures, different OSes. And it's pretty easy to build for this. You don't really need to go to Raspberry Pi and build that. You can actually build that on Mac itself. So all you need to provide is this build flag. And you can set the Go OS to a Linux. And then your architecture could be like ARM or something like that. So it's pretty easy to build for different architectures. And if you want to build like multiple architectures, so you have this one program and you want to distribute it to Windows, Macs, Linux, and different versions of like different CPU models of Linux. And you can set all these and build like parallelly. This is possible. This can be done with this tool called Gox. So you can build for multiple architectures parallelly and just distribute, which is really cool.  So because what you get is a binary. So you don't have any dependencies. You can just give the binary to your users and they can just run it. So you compare this with the languages like all these dynamic languages, like for Node.js you need to have the Node.js environment installed on the users machine.  So it's kind of an extra hassle. So Go doesn't have any of these.  So next up is like some like language level features. Previously it was like more high level stuff of the language, but these are like actual programming features in the language itself. One is calling interfaces. I guess most of you are familiar with object-oriented programming, right? So in object-oriented programming, you will know there's this concept called classes. Like you have a class and you extend the class and you have these objects based on certain class. In Go there's no concept of classes. So it's kind of like there's this, whether the Go is like an object-oriented language or it's just a structural programming language, but it can be either of those. But the main point you should remember is that Go doesn't have classes. What it has is this thing called interfaces. So what is an interface? So interface is like pretty implicit definition. So if you can say like this, like if an object can do this, it can be used here. So when you write a function, this is actually useful when you're writing code. So you don't really know which object I'm going to use. So I write a function Z. I think the best example, I'll show you an example. I think it's easier to explain this way. So you write a taxi app or something, right? So basic functionality would be like take a ride. So when you write this function, you're not sure which taxi provider you're going to use. So you say any taxi should be able to drive me from A to B. If a taxi can drive me from A to B, it's okay. So I just want a taxi to drive me from A to B. So you just define this, but you don't really know which exact taxi company you're going to use. So interfaces are like that. So you define what you want to do as a function. So any object that implements this function can be used here. So it clears up here. So you want to take a drive. So any taxi company here, like say for example if Uber implements drive, so it can be used in your taxi ride. Or if Lyft implements this, you can use that. Or even your uncle implements drive, it's possible to use that as well. So as long as this object implements drive method, it's fine. It can be used as your object in this case of take ride. So yeah, so basically, imagine this is like, so you just define a function or a method. This is what I want to do. And you forget about which one implements this one. So you just imagine, yeah, I have a concept of a taxi. I don't really care about its implementation. As long as it implements this specific method called drive, it should be able to use this scenario. It can do like 101 other things, but I don't care any of those stuff. As long as it clears to this interface, it can be used. So that's the cool thing. So you can define interfaces the way you want. So here in the top, you can see, I have defined an interface called taxi, which needs to have the method called drive from one location to another. So a funny part or a smart thing about this is like, you don't define it in the implementation of the interface. So imagine like some other company comes in the future and they implements drive method. They are automatically usable in this taxi drive. So this is like, it's kind of smart in that way. So you don't really have to know which one implements this method. So some objects can implicitly adhere to an interface. So this is different from the class-based object-oriented structure where you have to say this object has to be extended from this particular class. But in this case, you don't see any of those things, but you just expect the object to have a drive method. If it has the drive method, it can be used. So interfaces are, I think it takes some time to grasp this concept, but it's kind of new, even for me like when I first started using interfaces, this is quite different from what we are used to from class-based inheritance. This is not really inheritance in this thing. So you just want an object to adhere to a certain kind of rules. As long as it follows these methods and implementation, it can be used here. So this is really a cool feature of Go that you should be using. And this is one of the reasons you should use Go as well, because it reduces a lot of complexity in your code base because you don't have to like define classes and subclasses and everything like that. So yeah, do check it out by bringing over interfaces. It takes some time to grasp the concept, but once you grasp the concept, it's really useful. Okay, next up is the concurrency. I said earlier that Go had built-in concurrency. So what does this mean? So in Go, concurrency is implemented using this concept called communicating sequential processes. This is a pretty early concept. This was in theory from 1970s. This guy called H-O-E-R-E or someone like that. So he presented this paper in 1970s about this communicating sequential processes. This is basically a model how you can build systems with minimal coupling, but they can communicate with each other in a sequential manner. So this is what it calls communication sequential processes. And Go is like the first mainstream language to implement this. There are experimental languages throughout the history, but Go is like the first language right up this concept. And it's quite powerful because if you know, in languages like Java, you have this concept of threads. Go doesn't have any of those.   So you say like go do this. Basically you prefix the function with a command called Go. So you say go do this and it will just do it. And how do you know if it has done the job? So it has to communicate back to the main process. So to do that, it uses something called channels.  So you wait till everyone finishes their job all right. You can define your logic how to proceed from that point. Like whether I should wait like at least one person get back or like whether I should work like all three people get back to me. So that's how you define the process. So the communication method is channel. So it's not like shared memory or just earlier languages like most of the conventional programming languages as the concept of like you write to some shared memory location and you go and check that location where it's written and like you keep pulling the location. It's how it's done, but it's quite messy. Like when you try to prevent it in that manner. So channels is pretty much clear. So it's pretty easy to model the concurrency pattern. Like it's like what you have in real life. So you have multiple people working on different stuff and they communicate with like some kind of mechanism of communicating channel. So let's go through a coding example to understand this better. Actually this is not something to be used in actual programming language or you should not implement this. If you want to implement a minimal method you should not use this. So I just found this yesterday. There was this coding challenge like it's like a Friday challenge Friday pop quiz they call it. So this guy posted like one of the Go Commute 40 members posted this example. So he had this line. So it basically was a function which can get the minimum out of like when you provide two values and you want to get the minimum of these two values. So he provided this line first line and this last line. And he asked the community to come up with a single line to go in between these two lines which can output the minimum value. So it was the challenge. And yeah, so there are like certain other ways to do it. And this one crazy guy, he broke all the rules. So he instead of using one line he wrote at least like 10 lines from here to here. So he went and used channels and go routines to find the minimum. So how it is done? So he implements a channel first. So this is the channel. And then he calls to go routines. So each go routine this is like it sleeps for some time. So these are the two values. We want to find the minimum of these two values. And so there's these two go routines. They sleep for the given value. So first go routine sleeps for a number of seconds or milliseconds. And this go routine sleeps for a number of milliseconds. So after like sleep it returns the value in the channel. So whatever the value that comes first is the minimum value, right? Do you get the idea? Yeah, we can call back to that. So yeah, so it's pretty smart in a way. Though it's not a single line. And also it shows how the channels and go routines works. Good example in that case, but never use this on your production systems. Okay, right. So that's pretty much it. It cares that if you want to, this was exciting enough for you. And if you want to learn more, we have a Singapore go first community. We have meetups every month. So do check out our Facebook page and Twitter channel. So it's goland.hg. So subscribe to those channels and then join for the meetups. And yeah, we have pretty awesome community though it's like very small and common language. We have great enthusiasm in the community and people like Audrey then there's a lot of others who started using go as their main program language and has done amazing stuff with that. So do join and like, I mean just go through that setup process. We'll try it tonight and build awesome stuff and do come for the meetups from next month. Okay, so I'll hand over to Audrey to present some of the stuff she has done. We'll have you on the screen. What? Thanks for coming today. As Lakshman mentioned, I'm quite new to programming and I picked up Go in July as my first backend programming language. So I actually picked up programming in around April, May this year. So Go is actually really, really new to me and I've been building Go applications since July. I've built a couple of apps and I really enjoy working with Go. My first few applications are simple web applications. I've built a CRUD app, a very simple basic create, read, update, delete application. And then I also built an API client. I think as a starter, I'll show you what I've built for the API client. This is my weather app. What it does is that it takes pictures from Ficca and weather data from a weather API to show you this. It's internet working. So this is what I've built in Go. What it does is that it lets you look at pictures from Ficca, from random cities around the world. At the same time, it also shows you real-time weather data. This is my second application that was built in Go. Subsequently, I started using Go to interface with hardware and I built an application for the Raspberry Pi in Go. So the next app that I built is Go SNAP. So what it does is that it compiles a program that runs in the Raspberry Pi. It lets you control the Raspberry Pi with your own application on your browser, I mean. You can take the Raspberry Pi with the program running in the Raspberry Pi and then it will take a snapshot from the Raspberry Pi and show the image through your browser just by calling URL from your browser. I wanted to show you today but because the Wi-Fi is a bit shaky so I can't do a live demo. So the read me will explain what it does. It allows you to take pictures from Raspberry Pi. You can cross-compile the program just by running this command to enable it to run on the Raspberry Pi and all the instructions for running this program are on the read me so if you want you can look at it. So this is how you would call the Raspberry Pi to take a picture by running this URL in your browser. So this was my next project after the API client. My fourth project is actually a new project and I haven't talked about it or I haven't released it officially yet but I'll just talk a little bit about it now. It's called vSpark. So vSpark is a program, it's a Go program. It lets you talk to the Spark core so the Spark core is this microcontroller that is Wi-Fi enabled and with vSpark you can write Go programs that tell the Spark core what to do. So to enable this to work because you have to load this firmware called vSpark how you run it is you actually have an IDE with the code, the vSpark code and then you load it onto your Spark and when it's running in the Spark you would actually run the commands through TCP. So this is what you do install vSpark by running this command Go get GitHub. This is an example program. What this does is that it instructs the Spark to blink and this is the sample code for it. So this is the list of the APIs that you can install with your program. You can do a lot of things with it. You can read values, you can write to it and basically you can talk to the Spark core with this program. There is just a brief overview of the stuff that I've written. Yeah, that's all. If you have any questions, we can simply have some time left. Yeah, I would have demonstrated something to you how the program would work but the Wi-Fi is down. So two questions. So this is basically an API client which is written in gold. Yeah, so it's like this thing, I mean what you can understand from this is like you can talk like different interfaces so it means that you can talk to TCP interface since actually the Spark code doesn't run to go code program but you control, yeah, it just runs a C program but still you, if you're not comfortable with writing C code but you still have the interface to this, right? So you have all the P interface so you can control that through TCP. So that TCP program runs on Go so you write that. So it's like a remote program that you can control so it's kind of cool like what you can do with this. Yeah, so a bunch of guys actually wrote this Voodoo program written in C but it accepts TCP connections from any program written in any language. So actually a Node.js library has been written for it. So this is the gold version of the library. It's actually like a remote Go package that you can download by running this command. So it's like a package so anyone can build stuff on Spark code using this one. So if you want to look at the code yeah, I suppose I can show you the code. So these are the packages that are imported from the Go standard library. Everything here is written in pure Go. So you can see this function ping Spark. What it does is that by running the command you actually connect to the Spark code with TCP. This is the entire code for it. And then these are all the various APIs that you can call by setting pin mode. Setting the pin, setting the mode. This is the digital write function. If you're familiar with the Spark code or you recognize these familiar commands and a log write the Voodoo Spark hasn't completely implemented all of the APIs for the Spark code. I think they're still working on it. So this is just the more common API calls that you can make to the Spark. So can you show the with the app as well? The code?  What I was mentioning earlier because you don't really have to use third-party libraries to write code. How I've done it is that I've created structs. So you can see the inputs in the top. These are all standard library inputs. There's nothing from the outside so if you input an outside you could have a URL like github slash something. But these are all internal standard libraries. So you can build stuff like what you showed earlier purely using the standard library which is I think kind of awesome. Actually in Go if you want to import an external package I can show you an example. So this is a sample that implements my package, the vspark package. So what you do is that you have to import the github code from my github. And all you have to do is just run goget this entire link github.com slash audulin slash vspark and then it imports the code and it builds the package for you. So it's actually quite straightforward to get external packages in Go. That's for remote packages. So nobody has tried Go over here before. I think the documentation is really good for Go. Unlike some programming languages there's a very good place where you can learn Go called Go where you can actually follow the instructions practice and run the code in your browser. The documentation is also very comprehensive which I actually appreciate. So actually as a beginner as a fairly new beginner I appreciated that everything was all collected in the official documentation. This was really helpful when I was practicing. So I think it seemed daunting to me at first but I think they have provided enough resources to pick up Go as a language. And it's been enjoyable to use Go so far. It's very clean. I find it very straightforward very to the point since kind of language. And I found that when I was cross-referencing other people's code I could follow what they were doing so it was like this is what they're using with Go to do and it's quite an easy language to read or want to get familiar with it. As Lakshan said I think you mentioned there's usually one way to go from predictable one way of doing things. There's no way. Other languages have multiple idioms so if you want to do something like a for loop or something there's a while there's multiple ways of doing it but in Go there's only one way. So in Go a continuous for loop is just for the bracket I think they have kept the language syntax of the specs very small but yet powerful enough to do many things with it. Once you pick up the basics it's very fun to be able to think of the many ways you can use all these different tools that Go has provided you so you actually don't spend a lot of your time learning all this language syntax but you just learn what you need and it's enough to get you building. With Go you can build basic web apps a bit of a cart app, an API client you can also interface it with hardware so it's nice as a language and also flexible. I think that's why I appreciate coding Go a lot. What about the debugging environment? I haven't got any options. Currently there's no like a debug so there's another project called there's a new project coming up I forget the name but it was in our groups so the way to debug Go programs is using gdb since C if you want to do that it's kind of a hassle like using gdb so Go has this there's another concept in Go there's a lot of exceptions so every time you have an error you have to handle it so the default way of doing this is if you can choose one of your codes you will see a lot of if error or if error is not nil how to handle this so each program even like gdb new request it returns two values one is the actual request plus an error in case if something fails then there would be an error so you have to always check for the error so in the code itself it has to be built so you cannot just escape errors so like in most of other languages what you would do is like you just forget about the errors and then you allow it to throw up an exception and then you go to the stack trace and debug it but in this case it is there so you cannot escape from that so you have to always think so at the new request you have to think what cases I should handle it so if it returns an error how I should handle it so in this case we just make it fatal so the program itself just stops so in some cases you can just proceed with the errors you just log the error and proceed with that so if you follow this convention like you save a lot of time with debugging yeah actually personally I found that the error handling was very useful for me I think before you even come to error handling the compiler is great for checking errors I think that's the first the first step is like it's so awesome so I mean when there are different ways of compiling your code for go build, go install whatever so when you run go build to compile your program if you have a type error if you have anything wrong with your code it will give you an error message in that case it's actually really powerful because it tells you where exactly your code, why exactly your code is not compiling, which line it is they will tell you for example stuff like this say you define a variable but you never use it in the code it won't compile in that case so in other languages you can have a bunch of random variables sitting around like doing nothing so you end up adding a lot of shading in your code but in this case it won't compile so you have to go and remove that and then come back and compile it so if you when you're starting out that would be annoying for cannot I just define a variable and get away if even for the errors if you don't check the error if you don't check the error it might just throw up and it will not compile it will say there's an error multiple values returned and you are not checking the second value so it won't compile in that case like you have to go back and oh shit I have to write this but it's kind of annoying when you get started but once you figure this out that you realize yeah doing this I'm saving a lot of time down the line yeah so actually most of my most of the times when I had to check my error was at the compiling stage and it's so awesome that it tells me where exactly the problem went wrong and I can debug it very quickly once I compile if there are any errors then it will print out the actually lock the errors but usually I find that once I debug it in the compilation phase I don't really have any problems in the in the later stage so I think that's what I appreciate and go a lot it's kind of hard for people to mess around with the language so in other languages like there's this expert mode and the beginners mode like for example, ShowerScript has this ShowerScript good parts and stuff like that but the go is like the subset of the features it's pretty minimal like it's all for everyone whether you are a beginner or an advanced so everyone has to use the same like same language concept so you cannot do anything beyond that so this helps a lot in the long run so the chances of people making mistakes or like so you cannot really tell by looking at the code this is the awesome part you cannot just look at someone's code and say maybe you can but at a first glance you cannot say whether it's like a beginner's code or like an expert's code or anything because all looks the same because everyone has to follow the same guideline so there's no way of doing like smart stuff being like I'm smart I would do this shortcut method or something you cannot do stuff like that you cannot show your smartness in the code there's no way of doing this so that's pretty awesome so that's like the basic language level I think it's pretty solid for everyone to like get started and doing so this is why I feel like it's a great language so like I don't mind if you don't mind like so Audrey is like she's a lawyer so she just switched to programming and she was like so she asked me like which language to pick can I so I just took her like Go I just tried using Go and it's amazing how she built all these like apps between like couple of months period actually I was considering a note I somehow didn't take to the idea of building an app in Wales or in Python and Django but I think so another thing about Go is that it doesn't impose any frameworks on you I could build websites and actually many things just with Go code and as well as it's Go standard library so I yeah I didn't need frameworks I didn't build any of this in frameworks with frameworks just Go standard library which we really have a lot of things pretty stable as well yeah so so I asked Lakshan if I should do know why didn't you go so I started on Go in July it's been about 5-6 months already and it's enabled me to build a lot of things with it because it's so straightforward so clean yeah so it allows like so you start with like through web apps and then go through like this whole extreme and build up like hardware stuff right so like the spectrum is so wide right so the language principles are very much the same so you can apply them at any stage so if you are familiar with the language itself like you just it's like a nice hammer to like find whatever the nails you want like knock them nicely so it works everywhere so that's one of the best reasons and in teams like me trust me found this right so it saves a lot of time in terms of performance it helps a lot like we had like huge performance gains by just switching to go from loadchains and apart from that like we save a lot of time in terms of productivity within the team so code reviews get much shorter and nicer because like there's no way to fuck up to be honest so if everyone like follows the same code line so once you like follow the same guidelines like nothing much to like yeah actually it's all on the website like I think it's it's effective code effective code also there's this code spec you can follow that too so they have all these things in the documentation tells you what to do it's actually quite a lot of stuff like how are you supposed to write this whether a function should be camel or snake or whatever everything is here so it doesn't say like it's good to have this like you can have either this or this it just tells you this is what we want to see in your code it should be like this so people complain like yeah sorry sorry but when you see it it helps you to format but I could still name the variable XYZ I could still name variable XYZ it doesn't help I think it's like text and spaces so you cannot have like spaces like you cannot have underscore and the variable name and the indentation stuff like that so you XYZ is fine I mean it's not readable it's not really like it depends on what you call readable actually it prefers to like there's another document I think it's called go code code review code review comments or something like that it's an internal document in Google so yeah go code review comments so it says like variable should be like three letters or something so you should not like have long variable names but it's kind of like mind blowing at the beginning why you like if you're coming from this other like dynamic language backgrounds like you used to have this very explicit variable names right with all like if like you say do when this or something like that so variable name is pretty much explicit then go it's like three letters you just combine these three letters and you assign it as a variable name but once you figure like this was like one of like my biggest gripes as well and then I figured the scoping of the variables pretty much important so the variable scope is pretty limited so that's what goes like this so you should not define a variable like 100 lines above and then you see like further down so it should be like you should be always like writing a code in like functions like smaller functions but this is like you go like this is like general programming concepts so keep down like structure minimal and if you have the scope of the variable is limited then you can easily reference it so it's like it only applies between the scope so you know exactly what it does so stuff like that so yeah like go format curves in other cases where you have like different indentation and like how do you run like write a follow looks like sometimes people have this like idea of like if in like one line and stuff like so you go like you always have to have the braces you cannot omit the braces and have like one line it's not allowed so yeah like even even with that example like yesterday's like this pop quiz thing so people like try to like go and put a function in one line and but then if you run with go format like function breaks into like five lines so you cannot omit that so yeah it's kind of tough just to do like one line things I think we can do a demo like on go playground where you can actually practice your code there's actually an indent go format so say you want to define a strength and then you do some weird things like so I like this a lot because it can be lazy and then all you have to do is run go format it does this pretty nicely for you that's why a lot of the code that you a lot of other builds code that you create is is actually very consistent any other questions with another five more minutes where do you primarily use go like on nitrous is it on your web services yeah so at nitrous basically we start so how we started with go was like we had this one process which is like kind of like memory consuming and it's kind of a hassle to maintain which was written in some other language and then we were like comparing the options of why we should switch to something else so we use go and we saw like huge performance gains just by switching this part and then like so this is like so the way we have our application means like we have like multiple small services so we keep switching like each one to go and we saw like it helps like the whole process in terms of performance and even productivity of the team so now right now we even power the front end even the one we had as it rails at it's not even powerful to but most of it it's on the back end yeah so it's like so how it works is like your front end is like I say it's just a single page have right so use some kind of front end framework and then you call like it in points to get the data to JSON or something and then render it on the front end right so these end points are also it's because it's kind of like this so you can split it out these services into their own process and you can have it like one standard on that so it's so if you want like you can go through the whole step from like like means it means like so it depends on the service but can be the high start with the high end ones like the ones that are like most like something or something and then just take whatever you want to use okay right so check out the group and hope you guys join for the future meetups and actually give a try on the language yeah thanks thanks