« first day (3932 days earlier)      last day (1239 days later) » 

01:38
@Taseer There's a few different approaches, really depends on what kind of server you're going for
For simpler things with a handful of endpoints, you'd normally use something like gin
For larger projects used by many external systems, I tend to favour gRPC with http-gateway, and have it all generated by the service spec in protobufs, means you have to write 0 boilerplate manually
You can also just use net/http directly if you want, it works fine, but have to do a bit more wrapping in the long run
 
7 hours later…
08:41
Ah, I get it. Thanks for the info
09:21
user image
3
Bro why am I a taser
Tim
Tim
pepelaugh
10:04
This was the most starred message last year on this day:
Jul 22 '20 at 18:19, by Dave S
runs off into the bushes
10:33
05t6y78u9iop[]/-++
'=;l,kmnb vc
Tim
Tim
hello ivan's baby or cat
10:46
hello ivan's smashed head
and tim
11:03
Never thought I would be called tasers by recruiters...guess that my life now
I wonder if my name really is pronounced like a taser
Tim
Tim
yeah your parents probably made a mistake when they said it differently all your life
you should brand it
taseer - electrically good
My name actually means, 'to have an effect on something'
Like, "taseer of the flowers are great"
It's so easy to pronounce it correctly. Like say, 'Ta - see - er'
That's it
My name is actually not that common in my country either
11:08
didn't see that coming
Guess what, everytime I introduce myself they say that, "oh your's name Taseer? The [dead politican] like"
There's was a politician named Taseer too and he was gunned down my extremists in 2007 or 2008 and people remember me by associating my name with his
lol
bad luck taseer
@Tim looool thats the baby alone with her grandma
her grandma is a cat???
Tim
Tim
11:24
I think the baby is the grandma
damn
11:36
deep
12:20
I get a foreground service and a fragment that should get the location and send it to the server, but if the fragment is in foreground I have to update some data (number of km, time,etc)
I've done the fragment part and now I have to integrate it with the service
but I don't know what approach is better
atm I'm storing number of km and time using shared preferences
I've seen there is a method onSharedPreferenceChanged that you can implement in your fragment
so it'll be something like: service updates shared prefs, fragment gets the lastest shared prefs and displays them
or should I use a broadcast receiver
hmm preference stuff seems like a bad approach
Tim
Tim
13:11
use reactive approach, store this data in repository or similar
fragment observes the data
basically use the same viewmodel for service and fragment?
or repository
Tim
Tim
no, services don't have viewmodels. Use same repository yes
13:47
thanks timmy g
 
1 hour later…
15:09
o/
@Taseer lmfaoooooo
I call you Taser one time and started a trend, clearly
eli
eli
[ Hi ]
15:28
heyo
Tim
Tim
16:08
heyo mamma
how it goin man?
Tim
Tim
swell
I've been trying to take a look at the new oneplus nord 2 but the website has been hugged to death lol
looks like it's going to be more than I want to pay for a phone though
Tim
Tim
what is the price
so I might get the european version of the N10 5G which means it won't be 5G in Canada... lol but we'll see
it's like $600CAD from what I saw
but I also haven't seen the official thing yet since the website and store are down
so im not sure
Tim
Tim
16:13
600 hard pass
Just get the Samsung
they are providing regular updates every month
yah hard pass if it's that much, the N10 is like $350 lol
not sure how they could justify that increase if it's that high
Tim
Tim
I would rather have a phone that never gets updates, but is not a samsung
So much option
They never get updates
and are not Samsung
N10 seems fine
Tim
Tim
I'll take it
I would rather switch to iphone than buy a samsung
16:17
Why do you hate it so much?
Tim
Tim
dunno
I'd love an N10 but they're out of stock for US/Canada versions, so I'd have to get the European version from Amazon and the 5G networks are different.. so I'd only get 4G
but I also don't give a fuck abouT 5g
so ill probs just say fookit and get that once I can take alook at the nord 2
I don't know if there's any other Android phones which get regular updates
Sam is the only one providing
Samsung is like the Apple of Android
Tim
Tim
I think oneplus phones don't get many updates because they are already perfect
16:26
All that bling wears off anyway when you use a phone for quite some time
Just go with whatever gives the most performant device
Everytime I have tried to convince an iPhone user that 4 GB memory is not enough, they say that iOs iS oPtImiZeD
My ass, it can't cache apps properly
@ballBreaker I am lost, can you refresh my memory what "pp" stands for?
Polypropylene
@WarrenFaith profile picture
Folks, is it possible to invoke Toast from within a class derived from DialogFragment as follows?
I find it amusing that oneplus's website has been offline since the launch
16:37
        builder.setPositiveButton("Positive Button", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {

                Toast.makeText(getActivity().getApplicationContext(), "This is from Positive Button", Toast.LENGTH_SHORT);
            }
        });
It compiles but there is no Toast when I click the Positive Button.
\0
is it just bread instead?
Tim
Tim
missing the .show() I think even the IDE warns you about this
Goooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooood Afternoon Everyone!!!! :D
@RaghavSood, @DaveS, @Mauker, @Pochmurnik, @CptEric, @Graeme, @ballBreaker, @Jordy, @WarrenFaith, @grrigore This is your weekly reminder of New Free Games on Epic Store!!!!!!
oops
@Reno, @CrabsStew, @bluetoothfx, @Code-Apprentice, @FélixAdriyelGagnon-Grenier This is your weekly reminder of New Free Games on Epic Store!!!!!!
i pasted an old one >.<
BTW, what kind of questions can I expect for a senior Java developer position?
what time do you wake up in the morning to get the early bird special at denny's?
what time do you go to bed at night so that you can wakeup early in the morning to get the early bird special at denny's?
at what age did you start wearing diapers due to incontinence?
how old are your kids?
etc
16:52
Ah, those are tough I don't think I would make it because of the diapers question
yeah that one is one of the worst interview questions for seniors for sure
Is it okay to say that I still wear one?
@Tim Thank you very much. You saved my life. :-)
\0
Tim
Tim
@Taseer I think you should announce it when you walk into the room, to show how proactive and assertive you are
I feel the compulsive need to share this: youtube.com/shorts/fyks4qGWjEM?feature=share
17:33
what is youtube.com/shorts
is it youtube tiktok
17:44
o/
18:18
@ballBreaker Yes
that's a very specific short
18:30
yo
hows life
yo
just booked on hour with a drum kit near me tonight, super super excited for that
haven't done that in 2 years now
how have you been doing your ritual drum circles then?
butts mostly
turn around and let me play the bongos on dat booty
fair
lol but the only drumming fix I've gotten in the past 2 years is going back to my parents place, and I'd usually just do recordings for my dad instead of playiong for myself
18:40
kinda weird to slap your parent's ass for music but okay
true, it should be only for fun
exactly
what songs do you like to play on drums? or do you make your own stuff?
butt songs, thought this was clear
yeah I think the only song I know how to play is "Baby got back"
@JBis heavier and faster songs usually, anything alt rock, some indie stuff, classic rock, heavy rock, etc
18:47
things that are easy to play when slappin dat ass basically
some bands I really enjoy drumming: at the drive in, mars volta, queens of the stone age, nine inch nails, tool, foo fighters, them crooked vultures, interpol, incubus
but I'll also do my own stuff, but that's usually only when I have more constant access to my own drumkit
when it's just these sessions I'll go and play other stuff so I can just have fun
this is one of my favourite songs to drum to give you an idea youtube.com/watch?v=lmTSQZjR3DE
nice
dumb question, are drums always setup in the same way or do drummers arrange them how they like?
mix of both
there is a standard way to position the drums, but it's really up to the person, I've seen people go far off the book with that
interesting
crash1                       crash2
            tom1    tom2
highhat                      ride cymbal
snare                        floor tom
             bass drum
usually like this though
18:55
tom1 and tom2 are tom's left and right cheeks i presume?
yeah exactly
floor tom is a different tom on the floor, obviously
gotchta
you ever play green day? they have some good drums
not green day as I'm not into them that much but I'll play some other punk bands
@ballBreaker ah yes. In my profile the setting was set to the generated one, not sure why
ah nice
19:03
ahhh gotcha
Tim
Tim
@ballBreaker nord 2 is 399eu here
yeah that's $589.94 CAD before taxes
hmm I can load the oneplus website now, but I don't see the nord 2 pre-orders on there
OH they have some N10s in stock though!!
buying now
wooooooo
bought wooo
19:21
I don't think the N10 is very effective, you should get some N95s
won't get it for a week tho lol
19:32
I haven't been this excited to get a phone since my first ever cell phone
I can't wait to not have to take all my pictures in wide angle lens and have no vibrate functionality lolol
deploying a project is def the worst part of the development process
requirements gathering is 100% the worst part imo
but yeah agreed for implementation
y'all never had to deal with clients before and it shows
?
that was covered by 'requirements gathering'
that's the most fun part of dealing with clients cause they are still excited about the project
it does suck documenting though
19:46
lol
yeah but for me that still encompasses when they come back later asking for more
ah see I just say, "Sure that'll be x more dollars"
just updated node from v13 --> v14 on prod without checking compatibility, chances it works?
looks fine \o/
sometimes you just gotta yolo
if you don't leverage prod for QA to cut costs you're doing it wrong
yeah exactly
what is prod other than QA but for your customers
20:27
why pay for QA when you can get paid for QA
Tim
Tim
@ballBreaker for som reason I thought CAD was same to EUR as USD
they're all over the place these days but generally USD is higher than CAD and EUR higher than USD and GBP higher than EUR
20:45
you usually need to add 10% to the USD to get the CAD price
right now it's 25%
and they say the USD has inflation problems
its 20% rn actually
it's been 25% for years though
was 0% in 2008 ish haha
I was alive when the CAD was worth more than the USD
learn to math bb
what's 1/0.8 ?
i unno
some number probably
at least 20%
it's 1.25
nice i was right
21:09
yo daddy didn't play drums with you enough as a kid
he did play the drums but he did it on my soft skull when I was a baby
gotta do it while it's still soft or otherwise you might leave evidence
yeah after that he just beat me with phone books as to not leave a bruise
im gonna get such blisters today lol
im half suspecting a heart attack
Folks, do you know the reason why inflate() method is called in onCreateViewHolder method of Adapter class rather than in ViewHolder constructor of ViewHolder class?
because creating an object in Java is different than inflating a view and adding it to the application context in Android
one is an allocation in memory and the other is drawing in the GUI and linking data
@ballBreaker just start coughing real hard and pounding your chest if that happens
should only need to wait ~ 6 months to get a visit with your doctor
21:17
Please consider the following codes:
    public ListItemHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {

        View itemView = LayoutInflater.from(parent.getContext())
                .inflate(R.layout.listitem, parent, false);
        return new ListItemHolder(itemView);
    }
and?
public ListItemHolder(@NonNull View itemView) {
    super(itemView);
    mTitle = itemView.findViewById(R.id.textViewTitle);
    mDescription = itemView.findViewById(R.id.textViewDescription);
    mStatus = itemView.findViewById(R.id.textViewStatus);
}
In my mental model the process of inflating can be moved to the constructor ListItemHolder.
@DaveS lmao
hopefully he can fit me in his busy schedule when I'm dying
the ViewHolder shouldn't be inflating a specific view from the application context, it should be dumb and just relate to a view
@ballBreaker thanks Obama
I don't have a second water bottle so I'm bringing a mason jar full of water
some redneck shit right there
Tim
Tim
21:21
I guess in your mental model the class is called ListItemHolderAndInflater?
you can imagine that in more complex solutions you might want to use the same view holder for a variety of iterations on a view, like Tablet vs phone with the same IDs but different XML
@Tim I don't consider inflating and making references of widgets are different things.
i'd suggest just using XSL or JSP instead
much easier and newer
Tim
Tim
and logically following, your mental self says WHOOPS that's a class responsible for 2 things
I get it, it's confusing when things do what they are described as doing
instead of extra things
What you're asking is why this generalized object, doesn't simplify your use case at the expense of other use cases
Tim
Tim
21:26
@LetMeBeYourLostDisciple feel free to be wrong
OK. Thank you. It is time to consult the main site because I am still confused. :-)
Tim
Tim
information about android development on stackoverflow is complete garbage. Use the android documentation instead
OK. Still reading.... \0
A View is a generalized object representation of a view, you can inflate a view using a variety different techniques. You might want a ViewHolder that works with more than 1 XML file, small, large, tablet, different languages etc
you shouldn't need to change your viewholder code for that which is just a reference to fields so you can put data in there
maybe it's RTL vs LTR or landscape to portrait, with a generalized ViewHolder you don't care
you find the ID, set the data
other code can conditionally select which XML file to inflate
Tim
Tim
21:36
@ballBreaker how do you know where you're supposed to (not) be? Almost every place I visit I get r e k t by random bandits even
hmm not sure, I didn't really get rekt that often, not sure what you're doing differently
did you get a mage yet
anything that was screwing me usually died pretty good from some fireballs
Tim
Tim
I haven't seen anyone willing to join
so far almost all my encounters are either I rek them or they rek me
IIRC you can hire mercenaries from some dude
otherwise I remember Octavia being decent if you've seen her yet
@DaveS It is common to have a single view holder for multiple item view layouts? In my imagination (that may be wrong), a single view holder is tightly coupled to one item view layout. :-)
Tim
Tim
I don't know any of that. I only found the outpost where you find the first shop, and after that I traveled to a few places because I thought my next quests were there but life has not been easy
21:44
Regongar is another decent one, I think he's the class that I made my main guy
haha
Tim
Tim
also having a really hard time keeping my dudes above 'almost dead' levels of hp
don't you kind of explore the map down paths? you've probably taken the wrong paths
idk how to help here tbh
I gtg drum I'll ttyl! let me know how you make out tim.. I remember running into octavia and regongar somewhat early-on
not super early but somewhere in the first major area or two
Tim
Tim
bro there are literally 2 quests, one (chasing the traitor) lead me to that place where I died 20 times, I left that and now looking for where I am supposed to be for the other one
also being evil and saying 'fuck you, die bitch' to everyone you meet doesn't make it any easier xD but gotta stay in character
22:02
hi
Tim
Tim
wassup g-stick
nothing much
wanted to check if the room's still dead
Tim
Tim
yep
how you doing
22:20
@LetMeBeYourLostDisciple it's common for larger apps with multiple layouts for different screen sizes to have different versions of the same component that use the same data. The view holder in this case is just used to set the data on the view, it's layout agnostic
if you tied inflation to the viewholder it becomes more difficult.
like the general principle behind all good programming is modularization and generalization so things are simple, dumb and only responsible for a few things to keep your project easy to debug and flexible
you're asking why don't we tightly couple more features because I can move a line a code into something. It doesn't make any sense
it doesn't even make it easier or save you any time
However, viewholder is often defined as an inner class of an adapter, is it still regarded as modularization?
just because something is often done a way doesn't mean it's the only way to do something
as an OS Android needs to support all use cases for robust, well done applications
OK. It is a good practice not to use inner class for ViewHolder, right?
it doesn't matter really unless you're doing something that the inner class makes difficult
you're completely missing the core point
moving the inflation into the viewholder offers no benefits and only restricts the use of it
It's like asking why don't they just combine functions into one big function
22:26
sure it is
it's actually exactly what you're asking
If ViewHolder is kept as inner class of an Adapter class, it seems to me there is no significant difference if I move the inflation to the ViewHolder. Why? We still need to modify in a single place if we want to switch to other layouts.
Why use a viewholder at all why not just find the view by your ID directly and set the data from your API resolver
@DaveS It is too big difference. It is not apple to apple comparison. :-)
> Layout inflation can be very time consuming due to hierarchy computation and a few other things, which is why android introduced a platform for RECYCLING views.

You create a view once and when it is out of use it can be recycled. So it just has to bind the data to the view.

A view holder is a wrapper for the view and it is the one that holds ref. to the view to be re-used. You can check out these single page tutorial on RecyclerView which is a more flexible and efficient version of ListView
I.E view holders are what enable you to recycle views by referencing fields and tying it to your data
inflating in the view holder defeats the purpose of that abstraction
By the way, thank you for your useful enlightenment. It is time to continue my learning. I need money immediately. I have a lot of bill to pay. :-) \0 And thank you for the quoeted info. I am reading it. :-) You are great!!!!
@DaveS However, I think the view obtained by inflating a layout XML is not a singleton for a RecyclerView, right?
Tim
Tim
22:36
@grrigore trying to figure out how exactly this game works
@LetMeBeYourLostDisciple it inflates as many views as it needs to, to display the data, but I believe it makes a ViewHolder for every item in the adapter
onCreateView is only 1 part of what a ViewHolder does, it also takes over a recycled view (I think)
if everytime you created a ViewHolder you inflated a view, you'd have more inflated views than you need
defeats the entire purpose of the recycler view
Tim
Tim
yes the same inflated views are re-used, and the viewholders are not, because they are the ones that decide what to do with the inflated view
I think I understood now. My previous understanding that is wrong is as follows.

- An inflated layout object should be a singleton as a template.
- **findViewById** will instantiate a widget based on the passed **Id**. The properties of the instantiated widget obtained from the single inflated layout.
@Tim is it fun?
Tim
Tim
yes but a lot more difficult than expected
22:50
Thank you very much @Tim and @Dave S. \0
Tim
Tim
I put the difficulty on 1 higher than normal and I'm getting dumpstered everywhere I turn
but it's good, feels better when you finally make some progress
nice man
I haven't played hots or smite
for a while
Tim
Tim
me too only played like 30 hots games this week
but no smoters

« first day (3932 days earlier)      last day (1239 days later) »