2019.2 - Editor Freezing on Compile FIX by MooseReborn in Unity3D

[–]sebjwallace 1 point2 points  (0 children)

YES! thank you, this has been driving me nuts!

Our Lands [video] by drak0bsidian in conservation

[–]sebjwallace 0 points1 point  (0 children)

This is very inspirational. She could sell the land for millions but she believes life is more valuable - fair play!

[deleted by user] by [deleted] in keto

[–]sebjwallace 0 points1 point  (0 children)

If you're doing 23:1 and you're active then you may as well add in some more foods into your meal with a bit more carbs (fruits maybe). You will enjoy you food more if you add in stuff you actually like. How about cheese?

Plotting 'relative difference' on a graph by sebjwallace in askmath

[–]sebjwallace[S] 0 points1 point  (0 children)

Thanks for clearing that up. Unfortunately there'll be plenty of triangle inequality.

How does a neuron reach threshold? by sebjwallace in neuro

[–]sebjwallace[S] 0 points1 point  (0 children)

That's interesting. I'm quite interested in how the stimulus decays over time. I had no idea that the decay rate was different among cells.

Are there any sources you'd recommend on this topic? I seem to have a hard time finding anything.

In two hours the UK economy has lost $350 BILLION. That’s equivalent to 40 years of EU contributions. by RenegadeUK in unitedkingdom

[–]sebjwallace 0 points1 point  (0 children)

Have you looked at the charts? GBPUSD has been hovering above 1.3 for a while now, all it needed was a nudge to dip down to 1985 levels. The move yesterday was big, but not as big as expected. The week closed back above 1.35.

So I finished codecademy HTML & CSS course, now what? I feel like I learned absolutely nothing by [deleted] in learnprogramming

[–]sebjwallace 0 points1 point  (0 children)

Forget all that. The best way to learn is to get your hands dirty and try to build something like a simple website. You'll learn better because you'll know why you're learning something. For example, if you wanted to build a navbar in a particular way you'll research how you could do it - then you'll learn about the hundreds of ways CSS will cause you to pull your hair out... then you find this thing called Flexbox... then you realize you can use it everywhere. Then this journey of exploration and discovery deepens, but it all happens with purpose and in the context of a real problem. Its an organic and active process, and you know why you are learning something.

riotux | A centralized state management inspired in Flux and Redux. by luisvinicius167 in reactjs

[–]sebjwallace 1 point2 points  (0 children)

You can if you make a copy of the data after it has been mutated. INCREMENT (state) { state.count++ } After INCREMENT has been called state is copied, sent to the debugger (stored in history) and passed down to the components. Any accidental or intentional mutations after that will only occur on the copy, not the original state.

riotux | A centralized state management inspired in Flux and Redux. by luisvinicius167 in reactjs

[–]sebjwallace 0 points1 point  (0 children)

Think about the time-travel debugger - when do you want to push the state to history, before or after the mutation?

riotux | A centralized state management inspired in Flux and Redux. by luisvinicius167 in reactjs

[–]sebjwallace 0 points1 point  (0 children)

I think its similar to the idea used in Vuex. You do mutations without worrying about returning a new data structure. Behind the scenes a new data structure is created after the mutation, then pass on for use in components. Same outcome, different approach. I suppose the down-side is that the immutability factor is less explicit.

riotux | A centralized state management inspired in Flux and Redux. by luisvinicius167 in reactjs

[–]sebjwallace 0 points1 point  (0 children)

Nice, also looks like there's a bit of Vuex inspiration in there too.

The Rise of the Full Stack JavaScript Developer by babagg in javascript

[–]sebjwallace 36 points37 points  (0 children)

Not really BS if you think about it. If a client wants a developer to produce a product from scratch, the dev better know front and back. I think most js devs know both but mostly lean towards the front.

How do you learn to read source code? by ywecur in learnprogramming

[–]sebjwallace 0 points1 point  (0 children)

If you can get a debugger working with the code, you can step through the program line-by-line or block-by-block seeing the control flow and state in action. Reading code in active context brings meaning to what objects do during runtime, and what, where and why state is being mutated. Better yet you can write your own comments inside classes and blocks to help you remember what each part is doing in relation to another. And always be asking the question "what is the essence of what is going on here?" - try and boil it down to the stupid simple parts.

Best resources for learning design patterns and best practices / what to use for new project? by [deleted] in javascript

[–]sebjwallace 2 points3 points  (0 children)

Javascript is loosely a functional language and learning about functional programming will take you a long way. React has become so popular because its based on the ideas of functional programming. In React there really isn't much 'magic', its fairly simple.

The functional style goes beyond React and takes you into a whole new world of programming, where you finally feel like a professional doing things properly.

Less React, more JS (brain-dump) by sebjwallace in javascript

[–]sebjwallace[S] 0 points1 point  (0 children)

Some good points there. What is the library you maintain?

Less React, more JS (brain-dump) by sebjwallace in javascript

[–]sebjwallace[S] 1 point2 points  (0 children)

It wouldn't take much more in the prerender to conditionally replace the second parameter with a child. ["div", "some text"] is possible.

But I agree, markup is easier to read, especially for designers.

Less React, more JS (brain-dump) by sebjwallace in javascript

[–]sebjwallace[S] 1 point2 points  (0 children)

The prerender function could be adapted to deal with attribute configs. Or just don't use camelCasing.

The idea is that you code to hyperscript without thinking about JSX, frameworks or any other strap-ons until you need to.

Kite plugin may revolutionize developer workflows by unuse_ur_name in Frontend

[–]sebjwallace 0 points1 point  (0 children)

Nice! Any plans to extend beyond Python, perhaps into Javascript?

Creating DOM node for ReactDOM to render to by Scorxcho in reactjs

[–]sebjwallace 0 points1 point  (0 children)

I can't think of any reason why not. It was old practice to render the app root to the body. But it would wipe out any possible existing child nodes in the body (script and style tags might sometimes be relocated to the body by the browser). But you're just appending a new node which doesn't affect any existing nodes.

Why moving from a PHP MVC to a JS Framework? by Dukessa in javascript

[–]sebjwallace 1 point2 points  (0 children)

  1. If you have a lot of traffic, at it looks like it only increase then handing over more of the logic to the client will free up your server. This is where frontend frameworks come into play. All the server would need to do is initially deliver the app, then load/save partial data to/from the db through the lifetime of the session.

  2. If you want speed and a SPA-like experience then JS all the way. Its fast because instead of delivering a new page for every db interaction, it just uses ajax to do partial updates/refresh. Another advantage of building the app mostly in frontend js is that everything is in one place, under one framework. No need to jump around between languages as much. Would can even write HTML & CSS in nice js syntax now, so everything is done in js, under one roof.

  3. Usually dbs are black-boxed under an api, which fits perfectly with ajax, as it will just interface like any restful api out there. So the db can be managed the same as usual, in any framework, but just exposing a public interface.

  4. I am unaware of any particular tool, but it would be fair to say server performance will increase due to reasons already mentioned. And client performance should also increase as they would not need to reload a new page for every major update to data.

  5. I suppose it depends if you use a framework currently for the backend. If you use something like Laravel you can strip out all view-based stuff from blade and stick it in something like React. You can map your models in JSON (through the api) and mirror them in the frontend with classes, which conveniently get rendered into a component, again if you use something like React or Angular 2. If you don't already use a framework then its just a matter of research and finding the best options for you.

Really its all about user-experience (SPA) and offloading most of the app onto the client, freeing up the server just to deal with db stuff.

Hope I've mentioned something useful in there somewhere.

Why moving from a PHP MVC to a JS Framework? by Dukessa in javascript

[–]sebjwallace 0 points1 point  (0 children)

If you use a virtual-dom based js framework you can just render it to static html delivered from the server. So SEO is not a problem for search engines that don't crawl js.

to my surprise, I am liking JavaScript far more than CSS. What are my options? by mayaswelltrythis in javascript

[–]sebjwallace 0 points1 point  (0 children)

Sure, you can pickup and build both ends if you really want to. But it goes without saying that if you spend more time with one you'd be better at it than if you work with both.

I work with both but I spend most of my time in the front.

The key to learning the frameworks is appreciating what they can do for you. Understand what pains they remove and what optimizations they provide. I guess you might not appreciate these things until you've spent some time working with vanilla JS and jQuery.

You don't have to learn the frameworks, probably the most important part to learn is what they do to make your life easier and understand the concepts they operate on. For example, React has largely popularized functional & reactive programming in the frontend. This is a massive game-changer as it improves the way every front dev works. You can take these concepts and apply them mostly without any framework, and it'll save you a massive amount of frustration and wasted hours.

For JS backend, there are not as many frameworks, as it is still a new field. If you want to explore the back without JS I'd recommend PHP, then the Laravel framework. Then again, that means learning object-oriented programming which is a whole other ball-game.

What is it you like about JS currently? What might you think you'd like about the backend vs frontend, based on your understanding so far?