Ironfroggy_: i can share.

 
Mcinturff: Yeah yeah I know the rules lol Im not new around here, it’s just since Ive already asked this multiply times today and nobody responded I don’t wanna lecture again what’s wrong with it until I know there is actually someone who is available and would take a look at code, so just to save me times and copy pasting at first I just tell there is issue, if then somebody would want to take a look then I describe what’s wrong with it.

Tharpe: Though thanks for pointing that out pachet dmarr

Padro: It’s the first time I’m doing a SPA, and my code is getting a bit unwieldy already

Narciso: Any pointers to good practices

Otsuka: Design patterns or whatever these are called nowadays

Matzek: RonRichie, well, I think it is working correctly. “some” uses “every”, “every” fails on the first element of the array because it isn’t true.

Dewoody: Agent but all my array elements seem to be truthy values? 1,2,3,4,5,6,{},true so I think every should p*** this as well?

Jeffress: Tomorrow__: the fundmental design pattern is 1 write it wrong, 2 have regrets, 3 optional rewrite it better

Jeffress: Tomorrow__: another way of putting it, from Fred Brooks: “Write one to throw away — you will anyhow”

Krizek: Agent well, then even if I change the test to something else, like this https://repl.it/BHDQ/1 it still doesn’t p*** which Im sure it should have p***ed it, since test asks an element that is greater than 2 and i’ve number 1 in my array, so some should p*** this test then?

Schmertz: What’s this expression called? can’t google symbols “a 0.5 ? something : something_else”

Mleczko: Everything looks good on paper

Accetta: But then when I dive in I come across issues and have to hack around them

Tomkus: Not pretty and not solid code either :

Mulkins: What I do is just write everything as one long function

Mulkins: Then I retroactively apply design

Ulatowski: Tomorrow__: are you writing a test suite?

Mchale: RonRichie, “some” is relying on “every” to do its work. That’s the problem. Those two are virtually opposite.

Nipp: Looking into browserify at last

Sheilds: I seem to have gotten it to work with a single script loading jQuery

Alyea: I have no idea how to utilize it when I have multiple scripts that don’t necessarily depend on eachother though

Zehner: Dmarr: I’m completely clueless when it comes to testing Javascript, what do you test and what do you use to test it?

Torrisi: Hey all, i’m getting an “Unexpected token ILLEGAL” error in Chrome when this string is being rendered to a JSON object “scriptfunction{alert’hello world’;};/script” — why is that?

Ulatowski: Tomorrow__: i use mocha+karma

Mcclaren: Dshap: what does “rendered to a JSON object” mean?

Wrigley: Dmarr: does that work with React?

Armagost: Do I write a script that only requires all my other scripts, before letting browserify process it?

Bean: Agent yeah I realize they are opposite things, but logic works, every checks for an element, p***es it to some and then some checks with an if condition if that meets test implemented by some so i continuously loops through with every and checks the condition with if statement in some, doesn’t sound right?

Gibeau: ThePendulum: its kind of common to have some sort of ‘main’ script yes

Ulatowski: Some stuff my company is working on https://github.com/Crowdtilt/tilt-web-style-guide

Mulkins: Ironfroggy_: probably “serialized”

Buddemeyer: Ironfroggy_: sorry that wasn’t very clear…i’m creating a JSON object literal and when i include that string it breaks, but if i change that string to “test” then it doesn’t break. I’m trying to understand the reason for the error

Sagastume: Ironfroggy_: I have one for my back-end, I guess I need the same front-end then. So then I have one collector script and then one that’s the output of browserify?

Ciuffreda: Ironfroggy_: i can share the whole line if it’d be helpful, can pastebin it