« first day (963 days earlier)      last day (3979 days later) » 

11:00 PM
We interviewed not too long ago.

We gave interviewees the following question. Here is a (relatively simple) CSS design, here is a RESTful API, pull data from the API and show it in an HTML page with the given design.
 
dev/programming is just ridiculously accessible now
 
You may use the internet, and any library you want. You only need to support Chrome running in that same computer.
 
!!s/dev\/programming/copypasta/
 
@phenomnomnominal copypasta is just ridiculously accessible now (source)
 
so just by that I will conclude that the average dev doesn't have CS degree
 
11:01 PM
Took me 15 minutes to accomplish with KnockoutJS, did it vanilla too, took 25.
We had over 10 people come interview over this week, this is people who interview for a senior position and already have jobs.
Wanna guess how many completed the task correctly?
 
0.54 +- 0.02
 
There was SO MUCH WTF, you can't even imagine
Someone did a for loop with string concat on all the data, and all the handlers in the HTML, he needed to do a css :hover , so he wrote functions in JS and inlined them with onmouseover and onmouseout.
 
seems legit
 
that's how we do it at facebook
 
11:04 PM
His HTML string wasn't even readable, he just broke it arbitrarily at 80 characters. No CSS whatsoever needless to say
@Esailija You work at facebook?
 
no, just joking cos they used inline handlers a few years ago
 
@BenjaminGruenbaum bananas
 
randomly*
 
@Esailija Good, they suck :P
 
probably still using on old pages
 
11:06 PM
meh why my netbeans 7.2.1 tells me that there are no updates available when 7.3 has been out for a year
 
I get memory leaks when I leave facebook open. I have to reload the page after a bit or everything is just slow.
 
@BenjaminGruenbaum goddammit, that reminds me that I would horribly fail on some vanilla XHR-call if I couldn't look it up
 
inb4 IDE/text editor war
 
I finally need to memorize that stuff for good
 
@FabrícioMatté that sounds like a java question
 
11:07 PM
Where is Douglas Crockford when you need him
 
NetBeans is a pro JS IDE too :) but not
 
I use sublime text 2
 
@DouglasCrockford?
 
!!/stat FabrícioMatté
 
11:07 PM
@Shmiddty Fabrício Matté has 15803 reputation, earned 0 rep today, asked 20 questions, gave 487 answers.
 
!!stat/powerc9000
 
@Shmiddty WHERE ARE YOUR GODS NOW?
 
@powerc9000 Y U NO MAEK SENSE!? Could not understand stat/powerc9000
 
@BenjaminGruenbaum RESTful API, pull data from there...
 
!!/stat powerc9000
 
11:08 PM
@FabrícioMatté Only notepad
 
@powerc9000 powerc9000 has 42 reputation, earned 0 rep today, asked 4 questions, gave 9 answers.
 
!!/stat extended
 
@Shmiddty User Elusio proved elusive.
 
!!/stat shmiddty extended
 
Ace/Sublime are my main Text Editors, but NetBeans is by far my favorite IDE
 
11:08 PM
@Shmiddty Shmiddty has 6490 reputation, earned 5 rep today, asked 4 questions, gave 343 answers.avg. rep/post: 18.7. Badges: 0g 4s 18b
 
!!/stat powerc9000 extended
 
@powerc9000 powerc9000 has 42 reputation, earned 0 rep today, asked 4 questions, gave 9 answers.avg. rep/post: 3.23. Badges: 0g 1s 9b
 
the way it integrates with GIT highlighting changes at real time is really nice for OCD-like people like me
 
@FabrícioMatté VisualStudio + ReSharper, amazing.
 
Look at all my glorious badges
 
11:10 PM
@BenjaminGruenbaum, yep
 
Oh, if that matters, he submitted one file, it was the .html , needless to say there was no doctype, head etc, just code in a <script> tag
JetBrains are just light years ahead of everyone else in IDEs sorry
 
@BenjaminGruenbaum I haven't used VS for a good while, is it good for writing vanilla JS/jQuery?
 
@FabrícioMatté it's fair with WebEssentials (it shims with them if you ask for them in installation), only with ReSharper it's amazing.
 
bunk, I have to pay for resharper?
 
@Shmiddty yeah like a ton
 
11:11 PM
@BenjaminGruenbaum I see, thanks
 
@FabrícioMatté if you just need JS, get WebStorm though
It's still way better than NetBeans
 
Yeah, I've been listening about JetBrains for quite a while
 
@FabrícioMatté this is a few months old, but still blog.nqzero.com/2013/01/…
 
Though, I do fine writing code in any platform/editor so the most important thing for me is speed (and maybe GIT integration, which is why I use netbeans)
 
Also, he's using an old version of WebStorm
@FabrícioMatté speed of code writing, not editor, right?
 
11:13 PM
I see
@BenjaminGruenbaum Exactly
Say
 
I code almost exclusively in JavaScript, but I don't want to move away from VS because we use TFS and it's just simpler to do direct-deploys to my VMs from VS
 
@FabrícioMatté JetBrains for sure. I'm faster with VS+ReSharper , faster than with VIM, faster than with Sublime, faster than with Aptana, I checked.
 
Sublime's snippets and Ace's ScriptManager, both provide Emmet-style completion
 
@Shmiddty TFS, ew
@Shmiddty Get the trial for 30 days, read the tutorials and watch videos of other people using it, see if it's worth it for you
 
9.8.1 ToString Applied to the Number Type
..
If m is less than zero, return the String concatenation of the String "-" and ToString(−m).
 
11:14 PM
@FabrícioMatté I don't think I know a single editor without zen-coding support
 
I might
 
infinite recursion?
 
@BenjaminGruenbaum so tell me where it is on NetBeans :( oh I probably forgot to look for the plugin for it
 
@FabrícioMatté this is what I get when I type the word 'for' then tab (pretty standard)
 
nvm that makes it positive :D
 
11:15 PM
for (var i = 0; i < LENGTH; i++) {

}
 
Yeah, similarly for sublime/ace
 
function(parameters) { // fun expands to... and so on

}
 
I know, I use that on both sublime and ace :)
It is rather easy to create and edit Ace snippets, sublime uses XML for snippets so it's more verbose to create snippets but still decent
 
Number.prototype.toString = function(base){
    if (this < 0) return "-" + (-this).toString(base);
    ...
}
 
@FabrícioMatté VS+RS does js-linting on the fly, it finds misused and unused variables, finds suspicious closures, greys out and detects unused execution paths, does indentation correctly (seriously sublime!?), does 'go to definition' and 'find usages' very well. Has a debugger and a test runner with Jasmine (you can add others))
 
11:17 PM
Looks really nice :)
 
!!/tell rlemon fuckable 27
 
@rlemon A person that age can shag down to 20.5, and is the lower limit of a person of 47 years
 
I can Control+R+R and rename a variable across its scope and so on
@FabrícioMatté again, look at WebStorm (or PHPStorm)
 
Yes I'll have to give it a try
 
is resharper worth it for just javascript?
 
11:18 PM
let's see if bot can calc my average rep/post
 
@Shmiddty It's more useful in C#, I'd try it if I were you, it's free for 30 days.
 
@rlemon Template still WIP, but that's the gist of it.
 
!!/stat "Fabrício Matté" extended
 
@FabrícioMatté User Elusio proved elusive.
@FabrícioMatté Fabr&#237;cio Matt&#233; has 15803 reputation, earned 0 rep today, asked 20 questions, gave 487 answers.avg. rep/post: 31.16. Badges: 2g 12s 46b
 
11:19 PM
Seriously my work is 90% JS, 9% SQL, 1% other (C#, Crystal Reports, SSRS, etc)
 
We get it, you have hots for ReSharper
 
typeof target is not always boolean? or am I tired
 
if (!x) means that if x were undefined the function would already have returned 10
 
11:21 PM
var target = s()||{};
 
o rite the tooltip is not in the typeof if clause
 
if s() is falsey, target == {}
so if typeof target is boolean, it must be true
home time xoxo
 
@Esailija This is the sort of thing ReSharper helps me with, when I'm tired, I fuck up less
 
yeah that kind of static analysis is like from another planet when compared to what jshint/jslint can do
 
11:24 PM
You also get jshint in the bundle :) It's nice
 
Yeah, a little hard to believe at first sight too
:paranoid parrot: must try resharper to check if the image wasn't forged
 
how often does it outsmart itself though
 
@Esailija Rarely, the only thing that tends to outsmart itself is jshint
 
Closure Compiler gives many of those warnings too
 
11:26 PM
Also, WebStorm comes bundled in with Emmet (Zen Coding)
Closure compiler yeah, and JetBrains know to run the CC in the background and assert/respect its JSDoc annotations.
 
cool
 
so netbeans 7.3 imported my configs and projects from 7.2 nicely, but the coloring is rather messed up i.imgur.com/FChOPJW.png
there was less white and the object keys weren't green nor bold
inb4 eyes bleeding
 
ewewew
All editors should use the default scheme of sublime
 
Monokai?
 
All editors should use solarized
 
11:32 PM
Solarized also decent,
It's the default in the university for Emacs and vim iirc
 
I got sick of solarized..
It was too boring after a while
 
11:48 PM
I have some facepalm code here, anyone wanna take a look? jsfiddle.net/uvckc
 
@lawm wtf
 
@BenjaminGruenbaum yeah... uhh
heheh
uhh
what did I do wrong here?
 
You can't use object key-value notation inside a function body. jsfiddle.net/uvckc/2
 
@FabrícioMatté Thanks :D
and its ok to make the returned var the same name as the property?
 
11:51 PM
you should put that function outside
 
Uh sec reviewing it, well, my statement in the fiddle was wrong, i misread one part
 
@Esailija wat?
@FabrícioMatté oh
 
but yes, there's no problem returning it
 
you should put the function outside the parent function, so you don't create shitton of garbage
 
11:52 PM
functions take more than 2x memory of normal objects
 
Yeah, as Easilija said you can and should use prototyping for that
 
(That is, empty functions without closure)
 
@Esailija Nice
 
it seems to be returning the function itself though in my code..
Do I have to use prototype?
 
11:54 PM
When I have time I will experiment with linear probing and distributed linear probing (didn't come up with better name :P)
see if I can break the plateau
so far with current impl nothing improves performance anymore
 
@lawm No, it just saves memories. And I just saw the issue you mentioned
 
@FabrícioMatté huh?
 
Yeah having the method with the same name as the property won't work well
 
and all the --prof and --trace_opt etc is useless
 
@FabrícioMatté oh ok
 
11:55 PM
once you set the property it will overwrite the method
 
ar code = 'return {\n';

columns.forEach(function(column) {
  code += '"' + column.name + '":' + 'parser.readColumnValue(),\n';
});

code += '};\n';

var parseRow = new Function('columns', 'parser', code);
This is faster :O? Why?
@Esailija
 
Guess I'm a little slow with constructors today
Oh
 
@BenjaminGruenbaum what is faster
 
@Esailija Oh, reading that article at github.com/felixge/faster-than-c
 
yeah, it will overwrite the method in case it was defined inside the constructor body, else if it's in the prototype then it will be shadowed (either way you wouldn't be able to access the model method after setting the model property)
 
11:56 PM
@FabrícioMatté wait.. wtf..
 
@BenjaminGruenbaum oh, didn't make it that far
@BenjaminGruenbaum the loop is unrolled
afaik
 
@lawm here's a final version :) jsfiddle.net/uvckc/6
 
wait, the column names are also not dynamically read
 
He still has a loop though, he loops through the element reading the object
 
@FabrícioMatté huh?
 
11:58 PM
I've made a couple changes
 
can I just use function() though?
 
The only thing I can think of is memory access row[columns[i].name] looks very indirect
 
for what?
the model setter?
 
@FabrícioMatté I like this version... jsfiddle.net/uvckc/7
 
return {
    "asd": parser.readColumnValue(),
    "dasd": parser.readColumnValue(),
    "daa": parser.readColumnValue(),
}
 
11:58 PM
is that ok
 
so the loop is unrolled and static return
 
@lawm Yeah, you can use it, but you shouldn't name the method and the property with the same name otherwise the property will overwrite the method once set
 
@FabrícioMatté oh.. so hang on
 
@Esailija yeah but it's executed once, isn't it?
 

« first day (963 days earlier)      last day (3979 days later) »