« first day (419 days earlier)      last day (4512 days later) » 

3:00 AM
@Purmou Okay. Have you heard of separation of concerns? Do you understand it enough you can explain that to me?
 
separation of concerns? no idea what you're talking about.
 
if you cannot explain to someone else , then you do not understand it
 
That's why you don't understand the issue.
 
I used the worst possible google search and the first link explains why onclick in html is bad very well
 
In computer science, separation of concerns (SoC) is the process of separating a computer program into distinct features that overlap in functionality as little as possible. A concern is any piece of interest or focus in a program. Typically, concerns are synonymous with features or behaviors. Progress towards SoC is traditionally achieved through modularity of programming and encapsulation (or "transparency" of operation), with the help of information hiding. Layered designs in information systems are also often based on separation of concerns (e.g., presentation layer, business logic...
Progressive enhancement is a strategy for web design that emphasizes accessibility, semantic HTML markup, and external stylesheet and scripting technologies. Progressive enhancement uses web technologies in a layered fashion that allows everyone to access the basic content and functionality of a web page, using any browser or Internet connection, while also providing those with better bandwidth, more advanced browser software or more experience an enhanced version of the page. History "Progressive Enhancement" was coined by Steven Champeon of [http://www.hesketh.com hesketh.com] in a ser...
 
3:01 AM
You need to understand separation of concerns before you go any further with your code.
 
@Incognito are we talking about onclick here? Because that's not what I was upset about
 
Right, but you need to understand why onclick="foo" is going to murder you in your sleep one day when you aren't expecting it.
 
One thing about the internet, you can't always get the information you want without being criticized for totally unrelated things that you don't want to hear... @Purmou
Sorry, I didn't make it that way @Purmou
Isn't that a bit of an understatement? @Incognito
 
@Anfurny If we never received any criticism we could never get better.
 
@Anfurny this chat is vicious. I don't even know why I hang out in here.
 
3:04 AM
Haha, just don't take anything too seriously @Purmou
 
criticism or redundant personal attacks :P
 
@Purmou Am I being vicious?
 
I wouldn't say vicious, but it's kind of controlling.
 
I think he referred to teresko not incognito :P
 
@Incognito No, you'r being very helpful. whereas teresko doesn't know how to be helpful. it's probably a lack of any remote social skill.
 
3:05 AM
It's like if I go into home depot and ask "Where can I find green paint?" and them am lectured on why green is the ugliest color and I'll regret it forever...
 
If you don't understand basic programming concepts then the advice is generally gonna be "understand the basic programming concepts"
I'd say separation of concerns is a pretty basic, fundamental programming concept
 
@Purmou it's just me and @tereško that are assholes
 
I come here people competent people can show me the problems with what I'm doing. I've become noticeably more competent with javascript in 8 months of hanging out here
 
heh
 
@Raynos you're not an asshole, at least not to me
all teresko does is tell me how fucking stupid i am
 
3:06 AM
 
that doesn't help at all, and he calls himself a programmer?
 
@Purmou your pretty fucking stupid o/
 
ok can we stop with the drama and get back to Arrays vs DOMCollections and NodeLists
 
I like drama :(
 
Separation of concerns is one of those subjective things though, and there's no reason he can't get his current question answered and make up his own mind on THAT issue later.
 
3:07 AM
if it has .length it doesn't make it an array @Purmou
 
its 5 AM , im here for the lolz
 
How is making your code easier to maintain subjective?
 
I think @tereško is pretty cool.
 
@Esailija teresko threw some array bullshit at me when I already knew that
 
ok so where are we at now
 
3:08 AM
// The only difference between arrays and nodelists
Array.prototype.isPrototypeOf([]); // true
NodeList.prototype.prototype.isPrototypeOf(document.getElementsByTagName("div")); // true
 
i don't know. i'm complaining because teresko's a dumbass.
 
@Esailija Can we also talk about the array int32s?
 
sure
 
but people are telling me not to take his attacks personally
no idea how this works, because we're all human
 
@Purmou if you knew it , the why did you wrote this ?
6
A: JQuery select element if *any* attribute matches

Purmouvar elements = document.getElementsByTagName("*"); for(var i=0;i<elements.length;i++){ var element = elements[i]; var attr = element.attributes; for(var j=0;j<attr.length;j++){ if(attr[j].nodeValue == 'author'){ element.style.backgroundColor='red'; } ...

 
3:09 AM
because we can still check the length of document.getElementsByTagName("*")
AND IT OBVIOUSLY WORKS
 
I understand some people in these chats can be harsh but (a) this is the internet, this is really the first time you've encountered harsh people? (b) you have the ability to ignore any person by clicking on their name in chat and selecting 'Ignore user'
 
Well, there's a whole school of thought that you should keep the code close in proximity to things it works on. And there's the separation of concerns school. And they're both pretty subjective until I see somebody conduct a scientific study on it. @CharlesSprayberry
 
so what the hell are you talking about specifically?
 
@Purmou
 
i think this is where i give up ...
 
3:10 AM
Just because most people here are rude doesn't mean we shouldn't strive for a higher level.
This is SO, it's supposed to be a respectful and helpful resource.
 
Well just because it works doesn't mean it's fine to do
 
@Anfurny EXACTLY
 
And just because you feel you're being personally attacked doesn't mean you shouldn't listen and learn from the people who know more than you do.
 
// cache length
var len = elements.length; // length only accessed once. fast
for (var i = 0; i < len; i++) {

}
// length accessed for every iteration of loop. really slow
for (var i = 0; i < elements.length; i++) {

}
 
@Esailija That's the craziest thing I've heard today
 
3:11 AM
@Raynos THANK YOU
 
I'm gonna star that in irony
 
@Anfurny, how so?
 
THAT IS ALL I WANTED TO KNOW
 
people were telling you this for half an hour
 
@Purmou the main thing you need to know is that .length is not a cheap operation on a NodeList because a NodeList is live. This means that the nodeList reflects the live state of the document. So every time you access .length the nodeList has to double check whether the .length property is correct by recalculation it
 
3:12 AM
Because when it comes down to it, programming should be a black box. It doesn't matter what happens inside, all that matters is what goes into it, and what comes out.
 
@Anfurny I'm here to learn. I don't learn from assholes. Who does?
@Raynos Thank you.
 
Just don't take anybody here too seriously man, it's the internet afterall
 
for the love of god
 
1 hour ago, by tereško
each time you access elements.length , it will recalculate said lenght
 
of course it's the internet
who gives a shit
 
3:13 AM
@Purmou teresko has a point. You didnt listen the first time
 
this is a sophisticated community
 
@Purmou Second craziest thing I've heard today....
 
He just assumes your good enough to get the big picture from a vague explanation :D
 
that's the problem then, isn't it?
 
and if you fail that test he will treat like a retard
 
3:14 AM
RT @IE: MSDN IE blog: Moving to standards based Web Graphics in IE10 http://bit.ly/uypfdX #IE10
 
SO strives for that ideal, but it falls far short. What I'm saying is you can't really make the internet clean, respectful, positive, whatever, and neither can I. But what you can do is see how it is why it is and learn to filter out 95% of the crap on it.
 
@Anfurny Until you need to slightly tweak that black box.
 
(And 95% of the people, opinions, websites, search results, whatever)
 
@Anfurny, I am sure you are aware of that code has much, much more qualities than simply being a quick hack that works good enough for now. It also needs to be maintainable, efficient and so on
 
Well tweaks on the black box are inputs in the black box @Incognito
 
3:15 AM
...
 
look at thedailywtf.com
full of working code
 
76
A: How can you explain "beautiful code" to a non-programmer?

user21007Language analogy Think of your most favorite story. It is probably beautifully written. To a non-English speaker, just because they can't understand it or comprehend why it is beautiful doesn't detract from its beauty. Construction analogy Consider a shoddily built house. It has doors and wind...

 
Is your analogy blackbox=language or blackbox = program?
 
@Anfurny code has to beautiful
 
this is a goddamn learning community...yes you can't force cleanliness on the internet but the people in the community should act like they are in a learning community, for god's sake
i've taken crap on the internet
 
3:16 AM
@Purmou it aint easy
 
Well maybe you should try to become a moderator then @Purmou
 
you don't have to explain it to me
 
Otherwise I can't help you man.
 
Do you know how many people come in here and ask the same thing 5 times and just ignore everything we say
 
but i didn't ignore anybody...i might have skimmed over a few messages
 
3:17 AM
I know what you mean
 
but i also generally don't take advice from teresko
 
@Raynos .. you mean ignore everything YOU say ... hahahhaa
 
anymore that is
 
@Esailija EVERYTHING I SAY IS RIGHT BY DEFINITION. NOOBS Y U NO ACCEPT AUTHORITY >:(
@Purmou he's an ass but he's competent.
 
i just think this community is contradicting itself, especially in these chats
 
3:17 AM
Re: blackbox. I mean that a program, from a business perspective, is a black box.
 
@Purmou contradicting what
were not teachers
Were not support
 
@Anfurny o.O
alright i'm done with this chat for now
 
We're programmers, who are interested in JavaScript and have conversations
 
yes, we are programmers
 
are we? :)
 
3:18 AM
That the boss, and the user, don't care how pretty your code is. And those are the people whose opinion matters. If you can write and maintain unconventional code violating every traditional standard, more power to you.
 
@Anfurny, this code, as it is described, works perfectly when it was created thedailywtf.com/Articles/The-Date-Array.aspx .. is it right to do it like that ?
 
If you have expectations of us and our personality then your expecting too much
 
bye everyone
 
how do someone knows if it's a good programmer?
 
i'm just saying
it's like someone from a certain species killing another
of the same species that is
it's like cannibalism
 
3:19 AM
@Purmou nope, its just verbal abuse flung around at leisure
and then one guy taking it personally and making a fuzz about it
 
@Esailija the problem with that code isn't that it's ugly and long. It's that I know somebody wasted time (and time is money) so that black box took more input to make the identical output.
 
Don't want to be called an idiot? Stop appearing stupid. Pretty easy.
 
@Bart Codility.com
 
@Bart you don't.
 
ty
 
3:21 AM
@Anfurny Programming is a black box? That's the craziest thing I've ever heard, even from a business stand-point. Have you never heard of technical debt? Have you never had to maintain an application beyond the launch?
 
@CharlesSprayberry I'm not saying maintainability doesn't matter.
 
@Anfurny, you're just saying as long as you get something that appears to be working, call it a day? :D
 
I'm saying, that there are a million different programming rules or memes that people out there will try to push on you. And many of them are Bullshit that you would have been told the opposite of x years ago.
 
@Anfurny But you're also saying that ugly code doesn't matter. It can't be both. Ugly code does not make for maintainable code.
 
And I'm saying that most of these have no long term significance except to satisfy some random person's OCD.
And that most of these have 0 affect on maintainability
and that the real people wasting time are the ones rewriting code over and over and over for mere aesthetics.
 
3:24 AM
@CharlesSprayberry just ignore him .. that is the guy do thinks that he does not need to learn SQL , because he "writes only php"
scroll through his chat history
 
lol u u troll @tereško
*y u troll
 
And that if you control for the few issues that do actually UNIVERSALLY influence readibility, then beyond that it really doesn't matter
Okay, I'm officially ignoring teresko. Soz.
 
What do you feel universally influences readability?
 
3:26 AM
RT @deltakosh: Everything you ever wanted to know about #css3transitions: http://blogs.msdn.com/b/eternalcoding/archive/2011/12/06/css3-transitions.aspx & #css3animations: http://blogs.msdn.com/b/davrous/archive/2011/12/06/introduction-to-css3-animations.aspx # ...
RT @maboa: Very first baby steps with <video> fingerprinting and scene change detection. http://happyworm.com/jPlayerLab/videofingerprint/v01/
 
@Esailija pretty much , yeah
 
not naming your variables: _ (valid in c/c++)
 
so, $a is ok?
 
probably not, it really depends though.
How big is your script? How many different coders will work on it? How good are your comments? What is $a holding?
 
You should not need a comment to describe what a variable is holding
 
3:28 AM
If it's a bash script on your machine that only you use and it's an iterator in a loop then I'm fine with it.
 
Unless you're working on embedded software with serious constraints there is no valid reason not to use descriptive variable names
 
"valid"
Such a... charged word...
 
I mean, you're writing in a high level language
Why should I have to look for a comment to determine what a variable stores? Comments are prone to being outdated and have error-filled information
 
object oriented languages even
 
Comments don't get updated nearly as often as code does
 
3:30 AM
So what? So what if I use $a in my personal script on my machine? And if my memory is good enough that I never need to look it up?
Then I really just saved myself a little typing...
 
@Anfurny congratulations on making an asshole of yourself
 
do not use magical value $a .. hell only exception i can think of are $i , $j and $k , which are common names for loop iterators
 
I am getting spectate swamp vibes from anfurny
 
AWw thanks @Raynos
@CharlesSprayberry Ultimately, the issue between us is that I think code presentation is a means and never and ends.
*an ends
 
Seriously though
If a programmer doesn't care about writing high quality code he needs to gtfo and get another job
5
 
3:32 AM
No, I think the difference between me and you is that I read Clean Code and learned something from it
 
You totally lost me dude, I think I just make the crucial argument @Raynos
Come now, no need to get personal @CharlesSprayberry
 
somehow I get the feeling that anfurny would be fine with code like this telusplanet.net/public/stonedan/source.txt :D
 
And I also take pride in my work. I don't want it to just get the job done, I want a professional programmer to look at it and say, "This guy knows his stuff."
It isn't a personal attack, you personally admit that you don't really care what the code looks like. I think you're wrong and would make for a likely horrible code base to work with for anybody but yourself at that moment in time.
 
Okay, but objectively speaking, code isn't somewhere to show off and boost your ego about hypothetical mentors approving of you. It's about the problem itself @CharlesSprayberry
 
3:34 AM
@Anfurny so your content with writing low quality code?
@Anfurny I know this company where you would fit in just great :D
 
Not at all, all I'm saying is that the "quality" (presentation) of the code is a means and not an ends.
 
Who says that I'm showing off my ego? I feel better about an application that I feel is well written. I mean, I expect at some point for OTHER people to use my stuff.
 
Their job is to bolt hacks onto scripts as quickly as possible over FTP in production.
 
And if you format a piece of code that you're only gonna write once and discard, then you're wasting time.
 
@Anfurny yes it is means and not an end. Except we value it as a proper means to maintainability
No, not at all
 
3:36 AM
if the code you are fixing has been written 6 month+ ago , then it does not matter who wrote it
 
And if you're commenting your code super-thoroughly when all the other developers don't speak english, perhaps you should come up with a more pragmatic strategy to communicate...
It's ultimately pragmatistm.
 
The reason I format a piece of code I write once is so that I can confirm visually that its correct
 
*pragmatism
Okay, and if that helps you, great @Raynos But if other people don't need that, then they don't need that.
 
You shouldnt comment your code super-thoroughly but you should still have a block comment above every function
 
@Anfurny if developers do not speak english , then they are not developers
 
3:36 AM
not doign so is being a lazy ass
 
is that a fact? @Raynos
 
@tereško they are whatever the native term is for developer in their language
 
Even accessors?
 
@Anfurny IT DAMN WELL IS. EVERYTHING I SAY IS FACT.
 
Functions should be small enough and variables descriptive enough that very few, if any, inline documentation is needed
 
3:37 AM
@Anfurny I dont write useless accessors
 
Okay, thank you, you guys have just given me everything I need to illustrate my point.
 
Not every function needs a comment
local functions don't
 
One of you believes all functions need comments, one believes that comments are an indication of obstruse code, and hard-line java developers think that you only should use accessors in classes (no public vars)
 
I only put a docblock on accessors to add a @return type
 
hell , how can you learn ANYTHING related to information technologies , if you do not uderstan english !?
 
3:38 AM
And I know all of you think "But everybody else is wrong about 'beautiful code' I'm the only one who knows what's objectively right"
 
@Anfurny you dont need to uphold these opinions
@Anfurny ... you's a troll
 
java?
 
Everything will agree with you that "beautiful code" is subjective as hell.
 
c# , judging by the profile
 
Its all a personal style preference
 
3:39 AM
Oh, will you? Then awesome @Raynos
great.
 
I just refuse to belief your personal style perference is "write ugly code"
 
Lol,
So beautiful code is totally subjective
but ugly code isn't huh?
 
Yes
ugly code is anything that makes my eyes bleed
 
And there's reasons for some of the things you mention...like using public vars
 
ugly code is also subjective. but it's different
ugly code can be damaging
ugly code is counter productive
 
3:41 AM
And there's people who will rant for post upon post about the evils of public vars @CharlesSprayberry
 
ugly code lowers my morale
ugly code get's in my way of getting my job done.
@Anfurny yes certain things are personal preference
 
Well perhaps we should use a more objective term, like inconvenient code?
 
but any sensible developer knows your team chooses a style guide and a methodology guide.
Of which your team lead has last say on tie breakers
 
The most important aspect of any coding style is consistency
 
and this becomes your teams definition of "beautiful" code. And everyone adheres to it.
We dont waste our time writing ugly hacks
 
3:42 AM
I like that approach @Raynos
What I don't like is preemptively judging somebody's talent or progress as a coder based on their stylistic choices.
 
@Anfurny when did we do that?
 
Saying things like "You don't know _coding_paradim_x therefore you must learn that before you learn anything else, noob"
 
I mean I will say that anyone who uses \n { deserves to be shot
@Anfurny no. We didnt say that
 
the original argument didn't even start from styling and formatting.. wtf guys. that's just stupid thing to argue.
 
I love \n { @Raynos
 
3:43 AM
What we did say is you must understand seperations of concerns to understand why onclick is bad
 
it was from writing useless spaghetti code that was only made to work for a short term
 
this is because onclick breaks seperations of concerns
@Anfurny if you use \n { your clearly a bad javascript programmer, noob!
 
Okay
 
and apparently it was ok with anfurny as long as it gave an impression of working to someone untechnical
 
So here's on of the remarks I found kind of rude/imposing
"Incognito
You need to understand separation of concerns before you go any further with your code."
And let's not pretend that kinda sentiment is uncommon for this room.
 
3:46 AM
Why?
 
@Anfurny i just explained that :\
 
How is that rude or imposing?
 
while my opinion is that kind of code is a fraud
 
It's because to the reason the code is bad is it breaks seperations of concerns
 
And good luck unit testing it
 
3:47 AM
Once you know why seperations of concerns is important you can appreciate knowing its bad to break it
@Anfurny it's like saying "You need to understand goto before you go any further with your code"
Once you understand goto you understand why it's bad. And you understand why your code is bad.
 
The fact of the matter is, he can write his whole app without understanding separation of concerns.
 
@Anfurny p.s. your an idiot for not appreciating why seperations of concerns, or teaching it, is important.
 
He can probably go do the rest of his career without it.
 
@Anfurny the fact of the matter is, You can program by coincidence all you fucking want
 
And some people will say "yuck" and not hire him, but others will.
 
3:48 AM
And if you promote programming by coincidence, I will take you out back and break your legs.
 
@Raynos *you're
haha
 
Programming isn't a means to an end
 
There are a lot of smart people who disagree with separation of concerns, and a lot of other "principles"
 
It's a craft. And just like any other craftsman you appreciate that it's a skill one should learn
 
but for some reason, programmers seem to be really zealous about this kinda stuff in a way that people aren't in other disciplines.
 
3:50 AM
@Anfurny ok, "who disagrees with seperation of concerns". No-one.
 
It's like going onto a construction forum and asking "How to I nail two joints at a 45 degree angle safely"
Just google it @Raynos
 
I know there is a lot of opinionated bullshit out there.
But seperations of concerns is not one of them.
 
RT @brianleroux: Browsers, media formats, the now, the future. Must read: http://ofmlabs.org/articles/dublin.html
RT @mathias: IE executes dynamically created scripts before they’re added to the DOM: http://www.blaze.io/technical/ies-premature-execution-problem/
 
@Anfurny, maybe they're zealous because anyone who needs to touch code that was written by someone who "disagrees with separations of concerns" will want to kill himself
 
And being told "You can't learn anything about construction until you learn why screws are superior to nails, even though they are a little more expensive they follow the reversibility principle yadda yadda yadda"
 
3:51 AM
@Anfurny I googled it. I couldn't find any
 
@Esailija You may be right
Well I'm seeing one called "Separation of concerns is a bunch of bullshit"
 
@Anfurny you walk into a construction shop and you ask them "How I drive screw into wood with hammer"
 
@Anfurny I googled it as well
The only thing I saw was some dude raging about view models
 
And they will fucking rage quit at you and tell you to learn to fucking screw driver
 
@Esailija Which is kind of my point... programmers taking out their frustration on inappropriate targets
 
3:52 AM
@Anfurny I agree with your idea though
Programming is a fucking religion.
And this is the church of Raynos. Don't like it, gtfo.
 
And it should be a science
 
Seriously though, you want a logical conversation we can have one.
Your making a good point, your just using flawed examples.
 
That's all I ever wanted, honey.
 
We did not tell people to following any of our religious cultist beliefs today.
 
The example you gave was somebody was asking for something impossible.
 
3:53 AM
We told people about various techniques we know improve the quality of our code.
And improving the quality of our code is always a good thing.
 
love this part:
If temp1 = 0 Then
temp1 = InStr(temp2 + 1, SSS, "/2001")
End If
 
When people get opinionated responses on a site like SO, we're talking at most a 5% time save by using these newfangled code-formatting strategies.
I absolutely like to become a better coder @Raynos
 
@Bart lol you are actually reading that code and didn't suicide? grats :D
 
But what I don't want to do is get caught is this fashion loop of changing the way I do very very simple stuff every couple years and learning a hundred new buzzwords that can't make my code run any faster or do anything new, or even be fixed much faster.
 
why? i love to see my code pasted online! :D jhahahha
 
3:55 AM
@Anfurny anyway, I agree with you. But you rant is pointed at us. And that shit is no fair. Because we today have not been acting like a church
And if your pointing the rant at us rather then the correct audience then we will get annoyed and rant back
 
"Well just because it works doesn't mean it's fine to do" - Esailija
And several things charles has said.
 
@Anfurny there's a ton of bullshit out there, correct. The problem is, that it aint bullshit.
None of it is bullshit.
 
?
 
All of them are solutions to a problem
 
oh gods , you're still at it
 
3:56 AM
The problem comes when people start dictating it's a solution to unrelated problems
 
lol anfurny it's not fine to do JUST because it gives an impression of working
keep writing like that and after 500 lines your program cannot be made work unless completely rewritten
 
@Anfurny The only thing I have said is that programming should not be considered a black box, SoC is a basic fundamental concept of programming and that variable and functions names should be descriptive.
 
I know it's taken out of context, but it's illustrative @Esailija
 
Anyone know an updated version of mootools.net/slickspeed ?
 
Exactly, that's all church doctrine you recited at me @CharlesSprayberry
And it disagreed with raynos's doctrine about a block comment above every function
 
3:59 AM
@Anfurny yes there's a lot of bullshit out there. A lot of it is personal opinion or subjective. A lot of this simply does not help. And a lot of it is bad practice.
 
and raynos's no-accessor doctrine disagrees with a lot of other people.
 
It's what we call spreading misinformation.
 
No, I did not disagree with him. I actually agree with raynos on doc-block above every function
 
I agree @Raynos
 
And it's bad. But the thing you @Anfurny shouldn't do. Is accuse us of spreading misinformation.
That's the shit your doing. And that is not cool.
 
3:59 AM
@Anfurny you yourself implied that you wouldn't be wanting to work on someone's code if that someone doesn't agree with SoC.
 
I'm not "accusing" you of spreading "misinformation"
 

« first day (419 days earlier)      last day (4512 days later) »