• Home
  • About
  • Connect
  • Books
  • Books with fiction blog

Books with Views

~ multidimensional e-reading

Books with Views

Category Archives: views

Books with Software

14 Monday Oct 2013

Posted by Ola in ARM, assembly, bare metal, download, Intel, Into Embedded, software, views

≈ Leave a comment

Tags

ARM, assembly, bare metal, download, Intel, Into Embedded, software, views

Books about software are best enjoyed with software.

In a book with views, there may be different pieces of software associated with the different views.

However, a reader may still like to enjoy one software package, covering all the views, for a given book.

This approach has been taken for the books produced here. As a first example, a software package for the book Into Embedded has been created.

The software package can be downloaded as a zip-file from the Book Software page.

But wait, there’s more!

As you might have guessed, the actual content of the books is generated, automatically, from some kind of template. I use XML for the template and Python for the book generation program.

And since a computer program processes the XML, and generates html for the web and epub or mobi for the e-book variants, we can take advantage of this and let the computer program perform other tasks as well.

As an example, all figures showing program code are extracted from real programs. The source code of a program from which a figure shall be extracted is annotated, with markup showing where each figure starts and ends. The result of this can be seen, e.g. in Figure 2, which shows startup code for a processor.

The corresponding source file for this figure is found in the file startup.s.

While the book-generating program processes the XML, it can also make a list of all software files needed. Such a list is shown on the Book Software page. You might note that there are links, inside the list, to Figures within the book and also to the actual software files used.

The software can be tried out. It can be built and it can be executed. It requires some tools, like compilers and linkers, and also a simulator (QEMU) is used.

The software covers the Bare Metal chapter of the book, and it shows how to make a small program that can run entirely on its own, i.e. it can run without the help of an operating system.

Here is a direct download link.

And yes, there is a README-file inside (with a HOWTO for building the software, and with hints on how to download and install the necessary tools)

Have fun,

The bookmaker (a.k.a Ola)

Three (3) books about programming? – Nope, there’s only one!

17 Monday Sep 2012

Posted by Ola in C, e-book, epub, Java, mobi, programming, programming languages, Python, release note, views

≈ Leave a comment

three_books

The first book is about C. It starts with a description of a classical “Hello, world”-program, and briefly describes how such a program can be compiled, linked, and run. It proceeds with a description of variables and values, how values can be assigned to variables, and how variables and can be combined into expressions and computations, executed in sequence. Then, the concepts of alternative and iteration are discussed, and illustrated using if-statements, for-statements, and while statements. The combination of actions into larger pieces, called functions, is then discussed. Then, structured datatypes are treated, starting with arrays and lists, followed by the use of struct for creating data structures. The book concludes with an overview of the functionality available in C for performing mathematical and logical computations, and how the C standard library can be used for this purpose.

The second book is about Java. It starts with a description of a classical “Hello, world”-program, and briefly describes how such a program can be compiled and run. It proceeds with a description of variables and values, how values can be assigned to variables, and how variables and can be combined into expressions and computations, executed in sequence. Then, the concepts of alternative and iteration are discussed, and illustrated using if-statements, for-statements, and while-statements. The combination of actions into larger pieces, called methods, is then discussed. Then, structured datatypes are treated, starting with arrays and lists, followed by the use of objects for creating inheritable data structures with associated behavior. The book concludes with an overview of the functionality available in Java for performing mathematical and logical computations, and how the Java class library can be used for this purpose.

The third book is about Python. It starts with a description of a classical “Hello, world”-program, and briefly describes how such a program can be run. It proceeds with a description of variables and values, how values can be assigned to variables, and how variables and can be combined into expressions and computations, executed in sequence. Then, the concepts of alternative and iteration are discussed, and illustrated using if-statements, for-statements, and while statements. The combination of actions into larger pieces, called functions, is then discussed. Then, structured datatypes are treated, starting with arrays and lists, followed by the use of objects for creating inheritable data structures with associated behavior. The book concludes with an overview of the functionality available in Python for performing mathematical and logical computations, and how the Python library can be used for this purpose.


