Office Hours — Today, August 31

Yesterday, August 30

Aug 31
3:55 PM
Mark M.
has entered the room
Mark M.
turned on guest access
4:00 PM
Rory
has entered the room
Mark M.
hello, Rory!
how can I help you today?
Rory
Hey Mark!
To be honest, I just came across your Busy coders book recently, and seen that you offered Q+A sessions at allowed times - so I had been meaning to try it some time - come in see the format, rules etc
Mark M.
ah
mostly, people swing by when they have specific questions
as a result, the room is rarely crowded
Rory
So - the format is completely open ?
Mark M.
well, it'd be nice if the questions were on Android app development
Rory
It's a great concept - awesome support mechanism
Mark M.
versus, say, the proper way to prepare BBQ
:-)
Rory
I'll defs make use of it
Mark M.
you can see past chat transcripts at https://commonsware.com/office-hours/
Rory
How long have you been providing this?
Mark M.
chats specifically since late 2009
4:05 PM
Mark M.
the book debuted in the summer of 2008
Rory
Very cool
Ok - I'm sure I have a ton of questions ...
Mark M.
the one thing to bear in mind is that these chats are semi-public
Rory
What is your preferred networking lib/framework?
Yeah - that's fine
Mark M.
mostly, I use the Square libraries: OkHttp, Retrofit, Picasso
Rory
I'm working on a project and am trying to decide between Volley and Retro
Retrofit seems to the more widely used - yet Volley is the (un)official lib..
Mark M.
yeah, the key there is "(un)official
(give or take a quotation mark)
Rory
Haha...yeah
Mark M.
it's had a very strange life
it only was published as an artifact earlier this year
prior to that, you had to clone a git repo and add it manually
Rory
Yeah... why was that ...
Strange indeed
That Google didn't put some resources behind it
Mark M.
I have never fully understood what the story is there
Rory
Make it the defect Android networking lib
Mark M.
and that's one of the reasons I prefer the Square libraries
there's a clearer support structure (issue tracker, versioning, etc.)
Rory
Yeah - Square do great work
Oh actually ... I would like to ask you something
Sort of specific
4:10 PM
Mark M.
go ahead -- worst-case, I can't answer the question
Rory
A project I am working ... I need to implement a queue system - similar to a shop queue - user takes a place in queue - is served FIFO
I am using Firebase as backend
However I am researching the manner in which to implement this
Mark M.
well, I have never used Firebase, so I cannot comment on anything tied to its APIs
Rory
Firebase files structured in JSON data
Oh right
Ok may I ask you this then ... how would you approach implementing such a FIFO data structure using SQL instead... out of curiosity ?
SQLite*
Mark M.
off the cuff? probably use a timestamp to determine the ordering
Rory
Yeah off the top of your head...
Eager to pick your brain a little
4:15 PM
Rory
...though not too much :)
Mark M.
beyond that, the rest of the fields would be dependent on what your queue needed to track and stuff
the bigger issue with something like a queue is ensuring items on the queue are processed exactly once
that gets tough when you start thinking about exceptions, multiple threads/processes pulling from the queue, etc.
so, really, I would try to find an existing robust queue implementation
I assume, given that you mentioned Firebase, that the queue is effectively on the server, with one queue processing requests from some/all app users?
Rory
Literally - Single queue - Maximum 6 points of entry - User takes ticket - User placed in queue - Arbitrary time passes - User contacted via message - If User responds - user popped from queue - If user does not respond - Set time passes - User removed from queue
It's probably much more complicated than I had anticipated ...
Mark M.
but, again, this is a queue that is implemented on the server side?
versus some in-app job queue?
4:20 PM
Rory
It wouldn't necessarily have to be implemented at server ... could just as easily be in-app, as long as it's permitted
*persisted
Mark M.
OK, so each user has his or her own queue?
Rory
Yeah
Think of it like this
There are 6 barbers
Each has a queue
Customer takes ticket - placed in queue
Customer process FIFO
Mark M.
but that FIFO is for the specific barber whose queue the customer joined?
Rory
The reason i was thinking of using Firebase was because of the easy sync function that it provides
Yes
Mark M.
OTOH, it requires an active network connection
Rory
Each Barber has a FIFO queue
Mark M.
in your earlier explanation, you wrote "User contacted via message" -- what do you mean, specifically?
a Notification? SMS? email? candygram? something else?
Rory
Ah sorry - I should have explained
Yes - an SMS
*a sms
When their seat is ready
Mark M.
well, that implies a server, as an app cannot readily send an SMS to itself
(and, even if it could, that would be... odd)
Rory
Ive simplified it - The user must initially create a profile with name, contact details etc
So - yeah - a server would be needed
4:25 PM
Mark M.
OK, so, then, rolling *all* the way back to how would I do it: I would see if somebody has already implemented a FIFO queue for Firebase
personally, I avoid SSSaaS (Server-Side Stuff as a Service), so I'd be looking at using existing work queues, mostly in the Ruby space, as that's what I use for server-side development
Rory
Yeah
Time to maybe pick up Ruby ...
Mark M.
message queues, with Ruby bindings, are a dime a dozen
but, that's not Firebase
my overarching theme is: don't reinvent the wheel, particularly when the wheel might get tricky to build
now, it's entirely possible that you're on your own for a Firebase-backed FIFO queue
Rory
Yeah - My thoughts were that Firebase abstracted away the complexity to a nice set of interface methods
Mark M.
4:30 PM
Rory
Although most likely inherently restrictive ...
My project is probably too intricate to depend on a framework, like Firebase
Mark M.
and, other than this server is going to be used by an Android app, it's a bit far afield from what I can help with
Rory
No Mark - appreciate your time and advice dude
How often do you run 'Office Hours'?
Mark M.
usually three hours a week
staggered at different times of the day, to try to offer at least one that's reasonably convenient for any time zone
occasionally, due to travel, I am unavailable
Rory
That's really great - fantastic support
4:35 PM
Rory
Can you tell about about any interesting Android projects youve worked on?
Mark M.
not really, thanks to non-disclosure agreements
Rory
Yeah - thought that
Ive just finished working on a major commercial banking application - worked with some very talented engineers - I've been working on Android for 3 years now ... still have a long long way to go ...
4:40 PM
Rory
I'd be interested in finding out more about the private training you offer... is the target audience large corporate groups or, individuals also?
Mark M.
mostly, it is for groups
I used to work with training firms offering public training, where individuals could sign up
I haven't done that in a couple of years
that particular model has been suffering at the hands of MOOCs and stuff
Rory
MOOCs?
Mark M.
Udacity and kin
Rory
Ahh
Yeah - i signed up to their advanced course ...
Bit too simplistic...
Mark M.
yeah, advanced Android app training never sold well
4:45 PM
Mark M.
I never cared for it, just because it tended to feel like "well, here's another week's worth of random topics"
Rory
Just need on-th-job-experience I guess
Mark M.
there was no story behind it, the way we had with introductory training
Rory
Yeah I seen that you stopped the advanced
Mark M.
beyond on-the-job stuff, keep tabs on conferences that post videos of their talks
the video quality tends to vary
but for the ones that get decent results, you can get a ton of material, usually for free
Rory
I suppose once an approximation of all the topics are covered - it's a matter for the individual to get into the intricacies themselves
Could you name some examples to look out for ..
I'm always on the look out in any case ..
Mark M.
in terms of conferences with videos?
or are you referring to something else?
4:50 PM
Rory
yeah
DroidCon etc?
Mark M.
some droidcon events publish videos
droidcon UK used to, not sure if they still do
droidcon NYC will do it for their conference coming up in a month
Google I|O and the Android Developer Summit that Google held last year
Denver
er, Denver's conference (360 DevCon? I forget the name) from earlier this year
the Android Summit that Capital One just hosted will have videos up sometime
there are a few Android-specific conference lists, such as http://androidweekly.net/conferences and https://androidstudygroup.github.io/conferences/
keep tabs on some of those to see if they publish videos sometime after the event
Rory
Nice
Thanks MArk
5:00 PM
Mark M.
that's a wrap for today's chat
the transcript will be posted to https://commonsware.com/office-hours/ shortly
the next chat is tomorrow at 7:30pm US Eastern
have a pleasant day!
Rory
Nice chatting Mark
Thanks
Rory
has left the room
Mark M.
turned off guest access

Yesterday, August 30

 

Office Hours

People in this transcript

  • Mark Murphy
  • Rory