Threads for shystruk

  1. 1

    That is why most team leads want to code looks like they want (style etc.). You should definitely practise style guide in each project ;)

    1. 1

      Great article and performance in the end

      1. 1

        Nice guide. Helps to remember a lof :)

        1. 1

          As for me, writing tutorial is not an easy part of learning, especially if you are not pro in area what are you writing about. I would recommend writing a pet project first, share and learn for a community and after that you can write a tutorial :)

          1. 1

            I don’t get the difference between ‘Publish/Subscribe’ and ‘Custom Events’ in the article. To me it just looks like slightly different syntax for the same thing. What am I missing?

            1. 1

              Just found good explanation in difference between dispatcher and pub-sub

              This is different from generic pub-sub systems in two ways: Callbacks are not subscribed to particular events. Every payload is dispatched to every registered callback. Callbacks can be deferred in whole or part until other callbacks have been executed.

              https://facebook.github.io/flux/docs/dispatcher.html

              1. 1

                The difference is, with Custom Events you are working with Document object and each event is attached to Document, so if you have thousands it may cause some performance. In Publish/Subscribe approach you are working with Object and it is easier to unsubscribe all in one place. Basically, both approaches are same.

              1. 2

                Looks good. I like it :)

                1. 1

                  What can you find here?

                  • Express, Cors
                  • React + Redux, ES6, async/await
                  • React Router
                  • Internationalization
                  • SASS
                  • PostCSS (autoprefixer), so you do not need -webkit, -moz or other prefixes
                  • Build script configuration Development, Staging, Production with CDN, cache-busting support
                  • Build script to bundle JS, CSS, with sourcemaps
                  • Unit tests Jest, Enzyme
                  • E2E Cypress tests
                  • ESLint
                  • Ghooks (pre-commit with unit tests and eslint validation)
                  • Code Coverage (https://codecov.io)
                  • Travis CI runs Unit and E2E tests and report to codecov
                  1. 3

                    Hey there, welcome to Lobsters!

                    Direct-linking of github repos can get a little tedious; I would rather see a short blog post talking about the project and why it’s useful, or what led to its creation.

                    1. 1

                      Hi Agree. Sorry for that, this is my second post so just try to understand how it works. Added description

                    1. 1

                      One unexpected challenge of CSV is the lack of explicit encoding. I think it’s common knowledge that CSV is often best avoided, but wanted to highlight this painful point.

                      1. 1

                        You are right. Do you know any alternatives?

                        1. 1

                          XML if you can?

                          1. 1

                            The most important reason why .csv is so popular is that you can edit info easy in Exel or import data in .csv. About XML I have not checked yet. Thanks for the point :)

                      1. 3

                        I find it to be super confusing because now instead of variables with limited scope you have a global variable that can refer to any interval you set. And once you start working with multiple instances it gets even more confusing you start to copy objects instead of just getting a new reference to a new interval. This leads to sort of unclear behaviour: what happens when you use the global variant and then create a copy with Object.assign?

                        Maybe I am just not getting what was wrong with the existing behaviour.

                        1. 1

                          New API has been added. No variables, clear interval anywhere you want, single, multiple instances :) So simple and easy. Check it out - https://github.com/shystruk/SetIntervalJS

                          1. 1

                            Yes, when you set an interval you can clear it from any place of your code (module) and it works only for one instance. Should find a way how to return a new instance for each import.

                            For multiple instances, Object.assign() helps you to make a copy and set another interval and do not touch a single one (original :)). And yes, for multiple instances you can not clear them anywhere, as you declare a variable.

                            Good points! Thanks!