Skip to main content
6 votes
Accepted

Search filter for words in dart

I have tried make a more optimized version here which also will work for string of any sizes and any number of words: ...
julemand101's user avatar
4 votes
Accepted

Parameter guards for Firebase calls

So given this is a blanket rule across all the functions i.e. val === undefined then throw you could introduce a common validator function you could share across ...
James's user avatar
  • 567
4 votes
Accepted

Handling google authentication with firebase in nextjs web app

stop using recompose because it got deprecated and you don't need it if you use react hooks. transform your components and use react hooks because it's an anti-pattern to use them with class ...
Chamsddine Bouzaine's user avatar
4 votes

NoSQL data model design for players in a game

Okay, I don't think you need 8 root level stats collections. Instead one stats collection and create those 8 as sub collections. Keep in mind that you can't query across the sub collections. (Anyway ...
viggy28's user avatar
  • 141
3 votes
Accepted

Destroy Singleton pattern in kotlin

If you want a thread safe singleton in Kotlin, you should re-write your singleton like so: ...
Thomas Cook's user avatar
3 votes
Accepted

Managing Angular subscriptions

I suggest to use the first approach. You than can provide some pipes that could transform the returned values as you need. And if the articles are showed only in your component is better to store them ...
vnapastiuk's user avatar
3 votes
Accepted

Uploading photos of various sizes

You can chain those async methods using Promises. So the code will look like this: ...
Yakiv Kovalskyi's user avatar
3 votes

Uploading photos of various sizes

If Nesting You are nesting if's too much which quickly becomes ugly. I don't know your language but if at all possible negate the the conditions and return the ...
LiefdeWen's user avatar
  • 181
3 votes
Accepted

HackerNews news fetcher

newsUrlnewsURL, same for idsUrl. ...
Ted's user avatar
  • 701
3 votes
Accepted

Reduce amount of calls to database for authentication

I noticed something with this if statement that bothered me. ...
Malachi's user avatar
  • 28.6k
3 votes
Accepted

Creating json objects with undefined properties

To make your code a bit more accurate you could run a function before every call to firebase (this is the main reason you need it) and create a new object with only defined props ...
webdeb's user avatar
  • 528
3 votes

Controlling Finances with Web Development

Another thing I wanted to touch on is the formatting functions. For example, the deformat() function. ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
3 votes

Loading items for an eCommerce site

Here are a few things: good you're using ` (template literals) to format your HTML inside the JavaScript code don't use ...
Ivan's user avatar
  • 450
3 votes
Accepted

Destructuring with map and assigning to a constant

Super short review; Logging to console seems very primitive, consider a logging solution that handles different logging levels. ...
konijn's user avatar
  • 33.2k
2 votes

Creating json objects with undefined properties

JSON.stringify() seems to do exactly what you need. It will remove all functions and all undefined variables. ...
konijn's user avatar
  • 33.2k
2 votes

Parameter guards for Firebase calls

I guess if you just want to validate, you could write something like the following, though i'm not sure if that really answers your question. ...
Icepickle's user avatar
  • 825
2 votes
Accepted

Controlling Finances with Web Development

I know it has been more than two years since you posted this question so I apologize that nobody has supplied an answer yet. I also realize that you likely have learned a few things since then and I ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
2 votes

Maintainable networking layer architecture

I really dislike your FirebaseEndpoint enum. I would rather see something like this: ...
Daniel T.'s user avatar
  • 821
2 votes

Vue + Vuex + Firebase serverless realtime chat

The code looks pretty straight-forward and I don't spot any obvious simplifications. I would suggest that you add error handling - especially for the case when uid ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
2 votes
Accepted

Logging in to Android application using Firebase

Field visibility and encapsulation I think that fields of User can be also private. Instead of: ...
dshil's user avatar
  • 491
2 votes
Accepted

Angular Guards - Firebase loggedInAndVerified

Overall, code does not look very bad, especially for the beginner. There are a few things (some are stylistic in nature) which may help with readability and therefore with maintenance. Misc ...
Igor Soloydenko's user avatar
2 votes

Cloud Function: Deleting from both Firestorage and Firestore in a kind of "batch"

I must admit that I haven't really used firebase or done any android development and thus cannot answer your questions about the correctness of the code. I did wonder if using a transaction would help ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
2 votes

Managing Angular subscriptions

I think at the end it depends on the use case. For a simple loading of data, i would use the approach of getting the Observable directly. When the backendcall is not anymore the single source of ...
JanRecker's user avatar
  • 554
2 votes
Accepted

How can this swift, firebase image fetching, function be made more concise?

I would start by investigating the cases where you are performing if lets and basic unwrapping. Cases like if snapshot.value as? [String: AnyObject] != nil can be ...
jlowe's user avatar
  • 181
2 votes

ZooRater mobile app. This code is responsible for displaying and handling zoo dashboard. Need general advice

Anko commons I think Anko is dead, however, their library is still pretty useful. I would recommend commons, such that you can rewrite the activity-starting ...
tieskedh's user avatar
  • 822
1 vote
Accepted

Swift iOS rewrite a function that use Firebase database without updating a global variable

A typical way to write an asynchronous function is to have it take a function as an argument that will be called with the results when they are ready. Such a function is often called a completion ...
Shadowrun's user avatar
  • 251
1 vote

@angular/fire Firestore cached service

Browser localStorage has storage data limit about 5Mb. Better to use @ngx-pwa/local-storage https://github.com/cyrilletuzi/angular-async-local-storage. I've just tested it for storing one array of ...
Viacheslav Dobromyslov's user avatar
1 vote
Accepted

Updating text with JavaScript and Firebase

1. Leaking Between: window.setInterval(update, 100); And: leadsRef.on('value', function(snapshot) {...} You are adding a ...
Shaun H's user avatar
  • 567
1 vote

Simple networking layer in Swift using Strategy design pattern

What you have is not a Strategy pattern... The key features of the Strategy pattern is that once the Strategy object is inserted into the Context, it is not referenced from outside the Context. Your ...
Daniel T.'s user avatar
  • 821
1 vote

Populating a UITableView with staff members using Firebase data

First of all you are getting single response with all staff detail in single dictionary so Why you are filtering in different array ? Suggestion : You can use filtering on single dictionary with ...
CodeChanger's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible