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

08-14-2016 , 12:53 AM
Any revision of your thoughts on Angular v React now you've done a lot of React?

From what I understand Angular 2 nicked a lot of the best ideas from React. I have an Angular 2 pet project to do that I still haven't got around to.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-14-2016 , 01:00 AM
+1 on being very interested in candybar's evolving react vs. angular feelings as he learns more and more react.

I am doing a React POC now just to get up to speed. Found these videos which seem pretty good: https://www.youtube.com/watch?v=MhkGQAoc7bc I love their ES6 videos - they really hit home how most of the new features make your life much easier.

Any other recommendations for learning react?

Btw I did some polymer POCs based on these tutorials: https://www.youtube.com/watch?v=MaWcS-10NIw It seemed pretty cool but I get the sense it's kind of dead now? I love "Scott with LevelUpTuts"! He's so peppy.

I enjoyed the polymer stuff, and still think web components are the future, and angular 2 is a lot closer to that than react, right?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-14-2016 , 01:08 AM
Story time: I just checked in with an Australian developer I worked with on my first web programming job in 2000 - a psycho startup in LA. This guy was by far their most prolific dev. He had written like 2/3 of the entire codebase, out of 10 devs by the time I got there. I think he was 24 at the time when I was 31 or something. I basically learned java by pestering him all day.

So I checked in because the startup I'm working for are all in Aussie and I thought he went back at some point. I figured he'd have to have learned new stuff. Here's his reply about what he's doing:

Quote:
Mostly everything in java, I am a legacy developer... only other stuff I play with is android, ios and arduino (sketch)
Dude is way too young to be a 'legacy developer'. He's younger than me and a better dev than me (or at least he was at the time and probably until I got 10+ years of experience under my belt). He should be building amazing things.

Moral: stay current kids, and move if you're not being pushed into new stuff. I've gotten really really lucky in that wherever I went there was always some cutting edge thing going on that I got pulled into.

Last edited by suzzer99; 08-14-2016 at 01:15 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-14-2016 , 01:19 AM
Quote:
Originally Posted by suzzer99
I enjoyed the polymer stuff, and still think web components are the future, and angular 2 is a lot closer to that than react, right?
I read somewhere that the W3C committee writing the Web Components specs is stacked with Google guys. Angular 2 was intended to be a transition to web components and Google are writing both it and the Web Components specs, so yeah.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-14-2016 , 01:21 AM
Yeah that was my impression. I still don't like JSX very much. But I'm trying to give react an honest trial.

They're hoping to use react native to save a lot of effort on the iOS app version of our site (mobile web is not an option). I've heard some bad things about react native though.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-14-2016 , 02:28 AM
Quote:
Originally Posted by ChrisV
Any revision of your thoughts on Angular v React now you've done a lot of React?

From what I understand Angular 2 nicked a lot of the best ideas from React. I have an Angular 2 pet project to do that I still haven't got around to.
So far I have Angular 2 > React/Redux > Angular 1 but admittedly I don't have that much experience with anything other than Angular 1 out of those 4 technologies.

This is something I've believed in and speculated about but I'm becoming far more certain now that I work for a reasonably large tech company - platform choices and architectural decisions for a large company at this level are much more about people and organization building, whether in terms of recruiting and retention or simply corporate structure (formal and informal communication structure) that these kinds of macro decisions influence. Efficiency of the sort engineers think about simply doesn't matter much because at the macro level, if you are able to recruit brilliant people, keep them motivated and have them communicate efficiently amongst one another, they will figure out a way to make things work even if lots of things are done poorly from a technical perspective. And this can be very contradictory because technologies that help you solve problems you have today most efficiently can nevertheless make it difficult to hire some of tbe best people and/or force you to structure your company in a way that leaves you less able to tackle future problems.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-14-2016 , 02:32 AM
Quote:
Originally Posted by suzzer99
DaveT I sent our RethinkDB guy your response and got two kind of cryptic responses from him about it. I think he's a bit lost.
Check the query. If it is optimal, great.

Check if the index is firing. If so, then that may well be the fastest that query can run.

If the index is not firing, then there are memory settings, probably something called "buffer size," or perhaps a memory leak: http://stackoverflow.com/questions/2...so-much-memory

Indexes aren't the end-all be-all of any system. They are used for certain queries, but not others. Indexes are add-ons, not crutches.

Finally, Stack Overflow.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-14-2016 , 02:50 AM
Quote:
Originally Posted by candybar
So far I have Angular 2 > React/Redux > Angular 1 but admittedly I don't have that much experience with anything other than Angular 1 out of those 4 technologies.

This is something I've believed in and speculated about but I'm becoming far more certain now that I work for a reasonably large tech company - platform choices and architectural decisions for a large company at this level are much more about people and organization building, whether in terms of recruiting and retention or simply corporate structure (formal and informal communication structure) that these kinds of macro decisions influence. Efficiency of the sort engineers think about simply doesn't matter much because at the macro level, if you are able to recruit brilliant people, keep them motivated and have them communicate efficiently amongst one another, they will figure out a way to make things work even if lots of things are done poorly from a technical perspective. And this can be very contradictory because technologies that help you solve problems you have today most efficiently can nevertheless make it difficult to hire some of tbe best people and/or force you to structure your company in a way that leaves you less able to tackle future problems.
Welcome to the real world bro, unlike your one-man show where you got to optimize everything to infinity. When we started putting node and angular on our job requirements, our candidate quality went up a ton.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-14-2016 , 02:57 AM
Quote:
Originally Posted by daveT
Check the query. If it is optimal, great.

Check if the index is firing. If so, then that may well be the fastest that query can run.

If the index is not firing, then there are memory settings, probably something called "buffer size," or perhaps a memory leak: http://stackoverflow.com/questions/2...so-much-memory

Indexes aren't the end-all be-all of any system. They are used for certain queries, but not others. Indexes are add-ons, not crutches.

Finally, Stack Overflow.
Thanks dude, I passed this along to him as well. They all swear this guy is really good but I'm starting to wonder. It's never good when you get contradictory garbled response. IE after I sent him your first advice I got this response:

Quote:
Thank you suzzer.

Got the problem with a simple simple get() without any filter, and using the primary key actualy
To which I replied:

Quote:
Oh cool! Can you tell me what you were doing before (that saw the perf problem) vs. what you're doing now? I'd really like to know. Or maybe send it out to the whole group as a case study.
To which he replied (he's French btw, in France):

Quote:
i stopped temporary to investigate this problem because i'm really too late regarding client side API, i completely underestimate the time for the refactor. And i need this refactoring before integrate the encryption part. After encryption, microservice design integration.

This rethinkdb lag behavior start at 600Mo so actually i just play with a total of stored file < 600Mo. That's enought for dev. But we need to take care of that soon.

Regarding the github ticket, the goal is for me to setup a personal box on which i can reproduce, and then remove every source code etc and then open an SSH for the rethindb guy (github ticket) so he can investage. [boss/lead] is OK with that.
Ok so you didn't actually solve the problem?

Btw the github ticket is very convoluted. They tell him that his problem really isn't the same as the thread and he says he'll submit another ticket, but he's still quoting to us that he is waiting for them to reply. :/

** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-14-2016 , 04:37 AM
Quote:
Originally Posted by candybar
So far I have Angular 2 > React/Redux > Angular 1 but admittedly I don't have that much experience with anything other than Angular 1 out of those 4 technologies.

This is something I've believed in and speculated about but I'm becoming far more certain now that I work for a reasonably large tech company - platform choices and architectural decisions for a large company at this level are much more about people and organization building, whether in terms of recruiting and retention or simply corporate structure (formal and informal communication structure) that these kinds of macro decisions influence. Efficiency of the sort engineers think about simply doesn't matter much because at the macro level, if you are able to recruit brilliant people, keep them motivated and have them communicate efficiently amongst one another, they will figure out a way to make things work even if lots of things are done poorly from a technical perspective. And this can be very contradictory because technologies that help you solve problems you have today most efficiently can nevertheless make it difficult to hire some of tbe best people and/or force you to structure your company in a way that leaves you less able to tackle future problems.
Yeah, tbh when I talk about "better" and "worse" I am mostly talking about what I would most like to solve problems in. My question amounts to "Will Angular 2 or React make my life easier?".
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-14-2016 , 08:23 AM
@suzzer; I know you know I'm beating around the bush and I'm trying to be not overly subtle on what I think the real problem is (bad schema / dirty dataset). Do you think the conversation and the github post is pointing in that direction?

I was looking through some of the source files and ran into this:

https://github.com/rethinkdb/rethink...lient_protocol

" Raising query limit to 128M for #4529 "

issue 4529 specifically discusses binary and table sizes: https://github.com/rethinkdb/rethinkdb/issues/4529

https://github.com/rethinkdb/rethink...ment-120578254

Thanks for the report. It looks like you're hitting the query size limit. r.binary was designed to hold smallish chunks of binary data, not large files, so in general the way to solve this is to split your files into chunks.

Doesn't quite make total sense because your developer is claiming his chunks are 1Mb, but I'm wondering...

I'm quite impressed that a maintainer is willing to go so far out of his way like that. With so much concern on what users are doing that and being backed by YC, it may end up with a pretty decent future.

I'm definitely interested in how this resolves itself.

Last edited by daveT; 08-14-2016 at 08:34 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-14-2016 , 11:05 AM
Quote:
Originally Posted by suzzer99
Welcome to the real world bro, unlike your one-man show where you got to optimize everything to infinity. When we started putting node and angular on our job requirements, our candidate quality went up a ton.
Yeah, exactly, I have been insulated from certain realities because I was at a small company for too long. And I think this goes a lot further - in some sense running an elite software engineering organization at scale and general principles of engineering good software clash dramatically. Think about the kinds of things we kind of take for granted as good principles for architecturing software.

Law of Demeter
Single responsibility principle
Open/closed principle
Liskov substitution principle
Interface segregation principle
Dependency inversion principle
Modular design
Explicit State/Change Management
Non-leaky Abstractions
Separation of Concerns

I'll call these qualities "modularity" for short because I think many of them are about the same thing. Essentially, we want software components to be predictable, have local impact, easily isolated, replaced. Given Conway's Law, you can map, to a degree, software architecture to organizational communication structure. And one thing becomes really clear - talented engineers absolutely hate and detest organizational modularity. They don't want to be limited in terms of responsibilities, they don't want to know just what they need to know, they want to be able to touch everything, they operate simulatenously at multiple levels of abstraction and have a holistic, as opposed to a local view of the system.

I personally haven't really tried to evaluate frameworks from this perspective before - how will adopting the architecture prescribed by this framework shape our organization and prepare us for the future - and should have more thoughts on this later.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-14-2016 , 11:50 AM
Quote:
Originally Posted by RustyBrooks
I have a 32" dell that does 2560x1600 and I have a hard time working on anything smaller.
I have been working on my Mac Book Pro (2560x1600) with no extra monitors the last ~2 years. Always thought about getting an extra monitor but never did. I used to rock a tripple monitor setup when I still played poker...not really missing anything.

I'd probably be too tilted if I had a multi monitor setup and then moved around to work elsewhere. So I standardize on that one monitor. At home I like to work in the garden, too...would be inconvenient.

I'd be interested in other opinions since I think about just buying one-two good extra monitors about once every 6 month but ultimately decide against it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-14-2016 , 12:00 PM
Quote:
Originally Posted by Ryanb9
http://cs.boisestate.edu/~jhyeh/cs42...mer16/lab3.pdf

This is the last program I have to do for my summer course in CS 421 -- Design and Analysis of Algorithms.

Looks brutal, no?

I have an A in the class but maybe not after this assignment xD I'll start working on it tonight.
Interestingly I'm mostly familiar with this through the business part of my business/CS degree. Maybe reading a project management POV helps? Terms to google: precedence diagram method, PERT, CPM, GERT
https://en.wikipedia.org/wiki/Precedence_diagram_method
https://en.wikipedia.org/wiki/Progra...view_technique
https://en.wikipedia.org/wiki/Critical_path_method
https://en.wikipedia.org/wiki/Graphi...view_Technique

Unfortunately the Englisch articles are a lot worse than the German ones...the first one by comparison:
https://de.wikipedia.org/wiki/Netzplantechnik

It was actually fairly interesting to do these on paper for exams. This and operations research were the most interesting business classes (I also liked strategic management).

If you finish that exercise, there'd probably be some interested in a decent open source tool that spits out a diagram from some spreadsheet entries. I could use it but I have always been too lazy and just used lame bar charts for project proposals...I think a precedence diagram is a lot more useful as a planning tool.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-14-2016 , 12:10 PM
Quote:
Originally Posted by suzzer99
He said that was his first code ever. So he must have inherited the variable name.

I agree with you that native JS is better than underscore. But I wouldn't hold it against some developer like they're incompetent for using underscore. Maybe they've been working with underscore since before there was much browser support.

If anything I was impressed they know how to use map at all. Most of our offshore devs would just use a for loop and populate a new array. I'd be overjoyed if I saw one using .map or _.map
Yeah I'd say this guy is a keeper if that's his first piece of JS code and it's not copy/pasted from somewhere. I think complaining about that piece of code from an outsourced dev is pretty high level complaining...then again we always did inhouse and I think it's a horrible idea to treat programming as a cost center.

Also there was a reasonable argument for using underscore map/filter etc. over the stock versions but I forgot it...it's in the functional JS book...I'll look it up sometime next week.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-14-2016 , 09:01 PM
Does anyone have an opinion about using SQLAlchemy in python?

a) I know SQL extremely well. I'd say I'm an expert.
b) I don't think I'm going to use it for an ORM.
c) Looking at the docs, the query syntax looks pretty torturous compared to just writing freakin sql queries

It has a very good rep. What's the benefit? Being able to use it with multiple databases? (not really a problem for my use case)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-14-2016 , 11:25 PM
What do the guys who have looked at angular2 think of the rxjs stuff? I've tried to figure out what the .publishReplay(1).refCount() stuff was doing and every time I fail to get it. In general it just seems hard to understand for the simplest things (a stream of functions that you subscribe to and then apply to some data in another stream to maintain state). I can't imagine how incomprehensible it could become for anything significantly complex... but maybe once it clicks it's actually easy?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2016 , 05:43 AM
Quote:
Originally Posted by RustyBrooks
Does anyone have an opinion about using SQLAlchemy in python?

a) I know SQL extremely well. I'd say I'm an expert.
b) I don't think I'm going to use it for an ORM.
c) Looking at the docs, the query syntax looks pretty torturous compared to just writing freakin sql queries

It has a very good rep. What's the benefit? Being able to use it with multiple databases? (not really a problem for my use case)
Did you find the textual syntax? It doesn't look significantly different than pyscopg2, and perhaps a bit cleaner:

http://docs.sqlalchemy.org/en/latest...ng-textual-sql

Code:
>>> s = text(
...     "SELECT users.fullname || ', ' || addresses.email_address AS title "
...         "FROM users, addresses "
...         "WHERE users.id = addresses.user_id "
...         "AND users.name BETWEEN :x AND :y "
...         "AND (addresses.email_address LIKE :e1 "
...             "OR addresses.email_address LIKE :e2)")
sql
>>> conn.execute(s, x='m', y='z', e1='%@aol.com', e2='%@msn.com').fetchall()
psycopg2 looks like this:

Code:
conn.cursor.execute(
    """
    SELECT users.fullname || ', ' || addresses.email_address AS title
-- ugh, why????
    FROM users, addresses
    WHERE users.id = addresses.user_id "
    AND users.name BETWEEN %(x)s AND %(y)s
    AND (addresses.email_address LIKE %(e1)s
-- don't forget the semicolon at the end here...
    OR addresses.email_address LIKE %(e2)s);
    """ {"x": "m",
         "y": "z",
-- not sure if this is correct for LIKE, but probably works?
         "e1": "%aol.com",
         "e2": "%msn.com"}
    result = conn.cursor.fetchall()
    return result
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2016 , 09:48 AM
Quote:
Originally Posted by clowntable
Yeah I'd say this guy is a keeper if that's his first piece of JS code and it's not copy/pasted from somewhere. I think complaining about that piece of code from an outsourced dev is pretty high level complaining...then again we always did inhouse and I think it's a horrible idea to treat programming as a cost center.
serious question, what is the point of code review if this is the kind of stuff you would pass?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2016 , 10:40 AM
Yeah I get that you can just run raw sql queries and that seems fine, but then I might a well use psycopg. I guess my question is, is their fancy query building worth a **** or not (to me it does not seem more readable than straight SQL, although it does at least paper over some of the inconsistencies that are kind of annoying, especially when you are building a query by pieces)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2016 , 01:50 PM
Quote:
Originally Posted by Grue
serious question, what is the point of code review if this is the kind of stuff you would pass?
I designed our node framework to isolate the business logic, which is the only thing any new/inexperienced devs should be touching anyway. Obviously we still code review, but at some point you're not on the project anymore or it gets too big or something slips by. At least they're only writing crappy code in their little sandbox. I still keep a close eye on the framework code and only one or two devs ever touch it.

I think for big companies with giant sprawling websites who insist on using offshore devs and therefore have a lot of developer churn and varying skill levels - this is really the only way to go. YMMV.

Although knowing what I know now, I will always try to design something like this, even for a small team full of rock stars. It just makes for such cleaner, easier to maintain code. It's one of those things like testing, that's a little more work up front, but once you come to rely on it you can't imagine not doing it.

I've been told it's not as easy to isolate business logic from "plumbing stuff" in the angular front end code. But I also know our angular lead is really into just getting stuff to work, not designing scalable frameworks to keep junior devs out of trouble.

So I'm not sure if I was the "angular guy" as well as the "node guy", if I could come up with some kind of business logic sandbox for them that abstracts out most of the repeatable/low-level stuff.

Last edited by suzzer99; 08-15-2016 at 01:57 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2016 , 01:51 PM
Quote:
Originally Posted by Prickly Pear
What do the guys who have looked at angular2 think of the rxjs stuff? I've tried to figure out what the .publishReplay(1).refCount() stuff was doing and every time I fail to get it. In general it just seems hard to understand for the simplest things (a stream of functions that you subscribe to and then apply to some data in another stream to maintain state). I can't imagine how incomprehensible it could become for anything significantly complex... but maybe once it clicks it's actually easy?
i can't speak to its use in angular2 (though angular seems to have a knack for over-engineering), but conceptually, that Rx stuff is great and the paradigm will indeed become simple to understand once it clicks.

have a look at elm, cycle.js, and probably start with this The introduction to Reactive Programming you've been missing
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2016 , 03:35 PM
Quote:
Originally Posted by RustyBrooks
Yeah I get that you can just run raw sql queries and that seems fine, but then I might a well use psycopg. I guess my question is, is their fancy query building worth a **** or not (to me it does not seem more readable than straight SQL, although it does at least paper over some of the inconsistencies that are kind of annoying, especially when you are building a query by pieces)
I've never used SQL Alchemy, though I've used other DSLs. I didn't like the generated SQL. For many cases, they use left or outer joins instead of inner joins, passing much of the work to the query planner. I'm concerned that the example I posted has some bad practices, so I'm guessing that's the target market?

in regards to building up queries, the processing language has some interesting ways to construct queries via format('select * from %I', my_table), which works for columns as well, though I don't use that stuff very often. The optimizer can't see inside of a function.

In short, see what the generated SQL looks like. If it's awesome, I may decide to start using SQL Alchemy, as long as it can handle windowing and CTEs.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2016 , 04:49 PM
It is supposed to be able to handle windowing, I have not tried it. No idea about CTEs.

What I actually can't figure out is if I would even prefer building queries using their tools or not. Like, let's just assume it creates perfect SQL. Would I want to use it even then? I'm not sure.

I mean, like...

Code:
>>> s = select([(users.c.fullname +
...               ", " + addresses.c.email_address).
...                label('title')]).\
...        where(
...           and_(
...               users.c.id == addresses.c.user_id,
...               users.c.name.between('m', 'z'),
...               or_(
...                  addresses.c.email_address.like('%@aol.com'),
...                  addresses.c.email_address.like('%@msn.com')
...               )
...           )
...        )
>>> conn.execute(s).fetchall()
Did I just learn a language that is nearly parallel to SQL just so that I could do something that's already pretty easy to do directly in SQL?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2016 , 06:12 PM
Why? That's horrible to look at. If someone starts with syntax like that, then once they are forced to use some other driver, they are not only writing unreadable and horrid SQL, but worse, prone to making terrible security mistakes.

I wish python had an analog to HugSQL for clojure: http://www.hugsql.org/#using-ddl

I'm not entirely sold on the idea of using comments to define function names, but it is clean to look at and simple to understand.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m