Aug 31 | 3:55 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Aug 31 | 4:00 PM |
Rory | has entered the room |
Mark M. |
hello, Rory!
|
Mark M. |
how can I help you today?
|
Rory |
Hey Mark!
|
Rory |
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
|
Mark M. |
mostly, people swing by when they have specific questions
|
Mark M. |
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
|
Mark M. |
:-)
|
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
|
Aug 31 | 4:05 PM |
Mark M. |
the book debuted in the summer of 2008
|
Rory |
Very cool
|
Rory |
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?
|
Rory |
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
|
Rory |
Retrofit seems to the more widely used - yet Volley is the (un)official lib..
|
Mark M. |
yeah, the key there is "(un)official
|
Mark M. |
(give or take a quotation mark)
|
Rory |
Haha...yeah
|
Mark M. |
it's had a very strange life
|
Mark M. |
it only was published as an artifact earlier this year
|
Mark M. |
prior to that, you had to clone a git repo and add it manually
|
Rory |
Yeah... why was that ...
|
Rory |
Strange indeed
|
Rory |
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
|
Mark M. |
there's a clearer support structure (issue tracker, versioning, etc.)
|
Rory |
Yeah - Square do great work
|
Rory |
Oh actually ... I would like to ask you something
|
Rory |
Sort of specific
|
Aug 31 | 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
|
Rory |
I am using Firebase as backend
|
Rory |
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
|
Rory |
Oh right
|
Rory |
Ok may I ask you this then ... how would you approach implementing such a FIFO data structure using SQL instead... out of curiosity ?
|
Rory |
SQLite*
|
Mark M. |
off the cuff? probably use a timestamp to determine the ordering
|
Rory |
Yeah off the top of your head...
|
Rory |
Eager to pick your brain a little
|
Aug 31 | 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
|
Mark M. |
the bigger issue with something like a queue is ensuring items on the queue are processed exactly once
|
Mark M. |
that gets tough when you start thinking about exceptions, multiple threads/processes pulling from the queue, etc.
|
Mark M. |
so, really, I would try to find an existing robust queue implementation
|
Mark M. |
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
|
Rory |
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?
|
Mark M. |
versus some in-app job queue?
|
Aug 31 | 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
|
Rory |
*persisted
|
Mark M. |
OK, so each user has his or her own queue?
|
Rory |
Yeah
|
Rory |
Think of it like this
|
Rory |
There are 6 barbers
|
Rory |
Each has a queue
|
Rory |
Customer takes ticket - placed in queue
|
Rory |
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
|
Rory |
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?
|
Mark M. |
a Notification? SMS? email? candygram? something else?
|
Rory |
Ah sorry - I should have explained
|
Rory |
Yes - an SMS
|
Rory |
*a sms
|
Rory |
When their seat is ready
|
Mark M. |
well, that implies a server, as an app cannot readily send an SMS to itself
|
Mark M. |
(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
|
Rory |
So - yeah - a server would be needed
|
Aug 31 | 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
|
Mark M. |
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
|
Rory |
Time to maybe pick up Ruby ...
|
Mark M. |
message queues, with Ruby bindings, are a dime a dozen
|
Mark M. |
but, that's not Firebase
|
Mark M. |
my overarching theme is: don't reinvent the wheel, particularly when the wheel might get tricky to build
|
Mark M. |
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. |
though, there's https://github.com/firebase/firebase-queue
|
Aug 31 | 4:30 PM |
Rory |
Although most likely inherently restrictive ...
|
Rory |
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
|
Rory |
How often do you run 'Office Hours'?
|
Mark M. |
usually three hours a week
|
Mark M. |
staggered at different times of the day, to try to offer at least one that's reasonably convenient for any time zone
|
Mark M. |
occasionally, due to travel, I am unavailable
|
Rory |
That's really great - fantastic support
|
Aug 31 | 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
|
Rory |
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 ...
|
Aug 31 | 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
|
Mark M. |
I used to work with training firms offering public training, where individuals could sign up
|
Mark M. |
I haven't done that in a couple of years
|
Mark M. |
that particular model has been suffering at the hands of MOOCs and stuff
|
Rory |
MOOCs?
|
Mark M. |
Udacity and kin
|
Rory |
Ahh
|
Rory |
Yeah - i signed up to their advanced course ...
|
Rory |
Bit too simplistic...
|
Mark M. |
yeah, advanced Android app training never sold well
|
Aug 31 | 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
|
Mark M. |
the video quality tends to vary
|
Mark M. |
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
|
Rory |
Could you name some examples to look out for ..
|
Rory |
I'm always on the look out in any case ..
|
Mark M. |
in terms of conferences with videos?
|
Mark M. |
or are you referring to something else?
|
Aug 31 | 4:50 PM |
Rory |
yeah
|
Rory |
DroidCon etc?
|
Mark M. |
some droidcon events publish videos
|
Mark M. |
droidcon UK used to, not sure if they still do
|
Mark M. |
droidcon NYC will do it for their conference coming up in a month
|
Mark M. |
Google I|O and the Android Developer Summit that Google held last year
|
Mark M. |
Denver
|
Mark M. |
er, Denver's conference (360 DevCon? I forget the name) from earlier this year
|
Mark M. |
the Android Summit that Capital One just hosted will have videos up sometime
|
Mark M. |
there are a few Android-specific conference lists, such as http://androidweekly.net/conferences and https://androidstudygroup.github.io/conferences/
|
Mark M. |
keep tabs on some of those to see if they publish videos sometime after the event
|
Rory |
Nice
|
Rory |
Thanks MArk
|
Aug 31 | 5:00 PM |
Mark M. |
that's a wrap for 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
|
Mark M. |
have a pleasant day!
|
Rory |
Nice chatting Mark
|
Rory |
Thanks
|
Rory | has left the room |
Mark M. | turned off guest access |