SlideShare a Scribd company logo
Coding with Golang
October 21st, 6-7PM
Sign in
What is a GDSC?
Google Developer Student Clubs
We’re open to all majors!
If you would like to join GDSC at
UCF, it’s easy! The linked slide deck
has all of our socials, calendar,
mailing list, a step-by-step guide on
joining Bevy (our Google-created
RSVP site), and more!
tinyurl.com/gdsc-ucf-join-in
Want to Join GDSC?
Coding with golang
https://linktr.ee/knighthacks
linktr.ee/knighthacks
Knight Hacks
Meet today’s speakers
Hannah Moss
GDSC UCF - Lead/President
Alice Yu
GDSC UCF - VP/Co-Lead
Andrei Gulapa
GDSC UCF - Marketing Lead
Coding with golang
What is Golang/ Go?
● Golang or..Go?
○ go.org was not available → golang.org!
○ “Golang” == “Go” (but the actual language is called
Go!)
● Created by Google in 2007
● Open source programming language
Uses
Companies using Go
● Easy to learn! Syntax is clean and simple
● Fast and secure
● Garbage collection
● Easy concurrency model
Pros
● No generics
● Poor library support
● Time-consuming to write
Cons
Hello World!
- Packages
- Imports
- Functions / main
- All material is pulled from https://tour.golang.org/welcome/1 (Official Go website)
Syntax -
Let’s do some math!
- Imports
- Exports
- All material is pulled from https://tour.golang.org/welcome/1 (Official Go website)
Syntax -
Let’s do some math!
- Functions
-
Syntax -
Let’s do some math!
- Shortened function parameters
-
Syntax -
Swappy swap
- Multiple return types
- All material is pulled from https://tour.golang.org/welcome/1 (Official Go website)
Syntax -
Practice time!
- Let’s code up a split number function!
- Split the number 17 into 2 numbers
-
Syntax -
Practice time!
- What is the return type?
- Shorten this function’s return
parameters
-
Syntax -
Practice time!
- What is the return type?
- Shorten this function’s return
parameters
-
Syntax -
Let’s talk about variables!
- Declaring
- All material is pulled from https://tour.golang.org/welcome/1 (Official Go website)
Syntax -
Let’s talk about variables!
- Initializing
- If we wanted to initialize var i, j to 1 and 2,
what would it look like?
- All material is pulled from https://tour.golang.org/welcome/1 (Official Go website)
Syntax -
Let’s talk about variables!
- Initializing
- If we wanted to initialize var i, j to 1 and 2,
what would it look like?
- All material is pulled from https://tour.golang.org/welcome/1 (Official Go website)
Syntax -
Let’s talk about variables!
- Short var declarations
- Used frequently
- All material is pulled from https://tour.golang.org/welcome/1 (Official Go website)
Syntax -
Loops
- For loops
- What does a typical for loop
parameter look like for int i for
(i < 10) comparisons?
- What if we used a shortened var
initialization to initialize i? What
would it look like?
Syntax -
Loops
- For loops
- All material is pulled from https://tour.golang.org/welcome/1 (Official Go website)
Syntax -
Loops
- While loop
- Basically a shorted for loop
- All material is pulled from https://tour.golang.org/welcome/1 (Official Go website)
Syntax -
If statements
Syntax -
If statements
You can shorten if statements that
have preconditions
Syntax -
How can you replicate the Sqrt
function?
You’ll need to use a for loop
and declare extra variables!
Template:
Square roots
Time for your own
practice! Brain teaser
https://tour.golang.org/flowcontrol/8
Discord Setup Steps - Overview
1. Set Up Discord Server
2. Create a new Discord Application -
https://discord.com/developers/applications
a. Create a new Discord Bot
3. Connect the Bot to your Server
Let’s Dive in!!
Let’s Build A Discord Bot
Repl.it Setup Steps - Overview
1. Create a new Repl within Repl.it
https://replit.com/
2. Import discordgo library : github.com/bwmarrin/discordgo
3. Add Discord bot’s token to repl
Let’s Dive in!!
Let’s Build A Discord Bot
Coding Time!
Let’s Build A Discord Bot
Coding with Golang
Sign in
Thank you!
Ad

More Related Content

What's hot (20)

Go language presentation
Go language presentationGo language presentation
Go language presentation
paramisoft
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) Language
Aniruddha Chakrabarti
 
Go Programming Language by Google
Go Programming Language by GoogleGo Programming Language by Google
Go Programming Language by Google
Uttam Gandhi
 
Go Concurrency
Go ConcurrencyGo Concurrency
Go Concurrency
jgrahamc
 
Golang
GolangGolang
Golang
Felipe Mamud
 
GoLang Introduction
GoLang IntroductionGoLang Introduction
GoLang Introduction
Spandana Govindgari
 
Golang
GolangGolang
Golang
Software Infrastructure
 
Golang workshop
Golang workshopGolang workshop
Golang workshop
Victor S. Recio
 
Introduction to Go programming language
Introduction to Go programming languageIntroduction to Go programming language
Introduction to Go programming language
Slawomir Dorzak
 
Go Language presentation
Go Language presentationGo Language presentation
Go Language presentation
Gh-Mohammed Eldadah
 
Introduction to go language programming
Introduction to go language programmingIntroduction to go language programming
Introduction to go language programming
Mahmoud Masih Tehrani
 
Go Lang Tutorial
Go Lang TutorialGo Lang Tutorial
Go Lang Tutorial
Wei-Ning Huang
 
Golang (Go Programming Language)
Golang (Go Programming Language)Golang (Go Programming Language)
Golang (Go Programming Language)
ShubhamMishra485
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
Bo-Yi Wu
 
Introduction to Go language
Introduction to Go languageIntroduction to Go language
Introduction to Go language
Tzar Umang
 
Golang Template
Golang TemplateGolang Template
Golang Template
Karthick Kumar
 
An introduction to programming in Go
An introduction to programming in GoAn introduction to programming in Go
An introduction to programming in Go
David Robert Camargo de Campos
 
Golang and Eco-System Introduction / Overview
Golang and Eco-System Introduction / OverviewGolang and Eco-System Introduction / Overview
Golang and Eco-System Introduction / Overview
Markus Schneider
 
Golang getting started
Golang getting startedGolang getting started
Golang getting started
Harshad Patil
 
Concurrency With Go
Concurrency With GoConcurrency With Go
Concurrency With Go
John-Alan Simmons
 

Similar to Coding with golang (20)

Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016
Codemotion
 
Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017
Codemotion
 
Golang
GolangGolang
Golang
Saray Chak
 
Mobile Apps by Pure Go with Reverse Binding
Mobile Apps by Pure Go with Reverse BindingMobile Apps by Pure Go with Reverse Binding
Mobile Apps by Pure Go with Reverse Binding
Takuya Ueda
 
Me&g@home
Me&g@home Me&g@home
Me&g@home
Vytautas Dauksa
 
Go for Mobile Games
Go for Mobile GamesGo for Mobile Games
Go for Mobile Games
Takuya Ueda
 
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
Evan Lin
 
Adopt OpenJDK presentation (slide deck)
Adopt OpenJDK presentation (slide deck)Adopt OpenJDK presentation (slide deck)
Adopt OpenJDK presentation (slide deck)
Mani Sarkar
 
Feelin' Groovy: A Groovy Developer in the Java World
Feelin' Groovy: A Groovy Developer in the Java WorldFeelin' Groovy: A Groovy Developer in the Java World
Feelin' Groovy: A Groovy Developer in the Java World
Ken Kousen
 
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinarThe case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
btopro
 
Develop Android/iOS app using golang
Develop Android/iOS app using golangDevelop Android/iOS app using golang
Develop Android/iOS app using golang
SeongJae Park
 
The webs and it's future.
The webs and it's future.The webs and it's future.
The webs and it's future.
Gbolahan Alli
 
Android is going to Go! - Android and goland - Almog Baku
Android is going to Go! - Android and goland - Almog BakuAndroid is going to Go! - Android and goland - Almog Baku
Android is going to Go! - Android and goland - Almog Baku
DroidConTLV
 
Android is going to Go! Android and Golang
Android is going to Go! Android and GolangAndroid is going to Go! Android and Golang
Android is going to Go! Android and Golang
Almog Baku
 
Javascript as a target language - GWT kickoff - part1/2
Javascript as a target language - GWT kickoff - part1/2Javascript as a target language - GWT kickoff - part1/2
Javascript as a target language - GWT kickoff - part1/2
JooinK
 
Develop Android app using Golang
Develop Android app using GolangDevelop Android app using Golang
Develop Android app using Golang
SeongJae Park
 
Using Go in DevOps
Using Go in DevOpsUsing Go in DevOps
Using Go in DevOps
Eficode
 
Natalie Pistunovich - Using Go In Dev Ops
Natalie Pistunovich - Using Go In Dev OpsNatalie Pistunovich - Using Go In Dev Ops
Natalie Pistunovich - Using Go In Dev Ops
Fraugster
 
Google Assistant Overview
Google Assistant Overview  Google Assistant Overview
Google Assistant Overview
AI.academy
 
Oracle GoldenGate Studio Intro
Oracle GoldenGate Studio IntroOracle GoldenGate Studio Intro
Oracle GoldenGate Studio Intro
Bobby Curtis
 
Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016
Codemotion
 
Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017
Codemotion
 
Mobile Apps by Pure Go with Reverse Binding
Mobile Apps by Pure Go with Reverse BindingMobile Apps by Pure Go with Reverse Binding
Mobile Apps by Pure Go with Reverse Binding
Takuya Ueda
 
Go for Mobile Games
Go for Mobile GamesGo for Mobile Games
Go for Mobile Games
Takuya Ueda
 
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
Evan Lin
 
Adopt OpenJDK presentation (slide deck)
Adopt OpenJDK presentation (slide deck)Adopt OpenJDK presentation (slide deck)
Adopt OpenJDK presentation (slide deck)
Mani Sarkar
 
Feelin' Groovy: A Groovy Developer in the Java World
Feelin' Groovy: A Groovy Developer in the Java WorldFeelin' Groovy: A Groovy Developer in the Java World
Feelin' Groovy: A Groovy Developer in the Java World
Ken Kousen
 
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinarThe case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
btopro
 
Develop Android/iOS app using golang
Develop Android/iOS app using golangDevelop Android/iOS app using golang
Develop Android/iOS app using golang
SeongJae Park
 
The webs and it's future.
The webs and it's future.The webs and it's future.
The webs and it's future.
Gbolahan Alli
 
Android is going to Go! - Android and goland - Almog Baku
Android is going to Go! - Android and goland - Almog BakuAndroid is going to Go! - Android and goland - Almog Baku
Android is going to Go! - Android and goland - Almog Baku
DroidConTLV
 
Android is going to Go! Android and Golang
Android is going to Go! Android and GolangAndroid is going to Go! Android and Golang
Android is going to Go! Android and Golang
Almog Baku
 
Javascript as a target language - GWT kickoff - part1/2
Javascript as a target language - GWT kickoff - part1/2Javascript as a target language - GWT kickoff - part1/2
Javascript as a target language - GWT kickoff - part1/2
JooinK
 
Develop Android app using Golang
Develop Android app using GolangDevelop Android app using Golang
Develop Android app using Golang
SeongJae Park
 
Using Go in DevOps
Using Go in DevOpsUsing Go in DevOps
Using Go in DevOps
Eficode
 
Natalie Pistunovich - Using Go In Dev Ops
Natalie Pistunovich - Using Go In Dev OpsNatalie Pistunovich - Using Go In Dev Ops
Natalie Pistunovich - Using Go In Dev Ops
Fraugster
 
Google Assistant Overview
Google Assistant Overview  Google Assistant Overview
Google Assistant Overview
AI.academy
 
Oracle GoldenGate Studio Intro
Oracle GoldenGate Studio IntroOracle GoldenGate Studio Intro
Oracle GoldenGate Studio Intro
Bobby Curtis
 
Ad

Recently uploaded (20)

Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Ad

