« first day (1377 days earlier)      last day (3576 days later) » 

10:00 PM
thats fair. we all learn different so we're all going to probably have unique views on what is best
 
Most tutorials I see talk to you like you're dumb, explaining what a "variable" is. How I learned to program was reading blobs of code and seeing what they do.
 
how in the world do you get the value of an input[type=date] in chrome when the user does not type the entire date in?>
 
I avoided specs for so long because I couldn't grasp all of the terms and they looked very overwhelming. once I actually sat down with one for a given amount of time life got so much better.
 
very carefully
 
Showing you what variables do makes them intuitive (or it did to me, at least). Reading that they're "boxes" or "wrappers" or "wtf baskets" or "just like 9th grade math!" annoys me.
 
10:02 PM
and we have gradients! codepen.io/mrzepka/pen/hkbjD
 
Same goes for functions, loops, etc
 
@Zirak Got to agree with that
Easiest way to learn has been to see working code and to tinker with it
 
And not the codecademy approach of "let's write a loop together!" which, for the average+ pupil, is pure boredom
 
@rlemon reading specs is where my cs classes help. My last class my professor was like "here's the java api, don't ask me shit just read that"
@Zirak I ran through that just for syntax and stuff for JS. It was foreign to me before
 
@mrzepka little tip
 
10:04 PM
oh wow I didn't make gradients, I meant color changing smoothly!
 
if( foo ) {
  return 1;
} else {
  return 2;
}
could be
 
ternary
 
After you're comfortable with how to interact with the language, reading specs and so forth makes sense.
 
if( foo ) {
  return 1;
}
return 2;
@Zirak I was comfortable ..
 
ugh, date support sucks. jsfiddle.net/4Rz3T
 
10:05 PM
still avoided them
maybe it was just me.
 
it could also be if (foo) ? return 1 : return 2;
 
no
return foo ? 1 : 2;
 
ternary scares me
 
@mrzepka Try that, see if it works.
Google to find out why it doesn't.
 
( (condition) ? if-true : if-false )
 
10:06 PM
@Zirak I thought it would skip return 1 since foo was false
yeah
I ended up not even using that function
 
There's another reason why it doesn't work. A language related grammar one.
 
you mangled an if statement with a ternary
 
:(
I used it correctly in a bigger project
 
don't look at failures as something to be down about, look at them as learning a new way not to do things.
 
I'm trying to use them sometimes to get better at using them, but I still don't like them
 
10:07 PM
being bummed about bugs is like productivity poison
 
Oh yeah, especially with this stuff lol. I have a lot to learn
 
now.. if you wanted to be hacky
nvm
I forgot you decrease as well
function changeColor(color, increase) {
  return color + ( increase ? 1 : -1 );
}
there is also no reason to +=
you return and overwrite
you also setTimeout(run, 10); in every block in the switch statement
you can just run that after the entire switch
same diff, less code
 
I could just do it at the end
why is there no reason for the +=?
 
color = func(color, 1);
function func(color, int) {
  return color + int;
}
you return the value + the modifier
what is the point in setting it twice?
 
2 * increase - 1
 
10:13 PM
I was going to suggest that :P
but yea, he's just learning
true=1
false=0
you can take advantage of that
 
Actually no don't
 
27 secs ago, by rlemon
but yea, he's just learning
 
2 * !!increase - 1
 
that is what that implied ;)
!!> 2 * false - 1;
 
@rlemon 1
@rlemon -1
 
10:14 PM
there is no need to force boolean
 
changeColor(123456, 5)
 
@rlemon I'm come from typed languages
so I'm used to int this boolean that
 
it is a hack
unreadable
therefore you shouldn't do it :P albeit it is possible.
 
Nah !! is a valid operation and totally readable
 
if I do color += 1 or color -=1 isn't that better than an entire function to add one?
 
10:16 PM
No
 
yes
 
lol
it seems as if you both have different ways of approaching this
 
What if you decide to make it ±2
 
color += increase;
set increase as a variable
generally however modularization is a good thing
 
That still breaks encapsulation
 
10:17 PM
but for this single case I wouldn't have the function
i unno
 
does !! always yield a 0 or 1 numerically?
 
It yields true or false
 
^^ no it always yields a boolean
 
and true is always 1 when used in mathematical expressions?
 
but js coerces them as 0 and 1 when used with bitwise +
 
10:18 PM
Basically
But just because it's true doesn't mean it's 1
Which is why you need the !!
 
truthy*
 
Yeah truthy
 
true will always coerce to 1, truthy however can be a number of things
 
I went with modularizing it because that's a good habit to get into
 
@mrzepka okay then I change my answer to keep it
 
10:20 PM
color.change(bool)
 
@mrzepka remake this: rlemon.ca/cavedive
the code is minified so you can't cheat :P
would be a great exercise
 
Make an html5 avalanche game
 
@rlemon I'll take a shot at it
.. eventually. I'm trying to do a codepen thing a day for a week or so until I run out of boxes and color changing things to do
 
Instant notepad, paste this to url: data:text/html,<body contenteditable>
 
and I know I wasn't going to take your code, the whole point is to learn after all
 
10:23 PM
:P
well you can't even really look at it
I run it through Closure Compiler
 
