• Complain

Caleb Doxsey - An Introduction to Programming in Go

Here you can read online Caleb Doxsey - An Introduction to Programming in Go full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2012, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Caleb Doxsey An Introduction to Programming in Go
  • Book:
    An Introduction to Programming in Go
  • Author:
  • Genre:
  • Year:
    2012
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

An Introduction to Programming in Go: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "An Introduction to Programming in Go" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Caleb Doxsey: author's other books


Who wrote An Introduction to Programming in Go? Find out the surname, the name of the author of the book and a list of all author's works by series.

An Introduction to Programming in Go — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "An Introduction to Programming in Go" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Table of Contents
Getting Started

Computer programming is the art, craft and science of writing programs which define how computers operate. This book will teach you how to write computer programs using a programming language designed by Google named Go.

Go is a general purpose programming language with advanced features and a clean syntax. Because of its wide availability on a variety of platforms, its robust well-documented common library, and its focus on good software engineering principles, Go is an ideal language to learn as your first programming language.

The process we use to write software using Go (and most programming languages) is fairly straightforward:

  • Gather requirements
  • Find a solution
  • Write source code to implement the solution
  • Compile the source code into an executable
  • Run and test the program to make sure it works

This process is iterative (meaning its done many times) and the steps usually overlap. But before we write our first program in Go there are a few prerequisite concepts we need to understand.

Files and Folders

A file is a collection of data stored as a unit with a name. Modern operating systems (like Windows or Mac OSX) contain millions of files which store a large variety of different types of information everything from text documents to executable programs to multimedia files.

All files are stored in the same way on a computer: they all have a name, a definite size (measured in bytes) and an associated type. Typically the file's type is signified by the file's extension the part of the file name that comes after the last .. For example a file with the name hello.txt has the extension txt which is used to represent textual data.

Folders (also called directories) are used to group files together. They can also contain other folders. On Windows file and folder paths (locations) are represented with the \ (backslash) character, for example: C:\Users\john\example.txt. example.txt is the file name, it is contained in the folder john, which is itself contained in the folder Users which is stored on drive C (which represents the primary physical hard drive in Windows). On OSX (and most other operating systems) file and folder paths are represented with the / (forward slash) character, for example: /Users/john/example.txt. Like on Windows example.txt is the file name, it is contained in the folder john, which is in the folder Users. Unlike Windows, OSX does not specify a drive letter where the file is stored.

Windows

On Windows files and folders can be browsed using Windows Explorer (accessible by double-clicking My Computer or typing win+e):

OSX On OSX files and folders can be browsed using Finder accessible by - photo 1

OSX

On OSX files and folders can be browsed using Finder (accessible by clicking the Finder icon the face icon in the lower left bar):

The Terminal Most of the interactions we have with computers today are through - photo 2

The Terminal

Most of the interactions we have with computers today are through sophisticated graphical user interfaces (GUIs). We use keyboards, mice and touchscreens to interact with visual buttons or other types of controls that are displayed on a screen.

It wasn't always this way. Before the GUI we had the terminal a simpler textual interface to the computer where rather than manipulating buttons on a screen we issued commands and received replies. We had a conversation with the computer.

And although it might appear that most of the computing world has left behind the terminal as a relic of the past, the truth is that the terminal is still the fundamental user interface used by most programming languages on most computers. The Go programming language is no different, and so before we write a program in Go we need to have a rudimentary understanding of how a terminal works.

Windows

In Windows the terminal (also known as the command line) can be brought up by typing the windows key + r (hold down the windows key then press r), typing cmd.exe and hitting enter. You should see a black window appear that looks like this:

By default the command line starts in your home directory In my case this is - photo 3
By default the command line starts in your home directory. (In my case this is C:\Users\caleb) You issue commands by typing them in and hitting enter. Try entering the command dir, which lists the contents of a directory. You should see something like this:

C:\Users\caleb>dir Volume in drive C has no label. Volume Serial Number is B2F5-F125

Followed by a list of the files and folders contained in your home directory. You can change directories by using the command cd. For example you probably have a folder called Desktop. You can see its contents by entering cd Desktop and then entering dir. To go back to your home directory you can use the special directory name .. (two periods next to each other): cd ... A single period represents the current folder (known as the working folder), so cd . doesn't do anything. There are a lot more commands you can use, but this should be enough to get you started.

OSX

In OSX the terminal can be reached by going to Finder Applications Utilities Terminal. You should see a window like this:

By default the terminal starts in your home directory In my case this is - photo 4
By default the terminal starts in your home directory. (In my case this is /Users/caleb) You issue commands by typing them in and hitting enter. Try entering the command ls, which lists the contents of a directory. You should see something like this:

caleb-min:~ caleb$ lsDesktop Downloads Movies PicturesDocuments Library Music Public

These are the files and folders contained in your home directory (in this case there are no files). You can change directories using the cd command. For example you probably have a folder called Desktop. You can see its contents by entering cd Desktop and then entering ls. To go back to your home directory you can use the special directory name .. (two periods next to each other): cd ... A single period represents the current folder (known as the working folder), so cd . doesn't do anything. There are a lot more commands you can use, but this should be enough to get you started.

Text Editors

The primary tool programmers use to write software is a text editor. Text editors are similar to word processing programs (Microsoft Word, Open Office, ) but unlike such programs they don't do any formatting, (No bold, italic, ) instead they operate only on plain text. Both OSX and Windows come with text editors but they are highly limited and I recommend installing a better one.

To make the installation of this software easier an installer is available at the book's website: http://www.golang-book.com/. This installer will install the Go tool suite, setup environmental variables and install a text editor.

Windows

For windows the installer will install the Scite text editor. You can open it by going to Start All Programs Go Scite. You should see something like this:

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «An Introduction to Programming in Go»

Look at similar books to An Introduction to Programming in Go. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «An Introduction to Programming in Go»

Discussion, reviews of the book An Introduction to Programming in Go and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.