Leanpub Header

Skip to main content

A Go Developer's Notebook

Where I Go During My Holidays

A Go Developer's Notebook
هذا الكتاب هو 10% كاملةأخر تحديث لهذا الكتاب كان فى 2019-11-11

A Go Developer's Notebook is a living book about the Go language and programming in general, written by a long-standing member of the Go community and based on her experience working with Go since its initial public release in November 2009.

الحد الأدنى للسعر

$10.00

$25.00

أنت تدفع

مستحقات المؤلف

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
1,385
القراء
398
عدد الصفحات
حول

حول

نبذه عن الكتاب

This is the book that I wish had existed when I first started exploring the Go language, built around code examples I could have played with at my own pace.

It's also like the book I wish had existed when I first started programming - an amalgam of the magazine articles which taught me to code and the wisdom (or not) conferred by forty-plus years of doing just that. I hope it's as readable to the interested teenager taking their first steps into hacking as it is the university graduate armed with a wealth of theory but looking for practical insight.

It's also more generally a book about reading and writing code, and about many areas of computing which fascinate me. Perhaps they'll fascinate you too!

One thing this isn't is a professional book, by which I mean that it's not concerned with helping a professional developer quickly transition from another programming language to Go. There are plenty of those already in print, written by much better teachers than me. Instead my aim in this text is to provide a much deeper exploration of subjects I'm interested in through the lens of Go, teaching the language almost as an after-thought.

The didactic style is brutally simple and old-school: write code, explain code, modify code, explain changes, repeat as necessary. Along the way I'll do my best to explain what each example is trying to achieve, and the thinking which evolves it towards its final form.

Each chapter is built around a particular programming task which I use to demonstrate how various features of the Go language can be used as well as to share many of the things I've learned during several decades of coding. Some of these programming tasks may appear deceptively simple, others totally irrelevant to the life of a commercial developer. I intend to disabuse you of both notions, whilst at the same time keeping this a Hacker's Notebook: depending on your outlook this is either a logbook of experiments undertaken and rabbit-holes delved in pursuit of knowledge, or a grimoire of the esoteric and unutterably unconscionable.

If the choice of subject matter at times seems eccentric, remember that my target audience is my teenage self, hunched starry eyed and clueless over an 8-bit micro, not the fiftysomething code diva I've since become. My teenage self knew nothing about reading code, testing, refactoring, the scientific method, clean coding style, or academic theory.

As the reader you don't need to know any of these things either, though if you do I hope you'll still find some useful nuggets to add to your toolkit. And if you don't, then hopefully some of that will rub off and prove useful to you in other areas of your life.

So in essence this is a book inspired by my love of programming for the sake of programming, my disillusionment with the widespread desire to teach professional programming at the expense of exploration and fun, and my hope that readers of all ages will find the same pleasure in reading this book that I've experienced in researching and writing it.

There's a public github repo with the code for each completed narrative section.

To further whet your appetite I provide a free sample comprising an introduction to concurrent network programming with Go that includes practical encryption and is probably sufficient for a professional developer to get up to speed with the language (currently in its pre-Generics form). If that's all you're after, enjoy this free gift.

I've also given a brief presentation on the philosophy behind this living book.

مشاركة هذا الكتاب

الملاحظات

المؤلف

نبذه عن المؤلف

Eleanor McHugh

London-based hacker Ellie has a passion for the esoteric corners of programming stretching back to her misspent teenage years. During the course of her career she's worked on mission critical systems ranging from avionics to banking security and now devotes her time to writing digital romances in Ruby and Go.

As a responsible parent she enjoys polyhedral dice, home brewing and gothic music.

المحتويات

جدول المحتويات

Preface

  1. Introducing Go
  2. Getting Started
  3. So what is Go?
  4. Open source
  5. Efficient compilation
  6. Efficient execution
  7. Ease of programming
  8. And where did it come from?
  9. Into the wild
  10. Where next?

Hello World

  1. Packages
  2. Constants
  3. Variables
  4. Functions
  5. Encapsulation
  6. Generalisation
  7. Startup
  8. HTTP
  9. The Environment
  10. Handling Signals
  11. TCP/IP
  12. UDP
  13. RSA obfuscated UDP
  14. Error Handling
  15. Exceptions
  16. Why doesn’t Go have native exceptions?
  17. Why does Go not have exceptions?
  18. Dynamism comes at a price

