Rust If - Else - Match - Loop - While - For | Let's Learn Rust
In this video we are going to learn how to control the flow of our applications in Rust.
We will learn how to use if statements along with else if and else statements. Next we will cover how match in rust works and how it is similar and not so similar to C switch statements.
Then we will start looking at how to loop our code using the loop, while, and for loops.
Something really interesting we can do with the loop control is return a value from it!
I like my new setup! Thanks to the TobenONE UDS019 Laptop Dock!
Check it out here:
https://bit.ly/3FCPgSj
It does say for Windows, but it works perfectly fine on Linux!
@tobenone
⚡️ Gear I use:
? Laptop: https://frame.work/products/laptop-diy-13-gen-intel?q=processor
? M1 Mac Mini: https://amzn.to/3RiyJu2
⌨️ Mech Keyboard: https://amzn.to/3PmR5ri
? My Camera Lumix S5: https://amzn.to/3EJ2RY6
? Panasonic 35mm Lens: https://amzn.to/3F3J1ad
? Rode Podmic: https://amzn.to/3ZtR6hO
☁️ Cloudlifter: https://amzn.to/3ZqTVju
? Alternative Cloudlifter: https://amzn.to/48rtqia
? Audio Interface: https://amzn.to/3Pz5TmO
? Main Video Light: https://amzn.to/3ZkJkql
? Softbox: https://amzn.to/3sZO60g
I only recommend products I would use myself and all opinions expressed here are my own. Some of these links are Affiliate Links and I may earn a small commission if you click through and purchase something--at no additional cost to you!
#tobenone #UDS019 Laptop Docking Station Dual Monitor
...
https://www.youtube.com/watch?v=oW4ZaIwyZDM
In this tutorial we will explore a toolkit that allows us to write GUI applications with Go! I recently found the Fyne toolkit when looking at all the awesome things you can do with Go, and this seemed like the one of the better ones.
Fyne is cross platform: Windows, Mac, Linux, Raspberry PI, BSD, Android, iOS! You can target just about everything with this toolkit!
You can find the library at:
https://fyne.io/
Awesome Go:
https://awesome-go.com/
Random Fact API:
https://uselessfacts.jsph.pl/
If you wanna support my channel, you can buy me a coffee:
☕️ https://www.buymeacoffee.com/nerdcademy
Coffee makes the code go!!!
All code found in this video will be at:
? https://github.com/NerdCademyDev/golang
? Let me know if you have any issues!
⚡️ What else would you like me to cover?
? Always Keep Learning!
#nerdcademy #golang #gui
...
https://www.youtube.com/watch?v=l9TGGU79Y04
In this video programming tutorial we will learn all about using loops in Go! We will cover the basics of a for loop, a while loop, and an infinite loop. We will discuss what a do-while loop is. We will learn about the keywords break, continue, and how to use range for an array or slice.
We will also cover getting user input and reversing an integer using a while loop in Go!
All code found in this video will be at:
? https://github.com/NerdCademyDev/golang
? Let me know if you have any issues!
⚡️ What else would you like me to cover?
? Always Keep Learning!
In today's video we learn about error handling in Go! In this tutorial we will learn how to handle errors, return errors, create custom error types, and some error handling best strategies in Go!
We will learn the difference between other languages that use try/catch and throw for errors and exception versus the idiomatic way Go handles errors.
So if you are just starting out and don't understand error handling in Go, then this is the video tutorial for you!
Interfaces in Go Tutorial:
https://youtu.be/KB3ysH8cupY
All code found in this video will be at:
? https://github.com/NerdCademyDev/golang
? Let me know if you have any issues!
⚡️ What else would you like me to cover?
? Always Keep Learning!
After having this laptop for a little over a month, I thought I would share the things I like and don't like about this laptop. I have some interesting use cases that have me switching out the SSD every once in a while and has caused some issues.
My main usage is writing code: Docker Containers, K3D, Go, screen recording with OBS, and watching YouTube videos of course!
This is not sponsored and no one paid me to make this video; I bought the laptop because I needed an upgrade and just wanted to share my thoughts and opinions.
If you wanna support my channel, you can buy me a coffee:
☕️ https://www.buymeacoffee.com/nerdcademy
Coffee make the code go!!!
? Let me know if you have any issues!
⚡️ What else would you like me to cover?
? Always Keep Learning!
I finally get my first mechanical keyboard... I should have gotten one of these much sooner! I got the Keychron K4 v2 96% Layout (100 keys) with Gateron Brown Switches.
In this video I open it up and give my initial review after using it for about a week. I tested it on Mac, Linux, and Windows.
You can pick it up here:
https://www.amazon.com/Keychron-Swappable-Mechanical-Bluetooth-Gamer-Version/dp/B08LR9CJCJ/ref=sr_1_3?crid=1O4GB63T9A3E7&keywords=keychron%2Bk4%2Bv2%2Bhot%2Bswappable%2Bbrown&qid=1644012663&sprefix=keychron%2Bk4%2Bv2%2Bhot%2Caps%2C84&sr=8-3&th=1
https://www.keychron.com/products/keychron-k4-wireless-mechanical-keyboard-version-2?variant=32287344394329
If you wanna support my channel, you can buy me a coffee:
☕️ https://www.buymeacoffee.com/nerdcademy
Coffee make the code go!!!
#keychronk4 #mechanicalkeyboard #nerdcademy
...
https://www.youtube.com/watch?v=IU1CTfP0Vjc
In this video tutorial, we will take a look at Colly, a Go web scraping library, and learn a little bit about web scraping.
Web site used to scrape:
http://toscrape.com
If you wanna support my channel, you can buy me a coffee:
☕️ https://www.buymeacoffee.com/nerdcademy
Coffee make the code go!!!
? Programming Laptop
https://kit.co/nerdcademy/framework-laptop
? My Video Kit
https://kit.co/nerdcademy/my-video-kit
? Video Editing PC
https://kit.co/nerdcademy/m1-mac-mini-setup
? Gopher Character artwork from:
https://github.com/MariaLetta/free-gophers-pack
...
https://www.youtube.com/watch?v=FkbB-vJxS8o
Today let's take a plunge into Zig and try and solve a coding challenge from the Advent of Code (problem 1 of 2022)
Linode $60/100day free credit:
https://www.linode.com/lp/refer/?r=f208ff2dd1bb6ecbe427800d75bf0884b95936ec
If you wanna support my channel, you can buy me a coffee:
☕️ https://www.buymeacoffee.com/nerdcademy
Coffee make the code go!!!
⚡️ Gear I use:
? Laptop: https://frame.work/products/laptop-diy-13-gen-intel?q=processor
? M1 Mac Mini: https://amzn.to/3RiyJu2
⌨️ Mech Keyboard: https://amzn.to/3PmR5ri
? My Camera Lumix S5: https://amzn.to/3EJ2RY6
? Panasonic 35mm Lens: https://amzn.to/3F3J1ad
? Rode Podmic: https://amzn.to/3ZtR6hO
☁️ Cloudlifter: https://amzn.to/3ZqTVju
? Alternative Cloudlifter: https://amzn.to/48rtqia
? Audio Interface: https://amzn.to/3Pz5TmO
? Main Video Light: https://amzn.to/3ZkJkql
? Softbox: https://amzn.to/3sZO60g
I only recommend products I would use myself and all opinions expressed here are my own. Some of these links are Affiliate Links and I may earn a small commission if you click through and purchase something--at no additional cost to you!
...
https://www.youtube.com/watch?v=m7nIEMTCa7I
In this video we are going to learn what a unit test and what mocking and stubs are. We learn how to create go files for testing, using the testing library, and set up basic unit tests plus using a slice to run a multitude of tests.
We also use the httptest package to set up a mock server to mimic getting JSON data from the web. So that we learn how to do mock testing in golang. There are a lot of different ways to do mock testing, in this tutorial we set up a simple mock test using a stub server to return JSON data for testing.
More information on the loop back interface:
https://en.wikipedia.org/wiki/Loopback#Virtual_loopback_interface
More information on the net/http/httptest package:
https://pkg.go.dev/net/http/httptest
All code found in this video will be at:
? https://github.com/NerdCademyDev/golang
? Let me know if you have any issues!
⚡️ What else would you like me to cover?
? Always Keep Learning!