« first day (1013 days earlier)      last day (3929 days later) » 

2:00 PM
0
Q: General Review Wheel of Fortune Game - Redone

NealAfter posting this question I made some updates and changes to my code. My new demo for the game is located here: http://jsfiddle.net/maniator/XP9Qv/ I am trying to make a Wheel of Fortune game -- right now it is only one player. Is there anything I could improve on in the code? Array.prototyp...

@FlorianMargaine mmmm nice elevator music
 
is there a reason that typeahead and ui.autocomplete don't automatically set this.autocomplete = 'off' ?
 
't fuck ... the developers of DataTables must have been drunk or something when they named their variables ...
What a mess.
 
Now, that's a prank!
 
I think he got hit on his eye with that glass
 
2:04 PM
yay, a do while loop. Those are far and few.
 
@OctavianDamiean why?
agreed, they look pretty messed up on the first look, but the naming scheme actually makes sense
 
@GNi33 $.fn.dataTableExt.afnFiltering.push( function( oSettings, aData, iDataIndex ) { ...
That's from their documentation.
 
it just tells you the expected datatype
oSettings -> object, aData -> array, iDataIndex -> number
 
Yea, but it's ugly as hell.
 
yeah, but it makes sense somehow
 
2:06 PM
I don't know, I just don't like it.
 
hungarian notation isn't a bad idea
 
It almost looks like Hungarian to me.
 
It is when the notation is to indicate types
validName is also Hungarian notation, but much more useful than bValidName
 
59
A: Do you prefix variable names with an abbreviation of the variable types? (Hungarian Notation)

Dean HardingWhen most people say "Hungarian Notation" they're actually talking about "Systems Hungarian". Systems Hungarian is completely useless and should be avoided. There is no need to encode the type of the variable in it's name. However, Systems Hungarian is actually a misunderstanding of the original...

 
How, exactly, is validName Hungarian notation?
 
2:08 PM
@RyanKinal it's actually the real hungarian notation (see the link.)
 
You can argue the valid is Hungarian
 
Trying to make a fake facebook? — Neal 6 secs ago
 
Ah, fair enough
 
I'm sure someone said it before me
 
Yea, I like the real Hungarian notation.
 
2:10 PM
@RyanKinal Only non-hungarians would ask that question
 
The example was I think about escaping and validation.
 
@Neil I am, in fact, non-Hungarian
 
@RyanKinal Pff.. obviously
 
So... Hungarian Notation is really just "useful variable names"?
 
2:12 PM
I'd say, meaningful variable names instead.
 
@Zirak (if you had read the answer I just posted, the link is in it.)
 
Meaningful/useful... same thing
 
@FlorianMargaine Whoopsie doopsie
@RyanKinal It's "prefixing your variables with meta-information"
validName was an impure example, you're right, escapedName is more to the point.
When the meta-information is typed, it's not very useful.
 
Alright, I can see that
 
I dislike Spolsky's solution because usName is cryptic, the us prefix is meaningless without an explanation.
unsafeName isn't very long
 
2:18 PM
Why doesn't typeahead and ui.autocomplete do this.autocomplete = 'off' to turn off native autofill?
 
tinker.io/09826/1 holy shit this is the closest I've ever gotten
 
Hi. How can i enhance this selector $("li:has(ul)") - I want : LI who has a UL as its first child(!)
 
I think it is starting to make some sense ... I think... won't speak too soon until I finish it
 
@MosheK Because the developers were either unaware of it, or it was written before native autofill existed.
 
@rlemon closest to what?
 
2:19 PM
@RoyiNamir $('li > ul:first')
with or without the >
 
@RoyiNamir $('li > ul').parent('li')
 
@eazimmerman diamond square implementation
missing the square step atm
 
@FlorianMargaine That gets you the ul, he wants the li
 
just diamonds
 
@RyanKinal Is there any downside? I'm extending one of those plugins and wondering if it can come back to bit me if I did something like that
 
2:20 PM
@FlorianMargaine I dont need the chiuld i need the father.
 
good luck ^_^
 
1
Q: General Review Wheel of Fortune Game - Redone

NealAfter posting this question I made some updates and changes to my code. My new demo for the game is located here: http://jsfiddle.net/maniator/XP9Qv/ I am trying to make a Wheel of Fortune game -- right now it is only one player. Is there anything I could improve on in the code? Array.prototyp...

 
1 min ago, by Neal
@RoyiNamir $('li > ul').parent('li')
@Feeds lol
 
tnx
 
@MosheK :shrug: I don't know. Do it, find out, and the come back to let us know :-)
 
2:21 PM
can't i use : first-child or something ?
 
@RoyiNamir That would get the ul's...
 
right....:-(
No Neal I meant in here $("li:has(ul)")
(under the HAS)
`$("li:has(ul:first-child)")`
valid ?
 
var goodLi = [].filter(document.getElementsByTagName('li'), ulIsFirst)[0];

function ulIsFirst(li) {
    return li.firstElementChild.nodeName === 'UL';
}
 
querySelectorAll('li')
:(
Doesn't CSS3 (or was it a proposal) had a context operator?
 
@Zirak better?
 
2:24 PM
:)
 
I'd still just use QSA though.
 
:(
 
lol ( about :) :( :).....)
 
 
(what is QSA ?)
 
2:26 PM
document.querySelectorAll mdn
 
!!google QSA javascript
 
@Zirak Exactly, that's bothering me too.
 
!!/undo X2
@Zirak this should work ^
 
Florian thanks for the code.
 
2:27 PM
undo xN should remove the last N posts
 
But I only keep the last one! ...fine
Make an issue on github
 
kk
 
Who had the sql question?
 
@Zirak Good read. I had always heard of the dark side of Hungarian Notation
 
@rlemon I've proposed that a couple of months ago here in chat.
 
2:28 PM
so neat
 
what? it sucks
 
p.s. I just tried : this also works $("li:has(ul:first-child)")
 
/me loves adult lego fans
 
SO's email feed really needs to say who chat messages are from
 
@OctavianDamiean Really? Did I just ignore it, or was there a reason?
 
2:28 PM
@Loktar Agreed
 
@RoyiNamir li is a kidnapper! he stole the first child of ul!
 
@RyanKinal reddit.com/r/afol has so much cool stuff
 
@Zirak I think it was just ignored, or maybe people didn't like that I wanted the interface to be like Git's commit referencing.
 
done, but I suck at writing issues.
 
@Neil :-)
 
2:30 PM
@Loktar tinker.io/09826/1 so close ;) one more step to work on and I think i might just have this down
it's really making me feel kinda stupid I haven't 'got it' yet.
 
grats man
 
@rlemon How did you manage to have trailing whitespace in an issue!?
 
looks like what @Darkyen did a few weeks ago
 
@Zirak no clue man.
 
!!color b00b55
 
2:31 PM
 
@Loktar kinda, I think his was more random (perlin style)
mines just diamond square minus the square step :P
 
!!color f0ead6
 
Edited
 
!!color bada55
 
2:32 PM
 
!!color transparent
 
@Zirak thanks
 
PNG fail :P
 
2:33 PM
that is great
 
It just doesn't support color names
 
I just found it placekitten.com/100/100 the url provides an image with those dimension
great for testing
 
@Loktar wow... that is awesome. I had to give it 3X heart because of the dudes username
 
@Loktar ... wow
 
> secretgspot
hehe
 
2:34 PM
but seriously, his code is minified?
 
@Zirak Yea, 'cept I'd go for !!undo ~1
 
makes me want to post my verlet stuff
@FlorianMargaine ah I didnt notice
I know exactly how to do that actually
but still looks pretty neat
 
@OctavianDamiean comment on the issue
 
verlet integration, snap the legs to the closest vertice as the spider moves
 
2:35 PM
ah yeah better
 
@Loktar That is pretty sweet
 
maybe Ill do something with verlet integration today
its fun making blobs
 
@Loktar if you explained half of this stuff (and how to implement it in JS) on your blog (even demos you haven't done, like this one) I promise you it would be one of the top canvas blogs out there
 
@rlemon yeah I did a new design
going to implement it tonight after work
 
i'll check it out
 
2:37 PM
then im going to write crap
 
ohh, yea, it isn't up :P
 
going to be close to that
 
nice!
 
I fully designed that one, so I dont feel dirty using it
 
hey people, don't you like this kind of design? margaine.com
 
2:38 PM
@FlorianMargaine needs colorr!!! lol
 
for some reason it reminds me a little of bonsaiden.github.io/JavaScript-Garden
 
@FlorianMargaine don't like, I love it.
 
@FlorianMargaine Yeah
 
actually its still better than my old one
 
I mean, it's simple
 
2:38 PM
@rlemon I guess they both have blue :P
white icons I suppose too
 
a simple list of articles with needed metadata on them, and that's it
 
I modeled mine more after windows 8 tbh
 
@Loktar still missing one thing...
 
made it all flat.
 
needs to be on there somewhere.
 
2:39 PM
haha yeah I need to integrate images into the posts on the mainpage too
Im thinking some of them will have images that are the whole block and the text is on top idk yet though
 
are you moving away from WP
 
@FlorianMargaine Yeah but some people love things when they are as nice as practical
 
or is this a WP theme you are making
 
@dievardump come on, it's pretty
 
@rlemon nah im going to integrate it into wp
 
2:40 PM
there's some nice box shadow and some responsive design
 
nah. it's clean, but for me not pretty.
just the green text with a white bg is for me not a good choice
 
I dont feel like all the extra work of moving away. I think that just goes down a diff rabbit hole and gets me further away from my goal of writing articles
 
@jAndy I want to watch it.. it keeps erroring
 
its hilarious actually
 
2:43 PM
I need to restart me thinks
 
and amazing on top it is
 
yeah, nice
 
I'm definitely not ready to become a father. Kids piss me off.
I have no idea why.
 
@OctavianDamiean omg, you're going to ?
 
@OctavianDamiean you should speak to @Wesツ, he has the same feelings :D
 
2:45 PM
you had some threesome action ? You, her and Mr. Alcohol ?
 
@slackhacker 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.
 
user652649
@OctavianDamiean i have: i hate kids
 
user652649
 
@jAndy whaaaaat ?
 
@akowalz 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.
 
2:49 PM
@Wesツ but I like cats! :)
@jAndy Nah.
 
Children are parasites
 
@jAndy that is a great video
kids only piss me off when their parents are shit heads.
 
well raised kids shouldn't piss you off
 
yay absolutely stunning
if the kids piss you off -> watch video
 
2:51 PM
Zirak you deserve to be blamed for that
 
> It turns out this is only a concern in the square step. You can easily overcome this and simultaneously make the surface wrappable by taking into account that one of the four diamond corner points lies on the other side of the array. (Another key to making the surface wrappable is to remember to seed the four corners with the same value.)
yesterday I was asking about this and it was told to just use three points and exclude the last, this makes more sense to me to wrap it - i think i'll try that
 
@rlemon Well, I don't know. I mean at a certain age they are just loud, run around 'n stuff. That's normal behaviour, they're playing but I don't like it, which kinda tells me that I'm certainly not ready for it.
 
believe me, certain situations or happenings change your whole view on this topic over night
 
@GNi33 ^ that.
I never wanted kids. I have two. For every shitty thing they put you through, they do two amazing things that will melt your heart.
 
So now that you don't have a heart, you can torture them all you like?
 
2:58 PM
lol
 
> Daddy, I peed in your shoes... but I also made you this paper heart with glitter and macaroni! please love me
 
@Zirak pretty much :D
 
@jAndy that was pretty cool
 
Subtle mental torture can be good compensation.
 
@rlemon thats only if you want to wrap
I have wrapping and non wrapping in mine
you can just avg the 3 points and its fine for non wrapping terrain
 

« first day (1013 days earlier)      last day (3929 days later) »