liarsdice

module
v0.0.0-...-53b8cb7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0

README

Ultimate Go: Liar's Dice

Go Report Card go.mod Go version

Copyright 2021, 2022, Ardan Labs
hello@ardanlabs.com

Description

This class teaches you how to build an Ethereum Smart Contract. This project implements a game of Liar's Dice where a crypto wallet is used for authentication and a smart contract is used to maintain the bank. Once a player is authenticated, they bet money for each game played and that money comes from their crypto wallet. The class is a mix of lecture and coding. During the class you will learn the different aspects of smart contract technology and pair program with the instructor as you build this code base from scratch.

image info image info

Read the Wiki for more information about the project and running the code.

Licensing

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Learn More

Reach out about corporate training events, open enrollment live training sessions, and on-demand learning options.

Ardan Labs (www.ardanlabs.com)
hello@ardanlabs.com

To attend any of our high-performance tranings check out this link:
https://www.ardanlabs.com/training

Index

Purchase Video

We have not yet produced the video for this class, but to see other Go related classes check out this link.

education.ardanlabs.com

Our Experience

We have taught Go to thousands of developers all around the world since 2014. There is no other company that has been doing it longer and our material has proven to help jump-start developers 6 to 12 months ahead of their knowledge of Go. We know what knowledge developers need in order to be productive and efficient when writing software in Go.

Our classes are perfect for intermediate-level developers who have at least a few months to years of experience writing code in Go. Our classes provide a very deep knowledge of the programming langauge with a big push on language mechanics, design philosophies and guidelines. We focus on teaching how to write code with a priority on consistency, integrity, readability and simplicity. We cover a lot about “if performance matters” with a focus on mechanical sympathy, data oriented design, decoupling and writing/debugging production software.

Our Teacher

William Kennedy (@goinggodotnet)

William Kennedy is a managing partner at Ardan Labs in Miami, Florida, a mobile, web, and systems development company. Bill has written extensively on the Ardan Labs blog, has written two books, and has trained thousands of developers worldwide in Go. Bill is also a founding member of GoBridge, which is working to increase Go adoption through diversity.

Video Training
Ultimate Go Video
Ardan Labs YouTube Channel

Blog
Going Go

Writing
Running MongoDB Queries Concurrently With Go
Go In Action

Articles
IT World Canada

Video
P99 Talk (2022) - Evaluating Performance In Go
GopherCon Europe (2022) - Practical Memory Profiling
Dgrpah Day (2021) - Getting Started With Dgraph and GraphQL
GDN Event #1 (2021) - GoBridge Needs Your Help
Training Within The Go Community (2019)
GopherCon Australia (2019) - Modules
Golab (2019) - You Want To Build a Web Service?
GopherCon Singapore (2019) - Garbage Collection Semantics
GopherCon India (2019) - Channel Semantics
GoWayFest Minsk (2018) - Profiling Web Apps
GopherCon Singapore (2018) - Optimizing For Correctness
GopherCon India (2018) - What is the Legacy You Are Leaving Behind
Code::Dive (2017) - Optimizing For Correctness
Code::Dive (2017) - Go: Concurrency Design
dotGo (2017) - Behavior Of Channels
GopherCon Singapore (2017) - Escape Analysis
Capital Go (2017) - Concurrency Design
GopherCon India (2017) - Package Oriented Design
GopherCon India (2015) - Go In Action
GolangUK (2016) - Dependency Management
GothamGo (2015) - Error Handling in Go
GopherCon (2014) - Building an analytics engine

Prague Meetup (2021) - Go Module Engineering Decisions
Practical Understanding Of Scheduler Semantics (2021)
Go Generics Draft Proposal (2020)
Hack Potsdam (2017) - Tech Talk with William Kennedy
Chicago Meetup (2016) - An Evening
Vancouver Meetup (2016) - Go Talk & Ask Me Anything With William Kennedy
Vancouver Meetup (2015) - Compiler Optimizations in Go
Bangalore Meetup (2015) - OOP in Go
GoSF Meetup - The Nature of Constants in Go
London Meetup - Mechanical Sympathy
Vancouver Meetup - Decoupling From Change

Podcasts
Ardan Labs Podcast: On Going Series
Mangtas Nation: A Golang Deep Dive with Bill Kennedy
GoTime: Design Philosophy
GoTime: Learning and Teaching Go
GoTime: Bill Kennedy on Mechanical Sympathy
GoTime: Discussing Imposter Syndrome
HelloTechPros: Your Tech Interviews are Scaring Away Brilliant People
HelloTechPros: The 4 Cornerstones of Writing Software

Minimal Qualified Student

The material has been designed to be taught in a classroom environment. The code is well commented but missing some contextual concepts and ideas that will be covered in class. Students with the following minimal background will get the most out of the class.

  • Studied CS in school or has a minimum of two years of experience programming full time professionally.
  • Familiar with structural and object oriented programming styles.
  • Has worked with arrays, lists, queues and stacks.
  • Understands processes, threads and synchronization at a high level.
  • Operating Systems
    • Has worked with a command shell.
    • Knows how to maneuver around the file system.
    • Understands what environment variables are.

Before You Come To Class

The following is a set of tasks that can be done prior to showing up for class. We will also do this in class if anyone has not completed it. However, the more attendees that complete this ahead of time the more time we have to cover additional training material.

Prep Work

You will get the most out of this class if you have taken the Ultimate Go bundle of classes first.

Ultimate Go Classes
Scholarship

This is a free and great class to learning concepts behind blockchains. Watch videos 1, 2, 6 and 8 for sure.
Blockchain Class - Patrick McCorry

Joining the Go Slack Community

We use a Slack channel to share links, code, and examples during the training. This is free. This is also the same Slack community you will use after training to ask for help and interact with may Go experts around the world in the community.

  1. Using the following link, fill out your name and email address: https://invite.slack.gobridge.org
  2. Check your email, and follow the link to the slack application.
  3. Join the training channel by clicking on this link: https://gophers.slack.com/messages/training/
  4. Click the “Join Channel” button at the bottom of the screen.
Installing the Training Material

While many of the examples can be done using the online playground (http://play.golang.org), some may find it easier to complete them with their local editor. To do so, you will want to load the training material locally to your machine. From a command prompt, issue the following commands:

$ cd $HOME
$ mkdir code
$ cd code
$ git clone https://github.com/ardanlabs/liarsdice
$ cd liarsdice

All material is licensed under the Apache License Version 2.0, January 2004.

Directories

Path Synopsis
app
cli/liars/board
Package board handles the game board and all interactions.
Package board handles the game board and all interactions.
cli/liars/engine
Package engine provides access to the game engine.
Package engine provides access to the game engine.
cli/liars/settings
Package settings provides support for capturing settings.
Package settings provides support for capturing settings.
services/engine/build/all
Package all binds all the routes into the specified app.
Package all binds all the routes into the specified app.
services/engine/handlers/checkgrp
Package checkgrp maintains the group of handlers for health checking.
Package checkgrp maintains the group of handlers for health checking.
services/engine/handlers/gamegrp
Package gamegrp provides the handlers for game play.
Package gamegrp provides the handlers for game play.
tooling/admin/cmd
Package cmd implements all the functionality needed to manage liarsdice.
Package cmd implements all the functionality needed to manage liarsdice.
tooling/logfmt
This program takes the structured log output and makes it readable.
This program takes the structured log output and makes it readable.
business
contract/go/bank
Package bank is generated code for accessing the bank smart contract.
Package bank is generated code for accessing the bank smart contract.
core/bank
Package bank represents all the transactions necessary for the game.
Package bank represents all the transactions necessary for the game.
core/game
Package game represents all the game play for liar's dice.
Package game represents all the game play for liar's dice.
core/game/stores/gamedb
Package gamedb contains game related CRUD functionality.
Package gamedb contains game related CRUD functionality.
data/dbtest
Package dbtest contains supporting code for running tests that hit the DB.
Package dbtest contains supporting code for running tests that hit the DB.
data/migrate
Package migrate contains the database schema, migrations and seeding data.
Package migrate contains the database schema, migrations and seeding data.
data/sqldb
Package sqldb provides support for access the database.
Package sqldb provides support for access the database.
data/sqldb/dbarray
Package dbarray provides support for database array types.
Package dbarray provides support for database array types.
web/auth
Package auth provides authentication and authorization support.
Package auth provides authentication and authorization support.
web/debug
Package debug provides handler support for the debugging endpoints.
Package debug provides handler support for the debugging endpoints.
web/errs
Package errs provides types and support related to web v1 functionality.
Package errs provides types and support related to web v1 functionality.
web/metrics
Package metrics constructs the metrics the application will track.
Package metrics constructs the metrics the application will track.
web/mid
Package mid contains the set of middleware functions.
Package mid contains the set of middleware functions.
web/mux
Package mux provides support to bind domain level routes to the application mux.
Package mux provides support to bind domain level routes to the application mux.
web/page
Package page provides query paging support.
Package page provides query paging support.
foundation
docker
Package docker provides support for starting and stopping docker containers for running tests.
Package docker provides support for starting and stopping docker containers for running tests.
keystore
Package keystore implements the auth.KeyLookup interface.
Package keystore implements the auth.KeyLookup interface.
logger
Package logger provides support for initializing the log system.
Package logger provides support for initializing the log system.
validate
Package validate contains the support for validating models.
Package validate contains the support for validating models.
web
Package web contains a small web framework extension.
Package web contains a small web framework extension.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL