Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: TAM, JJ

No description

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A hands-on starter kit that teaches Go through short annotated snippets and then drills Python fundamentals via bite-sized exercises. Best for absolute beginners who learn by typing and running code rather than reading theory. 【Book Arc】 - **Opening (~0%–9%)**: Environment setup and first contact — installing Go, running a Hello World, and meeting primitive types, complex numbers, and the `iota` constant pattern. Solves the "how do I even start" barrier. - **Early (~9%–27%)**: Core data handling — strings, concatenation, fixed-size arrays, and the crucial value-vs-reference distinction that trips up newcomers from other languages. - **Middle (~27%–64%)**: The working core of Go — slices with `make`/`append`, maps (create, read, delete, iterate), control flow (`if` with inline init, `switch`, the single `for` loop), and the beginnings of functions including variadics and multiple returns. - **Late (~64%–82%)**: Functions in depth (anonymous functions, error returns) and structs — heap vs stack creation, `&` and `new`, struct literals, constructor functions, and methods with receiver syntax. - **Ending (~82%–100%)**: A pivot to Python practice exercises — list and dictionary manipulation, string operations, math problems (LCM, sphere volume, digit patterns), and small file/OS checks. The excerpts do not show a bridging chapter between the Go and Python halves. 【Key Takeaways】 - **Go's type system is explicit and sized** (Opening): the book tabulates every integer width and float variant, so you learn to pick types deliberately rather than by habit. - **Arrays copy, slices share** (Early–Middle): this is the single most important mental model in the Go half — passing an array to a function leaves the original untouched, while a slice mutates the underlying data. - **Maps are the workhorse collection** (Middle): creation, `len`, `delete`, and `range` iteration are all demonstrated with runnable output, including the gotcha that a missing key returns a zero value silently. - **Go has exactly one loop** (Middle): the `for` keyword covers counting loops, while-style loops, and `range` iteration — a deliberate simplification worth internalizing early. - **Functions are first-class and multi-valued** (Middle–Late): variadics, anonymous functions, and returning `(result, error)` pairs together form Go's idiomatic error-handling style. - **Structs separate data from behavior** (Late): methods attached via receivers keep structs clean, and the book contrasts stack vs heap creation with `new` and `&`. - **Python exercises reinforce the same fundamentals from a different angle** (Ending): list min/max/sum, dictionary key removal, `nlargest`, and string intersection show how the same problems look in a dynamically typed language. 【Reading Tips】 - **Type every snippet.** This is a cookbook, not a narrative — the value comes from running the code and seeing the printed output, especially for slice-vs-array behavior. - **Deep-read the slices and maps sections (Middle).** These carry the most conceptual weight; skim the primitive-type tables if you already know another typed language. - **Watch for the language switch around 82%.** The Python half is a separate exercise set with no transition — treat it as a second, independent workbook. - **Use the exercises as self-tests.** Cover the solution, attempt the problem, then compare — the Python section is structured for exactly this. - **Don't expect project-scale examples.** Despite the "hands-on projects" framing, the excerpts show isolated snippets rather than integrated applications. 【Coverage Limits】 This guide covers the full arc visible in the excerpts: Go fundamentals through structs and methods, then Python practice exercises. The excerpts do not cover any capstone project, concurrency, interfaces, or the transition between the two languages, so those may exist in the book but are not represented here.
Excerpt 1
书名: LEARN GOLANG QUICKLY AND PYTHON CODING PRACTICE EXERCISES Coding For Beginners (TAM, JJ) (Z-Library) 作者: TAM, JJ Go language: Delete item from the map Go...
View in text
Page 20
"fmt" )   func main() {   var i, j, k int = 1 , 2 , 3   fmt.Println( "i : " , i, ", j : " , j, ", k : " , k)   }   Output i :  1 , j :  2 , k :  3 Go languag...
View in text
Excerpt 3
n takes three arguments type, length and capacity.   Syntax make([]Type, length, capacity) make([]Type, length) []Type{} []Type{value1, value2, ..., valueN}...
View in text
Excerpt 4
a is 10") }   Above statements can be written like below.   if a := 10; a == 10 {          fmt.Println("Value of a is 10") }   HelloWorld.go package main   i...
View in text
Excerpt 5
ments.   for index, value := range countries {          fmt.Println("index : ", index, ", Value : ", value) }   HelloWorld.go package main   import "fmt"   f...
View in text
Excerpt 6
ror Occurred while creating employee" )   fmt.Println(err1) } else {   emp1.printEmployeeInfo() }   emp2, err2 := getEmployee( "JJTam" , - 10 , [] string { "...
View in text
Excerpt 7
, 6, 7, 8] diff_list1_list2 = list(set(list1) - set(list2)) diff_list2_list1 = list(set(list2) - set(list1)) total_diff = diff_list1_list2 + diff_list2_list1...
View in text
Tags
AI categories
GoPythonProgramming
Publish Year: 2021
Language: English
File Format: PDF
File Size: 879.4 KB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…