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
5 votes
Accepted

Sending Firebase Cloud Messaging Notifications via FCM HTTP v1 API with PHP

I'm going to do this in steps so you can follow my train of thought: 1. Make it classy First, I would wrap everything in a class. Functions that belong together go together in a class (unless you have ...
Martijn's user avatar
  • 827
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

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
  • 34.3k
3 votes

Sending Firebase Cloud Messaging Notifications via FCM HTTP v1 API with PHP

I would be curious about performance gain if reusing an existing curl handle rather than init/close every time. Especially when there is a TLS handshake involved. I have not been doing much PHP for a ...
Kate's user avatar
  • 8,293
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

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

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
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
  • 991
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

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

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
  • 564
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
Accepted

Update user name within participants of chats

Data to load can likely be reduced Instead of loading the entire collection of chats one could load only chats with the participants containing the username - ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
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
  • 842
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 ...
Slava Dobromyslov's user avatar
1 vote
Accepted

React Native login, sign up and sign out using Firebase project

Review Overall the code looks decent. It seems the code is separated into components well, and indentation is consistent. It makes good usage of hooks, and const ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
1 vote

Destructuring with map and assigning to a constant

You asked about destructuring so I am going to review the destructuring bit only. Your after code looks fine. It's slighlty unconventional to destructure two separate things from a tuple you created. ...
Bens Steves's user avatar
1 vote

Destructuring with map and assigning to a constant

Just one small suggestion regarding the deconstruction: You can deconstruct function parameters, so it could be written as: ...
RoToRa's user avatar
  • 11.6k
1 vote

Angular observables piping

What do you mean with "efficient" in this case? From the performance perspective its slow, because it handles one element after the other and for handling one element it needs to wait for an ...
JanRecker's user avatar
  • 564
1 vote
Accepted

Private desktop and mobile WebSocket connections with Node.js

The code you made is looking pretty good. I'm no expert in the particular tools you're using, but I'll still give my two cents about the parts I understand more. Let's start with your upgrade listener....
Scotty Jamison's user avatar
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
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
  • 597
1 vote
Accepted

Swift UITableViewCell class to show cameras, ratings for a car wash and other information

here just my ideas how to improve your code. maybe in some points i am wrong, but this are the places i would dig into and make it a little better: 1) set Image only once ...
muescha's user avatar
  • 288

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