« first day (2035 days earlier)      last day (3138 days later) » 

08:01
@BartekBanachewicz best storage mechanism ever
@BartekBanachewicz Sounds like a good idea to me :P
peace vs safety ?
debate begins....
Can somebody help me with this? stackoverflow.com/questions/37180464/…
Laws don't really care about either of them.
The peace is the safety. They go hand in hand
08:03
A country willing to trade essential freedoms for more safety will get neither of them
hey i want to store fontawesome.css file in localstorage.so i want to load it only ones.but maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/… request other 3 files.can i store all 4 files.but i don't know url of other 3 files.
@JanDvorak that's a quote. Who said that,?
Probably ben Franklin
@JanDvorak now i remember.
> If all printers were determined not to print anything till they were sure it would offend nobody, there would be very little printed.
08:05
> Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety.
@Mathematics especially the ones that put you in prison if you don't pay taxes
huh
That's why guns are such a hot topic these days. Guns provide safety and at the same time threaten the safety of others
@FastSnail Please don't do that
Browsers cache resource files
Law primary objective is maintaining the integrity of the country
08:07
@BenFortune but each time i refresh page i see font file is taking lot of time load.i'm testing it on localhost.
anyway lets ignore laws for now ?
someone could guide me with this ?
not until you solve my code golf
(because I incidentally really need it)
I don't like golf though...
^
I also am working on something that I need help with
@Mathematics I hope you know Java, because boy are you going to need it!
@Neil I don't like Java either :|
08:10
@Mathematics that's fine. I charge 30 euros per hour
Now, how can I help?
that's surprisingly low
@Neil I'd imagine a robber with a gun would be more tempted to shoot you, if you were armed.
@BartekBanachewicz I agree, my rate is 50 euros at least...
So, guns don't only provide safety. They provide a increased risk of getting shot.
@Mathematics Mine is 60 typically, so yeah ballpark
08:11
@Neil who told you I need help with Java
But then again there are a lot of people who charge 2-3x that; with a lot more experience, granted but
@Cerbrus I'd also imagine that a robber would avoid the house entirely if he thought the owners had a gun
@BartekBanachewicz you could probably charge more than that, given your skillset
@Neil Then there'd be no break-ins in texas.
@Mathematics no, I need help in java
08:12
Robbers aren't generally known for having common sense ;-)
I do you one and you do me one
@GNi33 I probably could, but then again I'm really not helping with code for the money; I like the challenge and teaching people new things
s/Robbers/Humans/
key to not dying if you do have a gun: never point the gun at people, only fire the gun at people. tv is stupid
If someone said he's a student and can only pay me a half of that I wouldn't hesitate for a sec if what he did was interesting
08:13
@Cerbrus then by that logic, we should let them pillage as they please
@BartekBanachewicz oh, you charge 60 for a teaching job?
@Neil No, that's not what I'm saying.
okay, that's different then I guess
I'm saying: if I were to rob a group of people, the ones that are armed would be the ones I'd hit first.
08:14
I wish my regular work rate was 60/hr :P
I'd need to move to Switzerland to realistically earn that much
Them being armed means they are at a higher risk of getting shot -> Guns don't only provide safety.
@Cerbrus assuming you're a rambo and can take an armed group of people alone
(I've watched Rambo III yesterday for the first time and the series is great)
The first one is brilliant
the rest is a little meh imo
The first one didn't have annoying kids or thai gals
@BartekBanachewicz I'd probably get shot before I could inflict any damage. Still, people that have a gun are a priority target.
08:16
but OTOH the 2nd and 3rd have way more helicopters in them
Get to da choppah!
You can have that in CZK if you work as a road worker here
The heaviest thing you can see in the 1st is a heavy MG
@Cerbrus well that's looking at the issue superficially. If you are a robber for a living and 1 in 3:houses have gun owners and you regularly get shot at, you may consider a less risky line of work like stealing cars
@BartekBanachewicz opengl has a small typo mean -> "means"
08:18
gah, I suppose there's a lot of typos there
@Neil 1 in 3 is still better than nothing though
I keep changing those things
Also ugh for..in isn't sorted, right.
Besides, who hasn't boobytrapped their car, nowadays?
@BartekBanachewicz the first one still had an interesting background to it, like the treatment of Vietnam veterans and a troubled protagonist. That lacked completely in 2 and 3, which just have been action movies. Still enjoyable, of course
then John Rambo was great again
@GNi33 In the 2nd one they aborted the extraction because revealing the prisoners held there would have a negative impact on the view on war.
08:21
greetings, programs!
does someone have experience with webix? Looks really interesting, is it worth to take a deeper look?
I remember a pensioner who booby trapped with a crossbow after having been robbed several times. The law enforcement were not amused after the robber got shot and turned him in.
@BartekBanachewicz Properties don't have an order do they?
yeah, it had some interesting parts in the buildup of the storyline, but for me, those got lost very, very quickly
@BenFortune nah. So there's Object.keys
I suppose I can reduce that then
08:22
The intention was for Rambo to commit suicide at the end of the first film, but they ultimately decided against it for the potential of future films
really?
Always leave a sequel hook
@GNi33 yep
oh wow, yeah, just read about it
interesting
var sorted = Object.keys(this.arr).sort();
return sorted.reduce(function(acc, key) {
   acc += key + ': ' + this.arr[key] + '\n';
}, '');
what do you think
08:23
they even filmed that ending
but threw it out because the test audience didn't like it too much, according to wikipedia
@GNi33 oh that I haven't seen
now i want to see the movie with that ending
would give it a different spin
I wonder if it is laying around youtube somewhere
wait fuck
I can't use this there
UGH.
@BartekBanachewicz Arrow fn
08:25
I have to support Node 0.10
I think the idea was that Rambo was the perfect soldier to the point of cracking
that vOv
I don't have time for games.
Having him live just means that he was just the perfect soldier
08:26
Node 0.10, please die in a fire. Cheers, Bartek.
@BartekBanachewicz you can if you put .bind(this) after the closing brace of the function
@doug65536 ah hm
no parens required?
shouldn't be
eh I think the that version is cleaner
yeah, a closure variable called self or something is fine too. for quickie stuff .bind is ok
08:27
@Neil well, that's why I like the first one so much. He was a decorated and "good" soldier in Vietnam, fighting for his country just to come back and be rejected by this country completely, up to the point that he can't even get the most mundane jobs to keep himself over water
people do not want him to be around, and the sherrif himself steps over several borders of law to "keep his county clean"
the closure probably runs faster, if that matters
he finally has a breakdown and is forced to use his skills again
Those things kinda lack in the follow ups
probably because they were just written to be good Action movies with the first one being a very influental movie in this genre. And they probably don't have an underlying book
I am about to say something very unpopular: they should have stopped after the first rocky
haha, yep... unpopular :D
first Rock, best Rock, definitely, but I think at least the second one was necessary
The ones that followed tried too hard to replicate the success of the first, and it lost a lot of humanity points that the first one had
08:33
is there anyway to find if a js file is cached in browser(firefox)
got a question for you brainy-types: I have a process where I create a new object thing2 = new thing_template(param1, param2) then modify properties of that object: thing2.other_param = 1 and then finally call a method on that object: thing2.jump_in_lake() ... is it possible (or practical) to create a function (or another constructor) that would allow me to build more objects based on a set of passed parameters..
something like: `function maker(name_of_object, param1, param2, other_param) { // pass 'name_of_object' as .. name_of_object = new thing_template(param1, param2)...and so on... or am I just feverish?
@FastSnail Try to load it and see if the server gets a clue
@FastSnail you can click the little gear icon at the top right of the debugger and check "disable cache (when devtools open)" to make it redownload everything when debugging
@FastSnail put the file in browser and check download time
@JimmPratt you might be looking for the factory pattern
08:36
googles factory pattern
@doug65536 i don't want to avoid caching. i want it.but unfortunately it seems that file is downloading every time.file is font awesome css file.it takes about 600ms to 4s.
ah ok. it sounded like you had a problem where it was not getting the latest version of stuff in the debugger
why wouldn't it? does it have an e-tag?
i saw that patting! :P
thanks @Jan... that seems exactly what I need to solve my SO question stackoverflow.com/questions/37066665/…
@FastSnail better question, do the response headers force the browser not to cache it? check!
@doug65536 the whole point of the factory pattern is to separate the creation of an instance from its usage
08:41
doug has the same problem?
neat
So call the factory, and use the returned value in the same way regardless of how it was created
two birds with one stone! \o/
@Neil I think you have the wrong guy
@doug65536 uh, mobile
@doug65536 i think so too :)
08:42
My fat fingers on mobile phone :(
* @returns {undefined} looks meh, but I suppose could be useful
do you add that to your functions?
@doug65536 should i write some code to tell browser to cache files? in the responce header of fontawesome.css there is a param cache-control=max-age=31104000
no you don't have to make that happen from js. you make that happen from the server, in the response headers
@FastSnail Already said, browsers cache resources (unless explicitly disallowed).
08:46
you can prevent caching by making the url change unnecessarily, but the server provides the headers that make caching happen
also TIL about peerDependencies, cool!
@FastSnail ok, but are there any other headers that say something else? like no-cache
it isn't uncommon to have multiple different things screwing around with cacheability
@BenFortune but each time i refresh the page .font awesome css file take about 600ms to 4s.and i can see it in browser console networktab.so browser should do but for some reason it doesn't
the download size should say (cached)
@FastSnail refresh? lol
click in the address bar and hit enter
@doug65536 in my main php page yes there is responce header parameter no-cache
08:50
that shouldnt affect the font
I use strong e-tags for all my resources. after 1st load everything is cached, even ajax responses
@doug65536 ohh when i open it again it works.i see "cached" text in network tab.so problem was i refresh the page.i thought there is no difference
@doug65536 doesn't refresh use cached files?
no, refresh tries harder
refresh is the "come on man, update the damn page" button
hmm ok i got it.tnx you so much
08:56
@JanDvorak I've also run across something called the All-in-One constructor... code-wise looks similar.. any known advantages or disadvantages between the two?
I've just imagined a factory worker assembling an all-in-one PC
i have a Mac Color Classic II - great little all-in-one
I would imagine this thing having a CRT screen (yuck) and like 32 MB ram tops
given the images Google shows me
God, there is so much boilerplate here
09:01
33MHz CPU, nice
speed demon
goes back to grokking factory method
i hate promises lol!! Officially! Morning all :)
In Javascript you can send a method a giant options object. In languages without named arguments you wouldn't send a method ten thousand arguments and use a builder pattern instead
@KirstyHarris I promise I won't talk ab... oops?
@JanDvorak turns out I can't be there until 8:30
Is that OK with you?
@JanDvorak not here to ask questions lol... im just making a statement in general ;)
09:06
@KirstyHarris oh dear. Yesterday you were saying the opposite
If you have things to do it really doesn't matter
But it could have been nice
well i like them, and i dont @Neil lol
@towc In that case I'll likely be heading out from Zahradní mÄ›sto. Do you like nature?
Oh yeah, I love it!
Let me google maps it
uh writing manual for loop on arguments object because performance
#justjavascriptthings
09:09
@KirstyHarris the alternative is callbacks. You evidently have not yet seen the horrors that are callbacks
@neil nope i havent, tbf Promises seems the right direction in where i need to go, its how i best use it. Im just reading up on HTML 5 rocks about them now and a couple of articles again that rlemon sent me yesterday
That's so much further away 0.o @JanDvorak
Google maps says 1h
ive learnt more JS trying to do this task in a week than in my whole life. Hey at least if i walk away with something from it is that i enjoy JS, even thou i know very little ha :)
@KirstyHarris promises are advanced concepts. If you get it, you should be proud of yourself
G2g again
09:12
@neil i get some of it, and i dont get other bits... tbf im happy knowing how to do a function and a variable better, thats a plus point lol
There are plenty of js programmers that don't use them
really? I thought it may be a popular thing these days reading up on it
@KirstyHarris well what else are we geeks going to talk about? Sports?
@KirstyHarris those two aren't mutually exclusive
JS is popular but there are plenty of programmers who don't use JS.
Let that sink in for a while.
@neil .... hey, sports are equally cool... or peoples discussions on game of thrones lol..... @BartekBanachewicz i am one of them lol.... well im not a programmer lol, front end more... give me HTML and CSS anyday.
09:15
Hi,
Is this simplification correct ?
a && (b || (c && d) || (e && d))

a && (b || (d && (c || e)))
@KirstyHarris meh. You may not like it, but I would peg you as a programmer of sorts
@KirstyHarris If this was meant to be read literally, you'd be seen as hysterically laughing mid-sentence.
@Zombievirus I don't know
Cut down the "lol"s really.
@BartekBanachewicz lol ok
09:16
i did laugh a little lol @BartekBanachewicz
We're all professionals here, aren't we. ;)
speak for yourself
absolutely :)
I'm just a dog
09:19
@Neil y
although ive recently for the first time done some CSS3 animation, i found that pretty easy compared to JS lol
@BenFortune ugh
@KirstyHarris CSS is declarative and way more high-level, that's to be expected.
i wouldnt say that lol, but ive just applied for a basic course in JS, 14 weeks doing an array of stuff so hopefully i may learn something more lol
@KirstyHarris they still love you though
09:24
they put up with me more like lol :P
@Zombievirus seems legit
We need a lol counter for Kirsty ;)
oh yea i just realised ive used it nearly 6 times already, oops XD
I think we really do
@towc Better tell me where I should go and I'll go there and even look up a beer hole
how about a browser plugin that plays a laugh track whenever someone says lol
1/8 of her messages contains "lol"
I count 12
09:28
@doug65536 doable, probably not worth it
ok, its overused.... i will say cwfl instead
!!urban cwfl
@JanDvorak No definition found for cwfl
I guess it would be something like "crying with fucking laughter" or so? no clue
roflmao
09:28
yea @GNi33
just use topkek
is catch only used to get the error in a promise?
catch is like then(undefined, function(err) { ... })
@doug65536 no
@JanDvorak no? what's the difference?
he means .catch, not try catch I think
09:32
the two-argument then thing works, but it's not the best option and I don't know if it's a jQuery-only thing
@doug65536 it skips all the thens until it hits a catch
no, .then error handlers are the same thing
@JanDvorak I think not. MDN says they are the same. Haven't checked spec.
.catch is just sugar for .then(undefined, fn)
two-arg .then is just sugar for .catch
09:33
> The catch() method returns a Promise and deals with rejected cases only. It behaves the same as calling Promise.prototype.then(undefined, onRejected).
you realize that every promise has TWO outcomes right?\
at once
resolve/reject, on ONE promise
one or the other happens, that is why it makes sense for .then to take two callbacks
sure, errors flow through the chain and get handled further down, okay, but the two-callback thing is a direct result of the two possibilities
no. ;-)
lol? :D
Let's agree to disagree, ladies and gentlemen
Let's not.
09:39
@doug65536 The error in your handler flows through the chain. The error in the promise doesn't.
Monads.
How many ppl here are familiar with Fantasy Land?
!!urban ppl
@JanDvorak ppl a shorter word for people or peeps
!!urban TMTOWTDI
@doug65536 [TMTOWTDI](http://tmtowtdi.urbanup.com/581751) There's More Than One Way To Do It.

This abbreviation of the official motto of Perl is frequently used on newsgroups and mailing lists related to that language.
[\[www.faqs.org\]](http://urbandictionary.com/define.php?term=www.faqs.org)
09:40
lol
somehow I thought it wouldn't find some old perl thing
for(<>) ...
I prefer KISS.
"KISS" is a silly rule because it doesn't essentially tell you anything worth following or doing
DRY/YAGNI/SOC (don't repeat yourself, you ain't gonna need it, separation of concerns)
09:45
Yet "Occam's razor" is somehow a big thing.
DRY is also overused because people seem to assume it holds always
@JanDvorak You know what's a big thing? Writing maintainable software without all those silly rules
@BartekBanachewicz and how do you define "maintainable software"? :)
Take those "silly rules" as "good ideas that work most of the time"
@BartekBanachewicz your coworkers apparently don't think that ctrl-v repetition is a dev tool
I have to debug stuff that uses hiddeous plugins. the ctrl-v horror is real
> Always code as if you couldn't use copy/paste
09:49
"hey what I have to do is similar to that other thing!!!" <copies entire file and commences changing stuff>
@BartekBanachewicz Nor does TMTOWTDI.
@doug65536 welp
@FlorianMargaine Software where the time to add a new feature or fix a bug is a constant or very slowly raising instead of skyrocketing on an exponential curve throughout the project lifecycle
@BartekBanachewicz and how do you make it so?
I prefer the time to add a feature to slowly decrease
@FlorianMargaine Well, for one, small codebases are nearly always maintainable
09:51
@doug65536 You know, just an hour ago, I saved a webpage (File > Save), replaced some text and image, and deployed it for boss's urgent meeting.
So carefully watching project scope, removing dead/unused code, relying on 3rd-party support would be my first checklist items
@BartekBanachewicz You just said the asymptotic behavior is always good for small arguments
The less code you have, the better.
@JanDvorak And so is the exponential curve :)
Hence, ironically, writing small codebases in an "unmaintainable" style makes them more maintainable as long as they stay small
This mostly relates to architecture, though, consistency and naming work across all sizes
Hmm, actually I'd say that's my personal Bartek Software Acronym
Modularity - Consistency - Naming
@BartekBanachewicz true, and most of the guidelines about making software are related to making you stay productive in the long run
I'm a little late to the discussion i guess, but i agree with @JanDvorak on the "good ideas that work most of the time" thing here, @BartekBanachewicz. There's a reason those rules are popular, e.g. keeping DRY in mind is a good idea for new devs, which probably don't know how to code clean. Saw some guy use this, really horrifying..
function init1 () {
    var imageone = document.getElementById("Zero");
    imageone.onclick = showAnswerone;
}

function init2 () {
    var imagetwo = document.getElementById("One");
    imagetwo.onclick = showAnswertwo;
}

...
09:55
This smells of a microservice design
@BartekBanachewicz what's "small" for you?
That's what she said
(it's obviously relative)
@ClemensHimmer The funniest part is that it isn't necessarily bad
@BartekBanachewicz wat?!
Legitimate code duplication is a pretty complex and delicate thing
@ClemensHimmer yeah, and, people naming things by where they are instead of what they are. like, field1, field2
09:57
@BartekBanachewicz well, in the context it absolutely was :) but still, i wonder, how do you think could there be a scenario where this kind of coding is acceptable/good?
@ClemensHimmer 'unnecessarily generalized when a difference in behaviour is expected'
@doug65536 oh boy yeah.. :D
my favorite is when people use "field" in the column name in a table. qtyfield
Everyone saw duplicate code. How many people saw code that turned into spaghetti because someone wrongly eliminated duplication, which later required extreme steps to shoehorn into one generic way?
everyone, too
09:59
it's much more subtle IMHO
@doug65536 I have seen names like bszf or flb, which are the first letters of Chinese pronunciations for the terms. That even the author can't remember.

« first day (2035 days earlier)      last day (3138 days later) »