I need to dynamically generate walls that get small up until a certain threshold, I need score objects and a character object, and a score variable
shouldn't be much more than that except keep track of the score until the character x,y overlaps with a walls x,y
 
yea you're piecing it out. good stuff
 
but idk the overlaps and what else... but that's the learning part!
 
I can give you one hint. I generate one wall than mirror it with a small offset to each point
it isn't perfect, it is something you maybe can improve on even
 
it could be interesting with non-mirrored walls (although it's possible to have BS walls in some points)
or just straight walls with obstacles like "fally rock"
 
10:27 PM
I suggest you start reading @Loktar's blog
he got me started on html canvas and basically everything cool i've written is because of him :P
 
bookmarked
I've spend more time coding than playing league today
that's a big improvement
 
:P
 
I even went outside once
 
/r/outside ?
I don't go there anymore. scary stuff
 
@mrzepka yaaaay
 
10:31 PM
my god, i've had this OS going for almost a week now and I don't have VLC installed yet?
 
I recommend clementine for playing music
 
nahh dvd's
100% of the music I listen too I stream
 
@rlemon I use spotify more than anything else on my computer/phone (aside from reddit)
 
I used SO most ;)
 
Oh! that explains my productivity! Reddit has been closed all day.
 
10:35 PM
it is my homepage on phone / pc
grooveshark for music
although I'm thinking of switching to something else
 
I love spotify, and I think rdio has been doing alright but I'm too locked into spotify to switch at this point
 
I like rdio for streaming
 
I also think rdio has a better api for developing
 
I'm not sure how nice rdio is to the artists though
 
thats why i'm going away from grooveshark eventually
 
10:40 PM
@Meredith neither do I, but they had reps at a hackathon so I looked into their API. I just can't say enough about my love for spotify
idk about the artist to spotify interaction though
 
I'm just too lazy to research a good pay service basically
 
Spotify is evil to artists
To the point where a lot of artists would rather you just pirate the material
 
Oh, well fuck.
but then I have to keep the material on my hdd :|
 
I mean like do some research before you make any changes
Idk if they're still bad
 
I just like spotify too much
I'll make my own music player, with @rlemon and modularization!
 
10:48 PM
I don't think streaming compares to actually owning the music
I just stream when I'm too poor to buy an album and it's not important enough to risk going to jail for a while
 
@mrzepka
for best experience don't touch anything until the controls open themselves
 
1 step ahead I see
My friend turned 22 today and I only posted taylor swifts song 5 times
 
Youre a good friend
 
I really ought to do something more with that script
I really enjoy the effect
 
Tomorrow is the color shifting with it's complementary color on the other side of a gradient
because I just figured out the math between a color and it's complement
 
m59
11:03 PM
@rlemon YES.
 
SURE?
 
m59
doge van ftw
 
ahh
cool :P
haha. nice
rlemon, Ontario, Canada
1
I have a stalker and he/she's gone to imitating me now
 
m59
lol
 
> There will be no more kittens
 
m59
11:06 PM
I hope you don't get stalk murdered :/
 
FINE THEN
I'M LEAVING
 
@SomeKittensUx2666 :P
I had pictures of my cats previously
 
Greetings friends.
 
@monners I'm watching a comedian insult Tony Abbot
 
@rlemon what's with the scroller.html page? Is it supposed to redirect to some shitty adware page?
@SomeKittensUx2666 Splendid
 
11:10 PM
@monners We all were trying to get Zirak to click on a TVTropes page
 
^
 
Why?
 
it is a trap
he can't resist getting locked into it
it is like when you goto wikipedia and end up with 25 tabs 3 hours later
 
Guys.. anybody ever did context-menu the right way ?
 
!!google context menu
 
Ok I'm not the only one who does that
The other day I learned so much about bagels and pretzels
Because I got distracted on wikipedia
 
@monners contrary to popular belief i am asking after googling -_-
 
@AbhishekHingnikar Oh, no I didn't actually know what you were talking about. That was for me, not you :P
 
i am looking for a Native solution that works cross browser, which is pita, but i want to handle tablets too becasue this pita library works on tablets
@monners oh lol
 
Yeah, I've built those before
 
11:13 PM
@monners how do u handle tablets ?
 
Long press = right click for tablets/phones
 
Append classes on tap/click and use those to trigger the hover styles
 
I have a better idea for what I want to do tomorrow
 
@mrzepka Buy a farm?
 
@monners no... but that's on the list.
 
11:15 PM
It's on everyone's list...
 
@rlemon, @OctavianDamiean, @phenomnomnominal, @SomeGuy and countless others: There's an extended version of Community s1e16 (Communication Studies, the drunk dial episode): sockshare.ws/file/adbf3bbbdb366c80669eaa55e58b503b#
 
holy popups batman
 
11:43 PM
purecss.io is fucking stupid
seriously... .pure-menu ul{ position: absolute; } ?
wat the fucking fuck
 
I only just realized a hashtag/number sign is called a "little ladder" in hebrew
those guys should really work on their word generation
 
It's called a grid in polish
I think
 
"grid swag, yo"
 
that still sounds ok
!!s/grid/little ladder/
 
@Mosho "little ladder swag, yo" (source)
 

« first day (1377 days earlier)      last day (3576 days later) »