« first day (109 days earlier)      last day (4822 days later) » 

12:01 AM
Finally done
 
with?
 
reading the source on jQuery.Deferred and understanding it
 
lol
nice
 
also making a little example using it :)
only took me 3 hours -.-
now I need to wait for someone to post a SO question about it >_> (don't do it. Think @patrickdw might do it)
 
Bing copies Google results...
 
12:04 AM
Huh?
 
0
Q: Declaring javascript functions - two possible styles

BenjuWhat is the difference between these two? var doSomething = function() { alert("Hello World"); } vs. function doSomething() { alert("Hello World"); }

Downvote rape :)
 
Lol deleted :D
vote to close it guys
 
DAM!!! (@Bing)
 
I dont have 3k rep yet >_<
 
12:07 AM
Already did
missing 2 more
 
what was the answer?
 
> No difference; they are exactly the same.
basicly nothing.

but in object you can use this.foo = function() {}

and also i think the var = function() {}; this is more clear then the other.
 
Isn't scoping different?
isn't function foo globally scoped (outside of window)?
 
good god
ok
I hate JS and it's funky scoping rules
 
12:09 AM
it seems that with var x = function() only the var x is hoisted, but with function x() the entire definition is hoisted
 
"hoisted"?
 
var x; is a statement, which is executed before any code runs
the assignment = function() happens at runtime
function x() is also a "statement"
main difference:
x(); // fails, undefined is not a function
var x = function(){};
 
right
 
while the function declaration would have worked
 
yeah
 
12:12 AM
i always use var x = function() because i prefer to think of functions as objects. And I never call them before they're declared anyway
 
Someone who's not me start a question asking where, when and how to use jQuery.Deferred, jQuery._Deferred & jQuery.when. I want to both know where other people will use these features and answer it with my own uses >_>
 
lol
 
But I want to find out where and how other people use them aswell
 
@Raynos Start it yourself and go for the self learner badge
 
I don't even know what it is, yet alone when or why to use it
 
12:19 AM
Its just dodgy having half the answeres
@lonesomeday already have that
Wait no I dont
 
I was about to say...
 
lol
 
it just looks weird If I answer it.
 
No it doesn't
Say you're looking for usages of it
 
Fair enough
 
12:22 AM
then give one in the answer
 
is it better to answer with a usage or just put an example usage in the question?
 
hrm....
If you word it as "This is how I know, but I'm trying to validate/look for others"
 
How to link to a section of github>?
 
What do you mean by "section"?
 
don't
post the code
 
12:25 AM
@Raynos Click the code numbers on the left IIRC
 
@IvoWetzel I mean a gist I think
 
^--- this
 
@ircmaxell I wanted to link to a subset of the jQuery source because a jQuery method isn't in the API yet
 
Hm, there's no support for embedding gists so far :(
 
@Raynos: link to it, but post it in the body as well
 
12:29 AM
@ircmaxell rather not clog it up. I link to the jQuery api but dont post the introduction of the API in the body
 
@Raynos: it's better to not have an external dependency for your questions...
 
@ircmaxell it's not dependancy as much as it is reference. I talk about this and here is a link you can refer to if you want
Wikipedia doesn't have all its references inlined
 
true
0
Q: Problem in homemade function to merge objects

EricI'm trying to make a function that merges arrays. The reason is, I have a function that supposed to get the settings of an entity, and merge them with the global defaults. //So for example, let's say globalOptions is something like this var globalOptions={opt1:'foo',opt2:'something'}; //and this...

2
 
holy shit
recursion!
with eval!
 
...
 
12:36 AM
lol
@david: DAM what a comment!
 
ahahaha
was it you who upvoted it?
 
yup
 
0
Q: jQuery.Deferred and demonstrations of its uses

RaynosjQuery 1.5 brings the new Deferred object and the attached methods .when, .Deferred and ._Deferred. What are the possible usages of these new methods, how do we go about fitting them into patterns? I have already read the API and the source, so I know what it does. My question is how can we wri...

Show of your demonstrations :)
 
downvoted as not a real question >.>
Only 1 comment allowed per 15 seconds; timer reset.
timer reset.
dicks
 
:)
@david fixed.
 
12:44 AM
ahahah
non existant downvote retracted
ahah, spellchecker
 
0
Q: JavaScript Objects: Property Set but Returns undefined When Accessed

Matt RGreetings, I'm working with a JavaScript object that is defined like so: var ytVideoData = new Object(); I then assign a value to it inside of a jQuery .ajax(): $.ajax({ type: "GET", url: "xmlproxy.php?url="+ytId+"&mode=native", success: function(data) { ytVideoData....

Easy "thats not how asynchronous works"
 
It is possible he is waiting for it to finish before calling his code, and just messing up passing in the variable
 
No-one has a shiny jQuery.deferred example lying around :(
 
12:54 AM
> "We don't copy Google. We just have a test suite that says 'Does a Bing search for X match a Google search for X?' and we whip our programmers until the tests pass."
 
ROTFL
@Nathan still, it's theft...
 
One of their programmers must've made a feedback loop. "When the test fails, automatically fix Bing."
 
lol
 
ugh its labeled as subjective. How do I re-word the question so it has an answer?
 
?
Oh
I don't think it's subjective
Subjective would be "What's better x or y"
you're asking something different, namely "What else can this be used for in a proper manor"
 
1:01 AM
Put it this way, how will you choose an answer?
can you community wiki it?
 
true
no
 
I re-worded it anyway
if it's community wikid do I retrospectively lose rep?
 
yes
 
Ah :) Can you gain badges?
 
yes
 
1:08 AM
@Raynos Eh, I thought it's no, hmmm
 
1:39 AM
guess I found a good layout for my CV, gonna focus on projects and skills :)
 
@IvoWetzel :) go for it. And write a couple of extra cover letters whilst your at it ;)
 
@IvoWetzel Show it to me, and I'll rip it apart for you ;)
 
I only have a basic layout for the CV and besides the JS projects, nothing has been filled in yet
I'm at that job coaching thingadong tomorrow again, I'll get some help there :)
 
+10 away from a Bronze in OOP...
 
@IvoWetzel how old are you?
 
1:49 AM
They originally wanted me writing it in German first and translate it aftewards. But well, now I've written the cover and the stuffs on the CV in English
@Nathan 23
 
I think I asked you before but I forgot.
I hope you get a good job with a minimum of hoopjumping.
 
My expectations a pretty low, as always
If there's one thing I've learned in my life so far, then it's that things can always get worse
 
Sometimes I try to trick myself into liking the parts of my job I hate. Like, "OK dealing with this HR department is just like learning vi. Take a deep breath and forget everything normal and rational."
 
Does anyone want to answer my 100rep question before I award to one of the existing answeres
 
@Raynos Link?
But then again, I get 100rep every other day... while doing NOTHING
10k+ ftw
 
1:52 AM
lol
 
Or, "The user expects me to read her mind. Craft a useful error message."
 
@Nathan Well learning vi/VIM was a piece of cake...
 
oh Raynos you didn't get a Jon Skeet answer?
@IvoWetzel if you can learn vim and like it, you should be able to get by with anything.
 
Well I love vim
u for undo does make sense
It's like being dragged through the mirror
and all of a sudden, the things you thought were normal before, now look very strange to you
also that ß on my keyboard finally has a good use
it inserts {\n }
 
1
Q: How to keep a multi-user ajax web application in sync with the server.

RaynosI have a web page that shows a large amount of data from the server. The communication is done via ajax. Every time the user interacts and changes this data (Say user A renames something) it tells the server to do the action and the server returns the new changed data. If user B accesses the pa...

 
1:56 AM
@IvoWetzel
10
Q: When to check for undefined and when to check for null

Raynos[Bounty Edit] I'm looking for a good explanation when you should set/use null or undefined and where you need to check for it. Basically what are common practices for these two and is really possible to treat them separately in generic maintainable coe? [/Edit] [Edit] When can I safely check ...

 
oh ahah
 
Its double win. You can update the garden on a natrual use case for null & undefined
 
@Raynos, that's a good question, I wonder about that too.
 
hm, in your array example
 
1:59 AM
Oooh, I'll answer it!
 
Like where are you supposed to assign null, where assign undefiend where can you safely use ===
To me it sounds like ignore null treat undefined as NULL and only use undefined is the advice i got so far
 
I'll try writing something up, hold on a sec
 
im going to bed though
 
The entire question sounds a little silly to me :S
 
ill gif rep in the morning
 
2:01 AM
hey! the interwebz already came up with a name for the bing google thingy
"Binggate"
 
@david the question got a bit messy
 
@Raynos good night then
 
it's like asking when it's best to check for 0 and when it's best to check for '\r\n'
 
@david When is it best to check for your mom!
 
they're two completely different values, both are 'falsey', but they are used for completley different things
 
2:01 AM
undefined and null are very similar.
 
when you need a sandwhich?
 
Then tell me
 
@david: it's a little bit difference, since undefined is a subset of null
 
I seriously can't tell what the difference is
@ircmaxell are we talking javascript spec or semantics here?
 
so it'd be like saying when to check fluid levels, and when to check your oil level
 
2:02 AM
when you check (var == null) or (var == underfined) you can do (var == "\r\n") and get the exact same result
 
The problem is that they get confused a lot
@david liar
 
try it
 
@Raynos: semantics (arguing against David since I think your question is fair)
 
"underfined" ?
I like that one.
 
hmm, maybe not
 
2:03 AM
gnight all!
 
night
+9 to go
 
0
Q: css 3 float issue

Basiti have three float, which i need it in three div, cause the top float is dynamic like youtube expand videos option. anyway following are three float, two are on left and one one right, the right float only goes on second float right, but does not move more above that. <center> <div styl...

 
@Nathan good night
 
@david you do know how null & undefined work right?
 
Why doesn't any of the answerer tell this guy to stop using <center>!!!
 
2:04 AM
null == undefined is true anything else on either side returns false
 
I thought I did, but it seems not
 
@YiJiang happy?
 
But yeah, I promised myself not to touch most of the front end web dev questions anymore, if only to preserve my own sanity
 
i know that 0 =="\r\n" is true, because they are both 'falsey'
and i thought null and undefined worked the same way
 
@Raynos Only slightly
@CodingKitten Make me kappy
 
2:06 AM
@YiJiang Eh... what this error is 9% slower
 
I use undefined when something is not defined, I use null when it is defined to be nothing
 
theres o = undefined; o = null and delete o;
Assuming your deleting some kind of global thing
 
@CodingKitten \o/
 
@YiJiang I know what, FIREBUG LITE TO THE talkative badge
 
@david Care to explain how "\r\n" is falsey? If it really is, yet another thing to hate about the langauge
 
2:07 AM
chuck if (0 == "\r\n"){alert("hi");} into jsfiddle and cry :(
 
whitespace...
 
@david I think its time for the patronising how falsy lecture works
 
and of course the use of ==
 
or if (false == "\r\n"){alert("hi");}
 
sigh...
 
2:08 AM
the fact that null and `undefined`behave differently is annoying ><
 
but that's the same as false == " "
its because it uses .toString() underneath and that trims whitespace
 
false == "" I would expect to be true
 
or not..
 
false == "x" for any non-empty value of x I would not expect to be true
 
if (false == "\r\n\t\t\r\n\r\n"){alert("hi");}
 
2:09 AM
@ircmaxell whitespace gets cleaned up somewhere
 
that's why you allllllways use ===
 
@david except on == null to check for both undefined & null :P
and == window because IE makes me RAGE
 
@Raynos: I can't stand that. A string is a string, and nothing should change its value unless it's explicit
 
I have never had to check for both undefined and null... I check for the one I'm interested in checking for ><
 
@ircmaxell welcome to JSLand
 
2:11 AM
yeah, I know
 
    function is(type, obj) {
        return obj !== null && obj !== undefined
               && Object.prototype.toString.call(obj).slice(8, -1) === type;
    }
here you have to check, stupid IE quirksmode...
[[Class]] of null? Object!
 
sigh
 
and yes I could have used !=
but I stick to things
 
quirksmode always amused me... microsoft are the only ones who are awesome enough to include a switch to re-enable all the bugs in their software... and then have it default to 'on'
 
:D
 
2:15 AM
@Raynos Ugh, I'm unable to come up with any good wording on the nulldefined thing atm
Spent the last 6 hours thinking about the CV stuff
 
@IvoWetzel you got 2 days on that bounty :)
 
I just like to use null to indicate that there would have been something
 
"Requirements: Windows Vista/Windows 7, Yeah that's right were not supporting outdated legacy OS's like Windows XP"
 
