These are chat archives for codefellows/sea-b15-javascript

22nd
Jul 2014
Kevin Stephens
@kevinmstephens
Jul 22 2014 02:35
JADE is bueno.
Josh can help...you make cocktails and get drunk. Thanks buddy!
Andy Ernst
@AndyCErnst
Jul 22 2014 03:05
Jade can get slow on large projects. Sam the host of that JS pub meetup hates it enough that he wrote his own language that he says has similar semantics but is much faster to render, although he was just showing me this on a bus ride... while drunk
Josh Cunningham
@joshcanhelp
Jul 22 2014 15:15
@KuroFluff Slow in what way, processing on output? How large is a large?
Andy Ernst
@AndyCErnst
Jul 22 2014 17:17
Slow in processing I guess. He said if you have a thousand hits a second to your site it will really bog it down. The parser for Jade is poorly written. Although you'll have to ask him, as I'm only half remembering a brief conversation
Kevin Stephens
@kevinmstephens
Jul 22 2014 18:34
Trying to do some regular ol prototypal inheritance in a projecto of mine. Does it sound right that there are two paradigms at the moment.
Hold on....
Josh Cunningham
@joshcanhelp
Jul 22 2014 18:35
Uhh, nope
Kevin Stephens
@kevinmstephens
Jul 22 2014 18:39
  1. Why create a constructor and add fields to the constructor prototype and use the new keyword when we can just create an object with the fields we want and use object.create(object)

function Con() {

};

Con.prototype.hello = function () {
    return "hello";
}

var con = new Con();

console.log(con.hello());  //"Hello"

Con = {
    hello: function () {
        return "hello";
    }
}

con = Object.create(Con);

console.log(con.hello());  //"Hello"
Kevin Stephens
@kevinmstephens
Jul 22 2014 19:01
Guess if someone messes with Con then every object that inherits from it will be initialized with the fields in the same state as Con. Where if you use a constructor you can be sure that fields are initialized to the correct state.
Andy Ernst
@AndyCErnst
Jul 22 2014 22:54
So I'm working on a website for a company. Their current website is 12 kinds of terrible and the only thing they wanted was it to work well on mobile. I grabbed a responsive html template but when I'm manually adding menu links on every single page I know there has to be a better way. I don't think they want me to invest the time to make it a single page app and spitting the menu onto the page with jQuery would feel sloppy. How is this normally done?
Ivan Storck
@ivanoats
Jul 22 2014 22:59
is there a back-end ?
Josh Cunningham
@joshcanhelp
Jul 22 2014 23:04
@KuroFluff ^^ ... also, what technology stack is it using? If you can use PHP, you can easily include files for repeating elements.
Andy Ernst
@AndyCErnst
Jul 22 2014 23:04
Not yet. It's just html, css, and a tiny bit of js that came with the template.
No such luck @joshcanhelp, I'm not you :P I only know JS and Java
Ivan Storck
@ivanoats
Jul 22 2014 23:05
so maybe a static site generator?
Andy Ernst
@AndyCErnst
Jul 22 2014 23:06
What's that?
Josh Cunningham
@joshcanhelp
Jul 22 2014 23:06
@KuroFluff I mean, can you use it on the server?
Ivan Storck
@ivanoats
Jul 22 2014 23:06
like http://assemble.io or ruby’s Jekyll
then you can still upload just front-end code, but you have a sane way of generating it
remember @hlpetway ’s lightning talk?
Andy Ernst
@AndyCErnst
Jul 22 2014 23:08
Yes, but this is so much simpler than a blog so I wasn't sure it was the right route
Thanks, I'll look into assemble.io
Ivan Storck
@ivanoats
Jul 22 2014 23:09
yeah - assemble might be more js-y. also, who will be maintaining it long-term, and will they know grunt etc…?
Andy Ernst
@AndyCErnst
Jul 22 2014 23:12
One guy is an experienced programmer so knows "some" JS. Java is the strongest language at this place.
Ivan Storck
@ivanoats
Jul 22 2014 23:13
hmm.. maybe there’s an equivalent with maven or gradle… if you set it up right assemble could work, but you might want to check with them
Andy Ernst
@AndyCErnst
Jul 22 2014 23:13
The requirements for the site were very simple, but (as I should come to expect) they are growing. I'm looking into using keystone.js as a blogging platform, they mentioned something about twitter, and merchandising from the the site
Josh Cunningham
@joshcanhelp
Jul 22 2014 23:14
SCOPE CREEP! PULL UP, PULL UP!
Ivan Storck
@ivanoats
Jul 22 2014 23:14
lol
as long as they pay on time...
Andy Ernst
@AndyCErnst
Jul 22 2014 23:14
Yeah, the module that cures cancer and creates world peace is the tough one
Ivan Storck
@ivanoats
Jul 22 2014 23:14
lol
Andy Ernst
@AndyCErnst
Jul 22 2014 23:14
I'm working as an intern at a very, very low pay rate
Kevin Stephens
@kevinmstephens
Jul 22 2014 23:14
Angular has a directive for that
ng-worldpeace
Andy Ernst
@AndyCErnst
Jul 22 2014 23:15
I'm sure Emacs could do it too
Josh Cunningham
@joshcanhelp
Jul 22 2014 23:16
Also wp-cure-cancer is an option
Ivan Storck
@ivanoats
Jul 22 2014 23:17
but….ember has that out of the box …
Andy Ernst
@AndyCErnst
Jul 22 2014 23:17
Thanks. I'll see if I can do simple enough assemble.io that they can change it around.
Kevin Stephens
@kevinmstephens
Jul 22 2014 23:17
ember is #1