Day 4 of Learning: Switching Between Golang and Deep Learning
It’s Day 4, and today was a little different - not heavy on code, but still a strong day of learning. I’m trying to balance two learning paths right now: backend fundamentals with Go and ML + deep learning using PyTorch. Wrapping My Head Around Pointers and Structs in Go Most of today’s Go time was spent clarifying how data is passed and accessed when using pointers and structs. type User struct { FirstName string LastName string BirthDate string createdAt time.Time } func Struct_fn() { FirstName, _ := helpers.StrUserInput("Please enter your first name: ") LastName, _ := helpers.StrUserInput("Please enter your last name: ") BirthDate, _ := helpers.StrUserInput("Please enter your birthdate (MM/DD/YYYY): ") appUser := User{ FirstName: FirstName, LastName: LastName, BirthDate: BirthDate, createdAt: time.Now(), } outputsUserDetails(&appUser) } func outputsUserDetails(u *User) { fmt.Println(u.FirstName, u.LastName, u.BirthDate) } func (u *User) ClearUserName() { u.FirstName = "" u.LastName = "" } Even after completing the basics, I had to go back to ChatGPT, asking follow-up questions like: ...