« first day (2056 days earlier)      last day (2890 days later) » 

12:03 AM
Hey everyone, do you guys suggest any good books/resources for Javascript syntax/basics for an experienced programmer?
all the books out there are starting from like hello world
 
shit
there's no JS framework that is SEO ready
Angualr React Polymer
all of them suck shit in SEO
 
there are libraries that provide the pages to spiders, constructed. in angular, for example
 
prerender.io?
I'm not even sure Prerender supports polymer yet
Polymer is a great fucking idea if you think about testability
if you use like 50 polymer components in your site
you just have to do some regression testing on that 50 polymer components
and that's it
but SEO
 
anything with server-side can do great SEO
so A2 and React are fine
 
almost 80% of websites are using Wordpress and it's not straightforward to have server-side A2 or React rendering capability
and PHP doesn't even have libraries to prerender A2 yet
 
12:15 AM
phpoop
 
why would you even try it with PHP
 
PHP is great, PHP started idea of production flow
Enter some code -> commit -> hit F5 in your browser to see your change
 
php is terrible
 
you can't get more produtive and efficient than that. PHP started this
 
12:16 AM
If you disagree, feel free to go talk about it in the php room
 
I'm Node guy
but I respect php
and love JS
 
Yes, and the Model T started mass-produced automobiles, but you don't go around telling people to drive one.
 
php is full of security flaws, inconsistencies in both naming and behaviour, and terribly messy.
This is no mystery
 
PHP enabled 10,000 developers in same project to have ability to develop using
enter code -> commit -> hit F5 to see change
thanks you PHP
 
php code is fragile, it can do very surprising things if the types are wrong or missing in variables
 
12:19 AM
You clearly have no idea what you're talking about
 
and, you can test the hell out of php and pass it all, then call it one more time and fails
 
Just because php isn't compiled you think it's innovative, lol
 
s/in//
 
@EnglishMaster I dare say CGI script accomplished that before PHP.
@doug65536 That's a bold claim to made in the javascript room, which go further than PHP and allow you to modify or swap class on the fly.
 
12:37 AM
but js throws in cases where php does weird things
but neither is a saint in that regard
if you really strictly configure php, it can be usable for serious use. default is horribly permissive and lets sloppiness "work"
 
Most languages don't have configuration that is required to make it work with sloppy (old) code so it's hard to say it's a positive feature...
And JS has weirder type casting, if you ask me. :/
 
I really dislike the start/run/exit model, from CGI. you have to redundantly repeat everything for every request, blocking, synchronous, bad
node lets you carry state across requests and share it, and 1 process can handle as much as it can handle, not some arbitrary number of entire forked processes redundantly repeating things to handle one request
 
@doug65536 Well, nobody loved CGI. It was Basic for Web :)
 
please deposit 1 cent in my bank account for every string concatenation ever done by the php engine
 
If you think about how Java enterprise used to work
you had to write some code -> commit -> let it build for 1 hour -> go for a coffee -> come back -> see something failed -> fix that issue -> goto lunch -> come back -> go to team meeting -> team meeting ends -> time to go home -> Lumbergh come to your desk, "Could you finish implementing this feature before you go home? That'd be great" -> you stay at work until 12pm
vs PHP, so rapid
 
12:50 AM
oi
 
Is mantaining a weakmap to add extra properties to socket.io::Manager socket
a bad idea?
 
@Sheepy Man the 90's web was full of CGI scripts
 
in 90's you could get a job if you know HTML tables
and if you know how to style that table, you are already executive engineer
 
you weren't supposed to worry what it actually looked like back then, you were supposed to let the browser pick fonts, etc. today everyone fights the browser to force it to do exactly what they want, and they expect near pixel perfect identical appearance across browsers
if you wanted to fight it back then, the browsers had disgusting differences
 
I don't...
Just make sure it breaks on IE and you're fine
(rule of thumb: if it breaks IE, it works on all other browsers).
 
1:00 AM
If you worked with PHP in 90s, you would've
write code -> commit -> hit F5 to see change
 
lol
Is it a bad idea to only use gets and use definitions, instead of sets for js maps?
for example,
players.get(socket.id).name = 'Unnamed grappler';
assuming that players.get(socket.id) is an object.
 
@phenomnomnominal of course I wouldn't tell people to use Model T brand but I would tell people to follow their idea
jQuery is awesome because it created coding standard for JS dom selector
so easy
$("your stuff")
no more document.getElementById
and shit
 
1:19 AM
Um.. 'document.querySelectorAll'
I just saved you an entire library
 
Hey guys, so I'm trying to build a website from scratch using pure javascript and html, no frameworks or anything of that sore.
sort**
wait.
there's no one here that I know :(
I'll come back later XD
 
@SterlingArcher I'm sure more specific functions like getElementById is much more faster than generic functions like querySelectorAll
and you do not get syntactic sugar
I love sugar btw
so good
 
Syntactic sugar is not worth an entire library of functions you don't use
 
well, coding nowadays is all about adding another layer of abstraction anyways right?
if you look at spring framework, it used to have
model view controller (repository layer) too
but since spring 4 now it's pretty much mandatory to have service layer too
and I still don't fully get why you need services layer
 
Hi @qaispak!!!
@qaispak good idea XD
@qaispak I agree a lot
@SterlingArcher Lol I find that so funny
 
1:36 AM
It's pretty funny how nowadays we use all these tools to make our lives easier by automating and simplifying things
but if you add up all those things to similify and automate, it's actually even more complicated than before
 
it is ... :)
 
I've once tried to read Hibernate source code
I do not get a single shit about how it works
 
lol
because its java
 
that too
but it's massively complicated
I was forced to learn and use this ORM shit just because of
Job/scalability/simplicity (?) / wtf?
 
    super(opts);
    this.opts = Object.freeze(Object.assign({}, StreamIO.defaults, opts));
what do I do if I need that this.opts in super?
super({...defaults, ...opts}); ?
 
1:56 AM
How software becomes complex in start up
Boss: Yay! first stand up! Let's speak about cool techs we can integrate into our system!
Dude 1: Definitely strong ORM library for scalability mate, it's all about scalability
Boss: Sure thing! let's do that!
Dude 2: What about micro services man! use Sinatra and host this micro servies everywhere!
Dude 3: we must have our code work when we push commit, we need a system for that brah
 
@taco Sorry, I mean to say it does lack features modern web languages have. I did mention CGI to say it came before PHP as a dynamic web language.
@EnglishMaster getElement(s)ByFooBar is a bit faster than querySelector(All), true. But querySelector(All) is an order of magnitude faster than jQuery, too, with all the power and covenience of CSS selector.
 
Boss: Idiots! first stand up! Let's get this straight and find out why we have 47 different libraries incorporated into our system!!!
Dude 1: I added SDL because its cool.
Boss: You're fired!
Dude 2: I added twillo in case we ever need to text.
Boss: Why would we ever need to text??? You're fired!
Dude 3: Well, I added Selenium because the google API is unreliable, so I wrote a small script to crawl google...
Trump: good job. I like that attitude. And you know what? I think this is the greatest thing a worker has done for my company. Its the greatest thing.
Like, a ton of mexicans are crossing the border. They use Java, they use Perl, they use Ruby.
And some, I assume, use JS and C/C++.
XD
 
nice
BTW Bosses want you to do just 1 thing all the time
so they can always replace you
easily
 
yeah.. problem with large companies
smaller companies every individual is more important
 
2:10 AM
but smaller companies tend to put bigger burden on you
e.g. work until 12 pm
 
How small companies become random
Guy 1: Ruby FTW!
Guy 2: NodeJS FTW!
Boss : Python or GTFO! (Randomize votes and repeat for every project)
 
Senior Developer: we need to find balance
let's use all
 
I made an inventory page and i made a pop-up window that is going to be triggered by pressing a button and it is going to ask for username and password to access that page, how do i make it so that page can only be accessed with username and password, not just by typing the directory and page name in the url?
 
@NathanMarotta Load the page but don't load the data. Popup first. Use ajax to login and, if successful, use ajax to load data.
Alternatively, make a copy of the page, one for login (without data) and one after login (without popup), then it's normal redirect.
 
65% true
World's solution to div hell = JS frameworks
 
2:25 AM
@EnglishMaster Every programming methodology can be overused. I have read a book that mentioned a program with two java files, each has one method. 20k lines method.
Design pattern can be abused. Abstraction layers can be abused. Language features can be abused. Doesn't necessary mean they are bad or embarrassing.
 
@Sheepy new to web dev, are there any examples you could reference me to?
 
@NathanMarotta How far is your progress? Can you do login and access control without the popup?
Which backend language are you using? JS?
 
JS, yes
this is just for learning purposes
 
@EnglishMaster worlds solution to JS frameworks, WebASM
 
@NathanMarotta Can you do login and access control without the popup? i.e. in two separate page?
 
2:34 AM
No...
If you mean like a user entering credentials and if there correct being directed to the correct page if not no content shown, right?
 
Yes! That's what I mean.
 
than no lol
How do I start out learning though? are there frame works for that?
 
That's where your should start then. You can think about popup after you learned that. Unfortunately I didn't learn JS as my first backend language - I just pick it up here, so you need to ask others for beginner tutorials / introductions.
Yes there are frameworks / libraries for authentications. Quite a number, in fact. But it may help if you start by rolling your own code first, to know how it works.
 
is the access control written in js?
What would you recommend to start learning
 
Since all frontend data comes from backend code, backend code is the natural place to control access. If it is written in JS, then JS it is :)
 
2:40 AM
@SomeGuy @AwalGarg @littlepootis saw news about Bihar Toppers? [tag:epic!] (Political science "khana banane ke kaam me istimaal hota hai")
 
you must do access control in the backend because the user has complete control over the browser
 
Junior in Highschool sheepy, just trying to learn as much as I can so I am prepared
 
@qaispak u back yet?
 
they can set a breakpoint, set variables, etc
replace whole functions
 
what would you recommend to start learning first @doug65536
 
2:44 AM
for backend dev? a solid understanding of authentication, https, CORS, multipart, cookies, caching
 
@doug65536 and not database?
 
yes database, but you need a way to handle requests properly etc first
 
whats the difference between OOP and OOPP ?
!!wiki OOPP
 
@thepiercingarrow That didn't make much sense. Use the !!/help command to learn more.
In computing, a plug-in (or plugin, add-in, addin, add-on, addon, or extension) is a software component that adds a specific feature to an existing computer program. When a program supports plug-ins, it enables customization. The common examples are the plug-ins used in web browsers to add new features such as search-engines, virus scanners, or the ability to use a new file type such as a new video format. Well-known browser plug-ins include the Adobe Flash Player, the QuickTime Player, and the Java plug-in, which can launch a user-activated Java applet on a web page to its execution on a local...
 
??
!!wiki object orientated perfunctory programming
 
2:45 AM
@thepiercingarrow The Wikipedia contains no knowledge of such a thing
 
@Abhishrek I think you can learn doug's list without learning database, to be honest. I am still seeing hard-coded logins these days.
 
OOP, Oop, or oop may refer to: == Science and technology == Object-oriented positioning, another name for feature-oriented positioning in microscopy Object-oriented programming, a computer programming paradigm Order of operations, in mathematics, rules for which parts of an expression are evaluated first Out of position (crash testing) == Others == Order Of Play, schedule of contests in a tennis event Out-of-pocket expenses, in health care, are expenses that the insured party must pay directly to the health care provider Out of position, in poker a disadvantageous poker position in the order of...
 
@Sheepy I am adding how to handle db sanely to dougs list.
at the very end maybe?
 
a backend is usually some kind of data store, so yes database, but they asked for beginner level
 
!!wiki CMS
 
CMS may refer to: == Organizations == === Education === ==== USA ==== Calexico Mission School, a private school in Calexico, California, USA Cardigan Mountain School, a junior boarding school in Caanan, New Hampshire, USA Caruso Middle School, a public school in Deerfield, Illinois, USA Centennial Middle School, a public school in Snohomish, Washington, USA Charlotte-Mecklenburg Schools, local school district in North Carolina, USA Chicago Medical School, in North Chicago, Illinois Chickahominy Middle School, a public school in Mechanicsville, Virginia, USA Clarksville Middle School, ...
 
!!wiki POOP
 
Poop or pooped may refer to: Feces, waste product from an animal's digestive tract expelled through the anus Defecation, the act or process by which organisms eliminate feces Pooper-scooper, used by owners of pets to pick up the fecal matter of their pets Stern, the rear or aft part of a ship or boat Poop deck, a deck that constitutes the roof of a cabin built in the aft (rear) part of the superstructure of a ship "To be pooped", nautical parlance meaning to have a wave come over the stern from abaft Poop (constellation) or Puppis, a constellation in the southern sky "Poop", an episode of the...
 
??? idiot
 
2:48 AM
@NathanMarotta Form input and cookie / session. Write a login form, get it on server side, remember the login in cookie or session, then check it for access in the other page.
IMHO, you can worry about people stealing cookie or password or sql injection or worse (that long list) after you've actually got a password for them to steal :/
 
@NathanMarotta Sorry. I am already spending too much time here... busy day.
 
Well, I can show you what I have so far
@Sheepy would you recommend to start with rest?
ReST
 
@NathanMarotta learn about REST, CRUD too
 
I'd say start with form and manual input check first. But if you want to step right into REST, I'm not stopping you. You need to learn that sooner or later. But then, as are ajax, https, database, password salt, and many other big and small things...
 
2:58 AM
rest roughly means, represent your api as resources with hierarchy designated by paths to collections of things
CRUD approx equal POST/GET/PATCH/DELETE
no RPC
create user -> POST /api/users, creates user id 42, response is redirect to /api/users/42. js code sees response of data that actually inserted
users have "groups" list, say you want to add a group to their group list, POST /api/users/42/groups
etc
get the list of groups for user 42 -> GET /api/users/42/groups
that is basically REST
 
is user access a complicated process?
 
It can be very simple or very complicated.
 
Do you want to write me a script lol
 
@NathanMarotta try google Node.js login form example
Or login rest example, if you want :)
 
will do bud
thank you :p
 
3:07 AM
there are generators that setup a project, they will usually provide some authentication already
they are fun to just jump into playing around with things
 
It depends if you want to learn how to create these things or just use them
But its also good to see how other people have solved these problems before
 
3:37 AM
Shouldn't the node.js assert.equal do Buffer.compare for node.js style buffers?
 
@Sheepy are you on?
 
can new be the name of a property of an object?
 
!!> ({new:'yes'})
 
@Sheepy {"new":"yes"}
 
3:45 AM
@Sheepy I got the session started, now how do I make sure only a person with a session active can use a certain page?
so if the user types it in the url they will not be given that same page as someone that is logged in
session is started with php
 
@NathanMarotta You check the session as the first thing you do in the page. If the session does not exist or is invalid, redirect to login page and stop processing.
 
so the place where all the data for a logged in person is not a separate .html or .php page?
 
@thepiercingarrow why not?
 
@NathanMarotta PHP? I thought you are running node JS?
 
The pop-up window was loaded using js
use php for server side and sessions? no?
 
3:59 AM
@Abhishrek isn't new a keyword?
 
yes
 
can I do this?
var input = {
    old: {},
    new: {
        mouseX: 0,
        mouseY: 0,
        mouseDown: false,
        grapple: false,
        shield: false
    }
};
github is highlighting the word new, but I didn't get any errors during run time...
 
@NathanMarotta I thought I asked earlier whether you are using JavaScript for backend. Just some miscommunication. Yes you can start with putting all data on a separate page - that is access controlled.
Once you've done that I can give you the board steps to convert it to a one screen popup.
 
join separate chat, I can explain better @Sheepy
than in here
 
@thepiercingarrow depends on your current runtime environment
if anything is dependent on let's say typescript or ES6, then definitely throws an error
 
4:13 AM
@Mathematics I expanded this one to have names for all of the anonymous functions, which might help with understanding their purpose. I also expanded the test. It processes 256 rows in 50ms on my machine
around 195μs/row
naming anonymous functions also helps when you look at a timeline or profile
 
@thepiercingarrow that should be ok; when you use object expressions or dot notation, the keywords will be treated as identifiers for property keys
 
@doug65536 Looks likes he's stuck on something else too stackoverflow.com/questions/37571034/…
 
That can't be new, it does that already line 130, unless I totally misunderstand
 
4:40 AM
Is it difficult to have Selenium cross browser visual regression test set up?
 
Oh yeah deepest goes to last column .. I wonder how it looks on a big nested data..
 
@Mathematics I fixed a bug where the head row was not in <tr>, expanded to full thead/tbody structure
I don't think it is possible to mess it up anymore, it should handle absolutely arbitrary input, as long as it is an object or array at the top, like json
 
Our IT dept got a new intern, after the last one left. Now it's IP and DNS all over again...
 
hey morning guys.
little out of topic, but was wondering if anyone knew how to stop sublime repl from show logs in verbose.
pls see my lilnk for screenshot

ctrlv.in/764656
appreciate help. thanks
 
@EnglishMaster visual regression? you mean to track pixels?
 
4:54 AM
I'm guessing the example answers the question
 
yeah
exactly
but I already have casper.js set up going on in my pipeline
but it's not visual regression testing
 
the driver.findElement(By.name('q')).sendKeys('webdriver'); thing looks good
not a bad way to feed input
 