“But”, you might ask, “did you really have to write three books?”

“No, actually not”, I might answer, indicating with a little smile that I might know something you are not yet aware of.

“In fact, I only create one book.”

“???”, you might think, wondering what I am talking about.

“You see”, I would say, “I use this system called Books with Views, making it possible for me to write only one book, but it is a book containing more than one topic”.

“Hmm, that sounds interesting. Tell me more!”, you might say.

“I write the common parts for all books, and then I write the specific parts separately for each view”

“Aha. But how can I read such a thing? – it seems to have more than one dimension!”

“It is easy, you can read it on the web, using links inside the book for changing view. And you can also read it in your e-book reader, as epub (e.g. for iBooks) or as mobi (for the Kindle)”

“I will try it right now!”, you now say, “and don’t forget to inform me about the release date”. Then you start your favourite browser or your favourite e-book reader, eager to see what this is all about.

After a while, you might say to yourself: “Interesting, and whatever the price it certainly looks like a bargain. I get three books for the price of one!”

Connecting the views

12 Thursday Jul 2012

Posted by Ola in epub, mobi, release note, views

≈ Leave a comment

In the drafts of books created so far, there are links inside the books between the views. The links are placed inside the book, at the end of each section. There are also links between the views in the about pages, e.g. on the about page showing the URLs used in a book. In the web versions of the books, there are also links in the sidebar of each page.

Recently I added links between the views directly after figures showing code. As an example of this later feature, you can take a look at Figure 1 in Into Programming, where you can see the links to the other views.

The links works as illustrated in this figure (click the figure to get a larger version), where some text and some code from a program, written in C in one view and written in Java in another view, is shown.

view illustration

As you can see in the above figure, parts of the text are common for both programs, and other parts of the text are different. The code of course is different, since that is the whole point of having these views, with one view for each programming language!

The connections between the views are shown in the figure as dashed red arrows, corresponding to the hyperlinks you will find inside the book.

Into Embedded – another book with views

20 Wednesday Jun 2012

Posted by Ola in e-book, epub, mobi, release note, views

≈ Leave a comment

I started a new book. It is called Into Embedded, and it is about embedded systems. It has two views (to start with), representing two processor architectures – 32-bit Intel-x86 is one view and ARM is another view.

I wanted to test the concept of making books with views with one more book, and I also wanted to get started on the work of replacing an old book called Realtidsprogrammering – written in Swedish and not available in print anymore – with a newer version. And of course it gave me a chance to procrastinate (I recently read Turning Pro, so there is hope for a better situation), and finding excuses for not creating more content for Into Programming.

You can also have a look at the book (draft with respect to contents but rather ok with respect to form) in epub-format and mobi-format, using these links:

  • Into Embedded (epub)
  • Into Embedded (mobi)

Preparing for print

11 Friday May 2012

Posted by Ola in e-book, pdf, views

≈ Leave a comment

A book with views may be somewhat difficult to print. One idea is to print several books, one for each view. The format for printing can be chosen as pdf. I tried this, for the book Into Programming, by generating pdf from LaTeX, one pdf for each view (C, Java, Python).

The formatting was done using tufte-latex, which produces a rather nice layout, using typesetting inspired by the works of Edward Tufte.

You can see the results using the links in the list below. Note that these are works-in-progress, i.e. the book contents are added incrementally, at the same time as I try to figure out how to produce the actual books (web-version, epub- and mobi-versions, and now also pdf):

  • Into Programming (pdf – C view)
  • Into Programming (pdf – Java view)
  • Into Programming (pdf – Python view)

Links to web-version and e-book versions are found on the Books page.

An e-book with views

08 Thursday Mar 2012

Posted by Ola in e-book, epub, mobi, views

≈ Leave a comment

An e-book with views has been created!