Echo

  1. TO DO:
  2. Arguments
  3. Flags
  4. TO DO
  5. Command-line Boilerplate and Standard I/O
  6. TO DO
  7. Conditional Flags
  8. Errors
  9. TO DO
  10. Files
  11. Regular Expressions
  12. Interactive
  13. Pipes
  14. Encryption

Chat

  1. TO DO

URL Shortener

  1. TO DO
  2. Going Loopy
  3. Adventures in Iteration

Linear Sequences

  1. The for {} construct
  2. User Defined Slices
  3. Iterating Through Arrays
  4. Arrays and Slices Exposed
  5. type SliceHeader
  6. Iteration and structured types
  7. reflect.Values and allocated memory
  8. validity
  9. addressability
  10. interfaceability
  11. setability

mappings

  1. TO DO
  2. Iteration and maps

Going Loopy Part n

  1. Closures
  2. Concurrency
  3. Asynchrononus channels
  4. Channel buffering equivalence
  5. Select
  6. Duck-typing
  7. Reflection
  8. User defined types
  9. Interface types
  10. Software Machines

Software Machines

  1. array stacks
  2. cactus stacks
  3. hash maps
  4. heaps
  5. switch dispatchers
  6. direct threaded dispatchers
  7. indirect threaded dispatchers
  8. assembler
  9. tail calls
  10. architectures
  11. fun with types
  12. timers
  13. Instruction Set
  14. processor core
  15. accumulator machine
  16. stack machine
  17. register machine
  18. vector machine
  19. TO DO

Software Machines

  1. memory
  2. Functional Programming
  3. Metaprogramming and First-Class Functions
  4. Pure Functions, Expressions, and Recursion
  5. Partial Application and Currying
  6. Lazy Evaluation and Memoization
  7. Infinite Series and Data Structures
  8. Immutability
  9. Values vs References
  10. Immutable Container Types
  11. The Cons Cell
  12. Singly-linked Lists
  13. Spaghetti Stacks
  14. Queues
  15. Types
  16. Category Theory
  17. Monads & Side-Effects
  18. Tail Call Elimination
  19. Trampolining

Functions

  1. The Machine View
  2. Adding Human Readability
  3. Procedures and Functions in Go
  4. The Mathematical View
  5. Simple Factorials
  6. First-Class and Higher-Order Functions
  7. Closures
  8. Currying
  9. Recursion
  10. funcs() Which Call Themselves
  11. Mathematical Functions Which Call Themselves
  12. Error Handling the Go Way
  13. Changing Types
  14. Why is working with big.Int so frustrating?

Memoization

  1. A Shallow Introduction to Big-O Notation
  2. In-Memory Caching
  3. Private Caches
  4. Caches in Hashes
  5. Once Upon A Flat File
  6. Let’s Talk About Type
  7. utility.go
  8. cache.go
  9. main.go
  10. A Generalised Cache
  11. cache.go
  12. utility.go
  13. factorial.go
  14. diskcache.go
  15. main.go
  16. Explicitly Layered Caching
  17. A Dedicated Memory Cache
  18. Writing Files in a Functional Manner
  19. Preventing Concurrent Writes
  20. Sharing Locks Between Processes
  21. A Dedicated Disk Cache
  22. Combining Caches
  23. Caches in Random Access Files
  24. Caches in Databases
  25. Caches on the Network
  26. Networks as Caches
  27. Encrypted Caches

Immutable Structures

Lazy Evaluation

  1. Partial Application

Monads

  1. If Not “Is” Then “What For”?
  2. Logic Programming
  3. Unification
  4. Odds & Sods

Maps and Hashes

  1. TO DO
  2. Go maps
  3. A simple Map implementation

Types

  1. TO DO
  2. Primitives
  3. Methods
  4. References
  5. Object Orientation
  6. Structures
  7. Embedding
  8. User defined types, pt 2
  9. User defined types, pt 3
  10. Testing types
  11. Type embedding
  12. Benchmarking types
  13. Interfaces
  14. Interfaces, pt 1
  15. package adder
  16. TO DO

Pretty Pictures

  1. TO DO
  2. TO DO
  3. Basic Mandelbrot

Phong Shading

Communication by Sharing

  1. TO DO

Concurrency

  1. synchronous
  2. asynchronous
  3. map/reduce
  4. map/reduce

Errors, Exceptions & Flow Control

  1. Catch & Throw
  2. Stack Traces
  3. Exceptions

Lists, Stacks, Dictionaries, and Queues

  1. TO DO

Duck Typing, Reflection and Type Manipulation

  1. package generalise
  2. raw
  3. find underlying type

Beyond Go

  1. Encryption and Privacy
  2. Accessing System Services
  3. Interfacing with Dynamic Libraries
  4. SQLite 3
  5. Ruby?

Network Adventures

  1. TO DO

Platform Fun

  1. TO DO
  2. Those Other Languages

احصل على الفصول النموذجية المجانية

Click the buttons to the right to get the free sample in PDF or EPUB, or read the sample online here

Leanpub بدون شروط, بدون مجازفه, 100% ضمان لسعادتك معنا

فى خلال 60 يوم من الشراء تستطيع أن تسترد 100% من الذى دفعته فى أى مشتريات من Leanpub , بنقرتين من الماوس. ألقى نظره على كامل الشروط.

اكسب 8$ على كل عملية شراء بقيمة 10$، و16$ على كل عملية شراء بقيمة 20$

نحن ندفع عائدات بنسبة ٨٠٪ على المشتريات التي تبلغ قيمتها 7.99$ أو أكثر، وعائدات بنسبة ٨٠٪ مع خصم رسوم ثابتة قدرها 50 سنتاً على المشتريات التي تتراوح بين 0.99$ و7.98$. تكسب 8$ على كل بيع بقيمة 10$، و16$ على كل بيع بقيمة 20$. لذلك، إذا بعنا 5000 نسخة غير مستردة من كتابك بسعر 20$، ستكسب 80,000$.

(نعم، بعض المؤلفين قد كسبوا بالفعل أكثر من ذلك بكثير على Leanpub.)

في الواقع، كسب المؤلفون أكثر من 14 مليون دولار من خلال الكتابة والنشر والبيع على Leanpub.

تعرف على المزيد حول الكتابة على Leanpub

تحديثات مجانية. خالي من حماية DRM.

إذا اشتريت كتابًا من Leanpub، فستحصل على تحديثات مجانية طالما يقوم المؤلف بتحديث الكتاب! يستخدم العديد من المؤلفين Leanpub لنشر كتبهم أثناء الكتابة. جميع القراء يحصلون على تحديثات مجانية، بغض النظر عن متى اشتروا الكتاب أو كم دفعوا (بما في ذلك مجانًا).

معظم كتب Leanpub متوفرة بتنسيق PDF (للكمبيوتر)، EPUB (للهواتف والأجهزة اللوحية و Kindle). يتم عرض التنسيقات التي يتضمنها الكتاب في الزاوية العلوية اليمنى من هذه الصفحة.

وأخيرًا، الكتب من Leanpub لا تحتوي على أي هراء حماية حقوق النسخ DRM، لذا يمكنك قراءتها بسهولة على أي جهاز مدعوم.

تعرف على المزيد حول تنسيقات الكتب الإلكترونية من Leanpub وأماكن قراءتها

اكتب وانشر على Leanpub

يستخدم المؤلفون والناشرون Leanpub لنشر كتب إلكترونية رائعة قيد التقدم والمكتملة، تمامًا مثل هذه. يمكنك استخدام Leanpub للكتابة، والنشر وبيع كتابك أيضًا! Leanpub هو منصة قوية للمؤلفين الجادين، يجمع بين تدفق الكتابة والنشر البسيط والأنيق مع متجر يركز على بيع الكتب الإلكترونية قيد التقدم. Leanpub هو آلة كتابة سحرية للمؤلفين: فقط اكتب بنص عادي، ولنشر كتابك الإلكتروني، فقط اضغط على زر. إنه حقًا بهذه السهولة.

تعرف على المزيد حول الكتابة على Leanpub