Open Side Menu Go to the Top

12-12-2013 , 12:53 PM
Quote:
Originally Posted by jjshabado
On a specific note, I think triggers are almost always bad and so the extent of my knowledge about them is that I probably don't want to use them.
+1 - don't use triggers unless you have multiple applications using the same database that for some reason cannot share a library.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
12-12-2013 , 01:16 PM
On another note, I'm really loving this thunderbolt display I bought the other day. I have a 30 inch dell (2560x1600) but there's no decent dvi-d to mac converter... so it always looked crappy.

I'd say I'm more productive on this thing than two 1920x1200 monitors (my old work setup), just because of workspaces. I keep browsers on workspace 1, sublime on workspace 2 (3 code panes is also so much better than 2), and a split terminal on the last with the server running on the right so I can tail logs.

What are other people using for desktop setups?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-12-2013 , 02:04 PM
Quote:
Originally Posted by Nchabazam
I also don't know much vanilla SQL, and for some reason am too lazy to learn it. If I ever need to write some custom query stackoverflow or this forum can help me quickly enough. I do know how to avoid massive N+1 chains even though I'm stuck in ORM land.
This reminds me of a question I've been meaning to ask on this forum. I was told that making alot of queries was bad for performance. So parsing the results from one query in order to build another query was generally a bad practice, and you should be able to write just one big query to get all the data you need. This caused me a bit of pain because to write any non trivial SQL in an ORM syntax is doubly painful. But then recently I was reading about performance and kept reading that sql joins are really bad for database performance because the cached results can't be used if any of the data changes...

I guess I'm glad I took the time to learn to write some complicated joins, but was I worrying about something that isn't really given much weight in your typical CRUD app? I wonder if I actually made my app slower (not that it matters, it was a toy website anyway)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-12-2013 , 02:16 PM
Quote:
Originally Posted by Nchabazam
On another note, I'm really loving this thunderbolt display I bought the other day. I have a 30 inch dell (2560x1600) but there's no decent dvi-d to mac converter... so it always looked crappy.

I'd say I'm more productive on this thing than two 1920x1200 monitors (my old work setup), just because of workspaces. I keep browsers on workspace 1, sublime on workspace 2 (3 code panes is also so much better than 2), and a split terminal on the last with the server running on the right so I can tail logs.

What are other people using for desktop setups?
I got a Mac air w/two thunderbolts. I keep Sublime in 2-3 column mode on one, and browser/terminal/etc on the other. Outlook and IM go in the laptop screen.

Our design team all has thunderbolts. Not coincidentally the stuff they design tends to look gigantic on a laptop or plain old monitor. We joke that we have thunderbolt- first responsive web.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-12-2013 , 02:20 PM
Quote:
Originally Posted by suzzer99
Anyone have any general or specific advice for keeping things "request–safe" in node?
Code:
req.module = _.extend({}, baseModule)
this might help?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-12-2013 , 02:21 PM
Quote:
Originally Posted by suzzer99
I got a Mac air w/two thunderbolts. I keep Sublime in 2-3 column mode on one, and browser/terminal/etc on the other. Outlook and IM go in the laptop screen.

Our design team all has thunderbolts. Not coincidentally the stuff they design tends to look gigantic on a laptop or plain old monitor. We joke that we have thunderbolt- first responsive web.
Can a macbook air run two thunderbolts?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-12-2013 , 02:26 PM
I would love a single 4k (3840x2160) display that doesn't have a crippled FPS cap.

I used to think I would like 2x 2560x1440 displays (which would be awesome) but then I realized a 4k display has enough height to comfortably run horizontally split code windows.

Imagine having this setup on 1x 30-34"ish monitor:

Code:
960   = width
1080  = height

[1080] 960 code | 960 code | 960 code | 960 browser
[1080] 960 code | 960 code | 960 code | 2x 540 height terminals
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-12-2013 , 02:45 PM
Quote:
Originally Posted by jjshabado
Triggers are a good example of something I think you have to be careful of.

Any complex language has many different features that are only used for specific use cases. Its quite possible that people that know these languages just may have never come across a time to use them - and not knowing anything about how to implement them doesn't mean they haven't done lots of other advanced things in the language.

On a specific note, I think triggers are almost always bad and so the extent of my knowledge about them is that I probably don't want to use them.
I agree that they are generally bad. Wouldn't it be terrible to have someone who doesn't know this and all of a sudden...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-12-2013 , 02:53 PM
ASUS is supposedly working on affordable 24" 4k without normal refresh rates. Once those get down to the $500-$600 a piece range instead of over double that I think 2-3 of them would be the absolutely perfect dev setup.

IRT those SQL statements, we learned that stuff the first day of the class I just finished taking and within a week had a closed book, no Google test doing complex joins, subqueries, etc. If he couldn't do those three he had no business putting SQL on a resume.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-12-2013 , 03:00 PM
I do not have any item on my CV that reads "X language: good" or the like...for all of them it says "X language: productive within a week"
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-12-2013 , 03:24 PM
Quote:
Originally Posted by daveT
I agree that they are generally bad. Wouldn't it be terrible to have someone who doesn't know this and all of a sudden...
Whether they know to use them or not has little relation to knowing how to implement one (which I thought you were saying was important to you).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-12-2013 , 03:50 PM
Oops meant to say with normal refresh rates not without in my last post. Stupid mobile application says I don't have permission to edit the post.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-12-2013 , 05:13 PM
Quote:
Originally Posted by jjshabado
Whether they know to use them or not has little relation to knowing how to implement one (which I thought you were saying was important to you).
Well.. I can see the argument either way on that. The main thing I'm thinking of is the person should have enough basic knowledge of their chosen technology to be able to discuss something nuanced. I figure triggers are a decent place. They seem like such a great idea on the surface, If not triggers, then something deeper than select star.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-12-2013 , 07:07 PM
Quote:
Oops meant to say with normal refresh rates not without in my last post.
Yeah, I play games occasionally and usually tie the 2 together. I've seen that one 4k monitor that's $350 but it seems really low quality and it only operates at 30hz at that resolution.

That would be choppy even for desktop usage IMO.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-12-2013 , 10:22 PM
Quote:
Originally Posted by Nchabazam
Can a macbook air run two thunderbolts?
If it can't then I'm on some pretty good drugs
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-12-2013 , 10:24 PM
Quote:
Originally Posted by e i pi
Code:
req.module = _.extend({}, baseModule)
this might help?
I think I'd still have pointers to the original objects in baseModile.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-12-2013 , 11:39 PM
Quote:
Originally Posted by candybar
Double quotes are part of the SQL standard AFAIK.
I'm, and was, aware of that, though I don't know exactly what they are used for. If I was pressed against a wall, I'd say they are used for table and column names. I personally have never seen a course, read a book, or seen tutorial using them.

At least here, it seems like it's not really to use them:

http://stackoverflow.com/questions/1...-quotes-in-sql

An interesting tidbit about the SQL standard is that it calls for coercing letters to all-caps. PostgreSQL coerces to all-lower. Or maybe I have it reversed, but I think that is correct considering any camelCaseTable becomes camelcasetable.

Regardless of the nittery, assuming standards are adhered to with any RDMS is about as sensible as assuming that all browsers support the CSS standard, and with that said, using double-quotes would either mean you are a domain expert or you are deeply confused. Which way should I err? I'm not at all qualified to answer this, so I didn't make a fuss of it.

I kind of find the whole conversation amusing. I'm not looking for development jobs in SQL, yet apparently my expectations are too high for an applicant.

****

Nchabazam: I'd strongly suggest going through this course: https://www.coursera.org/course/db

It really is one of the best courses from the MOOC offerings and extremely thorough.

Personally, I love working with SQL and databases. Just something so primitive and rewarding about it. Definitely my favorite technology.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-13-2013 , 12:22 AM
Quote:
Originally Posted by daveT
I'm, and was, aware of that, though I don't know exactly what they are used for.
They are used correctly in the answer given by your candidate. Why would you penalize him for using them?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-13-2013 , 12:27 AM
While we're talking about databases, anyone using hstore for serious apps in postgres?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-13-2013 , 12:33 AM
Quote:
Originally Posted by candybar
While we're talking about databases, anyone using hstore for serious apps in postgres?
Or json type for that matter.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-13-2013 , 12:35 AM
Quote:
Originally Posted by suzzer99
I think I'd still have pointers to the original objects in baseModile.
how about making a BaseModule constructor function instead of an object literal,

Code:
function BaseModule() {
  this.prop1 = {};
  this.prop2 = 'some string';
  this.prop3 = true;
}

BaseModule.prototype.sharedVal = 'some shared value or method';
then,
Code:
(later in app.get middleware)

function doSomething(req, res, next) {
  req.module = new BaseModule();  //only attributes from constructor or prototype
  req.module.prop1.foo = req.query.someParam; 
  console.log(req.module.prop1); /
...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-13-2013 , 12:41 AM
Quote:
Originally Posted by e i pi
how about making a BaseModule constructor function instead of an object literal,

Code:
function BaseModule() {
  this.prop1 = {};
  this.prop2 = 'some string';
  this.prop3 = true;
}

BaseModule.prototype.sharedVal = 'some shared value or method';
then,
Code:
(later in app.get middleware)

function doSomething(req, res, next) {
  req.module = new BaseModule();  //only attributes from constructor or prototype
  req.module.prop1.foo = req.query.someParam; 
  console.log(req.module.prop1); /
...
This should work as long as all object/array properties are initialized in the constructor for each instance, instead of being initialized once and assigned to the prototype.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-13-2013 , 12:46 AM
Quote:
Originally Posted by candybar
They are used correctly in the answer given by your candidate. Why would you penalize him for using them?
I didn't penalize him for the double-quotes. Sure, I gave a zero on the result, but he was stuck on stupid when it didn't work out. He couldn't figure out how to get the query to work until I told him the answer. As I said, I sort of get it, but I sort of don't. I would default to thinking that a programming language is case-sensitive, thus "MY_TABLE" should be "my_table." But as I said, this was perhaps a syntactic issue and I let it go. I didn't LOL. I ended up walking him through the correct syntax. I gave him the benefit of the doubt and chalked it up to nerves. I didn't pressure him to continue and chatted him up before going further.

There's always more to the story, you know?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-13-2013 , 12:49 AM
Quote:
Originally Posted by daveT
I didn't penalize him for the double-quotes. Sure, I gave a zero on the result, but he was stuck on stupid when it didn't work out. He couldn't figure out how to get the query to work until I told him the answer.
Oh ok, so he couldn't figure out how to get the thing to run, given an actual computer and a sql console.

hahahaohwow.jpg
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
12-13-2013 , 12:58 AM
To be fair to the guy: he likely used SQL as a strict data store. He may well have been able to process it in PHP, which I told him was my impression. I mean, I'm not a harsh person in real life.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

      
m