« first day (2814 days earlier)      last day (2356 days later) » 

05:22
morn
 
1 hour later…
06:46
Anyone who is good in reactjs ? Please help me here -> stackoverflow.com/questions/51112404/…
 
3 hours later…
09:25
its interesting that most website it doesnt pick up angular/react
still the vast majority is plain js. Can you guys believe this?
also some of the angular websites it suggests are actually now react
 
6 hours later…
15:04
i mean... react/angular is more often used in intranets and apps
not websites
websites are still dominated by bootstrap/wordpress, both of which come with jquery
 
1 hour later…
16:16
@Permian the lack of frameworks on a lot of sites is actually really good news
imagine a duopoly by a couple of frameworks
17:04
@KevinB about the subdocument thing we were talking about yesterday, if I want to specify a single item instance, it means I need to add a virtual ID to each one, and then query the larger item by it, right?
or maybe I should query them by what I'm grouping them by
even if that's 2 different fields (expiry date and location)
17:34
Hi all, How can I skip over empty arrays in javascript. I am calculating sum but due to empty array I am getting sum = NaN
we're going to need more context
ohhi
no idea
uh, for empty arrays, if the array length is 0, use 0
sum = arr.length && arr.reduce(sum) || 0
also @KevinB how do you efficiently deal with validating to make sure some things aren't duplicates with a meaningful output?
i'm not sure
I have an api thing in which the user sends in a json array with a bunch of sales, which should be unique by name
17:38
i haven't dug too deeply into mongoose/mongodb in... 5 years now?
@KevinB damnit. Thanks anyway
@KevinB In screenshot as you can see there are some empty array so each array has 3 parameters totalCaught, totalRunout, totalStumps
I am getting NaN check bottom of screenshot
@stonerock how are you calculating the sum?
right
17:40
different methods yield different results
let dismissals = this.props.fielddata.playerRecords.reduce( (a,{season, fielding})  => {

        console.log(fielding);

            if(!a[season]){
                a[season] = { sum:0 };
            }

            if(fielding.length === 0){

              a[season].sum += (fielding.totalCaught + fielding.totalRunout + fielding.totalStumps);

            }


            return a;
        }, {});
@KevinB Here is above code.
Right
Sum is addition of all 3 parameters
why is that nan?
0 + 0 is 0
I am getting NaN values for them why so ?
For each season eg: 2017 I am calculating the sum using reduce()
17:42
are you sure sum is always 0 before you begin?
what are you logging?
that calculation won't create NaN
@towc console.log(dismissals);
what does the unreduced array look like?
the only way to create NaN with addition is if you already have NaN, or if one of your values are undefined
17:43
console.log(dismissals); is outside reduce and console.log(fielding) shows all the content of fielding i.e empty or with those 3 parameters
and what's that first log I'm seeing?
because undefined + 0 is NaN
so if that first thing is part of the fieldings, you're going to get NaN
@towc Ignore that log it has nothing to do with my problem
you have undefined somewhere
show us a log of the actual array
before reducing
It is very large will not fit inside screenshot :)
17:46
but the devtools will show a summary
or use pastebin
@towc Check it
PlayerRecords have fielding and that fielding array is either empty or has 3 parameters
ooh, I see
you want if (fielding.length > 0) { instead
but that doesn't explain how you got 5 at one point
oh wait
no
you want if (!Array.isArray(fielding)) {
probably
either way, your current check is saying "if the item has a length and it equals 0, then do the sum with the properties", but that means "if item is an empty array, do the sum"
so if (fielding.length !== 0) { would also work
 
2 hours later…
20:05
Hey Guys,
I am trying to build an apk from my ioniv v1 app
But it gives me this error
'c:\windows\system32\node' is not recognized as an internal or external command,
operable program or batch file.
20:33
@towc yes but do most websites even need more than jquery?
depends on how you define most
and need
and more
@towc what wappanalzer gives me
actually, websites too
never heard of that
webapps are still a mystery to me
theres almost too much choice
you can't go by that
the majority of websites are put together by cheap dev teams throwing together wordpress themes/sites, and wordpress typically uses jquery. so jquery is obviously going to come out on top
that plus bootstrap
which also comes with jquery
they're just really cheap and quick to get running
but they're terribly designed most the time from a code pov
20:49
@KevinB ok
that and how many of those sites were built 8 years ago and never touched since
21:06
@KevinB yeah i see
my guess is most registered domains don't even have a dedicated frontend
if you count sites to be active domains, most sites probably don't even need javascript
not sure that's relevant
21:35
what is the easiest
what is the easiest way to grab PUSH ID from firebase
its driving me insane, smfh
@towc what does this mean?
@towc yeah also im not talking about shit sites
how do you define non-shit sites?
ones that look professional
define that
anything like booking.com
21:39
where do you put copy.sh
ebay
@Permian a lot of people would say that's a shit site
really why?
it looks good and makes lots of money
the design is fairly bad
depending on who you ask
if i could make seomthing like that i would be happy
21:41
oh, sure
that doesn't mean it's up to standards
@towc ok im not intersteed in "those" standards
so, again, where do you put copy.sh?
is that a shitty site?
@towc is this yours?
no
i could build that
but no it doesnt look pro
21:44
so does it mean it's shitty?
not pro
well yes
it looks like i could have made it
so anything you could do is shitty?
that's not a valid metric
why not?
21:45
the shared perception of quality of things can't depend on your personal current skill level
haha
i have only just realised this is true
now, take a look at this: makefrontendshitagain.party
so?
i could have made a website in the dotcom boom
is it shit?
by nowaday's standards
21:48
it's made using nuxt, which is server side rendering (written in node) for vue
oh no, it's totally shit
maybe shit isnt the word
but it uses modern technologies
but not what you would expect from a modern looking website
right click is disabled on that last website
other point is that quality of websites is also sometimes independent of the technologies used
there are trends
but you really don't need JS to make good frontends
so what takes a webiste from looking like copy.sh
to something like booking.com
?
21:50
js is mostly not about the looks
it's about functionality
22:03
@towc so what makes the looks
sure, a bit of JS too
there's UX, which a lot of the times is better implemented with JS stuff
yeah i get that
its taking that leap from copy.sh websites to booking.com quality
they do different things
you can have a pretty damn good site in php
without any JS involved
> good [...] php
Sounds good, doesn't work.

« first day (2814 days earlier)      last day (2356 days later) »