# One Year As A Self-Published Author

## Posted by Filip Ekberg on July 30 2013 1 Comment

Wow — It has already been one year since C# Smorgasbord was released and I’ve since then written about the way to getting it published here and tried to market it as much as possible. As for marketing I had raffles, did more user-group meetings and sent away some free books; even did some online marketing using Ads but that ended up costing me more money than it gave back.

Writing the book has been one of the best things that I’ve done in a long time. It helped me understand all the steps necessary to make a book and also forced me to dig deeper into some very interesting technical topics.

When I started writing the book I never imagined that I would sell more than 100 books; to my surprise though I sold much more than that.

Not having a publisher behind you that helps you with the marketing is hard, because everywhere you go you will be seen as an annoying self-promoter; I never understood why it’s more okay to pay someone to market you than just market yourself. The way that I’ve been trying to market and strengthen my own brand is to do more technical posts, take more exciting and challenging tasks such as the Pluralsight course and more speaking engagements.

### Some numbers

In total I’ve sold, raffled, given away around 1000 books in total. This includes digital copies and printed copies. Some have asked which channel generated the most sales so here’s a breakdown of all the channels:

• (Printed) Amazon or CreateSpace: 300 – 350
• (Printed) Events, co-workers, online: ~200
• (Digital) Kindle: ~200
• (Digital) PayPal: 230 – 250
• (Digital) Other: ~50

As you can see each channel is quite large and important for the sales. When the buyer gets a printed copy they’re also allowed access to the DRM free digital bundle that includes PDF, ePUB and Mobi. I’ve created about 400 digital copy bundles, including the PayPal purchases and this is amazing. Fortunately for me I’ve automated the process as much as I want. When I started offering the digital bundle I had to fix the PDF, ePUB and Mobi by hand and this took about 10 minutes per book if everything went on smoothly. Now the process is automated and it takes about 1 minute to generate the bundle; however I still want to do the final quality check before I send it off to the buyer.

### Would I do it again?

Many have asked me if I would want to write another book, I am not entirely sure. It was a great thing to do but doing online-courses is both more rewarding and it’s easier to release more things in a rapid way; which I greatly enjoy.

You never know though, I love writing and expressing myself in text so I might write something in the future.

### Let’s celebrate together!

To celebrate this together with you all, I’m lowering the price on the printed copy. As of July 30th, 2013, the printed version will be available for $14.99 (for a limited time only); FYI this almost doesn’t give me any royalties at all ($4.81 per sale); it at least buys a beer for me and my fiancée in Australia and maybe also some bug-spray so that we can survive all the things that wants to kill us.

If you want to save a tree you can get the Kindle version or the digital version (€4.99)

Everyone that bought my book, everyone that read my blog, everyone that believed in me: Thank you all.

# Everyone is a winner!

## Posted by Filip Ekberg on June 27 2013 2 Comments

### Congratulations everyone that participated

Everyone that participated in the raffle got something! There was just one winner that got the one year Pluralsight Plus Subscription, but All of you got a 30 day coupon! As a bonus, everyone that participated got a digital copy of C# Smorgasbord and two lucky people got signed copies as well.

I really hope that you take this chance to learn something from the Pluralsight courses and from the book. The course library is truly outstanding and I really recommend you to watch my course on MSIL!

I hope this made your weekend and that you’ll learn a lot. In case you didn’t enter the raffle Pluralsight offers a 10 day trial that you can sign up for.

Everyone have been notified by e-mail, please check your spam folder. The winners of Pluralsight Annual Plus and the signed copies have also been notified by e-mail.

# Win a Pluralsight One Year Subscription and C# Smorgasbord

## Posted by Filip Ekberg on June 17 2013 42 Comments

It’s truly a pleasure to announce that as of Friday last week I am a published Pluralsight Author! The course that I published is called MSIL for the C# Developer, read more about it at the end of this post. There’s been some radio silence on the blog lately, it’s mostly due to a lot of effort that has gone into the production of the newly released course and also our move to Australia.

### Win a Pluralsight Annual Plus Subscription

To celebrate that I just published my course I’m raffling away the following:

• Pluralsight One Year Annual Plus Subscription + Signed copy of C# Smorgasbord + C# Smorgasbord Shirt
• 2 Signed copies of C# Smorgasbord
• 3 digital copies of C# Smorgasbord

#### How do I win?

It’s Simple!

Leave a comment on the blog telling me Why you should win a one year subscription for Pluralsight and why you’d like to see my course. A bonus is if you tell me why you also want to read my book!

Raffle ends on Wednesday June 26th 18.00 CEST

In this course we look at MSIL; the code that is generated when you compile C#. We explore MSIL so that you get a better understanding of how C# works and how it is compiled. Ultimately after completing the course you will feel like a better C# developer as you will know much more about what happens behind the scenes when we compile our C# applications.

View my course here and please rate it when you’re done!

# C# Smorgasbord ebook limited-time offer now only €4.99!

## Posted by Filip Ekberg on February 26 2013 10 Comments

About 7 months ago I self-published C# Smorgasbord which is a C# Programming book focusing on a lot of different and interesting things. I’ve had a couple of giveaways and a couple of sales so far to spread the word even more.

It’s now time for an ebook limited-time offer, when the offer ends is not yet disclosed so if you’re interested in reading this very well spoken off book get it today for only €4.99! If you don’t have PayPal just send me a message and we’ll figure something out.

#### Want to peek inside? Sample available!

There’s a “Look Inside” available on Amazon!

Looking at everything from testing strategies to compilation as a service and how to do really advanced things in runtime; you get a great sense of what you as a developer can do. By taking his personal views and his personal experience, Filip digs into each subject with a personal touch and by having real world problems at hand, we can look at how these problems could be tackled.

No matter if you are an experienced .NET developer, or a beginner, you will most certainly find a lot of interesting things in this book. The book covers important patterns and technologies that any developer would benefit from mastering.

• Introduction to Parallel Extensions
• Productivity and Quality with Unit Testing
• Creating a challenge out of the trivial tasks
• Asynchronous programming with async and await
• Dynamic programming
• Increase readability with anonymous types and methods
• Exploring Reflection
• Creating things at runtime
• Introducing Roslyn
• Adapting to Inversion of Control
• Are you Mocking me?

#### Want a printed copy?

There’s a discount on that one too!

Discount code: N9UV3WDP

# Congratulations to the winners of a free C# Smorgasbord copy!

## Posted by Filip Ekberg on February 4 2013 2 Comments

Before I announce the winners, yes it’s plural because it was way too hard to decide one winner, I want to share some great news with all of you. Yesterday I summarized the amount of people that have my book based on the copies that I’ve sold/given away and this number is now above 500 and steadily increasing towards 600!

The feeling I got when receiving my first proof copies of the book is indescribable, it was pure awesomeness and this feeling is almost as great. It makes me very happy that so many developers have decided to get a copy of C# Smorgasbord, thank you all very much for that. All the great feedback and the amount of copies out there are the basis to why I want and can have these giveaways!

Now to the winners, I know that’s why you’re here anyways. As the giveaway was re-published on DZone I’m going to include those comments as well. Thanks everyone that participated and I really hope that if you didn’t get a free copy this time, you’ll enjoy the discounted price found at the end of this post.

The winners are:

Sergio with the following comment:

Checking the content this book has, it would be a good reference to create great architectures using advanced techniques like Reflection or runtime thing creation. It also shows last features of .Net framework so it will have good examples of how to understand them (I honestly can’t understand async :\$ and no good Spanish doc, besides that, I have no credit card to buy the book ) I read about the book on this Hacker News’s link: http://blog.filipekberg.se/2012/07/21/c-smorgasbord-will-soon-be-available/
(I said: “I need that book!!”)

I would like a copy of your book because everything i learn from it will go onto my blog hopefully passing knowledge onto many others.

I feel your book will fill in various gaps in my knowledge, and will hopefully help secure that senior developer position and finally, i mentor the other developers around me and the junior developers, and this book will be an excellent resource, and with titles such as “Creating a challenge out of the trivial tasks” will hopefully help inspire the developers to take pride in even the trivial tasks.

Henric with the following comment:

Don’t leave a former Sigma colleague hanging! I’ll give you a blog post reviewing the book (on my massive 2 visitors a day blog) and I will spread the Smorgasboard love to current co-workers.

Stay awesome!

Daniel with the following comment:

I would like a copy of your book, because I think this would greatly benefit my student project in which we are creating an application where stuff can be augmented and moved / edited with simple gestures Right now much of the code is hacked together, because no one in the group used C# before (the university teaches java ), what leads to “not-so-good” performance and way too many bugs! I am responsible for the code quality and C# teaching and the book would help me to be more helpful to the other guys.

Malte with the following comment:

Finished my CS degree last summer, and got a job as a software developer, primarily C#. I try to improve my programming skills every day, and found this blog and blogpost through the “Interesting Finds” blog series from Jason Haley.

I find it especially awesome that you self-published the book

Congratulations on winning a free copy of C# Smorgasbord, I hope you enjoy it and help others become better programmers as well!

Now to those of you that didn’t win a free copy. I’ve setup a discount code that can be used on CreateSpace (this is where the book is printed) and this will give you a 35% discount!

Use discount code N9UV3WDP to get 35% off here (takes you to CreateSpace)!

Pssst.. if you don’t want to wait for the printed copy to arrive due to (sometimes) long shipping, you can get the ebook the same day as you purchase the printed copy! Just fill out this form.

Enjoy the read and spread the discount code to anyone and everyone!

# Want a free copy of C# Smorgasbord?

## Posted by Filip Ekberg on January 18 2013 32 Comments

C# Smorgasbord has been out for about 6 months and as you might have seen previously on this blog and on my twitter, the book has gotten great feedback!

I’m very happy that so many people have decided to buy the book and that some of you have taken the time to review it.

To give something back to the community for all the support during my writing process and after (self-)publishing the book, I had a give-away after about 3 months and now I want to give away one (or maybe more!) copies of the book!

### I want to win a free copy!

Unfortunately I can’t give everyone a copy of the book so if you want to win a free copy of C# Smorgasbord, all you need to do is follow the two steps below:

1. Leave a comment down below with the reason as to why you should be the lucky winner. It’s a bonus if you include why you like to read this blog.

The best motivation wins and the winner will be notified via e-mail, so be sure to leave your e-mail address when you’re commenting below. You’re e-mail address will never be visible to anyone else than me!

That’s it! Good Luck to you all!

The draw ends February 1 (6pm CET) and all comments will be published once they’ve been received

### What’s C# Smorgasbord?

C# Smorgasbord covers a vast variety of different technologies, patterns and best practices that any C# developer should master.

Looking at everything from testing strategies to compilation as a service and how to do really advance things in runtime; you get a great sense of what you as a developer can do. By taking his personal views and his personal experience, Filip digs into each subject with a personal touch and by having real world problems at hand; we can look at how these problems could be tackled.

No matter if you are an experienced .NET developer, or a beginner, you will most certainly find a lot of interesting things in this book. The book covers important patterns and technologies that any developer would benefit from mastering.

Is there a digital version(ebook)?
Yes there is! Everyone that purchases the printed copy will get the ebook for free. Instructions for how to receive the ebook is inside the printed book.

1. Introduction to Parallel Extensions
2. Productivity and Quality with Unit Testing
4. Creating a challenge out of the trivial tasks
5. Asynchronous programming with async and await
6. Dynamic programming
7. Increase readability with anonymous types and methods
8. Exploring Reflection
9. Creating things at runtime
10. Introducing Roslyn
11. Adapting to Inversion of Control
12. Are you Mocking me?

Who this book is for
This book is for those developers that find themselves wanting to explore C# but do not know how or where to start looking. Each chapter contains hands on code examples that can be compiled and tested on your machine.

Although each chapter has code samples, you do not need to use a computer to appreciate the content of this book. The code samples are divided into smaller portions of code, so that you can follow each example and the thoughts around it in an easy way.

No matter if you are an experienced .NET developer or a beginner, you will most certainly find a lot of interesting things in this book. The book covers important patterns and technologies that any developer would benefit from mastering.

It is not required that you have worked with C# before but being familiar to the fundamentals in any of the .NET programming languages will help you on the way.

If you are just now starting to learn C#, this can be a great way for you to learn about different techniques, best practices, patterns and how to think in certain scenarios. But if you have worked with C# development for many years, this book can give you a refreshing view on how to always improve and challenge yourself into becoming a better software engineer.

### I can’t wait and want to buy it now!

Thanks for the support! Below is a link to Amazon where you can buy the book. It’s available on all Amazon regions.

There’s also an ebook bundle available here.

# 2012 was an amazing year, here’s a summary!

## Posted by Filip Ekberg on January 8 2013 1 Comment

Saying that a lot happened in 2012 is probably an understatement. At least both on this blog and in my personal life, a bunch of amazing things have happened. I really hope that your previous year was good and let’s hope for an even better 2013. To start this year off I want to summarize all the great posts that were shared on this blog in 2012.

Personally the two biggest achievements of last year was me getting engaged to my lovely Sofie and publishing my book C# Smorgasbord. As you might have seen already this year has already started very good as I have been awarded Microsoft MVP in Visual C#!

Let me know what you found most interesting on this blog from the collection of posts below! Here is the 2012 summary!

Architecture

Tips & Tricks

Screencasts

Software & Tool information

Windows 8, Windows RT, WinRT and Surface

C# Smorgasbord and Self-publishing

Other

I hope you found this collection of posts useful and that you’ve learnt a lot in 2012! Enjoy 2013 and let me know what you think of the posts! Before we take part for this time, I want to share with you an image that describes the feeling I got when I held the first printed copy of C# Smorgasbord:

# Questions for a Software Engineer

## Posted by Filip Ekberg on November 30 2012 2 Comments

A couple of weeks ago I visited my old upper high school. This is where you take your last three years of high school in Sweden and focus on a certain area. I focused on IT and Programming and now a couple of weeks ago I was invited to come back and talk to the current students. My initial idea was to talk about programming and inspire these young people (16-20 years old) to continue studying in the field of software engineering. But when I found out that more than half of the attendees actually studied something else such as economics or entrepreneurship, I had to change focus of the presentation. The new focus on the presentation was entrepreneurship and how to become awesome at selling yourself.

I recorded this presentation, but since it’s in Swedish I will not bother embedding it into this post; it’s available on my YouTube channel for anyone that wants to have a look at it!

### The questions for a Software Engineer

The students had put together a list of questions, 19 questions to be precise and most of the questions were aimed at me and my career. But I think that many of these questions are among the commonly asked ones, I’d like to share the questions and the answers with you all. So here goes, have an awesome Friday and enjoy the Q&A! If you have additional questions for me or any comments on the answers that I gave, please leave a comment!

#### When you started upper high school, how good were you at programming?

I was somewhere between 10 and 12 years old when I first saw programming in action. Back then we didn’t have fancy computers, of course they were fancy at the time but not as todays computers. I remember my best friend back then showed me QBasic and how to do basic input, conditions and output. So I just wrote some basic programs in QBasic that asked me a question over and over again until I gave it a certain answer.

This was fun and all, but it kind of stopped there. I didn’t have my own computer until I was 12 years old and at this time my friend had learned VB which I gave a try but never really got into it. I was young and my focus at that time wasn’t to become a programmer. I liked computers and I liked exploring them but the games on my computer was calling out to me.

As I was born 1987, being 12 years old puts us in 1999. We had no high speed internet at this time and some of the operators in Sweden actually charged per megabyte that you downloaded. So googling for video tutorials wasn’t really an option.

So let’s speed it up a bit, when I was 16 years old I started upper high school. I had chosen to become an electrician just as my father. But after 1-2 weeks I felt that something was missing, so I actually changed schools, mainly because the programming kids got their own laptops at the school. Up until now I had actually played a lot with computers so I wasn’t a completely newbie on that area. But my programming skills wasn’t that good and fortunately for me, they didn’t expect that in high school either.

This means that the short answer is, I wasn’t any good at programming at all when I started high school. I had tried some when I was younger, but that wasn’t enough. Eventually we started looking at HTML and this being static and all, I wanted some dynamic behavior in my web pages so I bought books and learned PHP. In the final years of high school we were doing C# and I were de-compiling the teacher’s examples and changing stuff and then re-compiling them.

Programming had by then became a part of what identified me and who I wanted to be.

There were a lot of bumps in the road when writing the book. I’ve written about the writing process and what decisions that I made along the way.

But if I need to choose one of the most hard parts about writing the book. That would probably be: handling all the input from proof readers.

The hardest part about releasing the book has been all the rules and tax stuff. Since I use CreateSpace which is a USA based company there are a lot of different rules regarding taxes that are very hard to get your mind around. I’ve spent countless of hours trying to figure all that out.

#### How did you experience studying in Blekinge (the county where I studied for my BCs in Software Engineering)?

This county is in the southern of Sweden and the town that I studied in is called Ronneby. It’s hard to compare this to any other cities that you might have heard about. This town (if you can even call it that) is so small that when you go out to buy something, you know Everyone and everyone knows you.

Ronneby changed my life, if I would have never met my wonderful girlfriend if I hadn’t moved to Ronneby.

The school itself is awesome, we had the highest number of researchers in the field of Software Engineering in Sweden.

#### Have you earned any money off the book, if so how much?

It depends on how you look at it. If you take all the time that I’ve put down on writing the content and then multiply that with whatever my time is worth. It would be so much that this book would have to sell as good as Harry Potter before I can say that I earned money from it.

The royalties are much better when self-publishing, but a lot of that money needs to go on additional marketing if you want to sell more books.

I didn’t write the book for money, I wrote it because I love what I do and I want to share this with everyone.

#### Why did you write a book?

There are so many different things that inspired me to write the book. A lot of the great authors that I met at NDC in 2011 and a lot of people that I’ve met in my career prior to that.

But the definitive moment that changed everything was when I applied for a job that I didn’t get. For some reason there wasn’t enough “evidence” that I was a good enough programmer for that position. This inspired me to write a lot more in my blog. I’ve focused my energy on other things before and I’ve always enjoyed talking and writing about programming and technology.

So I started writing my blog because I was inspired, sort of by myself, because I wanted to do more for the community and I wanted to share my experience and knowledge.

As I wrote before, there were a lot of reasons to why I started writing this book. Mostly inspiring has been all the people around me and the developers that I look up to.

#### How are the sales of the book going?

It’s going great! I’ve been selling around 70-100 books per month since it was released and all feedback that I’ve gotten has been very positive!

#### How do you sell the book and how do you market it?

I sell the book through CreateSpace. CreateSpace is a print-on-demand company that sells the book through different channels such as Amazon. It’s also available on Kindle and as an ebook bundle!

My girlfriend has bachelor degree in marketing, so I try to get as much help from her as possible on this. Lots of the marketing that I’ve done so far is the discounts that I’ve handed out and the books that I’ve raffled away.

Most importantly: Word of mouth.

#### Who read the manuscript during the writing process?

At one point I had 8 people that wanted to dedicate their time to read and proof the book. This was all during the writing process and after I had finished writing.

I’ve thanked all these amazing people in the Acknowledgement section in my book, be sure to check that out when you buy my book!

Yes, I’ve got a sole proprietorship.

#### When you started your own business, did you make an initial budget?

No. I should have made one though. A couple of years after I started my sole proprietorship I found out that it would have been better to actually know what money comes in and comes out in the long run. Everything worked out for the best though!

I really recommend you to do a budget and a business plan if you’re thinking about starting up something.

#### What kind of system do you use to keep track of all invoices and papers in your company?

I wrote my own system to create invoices. I was 18 years old when I started my sole proprietorship and I didn’t really want to buy a system for this since I could write one myself.

#### What is the best way to learn programming?

This is way too subjective to give one answer to. I learn best by being inspired by someone. It can be watching a video on Channel9 or maybe attending a conference where there’s all these amazing people talking about new and fun technology and how to use it.

If you like reading buy books. If you like listening watch screencasts. Nowadays there are ways for everyone!

#### What is the hardest part about programming?

Understanding the system requirements. The customer or whoever you talk about the system you are going to build with have one way of expressing what they want, when they really want something else. One of the biggest problems that is actually fundamental in domain driven design is that you need to speak the same language!

#### Why C#?

Why not?

Seriously though, C# is a living language as I call it. There’s a lot of changes happening to the language and how you work with it. If you look back at .NET 1.1 and compare the C# code from then to code from today, both of them are understandable and similar. But there are so much more help in the newer versions of C# that helps you write even cleaner, faster and easier to understand code.

Another important thing, at least for me is that I’ve always loved Microsoft. I’ve got a hard time staying away and not preaching their stuff.

#### What other programming languages do you know?

I started off with PHP when I was 16 and then I learned Java. From there I’ve learned to love some of the following: C#, C++, ASM (MIPS+X86), Python.

Probably forgot one or two languages but those are the ones that I would be comfortable doing projects in. I would probably have to do some reading up if someone threw a MIPS project in my face.

#### Do you have a role model?

There’s too many people that I look up to. My parents and my family has always been what drives me to do greater things.

In the profession there’s also a lot of great people that I look up to such as Bill Gates, Steve Ballmer, Eric Lippert, Steve Jobs, Scott Hanselman, Scott Guthrie, Jon Skeet and many more.

To be honest, I look up to everyone that loves what they do and do everything to share that passion.

#### How long did it take to write your own book?

If I include the time it took to prepare all the raw content, I think it lands somewhere around 2000 hours.

#### Do you also work as a Software Engineer or are you just an author?

I work as a full time Software Engineer at Star Republic in Gothenburg meanwhile as I have my own sole proprietorship and doing all the work with the book.

I’m a man with many hats and I like to have many projects in the pipe!

#### Will there be a sequel to the book?

All joking aside, she supports me in writing another one but currently I am focusing on C# Smorgasbord and everything that is needed to be done after a release of a book.

I’ve got plans for more books, but time will have to tell what happens.

End of Q&A

I really hope you enjoyed reading these Q&A’s, I sure did writing them!

# C# Smorgasbord Sale!

## Posted by Filip Ekberg on November 20 2012 8 Comments

C# Smorgasbord has been out for 3 months and has already gotten a lot of positive feedback and great reviews(See below)!

To thank you all for your support, I’m giving away a discount code for 35% discount on C# Smorgasbord!

This offer is for a limited time only, the discount will be available from November 20, 2012 to December 31, 2012!

The discount code works only on CreateSpace; this is where the book is printed. CreateSpace is a DBA of On-Demand Publishing LLC, part of the Amazon group of companies. Buy yourself, your spouse or your kids an early Christmas present!

### Discount code: N9UV3WDP

Note that the Discount Code only works on CreateSpace!

The printed copy includes access to the ebook bundle; so you don’t need to wait for the printed copy to arrive. After you’ve purchased the book just fill out the form on the book’s website! CreateSpace ships globally and their shipment times are in most cases a lot shorter than what it says in their website.

### Want to know more about C# Smorgasbord?

#### Want to peek inside? Sample available!

There’s a “Look Inside” available on Amazon!

Looking at everything from testing strategies to compilation as a service and how to do really advanced things in runtime; you get a great sense of what you as a developer can do. By taking his personal views and his personal experience, Filip digs into each subject with a personal touch and by having real world problems at hand, we can look at how these problems could be tackled.

No matter if you are an experienced .NET developer, or a beginner, you will most certainly find a lot of interesting things in this book. The book covers important patterns and technologies that any developer would benefit from mastering.

• Introduction to Parallel Extensions
• Productivity and Quality with Unit Testing
• Creating a challenge out of the trivial tasks
• Asynchronous programming with async and await
• Dynamic programming
• Increase readability with anonymous types and methods
• Exploring Reflection
• Creating things at runtime
• Introducing Roslyn
• Adapting to Inversion of Control
• Are you Mocking me?

#### Want only digital versions?

If you don’t want to get the printed version you can get the ebook bundle on the book website or the Kindle version on Amazon.

### Update 2012-12-02

I am extending the offer the rest of 2012! Enjoy the holidays!

# Self-publishing a book – Part 3 – Using a good typesetting system

## Posted by Filip Ekberg on September 23 2012 5 Comments

This is the third part of the blog series “Self-publishing a book” if you haven’t already check out Part 1 & Part 2.

Word was acting up, I spent too much time trying to work around it and less time on the content — this was not going to work. I decided to drop Word. But for what and how would it make anything easier when all CreateSpace supplied was a Word template?

### Stepping out of the comfort zone

Before I actually dropped Word completely I had gotten a lot of feedback from friends on IRC; Most of them recommended me to check out LaTeX. At this point I really had a very little knowledge about what LaTeX was and how to use it. Wikipedia describes LaTeX like this:

LaTeX is a document markup language and document preparation system for the TeX typesetting program. The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to create a document in LaTeX, a .tex file must be created using some form of text editor.

Being a geek by heart, I immediately got interested in trying this out. It sounded pretty much like I could code my own programming book. Which would be very cool. Comparing it to something else, LaTeX is pretty much like HTML and CSS. This makes it perfect for writing something both where you have and not have a known layout when you start writing.

Since I didn’t know anything about LaTeX I needed a crash course and somewhere to get a little bit of inspiration/help. Fortunate for me, I found a LaTeX channel on IRC, #latex on freenode. As mentioned in the Wikipedia quote above, LaTeX is actually just a language used for the typesetting system TeX. This explains why the other place where I got a lot of feedback is called tex.stackexchange.com. Both of these (plus google of course) has been very helpful!

Getting a crash course in LaTeX wouldn’t be enough, I still needed my book to conform with the CreateSpace guidelines. I hadn’t decided the trim size(page size) of the book yet. I was thinking about going for 7″ x 10″ but then I created a poll on this blog which later changed my mind. It actually turned out that the size I had in mind was the one you guys wanted the least.

So before I could completely step from Word to LaTeX, I had to know if there was some information about LaTeX + CreateSpace. I googled and stumbled upon a forum post on the very good CreateSpace community forum. This post mentioned a CreateSpace package for LaTeX. Best of all, this was open source and available on github!

Now I knew that I could use LaTeX to create my CreateSpace work, I knew that I wanted to step away from Word but I didn’t yet know how to write anything in LaTeX or what tools to use.

### LaTeX Crash Course

Since I didn’t really know anything about how to write LaTeX markup, I searched for a free tools that could help me; I found a program called TeXnicCenter. However, just downloading and installing TeXnicCenter is not enough, you also need to install the “compiler”. According to TeXnicCenter, I could get something called Tex Live for this. Tex Live has binaries for both Windows, Unix and GNU/Linux.

When I had both Tex Live and TeXnicCenter installed, I just had to learn how to write LaTeX code and what kind of “stuff” it produced for me. If you install TeXnicCenter and open it up, this is the first thing you will see:

This looks pretty much like any word processor from early 2000.

Just as with HTML, you need to define where your document starts, where it ends and if you have something in the preamble (header section). Here’s an example of how to define a document and just have some text in it:

\documentclass{book}
\begin{document}
Hello there!
\end{document
}

If we build(compile) and run this, we will see that we got no errors and that 1 page was produced. You run it by clicking the “Build & View current file” button or pressing Ctrl+Shift+F5:

As you might have noticed, it says “LaTeX => PDF” just left of the build icon. This means that when we build the file, we will actually have a PDF created for us! This PDF will be styled as we’ve said, in this case it will use the default styling of a book.

LaTeX allows us to produce much more than just books, we can create articles, papers and much more. This can be decided my changing the document class. In the above example I used the document class book.

This seemed very easy and there was a lot of good information around the net that I could benefit from since TeX wasn’t something new. My next concern was the document structure, code samples, chapters, sections and much more. I soon found out that all of these was pretty easy to achieve; at least when using the standard layout it came with.

I decided that I wanted to split my document up into seperate files, 1 file per chapter to keep the master document clean and each chapter as clean as possible. Luckily for me, this was probably the easiest thing to solve.

All I had to do was create a new file, I named each file ChapterX.tex and just included it into the master file like this:

\documentclass{book}
\begin{document}
\input{Chapter1.tex}
\end{document
}

When installing TeX Live, I also got a lot of very nice packages that I could include that provided additional functionality. One of the most used packages that I found was listings. This package allowed me to embed code samples into the text with a lot of nice options to it.

The following code sample produced a very nice looking output:

\documentclass{book}
\usepackage{listings}
\usepackage{color}
\lstset{language=C,keywordstyle=\color{blue}}
\begin{document}

\begin{lstlisting
}
int x = 10;
if(x % 20){

}
\end{lstlisting}
\end{document
}

There were of course a lot of things not yet in place, the final design for the book was not done; since there was no content to style yet. Lots of packages and lots of tweaks was waiting along the way.

### Actually writing the content

I was very happy with what LaTeX allowed me to do, I felt comfortable with the way that I could change layout as I went on. One of the most important things during the time that I wrote this book was to share early and share often. A good example of this is the initial draft; if I had not shown this until everything was done, the book would not have turned out as good as it did.

Moving to LaTeX was a very good move and I have never regretted it. It took a couple of days to get used to everything but once everything was in place the focus was a lot more on the content than on the buzz around it. It also felt a lot better writing everything from scratch when doing it like this.

I still had a lot of work to do, but I at least had a typesetting system that I was feeling comfortable with and I shared as much screenshots and snippets as possible to make content looking as good as possible. There are a couple of math equations in the first chapter of the book, in the first draft this equation was just plain text; but after sharing almost 15 different versions of the same equation (style wise), it turned out as it did. Again, if I hadn’t asked the potential readers and those people that have worked with typesetting before, it would never have turned out as it did!

Now I just needed to write the content. As I wrote Chapter 1, I started to think about how I could ensure quality of the overall book and where to go from now. I knew that I wanted to write high quality content where each sentence had been revised many, many times.

The focus so far had been to find a way to comfortably write the content; I now had to find a way to make the content as good as possible. Possibly with the help of the community, but where do I get such help and how do I organize all the feedback?