Sep 23 | 8:55 AM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
ramsey | has entered the room |
ramsey |
Hi Mark - possibly a quick one. Do you have any pointers for doing TDD/BDD on Android?
|
Mark M. |
hello, ramsey!
|
Mark M. |
I don't have any particular sites to point you towards, if that is what you mean
|
ramsey |
OK when you're making an app, say - do you follow the TDD principles or just go straight in and test later?
|
Mark M. |
speaking personally, it depends entirely on what I am writing
|
Mark M. |
on the whole, I'm not much of a TDD guy
|
Mark M. |
TDD isn't bad; it's just not the way my mind works
|
Sep 23 | 9:00 AM |
ramsey |
OK that's v interesting. So it's definitely not a must then?
|
Mark M. |
the only time TDD is a "must" is if a development team or manager has decided it is a "must"
|
Mark M. |
otherwise, it is just a development technique, nothing more
|
Mark M. |
again, TDD is not a bad idea, though I do find that how easy it is to do TDD depends on development language and frameworks (e.g., TDD on Ruby is easier than TDD on Android/Java)
|
ramsey |
OK that's useful thanks. So do you do your testing after you've built the features? It's useful that you say it's harder on Android - because that's been my experience but wasn't sure how to get around it!
|
Mark M. |
again, it depends upon what I am writing
|
ramsey |
And do you spend lots of time writing unit tests etc? Or is it more informal?
|
Mark M. |
I would not say that I am particularly representative of how Android development is done in general
|
Mark M. |
I am one guy, working independently, mostly writing book examples
|
ramsey |
Yeah - I suppose it's a less specific question. But it's useful to know how other Android devs do it
|
Mark M. |
the testing requirements for that are low
|
ramsey |
True. Perhaps I need to get onto some android forums
|
Sep 23 | 9:05 AM |
ramsey |
But that's been helpful Mark. Just the insight - thanks
|
Mark M. |
for larger stuff, I typically write a bunch of production code, to get a core established, before getting serious about automated testing
|
Mark M. |
if you have another question, go right ahead -- it's a quiet chat room this morning
|
Sep 23 | 9:25 AM |
MyWay | has entered the room |
MyWay |
hi
|
Mark M. |
hello, MyWay!
|
Mark M. |
how can I help you today>
|
Mark M. |
er, today?
|
MyWay |
I've received this trace... http://pastebin.com/1JEiFucJ it's from a single device
|
MyWay |
but I can't understand what can be the reason
|
MyWay |
I can't see any of my classes inside it
|
MyWay |
how can I investigate what's happening?
|
Mark M. |
well, the line numbers don't quite line up with the current ViewPager source code
|
Mark M. |
try to track down the source code for the version of ViewPager that you are using, then see what line 1605 is
|
Sep 23 | 9:30 AM |
Mark M. |
a quick skim of the current ViewPager code isn't turning up much that might trigger a local NPE in onLayout()
|
Mark M. |
a child with a null LayoutParams would, though I don't know how you would wind up with that, since we don't add children to ViewPager directly ourselves
|
MyWay |
if (child.getVisibility() != GONE) {
|
MyWay |
this is the viewpager line
|
Mark M. |
that would imply that getChildAt() for a valid index returned null
|
Mark M. |
and I have no idea how that would happen
|
Sep 23 | 9:35 AM |
MyWay |
I have no idea too, I'm neither able to reproduce it
|
Mark M. |
unless it starts happening with some frequency, I wouldn't worry about it too much
|
Mark M. |
for all you know, a cosmic ray flipped a bit somewhere
|
MyWay |
eheh
|
Mark M. |
cosmic rays are sneaky that way
|
Sep 23 | 9:40 AM |
MyWay |
yes
|
MyWay |
maybe something specific to samsung GT-I9060I's ROM?
|
Mark M. |
that's not completely out of the question
|
Mark M. |
some Samsung 4.2 devices were caught baking in a copy of appcompat-v7
|
Mark M. |
wasn't a big problem, until the v21 appcompat-v7, with all the Material backport stuff, came in
|
MyWay |
ah
|
Mark M. |
the firmware always wins, and so classes in the firmware trumped those in the library
|
Mark M. |
which broke a bunch of apps
|
Mark M. |
it's conceivable that they baked in support-v4 as well
|
Mark M. |
not a whole lot you can do about that
|
MyWay |
yes, thank you
|
Sep 23 | 9:50 AM |
MyWay |
Have a good day to all, bye Mark and thank you
|
Mark M. |
you are very welcome
|
Sep 23 | 10:00 AM |
Mark M. |
that wraps today's chat
|
Mark M. |
the transcript will be posted to https://commonsware.com/office-hours/ shortly
|
Mark M. |
the next chat is tomorrow at 7:30pm US Eastern time
|
Mark M. |
have a pleasant day!
|
ramsey | has left the room |
MyWay | has left the room |
Mark M. | turned off guest access |