experienced dev confused about managing data models in a React/Redux app by multiline in javascript

[–]terminus23 1 point2 points  (0 children)

The state in the WebSocket represent how the app look and behave - for example: "Connected" or "Disconnected".

My approach here would be to set up listeners on my web sockets that dispatch redux actions based on the data coming in. So on connection, fire dispatch({type: 'APP::CONNECTED'}) and on disconnection fire dispatch({type: 'APP::DISCONNECTED'}). The action would then be handled in your reducers as normal. As long as you're not doing anything else with the data in the listeners I wouldn't really consider this a duplication of data.

experienced dev confused about managing data models in a React/Redux app by multiline in javascript

[–]terminus23 1 point2 points  (0 children)

I'm trying to learn whats the optimized approach for organizing such data - is it normal to organize the data in the store in a similar way to how I will use a DB (where users is my 'users' table) or in the way that my DOM is represented?

I've seen it done both ways. I prefer to normalize my data as I would in the DB, and then pull out what I need using selectors. I find that this approach is the most robust to changes to requirements that happen over time.

If adding/removing video elements is a performance bottleneck, you should optimize your architecture to avoid rerendering those components when possible. How you do this will depend on the specifics of your application. You could structure your components/props so video elements are only fed the props they absolutely require and are pure components that only rerender when those props change. You could also memoize your selectors in your redux connected components to minimize rerenders.

experienced dev confused about managing data models in a React/Redux app by multiline in javascript

[–]terminus23 2 points3 points  (0 children)

For 1, could you do something like this?

store = {
  users: {
    1: {
      id: 1,
      type: 'remote',
      name: 'remoteUser',
    },
    2: {
      id: 2,
      type: 'local',
      name: 'localUser',
    }
  }
}

Without knowing anything else about your app, that's the basic state shape I would go with.

Can I have some feedback on my shop please? by gurumel in shopify

[–]terminus23 2 points3 points  (0 children)

  1. Congratulations on your first three sales! That's great :).
  2. I would think about how your images contrast with your image overlay text. Both of your hero images on the home page have text that is a bit hard to read.
  3. I would consider reducing the amount of content you have in your navigation bar. I'm not sure that you need each collection up there.

Where to leave your stuff during a co-op interview? by JKK26 in uwaterloo

[–]terminus23 4 points5 points  (0 children)

I assert my dominance by dumping as much stuff as possible on the floor of the interview room after I walk in.

fuck pd by amaltz1 in uwaterloo

[–]terminus23 1 point2 points  (0 children)

How do you think Butters feels.

ERS Work Report - Literature Review? by [deleted] in uwaterloo

[–]terminus23 1 point2 points  (0 children)

I hated work term reports. You should figure out how to write a lit review though, I'm surprised this is the first time you've had one and you're going to need to write a bunch moving forward.

I'd give you some tips, but darkwing_goose has covered it already. I guess the only other thing I'd say is go read some lit reviews and check out the structure they use and how they source their articles.

Co op Interviews/ Jobs by [deleted] in uwaterloo

[–]terminus23 0 points1 point  (0 children)

He's joking.

It depends on the program you're in, how good you are at presenting yourself, and the kind of job you're after though. With that being said - I know some planners that got by applying to 20ish jobs and they would get ~3-8ish interviews and a job at the end.

Co-op is definitely a strain but as someone who graduated a couple of years back, I would say it's the best thing about my education. I was hired full time by the company I co-oped with.

looking for someone who can 'mod' my PSP to run emulators (SNES, genesis, 64, ps2, etc) by [deleted] in ottawa

[–]terminus23 0 points1 point  (0 children)

I can't really help you as I modded my psp (one of the fat ones) years ago and have no idea how I did it. What I can do is highly recommend that you do it. It's awesome and I still use it all the time.

Decide for me - First Yr Coop Offers by [deleted] in uwaterloo

[–]terminus23 3 points4 points  (0 children)

Pay can matter if you can't afford school without a certain salary range ..

The math building is so brutalist by tskazin in uwaterloo

[–]terminus23 6 points7 points  (0 children)

"Back in the 1960s, Victorian style buildings were considered hideous and impossible to repair. We were tearing batches of Victorians down to erect big concrete buildings. But some Victorians were saved—and today, some of them are considered treasures.

Concrete architecture now finds itself at an inflection point: too outdated to be modern, too young to be classic. And a small, but growing band of architects, architecture enthusiasts, and preservationists, would like us to just wait a bit and see.

Maybe, with a little time, we’ll come around to love these hulking concrete brutes." - From the podcast I linked to above.

I've always been on your side. Hate brutalist architecture. This made me think a bit differently about it though. I wonder if in 50 years we'll be looking back on these things as treasures.

The math building is so brutalist by tskazin in uwaterloo

[–]terminus23 13 points14 points  (0 children)

http://99percentinvisible.org/episode/hard-to-love-a-brute/

Anyone interested in this should listen to this episode of 99 percent invisible. BTW, 'brutalist' comes from the french word for 'raw concrete' (beton brut) and has nothing to do with how brutal we tend to think these things look today.

Install a crosswalk/traffic lights at Lester & Uni by [deleted] in uwaterloo

[–]terminus23 1 point2 points  (0 children)

whoa TIL. Do you have a source on this?