like.... var obj = someCheck ? {} : null
 
0
Q: css3 inset shadow with tab effect

Jonathan P.I'm trying to figure out how to create a tab like effect while using CSS3 inset shadows. Here's my attempt: http://beta.songdesk.com/home/tour/overview And here's what it needs to look like:

Look at the answers... just look at them
 
2:17 AM
In web terms that would be like saying "Requirements: IE9/Chrome/FF3.6, Yeah that's right were not supporting outdated legacy browsers like IE8"
 
I want to cry >_<
 
:kitten rchern
 
0
Q: Cowardly PHP script just quits when error is encountered.

MikeCI have a cURL function that spiders all the webpages specified in an array. The array is called $to_be_spidered, I have the function being executed like so: $to_be_spidered = array('http://google.com', 'http://mysterysite.com', 'http://yahoo.com'); for ($i = 0; $i != count($to_be_spidered); $i+...

lol
 
I downvoted both - terribly unhelpful and useless answer. The correct answer is, of course - 'it can't be done'
 
2:21 AM
may it could...
with a lot of overlayed div trickery..
which is still: Can't be done
Since I highly doubt it would look any good cross browser wise
 
One of the answerer deleted his answer - ah, the power of the downvote
 
@Raynos I'm okay with not supporting ie8
4
If more people took that stance the web would be much cleaner
 
2:36 AM
 
2:49 AM
From a jQuery bug report:
 
3:06 AM
In regards to support I always try and support up to 2 browser versions back. This serves multiple purposes, one being that your markup is clean enough not to fire off errors on older or newer browsers and by doing that you will hit another marker: W3C Validated markup.
Javascript is the same story...
I've been on the scripting angle for over a decade and one thing I have hated more than anything? Is a website telling me I need to update my browser.
 
Why do you hate that?
 
So my biggest effort by-far on the development side..... is cross-compatible coding
Cause If I want to use my browser, I wanna use my browser? How dare someone tell me what I need on my computer :P
That's my job, to tell them what THEY need on THEIR computers :P
Nah its about being compatible really
If your netscape 3.01 can run it... it probably will run on many phone with lesser browsers as well.
 
That's all well and good, but I'm curious to know why you say you 'hate' being informed that your browser can't handle a website.
what I hate more is websites that tell me I need to downgrade to IE7 because their website doesn't work unless quirksmode is on
A little while ago a webpage told me I needed chrome 9 to view it (webgl)
so i upgraded
 
Forward compatibility of my code I guess. Most of it is clean but in the case MSIE, small changes trigger big bugs to go an clean up off libs
 
if a website tells me to view it in ie, i close the website
 
3:14 AM
nah i dont close anything
okay now if a website told me i needed chrome to view it id install chrome... or close the website :P
not so for MSIE
MSIE has a foothold on the web browser market, i dont see that changing anytime soon
 
I do, mainly because all the new awesome stuff doesn't work in IE
 
Depends.... which websites you're doing
 
so for me to be incompatible with any version of msie 5+ ..... is shooting myself in the foot..... and to be compatible... welll.... is shooting myself in the foot lol
well if your intended audience is computer saavy, then all bets are off on the reverse compatiblity....
 
We have reached the stage where people post a link, 3 people comment that it's awesome, one person says 'but it's just a blank page', and 20 people reply telling them to stop using IE
 
but if your audience is the general public... compatibility is key.... seo wise as well
yeah david i hear ya on the comments
 
3:18 AM
If you're still using IE6 and you're not in a company....
 
oh i got ie 5 ie 6 ie 7 ie 8 on various platforms
 
@IvoWetzel You're in one of the inner circles of hell?
 
mozilla firefox chrome opera
linux unix mac win
i touch up with all the flavors :P
 
@david At that job coaching thing, they have PCs... well locked down windows thingies
that means IE6. Period.
 
i never use anyones pc unless i have full access to all resources.... i hate working in untamed corp :P
 
3:20 AM
You can hardly surf the web for stuff with it, and with stuff I mean job searching related things
 
untamed meaning I am not yet in control :P
 
They have FX2 installed, but of course it cannot access the interwebz
So what do you do when IE6 fails to print a page?
Save as.... open with FX2... hit print
 
find out why it fails to print?
 
And then?
 
go through the steps to figure out if first printer works...
 
3:22 AM
Can I magically change a random site on the interwebz? :P
 
aye
once again, if you're clever enough, you'll not only learn how to fix it... you'll learn how to fix it on droves of documents .... automatedly...
 
By "not working" I mean "Only prints the contents of the first page, for every page"
 
are you talking about a specific bug you have?
if so point me to it
 
no, just some random bug I hit, can't remember the page
 
im not scrolling up :P
oh
 
3:24 AM
If someone forces me to use ie6 i'd probably spend half an hour arguing with them about how retarded and backwards they are.
 
always find the root cause or end result of your error and work yourself forward or backward to find the actual culprit... ya know like rebuilding an engine per se
well why print a page? isn't that what pdf's are for?
 
Job coaching stuff, those guys love their paper
 
So if you find something, print it out!
 
well tell em to save the earth and get a goddam laptop!
 
3:26 AM
I have a netbook, but well no WiFi there :P
 
better yet tell em to go green and buy a used one
 
At least I can show them my personal website I made on that thing
 
anyone know of a good place to buy a fast laptop for cheap that's dispensable?
 
I could get it to work on IE6... but not without destroying my beautiful HTML5 markup
 
well why not vary to document?
 
um i dont like watch crap online sir
but thank you for thinking of me
see thats whats bad with the internet
too much junk
@IvoWetzel Which is why I always am compatible with at least 2 versions back.
 
don't worry louie, you wouldn't be able to see it from IE anyway
 
i can see a lot
from many
as can you
 
... screen shots?
 
aye enjoy
 
3:34 AM
how old are you drlouie?
 
old enough to fart and not be amused?
but not as old as you might think
or as young as you may imagine
 
"old enough to fart and not be amused?" === too old
 
3:48 AM
well i better go play video game to let my mind rest
bye guys
 
4:10 AM
Good evening...
 
@david lol that is awesome
wow is that some sort of game, reminds me of darwinias style
 
@Loktar there is no interactivity atm :( I'm not sure what i'd do to 'make it a game'
short of putting in random rts things, like resources and bases and things...
in which case it would be better to start from scratch and use a library rather than trying to code the math myself
 
ever play the base defence mods for starcraft or wc3?
idk, i imagine something along those lines
constant spawning of units
 
you mean like 'omg two thousand five hundred and fifteen MILLION lings`?
 
you can create maybe like 2-3 diff types
and its rock paper scissors
 
4:17 AM
hmm, that could work
 
it looks really cool though
nice job
 
thanks :D
 
the goal is to push onto the others "base" which is the corner pointy thing maybe
 
if you want to try gamify it feel free to mess around with the code
 
oh man, couple it with ivo's node code :P
 
4:18 AM
unfortunately it started off really well structured, and then i just started messing around with it
 
ill bookmark it, might mess with it tomorrow for the heck of it
you should put it on reddit/js
 
yeah i have node running at home, but haven't got round to really having a crack at it
 
might get some cool ideas
even shadows... i friggin love it man lol
 
it was really just meant as a test of 3d projection code, the swarming ai was an afterthought, and the lasers an even bigger afterthought
 
i suck at that sort of thing
my best attempt was for the last js1k
 
4:20 AM
is that the one that got won by the christmas tree?
that tree was insane
 
yeah
 
ooh nice
 
his tree was so awesome
he used like 2500 billboard sprites i believe
looked amazing
 
4:41 AM
drlouie's response was awesome, I think he thought it was porn
 
5:08 AM
Did someone say porn?
Bad Internet! BAD BAD INTERNET!
The internet before porn came into the picture was very cool and calm, but as soon as porn shows its face, the Internet was all of a sudden this odd dirty place.
 
5:56 AM
but much more popular
 
 
2 hours later…
8:25 AM
@ircmaxell svnserve needs a server, hence the Tonidoplug ;)
@Raynos Not git because (and I know I'm gonna be flamed for that but) I like SVN more :D. And not your company's favorite because I need my own server.
 
 
1 hour later…
9:36 AM
mornin' all
 
9:50 AM
Just running my cloud9ide server. The fact that they run cloud9ide for you and set up ports to connect to is pretty awesome :)
3001 rep, just another 7k for the last hurdle.
 
ha....
then they'll invent some new stuff
 

« first day (109 days earlier)      last day (4822 days later) »