Office Hours — Today, February 11

Yesterday, February 10

Mark M.
has entered the room
Mark M.
turned off guest access
Mark M.
turned on guest access
Feb 11
4:00 PM
Mike
has entered the room
Mark M.
hello, Mike!
how can I help you today?
Mike
View paste
Hi Mark.  I have been learning Android for a few months now.  I have been working through exercises in the Big Nerd Ranch book and have also been reading your book.  My question has to do with the fact that I am not sure what the best way to proceed is.  I work through exercises, and mostly understand those, but I am not sure how to further my knowledge about Android in general.

When I have a question about how to do something that isn’t covered in a book, if look it up in the Google docs, I have a hard time getting relevant info there, as it is more of a reference and there aren’t a lot of examples

I realized this might be hard for you to answer and relate to because at this point you know Android so well. But if you can think back to when you were just learning, do you remember how you approached getting familiar with the API, for example?  I realize that this is a somewhat general question, but I am looking for some additional guidance.
Mark M.
well, I was "just learning" back when Android was being developed
so my experience is not particularly relevant here
StackOverflow is the #1 support resource, both in terms of the 400,000+ questions already there, plus the ability to ask new questions
4:05 PM
Mark M.
if you're a Chrome user, there's an extension available that adds "(sample code)" links to all the JavaDocs
Mike
Yes, I know about Stackoverflow, it is amazing.
do you know what it is called?
Mark M.
where if you click the link, it searches the official Android samples and my book samples
hang on -- I'm in Chromium now, so hopefully checking my extensions won't somehow bounce me out of the chat...
it is "Android SDK Samples Search"
beyond that, there are tons of blog posts and the like indexed by your favorite search engine, other features of your Warescription (webinars, StackOverflow "bump", plus these office hours chats), etc.
Mike
Ok, great, thanks. I feel like I wasn't able to make myself clear in the question. I guess I am wondering if just working through samples is the best way, or trying to read the google docs, or ...
Mark M.
I'd instead build an app that you want to build -- scratch your own itch
personally, I find learning in the abstract, without a concrete goal, to be "in one ear, out the other"
it's why I teach but rarely attend training, and why I present at conferences but rarely attend conferences that I'm not presenting at :-)
(BTW, conference videos are another great resource)
4:10 PM
Mike
well, I thought that would be a good idea. I thought of trying a simple tic tac toe, and I then posted my first question to Stackoverflow, and right away it was put on hold as being too general. Would you mind taking a look at it, since it is just you and me?
Mark M.
yes, I can see why that got closed as too general
StackOverflow is mostly "the last mile" in terms of assistance
Mike
it didn't seem general to me :)
That is the type of question I generally come up with at this stage of my expertise
Mark M.
part of the problem is having the right educational material for the type of app you want to build
my book, and the BNR one, are both for non-games
Richard L.
has entered the room
Mark M.
game apps will share some characteristics and implementation details with non-games
but on the whole, games are another beast
so, those books are fine if you wanted to build non-games
but if you wanted to build games, you'd either want a book on game development, or a book that covers 2D graphics and low-level touch events
for example, Ed Burnette's _Hello, Android_ had a sudoku game
Mike
i see. i have the algroithm for the game play, i just wasn't sure how to place a game piece on a board, I didn't think that was too fancy.
Mark M.
it's not that it's too fancy, but that it's just not in the areas covered by the books you have
Mike
got it.
Mark M.
(BTW, hello, Richard -- be with you in a moment!)
Richard L.
Thank you.
4:15 PM
Mark M.
with respect to your SO question, it's too general because the assumption is that you've learned basic game development, and StackOverflow is there to help you with particulars
Mike
ok, thanks for the ideas. feel free to help richard, and if I think of something else, i will chime in later. Your book is amazing, btw.
Mark M.
thanks for the kind words!
Richard: your turn! do you have a question?
Richard L.
How costly is accessing the shared preferences with something like sharedPref.getBoolean("key")? If I am requesting the same sharedPref, is it better to just store it in a variable in my class so I don't need to keep grabbing it? Or is it not costly enough to do so? Thanks Mark.
Mark M.
the getters should be dirt cheap
Richard L.
That's what I figured.
Mark M.
the XML is already loaded and parsed by then
Richard L.
Sweet.
Mark M.
so, there's no particular speed reason to keep the value in a separate data member
it's also useful to pull straight from the SharedPreferences as then you're ensured of having the latest-and-greatest value, if something else might be updating it
Richard L.
That's all I needed to know, thank you.
Mark M.
no problem
Mike: do you have another question?
Mike
i guess i don't have anything else for today
Mark M.
no worries
Richard: do you have another question?
Mike
i will keep plugging away, and i think i should come up with another app to try
4:20 PM
Mark M.
if either of you come up with a question, chime in
Mike
has left the room
4:30 PM
Richard L.
has left the room
5:00 PM
Mark M.
turned off guest access

Yesterday, February 10

 

Office Hours

People in this transcript

  • Mark Murphy
  • Mike
  • Richard Lucas