Coding with golang

  • 1. Coding with Golang October 21st, 6-7PM Sign in
  • 2. What is a GDSC? Google Developer Student Clubs
  • 3. We’re open to all majors! If you would like to join GDSC at UCF, it’s easy! The linked slide deck has all of our socials, calendar, mailing list, a step-by-step guide on joining Bevy (our Google-created RSVP site), and more! tinyurl.com/gdsc-ucf-join-in Want to Join GDSC?
  • 6. Meet today’s speakers Hannah Moss GDSC UCF - Lead/President Alice Yu GDSC UCF - VP/Co-Lead Andrei Gulapa GDSC UCF - Marketing Lead
  • 8. What is Golang/ Go? ● Golang or..Go? ○ go.org was not available → golang.org! ○ “Golang” == “Go” (but the actual language is called Go!) ● Created by Google in 2007 ● Open source programming language
  • 11. ● Easy to learn! Syntax is clean and simple ● Fast and secure ● Garbage collection ● Easy concurrency model Pros
  • 12. ● No generics ● Poor library support ● Time-consuming to write Cons
  • 13. Hello World! - Packages - Imports - Functions / main - All material is pulled from https://tour.golang.org/welcome/1 (Official Go website) Syntax -
  • 14. Let’s do some math! - Imports - Exports - All material is pulled from https://tour.golang.org/welcome/1 (Official Go website) Syntax -
  • 15. Let’s do some math! - Functions - Syntax -
  • 16. Let’s do some math! - Shortened function parameters - Syntax -
  • 17. Swappy swap - Multiple return types - All material is pulled from https://tour.golang.org/welcome/1 (Official Go website) Syntax -
  • 18. Practice time! - Let’s code up a split number function! - Split the number 17 into 2 numbers - Syntax -
  • 19. Practice time! - What is the return type? - Shorten this function’s return parameters - Syntax -
  • 20. Practice time! - What is the return type? - Shorten this function’s return parameters - Syntax -
  • 21. Let’s talk about variables! - Declaring - All material is pulled from https://tour.golang.org/welcome/1 (Official Go website) Syntax -
  • 22. Let’s talk about variables! - Initializing - If we wanted to initialize var i, j to 1 and 2, what would it look like? - All material is pulled from https://tour.golang.org/welcome/1 (Official Go website) Syntax -
  • 23. Let’s talk about variables! - Initializing - If we wanted to initialize var i, j to 1 and 2, what would it look like? - All material is pulled from https://tour.golang.org/welcome/1 (Official Go website) Syntax -
  • 24. Let’s talk about variables! - Short var declarations - Used frequently - All material is pulled from https://tour.golang.org/welcome/1 (Official Go website) Syntax -
  • 25. Loops - For loops - What does a typical for loop parameter look like for int i for (i < 10) comparisons? - What if we used a shortened var initialization to initialize i? What would it look like? Syntax -
  • 26. Loops - For loops - All material is pulled from https://tour.golang.org/welcome/1 (Official Go website) Syntax -
  • 27. Loops - While loop - Basically a shorted for loop - All material is pulled from https://tour.golang.org/welcome/1 (Official Go website) Syntax -
  • 29. If statements You can shorten if statements that have preconditions Syntax -
  • 30. How can you replicate the Sqrt function? You’ll need to use a for loop and declare extra variables! Template: Square roots Time for your own practice! Brain teaser https://tour.golang.org/flowcontrol/8
  • 31. Discord Setup Steps - Overview 1. Set Up Discord Server 2. Create a new Discord Application - https://discord.com/developers/applications a. Create a new Discord Bot 3. Connect the Bot to your Server Let’s Dive in!! Let’s Build A Discord Bot
  • 32. Repl.it Setup Steps - Overview 1. Create a new Repl within Repl.it https://replit.com/ 2. Import discordgo library : github.com/bwmarrin/discordgo 3. Add Discord bot’s token to repl Let’s Dive in!! Let’s Build A Discord Bot
  • 33. Coding Time! Let’s Build A Discord Bot
  • 34. Coding with Golang Sign in Thank you!