what I want to do is
make a tool to take screenshots on various environments in given resolutions
mobile tablet desktop
on chrome, ios, android, firefox, IE, Edge and so on
compare them
 
@EnglishMaster uhh what is that? are you trying to test rendering output?
 
see where's different
 
4:58 AM
pfff, from what's there readily available, you can probably instrument taking screenshots... but you'll have to find something else to do a visual diff
 
or get sum of squared differences, or something
 
@FilipDupanović well it's called visual regression testing
 
"differences" is a big question in a giant 2d array vs another giant 2d array where things move in 2 dimensions
how will you eliminate font rendering variations?
you'll have to do what most do: save known-good images and compare-to-known-good
 
well, that's why you run the test
 
auto-magical comparison across browser is not reasonable, because of font anti-aliasing
I guarantee they are all different
 
5:01 AM
of course
but it eliminates 90% of effort
that you need to put into testing
10% of effort, you need manual human testing
 
if you could get an approximate number of difference, like sum of squared differences, you could figure out a failure threshold
 
that could help with the fonts
 
well tools do that already
they differentiate between major differences and minor differences
 
I am not saying don't test. I love tests
 
you told me don't test
 
5:04 AM
where?
 
blasphemy!
 
magical is not reasonable. approximate change detection is. that is what I wanted to convey
i.e. if a bug slips through, well, you tried
 
what?
 
comparing images will be approximate, so it might pass a bug
 
no
You know nothing Doug
 
5:17 AM
@doug65536 have you used github.com/Reactive-Extensions/RxJS by any chance?
 
no
 
5:37 AM
github.com/darkyen/dhaara Any other tests you guys have in mind for this?
 
5:53 AM
@Abhishrek maybe swap L153 and L154 because of L164? github.com/darkyen/dhaara/blob/master/src/index.js#L153
 
@FilipDupanović (:
@FilipDupanović good catch!
I still need to find a way of gracefully destroying half-open streams
 
Hey guys Greetings of the day. I have a problem.
I have a modal which is hidden(`<div class="modal-body"></div>`). Now i want to check if it has some children in it show directly else make an ajax request.
I tried http://stackoverflow.com/questions/3893440/if-div-has-content-show-div
And http://stackoverflow.com/questions/6813227/how-do-i-check-if-an-html-element-is-empty-using-jquery
None of the solutions seems to working for me..
Something like if(($('#pool .modal-body').html().trim() == '')
 
and start throwing errors if data is read from _readable / _writable
pushed \o/
 
\o/, praise the NPM overlords
 
well my dns is stuck on resolving github :P
so the npm version iss more up to date than github
For some weird reason, I cannot connect to github during the day but it works fine during the night!
 
6:03 AM
dial "8.8.8.8" or "8.8.4.4" :P
 
user3119231
good morning!
 
morning o/
 
@FilipDupanović It is set to 8.8.8.8 and 8.8.4.4
which is why this charade is more weird
 
huh... well I curl a script several times a day from raw, also have Google's public DNS configured... sometimes it takes like 7 seconds to begin transfer
 
Its just weird, anyway its time for me to sleep :P i will wake up when git is working
:D
 
6:09 AM
nn o/
 
@Abhishrek Nope. /me Googles
Oh, hahaha
 
6:22 AM
@towc that did it?
Nice!
@AwalGarg LOL what is the view count now?
 
@littlepootis Of what?
 
@SomeGuy that
 
Oh, oh, that thing. Gotcha
 
user3119231
 
hi all
 
6:29 AM
morning
 
Mrng all
 
@imVJ Welcome to the JavaScript chat! Please review the room 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.
 
I need some feedback on my project log4sure.com - logging service for js developers.
 
@Bhavin you should stop spamming
 
6:33 AM
its not spamming, i am looking for some feedback, if ur not interested, dont do it.
 
6:48 AM
@AwalGarg @littlepootis bottomupcs.com
2
 
@Bhavin That carousel is switching too quickly
 
@SomeGuy Amazing!
 
user3119231
@Bhavin Don't do this "client information" stuff. I hate this.
 
Right? Such an exciting find!
 
MMMMMor-----ning
@doug65536 thanks for adding comments :)
 
6:56 AM
@Bhavin If you want people to use your service, make it appealing. The website just isn't nice, neither is the management console. If you just want people to use your library (and let them roll their own console), a GitHub page is sufficient and more trustworthy
 

« first day (2056 days earlier)      last day (2890 days later) »