dinsdag 10 juli 2012

Refund on Head First Android Development

Following up on my own post from yesterday, I applied for a refund from O'Reilly. I mailed them yesterday, and today, I had the answer already in my inbox:

Hello Geroen,
Your refund has been processed as requested and may take up to 10 business days to be show up on  your credit card statement.
The book is undergoing a very large re-write and should be re released sometime later this year, though there is no solid release date at this time.

Great service O'Reilly, thanks! 

maandag 9 juli 2012

Head First Android book cancelled

Hi guys,

I just visited the O'Reilly site to check if the final version of the book is already available, but to my surprise, I saw that the release of the book has been cancelled.



I searched a bit on the internet, and found this post on the O'Reilly fora: http://support.oreilly.com/oreilly/topics/why_was_the_head_first_android_develoment_book_cancelled

The release of a definite book on Android from Head First labs has been postponed, but no date has been offered on when this release might be. It's a pity: I thought the book, however unfinished, was quite good, and it gives a very good overview on the basic features of Android.

Those who bought the book, can get a refund from O'Reilly. An E-mail to orders@oreilly.com apparently is enough to get this.

I will keep this site open and available to all, so you will still be able to download all code. I hope you all will be able to finish the book, with or without this site ;-)

donderdag 22 maart 2012

Aftermath: the good, the bad and the ugly

As you can see, I finished the book entirely. I hope that a lot of you can do the same thing, and that this site may have helped you a little bit on the way.

All errors in the book aside, I like it quite a lot. It was a pleasant read, and the book gives you an introduction into Android, quick and simple. I don't think I've spent more than 30 hours on the book, including the time spent in Chapter 6, trying to get the example working.

The errors are to be expected, at this point: the book hasn't reached a finished state yet, and in a pre-release state, books are prone to mistakes. It is taking quite a while to finish, but I'm sure that the author and the entire crew is working hard, and perhaps are adding a few features in the final print. I do hope so!

How do I rate the book? I'd give it a 8/10, and I'd definitely recommend it to new developers in Android. I do think that some knowledge of Java is necessary to get through the book easily - after all, the programming code you use in this book, is Java. It is, however, no material for people with solid Android knowledge. I don't think the book is trying to be that, but I would not recommend it for any other purpose than a starters book for Android.
At this point, the material isn't completely ready, but I do think that the author and his team should have put more Ready Baked Code on the internet. People are degrading this book because they can't get through Chapter 6 - which is a pity, because the book has a lot to offer. I hope, however, that my little site can help a little bit in achieving your goals.

What are my next plans? I'm torn between 3 tracks:
- iOS development: I also own the eBook Head First iPhone and iPad development. I already created a site for it over at headfirstios.blogspot.com ... At first, that was my next step. But considering that a third edition of the book is to be released in June, I'm not entirely sure. But I probably will start on iOS development :-)
- Android development: I acquired the book Android In Action: Third Edition; and I hope to learn even more about Android. I think Google has built what may be the best development framework in years, and I like every aspect I know about it. And so, I want to learn more :-)
- Python development: it may seems strange in this context, but Python is actually a real multi platform programming language, which is easy to learn and use, but quite powerful. Or, at least, that's what everybody keeps telling me. In the list of language I know, Python isn't present yet, so that's also a track to pursue.

Anyway, it's been a fun ride with you guys.

Hope to see you soon! 

Chapter 12: Final setup added to the Google Code repository

Hey guys!

Finished the last one ... And again, I learned some cool stuff ;-)

I only encountered 1 error in this chapter: on page 478, you need to put your background to "null". However, that is not a valid identifier in Android. It should be @null - you'll get a XML validation error if you it without the @.

To fully enjoy this chapter, you did need some additional resources. Resources which are not available at this point from the Head First Labs, so I simply created them myself :)

First, the buttons


As said, I simply created my own buttons for this chapter. Creating glossy buttons is quite simple, and isn't as hard as some people believe them to be. I created them using Photoshop. I know, Photoshop is not a designers tool per se, it is Photoshop after all, but I don't care: over the years, I've used Photoshop in web design a lot (I'm not a designer, but sometimes, as a developer, you need to go the extra mile too :-)). I've grown quite fond of it, and consider myself an intermediate novice (which may sound as a duality, but it isn't, Photoshop is a quite complex software package).

