Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

04-24-2017 , 05:40 PM
You could also have them create a grid of divs which can be re-ordered by dragging them around (like most image display libraries do). This combines JS and CSS knowledge.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 05:58 PM
This seems like a terrible interview question unless like this is the job but if you asked me I would blink and "uh unless I couldn't I would use jquery ui".
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 05:58 PM
Quote:
Originally Posted by blacklab
this is the correct answer, you did exactly what one of my coders did, used dragula. We actually use dragula in our product.
It seems not very surprising that the guys who work for you were able to do a task that is much more relevant to their day to day work pretty quickly.

That's not to say that someone who's a professional front end developer shouldn't be able to do this, but it's not surprising that if they've never done drag and drop before that it would take them longer starting from scratch than your own developers who already use dragula.

Quote:
Originally Posted by blacklab
Yeah, that may have been the case on the first. After watching the first guy struggle we told the second he has 30 minutes to which he replied "that's impossible"
Maybe rather than "you can use whatever libraries you like", tell them "we do not want you to try to implement your own solution, go find a library to use"?

Interviews can sometimes be a mess of tricky questions where you ask something open ended with ulterior motivations (i.e. in this example, you actually very much want them to google "html drag and drop" or whatever and use the first google result to solve this problem), but they might miscalculate your secret motivations (i.e. maybe they think you want them to dazzle you with their JS/CSS prowess and write a genius solution on the spot) and flub the question because they're trying to answer a question that you're not really asking, even though you plausibly could be.

Obviously that's an FPS-y way of looking at it, but it's because of FPS-y questions in interviews that companies actually pose that people start thinking that way when being interviewed.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 06:02 PM
Quote:
Originally Posted by Grue
This seems like a terrible interview question unless like this is the job but if you asked me I would blink and "uh unless I couldn't I would use jquery ui".
i actually think it's pretty good. the reaction you're talking about is what they're looking for, and it's decent information. a lot of front-end dev work is just finding the right libraries and wiring them together. this is essentially fizzbuzz for that skill.

i think goofy's suggestions for clarifying are good too.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 06:07 PM
Quote:
Originally Posted by Grue
This seems like a terrible interview question unless like this is the job but if you asked me I would blink and "uh unless I couldn't I would use jquery ui".
The idea behind it is to see how you think and see how long it takes you to figure something out that should be pretty easy. A while back I hired a guy who had a great resume and could answer pretty much anything about html/css/js off the top of his head. The problem was it took him hours to do something that should take a few minutes. This test was made to weed people like him out so we don't hire them.

Quote:
Originally Posted by goofyballer
It seems not very surprising that the guys who work for you were able to do a task that is much more relevant to their day to day work pretty quickly.

That's not to say that someone who's a professional front end developer shouldn't be able to do this, but it's not surprising that if they've never done drag and drop before that it would take them longer starting from scratch than your own developers who already use dragula.
I was referring to the interview we did before we hired him. He had not used dragula before.


Quote:
Maybe rather than "you can use whatever libraries you like", tell them "we do not want you to try to implement your own solution, go find a library to use"?

Interviews can sometimes be a mess of tricky questions where you ask something open ended with ulterior motivations (i.e. in this example, you actually very much want them to google "html drag and drop" or whatever and use the first google result to solve this problem), but they might miscalculate your secret motivations (i.e. maybe they think you want them to dazzle you with their JS/CSS prowess and write a genius solution on the spot) and flub the question because they're trying to answer a question that you're not really asking, even though you plausibly could be.

Obviously that's an FPS-y way of looking at it, but it's because of FPS-y questions in interviews that companies actually pose that people start thinking that way when being interviewed.
thanks, this is the kind of feedback I was hoping to get here.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 06:11 PM
One other question I have was, did the candidate have their choice of computing environment (os/browser/editor/ide/etc) or did you otherwise make sure they were comfortable with what you provided them with? Last time around, I don't think I ever did quite this badly in any in-person interview but the two where I think I gave the worst impressions both involved me having to use a computer.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 06:24 PM
I added drag and drop to my first JS application with no JS experience except for having skimmed Eloquent Javascript. It took me maybe 30 minutes. I don't remember the details but I think I used a native property of HTML5. This was within React.

I couldn't reproduce it without google but I damn sure could do it in, say, 15 minute max with google.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 06:39 PM
Quote:
Originally Posted by Gullanian
I would say optimising on table width is premature optimisation. Not heard of table width being a factor before but looked it up and apparently it is.
This isn't what I was suggesting at all. I simply said that aiming to 4NF tends to faster tables due to much fewer nulls and narrower tables. I was responding to the 99% nullspace and added the narrow tables as a bonus, not a goal. The fact is that so much null is going to do damage to the database memory and speed.

irt to premature optimization: he is talking about 400M row tables, which is pretty large and would requires some tricks to get down to 500ms.

Quote:
Overnormalisation is a thing, even though I suppose you could normalise things like title and description I would never do it unless qualities of the data make it appropriate (bulk of titles/descriptions are repeating). It overly complicates something that should be simple - if you want to update the description now you have a much longer process.
I suppose it depends on the RDMS you are using, but any system with a returning value makes this process fairly simple.

Depending on who's opinion matters to you, 4NF should always be the goal. Anything less generally results in unwanted anomalies.

Quote:
I don't think that's anti conventional wisdom at all, normalisation will of course help with query performance. Denormalisation is always used to increase performance.
Speed is not a consideration of normalization. It happens that proper text-book normalization will often result in faster database queries vs a poorly designed database. The strategy I propose is normalize then denormalize the hot-spots. There really won't be many.

To be sure we aren't talking past each other, normalization only refers to a single relation, not the entire database.

I'm not sure why you wouldn't do this in your example:

Code:
users
--------
user_id
... etc ...


emails
----------
email_id (pk)
from_user_id (fk to users)
to_user_id (fk to users)
subject
body_text
... etc ....
It's normalized, requires no complicated joins, and would be incredibly fast.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 06:43 PM
Quote:
Originally Posted by suzzer99
You could also have them create a grid of divs which can be re-ordered by dragging them around (like most image display libraries do). This combines JS and CSS knowledge.
There's a really cool library called Sortable.js. It also works on mobile phones.

Tangentially, I found that no end-user gives a **** about drag-and-drop sorting. I was truly proud of that feature when I added it. Two months later, I'm still not sure if I should keep it in or remove it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 06:51 PM
Quote:
Originally Posted by Noodle Wazlib
Allow an ad to be displayed, but prevent the ad itself from running any javascript that could potentially be malicious.

Probably not any way to do this without routing all the ad traffic through your own servers, I would guess.
The work-around is affiliate links and direct ad sales. You can host your own images and link to your affiliate partner. This requires no javascript and ********** don't block the images or the anchor tags.

Part of the deal of ad networks is user tracking. The deal is:

1- You host an ad.
2- You give maximum data to the network.
3- You get paid for that data.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 06:55 PM
Quote:
Originally Posted by daveT
There's a really cool library called Sortable.js. It also works on mobile phones.

Tangentially, I found that no end-user gives a **** about drag-and-drop sorting. I was truly proud of that feature when I added it. Two months later, I'm still not sure if I should keep it in or remove it.
I implemented it a long time ago on this site: http://www.davidrumsey.com/luna/serv...No_InitialSort (you have to sign up and create a media group)

The idea was to sell the LUNA image browser. I think NASA was using it for a while. They basically just turned all the brown stuff blue. Doesn't look like they're using it now. Rumsey paid us like $1M to develop that software but was pretty disappointed it wasn't more customizable other than color and font tweaks. Which would have been a 10x bigger job.

Anyway the sortable grid of images was just drag+drop (I can't remember if we used a lib or not) + float left. Simple!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 07:09 PM
Quote:
Originally Posted by daveT
The work-around is affiliate links and direct ad sales. You can host your own images and link to your affiliate partner. This requires no javascript and ********** don't block the images or the anchor tags.

Part of the deal of ad networks is user tracking. The deal is:

1- You host an ad.
2- You give maximum data to the network.
3- You get paid for that data.
I suppose I wasn't thinking about tracking purposes, but modern browsers allow you to reject third party cookies so I'm not sure that factors in.

Wrt the interview question, I know a few older devs who are completely hopeless in anything except their very specific knowledge domains. Can program in one and only one language, anything outside of that and it's like a cat walking across a keyboard.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 07:19 PM
Quote:
Originally Posted by Noodle Wazlib
I suppose I wasn't thinking about tracking purposes, but modern browsers allow you to reject third party cookies so I'm not sure that factors in.
Cookies aren't the only way you can track (and "tracking" has many definitions) but as a general rule, tracking is how you get paid. If you're not New York Times or ESPN or somebody big, people aren't going to pay real money without metrics.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 07:24 PM
Quote:
Originally Posted by blacklab
If you went into an interview and they sat you in front of a computer and told you:

-here's a browser and a text editor
-create an html page with two big divs
-in the first div make 3 smaller divs, label them a,b,c
-make the smaller divs draggable from one big div to the other.
-feel free to use google
-feel free to use any libraries/modules/plugins/frameworks you'd like

what would you do?
I may have bombed this. I'd bring up I've used jquery ui and react-dnd but probably would have just dived in to the dom like the one guy. I'd be scared to pull up jquery ui since it's been so long and react-dnd is complicated. I got to this after like 20-30mins,

https://jsfiddle.net/wrt1unby/

works okish in chrome.

Also I had no clue html5 had drag and drop stuff built in
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 07:31 PM
Quote:
Originally Posted by candybar
One other question I have was, did the candidate have their choice of computing environment (os/browser/editor/ide/etc) or did you otherwise make sure they were comfortable with what you provided them with? Last time around, I don't think I ever did quite this badly in any in-person interview but the two where I think I gave the worst impressions both involved me having to use a computer.
yes, they both brought their own computer and used whatever they liked.
The guy who bombed used emacs on linux, the other webstorm on a mac.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 07:51 PM
Quote:
Originally Posted by suzzer99
I implemented it a long time ago on this site: http://www.davidrumsey.com/luna/serv...No_InitialSort (you have to sign up and create a media group)

The idea was to sell the LUNA image browser. I think NASA was using it for a while. They basically just turned all the brown stuff blue. Doesn't look like they're using it now. Rumsey paid us like $1M to develop that software but was pretty disappointed it wasn't more customizable other than color and font tweaks. Which would have been a 10x bigger job.

Anyway the sortable grid of images was just drag+drop (I can't remember if we used a lib or not) + float left. Simple!
I love that website. Somehow modern and quaint.

Quote:
Originally Posted by Noodle Wazlib
I suppose I wasn't thinking about tracking purposes, but modern browsers allow you to reject third party cookies so I'm not sure that factors in.
Security is hard.

I know that there are attack vectors in ads, but I honestly don't believe reputable networks do zero work to mitigate the problem. If that assumption is right, it means you probably aren't going to be able to do much better. Even Google gets flack on this, but 0.00001% of billions of ads served each day is a very large number. This means Google is going to see quite a few issues every year, but an individual web owner will probably never see anything awry over that same year.

You are going to have a serious issue trying to sort through the thousands of served ads to figure out "secure" or "not secure." It's simply intractable for a website owner. A *-thingy simply blocks all black-listed urls. It's an easier and safer strategy than trying to process good -vs- bad.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 09:02 PM
Quote:
Originally Posted by blacklab
Trying to figure out if I'm the idiot or the candidates I'm finding are idiots. The two engineers working for me blasted through this, finishing in 5-10 minutes. They are both in their 20's and have been coding professionally for a few years. I just interviewed two 30+ year old's with over 10 years experience coding and it went horribly, with neither finishing in 45 minutes.

We're hiring for a front end engineer, to get to this interview you go through a phone screening where I ask a bunch of questions to make sure they are very familiar with html/css/js/angular.

If you went into an interview and they sat you in front of a computer and told you:

-here's a browser and a text editor
-create an html page with two big divs
-in the first div make 3 smaller divs, label them a,b,c
-make the smaller divs draggable from one big div to the other.
-feel free to use google
-feel free to use any libraries/modules/plugins/frameworks you'd like

what would you do?
This took me 15 mins, then I accidentally lost all of it, and then it took me 4 minutes to re-create: https://jsbin.com/jahakevuya/edit?html,output

About 8 mins of those 15 were making attempts to guess at what would fix my bugs, without using google.

Tho you can also drag the divs into each other and **** everything up, so I would have to change the function where it is just appended as a child to whatever you drag it to.

It is basically a copy/paste of the w3schools drag and drop page: https://www.w3schools.com/html/html5_draganddrop.asp

I can't imagine being any type of expert and not finding that page within 30 seconds of googling.

Last edited by Larry Legend; 04-24-2017 at 09:07 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 11:10 PM
It's a thing to hide W3Schools from search results, so many experts wouldn't be aware of it or treat the link like Chernobyl if it did pop up.

http://www.w3fools.com/ used to be a page dedicated to correcting all of the mistakes in W3Schools. Interesting that they no longer do that.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2017 , 11:23 PM
well finding the solution in 30 secs of googling is a thing with or without w3schools
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-25-2017 , 12:46 AM


I don't get why JSX doesn't count as a templating language here.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-25-2017 , 03:03 AM
Quote:
Originally Posted by suzzer99
I don't get why JSX doesn't count as a templating language here.
Isn't JSX transpiled to JS, whereas templates are rendered at runtime?

I can't do 28 minute youtoobz, if only this guy could write an article expressing the same thought...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-25-2017 , 06:08 AM
Quote:
Originally Posted by goofyballer
I can't do 28 minute youtoobz, if only this guy could write an article expressing the same thought...
this
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-25-2017 , 08:53 AM
Quote:
Originally Posted by daveT
This isn't what I was suggesting at all. I simply said that aiming to 4NF tends to faster tables due to much fewer nulls and narrower tables. I was responding to the 99% nullspace and added the narrow tables as a bonus, not a goal. The fact is that so much null is going to do damage to the database memory and speed.

irt to premature optimization: he is talking about 400M row tables, which is pretty large and would requires some tricks to get down to 500ms.



I suppose it depends on the RDMS you are using, but any system with a returning value makes this process fairly simple.

Depending on who's opinion matters to you, 4NF should always be the goal. Anything less generally results in unwanted anomalies.



Speed is not a consideration of normalization. It happens that proper text-book normalization will often result in faster database queries vs a poorly designed database. The strategy I propose is normalize then denormalize the hot-spots. There really won't be many.

To be sure we aren't talking past each other, normalization only refers to a single relation, not the entire database.

I'm not sure why you wouldn't do this in your example:

Code:
users
--------
user_id
... etc ...


emails
----------
email_id (pk)
from_user_id (fk to users)
to_user_id (fk to users)
subject
body_text
... etc ....
It's normalized, requires no complicated joins, and would be incredibly fast.
All my uni lectures coming back to me now! Haven't reminded myself of 4NF/5NF stuff for years now so thanks for prompting me to look it all up again

RE my example, if you want to work out how many emails a user_id has sent, you can count() on the emails table however it would be faster to have a denormalised count field in the user table. Granted counts should be fast with index but thread earlier ITT complained it is slow in their Mysql db. Denormalised count field would probably reduce db size (less indexes required) and faster fetch of the count as you just need to lookup one field.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-25-2017 , 09:04 AM
Shot in the dark here... I'm working on a personal project with a Raspberry Pi at home, and I want to train a neural network and run it on the Pi. Anyone have any insight into what the easiest library to use might be?

I've definitely seen people successfully run TensorFlow, but the guides I've seen have some pretty involved build process going on. I barely understand working with Python environments as it is.

The other common libraries seem to be Caffe and Theano, but I have no idea how easy they will be to install. Ideally 1 simple
Code:
sudo apt-get install xxxxxxx
would be nice
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-25-2017 , 01:58 PM
On the subject of interview questions, my friend got a decent one the other day:

Find out if an integer is a palindrome without converting it to a string.

Then part 2 after you answer that:

Spoiler:
Then find out if it is a palindrome without using checking two arrays against each other.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m