« first day (2046 days earlier)      last day (2905 days later) » 

6:00 PM
wtf?
 
That's over-the-top but grammatically correct.
 
@JanDvorak my high school english teacher would not have accepted such
 
You/I/it would not have.
 
Wouldn'tain'tave
 
@William for the same reason you don't do nested ternaries in programming.
 
6:01 PM
funny peoples
 
Anyways, Let's Play time
 
Let us play something else
 
@JanDvorak mathematica basically is tons of nested ternaries in my opinino
 
@JanDvorak Nested Ternaries are fun
to watch others raising hell on what you have written
 
I said, "let's play time"
as in, "fullscreen video time"
 
6:04 PM
@JanDvorak there is universe outside this chat?
...
 
@JanDvorak sorry i references no get wat it mean?
 
@SterlingArcher lol. Kicking in doors is a great way to get kicked out of pretty much anything.
 
@SterlingArcher imgur.com/gallery/LE06yZn you linked it earlier.. just watched it, omg
 
Ok, so I want to make JS that stores Testimonal data, It needs to store Name, Testimonial, date, email.
How should I start?
 
<script src="myjsfile.js"></script>
 
6:10 PM
It will need to loop through the data and put in HTML
 
@Tarson ask IT what kind of database you use
 
its PHPMyAdmin
 
@Tarson it's not
take a look at some tutorials about using Javascript with a SQL database
you may want an intermediate library like Knex to help you build the queries
 
@ssube Can't I store it an in array or should I not do that?
 
how long do you need to store the data?
 
6:13 PM
@ssube Forever
 
then you'll need to insert it into the database
so no, an array won't work
 
ok
 
hey guys, i want to check if a word is anywhere within an array, but part match (ie. my array is var clearandsunny = ["sun", "sunny", "cloudy", "rain" ];).... but my result is light rain,.... this is what i put in an if statement.... $.inArray(weatherCheck, clearandsunny.... with weatherCheck being the result of a JSON object. Am I doing it wrong?
 
Pretty sure that's ES7.
 
6:17 PM
so this won't again work in IE?
 
use babel
 
Whoops yeah sorry ES7
 
@SterlingArcher Partial match, need both String and Array includes
 
.filter
 
.some
 
6:17 PM
ok, i will have to research into Babel, :) its not something i know alot of :)
 
[1, 2, 3].some(x => x === 2)
done
 
clearandsunny.some(it => str.indexOf(it) > 0)
partial match
 
ok, awesomeness, thankyou folks
 
or filter(it ...)
 
Do research before copy/pasting people's code; This won't work in IE
 
6:19 PM
.some will work in IE9
 
From the example, it seems "light rain" should match the "rain" in the array. Like pre-defined keys.
 
oh, ok, i obviously need to find an IE working piece, i dont fancy writing all the different instances in the array lol
yea there is alot of rain instances, i just need it to find rain regardless :)
 
@KevinB Oh wow, I thought .some was ES6
 
Use the elements of arrays as regexes.
 
Ie8 though doesn't support .filter or .some, so you'd be left with a for loop
 
6:21 PM
@KirstyMarks you need a polyfill
 
im just doing some training and learning, so any pointers are great :)
 
@cswl you can't just use random strings as regexes, or string cat them into regexes
 
yea im looking at this now, someone mentioned this earlier, its not something i know alot about
 
@BenFortune i haven't actually tried it myself, basing off of MDN compatibility chart.
 
tbf it maybe just as simple as me putting all the different variants in an array XD
 
6:21 PM
if you're doing training, why are you worried about IE support?
 
@KirstyMarks there are better solutions
 
because i want to make sure i'm learning stuff that when i am up to speed i can implement into my work at work and we have to support to IE8... long story
 
MS doesn't support IE8, why should you?
 
unfortunately it's not my call :S... frustrating as it may be
and yes, it does frustrate me
 
if your company still supports IE8, quit
 
6:23 PM
LOL wtf? @SterlingArcher
 
LOL OMG
 
@ssube, i understand where you are coming from, believe me
it is frustrating, but it is something i have no control over
 
the last image cracked me the hell up
was expecting the dude to die from cancer
 
@KirstyMarks where you work is something you have control over
 
6:25 PM
not when it is a corporate company @ssube
 
I worked in the US Federal Gov and left..
it's possible to leave any job, and find something comparable/better
 
if you're working in a company ass backwards enough to support IE8, which MS hasn't been doing for years, then about all you can do is walk out
 
oh i know @loktar. Just trying to gain some agency experience
 
which you probably should do, because clearly they have no idea what they're doing
 
yeah supporting IE8 now is pretty crazy
 
6:26 PM
@KirstyMarks you won't get any useful experience at a company like that
certainly nothing you can put on a resume
 
We support IE8 as far as showing a specific error message if jQuery 2 fails to load.
 
interesting point @jandvorak
 
Okay, that wasnt the brighest idea.
 
i actually like working for said company, its just i do understand the frustrations of supporting an age old browser
 
It's a red rectangle with a thick margin and padding
 
6:28 PM
did you give it an inset bevel to match the IE8 theme
 
as long as i can cover IE10 / 11 which is quite a substantial amount of the visitors, i'm pretty sure that i will be ok
as well as Edge obviously
 
IE9/11, 10 shouldn't be used much
 
need to go now read up on this polyfill
 
IE8 users don't deserve a bevel
 
reg=new RegExp(clearandsunny.join('|'));

console.log(reg.test('light rain'));
 
6:29 PM
Fun fact: the clients actually are using IE11, it's just somebody managed to switch it to IE7 emulation mode somehow.
 
@cswl that a) doesn't handle partial matches, b) may create an invalid regex, and c) is less clear and less efficient than using a loop
 
we get that sometimes internally, I think it has to do with the fact that we have an internal DNS in addition to the external, so it sees the site as an "intranet" site and decides it should be in compat mode.
 
interesting stats @benfortune thanks for sharing... Holy fuk who's still using IE6!
 
f* 798 users
 
6:30 PM
Like I said, it isnt the brightest idea.
 
our stats are near identical tot hat
 
.... even the number of sessions...
 
The chrome one is interesting
 
maybe you work at the same place
 
6:33 PM
Oh god some high level people just joined my auth demo
That's terrifying
 
interesting that Firefox is below Safari, is that counting mobile browsing?
 
firefox is bad
 
@KirstyMarks Nope
 
not as bad as IE.......
 
recent versions of mobile should show up as Chrome and Safari
 
6:34 PM
but still, i agree bad
 
@KirstyMarks Mobile: xbenjii.co.uk/i/ebp4a
 
@BenFortune isn't that proprietary data..?
 
@SterlingArcher Auth broken in 3...
 
@BenFortune lol blackberry
 
I know if I posted our acquisition numbers I'd probably be fired if somebody found out
 
6:35 PM
@Codeman Yeah, but it gives you a rough idea
It'd obviously be way different for a tech company
 
@benfortune, interesting on the android browser stat... apparently there is a small percentage of people that use Androids own browser as opposed to Chrome... im one of those people,....
 
@Codeman what kind of shit company does that?
 
I'm saying you probably shouldn't post that data publicly
 
most shops regularly post that data
 
@ssube one who protects their company secrets?
 
6:35 PM
@Codeman browser share isn't a secret
 
traffic numbers are
 
@JanDvorak it's been running smoothly since thursday, so hopefully we're ok
 
just saying, I'd never post any kind of user data publicly without prior permission. Certainly not in a chat room.
 
and hopefully you find $5
 
imagines Sterling sitting in a corner of a small metalllic box suspended 10 meters above ground by a scaffolding, with turrets all over the roof and some even attached to the scaffolding. Sterling is biting his nails and looks visibly terrified.
 
6:38 PM
@BenFortune it's a real shame that dropping 9 is still so hard
 
We dropped 9 here, finally
 
@Abhishrek you still want me to refer you?
 
@ndugger Rejoice!
 
@ssube Blame the companies still using XP
 
6:38 PM
No no it's a simple device
 
we only have to support IE11 and up :D
 
@ndugger we won't be for a while
 
We still get some iE9 bugs that come in, but we get to say no to them now
 
dropped 8 at the end of Jan, still supporting 9 because half our clients use it
 
probably be two-three years till we can drop 9 here
 
6:39 PM
We're supporting till IE8 because it's worth the company the extra cost to do so.
 
Officially we only support IE11 and higher, but I actually only test in Firefox (unless a difference has explicitly been pointed out) and the boss only tests in Opera.
 
We also don't use jQuery.
 
that's the great thing about working on a site primarily used by engineers. I have to worry more about Opera than IE9 :D
 
what the fuck kind of engineers use Opera?
 
@ssube I used Opera until recently. It's a very good privacy focused browser
 
6:41 PM
It's like Chrome, just more hipster and without that ugly ass-profile button.
 
> privacy focused browser
lolwut
it's like Chrome, just without anything
 
Lynx is very good at privacy :-D
 
It has built-in vpn
 
I mean Opera
 
6:41 PM
gives them more time to focus on writing the IRC, email, Slack, VPN, PNV, VNC, and other clients
while pretending that a browser can magically make the internet more private
 
@Codeman would love to be referred
 
oh, I forgot SSH and FTP
 
My fitbit registered 8 minutes of activity because of a heartrate spike because high level people are in my demo LOL
 
@Abhishrek did you wanna update your resume or is the old one fine?
 
Fine for now
 
6:43 PM
ok
 
btw @ssube thanks for that, worked perfectly
 
ok, referred
 
still feel im going to get some bounceback and need to look into the polyfill also for IE8 quite possibly, but that's my next research piece
 
@SterlingArcher I read over the weekend that fitbit's heartrate monitoring is actually really inaccurate
 
@KirstyMarks Just use the polyfill from whatever polyfill library you normally use (moderizr or whatever)
 
6:49 PM
new whatif \o/
 
7:06 PM
-2
Q: If statement use. Code style. Logical error?

hedgehogToday I was going over some Javascript code with a colleague of mine and we bumped into an if statement for which format we were arguing for hours :) I will present his side and my side so you can please tell us which one is correct and why? Think of the next if statement as if it were in a fun...

cv-pls
 
... || !var || .. huh?
 
@KarelG quasi-code
 
They loved the demo!!!
 
dont mind on how the vars are set, it was just sth fast written as an example to get the point of it...
 
@KarelG the worst part is using a keyword in there
 
7:20 PM
@ssube what do you mean cv-pls?
 
Close vote please.
 
The way i see it, i'd much rather see if (!foo) return than if (foo) { dostuff } // end of function simply because it removes a line of indention, and if your'e trying to follow along with the code, you know that at the return you can stop reading further on.
 
@hedgehog it's calling attention to a question that needs closed
 
oh ok, thanks....
if anyone has a good opinion about what i posted it would be appreciated, tnx
refactored it for those who wanted to puke when they saw it :p :D
 
I prefer the original form of the code
 
7:24 PM
your question, so far as I can tell, boils down to early-exit
I never use early exit, because I think it's a design smell
2
 
@KevinB seriously now? :p
 
if you have to bail out of a function halfway through, you have two functions in the same body
 
@ssube i knowwww, thats what i said..... there is no reason to have an exit bail if you can manage to do in another way, which is more correct and efficient...
 
there are cases where you have to do if (a) { b(); c(); d(); } else { e(); }, but that's two distinct branches
 
true...
 
7:26 PM
if you have a decently long function with only one or two spots that diverge, though, you probably have some logical break points and can split the function
 
its also bad for future further development of the function, the code that you would add below the if would be almost half dead.....
 
which is good for testing and documentation and extending it later
 
the specific function was about 20 lines only
 
that doesn't sound like it's worth fighting over
but keeping track of your cyclomatic complexity is probably not a bad idea
 
well, it is for future reference...
 
7:28 PM
These KSP mods are getting crazy cc @KendallFrey @rlemon
 
because we work on same projects, and if i see him wrighting code like that, i will have to refactor it..... in my opinion working like that is kind of bullshit....
 
what do you mean?
 
I was watching a twitch last night on KSP and they had some mod that tweaked the tree to start more in the flight side of things before getting into rockets, but wasn't able to figure out which mod it was
 
in my own code, I typically try to keep CC under 5, with a hard limit between 8 and 10
 
7:31 PM
excuse me but what is CC for you?
 
but metric for what?
doesnt makes sense to me..
 
complexity
 
my nexus 5x is dead :(
 
ohhhh code complexity...and what are the values of it, how can you judge what CC is each code?
 
7:32 PM
@hedgehog there are tools
 
R.I.P.
 
CC is the number of paths through a function, roughly
fewer is better
 
is there any known for netbeans?
 
lol
what build tools do you use?
 
it got stuck in a boot loop and would have me hold the power button for 30seconds-2minutes to turn on never would get past the google screen and revoery wiping didnt work
 
7:33 PM
i am only allowed to use 6.5.1 netbeans...
i know, dont say it...
 
@hedgehog but what are you using to build your code?
or are you hand-editing the actual files that end up in prod?
 
what do you mean what am i using? hardcore programming, all from scratch
 
assembly?
or straight binary?
 
js
 
@hedgehog do you use gulp, webpack, anything like that?
 
7:35 PM
nope
 
how do you minify and bundle your code?
what is your workflow?
 
He's hardcore; he doesn't need bundling or minification
 
wow too many questions..... i dont use any of these...
 
time to start
 
IremovedthespacebarandenterkeyfrommykeyboardsoIcanselfminifyandbundle
 
7:36 PM
@hedgehog then you're pretty boned :D
 
worksoutgreatforme
 
should i say tnx, or cry? dunno
 
if you were running even a simple script to go over your code, you could just attach one of the JS analyst tools and get complexity stats
I would highly suggest setting something up with gulp to run lint, analysis, maybe tests...
 
thats how i was taught man...
 
it's pretty easy to get one or two static analysis tools up and running
@hedgehog you were taught not to use CI or builds of any kind? Not even make?
 
7:38 PM
everything is being done over 4 local servers running on unix
so you understand what i can use is limited
solarix*
 
@JanDvorak fun fact: the demo hiccuped at the very end
 
What does that have to do with anything?
 
gulp is JS' equivalent to make and runs similar tools
 
solaris*
 
@hedgehog there might be a version of node for that?
 
7:38 PM
Not because the program messed up though, because I didn't plug the laptop charger in, and the computer went to sleep -_-
Rookie mistake
Thankfully nobody caught it
 
I haven't met anybody using solaris in a long time though
 
the only analytic tool i can use, is whatever firefox has :(
here you go then :D time refreshed :P
 
firefox sucks for debugging
 
i know :( but cant do otherwise.... cant plug in whatever i want on the servers man...
 
@hedgehog they used to build NodeJS binaries for Solaris
 
7:39 PM
@jgr208 no.
 
using that one already...
 
but you should be running your build script on your dev machine before you push to the servers
what do you run there?
 
@JanDvorak ok let me rphrase it sucks for debugging websocket messages sicne it neevr seems to at least show me what messages were sent
 
thats what i do already as you said.... what do you mean what i run?
 
fiddler?
 
7:41 PM
@JanDvorak pain to set up when chrome can do that right out of the box
 
@hedgehog on your development machine, where you write the code. What OS and tools do you use?
 
install -> run -> dismiss a warning
You're ready
 
your servers may be solaris, which isn't great, but you shouldn't be running your tests on the server anyway
do that before you push the code out on your local machine
 
@JanDvorak not with secure websockets
 
no version control.. code review, CI and all that stuff..
 
7:42 PM
@ssube i told ya, netbeans 6.5.1 and firefox, its test servers, no worries.... just doing the updates there, software isnt for us :)
 
@hedgehog so you have no SDLC?
 
nope
dunno what that even means :p
 
well, I doubt there's anything you can do, then
 
i can
 
if you're developing on the servers, having early returns is the least of your problems
 
7:43 PM
editor plugins maybe?
 
do my cross :p
 
imgur.com/gallery/nNgQv lmao the god damn comments
 
im developing on test servers man
@KevinB editor plugins as?
 
@hedgehog then there's not much you can do
 
@SterlingArcher oh dang
 
7:44 PM
if you were developing locally and using version control, you might have a chance
 
@ssube i told you there is, my cross :p
 
what?
 
Jesus?
 
bro, i am developing locally.... i told you before, we have 4 test servers on which we run our updates..... thats were i upload and test before releasing the update to the clients...
 
Jesus is my version control. The servers crash and three days later they rise again.
 
7:46 PM
@Loktar yes my child? :p hahhahahaha
 
@ssube LOL
> well guys it's down see you on Sunday I guess
 
@hedgehog and locally, can you run nodejs?
 
^
Yeah being local isn't a big deal
 
@ssube ofcourse, but cant go in forther details of what we do, companys policy, sorry
 
if you can run node on your dev machine, you can run gulp, which means you can run a complexity tool
so set that up and make your life easier
 
7:47 PM
could you enlighten me what gulp is actually?
 
gulp can kick off tests, lint, all the basic "have you done something dumb by accident?" checks
 
is it integrated in solaris 11?
 
@hedgehog fairly generic task runner, kicks off other tools, without needing intermediate files
 
@ssube 3 days? What sort of shit sysadmin is Jesus
 
haha @hedgehog comments are priceless
 
7:48 PM
@hedgehog no. Why does Solaris matter on your local machine?
are you running solaris on your laptop?
@SterlingArcher I mean, they didn't have Puppet or Ansible or OpenStack or like anything back then.
When Jesus ran on the cloud, he was literally putting leather to water vapor.
 
i am running solaris on the servers :(
 
@hedgehog The servers don't matter. Gulp runs on your laptop before you push.
 
Jesus needs to run more daily backups
 
@ssube never said i use a laptop bro.... solaris unix on servers, unix on my machine/server....
 
@hedgehog what kind of unix?
 
7:50 PM
i am not using a pc, i am connecting to the servers through local connections
@ss
@ssube oh boy, you got me here...... mind stucked...
 
cutting to the real question: can you or can you not run nodejs on your development machine?
if so: set up gulp to run any lint/analysis tools you'd like to use
if not: you're boned
 
can i please be both? :D
 
an UNIX distro as client PC ?
 
if you are not using a pc, are you on punch cards then?
 
never tried that
 
7:52 PM
@KarelG wouldnt say that exactly...
 
@hedgehog can you answer the question?
 
you said the following
> unix on my machine/server
maybe you don't know which OS you're using ^^
 
@ssube i am pretty sure i can.....
 
@hedgehog ok, I would try running something like npmjs.com/package/gulp-complexity
 
@KarelG i cant remember the word now man, im tired... i am using an oracle solaris thing, which is connected to the servers, and which lets me connect directly to them....
 
7:55 PM
i am pretty sure that was an answer to the "can you answer the question?"
 
@ssube will try that tomorrow, and let you know if i find you here...
@ssube thanks a lot btw
@KarelG just remembered, its a Virtual Desktop Infrastructure, by oracle
 
@hedgehog so you're just using VDI to work on the server?
 
@ssube yeah ..... pfff got the name :(.... im so tired
and then from that server, i can connect to the others
through terminal
 

« first day (2046 days earlier)      last day (2905 days later) »