« first day (1686 days earlier)      last day (3266 days later) » 

1:00 PM
Well yeah, you only use libraries when they fit your use case
 
Jul 3 '14 at 2:06, by rlemon
but like I always say, re-inventing the wheel is excellent if you want to know more about wheels. otherwise useless.
 
if it's trivial to make a hammer, then it's available, don't lose your time
 
@Cereal hammer that unscrews nails? Hammer + lever with a gap to insert around the screw
 
I meant unscrews screws
 
Guys. None of you is good at hammers. Let's focus on code instead.
 
1:01 PM
My father made a wooden mallet once
 
Can someone tell me why using frameworks which actually promote bad practices like angular/react is popular? I really really want to learn :/
 
Everything's a hammer if you try hard enough
Haven't used either, can't say
 
@AwalGarg same as PHP
 
@JanDvorak Except that in PHP I am not forced to follow bad practices.
 
Angular2 is a lot less shit than angular1 -- I'd say it's worth giving a try
 
1:02 PM
PHP follows bad practices so you don't (technically) have to
 
user2620028
I have built over a hundred houses and used a hammer on every house for many things.
 
In any case, the only companies I see in the JS world who are not looking for AngularJS programmers are looking for worse...
 
The thing that irks me the most in PHP is the naming of everything... It's so god-awful
 
@NickDugger You mean god_awful, right ?
 
If you don't know how a hammer is built, you won't be able to fix it when it breaks.
 
1:03 PM
@DenysSéguret where "worse" is?
 
@DenysSéguret pls
 
@NickDugger you don't want to know why
 
strlen
pls
 
@AwalGarg Because it gets shit done and everyone uses the same shit in the same shitty patterns and produces equivalent shit, thus makes it easy to transfer code from one shitty developer to another. Yay for the shit.
 
@AwalGarg jquery
 
1:04 PM
mysql_real_escape_string FML
 
user2620028
typically if you break a hammer you were using it wrong and instead of fixing the hammer you need to fix yourself so that next time you swing you dont break another hammer.
 
@AwalGarg In my city, the high tech companies are entering the PHP era...
 
@JanDvorak gone from php7, ftr
 
finally
 
Guys. Really. Please talk about software and not hammers. Fuck hammers. That's analog.
 
1:05 PM
do you still need to mark your closures on every function they enter?
 
of course
 
@RoelvanUden What about great stuff that great people do in Vanilla JS (now-a-days likely with babel)?
 
user2620028
@Roel i shall proceed to fucking hammers. Now how about crowbars?
 
@AwalGarg Look at the broader community. Even in this room there is no real consensus on how to use vanilla JS. There are too many ways to do x, and that makes a collaborated effort look like piss. At least all jQuery code looks horrid, regardless of who wrote it.
 
There's a php7? The last time I used it was php5.4
 
1:07 PM
@RoelvanUden So if I am capable of writing good code in Vanilla JS, learning angular/react is useless in terms of productivity and getting shit done?
 
@AwalGarg If I want to use stuff you wrote for the project I'm also working on, I don't want to waste my brain cycles trying to figure out why you were trying to be clever. I want your code to have been produced in the exact same standard I used. Locking into some kind of way to do things like "the angular way" is very predictable and easy.
@AwalGarg Nah, it might accelerate a use case, plus you can bring other people on board and if you all write in "the react way" or whatever, all of you can work together much easier. Trying to combine a bunch of different styles together is no fun at all.
TL;DR: Its all about establishing a way to do things and sticking to it.
 
@RoelvanUden Fair point. What about projects that only I will be working on?
 
@AwalGarg Experiment. Learn. Play. Try everything out. If you need to maintain it, stick to "one way". If not, and it's discardable, learn as much as you can because thats how you come to ways YOU want to use.
I've rewritten my pet project 4x already, from scratch. Pointless in all ways, but I learned a whole lot by doing it. Each time I get closer to the "roel van uden way" of writing code.
That said, when I work on a company angular app, I write 'the angular way'
Because collaboration and maintenance and all that.
 
It's not about writing code you won't discard later. It's about writing code you won't get discarded for.
 
Oh boy look at that wall of ranting text.
 
1:13 PM
I'm rewriting the front end to one of my sites this weekend to use semantics UI. Just because I wanted to try it
 
@RoelvanUden nice, so what about the "vanilla js" "way" of doing things? Is it not as popular because it is difficult (to which I agree) to get to in comparison to angular and react?
 
    var overall = [].reduce.call(scores, function (p, c) {
        return Math.ceil(~~p + ~~c ));
    });
returns 700
    var overall = [].reduce.call(scores, function (p, c) {
        return Math.ceil(~~p + ~~c ) / 7);
    });
returns 3
 
The hell does a tilda do
!!mdn ~
 
@FlorianMargaine it's a string element with the value of 100
 
1:16 PM
@Cereal bitwise negation
done twice coerces to int32
 
Ah
 
!!tell cer mdn bitwise not
 
@StevensHaen what's p at the first iteration?
 
I know bitwise, bitwise negation was the first thing that came to mind, but there were two so I wasn't sure
 
1:17 PM
@FlorianMargaine t's a string element with the value of 100
 
@StevensHaen are you sure?
 
@FlorianMargaine yes, let me double check still
 
@AwalGarg You usually have some kind of thing you want to accomplish. Writing a bunch of glue code to synchronize some kind of JS model with the UI? That's boring. A good exercise, but why bother if there are better ways other people thought and build? In the end, it's a balance between learning and productivity. If you're in a business setting, the productivity end always wins. Otherwise, it's often the learning end.
 
@StevensHaen you might want to supply a starting value
 
1 min ago, by Florian Margaine
@StevensHaen what's p at the first iteration?
 
1:18 PM
 
@FlorianMargaine sorry; just making obvious
 
@AwalGarg And of course, if you wrote something using one of the thousands of "vanilla" ways, you can't easily get help when you're stuck. You'll need to explain the ENTIRE thing (and many won't bother then) to get some help. If you basically say "I have this angular app..." everyone familiar with it knows the setting, context, binding mechanisms, dependency injection, directives system, etc.
 
Oh, a Dart question...
 
@RoelvanUden Agree with all of that except > there are "better" ways... this is where I get lost. I don't really find better ways anywhere.
@RoelvanUden yeah that makes sense.
 
@FlorianMargaine return Math.ceil((console.log(~~p) + ~~c) / 7); returns 100
 
user4861400
1:20 PM
Hello guys, How can we store the input data in cookies with javascript. Actually i m new to it and just a child
 
@AhmadTaha Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@StevensHaen add a console.log('p value: ' + p);
and see what p value is at the first iteration
 
@AwalGarg Correct, "better" is an opinion. All programming is essentially opinion based, it's just a way people are familiar with. It's not better, per see. You are entirely correct to confuse on that :)
 
@FlorianMargaine s/ + /,/
 
@AhmadTaha yes. Why?
 
1:21 PM
@FlorianMargaine p value: 100
 
@JanDvorak same
@StevensHaen jsfiddle?
 
@AhmadTaha hey I am a child too! hi :)
 
user4861400
i am creating a project and i hjave to create a login sign up form without using PHP
 
@AwalGarg In the end, you need to establish your goals. From learning to productivity, from solo to massive collaboration, and whatever your business case and needs are, other solutions may triumph. We have a thousand and one different solutions because they all have their unique characteristics. You decide in the end, anyway.
 
what's "class VIII"?
 
1:22 PM
I don't know how to respond
 
@AhmadTaha I don't like cookies. localStorage?
 
@FlorianMargaine I imagine grade 8
 
@FlorianMargaine A fiddle will be very tough, since I'm pulling values from localStorge as well. I can give you the array, but it's an array-like object actually. I'll try though
 
user4861400
Yes class VIII
 
@FlorianMargaine Just felt on this:
34
Q: jshint "Possible strict violation." when using `bind`

Florian MargaineConsider this simple code: "use strict"; var obj = { f: function() { this.prop = 'value'; g.bind( this )(); } }; function g() { console.log( this.prop ); } If I try to validate this code, jshint gives me the error Possible strict violation. where I call console.lo...

 
1:23 PM
@DenysSéguret hehehe
 
@RoelvanUden so say I get this library X and I don't like the way it does things. What do I do, just suck it up, get used to it and tell myself consistency > all?
 
jshint doesn't like this
function doCommand(ct){
        return this.listRoomUsers(ct.shoe.room.id).then(function(names){
                ct.nostore = true;
                ct.reply(
                        "Room users:"+names.map(function(u){ return "\n* "+u.name }).join(''),
                        true
                );
        });
}
 
^^
I know :P
 
@AhmadTaha live in India or Pak?
 
user4861400
India
 
1:24 PM
@rlemon how old is that?
 
11-12?
 
@AhmadTaha greetings from the same country. enjoy your stay. @rlemon is the bartender here.
 
@DenysSéguret hmm
 
@AwalGarg If you want to stick to "the X way", yes, suck it up and get used to it. After 4~5 days of full time using it, it becomes a second nature anyway! I've adopted many styles and ways of doing things over time, it gets easy after a few days of fiddling with a thing. If you don't want to stick to lib X and the X way, try something else! But remember, learning/producitivty and all that.
 
1:24 PM
You should incorporate babel into the build that'd be fun.
@AwalGarg me and florian have a Q&A on programmers.se on that.
 
user4861400
@AwalGarg Where do you live means in which state or city
 
I live in Canukistan in the grate state of Ontario
 
@DenysSéguret function inside a loop? I disable that warning
 
,
 
1:25 PM
lol, @rlemon you drunk bro
 
@JanDvorak I think the this is what triggers jshint here
 
@BenjaminGruenbaum soon
 
jshint doesn't know I love call
 
well, tonight
well, this evening
 
@RoelvanUden makes sense, thanks :)
 
1:26 PM
Perhaps jshind doesn't like call
 
@BenjaminGruenbaum reading up
 
@FlorianMargaine jsfiddle.net/Lbv99g2t. Doesn't work like my console though
 
user4861400
Can anybody tell me how to store the input data in session storage
 
@AhmadTaha Delhi, yourself?
 
@AhmadTaha sessionStorage.sth = sth?
 
user4861400
1:29 PM
@AwalGarg no Aligarh
 
@BenjaminGruenbaum nice, +1.
 
How many else-if's is too many?
 
crl
42
 
srs onlee pls
 
crl
1:32 PM
right sorry I'm jr
 
@NickDugger When it becomes hard to follow.
 
I think what I really need to do is stick some of this code into their own methods, instead of it all being in the main method, in an if
 
@NickDugger I find one elseif to be too much, usually
 
crl
alternatives to many else if are a switch/case or a map?
 
I don't remember ever needing elseif in js
 
1:34 PM
@crl also, polymorphism
 
Haha I myself use elseif way too rarely. Mostly return early suffices.
 
if (Util.isBlogs()) {

} else if (Util.isHome()) {

} else {

}
 
if (...) ... return
if (...) ... return
...
 
switch(true)
 
lucky day!
 
1:36 PM
Relevant
 
@MirkoCianfarani Localized love life?
 
@RoelvanUden I changed the code to this; much better
 
return early is nice.
unnecessary indentation is a FAD.
 
return this; is also nice
looks like an english phrase, and chaining
 
Yeah stop bastard girls and love too anime Nozomi!
 
1:40 PM
@SomeKittens just watched your five minute angular talk. nice. start off a little shaky (voice jumps a bit) but 45 seconds in you got it.
 
profito
 
if only I used angular..
 
@SomeKittens you don't look like homealone kid in that talk :/
 
I fear the 'talks' I will give will probably not be coding related
you all know as much or more than I do :P
I'll teach you how to make a home made pizza
and how to root tree cuttings
 
I can play musical instruments. I can serenade you all instead of a talk
 
1:41 PM
@rlemon cough... cough...
 
@MirkoCianfarani You should get a PS vita if you like those games. Pretty much the only thing published on it nowadays
 
or teach us simple cords
 
user4861400
I am new to it and i have a question
 
user4861400
is it a programing place
 
user4861400
or a chatting place
 
1:42 PM
mostly chatting, with the understanding we all enjoy programming to a certain degree
 
Okay everybody, grab your ukulele... oh, you don't have a ukulele? Get out.
 
user4861400
everybody is not serious
 
Nicks gonna pass out Ukes beforehand?
 
user4861400
I think StackOverflow has restricted
 
main site does.
chats are less formal
 
user4861400
1:43 PM
Nobody is answering my serios question
 
because either nobody cares, or nobody knows
you choose :D
 
@AhmadTaha Show us your attempt
 
also, you've already been suggested localStorage > cookies
 
!!tell ahmad mdn localstorage
 
1:44 PM
@BenCraig Psht, no... I spent a hundred bucks on my uke
 
ohhhh I know! I'll refine my automated cat toy laser thingy and do a video on how to build and program it
works on dogs and babies as well
 
And drunk people
 
and fish.
 
I was surprised. fish think it's food and chase it
 
user4861400
1:46 PM
@CapricaSix can you explain with an example
 
!!youtube fish laser pointer
 
@AhmadTaha localStorage.getItem('im_a_bot');
 
beep boop
Cap should totally have an automated response if someone responds with "example" to an mdn tell
 
yeah I will have a physical life with this nozomi
@Cereal please you save me :P
 
@NickDugger oooh nice!
I dont spend much money on things
except school
 
10/10
 
please sir, star them both
 
You can't tell me what to do
 
you are very very bad person, sir :(
 
Too many pinned messages; nothing starred is shown\
 
1:51 PM
there
bumped off the RFC as it is pretty well agreed on that we're implementing it
 
@RoelvanUden get a better screen
 
after today the AMA can be bumped as well.
more people need to join the book club.
 
I won't
 
why not?
 
@FlorianMargaine My screen is good :-(
 
1:53 PM
chat by default is bad :(
 
@rlemon I don't read books
 
why not?
 
@AwalGarg use my color userscript
 
or use my dark theme
 
1:53 PM
@RoelvanUden you have a small resolution
 
@JanDvorak link
 
@FlorianMargaine 1080p
 
@rlemon your theme doesn't look nice on my low res screen
:(
 
I need to clean up the JS bits as well.
:(
 
I will use it when I get a better screen.
 
1:54 PM
been very lazy
 
someone of you has a 4k screen?
 
I see the same number of stars when I'm on my laptop, not on my monitor
 
does this chat provides an irc point as slack does ?
 
no
 
1:55 PM
@RoelvanUden which browser is that ?
Edge ?
 
I see only 3 starred sentence and not 10...
 
firefox
 
@Abhishrek Firefox
 
ewww ffox doesn't look that shitty
 
even with my rooms expanded
I see a decent amount of stars
 
1:56 PM
@AwalGarg apparently userscripts-mirror didn't catch that ;-( will reupload to github
 
@RoelvanUden click on the "show all" link?
 
@Abhishrek Say hello to FF on Win8 :)
 
@JanDvorak what does it do?
 
@RoelvanUden i have firefox on windows 8 :-/
 
@AwalGarg Yeah that's a different window which sucks :p
@Abhishrek Well that's what it looks like by default.
 
1:57 PM
oh okay i have firefox developer edition\
 
@Zirak hey google music does!......
 
@RoelvanUden sorry "show 6 more"
 
@rlemon but in lubuntu exist Google Chromium and not Google Chrome
 
@AwalGarg it assigns a background color to each user
 
I think more would if it supported at least IE9
but yeah you're right :P
 
1:57 PM
lubuntu or kubuntu is always Chromium
 
@MirkoCianfarani you can install chrome
 
Then Chromium is a fake of Chrome? :D
 
@JanDvorak how does it decide whether the color assigned is not ugly?
 
chromium is open source chrome
but you can install chrome if you want
it just isn't in the ppa registry or w/e
 
!!google difference between chrome and chromium
 
@AwalGarg it picks randomly from #C0C0C0 to #FFFFFF
 
Chromium even has a page on it
 

« first day (1686 days earlier)      last day (3266 days later) »