These are chat archives for FreeCodeCamp/HelpJavaScript

18th
Jun 2018
jusgoose
@gusd773
Jun 18 2018 00:17
can anybody tell me what ".offsetTop" does? I am using the w3 school's template for a sticky nav but I am having trouble with it. This is my nav before
image.png
after I add in the ".sticky" class
image.png
Thomas Tylek
@zippkidd
Jun 18 2018 00:31
@gusd773 that sounds like jQuery.
It's commonly used with the .animate function IIRC
Hmm so in your case it looks like .offsetTop is getting the vertical positioning of the header element.
"Get the offset position of the navbar"
what are you having trouble with, what are you trying to do?
jusgoose
@gusd773
Jun 18 2018 00:36

@zippkidd I just wanna scroll down without the centered content moving up in the 2nd pic,
I want it to stay in place like the first pic

yea it probably is jquery I'm still newbie ish

but I get what it's doing I understand js pretty well
Thomas Tylek
@zippkidd
Jun 18 2018 00:37
Wanna share the actual codepen link here?
So you want the "Household & Commercial Business... etc." to stay in place? Like fix it to the bottom? In that case add CSS to that element and do the same thing as the navbar but instead something like {position: fixed; bottom: 0;}
Thomas Tylek
@zippkidd
Jun 18 2018 00:44
Or make it something like bottom: 30%; if you want that element to stay centered on the screen when you scroll
jusgoose
@gusd773
Jun 18 2018 00:48
@zippkidd have at it lol https://codepen.io/gusd773/pen/aKyepO
Thomas Tylek
@zippkidd
Jun 18 2018 00:48
So I gave your codepen html, body {height: 200vh;} to give some scrollable whitespace to showcase what you're looking for, then #under-nav {position: fixed; bottom: 15%;}
I hope that helps.
Thomas Tylek
@zippkidd
Jun 18 2018 00:53
Hmm it seems like you've got it figured out already but with top: 40%;
jusgoose
@gusd773
Jun 18 2018 00:54
@zippkidd yea so I added the height to the body and just added alot of padding to the top of the "under-nav" div
Thomas Tylek
@zippkidd
Jun 18 2018 00:55
Cool, so is it the way you want it now?
I'm not sure that I'm understanding what you're trying to accomplish
jusgoose
@gusd773
Jun 18 2018 02:33
@zippkidd that's what I was trying to do now I just have to remove the opacity from the logo , title and nav menu
if anybody can help with that^ i'd appreciate it
jusgoose
@gusd773
Jun 18 2018 04:22

how does one stop the abrupt jump in my scroll my page is experiencing?

https://codepen.io/gusd773/pen/aKyepO

Claudio Restifo
@Marmiz
Jun 18 2018 04:48
@gusd773 which one are you talking about?
jusgoose
@gusd773
Jun 18 2018 04:49
@Marmiz after I scroll my 'under nav' section settles differently
after scrolling down and back to the top:
image.png
with refreshed page before scrolling :
image.png
Claudio Restifo
@Marmiz
Jun 18 2018 04:51
@gusd773 oh, that's just because you don't remove the stickyness
Shubham soni
@shubhamsoni2617
Jun 18 2018 06:06
@tiagocorreiaalmeida and @zippkidd Thanks, I should have recalled the scope concept.
abraham anak agung
@padunk
Jun 18 2018 09:04
Hi all, i try to implement FP and currying. How to write the last code? not(isVowel)
const isEven = int => int % 2 === 0;
const isBiggerThan = int => val => val > int;
const plus = int => val => val + int;
const toChar = int => String.fromCodePoint(97 + int);
const not = str => val => str.map(s => val !== s);
const isVowel = ['a', 'i', 'u', 'e', 'o'];

[1,2,3,4,5,6,7,8,9,10]
.filter(isEven)
.filter(isBiggerThan(3))
.map(plus(1))
.map(toChar)
.filter(not(isVowel))
// .join('');
Claudio Restifo
@Marmiz
Jun 18 2018 09:36
@padunk I'd change how the not works as: return the opposite of this function
and isVowel to a function that return a boolean

so that filter(isVowel) will return an array of vowels.

and filter(not(isVowel)` will negate all the isVowel === true

this is maybe easier to achieve. Once you have it, it's done :)
[1,2,3,4].filter(isEven) // [2,4]
[1,2,3,4].filter(not(isEven)) // [1,3]
abraham anak agung
@padunk
Jun 18 2018 09:42
@Marmiz ah, i got what you mean. I'll try that. Thanks.
Claudio Restifo
@Marmiz
Jun 18 2018 09:45
:+1:
abraham anak agung
@padunk
Jun 18 2018 09:55

@Marmiz solved it like this

const not = func => val => !func(val);
const isVowel = str => /[aiueo]/i.test(str);

is FP really useful in real world programming?

Claudio Restifo
@Marmiz
Jun 18 2018 10:42

@padunk my not.
same but ready for multiple args:

const not = func => (...args) => !func(...args);

I am not nearly as good as I'd like to be in it, but I'd say has its usage.
Especially in larger application you'll eventually have a utils or helper functions sections.

Well, that's your FP right there :smile:
I mean, lodash has a whole FP section
https://github.com/lodash/lodash/wiki/FP-Guide

abraham anak agung
@padunk
Jun 18 2018 10:58
@Marmiz neat, never tought about multiple arguments. Yes i know lodash FP, but never take a look into it. Thank you btw. Dinner time here, waiting for another world cup kick off. :smile:
Claudio Restifo
@Marmiz
Jun 18 2018 11:05
no Italy in the WC :cry: cry: cry:
Mel Macaluso
@MelMacaluso
Jun 18 2018 11:07
off-topic: mi sa stranissimmo vedere italiani scrivere javascript
non tutto e' perso allora :joy:
Simon Cordova
@gbsimon87
Jun 18 2018 11:25
Hey all, was wondering if I could get some help.
Generating a table in React, I have a number of categories as table headers.
Underneath, in the table body, I iterate and get the table rows with the names of the players.
I'd like to fill in the table rows with table cells that to match the amount of categories up top.
I hope that makes sense, here is an image to illustrate.
Screen Shot 2018-06-18 at 12.21.19 PM.png
Blauelf
@Blauelf
Jun 18 2018 12:04

@gbsimon87 Any content for the cells? I haven't done any React, but I guess you should be able to map an array to table data elements.
I guess something like that might work

var tableHeaders = ["Name", "Num1", "Num2"];
var tableData = [["Meh", 23, 42], ["Blerg", 47, 11]];
ReactDOM.render(
  <table>
    <thead>
      {tableHeaders.map((s) => (<th>{s}</th>))}
    </thead>
    <tbody>
      {tableData.map((row) => (<tr>
        {row.map((cell) => (<td>{cell}</td>))}
      </tr>))}
    </tbody>
  </table>,
  document.getElementById('impl')
);

(as I said, I haven't done any React yet, so indentation probably looks way off)

If you don't have content yet, you could map the headers to empty cells.

Simon Cordova
@gbsimon87
Jun 18 2018 12:05
@Blauelf thanks a lot, that's just about the implementation I came up with actually
Was having a tough time with the syntax though
Blauelf
@Blauelf
Jun 18 2018 12:06
I find the number of different parentheses/curly braces/HTML tags I used confusing. Having the closing one for each at the right place is quite a challenge.
Simon Cordova
@gbsimon87
Jun 18 2018 12:23
@Blauelf This is how I got it done.
If you have a moment, could you give some insight as to whether the consts 'tableHeaders' and 'tableBody' have good ES6 structure?
image.png
Blauelf
@Blauelf
Jun 18 2018 12:27
Don't know, but since your anonymous functions start with return, I'd use (params) => (value) instead of (params) => { return (value) }. Not sure what is considered good JSX style, as I haven't done any before.
Simon Cordova
@gbsimon87
Jun 18 2018 12:37
Fair point on the return thank you
koder3
@koder3
Jun 18 2018 13:20
hi any clues on how to make [ [[1, 2, 3]], [[2, 5, 6]] ] into [[1, 2, 3], [2, 5, 6]]
Blauelf
@Blauelf
Jun 18 2018 13:31
Where did you get that? (obviously, a .map(a=>a[0]) would do, but maybe something went wrong before that?)
I mean, is it always an array of arrays containing exactly one array each?
koder3
@koder3
Jun 18 2018 13:34
I was trying to solve this challenge in a different way instead of using the method I used before to solve the challenge. So yeah something did go wrong perhaps haha
Can you explain what .map(a=>a[0]) does please
Blauelf
@Blauelf
Jun 18 2018 13:36
Which one? Chunky monkey?
koder3
@koder3
Jun 18 2018 13:36
oh ps it was in the basic data structure challenge
Im guessing it just puts each index into an separate array?
Blauelf
@Blauelf
Jun 18 2018 13:48

.map(a=>a[0]) creates a new array of first elements. Like [[23, 42], [47, 11]].map(a=>a[0]) results in a new array [23, 47].

But it seems as if you are not supposed to use array methods other than maybe push and indexOf. At least my solution with filter wasn't liked by the tester. Well, the tester can easily be tricked as it just searches for a substring for :P (which is not how I am supposed to use the site, so I'm essentially cheating myself)

Aditya
@ezioda004
Jun 18 2018 13:51
@koder3 Loop through the nested array, check if the arrays have the elem in it, you can check that by using indexOf, includes method, if you want to do it natively then you'll have to use another for loop to check elem in the array.
koder3
@koder3
Jun 18 2018 13:59

@ezioda004 Yeah already did that before, thanks anyway!

I was trying to solve this challenge in a different way instead of using the method I used before to solve the challenge. So yeah something did go wrong perhaps haha

@Blauelf I see. Thanks. Yeah that's actually very interesting, I didnt know fcc would just ""search for a substring"".
Blauelf
@Blauelf
Jun 18 2018 14:03
I cheated using return arr.filter(information=>!~information.indexOf(elem)); (which uses word "information" just because it contains "for", that tester should really use /\bfor\b/ instead of /for/, and even then it could be tricked by comments)
koder3
@koder3
Jun 18 2018 14:04
Wow! you sound genius xD
Blauelf
@Blauelf
Jun 18 2018 14:05
I somewhat enjoy breaking stuff.
koder3
@koder3
Jun 18 2018 14:05
Don't tell me you're a ethical hacker haha
Blauelf
@Blauelf
Jun 18 2018 14:06
Currently working as a tester.
koder3
@koder3
Jun 18 2018 14:07
Nice.

Maybe you should point that out to fcc in github somewhere

I cheated using return arr.filter(information=>!~information.indexOf(elem)); (which uses word "information" just because it contains "for", that tester should really use /\bfor\b/ instead of /for/, and even then it could be tricked by comments)

Blauelf
@Blauelf
Jun 18 2018 14:19
As I said, it could still be tricked easily, so maybe if I find the time, but it won't find everything. I made similar pull requests before, GitHub has some feature that doesn't require you to fork the project for a single file changed.
Shubham soni
@shubhamsoni2617
Jun 18 2018 15:02
let x=['A','A'];
function cardScore(card){


    switch(card){
        case 'A': return 1;
        case '2': return 2;
        case '3': return 3;
        case '4': return 4;
        case '5': return 5;
        case '6': return 6;
        case '7': return 7;
        case '8': return 8;
        case '9': return 9;

       default: return 10;
    }
  }
  function getScore(CardArray){
    let score=0;
    let hasAce=false;
    for(let i=0;i<CardArray.length;i++){

      score+=cardScore(CardArray[i]);
  if(CardArray[i]==='A'){
    hasAce=true;
  }
 }
   if(hasAce&&score+9<=31){
     return score+9;
   }
    return score;
  }
console.log(getScore(x));
I wish to get 20 instead getting 11, why so?
Nate Mallison
@NJM8
Jun 18 2018 15:10
I think you just need some spaces in you last if statement
and parens to do the math first
Jason Luboff
@JLuboff
Jun 18 2018 15:11
Ya definitely need a space after hasAce and before/after &&
Nate Mallison
@NJM8
Jun 18 2018 15:11
(hasAce && ( score + 9 ) <= 31 )
Shubham soni
@shubhamsoni2617
Jun 18 2018 15:21
@NJM8 and @JLuboff still getting 11.
Christopher McCormack
@cmccormack
Jun 18 2018 15:27
Why wouldn't it? Your logic will increment score twice by one (2) then returns score+9 (11)
@shubhamsoni2617 you should walk through your logic slowly and determine what the values in your variables are at the time to determine where issues might be. You can also log the variables within loops or conditionals to see if maybe something different is happening then you expect so you can figure out what you may have done wrong
Jason Luboff
@JLuboff
Jun 18 2018 15:37
Ya I didn't go much more through it than that lol but @cmccormack added some good points
jusgoose
@gusd773
Jun 18 2018 15:38
does anybody know how I can get my nav bar div to not apply opacity to it's children elements?
https://codepen.io/gusd773/pen/aKyepO
Christopher McCormack
@cmccormack
Jun 18 2018 15:39
@gusd773 don't use opacity
jusgoose
@gusd773
Jun 18 2018 15:40
@cmccormack is that played out? I saw using the rgb background color thingy but I felt like being sneaky and not using it
Christopher McCormack
@cmccormack
Jun 18 2018 15:40
@gusd773 maybe use this instead
/*   opacity: .7; */
  background: rgba(204, 204, 0, 0.7);
Using opacity will affect the view of all children, so better not to use it unless you want everything to be semi-transparent
@gusd773 since you're just making it lighter by making it transparent, maybe try using hsl instead and adjusting the lightness value
background: hsl(60, 100%, 43%); would be similar
Jason Luboff
@JLuboff
Jun 18 2018 15:45
@cmccormack Good weekend?
Christopher McCormack
@cmccormack
Jun 18 2018 15:46
@JLuboff yeah man a couple father's day dinners and a little coding
yourself?
Jason Luboff
@JLuboff
Jun 18 2018 15:47
Ya pretty good. Wife bought me a grill for fathers day, so put that together and had a tasty meal. Saw all the fathers on Friday/Saturday. Then went to Ikea yesterday hah
Christopher McCormack
@cmccormack
Jun 18 2018 15:48
That couldn't be more middle class suburby if you tried! haha
Maybe if you wore a 'kiss the cook' apron while flipping burgers
Jason Luboff
@JLuboff
Jun 18 2018 15:48
Haha I know
Christopher McCormack
@cmccormack
Jun 18 2018 15:48
Sounds like fun though, I love going to Ikea :D
Jason Luboff
@JLuboff
Jun 18 2018 15:48
But... I've been wanting one for a while and my wife surprised me with it
Ya Ikea can be fun, we bought a TV Stand (the main reason we went) along with a bunch of other things we may or may not have needed
Christopher McCormack
@cmccormack
Jun 18 2018 15:49
haha probably not
Nate Mallison
@NJM8
Jun 18 2018 15:50
@shubhamsoni2617 You are only adding the 9 points for the ace once per array, so the answer 11 here makes sense, two aces for 1 point each plus 9 for having an ace, if you want to add 9 point for each ace add those 9 points to the score directly.
or better yet if you are always going to add 9 for each ace just make the ace score 10
Christopher McCormack
@cmccormack
Jun 18 2018 15:52
@JLuboff we actually bought all of our kitchen cabinets through Ikea - very good quality and pretty easy to setup, all things considered. I'd do it again
Jason Luboff
@JLuboff
Jun 18 2018 15:54
@cmccormack The quality of there stuff isn't too shabby. Its not going to be the best thing ever, but for the price can't really argue. We had been looking else where (target, big lots, etc) for something that wasn't overly expensive but had glass doors and had trouble. With Ikea we were able to customize a solution that we can add to later on if we'd like*
Christopher McCormack
@cmccormack
Jun 18 2018 15:54
Yeah that's the great part
Jason Luboff
@JLuboff
Jun 18 2018 15:58
Now we just have to wait for it to arrive (Wednesday) and see if our marriage can survive the dreaded Ikea furniture build
Christopher McCormack
@cmccormack
Jun 18 2018 15:58
I never found it to be an issue. My guess is it's new couples in a cheap apartment that discover they didn't actually like each other to begin with :D
Jason Luboff
@JLuboff
Jun 18 2018 16:01
Ya it'll be fine :smile:
Nazar
@IsaakNazar
Jun 18 2018 16:06
hey guys, what tools do you usually use when you make detailed planning of a project?
Jason Luboff
@JLuboff
Jun 18 2018 16:07
@IsaakNazar I've used Microsoft Visio to create a flow chart to visualize the flow of the application (not sure if thats exactly whatyou're asking though)
Nazar
@IsaakNazar
Jun 18 2018 16:07
@JLuboff yeah, I mean to visualize project as a diagram before start to code
or smth like that
@JLuboff ok, thanx
Jason Luboff
@JLuboff
Jun 18 2018 16:08
Ya...thats what I've used but... it's also a rather expensive program just to use for that..
Shubham soni
@shubhamsoni2617
Jun 18 2018 16:09
@cmccormack Thanks, working on it.
Christopher McCormack
@cmccormack
Jun 18 2018 16:09
I've used https://wireframe.cc/ recently, it's alright
Nazar
@IsaakNazar
Jun 18 2018 16:09
@JLuboff @cmccormack you guys work on a company, and use this kind of tools?
Christopher McCormack
@cmccormack
Jun 18 2018 16:10
@IsaakNazar You didn't really specify what kind of project
I don't work in the web development industry though
Jason Luboff
@JLuboff
Jun 18 2018 16:10
@cmccormack My wife has used similar in the past for creating basic web designs for clients
Christopher McCormack
@cmccormack
Jun 18 2018 16:10
I do use Visio for project that I work on
Nazar
@IsaakNazar
Jun 18 2018 16:10
@cmccormack web development projects, to be precise
Jason Luboff
@JLuboff
Jun 18 2018 16:11
@IsaakNazar I did that for a project I am working on at work currently, yes.
Nazar
@IsaakNazar
Jun 18 2018 16:12
@JLuboff @cmccormack gotta check those tools, thanx
koder3
@koder3
Jun 18 2018 16:12
does anyone know how to disable auto complete in fcc editor?
Shubham soni
@shubhamsoni2617
Jun 18 2018 16:12
@NJM8 I wish I could add 10 directly. However, I am not intended to it.
Actually, I am writing BlackJack and trying to put value of A either 1 or 10, whichever is required.
Christopher McCormack
@cmccormack
Jun 18 2018 16:14
Should be 1 or 11 @shubhamsoni2617
Jason Luboff
@JLuboff
Jun 18 2018 16:15
And should be the option of the player, no? Unless it's blackjack.
Or is it auto 11 unless it would go over 21?
Christopher McCormack
@cmccormack
Jun 18 2018 16:16
That's what I would assume
Jason Luboff
@JLuboff
Jun 18 2018 16:16
It's been a while since I've played blackjack
Ayush Bahuguna
@relentless-coder
Jun 18 2018 16:18
Hey, I need help with a react issue
    showAnswer(id){
        let faqs = {...this.state.faqs};
        faqs[id].showAnswer = true;
        console.log(faqs);
        this.setState({faqs});
    }
this is really freaking me out, faqs[id] is not getting updated
Shubham soni
@shubhamsoni2617
Jun 18 2018 16:19
@cmccormack and @JLuboff
I have never played BlackJack, watched a video on youtube, I think he said 1 or 10.
Let me reconfirm that.
Christopher McCormack
@cmccormack
Jun 18 2018 16:19
I've played it plenty, it's 1 or 11
Jason Luboff
@JLuboff
Jun 18 2018 16:20
Ya I agree, definitely 1 or 11
Shubham soni
@shubhamsoni2617
Jun 18 2018 16:20
@cmccormack Alright! Thanks.
@relentless-coder So jaa.
Ayush Bahuguna
@relentless-coder
Jun 18 2018 16:21
@shubhamsoni2617 which problem are you trying to solve?
Shubham soni
@shubhamsoni2617
Jun 18 2018 16:25
@relentless-coder Pluralsight first lecture.
The author is writing BlackJack. so I thought giving it a shot without watching his tutorial. Though, my code works but it is complete mess.
Now, trying the other way round.
Jason Luboff
@JLuboff
Jun 18 2018 16:25
@relentless-coder Does id exist? I don't know react...but I would check that at least
Ayush Bahuguna
@relentless-coder
Jun 18 2018 16:26
@JLuboff yes, id exists. It's more of a react issue. I mean, I am doing something wrong.
Christopher McCormack
@cmccormack
Jun 18 2018 16:28

@relentless-coder react won't necesarily update when you simply modify an object - you should instead provide a new object:

...
this.setState({ faqs: { ...faqs } });

should do it I believe

You can also use Object.assign
My understanding is React looks at the value you passed to setState and if it's the same value it does not update. Because an object is a reference to a memory location, even if you change the object, the reference is still the same. Providing a new object will also change the reference location thus forcing an update
If you really wanted to ( I don't recommend ) you could also use the shouldComponentUpdate lifecycle method
Ayush Bahuguna
@relentless-coder
Jun 18 2018 16:30
@cmccormack no that didn't work. Actually, i was trying out a different way to store data in state. I have an array of objects, instead of storing the array, I am storing in form key value pairs. Each object contains a _id, so my state is
{
    faqs: {
         _id: Object,
   }
}
Christopher McCormack
@cmccormack
Jun 18 2018 16:31
@relentless-coder what didn't work? unless you're not using your state it should work if you pass a new object to setState
Ayush Bahuguna
@relentless-coder
Jun 18 2018 16:32
Object.keys(faqs).length > 0 ? 
Object.keys(faqs).map((el, index)=> <FaqCard handleChange={this.handleChange} updateFaq={this.updateFaq} faq={faqs[el]} key={el} showAnswer={this.showAnswer}/>) 
: <h3>No faqs found.</h3>}
this is how I am rendering my component
@cmccormack
Christopher McCormack
@cmccormack
Jun 18 2018 16:34
you're not referring to your state object at all
unless you're just not showing it
Ayush Bahuguna
@relentless-coder
Jun 18 2018 16:34
I am not showing it.
let faqs = {...this.state.faqs}
@cmccormack i just checked with shouldComponentUpdate and the received state hasn't changed, hence this is not working.
Christopher McCormack
@cmccormack
Jun 18 2018 16:37
what does your updated setState look like?
Ayush Bahuguna
@relentless-coder
Jun 18 2018 16:38
it hasn't changed too
Christopher McCormack
@cmccormack
Jun 18 2018 16:38
:point_up: June 18, 2018 9:28 AM so you didn't try this?
Ayush Bahuguna
@relentless-coder
Jun 18 2018 16:41
@cmccormack i did
Christopher McCormack
@cmccormack
Jun 18 2018 16:41
But you said your setState hasn't changed
which is it?
Ayush Bahuguna
@relentless-coder
Jun 18 2018 16:43
    showAnswer(id){
        let faqs = {...this.state.faqs};
        let faq = {...faqs[id]};
        faq.showAnswer = !faq.showAnswer;
        this.setState({faqs: Object.assign({}, faqs, {[id]: faq})});
    }
faq is updated, but the state isn't getting updated, and this is freaking me out
Christopher McCormack
@cmccormack
Jun 18 2018 16:46
did you bind showAnswer to the class?
Ayush Bahuguna
@relentless-coder
Jun 18 2018 16:46
:smile: yes I have.
Christopher McCormack
@cmccormack
Jun 18 2018 16:47
how is showAnswer used in FaqCard?
Ayush Bahuguna
@relentless-coder
Jun 18 2018 16:48
it is passed as a prop
Christopher McCormack
@cmccormack
Jun 18 2018 16:48
yes and how are you invoking it
Ayush Bahuguna
@relentless-coder
Jun 18 2018 16:50
<button className="show_more" onClick={()=>props.showAnswer(props.faq._id)}>Show More</button>
Christopher McCormack
@cmccormack
Jun 18 2018 16:51
Do you have this code on github or anywhere we can review?
Ayush Bahuguna
@relentless-coder
Jun 18 2018 16:51
i found the culprit
it's
    static getDerivedStateFromProps(nextProps, prevState){
        console.log("hello, how are you", nextProps);
        let faqs = {};
        nextProps.faqs.forEach((el)=>{
            el.showAnswer = false;
            faqs[el._id.toString()] = el;
        })
        return {
            faqs
        }
    }
for some weird reason, setState is invoking this
i mean, triggering or whatever is the terminology
Christopher McCormack
@cmccormack
Jun 18 2018 16:53
That gets called before the render method
why are you using it?
Ayush Bahuguna
@relentless-coder
Jun 18 2018 16:54
because i pass in the props from the container
oh boy, I am stuck
Lol, all I wanted to do was toggle the display
Christopher McCormack
@cmccormack
Jun 18 2018 16:57
maybe step back and see where you can simplify, it does appear overly complicated for what you're trying to do
Ayush Bahuguna
@relentless-coder
Jun 18 2018 16:58
so, I have a list of faqs, I want to toggle the answer's display based on a click. I can stick with the good old method of document.getElementById but i wanted to try something new
Christopher McCormack
@cmccormack
Jun 18 2018 16:59
you can toggle the display within the FaqCard as well if you want, don't even need to add anything to the faqs state, just create some local state of isVisible or whatever and toggle it when clicked
Ayush Bahuguna
@relentless-coder
Jun 18 2018 17:06
I was trying to keep the faq card as just a presentational one
Also, this is weird. so i made a few changes in my api, and this time, setState works well, but getDerivedState... still returns old state in nextProps
Christopher McCormack
@cmccormack
Jun 18 2018 17:07
@relentless-coder alright, then maybe add an isVisible prop to each faq in the parent and when you toggle it just remember to update state with a new faqs object
I would suggest just not using getDerivedState
I think that method is good for something like creating animations if a component moves or something but for toggling visibility you certainly do not need
Ayush Bahuguna
@relentless-coder
Jun 18 2018 17:09
No this whole is part of a component which is exposed to data via a container, which passes down the props
let it be, I'll revert to the previous method of adding and removing classes
I wasted 2.5 hours on it
jusgoose
@gusd773
Jun 18 2018 17:54
thank you @cmccormack
Christopher McCormack
@cmccormack
Jun 18 2018 17:55
@gusd773 np
jusgoose
@gusd773
Jun 18 2018 17:56
@cmccormack any way I could linup my 'detail icon containers' and 'detail containers'? its the 3 lorem ipsum content rows with icons
https://codepen.io/gusd773/pen/aKyepO
I've tried vertically aligning the elements inside the containers but to no avail
Christopher McCormack
@cmccormack
Jun 18 2018 18:00
@gusd773 I would probably use flexbox for that, but you could try using line height
vertically aligning in css can be difficult without flexbox or grid
jusgoose
@gusd773
Jun 18 2018 18:00
@cmccormack honestly tho it should be able to allow percentages lol
jk I'm just avoiding flexbox and grid but I think it's time for me to tackle either or
Nate Mallison
@NJM8
Jun 18 2018 18:02
How do I export something in a js file so it can be used like so by require? var WordProblem = require('./wordy').WordProblem;
Christopher McCormack
@cmccormack
Jun 18 2018 18:03
just use export or module.export
Nate Mallison
@NJM8
Jun 18 2018 18:03
I haven't seen this before .wordProblem
Christopher McCormack
@cmccormack
Jun 18 2018 18:03
WordProblem is probably a property of whatever is exported
but you can look at the source of that module and see how they export it I imagine
Nate Mallison
@NJM8
Jun 18 2018 18:04
huh, seems like just adding an extra layer for no reason. It's part of the exercism challenges.
I'm using module.exports but getting the error wordProblem is not a constructor
Christopher McCormack
@cmccormack
Jun 18 2018 18:06
Word not word maybe?
Jason Luboff
@JLuboff
Jun 18 2018 18:13
@NJM8 Use exports like so
exports.sendClosureReminder = (to, subject, body) => {
koder3
@koder3
Jun 18 2018 18:13
Hi i was wondering if there is anyone here who is often on leetcode?
Are the fcc advanced algorithm challenges are similar in difficulty to the "hard" challenges on leetcode?
Jason Luboff
@JLuboff
Jun 18 2018 18:14
Then you require the file and can specify in my case, sendClosureReminder
const myFunc = require('myFile').sendclosureReminder;

myfunc('youremail@email.com', 'Subject'....
My synta might be slightly off somewhere..but oyu get the idea
Nate Mallison
@NJM8
Jun 18 2018 18:24
@JLuboff In that case aren't you exporting a single function? So you wouldn't have the option to call a function provided by myFunc?
they are doing this
var WordProblem   = require('./wordy').WordProblem;
var ArgumentError = require('./wordy').ArgumentError;

describe('Word Problem', function () {
  it('add 1', function () {
    var question = 'What is 1 plus 1?';
    expect(new WordProblem(question).answer()).toEqual(2);
  });
so I need access to .answer
Jason Luboff
@JLuboff
Jun 18 2018 18:27
In my case, yes.
koder3
@koder3
Jun 18 2018 18:27
Hi
Jason Luboff
@JLuboff
Jun 18 2018 18:27
Is WordProblem an object containing functions?
I'd say it is actually since they're calling new on it
koder3
@koder3
Jun 18 2018 18:28
I learnt that reduce is a very nice method and is used for many problems but I dont seem to understand it completely. Can anyone link me any resources regarding it?
@JLuboff yeah that's why I was confused.
koder3
@koder3
Jun 18 2018 18:29
@JLuboff @NJM8 Thanks
Nate Mallison
@NJM8
Jun 18 2018 18:30
const WordProblem = {
  WordProblem: function(question) {
  }
}

module.exports = WordProblem
I just did that. doesn't seem right
Jason Luboff
@JLuboff
Jun 18 2018 18:30

@NJM8

const WordProblem = {
answer : function(question) {
  }
}

module.exports = WordProblem

?

Nate Mallison
@NJM8
Jun 18 2018 18:31
plus their usage of ArguementError is weird
TypeError: WordProblem is not a constructor
meh, I'm not worried about it. once I submit i can see what other people did
did you know you can overload the if statement
to save some lines. love it
Jason Luboff
@JLuboff
Jun 18 2018 18:35
Example?
Nate Mallison
@NJM8
Jun 18 2018 18:37
.reduce((res, word) => {
          if (this.possibleOperations.includes(word) && res.push(word)){}
          if (!isNaN(word) && res.push(Number(word))) {}
          return res
        }, [])
using the && operator if the first one is true it will execute the second check, so if you have an if statement that does one thing just pop that in for your second check and it'll run it
I highly doubt linters will like it though
Jason Luboff
@JLuboff
Jun 18 2018 18:39
hmm
Brad
@bradtaniguchi
Jun 18 2018 18:47
Ive heard about this, but I hate the idea of it XD
Kudzu
@czhower
Jun 18 2018 19:10
@NJM8 linters have no problems with && that Im aware of. I use them a lot. Short circuit evals are a good practice and have been around in languages for long time.
&& are good optimizations, but not the best idea for push or things that have side effects like shown here though.
Nate Mallison
@NJM8
Jun 18 2018 19:11
I thought maybe it wouldn't like the empty curly braces
Kudzu
@czhower
Jun 18 2018 19:11
The empty {} depend on the linter settings, but you can override linter settings on a line by line basis with special comments.
The side effect in the short circuit eval though is a very bad idea IMO.
Nate Mallison
@NJM8
Jun 18 2018 19:13
hard to find when it does the wrong thing
Kudzu
@czhower
Jun 18 2018 19:19
Which is why its a bad idea. Code should be clearly readable and its intent obvious, especially on a line by line basis.
Brad
@bradtaniguchi
Jun 18 2018 20:23
Hmm anyone here do backend testing? Were thinking about starting and I have limited experience with it
Jason Luboff
@JLuboff
Jun 18 2018 20:23
....I'd like to......
Brad
@bradtaniguchi
Jun 18 2018 20:25
Our concern is if we are to mock or not mock the database calls
My boss said there is a huge fight over if we should or shouldn't
Jason Luboff
@JLuboff
Jun 18 2018 20:26
Ah. From what little I know....I think you want to mock them...but...someone with much more knowledge will need to confirm
Kaz Baig
@kbaig
Jun 18 2018 20:49
@bradtaniguchi What are the reasons for not doing it?
Brad
@bradtaniguchi
Jun 18 2018 20:53
He said people argue you wont know if the database will throw an error, or if the data-comes back different or something.
I argued on the side of mocking the data-base calls, for performance, data-integrity, and consistency between tests. We can always use real-data from the data-base that's pre populated before some e2e-tests or something
Brad
@bradtaniguchi
Jun 18 2018 20:59
On a side note, I have a utility service that's nearing 600 lines >.> does this thing have to much logic? Or is there no such thing haha?
Jason Luboff
@JLuboff
Jun 18 2018 21:15
@bradtaniguchi Is there, in theory, a recomended number of lines to stay under for files?
Brad
@bradtaniguchi
Jun 18 2018 21:23
Idk, I try to stick to smaller, documented, and clearly named methods, rather than class/file size. But I can't help but feeling that once the class starts going over 500, things start getting hard to find haha
koder3
@koder3
Jun 18 2018 21:28
const euros = [29.76, 41.85, 46.5]; const sum = euros.reduce((total, amount) => total + amount); sum // 118.11
Jason Luboff
@JLuboff
Jun 18 2018 21:28
@bradtaniguchi Ya...I think all my files are < 600 lines but never too sure myself
koder3
@koder3
Jun 18 2018 21:28
what does total and amount represent each loop
Brad
@bradtaniguchi
Jun 18 2018 21:29
@koder3 They are arguments provided by the reduce method
Essentially, the first (total) is the accumulator and the second (amount) is the currentValue
Brad
@bradtaniguchi
Jun 18 2018 21:29
Yea, we have some "god-level" classes that are pushing 1K, I hate their existence haha
koder3
@koder3
Jun 18 2018 21:30
i know that but like what value do they use. Ive read many articles and just want to know what values these parameters hold each time they loop
Jason Luboff
@JLuboff
Jun 18 2018 21:31
@koder3 And it states exactly where I mentioned what they are
accumulator
    The accumulator accumulates the callback's return values; it is the accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied (see below).
koder3
@koder3
Jun 18 2018 21:31
const euros = [29.76, 41.85, 46.5];
const sum = euros.reduce((total, amount) => total + amount); 
sum // 118.11
for example over here how do I know what value total and amount will be each loop?
Jason Luboff
@JLuboff
Jun 18 2018 21:31
Therefore, it is the value by which which value is adding/subtracting/whatever
currentValue
    The current element being processed in the array.
Therefore it is the current value of the array at the current iteration of the loop
A good way to help understand would be to use console log inside oyur function
koder3
@koder3
Jun 18 2018 21:33
MDN language is too complex for me or I'm just dumb xd
Jason Luboff
@JLuboff
Jun 18 2018 21:33
const euros = [29.76, 41.85, 46.5];
const sum = euros.reduce((total, amount) =>{
console.log(`Total: ${total}, Amount: ${amount}`);
 return total + amount;}); 
sum // 118.11
Run that and you'll see in your console the value of each for each iteration of the loop
You could also throw that into python tutor http://pythontutor.com/javascript.html#mode=edit and it will step through it
Brad
@bradtaniguchi
Jun 18 2018 21:34
@koder3 It defiantly makes more sense after you mess around with it more
koder3
@koder3
Jun 18 2018 21:35
@JLuboff what happens if i add a 0 or an array at the end?
```
const euros = [29.76, 41.85, 46.5];
const sum = euros.reduce((total, amount) =>{
console.log(`Total: ${total}, Amount: ${amount}`);
 return total + amount;}, 0); 
sum // 118.11
like that
Brad
@bradtaniguchi
Jun 18 2018 21:36
0;should be just 0
koder3
@koder3
Jun 18 2018 21:36
This message was deleted
            oh i meant it after the bracket xd thanks my bad
zzz
Jason Luboff
@JLuboff
Jun 18 2018 21:36
0 is setting the initial value of total
Brad
@bradtaniguchi
Jun 18 2018 21:36
set it to something negative or huge and the sum will change
koder3
@koder3
Jun 18 2018 21:37
why would you set it to 0?
Jason Luboff
@JLuboff
Jun 18 2018 21:37
@koder3 So if you set it to 0 then the first value of total will be 0 as opposed to the first value of the array (29.76)
Brad
@bradtaniguchi
Jun 18 2018 21:37
^
For this case you dont really need to, but other cases you might
Jason Luboff
@JLuboff
Jun 18 2018 21:38
You may want to set an initial value if say you know that you're starting off with 25 Euros but its not part of your array and you don't want to add it later, it would make senses to include it as the initial value
Brad
@bradtaniguchi
Jun 18 2018 21:40
arr = [1,2,3]0
const doubles = arr.reduce((arr, el) => {
   arr.push(el * 2);
   return arr;
}, []);
console.log(doubles); // [2, 4, 6]
An example where you must set the initial value. (This could be done with map instead of reduce too)
Jason Luboff
@JLuboff
Jun 18 2018 21:41
I probably wouldn't have thought to use reduce there hah
Brad
@bradtaniguchi
Jun 18 2018 21:43
You shouldn't in that case, but a common use case is .map(/**/).filter(/**/), in such a case, using a single reduce can improve performance by like 2 times.
koder3
@koder3
Jun 18 2018 21:52
const fruitBasket = ['banana', 'cherry', 'orange', 'apple', 'cherry', 'orange', 'apple', 'banana', 'cherry', 'orange', 'fig' ];
const count = fruitBasket.reduce( (tally, fruit) => {
  tally[fruit] = (tally[fruit] || 0) + 1 ;
  return tally;
} , {})
count // { banana: 2, cherry: 3, orange: 3, apple: 2, fig: 1 }
I tried console.log on both the parameters but I still dont understand what values are being inserted into tally and fruit each loop
Christopher McCormack
@cmccormack
Jun 18 2018 21:56
nothing is being inserted into fruit, fruit is just the current value
tally is the accumulator, which starts as an {} empty object (last item before final )).
koder3
@koder3
Jun 18 2018 21:57
what does tally[fruit] mean?
Christopher McCormack
@cmccormack
Jun 18 2018 21:57
for each fruit, a property with the string value of fruit is added to the object with either the value 1 if it didn't exist, or the existing property of fruit is incremented by 1
when you pass a variable in bracket notation it expands the variable into a string, so
const fruit = 'banana'
tally[fruit] // same as tally["banana"]
koder3
@koder3
Jun 18 2018 21:59
what is tally here?
i thought tally is an empty object
Christopher McCormack
@cmccormack
Jun 18 2018 21:59
tally is an empty object to begin with, which is stored in the accumulator
it is
koder3
@koder3
Jun 18 2018 22:00
how did it get the values of const fruitBasket then
Christopher McCormack
@cmccormack
Jun 18 2018 22:00
that's what reduce is doing, iterating over each value in the Array
https://mdn.io/reduce definitely read this when you get a chance
koder3
@koder3
Jun 18 2018 22:00
so on each iteration how does tally change?
Christopher McCormack
@cmccormack
Jun 18 2018 22:01
if the fruit isn't in the tally yet, it gets added with a value of 1 (tally[fruit] || 0) + 1
if it is, it gets incremented
koder3
@koder3
Jun 18 2018 22:01
Sorry for firing questions back to back but youre making it so clear, I am very thankful.
so on first iteration tally is equal to {} but on second iteration its {banana} ?
am i right
what would it be on third?
Christopher McCormack
@cmccormack
Jun 18 2018 22:04
it would be {banana: 1}
all objects contain property: value pairs
koder3
@koder3
Jun 18 2018 22:04
oh i tried reading mdn but its too complex
Christopher McCormack
@cmccormack
Jun 18 2018 22:06
Go slow, to get a real understanding you have to chew on the sentences carefully until you understand it
it may be dense, but it's not too complex
koder3
@koder3
Jun 18 2018 22:06
the word callback and invocation is what puts me off
many words like that
Christopher McCormack
@cmccormack
Jun 18 2018 22:07
get used to the word callback :)
It's basically a function that you pass
Jason Luboff
@JLuboff
Jun 18 2018 22:10
Learn to soothe the callback, love the callback, marry the callback, divorce the callback when it goes yto callback hell
Brad
@bradtaniguchi
Jun 18 2018 22:10
Promise is bae then :P
koder3
@koder3
Jun 18 2018 22:11
I heard that's one of the main reasons people hate javascript: ""Callback hell""
Christopher McCormack
@cmccormack
Jun 18 2018 22:12
@koder3 here's a very simple example of a callback https://repl.it/repls/GraciousVigilantApplescript
Notice how I pass a function as an argument, so that another function can utilize that argument
You wont' see that used as much in the beginning outside of map/reduce/filter, but you'll see it a lot more as you progress
koder3
@koder3
Jun 18 2018 22:13
so a function that calls another function is a callback?
Christopher McCormack
@cmccormack
Jun 18 2018 22:14
the callback is just what you call a function when it's passed to a function
because that second function will invoke the function that is passed at some point
thus calling back to the other function
invoking just means to pass a value
invoking just means you have passed some value to the function within parenthesis.
koder3
@koder3
Jun 18 2018 22:15
I see.
Thanks a lot @JLuboff @bradtaniguchi @cmccormack
Christopher McCormack
@cmccormack
Jun 18 2018 22:16
in my example, add2 is the function, which is invoked by passing two values (e.g. add2(5, 7))
but when you pass a function as a callback, you do not invoke it ( no parenthesis )
it can get more complicated then that but if you understand this much it should help
Jason Luboff
@JLuboff
Jun 18 2018 22:39
@cmccormack Got time for a few destrcuturing questions?
Christopher McCormack
@cmccormack
Jun 18 2018 22:40
@JLuboff yeah man love me some destructuring!
Everything except how spell check doesn't know it's a word
Jason Luboff
@JLuboff
Jun 18 2018 22:42

@cmccormack Cool! Alright here we go.
First: You helped me create this function

emailActions.forEach(({ Name, Email, Action }) => {
                if (!Object.prototype.hasOwnProperty.call(uniqueUsers, Name)) {
                  uniqueUsers[Name] = { Email, Actions: [Action] };
                } else {
                  uniqueUsers[Name].Actions.push(Action);
                }
              });

I just want to verify that Name, Email, Action are all keys of my array element and I could theoritically add additional keys if they exist?

Second: Can I destructure within an objec?

const messageData = {
            { Name } : approver,
            { Email }: approver,
            RequestID,
          };

?

Christopher McCormack
@cmccormack
Jun 18 2018 22:47
yeah Name Email and Action would be properties of the current item in the array
is messageData the attempt at destructuring or is it the object?
not sure i follow the second question
Jason Luboff
@JLuboff
Jun 18 2018 22:48
Normally it would be
const messageData = {
            Name: approver.Name,
            Email: approver.Email,
            RequestID,
          };
So the attempt at destructuring
Christopher McCormack
@cmccormack
Jun 18 2018 22:49
I would probably just do something like
const { Name, Email } = approver
const messageData = {
    Name,
    Email,
    ...
}
Jason Luboff
@JLuboff
Jun 18 2018 22:50
Ah.
Christopher McCormack
@cmccormack
Jun 18 2018 22:50
I honestly don't know if you can do what you're trying to do or not! did you try it?
it's an interesting way to do it
Jason Luboff
@JLuboff
Jun 18 2018 22:51
No, I didn't. Wasn't sure, figured I'd ask lol
Hmm...think it's time to change my syntx theme again
Anybody else change their theme every so often?
Christopher McCormack
@cmccormack
Jun 18 2018 22:52
like the color theme?
Jason Luboff
@JLuboff
Jun 18 2018 22:53
Yup
Christopher McCormack
@cmccormack
Jun 18 2018 22:53
I usually use Cobalt2 in VS Code, but sometimes change it when I'm at the coffee shop to a light theme because it's easier to read when it's bright
but I love Cobalt2
Jason Luboff
@JLuboff
Jun 18 2018 22:54
I use One Dark UI Theme and Firewatch Green for Syntax theme
Christopher McCormack
@cmccormack
Jun 18 2018 22:54
what is for Syntax?
Jason Luboff
@JLuboff
Jun 18 2018 22:54
Atom lets you use two different themes
Christopher McCormack
@cmccormack
Jun 18 2018 22:55
oh
Jason Luboff
@JLuboff
Jun 18 2018 22:55
One for the UI, and the other for syntax (i.e your code)
Christopher McCormack
@cmccormack
Jun 18 2018 22:55
does UI include the background?
I could imagine poor contrast if so
Jason Luboff
@JLuboff
Jun 18 2018 22:55
UI is like the side/top bars., etc.
Syntax theme handles the background for the code
Christopher McCormack
@cmccormack
Jun 18 2018 22:56
oh ok
I think in VS code that's all covered by the theme, but you can have separate Icon theming
Jason Luboff
@JLuboff
Jun 18 2018 22:56
cobalt2 is too blue for me
I do have a seperate icon theme too lol
Christopher McCormack
@cmccormack
Jun 18 2018 22:56
I like it :) the contrast is really good
I haven't found a light theme I'm in love with yet though
tried a lot too
Jason Luboff
@JLuboff
Jun 18 2018 22:58
I don't like light themes
In fact...I wonder if there is a dark theme to SSMS...its annoyingly bright
Christopher McCormack
@cmccormack
Jun 18 2018 23:01
SSMS?
Brad
@bradtaniguchi
Jun 18 2018 23:01
I used to use so many different themes, I just stick with the default-dark themes on everything nowadays. had to many issues on to many editors with to many themes :{
Mel Macaluso
@MelMacaluso
Jun 18 2018 23:02
anything solarized and dark wins for retaining some eyesight after 10 hours staring at the screen :joy:
Christopher McCormack
@cmccormack
Jun 18 2018 23:03
most editors have pretty nice built in themes now
Jason Luboff
@JLuboff
Jun 18 2018 23:03
@cmccormack SSMS = SQL Server Management Studio
Christopher McCormack
@cmccormack
Jun 18 2018 23:03
ohh
Mel Macaluso
@MelMacaluso
Jun 18 2018 23:03
agreed, I recently switched to VS code from Sublime
Jason Luboff
@JLuboff
Jun 18 2018 23:03
@MelMacaluso I've used both in the past
Mel Macaluso
@MelMacaluso
Jun 18 2018 23:03
and was quite pleased with the default one, strangely enough
Christopher McCormack
@cmccormack
Jun 18 2018 23:06
Now we have to lure @JLuboff away from Atom to VS Code somehow...
Jason Luboff
@JLuboff
Jun 18 2018 23:06
I'm a creature of habit, you'll be hard pressed to get me to switch
Mel Macaluso
@MelMacaluso
Jun 18 2018 23:06
ahhaha
Jason Luboff
@JLuboff
Jun 18 2018 23:07
Funny though that I do use VS Community, but obiviousily two different beasts
Mel Macaluso
@MelMacaluso
Jun 18 2018 23:07
Well I save about, let's say 10% of time overall with the integrated handy terminal
Brad
@bradtaniguchi
Jun 18 2018 23:07
Im a creature of habit too, but I like to go out and experiment to make sure I'm not missing out haha
Mel Macaluso
@MelMacaluso
Jun 18 2018 23:07
same as the integrated git / branching
so that's a reason to switch too
Brad
@bradtaniguchi
Jun 18 2018 23:07
But atom has one of those too
Mel Macaluso
@MelMacaluso
Jun 18 2018 23:07
Agreed
also atom has sync-code or whatever that's called
(Coding with a mate / colleague on the same file)
simultanously in cloud
Christopher McCormack
@cmccormack
Jun 18 2018 23:08
Brad
@bradtaniguchi
Jun 18 2018 23:08
vscode heard about that feature and added live-share
haha yes
Mel Macaluso
@MelMacaluso
Jun 18 2018 23:08
damn
those guys are fast at catching up
Christopher McCormack
@cmccormack
Jun 18 2018 23:08
yeah they must have a whole team
their monthly change log is usually pretty big
Mel Macaluso
@MelMacaluso
Jun 18 2018 23:09
Too bad I never bot the php formatter to work
what a shame
ahahaha
anyway installing live share now basically
Christopher McCormack
@cmccormack
Jun 18 2018 23:10
haha
Brad
@bradtaniguchi
Jun 18 2018 23:10
Id say Atom is built by github, which is good cuse some people don't trust microsoft... but that doesn't matter anymore XD
Mel Macaluso
@MelMacaluso
Jun 18 2018 23:10
exactly...
when I heard about microsoft buying github
my heart broke in one million pieces
Christopher McCormack
@cmccormack
Jun 18 2018 23:11
aw that's so sad sounding haha
Brad
@bradtaniguchi
Jun 18 2018 23:11
Seriously, haha
Mel Macaluso
@MelMacaluso
Jun 18 2018 23:11
ahahah man github was like the last standing thing
what's the next one
Brad
@bradtaniguchi
Jun 18 2018 23:11
Gitlab :trollface:
Mel Macaluso
@MelMacaluso
Jun 18 2018 23:11
npmjs bought by tesco
Christopher McCormack
@cmccormack
Jun 18 2018 23:13
@MelMacaluso haha
Tom
@moT01
Jun 18 2018 23:14
:nose:
Christopher McCormack
@cmccormack
Jun 18 2018 23:17
The Nose knows
@moT01 gotta share your theme(s) now
Tom
@moT01
Jun 18 2018 23:18
i just have the standard theme
the one that comes with notepad
Jason Luboff
@JLuboff
Jun 18 2018 23:19
Cool.. Got the hidden dark theme enabled for SSMS
Christopher McCormack
@cmccormack
Jun 18 2018 23:19
regular notepad?
Tom
@moT01
Jun 18 2018 23:19
yup
original notepad
Christopher McCormack
@cmccormack
Jun 18 2018 23:19
How do you deal with the terrible line breaks??
Tom
@moT01
Jun 18 2018 23:19
only has one theme
Christopher McCormack
@cmccormack
Jun 18 2018 23:20
Not even Notepad++?? man...
Tom
@moT01
Jun 18 2018 23:21
whats notepad++
Christopher McCormack
@cmccormack
Jun 18 2018 23:21
Notepad + 1
Mel Macaluso
@MelMacaluso
Jun 18 2018 23:21
ahahahaha
Jason Luboff
@JLuboff
Jun 18 2018 23:21
Throws Syntax error
Christopher McCormack
@cmccormack
Jun 18 2018 23:22
"Attempt to cast a binary as Type Number"
Mel Macaluso
@MelMacaluso
Jun 18 2018 23:22
That's deep
Christopher McCormack
@cmccormack
Jun 18 2018 23:22
Notepad++ is awesome on windows, I use it a lot for work, scripting and doing quick text manipulation
Tom
@moT01
Jun 18 2018 23:22
the netscape navigator docs suggest to build with notepad
Christopher McCormack
@cmccormack
Jun 18 2018 23:22
Well used to use it, doesn't have a Mac version
Now I know you're messing with us haha
I imagine they would say that, as at the time you were basically limited to Notepad or Wordpad
Tom
@moT01
Jun 18 2018 23:24
snakes and sparklers are all I ever used
Christopher McCormack
@cmccormack
Jun 18 2018 23:24
So you're gonna tell me that you don't have no black cats, no Roman Candles, or screaming mimis?
Tom
@moT01
Jun 18 2018 23:24
haha
no whisker dos, no whisker donts
Christopher McCormack
@cmccormack
Jun 18 2018 23:26
haha
Tom
@moT01
Jun 18 2018 23:30
im glad I didnt have to explain my reference
Christopher McCormack
@cmccormack
Jun 18 2018 23:31
It may be a dumb movie but it's one of my favorites
Or did you mean Netscape? :D
Tom
@moT01
Jun 18 2018 23:31
that too I suppose
im sure theres more than a few people that just dont know what netscape was
not that they should
Christopher McCormack
@cmccormack
Jun 18 2018 23:34
Just thinking about Netscape and that animated loading icon they used brings back fond memories
Brad
@bradtaniguchi
Jun 18 2018 23:35
I remember seeing that and thinking it was magic (I was like under 10 I believe)
Christopher McCormack
@cmccormack
Jun 18 2018 23:37
wy7sdblzj0bz.gif
Jason Luboff
@JLuboff
Jun 18 2018 23:41
Whoo. Think I got all my queries/logic done for my cron job
Christopher McCormack
@cmccormack
Jun 18 2018 23:44
@JLuboff nice! Almost done with the project then?
Jason Luboff
@JLuboff
Jun 18 2018 23:45
Yup! Just need to fix I think one other minor issue (there's a page for approvers, when all 6 have put in if they approve or not, if say 2 so no, then an email is sent saying the request is denied but they can still go back in and approve, so it should send an email saying Person has updated or whatever but instead it sends that same prior email
Then meet with the gorup again, make sure all is good. Followed by moving to production servers
Christopher McCormack
@cmccormack
Jun 18 2018 23:46
Awesome man that's a big deal
Jason Luboff
@JLuboff
Jun 18 2018 23:47
I guess probably clean up code a bit too.. maybe make some comments hah but ya it is! Thanks
Christopher McCormack
@cmccormack
Jun 18 2018 23:49
Good piece to put on your CV
Jason Luboff
@JLuboff
Jun 18 2018 23:51
Definitely
Still need to create a seperate stand alone C# app for the admin of the app to be able to add/edit people and a few other things but that'll come later
Christopher McCormack
@cmccormack
Jun 18 2018 23:57
Don't want to make a web pane for admin?
Jason Luboff
@JLuboff
Jun 18 2018 23:58
Nah... Easier to manipulate SQL data through a WinForm app
Christopher McCormack
@cmccormack
Jun 18 2018 23:58
gotcha
Jason Luboff
@JLuboff
Jun 18 2018 23:58
Given...I could go web app for it...but.. I also want to practice my C# :smile:
Anyways.. time for me to go home
You sohuld probably get started on dinner @cmccormack
Christopher McCormack
@cmccormack
Jun 18 2018 23:59
Hah thanks for the reminder
I'll ttyl!
Jason Luboff
@JLuboff
Jun 18 2018 23:59
:wave:
Christopher McCormack
@cmccormack
Jun 18 2018 23:59
:wave: