« first day (634 days earlier)      last day (4315 days later) » 

6:02 PM
here's very simple example jsfiddle.net/RezZu :P
 
what font do we all think?
 
you don't have a psd?
 
Arial?
nope
boss can't find it
 
I dunno. It looks too thin to be Arial. But I'm not expert.
 
and this joker company is a joke
Arial bold
:P
 
6:04 PM
:-P
The M is angled too...
That's probably a pretty big clue
A raging clue, if you will
 
And the kerning is terrible.
 
close enough?
minus bottom line being too big
 
0
Q: Keys pressed at the same time

MageekCan I know the number of keys pressed at the same time in Javascript? If so, how can I have an array of their keyCode?

 
@Esailija Thank's. I don't knew that can be done with CSS3
 
haven't gotten there
 
6:07 PM
@LucasSantos yeah, and CSS3 uses GPU for the animations as well
 
@rlemon wazzat?
 
@Neal you could have addEventListener
 
lol dryermaster.com/css/styles.css this is their CSS
 
oh thank god
 
like... how can companies take money for this
 
6:08 PM
@dievardump ehhh, no fun :-P
 
and another victory over ie7
take that, you vicious piece of software
 
piece of malware*
 
ugh. i'm already tired of this. jsfiddle.net/rlemon/G8V66
^ don't judge... base64 the image was the best / easiest option (for examples purposes)
 
base64 images are good
(depends on what you want to do)
 
6:15 PM
well in this case I was too lazy to load imgur
 
Hey do any of you guys know where controllers in .NET MVC are typically mapped to URLs? All the back end guys are hiding and I have no idea where this stuff gets determined.
 
Did you sacrifice a goat yet?
 
No but I've kicked a few puppies and clubbed a baby seal or two.
 
I get a UNIX timestamp from an API (1342023300) but when I use JS Dates I get a different "hours" part than in PHP: jsfiddle.net/xmVDx vs codepad.org/yZm1LHmB
 
timezone
@ComFreek JavaScript will refer to your browser/system timezone. PHP to the server timezone
 
6:20 PM
That's your problem; you used the ritual for WebForms, not MVC
 
Oof. Webforms. So terrible...
 
@dievardump I set UTC as the default timezone in my PHP script. But how do I change the timezone in JS?
 
34
Q: How do you create a JavaScript Date object with a set timezone without using a string representation

DanI have a web page with three dropdowns for day, month and year. If I use the JavaScript Date constructor that takes numbers then I get a Date object for my current timezone: new Date(xiYear, xiMonth, xiDate) Give the correct date but it thinks that date is GMT+01:00 due to daylight savings tim...

 
@dievardump I've just read that, too. But I don't have the hours, minutes and seconds as separate values.
 
6:24 PM
So you create a date, and then you create a new one, with the first created, changing the UTC
tadaaaaaaaaaaaaaam
 
seriously... anyone?? jsfiddle.net/rlemon/G8V66 I am just like... wow that was a lot of CSS to produce this.. maybe i'm just tired and grumpy because I cannot order my tablet yet...
 
I'm sorry i have no better solution for the moment, i don't really have time to play with Date
Just don't click on the first 4 links
 
@ComFreek You want the getUTC versions of all the get stuff. Should only need one date object.
.getUTCHours instead of .getHours for instance.
Are unix timestamps up to seconds though? I'm puzzled by the need to multiply by 1000.
 
@ErikReppen Thanks, it works. But I still need to get it into date.js for formatting...
 
@ComFreek dateObj.getUTCHours()
 
6:29 PM
PHP Unix timestamps are in milliseconds whereas JS timestamps are not
 
When you do .getTime from a JS Date object you should be getting UTC in milliseconds
 
yeah just use the timestamps
 
I think it was just truncating the extra decimal places you were adding. It works fine without * 1000.
We get more granularity than seconds. It would !@#$ed up if we didn't.
 
All to format dates?
 
@ErikReppen No it does not: jsfiddle.net/XDrVm
 
6:32 PM
are you fucking with me
 
you are doing it wrong, try jsfiddle.net/XDrVm/1
 
Sorry comfreek. You're not feeding it ms in the first place so yes in that case you'd need the extra.
 
29.91KB TO FORMAT DATES?!?!?! ARE YOU SHITTING ME?!!?!?!?!
 
that minified file is not 30kb ? :P
and the locale info takes a good chunk
 
@rlemon No. JavaScript really is shit with dates.
 
6:34 PM
Actually, you need only core.js with 9.8KB
 
I know it is... but you don't need a lib that will convert to every possible format you need a specific script that will do what you want it to do and produce the specific format you need
What is your input format and what is your output format
I guarentee I can do it in less than 1K
 
I'm having an issue with $.fancybox.showActivity(); being straight up ignored by Chrome and Safari.
 
@rlemon Challenge accepted ;) I get a UNIX timestamp from PHP as the input
 
I don't need a whole dishwasher to wash a fork.
 
@rlemon And the output should be a datetime string for the user. But it should be editable via a locale file
 
6:36 PM
@ComFreek Forgot to 'at' you. It takes milliseconds args. You're just sending it seconds in the fiddle.
 
@rlemon Go ahead and try. Date/time is one of man kind's greatest shitdump.
 
Like this recent timestamp is in MS 1342031423633. It should give you 18 from .getUTCHours
 
@rlemon I believe
date.js is not for "just one format"
 
Just thought I'd pass something along: Fuck.
 
6:39 PM
lol
 
Why hello there.
 
@gsnedders Hi!
 
Best thing to do when juggling Dates is use .getTime() values as your back and forth data with the server. That's the UTC timestamp in ms.
 
@dievardump that was my point.
why do I need all formats if I will be using only a few
 
6:42 PM
I'm definitely annoyed with our use of date.js. I really don't feel like it solves anything but non-trivial problems for us.
 
@ErikReppen Just found phpjs.org/functions/date:380
 
I'm looking for help with fancybox, any takers?
 
what is the format the user wants to return in? i mean i'm not going to get into something too fancy here but you can do this all without TOO much fuss.
 
@rlemon That's the point. That should depend on the users language, so the format should be saved in a locale
 
or don't use strings and use number only formatting.
 
6:46 PM
timestamps don't depend on locale which is exactly why they're great
 
01/30/12 is pretty clear
 
on top of being simple integers
 
@rlemon I come from Germany, so I prefer 30.01.12. So you see that there's a need for different formatting.
 
@ComFreek Just make everyone use ISO8601.
 
you prefer well guess what, learn to deal with what you are given.
I don't think a date format will make or break your site
unless you provide them with the unix_timestamp and a conversion chart
 
6:48 PM
lol
 
@rlemon Hmmm yes, you're right. I take too much time for this dates!!
 
exactly.
users will learn to read whatever format you provide them - so long as it is sensible.
 
Sam
Evening guys, this variable is coming up blank, any idea why?

var currentPos = document.getElementById("sliderWrapper").style.left;
 
@ComFreek, Everything should be saved in UTC. Think of the locale format as more of a 'view' thing.
 
Posted on 4562001 seconds after midnight on February 2nd 2002 GMT
 
6:50 PM
@Sam You should use document.getElementById("sliderWrapper").offsetX
 
Sam
@ComFreek Ill try that, thanks
 
@ComFreek yea if he wants the offset :P
 
^ no
 
Sam
6:52 PM
@rlemon It was the css property left i was trying to get
 
WOOOOOWWWWWWWWWWWrlemon 21 secs ago
 
@Esailija :-D
 
@Sam relative to the page? the parent element?
or whatever is defined in CSS
 
Sam
@rlemon Relative to the parent element i guess. The div is position absolutely inside a div, and i was trying to retrieve the left property of this absolutely positioned div
 
is it's parent div relative or??
 
Sam
6:54 PM
Relative yes
 
ok
 
Sam
@rlemon Perhaps i should put together a jsfiddle?
 
beat you too it
if you give .foo a margin of 100px it makes it a bit more clear that you are grabbing the offset relative to the parent element.
@Esailija boo that password didn't work for the email also listed :P
 
Sam
@rlemon Fantastic thanks man, is there a reference you use for methods like this? Or is it all in your head? haha
 
most of it is in my head at this point. however be warned I just console.log(element.offsetLeft, element.offsetX, element.style.left); and got 100, undefined, ""
I can never remember the exact cases.. just what exists.
iirc offsetX is really supposed to be clientX and that is for mouse events (??)
however my #1 reference is Google + MDN + MSDN (for when I care about IE)
 
7:03 PM
Badge progress
 Copy Editor
496 edits (99% done).
oh yea
 
nice
204 revisions :< I got a ways to go
 
@rlemon for mouse event
// Calculate pageX/Y if missing and clientX/Y available
if (event.pageX == null && original.clientX != null) {
    eventDoc = event.target.ownerDocument || document;
    doc = eventDoc.documentElement;
    body = eventDoc.body;
    event.pageX = original.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
    event.pageY = original.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
 
get that puke out of here
 
it's legit bro
 
unformatted (Y U NO REMOVE LEADING TABS?) and un-needed.
question was for elements relative to their parent.
better
 
7:06 PM
well it's just a question of calculating .offset() and reducing it from pageY
 
or element.offsetLeft // bam relative to parent container.
 
yes but for the mouse event.. but I guess you weren't even asking about that
 
nope
lol
 
what are you actually asking
 
but here is a cookie anyways
i'm not asking anything! :P
19 mins ago, by Sam
Evening guys, this variable is coming up blank, any idea why?

var currentPos = document.getElementById("sliderWrapper").style.left;
 
7:09 PM
oh lol
that is so horribly naive
one does not simply .style.left
 
would have been my first assumption (without prior knowledge)
so it's not incredibly stupid to think it would return what he was after.
 
@ComFreek That's some awful code
I especially enjoyed lines 66 and 189
 
so it attached this.date everytime, calls it and it just stays there
 
posted on July 11, 2012 by John Resig

Jeff Atwood wrote up a post today on the merits of writing a technical book in this day-and-age and specifically called out my past post on programming book profits and my work-in-progress Secrets of the JavaScript Ninja. I wanted to give a brief status update on the book and how it’s going. I started the [...]

 
ugh, why do I have the urge to fix it? :/
 
7:15 PM
_pad = function (n, c) {
            if ((n = n + '').length < c) {
                return new Array((++c) - n.length).join('0') + n;
            }
            return n;
        }
?????????????
 
it pads
 
wow jr got the shit end with his book.
lol <$400 bucks
 
Uncaught ReferenceError: $ is not defined
 
posted on July 11, 2012

Last week I got annoyed at the large differences in syntax for vendor-prefixed device-pixel-ratio media queries. I said, half in desperation and half as a threat, that it might be better to have only the WebKit rendering engine and ditch the rest. Meanwhile I’ve had some time to think about it, and I find that I still support the idea of multiple rendering engines. Competition is still

 
I'd assume that means I'm not importing jQuery.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
 
7:23 PM
Was String(someNumber) not universal at some point? Not sure why so many people do the + '' thing to convert.
 
see if it is loaded in your console
because it's shorter to write
 
works in console.
 
like +new Date instead of Number(new Date) or new Date().valueOf() or new Date().getTime() or Date.now()
 
I usually .toString if you can, and '' + for undefined or null
And I prefer Number(...) to any other kind. Dunno exactly why
 
or !!value instead of Boolean(value)
 
7:25 PM
.toString was always the dangerous one in my experience although probably reliable for numbers.
 
9..toString() vs '' + 9
 
I tend to care more about legible I guess. If you're basically casting something, cast it already.
 
When did you ever need to do that? 9..toString()?
 
though they have their place, like when you pass Boolean, String or Number as the callback for .foreach, .every .map etc
 
Huh. The whole AJAX thing works when I put it in the console, but not in the actual code.
 
7:27 PM
@Zirak well you do :d
 
No I don't. If I wanted 9 as a string, I'd write '9'
 
no you wouldn't
 
If I wanted n as a string, I don't have to do n..toString :P
@ErikReppen Sorry to shit on your parade, but String(...) calls the native ToString
 
Ah, oh well.
 
+!!~0
legit
 
7:35 PM
@Zirak - String() handles null and undefined before calling toString. That may be where I got the idea it was more ideal, although I guess that depends on circumstances.
 
BAM
I like this guy, even when I dot not totally agree
 
Somebody call 9(+!!~0)(+!!~0)
 
Who you gonna call?
 
I don't know what wouldn't suck about being the lead on the yahoo home page.
 
@ErikReppen You don't know what Yahoo do for the web if you really think it'll suck to work there.
 
7:41 PM
I think it sucks to work there. I think Crockford jumped ship to Paypal (also ew) for a reason.
 
bahahaha lame iphone joke
and in the audience you actually hear "he he cough he cough"
 
I'm not saying their engineers suck just that the work looks awful.
 
Maybe 'cause he is an effing selfish guy who think he masters what people have to think about JavaScript, and Yahoo disagreed
 
I don't agree with a lot of Crockford stuff but I wouldn't call him selfish. He left shortly after they started patent-trolling.
^ no idea if that's why but that's the same reason I turned down interest from them.
 
Yeah, I don't get the Crockford hate. He's just stating his views on JavaScript, like everybody else.
And Lint is honestly a good tool for debugging, assuming you don't take it as rote
 
7:44 PM
Well, JSLint's defaults are pretty obnoxious on a lot of counts. But at least they're defaults that can't be turned off.
er... 'can be turned off'
 
@RyanKinal But how he answer to people on issues is not "right". Not when you have his posture.
And he does not seem like someone with whom you can talk when you disagree with him. It's like " No I think that. That's it. I'm done. "
 
He's very outspoken. Just like many high-profile programmers.
How often do we say "OH FOR THE LOVE OF <DEITY> DON'T DO THAT" in this room?
 
So hate is justified. If you can not talk about desagreement when you're a developper, then go fy.
And how many times we answer even if we say that ?
 
Crock has his views, and they're very well known. He got sick of repeating himself.
So he stopped.
 
We can not: issue closed " Don't use jQuery little bastard "
 
7:48 PM
No, but we can say "Look, this has been discussed at length. Go read something."
 
all engineers and programmers are a-holes. face it. i'm a a-hole and you are an a-hole. designers are the pickles that are shoved into the a-holes.
 
Do you know how big a dick Linus Torvalds is? But it's not because he's a dick at heart. Crockford's a nice guy, but this is the internet and he got fed up with the idiots.
 
^ that
If I were as well-known as Crock, I can only assume I'd be fed up with saying the same thing over and over again as well.
And I'd be all "srsly go read my book"
And when I got sick of that, I'd just start closing comment threads and not responding at all.
Which, incidentally, is what Crock does.
 
Ok ok.
 
+1 for "And I'd be all srsly go read my book"
 
7:57 PM
 
a client just sent me an bug-report
in a .ppt - file
we got a freaking ticketing system FFS
so they open a ticket for a whole template page and append a .ppt
 
There's somebody who uses what they know.
 
time to go home for today :D
 
@rlemon is the video interesting ?
 
yea
his humour is a hard pill to swallow. but the talk is nice.
he is right
 
8:01 PM
I think Linus might actually be a dick. He called the subversion guys morons.
 
Yo! Totally forgot about stackoverflow's chat rooms!
 
svn sucks
 
How do I get a function called from one document to run stuff ($().html()) on another document?
 
linus was right
 
Quite possibly, but it takes a dick to say it publicly when you have clout like he does.
 
8:02 PM
@SomeKittens get reference to another document and use it as context
 
So... since I'm here (because of @Esailija of course) then... what do you guys think about HTML5? More precisely I'm asking about Canvas. Do you think this the end of Flash/Java/etc?
 
@Esailija how do I do that?
I tried:var main = frames["parent"];
main.getElementById("modalSpan").innerHTML = msg;
 
@SomeKittens I dunno, show me code
$("#modalSpan", frames["parent"].document)
@freakish no :P
 
@Esailija Care to say more? :)
 
well not in the near future at least
 
8:09 PM
@Esailija Thanks
 
By the way, does IE support Canvas?
 
IE9 yes, IE older have some proprietary APIs
@rlemon the black and white tv argument is wonderful =D
 
omg yes
this entire presentation is dull but like. fuck he is so right.
 
I think I had this argument with a friend of mine a long time ago where he said that pages should look exactly the same in every browser, wish I could have came up with this argument
 
I need to make a blog - learning Web Development: From the shoulders of giants.
heads to WP/tumbler/blogger .... god they all suck
I need a good FAST canadian hosting company. I want to host a personal site. and lememe
so I will need a shit tonne of storage :<
 
8:14 PM
:I
 
watching this video and then looking at how people use jQuery makes me angry.
I just wish I could word things like some of these guys
jQuery is not a SHIM! If you want browser support use a SHIM. jQuery is an Abstraction Library designed to do the repetitive and redundant work for you! - mini rant
 
Where's life's "make code work" button?
 
@SomeKittens On your keyboard. Just hit a lot of them in the right order, and your code will work.
 
@freakish excanvas normalizes for older IE. I've run into some quirks but it's better than trying to get documentation for the proprietary version.
 
@RyanKinal That made me smile. Nice.
Alright, now it's less wrong
anyone know why including an object would block any code underneath it?
 
8:18 PM
@ErikReppen Thanks for the comment. Sorry, but I just started watching the video and I don't longer care about Canvas. :P
 
<div>Hi!</div>
<object....>
that works
<object....>
<div>Hi!</div>
that doesn't.
 
... are you missing a </object>?
 
<object data="svg.php" type="image/svg+xml" id="MOSVG" />
 
Yeah object closing tags aren't optional IIRC.
 
rlemon NCZ is pretty good. I think he worked with Nichole Sullivan on Smush.it or CSSLint, I don't really remember wich one
 
8:20 PM
39 secs ago, by Erik Reppen
Yeah object closing tags aren't optional IIRC.
 
fixed, thanks
 
It was on CSSLint
 
webkitRegionOverflow: "undefined" - has anyone seen this?
 
I don't have sound :(
 
8:21 PM
That part is pretty excellent
 
"she gets to FF by clicking on the IE icon I put on her desktop"
MY GOD THAT IS GENIUS !
 
document.createElement("div").style.webkitRegionOverflow
//""
in firefox youd use mozRegionOverflow obviously
 
@rlemon Holy crap, yeah it is
 
@esa
 
@RyanKinal My grandma is now getting chrome!
 
8:23 PM
@Esailija I'm having that DOMException in Chrome
 
Chrome mysteriously appeared on my parents' computer... not sure who did it.
 
On my father computer too. He likes the private mode.
 
LOL
 
My dad is an engineer ffs and I couldn't get him to stop using IE6 a couple years back.
 
I have to guess it was my brother. For exactly the same reason.
 
8:24 PM
@dievardump fucking awesome!
 
Who stared ?
 
ME!
 
@Waddler that's cool
 
ROFL
 
:4487546 lol it was funny regardless. the finding out about sexual preference is not so much (I can imagine your mom didn't take it so well)
 
8:26 PM
@Esailija this DOMException is holding up progress. which is not cool. It's not allowing $.fancybox.showActivity(); to function proplery
properly
why does firefox not have an issue with with it, but webkit does?
 
:/
 
They were not together anymore, so no problems ^^
 
@Waddler Because they're (dun dun DUUUUUNNN!)... different browsers!
 
@dievardump ahh then as long as you were ok. lol, if you were not. sorry.... quietly luls
 
@RyanKinal yes. I realize that. I'm trying to solve this issue.
 
8:38 PM
dude all browsers don't need to look the same.
as long as your site functions who the fuck cares?
 
Twitter bootstrap modal isn't working.
<a class="btn" data-toggle="modal" href="#modmodal" >Launch Modal</a>
	<div id="modalSpan"><div class="modal hide" id="modmodal">
		<div class="modal-header">
			<button type="button" class="pull-right" data-dismiss="modal">×</button>
			<h3>Modal header</h3>
		</div>
		<div class="modal-body">
			<p>One fine body…</p>
		</div>
		<div class="modal-footer">
			<a href="#" class="btn" data-dismiss="modal">Close</a>
		</div></div>
 
no your code doesn't work
 
@rlemon No, YOUR code doesn.... yeah, you're right.
 
twitter.github.com/bootstrap/javascript.html#modals because this seems to work fine for me :P
 
@rlemon I'm copypasting from your fiddle
 
8:39 PM
if you edit ping me one more time......
 
the CUSTOMERS.
 
The only thing I changed from that code was the id
 
@rlemon I was, and I am. I laughed too ^^
 
@Waddler dude, learn to understand the customers in this regards are wrong. Do you really think there is a guy sitting there with Webkit and FF and just alt-tabbing back and fourth on every page/feature waiting to raise his red flag like "HA! you mofos! this is different!"
@dievardump cool :P so long as no feelings were hurt it is a good thing (if they were hurt i'd still say it was a good thing just unfortunate feelings were hurt)
@SomeKittens then you need to change the href value or the last line in the JS portion to reference the new modal id
 
yes, the customer wants his site functioning the same in all browsers.
 
8:44 PM
yea well then the customer can pay you an extravagant amount because that request is fucking ridiculous
What if a TV producer said "I want my show to look EXACTLY the same regardless of the TV" you would say go fuck yourself.
 
@Waddler - key word there is "functioning". It doesn't have to have the exact same pixel footprint. "All Browsers" is pretty broad, enjoy supporting Netscape Navigator 1.0.
 
@rlemon alright, I get it. Go have fun with whatever you're doing.
 
are you talking about the difference between HD and SD?
all browsers = webkit: Chrome/Safari; firefox, IE
 
@SomeKittens lol well did you really just get it? because I don't mind helping :P
@Waddler for that request I would instantly double the cost of my services. because you will spend more time dealing with inconsistencies with how they render things (or missing features etc) than you will doing the base of the work
 
@rlemon No, same issue. I thought you were telling me to go do it on my own and to stop bothering you
 
8:48 PM
@SomeKittens lol no I changed the id to SomeKittens
and it works for me still
 
I guess that's the world of IT Consulting then.
I'm going to implement a different solution. at least now I know what the problem is.
 
AGH. Can ASP.NET please just treat form elements like FREAKING FORM ELEMENTS? I just want my checkboxes to work like normal.
 
@Waddler the world needs to shut up and listen to the people who are the experts. What if you were an auto mechanic and you Knew how to do your job... then some joe blow guy walks in off the streets and says Build me a car. But I want it to fly and shoot rainbows. Would you tell him no? or would you spend the rest of your life trying to make a rainbow shooting flying car?
 
... I might actually try for the rainbow shooting flying car. That would be BALLIN.
 
Rainbow shooting flying car? mind blown....
 
8:52 PM
a rainbow shooting flying car is beyond the pale.
 
Anyway. I quit for the day. Later all.
 
later
 
@Waddler It is a difficult subject to bring up.... but do a cost analysis of how making it look pixel perfect in every browser will vastly add time and effort... then present that to the client and tell them if this is what they want, then this is what they have to pay for.
 
but my employer is not going to tell the customer too bad, so sad on something that is feasible.
 
@Waddler You have a strange definition of feasible
 
8:53 PM
If i want a rainbow shooting flying car, i'm willing to pay big $$$.. if I want a pinto i'll give you a scratch ticket that may or may not be a winner
now i bid you all adieu
 
LoL. nice one @rlemon
 
the skinny of it is; different browsers implement things differently ... sure you can make it appear like it is functioning the same (using polyfills and shims) but it will never be the same. so make sure at it's core the site functions for every possible user... then make sure users with modern browsers get the best experience their browser has to offer (in the case of IE that isn't much)
and i'm out
 

« first day (634 days earlier)      last day (4315 days later) »