These are chat archives for MontCode/GeneralChat

20th
Jul 2016
Eric Phy
@SimplyPhy
Jul 20 2016 00:00
tl;dr
Lily Romano
@Lilyheart
Jul 20 2016 00:01
Ugh, didn't mean to delete that message. I typed the wrong thing. It's an SD, not SSD. micro SD
Mike
@dcpking
Jul 20 2016 00:03
64GB
(somewhere here!)
Lily Romano
@Lilyheart
Jul 20 2016 00:03
imma reformat and test what I have. It could be the drive gone bad, it could be when I tried to put node on it xD
might just need to reseat the cables as everything is exposed. But, I can see boot fine, so I doubt that is it... but computers are weird.
Lily Romano
@Lilyheart
Jul 20 2016 00:09
oh no! CodePen pro no mo!
Eric Phy
@SimplyPhy
Jul 20 2016 00:15
wa?
Lily Romano
@Lilyheart
Jul 20 2016 00:58

But this has less rhyme.

Oh Darn, my Pro status on CodePen has ended.

David Castner
@davidjcastner
Jul 20 2016 13:13
@Lilyheart Array methods can be broken down into use cases (here are two for looping over the array)
  • Array.map is for transformations on the array
  • Array.forEach is for looping over the elements in the array (basically map but without a return value)
// here we are going to use map to transform the elements into an object
var RaceWinners = ['Alice', 'Bob', 'Eve'];

// note that map creates a new array and doesn't overwrite the RaceWinners
var Winners = RaceWinners.map(function(element, index, arr) {
    // map takes a function with three arguments
    // the function is called with every element in the array
    // element is value of the element at each index in the array
    // index is the index of the current element
    // arr is a reference to RaceWinners

    // the returned value is placed in a new array at the current index
    return {
        name: element,
        position: index
    };
});

console.log(Winners);
/* Outputs:
    [{
        name: 'Alice',
        position: 0
    }, {
        name: 'Bob',
        position: 1
    }, {
        name: 'Eve',
        position: 2
    }]
*/
Lily Romano
@Lilyheart
Jul 20 2016 13:15
I know what they are and their theory. I need practice using them so I can get a better handle on them. They are not my first thought to go to even when they are the best option because they are not seated well in my brain.
Eric Phy
@SimplyPhy
Jul 20 2016 13:28
Perhaps a new sofa upstairs, then?
Lily Romano
@Lilyheart
Jul 20 2016 13:29
Iz to early in the morning. My thought when reading your post was but I have a new sofa and my house only has one floor @ _@
David Castner
@davidjcastner
Jul 20 2016 14:10
I need some website inspiration does anyone have a link to list of awesome website designs
Lily Romano
@Lilyheart
Jul 20 2016 14:13
I feel like I saw one recently... lemme look.
David Castner
@davidjcastner
Jul 20 2016 14:14
in particular I'm looking for creative nav bars
Lily Romano
@Lilyheart
Jul 20 2016 14:15
When looking for something like that, I google something like 2016 trends nav bar and tweak from there. I'll see if I can find what I saw earlier
Bah, I can't find it. I think it might have actually just been something about color trends and wouldn't help anyway. Regardless... if you RSS or something like that, this is a good place to follow for things https://medium.com/@WebdesignerDepot
Lily Romano
@Lilyheart
Jul 20 2016 14:42
@davidjcastner I saw this and thought of you http://markdowntoweb.com/
David Castner
@davidjcastner
Jul 20 2016 14:43
Typical management: "We need a navigation bar at the top right", so I go and ask what they would like put in the nav bar that we don't already have at the top of the page already. Their response: "well um..." several minutes later "well go look at our competitors site and see how they have that giant nav bar". I go to look at it and it's basically a whole bunch of upsell pages. When I report back to them about it, they respond with "oh well we want to be able to create and add that in the future".
Lily Romano
@Lilyheart
Jul 20 2016 14:44
/le sigh
Lily Romano
@Lilyheart
Jul 20 2016 14:50
afk'ish... time for mouse surgery. I wear out clickers to quickly... (actually I think it's the humidity in this house. ruins everything)
David Castner
@davidjcastner
Jul 20 2016 14:55
Eric Phy
@SimplyPhy
Jul 20 2016 14:56
So quick question:
David Castner
@davidjcastner
Jul 20 2016 14:57
go for it
Eric Phy
@SimplyPhy
Jul 20 2016 14:57

When I do this:

addMarkerInput.addEventListener("keypress", addMarker, false);
…
function addMarker(e) {

        if (e.which !== 13) {
                return;
        }
// continue executing

it’s doesn’t work, but when I do the same thing where addMarker is replaced with function(e) { … }, it does work.

I’ve manipulated it in several ways, and can’t figure out what’s wrong
I’ve checked to see that e is getting sent to addMarker without issue
David Castner
@davidjcastner
Jul 20 2016 14:58

what do you mean by

is replaced with function(e) { … }, it does work.

Eric Phy
@SimplyPhy
Jul 20 2016 14:59
I mean that if I create an anonymous function inside of the addEventListener call, everything is good, but when I call the function, it’s a no go
David Castner
@davidjcastner
Jul 20 2016 14:59
ah ok
is this the order that the you have it in the code meaning addMarkerInput.addEventListener("keypress", addMarker, false); is above where you define the function addMarker
Eric Phy
@SimplyPhy
Jul 20 2016 15:01
yeah
Lily Romano
@Lilyheart
Jul 20 2016 15:01
ugh, they changed the design of the cover of the switch.
Eric Phy
@SimplyPhy
Jul 20 2016 15:01
the addMarker(e) function gets called with e containing the correct value, though..
Perhaps I should add that, the errors I get are either knockout related or google maps api related
sigh
David Castner
@davidjcastner
Jul 20 2016 15:02
okay try defining the function above where you it call it:
function addMarker(e) {
    if (e.which !== 13) {
        return;
    }
    // continue executing
}
addMarkerInput.addEventListener("keypress", addMarker, false);
Eric Phy
@SimplyPhy
Jul 20 2016 15:02
but obviously something isn’t surviving the transition
negative, same errors
i have an easy fix, simply creating two separate eventListener functions that do the same thing, except one tests for keypress, and one for click (i’m making it so you can hit enter or click a button for the filter)
but i thought calling the same function and including the (e) value check in it would work :(
David Castner
@davidjcastner
Jul 20 2016 15:07
hmm, based upon the code you sent me I don't why there would be any issue between the two, perhaps there is something else in your code that affects it or it's a scope issue
Eric Phy
@SimplyPhy
Jul 20 2016 15:07
nothing should be out of scope..
it’s like certain information isn’t transferring from the eventListener to the called function (i.e. addMarker(e)) :(
David Castner
@davidjcastner
Jul 20 2016 15:09
sorry I don't know any better without seeing all of the code, so was just suggesting common issues related to that type of error
Eric Phy
@SimplyPhy
Jul 20 2016 15:10
yeah, well thanks for affirming that the code logic and syntactical structure are correct
it’s something to do with my knockout code or google maps places api
David Castner
@davidjcastner
Jul 20 2016 15:12
hint hint if you post the full code I could give you a better idea
Eric Phy
@SimplyPhy
Jul 20 2016 15:15
I appreciate it, but I’d prefer not to place that burden upon you
I can just double up the eventListeners for now
David Castner
@davidjcastner
Jul 20 2016 15:16
not a burden, plus code review is very important
There are some habits that I had in the past that would have been great is someone told that I shouldn't do.
Besides MontCode is a resource that I fully recommend taking advantage of
Eric Phy
@SimplyPhy
Jul 20 2016 15:24
:D agreed all around, but thankfully I have it working, and it turns out part of the issue was that when you click enter on the google.search dropdown (auto-fill recommendation menu), the text that you select (e.g. if you type "new y” in the input, and click enter on “New York, NY” on the dropdown) takes a split second to actually be the value in the input box itself (even though it visually appears in the input box before you click enter).
Lily Romano
@Lilyheart
Jul 20 2016 15:26
Glorious Success! After fighting a mouse that double clicks everything, a working mouse is heaven.
Eric Phy
@SimplyPhy
Jul 20 2016 15:31
w00t,
Award: 50% more stars for 3 hours :P
Lily Romano
@Lilyheart
Jul 20 2016 15:31

Nice! I'll have to bookmark

I use https://www.npmjs.com/package/marked

lulz
Bonus Award: Lunch!
Lily Romano
@Lilyheart
Jul 20 2016 17:54
I found a very dangerous website that will steal all my time going through old repos and fixing errors. https://codacy.com/
David Castner
@davidjcastner
Jul 20 2016 18:08
let me know how to like it, when you get to it
I have a coworker interested in learning html&css, what are we recommending as good tutorials other than freeCodeCamp and codeAcademy
Lily Romano
@Lilyheart
Jul 20 2016 18:10
There is a few tabs on the welcome deck. welcome.montcode.com iirc. and slide 6 and down iirc.
David Castner
@davidjcastner
Jul 20 2016 18:10
alright cool thanks
Lily Romano
@Lilyheart
Jul 20 2016 18:10
So many errors Codacy can find beyond the default setups the Atom Linters have. I'm sure linters in Atom could be setup to be this strict, but I'm lazy.
Lily Romano
@Lilyheart
Jul 20 2016 20:31
I think I might be the only one at the library today :/
Jonathan Herman
@lantech19446
Jul 20 2016 20:31
Nope i'm at the library, just not that one.
Lily Romano
@Lilyheart
Jul 20 2016 20:32
Snarf
Jonathan Herman
@lantech19446
Jul 20 2016 20:33
is it sad that I just thought of pinky and the brain when you said snarf lol
Lily Romano
@Lilyheart
Jul 20 2016 20:39
Ha! Usually I do say Narf so that is probably why
Jonathan Herman
@lantech19446
Jul 20 2016 20:40
lol
Lily Romano
@Lilyheart
Jul 20 2016 21:34
@davidjcastner some of the default values on Codacy are harsh (but changable). For example, max lines in a function: eslint default is 10, Codacy has 3 :open_mouth:
So what is everyone up to tonight. I’m enjoying the view from the board room
Lily Romano
@Lilyheart
Jul 20 2016 22:36
@davidjcastner found a thingy that takes md files and turns them into slides like the way I use reveal but without all the html nonsense. https://github.com/jdan/cleaver
Eric Phy
@SimplyPhy
Jul 20 2016 23:13
I just spent 90 minutes trying to figure out an issue because of 2 parentheses
exhausting
Lily Romano
@Lilyheart
Jul 20 2016 23:15
hate that. eslint has a lot of paren rules. Something to look into?
Eric Phy
@SimplyPhy
Jul 20 2016 23:15
all because text: $index // 1, but$index !== 1
it was knockout.js related
databinding
Lily Romano
@Lilyheart
Jul 20 2016 23:15
only 45 minutes left in the meetup… Think it is safe to leave?
Lily Romano
@Lilyheart
Jul 20 2016 23:38
@davidjcastner The nice thing about this Codency is I’m finding all the eslint options I’m missing. [I turned all error catching on first, and now, if I’m finding a rule I don’t like, I’m turning it off. If it’s a rule I like and I totally missed the boat, then I know it’s a rule I’m missing in eslint]
Jonathan Herman
@lantech19446
Jul 20 2016 23:46
does anyone know there's a way to get reddit to support jquery?
Lily Romano
@Lilyheart
Jul 20 2016 23:51
Why?
Depending on what you're doing that's probably a way to include it