The content is the same as is currently available in Into Programming (which is not that much – it is more a proof-of-concept as of now – more content will be added later).

I managed to create one mobi-version and one epub-version.

The mobi-version has been tested on an iPad using the Kindle for iPad, and on an Android phone using the Kindle for Android. It seems to work as expected in both of these cases.

The epub-version has been tested on an iPad using the Bluefire reader. It looks nice in this app, but external hyperlinks do not work.

The epub-version does not open in iBooks. I am trying to find out why this is the case.

The epub-version has been tested successfully however on an Android phone, in the Reader application and also the Aldiko application.

If you want to try, please do so:

  • Into Programming e-book with views (mobi)
  • Into Programming e-book with views (epub)

An interactive index

23 Thursday Feb 2012

Posted by Ola in index, meta information, views

≈ Leave a comment

Paper books often have an index. The index is a list, near the end of the book, where indexed words are given, often in alphabetical order, and for each indexed word, page numbers where the indexed word can be found are given.

In an electronic book on the web, an alternative is to create an interactive index. This can be done using a search box where the reader can type a word, and if the word is in the index, one or more links to where the word can be found are displayed.

In a Book with Views, one could go a step further, and let the indexed words be view-specific. This can be tried out, in the book Into Programming, for example by first searching for the word computer, which is in all views, and then searching for compiler and interpreter, which are not available in all views.

The search works in any page of the book.

There is also a traditional index, at the Index page, which is one of the About pages.

Keeping track of concepts

06 Monday Feb 2012

Posted by Ola in concepts, meta information, views

≈ Leave a comment

In a textbook kind of book, new concepts are introduced to the reader. In a book with hyperlinks, such as an e-book or a book on the web, it is possible to link the introduction of a concept to a table with all concepts in the book, bundled together with explanations, and perhaps also with links to be used for further reading.

In a Book with Views, this can be extended to a per-view handling of the concepts. You can see an example of this, in the introduction of the concepts variable and value in the beginning of the chapter called Names and values in the book Into Programming.

The collection of concepts can also be reached via the book’s About page.

View-specific URL references

02 Thursday Feb 2012

Posted by Ola in meta information, references, views

≈ Leave a comment

When describing how to compile and run a program, you may want to refer to tools suitable for this task. These tools are often language-specific, like if you have a C-compiler it is good for precisely that task – compiling C-programs.

In a programming book with views, where each view represent a specific programming language, different tool references can be made for the different views. You can see an example of this in the Section How to make it run (use the menu on the left to change view), in the book Into Programming.

You can also see how the different URLs pointing to the different tools show up on the About page for URLs.

Hello world

29 Sunday Jan 2012

Posted by Ola in hello world, programming languages, views

≈ Leave a comment

Using views in a book on programming makes it possible to view the same program in different languages in a simple way.

As an example, consider the classic Hello, world program, written in C. You can see this program, and with some clicks compare it to the corresponding programs in Java and Python, in a Section named Say Hello, in the book Into Programming.

Please enter email address below

Recent Posts

  • Layered Books
  • Making books with XML
  • Books with Software
  • Three (3) books about programming? – Nope, there’s only one!
  • Linking in and out of a book

Latest Tweets

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Where to go from here?

  • Books with fiction
  • gapingvoid
  • Harpers
  • Seth's Blog
  • The Story of Telling

Archives

  • January 2018
  • July 2016
  • October 2013
  • September 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012

Categories

  • ARM
  • assembly
  • bare metal
  • C
  • concepts
  • download
  • e-book
  • e-book reader
  • Emacs
  • epub
  • hello world
  • index
  • Intel
  • Into Computers
  • Into Embedded
  • Into Programming
  • Java
  • Layered Books
  • math
  • meta information
  • mobi
  • nxml
  • pandoc
  • pdf
  • programming
  • programming languages
  • PSGML
  • Python
  • references
  • RelaxNG
  • release note
  • software
  • views
  • XML

Meta

  • Register
  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.com

Cancel
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy