While writing my ‘Automating ActionScript Projects with Eclipse and Ant’ book, I ran into a lot of problems that I hadn’t run into. Since I hadn’t written a book and was used to blog posts and articles. Writing a blog is completely different; you don’t have a strict deadline, you can write when you want or when you have an good idea. Book writing is different cake.
So here are the lessons I have learned the hard way, I organized them for you per topic:
Coding:
- If you can; try to write all the code that will be in the book first and get this bug free. Then write your book about it. I wrote most of my code while writing, not a good idea. This takes away a lot of extra time. So before you plan on writing a book, get your code done. For me this will be the way to go next time i’ll write a book.
- If you get stuck with code, don’t keep pounding at it, let go and move on. You can come back to it later.
Focus:
- During the writing I still had a full time job to do. Writing during the week after normal working hours is killing and drained my energy levels. Weekends are better in so many ways. You can get a decent rest, don’t sleep in and start early, you can set your own pace while still keeping yourself to your projected amount of pages to write.
- Once I was over half of the pages, the pace began picking up. Rapidly. I think this is a mental thing. Kind of like running 10k, once you hit the 5k mark, the last 5k are more easy because ‘you are almost there’.
Writing itself:
- Discipline basically consists of one ingredient; doing what you need to do. And stick to it. Practice makes perfect. Pull the plug from your router and disable your wireless connection if that helps you.
- Making a sysnopsys / outline per chapter makes you stay focused on what you want to write.
- If you get stuck with writing, move on to the next section. And insert some sort of code that makes it easy for you to get back to that section and make revisions. I used [[[NEEDS WORK]]]. The three brackets makes it able to find it easily throughout your document.
- The big secret to writing is…. write. Quite surprisingly
Just get started. For me this was the hard part because sometimes i had to get the discipline from my toes… Just sit and focus on getting started. Let all your other thoughts and urges pass. Notice how your mind will try to justify the distractions. Don’t give in, those urges are like waves and will disappear. (Thanks for Leo Babuta for the focusing tips)
Some time ago I did a survey for the research on the book I was writing and promised that I’ll be giving away a copy of it one it was released. The participants needed to enter their email address and about 30 people did signed up. <Drum roll please…> And the winner of the ‘Actionscript automation using Eclipse’ survey is …
Erik van Nieuwburg
I will contact you via email so I can send you a copy of ‘Automating ActionScript Projects with Eclipse and Ant‘!
Enjoy the read!
The script I used to randomly draw a name from the list of participants is:
private function drawWinner() : void {
var entries : Array = new Array( /* loads of entries */ );
var randomNumber : int = random( 0, entries.length );
trace( "Entry number " + randomNumber + " with email: " + entries[randomNumber] );
}
public function random( ...args ) : Number {
var argLength : uint = args.length;
switch(argLength) {
case 0:
// perform the standard Math.random
return Math.random();
break;
case 2:
// returns a random float between args[0] and args[1];
case 3:
// returns a random int between args[0] and args[1] if args[2] is set
var returnValue : Number = (Math.random() * (Number( args[1] ) - Number( args[0] ))) + Number( args[0] );
return (args[2] != undefined && Boolean( args[2] )) ? Math.round( returnValue ) : returnValue;
break;
default:
throw new IllegalOperationError( "MathUtils.random takes either 0, 2 or 3 arguments" );
return undefined;
break;
}
}
Please consider to buying me a coffee.
After four months of writing, 84 pages, around 118.257 characters, 20.496 words, 1611 paragraphs, lots of sweat and the occasional tear, its finally done!
While my friends were sitting in the sun drinking beers, went on boat trips, to clubs and dinner parties, I had to cancel it all. I was writing my first book.
So without further ado: The Book.
You can order the book in the online store at O’Reilly or on Amazon.com. If you are based in the Netherlands you can go to BOL.COM and at Computer Collectief.
If you read it, tell me what you think, all comments are welcome!
Happy coding
PS. I will announce the winners of the survey coming week on this blog! And I will contact the winner via email.
Please consider to buying me a coffee.Watch a demonstration of News+, Bonnier’s new tablet concept for the daily newspaper.
News+ combines the depth and editorial choices of a daily newspaper with the web’s possibilities for interaction and quick updates.
Read more at http://www.bonnier.com/en/betalab and http://www.bonnier.com/newsplus
This conceptual video is a corporate collaborative research project initiated by Bonnier R&D into the experience of reading magazines on handheld digital devices. It illustrates one possible vision for digital magazines in the near future, presented by our design partners at BERG.
Please consider to buying me a coffee.Popular Science+ is the first digital magazine to emerge from Bonnier’s Mag+





