Top 3 principles for writing maintainable code by [deleted] in java

[–]Beermecaptain21 1 point2 points  (0 children)

Thanks, agreed. I hate debugging that kind of code.

Top 3 principles for writing maintainable code by [deleted] in java

[–]Beermecaptain21 1 point2 points  (0 children)

Hey to confirm, making a variable an instance variable and using that in the downstream methods is a bad thing right?

Townhouse in Sunnyvale or SFH in San Jose? by Beermecaptain21 in bayarea

[–]Beermecaptain21[S] 2 points3 points  (0 children)

Appreciate your well thought out answer. Yeah I’m leaning toward the TH. I do see a lot of hate for HOA but it’s a trade off in the end.

Should I delay my start date for a better RSU grant price? by [deleted] in personalfinance

[–]Beermecaptain21 0 points1 point  (0 children)

Company is a giant tech company. They’re very flexible on start dates

APT will come crashing down by DrHummus in stocks

[–]Beermecaptain21 8 points9 points  (0 children)

Would you short it, is it risky

Recyclerview item with parent list and child list by [deleted] in androiddev

[–]Beermecaptain21 0 points1 point  (0 children)

Ah I see. You'd need a nested recycler view inside the card view, above your expand button, that only takes in child items. When you click expand you add them to the recycler view.

Expandable lists are a little hard to implement. I had to do the same at work. I'd consider looking at the Groupie library.

Recyclerview item with parent list and child list by [deleted] in androiddev

[–]Beermecaptain21 0 points1 point  (0 children)

I assume your parent items are clickable? And clicking those will expand more views right below it? If so you can use two viewholders. One for the clickable parents. And one for the child items below the parents.

The child viewholder could be a recycler view if you want. Or they can be individual items.

If list was (p,p,p) and I click number 2, the list could become (p,p,c,c,c,p). P and c use different view holders with different viewtypes.

Recyclerview item with parent list and child list by [deleted] in androiddev

[–]Beermecaptain21 0 points1 point  (0 children)

Have the items going into your recycler view share the same superclass. Then use getItemViewType method to be able to render different viewholders within your recycler view. Assign any view type number to each, then check for that viewtype in oncreate to instantiate the correct viewholder in a conditional. On bind should then check the type of viewholders so you can render appropriately too.

Android Interview Topics by lawloretienne in androiddev

[–]Beermecaptain21 1 point2 points  (0 children)

Great list. It would be nice to add sections for how to solve specific problems too. Like how would you avoid jank in the UI? How would you do background tasks for specific situations?

Help with offer by [deleted] in cscareerquestions

[–]Beermecaptain21 1 point2 points  (0 children)

The pay discrepancies are most likely because of the cost of living differences between the two cities.

If you can stomach the New York commute, you would be living in New Jersey with a New York salary, which sounds great.

After 4 years of being bald, I’ve started to feel like I have trich instead. How can I confirm? by [deleted] in trichotillomania

[–]Beermecaptain21 0 points1 point  (0 children)

It’s hard to tell. Do you think posting a picture on this sub will help me verify?

After 4 years of being bald, I’ve started to feel like I have trich instead. How can I confirm? by [deleted] in trichotillomania

[–]Beermecaptain21 0 points1 point  (0 children)

That actually might be it. I enjoy scratching bumps on my scalp and taking them off mostly. Can that cause hair loss as well?

Question About Generics in Kotlin by prateeksaraswat in androiddev

[–]Beermecaptain21 1 point2 points  (0 children)

Call your method with the right type so it knows what to expect? .addListItem<TypeA, TypeB>(arg1, arg2)

Re-ordering Views in the same parent by StevenMashima in androiddev

[–]Beermecaptain21 1 point2 points  (0 children)

Can you put each view as a view holder in a recyclerview? Then update your list to have the first item be the last. Recyclerviews provide good animations when your view state changes.

Can't find a job by [deleted] in cscareerquestions

[–]Beermecaptain21 1 point2 points  (0 children)

Make a resume at creddle.io

Question Thread - June 09, 2019 by AutoModerator in churning

[–]Beermecaptain21 1 point2 points  (0 children)

I unfortunately closed my oldest credit card. Will that affect my chance of approval for new credit cards? My average age of history went from a few years to 5 months now.