« first day (973 days earlier)      last day (3976 days later) » 

11:00 AM
but that point is does not stop at algorithmic level
 
Yes, it really does.
 
It fits the 80/20 rule, the logarithmic step.
 
no
 
Yes, it really really really does. The problem stops at the algorithmic level.
 
@phenomnomnominal after reading an article on asm.js, it is a lot like what i want...definitely close to what i am looking for
 
11:00 AM
Sometimes you have to micro optimize, but it's not up to you to change the way you write your code.
 
it depends how you define algorithmic
 
@Esailija rarely you have performance problems when you're using a good algorithm
 
@JanDvorak not true, you still have performance problems.
 
sigh
 
> rarely you have ...
 
11:01 AM
The cost of unreadable code is a lot higher than the cost of slow code.
@JanDvorak Oh, didn't catch that, I agree then :P
 
@BenjaminGruenbaum you might be able to have both, though
 
@redline, yep
 
user1125394
is nodejs handy for decoding binary messages (from udp/tcp)
 
I hate those type of things, but they fit well in this discussion:
Correct/Fast/Clean. Pick two.
 
When you work on big code bases ("enterprise level" like you said but even much smaller) understandable code is a lot more important than ultraperformant code.
Now, a bad algorithm is a software design mistake, but using closures when appropriate is not.
 
11:03 AM
I didn't realize games were enterprise software
 
@Zirak sometimes you can have all three
 
or mp3 players
 
user1125394
decoding messages like (32bitlength, 32bitlen1, data1, 32bitlen2, data2, ...)
 
@BenjaminGruenbaum and you think JS offers more understandable code than a hard-language in those situations?
 
@JanDvorak Which is why I hate those type of things...
 
11:03 AM
@redline God yes!
 
@BenjaminGruenbaum making something like a class in JS feels like a retarded hack
 
@redline, classes do not matter.
 
Then don't make a class in js?
 
@redline That's because you're a c# developer :) You'll get used to it (the language) I promise.
 
friends, good marks, enough sleep. Pick two.
 
11:04 AM
you're writing all your definitions in a constructor for god's sake
 
@redline so?
 
hah. I remember seeing huge js constructors filled with this.blah = null
 
@Esailija 99% of code in games does not have to be performant. For that 1% micro-optimize all you want.
 
Classes are good for documentation. You don't need a ton of classes only you use
 
That's the point where you understand they don't get js.
 
11:05 AM
^
 
^^^^^^^^^
 
@BenjaminGruenbaum I've been coding JavaScript non-stop for 2 years now, and i learned JavaScript over 8 years ago and dabbled with it here and there...i think i'm far from a novice and getting used to the language
 
A million times. Over.
Getting used to !== understanding. Over.
 
you don't need to write uselessly dynamic code in order to understand js
 
Room poll. Who here thinks that @redline "gets" JavaScript?
 
11:06 AM
@BenjaminGruenbaum you are game developer?
 
(I don't)
 
(I don't) Over.
 
@web2students.com I used to develop games in AS, for a pretty long time (~3-4 years)
 
user1125394
@redline if you're not happy wth js itself github.com/jashkenas/coffee-script/wiki/…
 
(I don't)
 
11:06 AM
@cx, that still ends up being JS. Over.
 
@cx it's possible, yeah. You have typed arrays for that.
 
you think i don't understand it because i don't agree with the language...and are still forgetting what i have been saying this entire time...i'm like a broken record saying it...JS is my only option, i am being forced to use it...i "get it" and i don't like it
i understand it all just fine, and i understand WHY it is the way it is, but i don't have to agree with it
 
ok @BenjaminGruenbaum
 
@redline No no, I really think you don't "get" it. It's not about "agreement" with the language, it's about understanding how JS code is structured. Having talked to you more, this is our conclusion.
 
and i started as a PHP developer...i LOVE DYNAMICS...but i like using them WITH statics...if that makes sense...i feel there is a time and place for BOTH...and that's all i want...BOTH OF THEM
 
11:08 AM
@redline A man can use a stone to bash out people's brains for decades. Every day, he gets up, and spends his days smashing skulls. But he never stops to look at the stone, to appreciate its beauty.
 
user1125394
that's why I like erlang 5 lines for doing it anyway cpaste.eu/1301/elnaWTEoychqpaC
 
It could have a giant diamond embedded in it, and he won't notice.
It's not how much you use the language; it's how much you learn the language. Quality, not quantity.
 
@Zirak he might. Diamonds are great at bashing
(assuming they are big enough)
 
I can play "Marry had a little lamb" on a piano, every day, for 30 years. That doesn't make me a good pianist.
3
 
@Zirak you're on fire today :P
 
11:10 AM
you can say i don't understand...but i could sit here and type classes like you do all day long...but then i would have to shoot myself in the fucking head
 
I don't type classes
 
i understand how they work, why they work, what they can do...i understand i can do a majority of the things i want without needing anything outside of JS...still doesn't make it feel like any less of a hack
 
Then don't use classes
 
@Zirak, similarly, I can play Flight of the Bumblebee note-perfect, and still not understand music.
 
still doesn't make it any less ass-backwards retarded in my mind
this is strictly a matter of opinion and preference...not a lack of understanding
 
11:11 AM
@redline That's because you don't "get" it.
 
yes
i "get" it
 
It's a paradigm shift, you can't code JS like C# or Java.
 
i know that
and i have been saying i don't want to code JS then
i want to code a hybrid
 
Then don't do it
 
Then write a language like TypeScript
 
11:12 AM
@redline Too bad because you can't.
 
well i don't have that option...i am restricted to one language for the web
 
Write a language that compiles to asm, and write in that.
 
i will
mark my words
 
You can't use JavaScript like Java or C#, that won't work.
 
user1125394
TypeScript by Microsoft. Typed superset of JavaScript. (ow shit, done by MS)
 
11:13 AM
You can write C++ and compile it to run in JavaScript, changes are it'll even be faster than native Java (that's what the asm.js benchmarks show).
 
why do you want to play "Marry had a little lamb" for 30 years?why don't you play once and play repetitively in computer?
 
@BenjaminGruenbaum I forgot to set an alarm clock for today, so overslept by 4 hours. Soooo goood.
 
However, you can't do it in JavaScript.
@Zirak I love it when that happens :P
 
@phenomnomnominal in fact, youtube can play Flight of the Bumblebee note-perfect, and it thinks Blackmore's Night is a heavy-metal band.
 
@redline You don't get JavaScript. You're in a different mindset, you have two choices. Either you read enough JS code and code enough JS until you do or use a different language. Both options are perfectly fine but if you try to code JS like C# or Java you're going to have a very bad time. Just like Crockford.
> I have been writing JavaScript for 8 years now, and I have never once found need to use an uber function. The super idea is fairly important in the classical pattern, but it appears to be unnecessary in the prototypal and functional patterns. I now see my early attempts to support the classical model in JavaScript as a mistake.
- Crockford.
 
11:17 AM
ben
listen to me
 
but i have book design pattern in js
 
i have read crockford's article more than once
i understand that you think i am going down the same path as him
but i can assure you i am not
 
@redline We all do, really.
 
and i just made jTypes in october
so what was i doing before then?
when i had to program javascript from 9-5 at work ALL day
to make libraries for a large team of devs
 
writing classes?
 
11:18 AM
8 mins ago, by Zirak
I can play "Marry had a little lamb" on a piano, every day, for 30 years. That doesn't make me a good pianist.
 
i made classes all day long...using the same code you use
in the same manner you do
and i hated it
i didn't try it once and not "get" it
 
don't make classes. Out.
 
@CoolBoy 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.
 
i did it for a very very long time, over and over
 
@redline over and what? over.
 
11:19 AM
and i also experienced first hand the things @Esailija was talking about when i would try and have the devs then use the library
 
@BenjaminGruenbaum He did it over and over, over.
 
so again, this is not about "getting it"
i made JS classes "the right way" according to you for long enough and i was sick of it
it is a retarded method
 
The right way is to not use classes. Over.
 
@redline This conversation started with me asking you for a concrete use case. I'd still like one. As a programmer, I find it easier to articulate with code.
 
when you're making a library for devs it is
 
11:21 AM
Give me a solid use case.
 
No for JS devs. Over.
 
i have 2 featured post in 1 div id, 1 big class and 1 small class . i want big featured post are post in category base.. if i give code anyone can help me?
 
Like an app, or library, and how you would structure it better with jTypes.
 
@BenjaminGruenbaum if you want use cases then you are not "getting it" when it comes to what i am saying
just picture yourself at a job making JS libraries for a team of devs
 
@CoolBoy I don't understand your question
 
11:22 AM
picture all the problems you could run into trying to organize all that
trying to structure all that
 
@redline You're saying "You should be doing X with Y". Then I say "Give me one example of such X". If that's me not getting it I don't know what do say...
 
@redline, they are solved problems.
 
Global objects, not classes, for libraries
 
Module pattern. Over.
 
@JanDvorak uh, no
 
11:22 AM
@JanDvorak i want .. i have sticky featured post. i want this div show with category base...
 
and not all libraries need to be global
in fact, some have requirements not to be
not everyone is supposed to mess with everything
 
@CoolBoy I don't understand "category base
 
Libraries should never be global. Globals are a pretty evil concept, but that's another story.
 
		<div class="main_feat">

			<?php get_the_image( array( 'size' => 'featured',  'width' => 310, 'before' => '<div class="thumb">', 'after' => '</div>' ) );  ?>

 			<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a> </h2>
			<div class="date"><?php if (option::get('featured_date_format') == 'time ago') { echo time_ago(); } else { printf('%s, %s', get_the_date(), get_the_time()); } ?></div>

 			<div class="content">
 
Use loaders like RequireJS
 
11:23 AM
this is the code
 
@BenjaminGruenbaum at least we agree on something then
@BenjaminGruenbaum globals = horrible
 
@BenjaminGruenbaum but then require itself is global.
 
@redline We agree on a lot of things. I think your view on structuring JS code is misguided, I don't think you're a bad developer.
 
@BenjaminGruenbaum and another thing i have always hated...i want the "let" statement NOW..."var" is so fucking retarded
i want block scoping
 
@JanDvorak We've had this discussion and I've shown you some patterns that would not require require itself as a global and also said it doesn't matter if you have one global function as long as your namespacing is silly.
 
11:25 AM
function scoping is so fucking stupid...i would only use it like 3% of the time
 
@redline That's another indicator of not 'getting' it.
 
@redline strong words won't help you
 
Why would you need block scoping?
 
@BenjaminGruenbaum when generating handlers
 
why would you need function scoping?
 
11:26 AM
@redline Because your basic construct in JS is a function, not a block.
 
why in teh motherfucking world would i want a temporary variable in an if-statement to now have full scope in my function
 
@BenjaminGruenbaum trust me, I'd like to have let
 
@JanDvorak I wouldn't, I think it's a bad idea.
@redline A temporary variable does not have side effects anyway. Where is var problematic in practice?
You can always scope with closures if you really want to. It's just that in practice you don't really need to do that.
brb
 
having array accesses or chain property accesses in INEFFICIENT, you are supposed to store references to things...this is why variables exist...yet everytime i create a variable it has full function scope...that is so fucking ass-backwards
 
@BenjaminGruenbaum var is problematic if you want to close over it by several functions that are generated in a loop
 
11:27 AM
scoping with closures is like using a chainsaw to cut a steak
so much overhead for something that is trying to accomplish less overhead
 
and jTypes is what exactly? The Death Star? Over.
 
did i say jTypes was efficient @phenomnomnominal?
same convo AGAIN
 
@BenjaminGruenbaum for (i=0; i<10; i++)(function(i){...}(i)) is not exactly fast
 
you should understand what it is i want by now...
@JanDvorak exactly
 
jtype is js library
 
11:28 AM
block scoping makes PERFECT sense
when i write a for-loop and have variables in the loop that are just for the loop...i should have to create a function just for the damn loop
but if i don't then every single variable i defined in teh loop is leftover
 
@redline, you justified jTypes by saying you want classes for more efficient JS?
 
so. fucking. retarded.
 
@redline Having what or what? Again, be an adult, if you have access to a variable it doesn't mean you should abuse it. Also, a temporary variable like the one you'd have in block scope would not solve anything.
 
jtypes and efficient classes are two different things
@phenomnomnominal jtypes is an attempt to have something i want right now at the cost of performance
 
@JanDvorak So solve that speed problem, don't introduce another keyword to a language...
 
11:30 AM
@BenjaminGruenbaum what to do, then?
 
@BenjaminGruenbaum you can't keep using the "adult" argument here...people don't give a shit, and many people fuck shit up unintentionally...not to mention the people who PURPOSELY try to break shit
 
inb4 flag
 
@JanDvorak Have v8 optimize it.
Wait, what? If anyone flags anything I swear a shitstorm will happen. If you have a problem with someone tell them.
 
@BenjaminGruenbaum i agree
 
I tried, by saying "inb4 flag"
 
11:32 AM
@JanDvorak Very informative :P
 
It's not JavaScripts fault if people can't manage their own code. Over.
 
@phenomnomnominal really?
 
@phenomnomnominal some languages are really bad
 
like...................really
 
what is inb4 flag?
 
11:33 AM
@redline If your developers "don't give a shit" about correct code that's a problem with your developers. You shouldn't have to write code for retards.
 
@BenjaminGruenbaum you're always writing code for retards
 
web2students.com "in before flag" = "I expect a flag to follow"
 
No, I'm not.
 
@BenjaminGruenbaum just like you're always validating forms for retards
 
Absolutely not. Over.
 
11:33 AM
I'm writing code for developers.
 
You should write the code you wish that other people would write. Over.
2
 
I'm validating forms for retards because I can't make any assumptions on the users of the form. I expect other programmers to at least be aware of how the language works.
 
you're taking your isolated scenario of coding for yourself or a team of people you know and not scaling it up massively to a much higher level with many many developers on large teams in large companies
 
@phenomnomnominal Exactly.
 
thanks jan and bye all
 
11:35 AM
@redline Stop that, scaling and enterprise are not excuses for horrible broken languages like Java.
 
yes they are
 
they aren't
 
The language shouldn't 'protect me' from being an adult. It should help me write clean and expressive code.
 
No they're not. Over.
 
clasess are a design pattern, but also an antipattern
 
11:35 AM
Java is an antipattern
 
Every pattern becomes an anti pattern when abused.
 
@BenjaminGruenbaum including regex patterns?
 
@JanDvorak lmfao.
 
@DmitriyFilipenko 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.
 
you have this ideology that a large team of devs in a large company are like all good developers and nothing ever goes wrong and everyone holds hands and types JavaScript appropriately and doesn't break things and follows spec and reads documentation...grow the hell up and look at the real world and how it actually runs from the perspective of a business
 
11:36 AM
@redline, that's exactly how it works in the company I work for.
 
> follows spec and reads documentation
 
Testing, Documentation and Code Reviews
 
and how many employees does that company have?
 
everyone should do that!
 
11:37 AM
Testing testing and more testing.
 
exactly
trying working for a fortune 100 company with thousands and thousand of employees
 
Any cultural problem within your company is NOT JAVASCRIPTS FAULT
 
large teams of devs...gigantic amounts of people using your applications (even just internally)
IT IS WHEN IT IS MY ONLY OPTION FOR WEB DEVELOPMENT ON THE FRONT-END
 
If someone doesn't at least read your front page manual or read your spec before using your code and just start randomly typing shit - they deserve to be fired.
 
FUCKING A
 
11:38 AM
No it's not.
The problem is that you hire shitty developers.
Thats a CULTURAL problem
 
i don't choose who gets hired
 
Fine, the company.
 
Your argument is "I need to code for retards and Java lets me do that". I find that argument in extremely poor taste. I aspire to write beautiful code that people enjoy using.
 
i don't choose how they choose to implement my features
 
but you can choose if you get hired
 
11:39 AM
The company clearly doesn't value professional development.
 
Company coding conventions
Constructive code reviews
 
@BenjaminGruenbaum i aspire to write beautiful code too...but that doesn't mean it can't have protections here and there for the idiots that use it
@phenomnomnominal be realistic...when you don't even have enough devs to get the jobs done themselves, you are not taking the time to do code reviews and shit
 
CULTURAL PROBLEM...
 
okay well fine
fuck
 
11:40 AM
@redline You want fortune 100? Google. Google use dynamic languages like Python for huge scale projects and enforces high coding standards. Google doesn't code for retards and they have a damn good code base.
 
cultural problem
but still doesn't mean shit doesn't need to get done
gotta pay the bills and get the work done with the least amount of errors
i have no fucking control over the people...all i can do is try to hold their hand as best as possible to make my shit work out
 
You're adding technical debt on top of technical debt in an attempt to fix a cultural problem.
 
Google enforce high coding standards, they make everyone take tests before they code in a language, they pay well and they have code reviews.
 
yes
 
It's insane, I feel awful for you having to work in those conditions.
 
11:41 AM
yes i am
 
Google even won't let the C creator code C because he haven't took the exam.
 
but that's what works unfortunately
 
It's such a short term fix, you have to know it won't last.
 
i know it won't last
i want it in the language
 
If you can't convince the SO Chat room, how could you ever convince the people who write the spec?
 
11:42 AM
Would Google do or do you want another fortune 100 company who doesn't 'code for retards' because 'you can't trust developers to be adults' ?
 
i don't have to convince them, asm.js is going in the right direction IMO
and that's mozilla
 
asm.js is for compiled code
you shouldn't have to write it
 
pretty much for the same reason you don't write assembler
 
11:44 AM
^ this is the kind of shit i don't appreicate
 
@redline "I just downvoted Jon Skeet"? I'm pretty scared too :P
 
i work my ass off, to solve a problem you obviously do not understand...i come here to talk JS with you guys, and everyday i have to hear about how shitty my hard work is
 
@redline I'm trying to help you, fuck me right?
 
not you
 
@redline ew JPEG
 
11:45 AM
the image i posted
i have 2 star on the side that will now sit there for another 3 days like the last one
 
Big deal, some people on the internet don't like you.
 
it's not a random fucker
it's the people i am talking to
 
No, it's @phenomnomnominal , he is a respected member of our community and his opinion is valued here. If he doesn't like something he has the full right to say so and if people agree with him they have the full right to star it.
 
i've seen that exact same statement starred time and time again
 
The message isn't "@redline is horrible" it's about a piece of code.
 
11:46 AM
Respected is a loose term.
 
rlemon and zirak already had ones up there for awhile which is why i blocked them in the first place
 
You're entitled to express your opinion freely and people are allowed to not agree with it.
 
that's fine
am i pissed they don't agree?
 
@redline, feel free to find me on github and rip my code to shit
 
no. i am upset that they continue to just say it's dumb time and time again for no reason...it doesn't help anything
 
That is how I learn.
 
@phenomnomnominal i don't want to rip your code to shit
@phenomnomnominal i want to have a conversation with you and respect your work, even if i don't agree with it
@phenomnomnominal just cause you hate jTypes itself doesn't mean it doesn't have some nicely structured code in it
 
And I have never once said that
 
it doesn't mean i didn't take the time to write clean code, unit tests, ect.
yea well "jTypes is awful" is a very generic statement
 
Nope, and no one will try to take that away from you
 
11:48 AM
@redline He didn't say 'jTypes is coded like shit' he said 'jTypes is aweful' his criticism is not on your codebase it's on your idea.
 
yes but others don't know that when they come in here
someone comes in, sees jTypes is awful on the side...they have no idea what the context was or really care
 
Do you know how many times stuff like "jQuery is horrible" has been starred here?
 
they just see "oh this thing is awful"
yes but resig isn't sitting here having a conversation with you
 
Did that ever stop anyone from using it?
 
it's about respect
 
11:49 AM
He's been here
 
0
Q: featured post show in category base

Smart Shovoni have 2 featured post in 1 div id, 1 big class and 1 small class . i want big featured div are post in category base.. big featured post code show in below. <div class="main_feat"> <?php get_the_image( array( 'size' => 'featured', 'width' => 310, 'before' => '<div class="thumb">...

 
@redline You know what he had to say about that?
 
?
 
Feb 19 at 16:12, by John Resig
bad uses of JavaScript existed long before jQuery ever came out - jQuery being popular doesn't stop bad devs from existing, the only thing that stops bad devs is good education, which is why I've written two books and am working at Khan Academy
 
11:50 AM
that's a good answer
 
jTypes is ['Awful', 'Amazing'][Math.floor(Math.random()* 2)]
 
ahahaha
now that i'll star
:)
 
!!/undo
:P
 
11:51 AM
ew
 
:(
cheap shot
 
@BenjaminGruenbaum thanks :-)
 
all i'm saying is that i understand you hate it, i don't need to be reminded
 
Our argument stopped being about jTypes a while ago though. It's about you telling us that we should develop code assuming the developers are horrible incompetent fools who'll do their best to abuse it.
That in practice 'fortune 500' companies code like that. Which is not true, with the obvious example being Google which puts a huge emphasis on good clean code.
 
@phenomnomnominal and to give you perspective just like with your relationship stuff causing you to be cranky...i am having a really hard time getting anyone to take me seriously, including some of my best friends...nobody returns my calls or texts or wants to help me with anything...so i wish i could at least come here and not be criticized...that's all i ask
 
11:53 AM
If you want to write good code, work for a tech company, not a corporate
 
Except for Oracle, they're horrible :P
@redline We're all about criticism. I learned a lot coming here and I was a very competent JS coder even before.
 
Thanks for installing Java. Here's a bunch of crapware for you.
 
i didn't mean it in that way
constructive criticism is good
that's not what i was talking about though
 
I was completely incompetent, and now I'm slightly less so, and slightly more opinionated. Over.
 
That pissed me off:
0
A: JavaScript comparing the value within divs to write within a div

luk2302i would reccomend using jQuery as always ;) $('.items').each(function (i, el) { $(el).children('.actualSellingValue').html( $(el).children('.onSale').html() == "" ? $(el).children('.initialCost').html() : $(el).children('.onSale').html()); });

The jQuery answer was upvoted and the native one was not :(
 
11:55 AM
you know what pisses me off and i saw at work all the time
$(el).
$(el).
$(el).
 
@redline Maybe you should find a better workplace.
 
> i would reccomend using jQuery as always ;)
 
use a fucking variable idiots
i can't stand that crap
 
Please do not suggest a jQuery solution to a simple JavaScript problem. At least without suggesting an alternative. — Benjamin Gruenbaum 9 secs ago
 
$('#something').
$('#something').
$('#something').
$('#something').
omg makes me want to punch them in the face
 
11:56 AM
@redline I think that ~30% of 'jQuery developers' don't know how variables work :P
3
 
i agree
and i hate the jQuery examples too
i see so many devs put functions in functions in functions in functions
because of how the examples are structured
 
@redline That's very annoying. Almost as $("#something"+i) , I want to cry when I see that. Use an array dammit.
 
nobody understands closure or how functions are recreated each time
 
A lot of times people just don't care
 
they just think they can put a function block for an event inside an existing function block for an event and have no comprehension that that function is being constructed for each and every event
 
11:58 AM
And a lot of times people don't have to
 
@BenjaminGruenbaum EXACTLY...which is why at work you gotta do what you gotta do
 
@phenomnomnominal this
 
@redline I think the problem is with you . You need to find a job at a good workplace where you don't have to code for retards. I think that would help you a lot :)
 
if i can force devs to not see private and protected vars, force them to implement abstracts, ect. then it makes me a happy camper
 
What exactly is the work that makes it so performance critical, and why do they not understand that it is so, and why are there not standards to show them how to write performant code?
You can
Don't release anything that doesn't meet a standard
 
11:59 AM
@BenjaminGruenbaum all my work stuff is past tense, i already quit my job back in october
 
@redline Why not interview at a tech company for example?
 

« first day (973 days earlier)      last day (3976 days later) »