Anyway, you could go about creating your own buttons with these 2 steps:
(1) unless you own Photoshop, head over to http://www.adobe.com/downloads/, and download the trial version of Photoshop
For the Linux developers among you: you can always use GIMP, to achieve the same goal. I don't like it as much as I do Photoshop, but for this particular problem, there's no real difference between the two of them.
(2) If you wonder how to create glossy buttons, I found you guys a nice tutorial on the web: http://www.hongkiat.com/blog/create-cool-glossy-button-for-web/
You could probably find a lot more.
In essence, it's quite simple:

  • you create some button-like shape (square, rounded rectangle, ...)
  • in a selected elliptic area, you apply a gradient transparant -> white
  • you put the elliptic area on top of the button, moving it around a little until you're satisfied
  • you could, additionally, play around with the opacity of the elliptic area
That pretty much sums it up.

If you want to simply download mine, you can do so right here: 

I'm Cool-button, unpressed


I'm Cool-button, pressed


Update Contact, unpressed


Update Contact, pressed


As you can see, I made red buttons for the pressed images. I simply liked it better :-) 

Second, the background

I Googled for "skate ramp big air", because I wanted some skater doing a big air trick, so I could transform it into a Draw9Patch image (you need repeatable edges for that, and what better than blue sky to repeat?). On daylife.com, I found this image of Bob Burnquist on a Red Bull event doing a big air trick. I sliced the edges off a little bit, and I came up with this: 

Skateboard Background


I used this as input for Draw9Patch, the utility described in Chapter 12. For the final result, check the code repository! 

And like that, we've finished Chapter 12 and the book! 

Chapter 11: Final setup added to the Google Code repository

I finished Chapter 11, and added my final setup to the Google Code repository.

For this chapter, it is good to have an Android device, which you can hook up to your computer. I got myself a Samsung Galaxy Gio device to test, which I picked up at 150€ (about 175$). I tested the application, and send a few texts to myself :-)
If you would try to send texts via the emulator, your application will crash. That's because the emulator obviously isn't equipped to send actual SMSs ...

I didn't really write down any serious mistakes in the code, so you can just follow the book. In case you do have any trouble with the code, you can always download mine! I did change a few names of the classes, but the application works the same. Just to be very clear:

ImCool.java (in the book) = CoolActivity.java
main.xml (in the book) = coollayout.xml


If you plan on skipping this chapter - don't. This chapter explains how you can use the rest of the platform to your advantage in your own application, which is knowledge you shouldn't miss out on.

On to the last chapter! 

woensdag 21 maart 2012

Chapter 10: Final setup added to Google Code repository

Hey guys!

Finished Chapter 10 today. It was only a very short, but very interesting chapter. You can just follow the book, all code is present and correct.

I added my final setup to the Google Code repository.

Enjoy! 

dinsdag 20 maart 2012

Chapter 9: Final Setup added to the Google Code repository

Hi all!

Wasn't home for the weekend, so the first update is today (Monday).

I finished Chapter 9. The text was quite correct, although it was confusing at times, because it's not really consistent the whole time. Names change regularly, which makes it somewhat difficult to follow the text sometimes.

Anyway, finished the chapter succesfully, and I uploaded the code to the repository.

1 addition to the chapter, though: in the text is mentioned that your database is created from the moment you call the constructor. That is not true: you need to call the getWritableDatabase() or getReadableDatabase() methods before getting an actual database on the platform.
So, these methods always need to be present in your constructor:


public TimeListDatabaseHelper(Context context) {
    openHelper = new TimeTrackerOpenHelper(context);
    database = openHelper.getWritableDatabase();
}

Additionally, onCreate is never called in your extended object of SQLiteOpenHelper: I tried debugging, but Android calls its underlying methods, linking your code to the framework, but never calling the code directly - or at least, directly in the way you can debug it in Eclipse. Quite annoying, but you can use the SQLite Database Browser to browse your database and check the layout.

Have fun!