• 开源镜像
  • 开源沙龙
  • 媛宝
  • 猿帅
  • 注册
  • 登录
  • 息壤开源生活方式平台
  • 加入我们

开源日报

  • 2018年10月15日:开源日报第221期

    15 10 月, 2018

    每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg


    今日推荐开源项目:《魔性的鹦鹉 parrot.live》传送门:GitHub链接

    推荐理由:为我们苦难的周一献上祝福!这个项目非常的……鹦鹉,你只需要一个命令,就能够在命令行界面上看到魔性的鹦鹉动图表情,如果你看到这个之后想要充实一下你的表情包什么的,你可以去看看项目下面写着的网站(传送门),这些鹦鹉动图绝对能让你的表情包库丰富起来。


    今日推荐英文原文:《A React job interview — recruiter perspective.》作者:Bartosz Szczeciński

    原文链接:https://medium.com/@baphemot/a-react-job-interview-recruiter-perspective-f1096f54dd16

    推荐理由:在采访中可能会问到的问题……不不不,这不是给你接受采访用的,这是给你作为面试官的时候用的,你该问什么样的问题来了解他人,这篇文章兴许能够给你在思考这个问题时带来一些新想法,即使你并不是在面试一个 React 开发人员

    A React job interview — recruiter perspective.

    Important
    This article is not a list of questions to expect on an interview and complete answers to them. The point of this post is to show what questions I ask, what I’m looking for in an answer and why there are no bad answers.
    If you want a list of “best react interview questions 2018” check out https://github.com/sudheerj/reactjs-interview-questions

    Part of my job is performing the so called “technical interviews” during which I evaluate potential candidates that are applying for a “Frontend Developer with React” position.

    If you’ve ever Googled “react interview questions” (or any other “[tech] interview questions”) you’ve probably seen countless results of “top 10 react interview questions” which are either outdated or rehash the same “what’s the difference between state and props” or “what’s virtual dom” questions.

    Knowing answers to those questions should not be the basis on which the interviewer decides to hire or not. That’s something a candidate needs to know, understand and implement in his daily work. If you’re a candidate being asked those questions either the person interviewing you has no tech background (a HR person or “linkedin headhunter”) or they see this as a formality.

    The interview should not be a waste of time. It should give you an idea about the candidate past experience, past knowledge and development opportunities. The candidate should learn about your organisation and project (if possible) and get feedback on his performance vs. your expectations. There should be no bad answers in a job interview (unless the questions is strictly technical) — an answer should give you an insight into the person thought process.

    The article is written from the perspective of the person conducting the interview!

    Let’s get to know each other

    In many cases the interview will be conducted via Skype or other voice (or voice+video) communication platform. Getting to know the potential hire is a good way to get them to open up.

    Can you tell me a bit about your previous job, how did you fit in the team? What were your responsibilities?

    Knowing what the person did at his previous work place (if he’s allowed to share) is a good way to start. This gives you some basic idea about the previous work experience: soft skills (“I was a sole developer on …”, “I, and my colleagues…”, “I managed a team of 6 developers …”) and hard skills (“… we created an application used by 1 mil people”, “… I helped optimize rendering time of the application”, “… created dozens automated tests”).

    What’s the main selling point of React to you. Why did you chose to go with React?

    I don’t expect you to mention JSX, VDOM etc. — we already get that from reading the “features” blurb on the homepage. Why did *you* start using React?

    Was it because of the “easy to learn, hard to master” API (which is quite small when you compare it to other solutions)? Good — say that, it means you’re willing to learn new things, and learn them as you go.

    Was it because of the “job opportunities”? Good — you’re a person that can adapt to the market and will have no issues moving on in 5 years when The Next Big Framework comes. We have enough of jQuery developers already.

    Think of this a bit like an “elevator pitch” scenario (you are in an elevator with your boss and need to convince him to use new technology before he gets out on his 20th floor). I wan’t to know you know what React has to offer that can benefit the client and you, the developer.

    Let’s start to get a bit more technical

    As I mentioned in one of the opening paragraphs — I’m not going to ask you what VDOM is. We know it, I will however ask you …

    What is JSX and how come we can write it in our JavaScript code — how do the browser recognize it?

    You know this — JSX is just a notation, that Facebook popularized, which — thanks to tools like Babel / TSC — allows us to write React.createElement calls in a form that’s a bit more pleasant to the eye.

    Why do I ask this question? I want to know if you understand the technical side of JSX and all the limitations that come from it: why do we need to import React from 'react' on the top of the file even if we don’t use React in our code; why can’t the component directly return multiple elements.

    Bonus question: why do the Component names in JSX start with capital letter?
    Answering that this is how React knows to render a Component, and not a HTML Element should be good enough.

    Bonus points: there are exceptions to that rule. E.g. assigning a component to this.component and then doing <this.component /> will work.

    What are the main 2 types of components you can declare in React, and when would you use one over another.

    Some people will think this is about presentation and container components, but this is more about React.Component and function components.

    A proper answer should mention life cycle methods and component state.

    Since we mentioned life cycle — can you walk me through the cycle of mounting a stateful component? What functions are called in what order? Where would you place a request for data from the API? Why?

    Ok, that’s a long one. Feel free to break it into two smaller ones. You’re now thinking “but you said you don’t ask about life cycle!”. I don’t, I don’t care about the life cycle. I care about the changes that happened in the life cycle in the very recent months.

    If the answer contains componentWillMount you can assume that the person has been either working with an older version of React exclusively, or has done some outdated tutorials. Both cases should rise some concerns. getDerivedStateFromProps is what you’re looking for.

    Bonus points: differences in the way the process goes on server-side is mentioned.

    Same goes for the question about data fetching — componentDidMount is the one you want to say/hear.

    Bonus question: why componentDidMount and not constructor?
    Two reasons you want to hear are: “the data will not be there before render happens” — although not the main reason, it shows you that the person understands the way components are handled; “with the new asynchronous rendering in React Fiber …” — someone has been doing his homework.

    We mentioned fetching data from an API — how would you go about making sure the data is not re-fetched when the component is re-mounted?

    We assume “cache invalidation” is not a thing. This one is not strictly React related, but if the answer is limited to React it’s also good — maybe he worked with GraphQL which does the heavy lifting for you?

    I ask this to see if the candidate understands the idea of not-coupling the UI and other layers in an application. An API that’s external to the React structure can be mentioned.

    Can you explain the idea of “lifting the state up”?

    Ok, I do ask some typical React questions. This one is crucial though, it will allow you to give the candidate some breathing room.

    Answers ranging from “it allows to pass data between siblings” to “it allows you to have more pure-presentational components, which make re-usability easier” are preferred. Redux might get mentioned here, though that could as well be a bad thing, because it signifies that the candidate just goes with whatever the community recommends without understanding why he needs it.

    Bonus question: how would you go about passing data across multiple levels of depth, without passing it from component to component?
    Context has become mainstream ever since React 16.3 — it was there before, but the documentation was lacking (on purpose). Being able to explain how context works (and at the same time showing knowledge of the function-as-child pattern) is a plus.

    If Redux / MobX gets a mention here, it’s also good.

    React ecosystem

    Developing React apps is part of the process — there’s a lot more to it: debugging, testing, documenting.

    How would you go about debugging an issue in React code; what tools have you used? How would you go about investigating why a component does not re-render?

    Everyone should be familiar with the basic tools like a linter (eslint, jslint) and debuggers (React Developer Tools).

    Using RDT to debug the issue by checking if the component state/props are properly set is a good answer, mentioning using the Developer Tools to setup breakpoints is also a good one.

    What testing tools have you used to write unit / E2E tests? What’s snapshot testing and what are the benefits of it?

    In most cases tests are a “necessary evil” but those are things we need. There are many good answers here: karma, mocha, jasmin, jest, cypres, selenium, enzyme, react-test-library etc. The worst thing is the candidate answers “we didn’t do unit tests at my previous company, only manual tests”.

    The snapshot testing part also depends on what you use in your project; if you don’t find it beneficial, don’t ask about it. But if you do, fast and easy regression tests for the UI layer (generated HTML + CSS).

    Small code challenges

    When possible, I also do small code challenges which should take no more than a minute or two to fix/explain, e.g.:

    /** * What is wrong with this example, and how would you go  
    * about fixing or improving the component? 
    */ 
    
    class App extends React.Component {  
      constructor(props) {
        super(props);
        this.state = {
          name: this.props.name || 'Anonymous'
        }
      }    
    
      render() {
        return (
          <p>Hello {this.state.name}</p>
        );  
      }
    }

    There are multiple ways to solve it: remove the state and use props, implement getDerivedStateFromProps or (preferably) change to a function components.

    /**
     * Can you explain the differences between all those ways
     * of passing function to a component?
     *
     * What happens when you click each of the buttons?
     */
    
    class App extends React.Component {
      
      constructor() {
        super(); 
        this.name = 'MyComponent';
        
        this.handleClick2 = this.handleClick1.bind(this);
      }
      
      handleClick1() {
        alert(this.name);
      }
      
      handleClick3 = () => alert(this.name);
    
    render() {
        return (
          <div>
            <button onClick={this.handleClick1()}>click 1</button>
            <button onClick={this.handleClick1}>click 2</button>
            <button onClick={this.handleClick2}>click 3</button>
            <button onClick={this.handleClick3}>click 4</button>
          </div>
        );
      }
    }

    This one takes a bit more, because there’s just more code. If the candidate answers correctly follow up with “why?”. Why will click 2 work the way it works?

    Not a React question, if someone starts with “because in React …” it means that they don’t really understand the JS event loop.

    /**
     * What's the issue with this component. Why?
     * How would you go about fixing it?
     */
    
    class App extends React.Component {
    
    state = { search: '' }
    
    handleChange = event => {
    
    /**
         * This is a simple implementation of a "debounce" function,
         * which will queue an expression to be called in 250ms and
         * cancel any pending queued expressions. This way we can 
         * delay the call 250ms after the user has stoped typing.
         */
        clearTimeout(this.timeout);
        this.timeout = setTimeout(() => {
          this.setState({
            search: event.target.value
          })
        }, 250);
      }
    
    render() {
        return (
          <div>
            <input type="text" onChange={this.handleChange} />
            {this.state.search ? <p>Search for: {this.state.search}</p> : null}
          </div>
        )
      }
    }

    OK, this one will need some explaining. There’s no error in the debounce function. The way the application is expected to work, is it will update the state 250 ms after the user has stooped typing, and then render the string “Search for: …”.

    The issue here is that the event is a SyntheticEvent in React, and if the interaction with it is delayed (e.g. via setTimeout) it will be cleared and the .target.value reference will no longer be valid.

    Bonus points: the candidate is able to explain why that is.

    We’re done with the tech questions.

    This should be enough to give you some idea about the technical skills of the candidate. You should still have some time left for more open-ended questions.

    What was the biggest problem you’ve faced on your past projects; what was your biggest achievement?

    This goes back to the very first question — the answer can vary from developer to developer and position to position. A junior developer will say his biggest problem was getting thrown in a complex process, but he was able to conquer it. Someone looking for a more senior position will explain how he optimized the app performance, and someone that can lead teams explain how he improved velocity by doing pair programming.

    If you had unlimited time budget and could fix / improve / change one thing in your last project, what would it be and why?

    And another open ended question, answer to which depends on what you’re looking for in the candidate. Will he try to replace Redux with MobX? Improve the testing setup? Write better documentation?

    Reversing the tables and feedback

    Now’s the time to change the roles. You probably have a solid idea about the candidate skills and potential to grow. Let him ask the questions — not only will it allow him to get to know the company and product more, the questions he ask might give you some indication about the direction he want’s to grow in.

    Carl Vitullo wrote some good articles on the topic of what questions to ask your potential employer, I’ll refer you to those — be ready to answer them, or say that you can’t on given step due to NDA requirements etc.:

    • onboarding and the workplace
    • development and emergencies
    • growth

    Give feedback

    If the candidate under-performed on some questions or got them wrong (or different than you would expect) — you might want to clarify those at this point. Don’t make it sound like you’re patronizing the person, just explain the problems you’ve noticed — offer solution and some resources he can use to improve himself.

    If the rest of the recruitment process is up to you, tell them you will get back o them in X days, if not, tell them that someone from your company will do that. If you know the process will take longer than 2–3 days, tell them that. IT is a big market at this point, and the candidate might have done multiple interviews — he might not wait for you to get back before accepting another offer.

    Do not ignore the candidate — that’s literally the main complaint people share on social media.

    The opinions expressed in this blog post are those of my own and do not reflect the opinions of any of my past or current employer, client or collaborator.


    每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg

  • 2018年10月14日:开源日报第220期

    14 10 月, 2018

    每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg


    今日推荐开源项目:《Something cool Zeu.js》传送门:GitHub链接

    推荐理由:一个有不少很酷的部件的 JS 库,兴许你可能对把这些部件组合起来变成一个下面那样的状态监控面板不感兴趣,而是可能只需要某些部件来装点个人网站,比如那个看上去很棒的数字时钟。它当然也考虑到了这种需求——每一个部件都提供了文档和示例代码,从而让每个人都可以各取所需。


    今日推荐英文原文:《8 Things I Learned Reading 50 Books A Year For 7 Years》作者:Kris Gage

    原文链接:https://medium.com/@krisgage/8-things-i-learned-reading-50-books-a-year-for-7-years-cb11c4acffb1

    推荐理由:作者经过了大量的阅读之后写下的阅读经验。读书本身不是一件坏事,但是如果只是读书而不展开行动,兴许可不是什么好事

    8 Things I Learned Reading 50 Books A Year For 7 Years

    I’ve read over 300 books since the beginning of 2011, not counting the many I started but didn’t finish and the endless content we all read online.

    I’ve read about topics ranging from Buddhism to business, philosophy to physics, and writers ranging from feminists to pick-up artists (and even Trump’s “Art of The Deal.”) I’ve read old books, new books, books with illustrations and fancy charts, a lot of books from which I got nothing and a handful of books I still love. 90% of this was non-fiction.

    Here’s what I’ve learned in all that reading time — and some of my favorite books from my 20’s.

    (1) Truly good books are few and far between — and so they’re priceless

    There are two camps of “good books” and both of them are rare.

    1. The first is good content. They deliver a message that stands on its own. The writing only needs to be good enough to allow you to follow.
    2. The second is good craft. It doesn’t matter as much what the content is because the writing is so goddamn beautiful it all but sings off the page.

    (Writing that offers both, it should be said, is the incredibly rare and precious gem indeed.)

    When it comes to choosing between them, as we must, I prefer the former over the latter. I’m not here to be romanced.

    (That being said, some of my favorite “good craft” writing is by way of essays and/or out of writers such as Barnes, Keegan, and Solnit.)

    Here’s one such excerpt. You obviously don’t have to read it.

    Rebecca Solnit, A Field Guide to Getting Lost

    Regardless of which direction you go, though, the truly good book is a thing to cherish.

    (2) Conversely: there’s a lot of garbage out there

    My least favorite books are what I call “bullshit business books” — the theoretical fluff written by people who have never directly done the thing.

    The authors have read about others doing the thing, they’re consultants on the thing, they’re academics of the thing. They’re professors, or “entrepreneurs” of nothing, or heads of “organizations,” and they make it their business to compile all the notes they’ve seen from other people’s actual businesses and pawn it off as “expertise,” like some armchair anthropologist reporting on “life in the Congo” because he visited once, so now he “knows.”

    In other words: most of the shit sold in airport book stores.

    I read a truly unfortunate number of these books before I got fed up enough to swear them off forever, like dumping that big-talk lover who promises you the moon but just leaves dirty laundry everywhere.

    (3) Reading easily becomes just another form of consumption — and procrastination

    And if you learn only one thing from this post, make it that.

    Sure, there are studies about how it makes our brain smarter. And how all the most successful people read voraciously.

    And then we get people who are only trying to be successful — and maybe even making a business out of talking about “success”— and they take up reading because they hear it’s clutch, and then regurgitate it on down the chain.

    It disappoints me that we perpetuate this nonsense.

    I’m not saying successful people don’t read — many of them do, I’m sure, and they might even chalk their success up this, in part. But reading isn’t the secret to success.

    I started and built my own business in late 2015. I had read dozens of books on marketing and entrepreneurship and customer segmentation and sales and product and design and everything else under the sun.

    But when it came to decision-making, the biggest impact was just doing it — my own experience. At some point, “research” is just a distraction from real tasks. And you’ll get a lot farther bumping along on your own without any books than you ever will reading and not actually doing anything else.

    Entrepreneur Gary Vaynerchuk wrote a fantastic piece on this, pointing out:

    “How many books from these ‘experts’ do you need to read before you can actually do something? You can only read so much and at some point, you just have to do. Stop being a student.”

    (4) If you’re reading for growth, read to get answers on specific questions

    From books for healing to engineering books to resolve a design question, books are an excellent resource for specific questions

    My favorite book last year was The Will To Change (hooks) because I was coming off a breakup. I may not have gotten as much out of it two years ago.

    Once you get enough of an answer to act on, stop reading and start doing. Otherwise it becomes, as one cofounder of two companies once put it, “an academic exercise.”

    (5) Listen to people who have actually, firsthand experienced the thing

    My favorite types of books are autobiographies and memoirs from people I admire — with top slots going to Zero to One (Thiel), Big Magic(Gilbert), Fashion is Spinach (Hawes), The Hard Thing About Hard Things(Horowitz), and Man’s Search for Meaning (Frankl), and honorable mentions going to all of the dozens of autobiographical pieces I’ve read (Vaynerchuk included.)

    I’ll take any autobiography over any biography. I want to get to know the person. I want their thought process. I’ll take a firsthand account with mediocre writing over flowery garbage that says nothing any day.

    Some of my favorite non-autobiographical pieces are still-solid firsthand thought pieces like Rework (and pretty much any thing else Fried and/or Hansson put out) and The Law of Success (Hill), the latter of which includes a chapter on leadership that is by far one of my favorite pieces on management philosophy.

    As an aside: the only few pieces I hold in the same tier as firsthand accounts are well-researched and rich books on the human mind, such as Flow: The Psychology of Optimal Experience (Csikszentmihalyi) and Blink (Gladwell).

    (6) Context and timing is king

    Maybe we’d eventually like a certain book, but we’re just “not ready for it,” or right now’s not the right time.

    A guy I dated once let me borrow his copy of Sartre’s Nausea but warned me “that might not be where you’re at right now.” He was right. I didn’t finish. Maybe someday it might offer something, but it didn’t then.

    This was also true of philosophy overall. When I first tried to wander in through its unlocked side door in my early 20’s, I felt like I’d walked into the middle of a heated debate with big words and no context — and philosophy isn’t a conversation where many are willing to pause to get you up to speed.

    But when I came back to philosophy a few years later, with very specific questions I wanted answers, I had a much more fruitful experience.

    (7) Confirmation bias, the risk of influence, and the fact that no writing can be totally objective

    Writers are people. Be careful what you read.

    No matter your viewpoints, you can find a writer who agrees. There are feminist writers, there are man-hating writers, and there are self-sabotaging writers who use big words like “strong women” while simultaneously cutting themselves down with the task of “winning a man.”

    You can find angry writers, sexist writers, delusional writers, depressed writers, writers from all walks of life. So if you’re looking for someone to make you feel validated, you can.

    That doesn’t make any opinion — yours included — right. And we have to remember this while reading, especially when we’re looking for “answers to questions” and already have an idea of what answer we want.

    Similarly, it might be tempting to forget that any single piece of work is only the viewpoint of a single person. It’s not everything — only their lived experience (or, at worst, what they’re trying to sell you regarding yours.)

    (8) All of this being said, reading is a personal journey

    One person’s bargain bin find is another person’s salvation.

    One of my dear friends became enraptured with Rupi Kaur’s Milk and Honey,and recommended it to me with that zeal with which we always throw beloved books at other people. I read through half a dozen pieces and, much to the disappointment I could see fill her previously-eager eyes, they just didn’t do anything for me.

    Some of it’s personality and values and individuality. Some of it’s just context, and where we’re at in our journey.

    Reading can be an enjoyable escape, if that’s what we want. It can also be intellectually rewarding — but only if approached in a way that supports, rather than distracts us from, our growth.

    My top recommendations

    Because this is always the first question people ask (even after I tell them that reading is personal and it depends on what you’re looking for, see above.)

    But overall, here:

    • For philosophy: Man’s Search for Meaning (Frankl), Fashion is Spinach (Hawes)
    • For psychology: Flow (Csikszentmihalyi), Blink (Gladwell), and Stumbling on Happiness (Gilbert)
    • For management: Napoleon Hill’s chapter on “Leadership” in Laws of Success, and Hard Thing About Hard Things (Horowitz)
    • For work: Big Magic (Gilbert), Rework (Fried, Hansson), Zero to One (Thiel)
    • For relationships: All About Love (hooks)
    • For something beautiful: A Field Guide to Getting Lost (Solnit)

    每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg

  • 2018年10月13日:开源日报第219期

    13 10 月, 2018

    每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg


    今日推荐开源项目:《美少女梦工厂以及更多 chinese-dos-games》传送门:GitHub链接

    推荐理由:这个周末,在浏览器上重拾你的回忆,重新体验三国演义,美少女梦工厂这些游戏,实际上已经有人肝了一整天的美少女梦工厂了……不过,我是说,这个画面看起来真的很古老了不是吗?


    今日推荐英文原文:《Top 10 Java Script Frameworks》作者:Lokesh Gupta

    原文链接:https://medium.com/@glokesh94/top-10-java-script-frameworks-e213efd7b54c

    推荐理由:介绍了一些好的 JS 框架,兴许说到这个大家可能都会想到 Angular Vue React 这三个,实际上除了它们之外,也有不少好的框架

    Top 10 Java Script Frameworks

    JavaScript (JS) frameworks are one of the most preferred platforms to build a dynamic modern application, real-time chat, eCommerce, inventory, processing and much more.

    Small or enterprise, front-end or backend — JS is well suited for everything. You might have heard about the following sites which are using JavaScript.

    AngularJS
    Angular.js is a popular open-source front-end development framework which is mainly used for developing dynamic single-page web applications (SPA).

    AngularJS transfers all the contents from the server to the browser along with loading all the web pages simultaneously. Once the contents are loaded, clicking on any link on the page does not reload the entire page content; instead, it simply updates the sections within the page.

    React
    React is a library used for developing UI applications. It was released in 2013 and has been a fastest growing JS framework in today’s world.

    React.js is most preferred when a high performing enterprise application needs to be delivered to its users. It is powered by user interfaces like that of Instagram and Facebook.

    9 Things for Beginner About ReactJS

    There has been a constant war between choosing Angular and React. React is more flexible when compared to Angular since developers will have to work with independent libraries with comparatively better response time. React is excellent when it comes to handling small and stateless functions that receive an input and return elements as their output. It focuses on JS ES6, and Flow can be used to enable type-checking in React.

    Every project in React has a different architecture along with limited guidance and hence, it is easy to go wrong. React is mainly used for the V (view) in the MVC model since the UI can be updated without having to reach out to the server and fetch a new view.

    Ember.js
    Ember is also an open-source framework that lets developers create a single page and large web applications. Ember has been a highly opinionated framework which was built to be very flexible.

    While Angular and React are flexible and less opinionated, Ember makes a lot of assumptions about the application and makes a developer confirm to its expectations.

    A complete development stack can be formed by using Ember and other important tools. Ember has a widget based approach called as Ember components. Handlebars layout and Ember’s backend architecture allows writing developers own application-specific HTML tag.

    Handlebars integrated templates update automatically when the underlying data changes along with significantly lesser coding. Websites like LinkedIn, Vine and Live make use of Ember. It is also used to build desktop and mobile applications.

    One of the most notable uses of Ember is in Apple Music, the desktop application. Ember has a powerful routing system when compared to React or Angular.

    In case of updates, Ember is ahead of many frameworks, with new features being frequently added.

    Vue.js
    Vue.js was released in 2014 and is the fastest growing framework adopted by developers. It is a lightweight progressive JS framework which gets a lot of its concepts from ReactJS and AngularJS.

    It has a template style similar to Angular and has component based props just like ReactJS. Vue provides an easy and fast fix for applications, UI, and an interactive web interface development. It can power advanced single page web applications.

    The most significant advantage of choosing Vue over React is that in Vue, the component’s dependencies are tracked automatically during its rendering. Thus, the system knows which component needs to be re-rendered when a state changes.

    This prevents extra work needed for optimization and lets the developer focus more on building the app.

    Backbone.js
    Backbone.js is a lightweight JavaScript library which was initially released in 2010and has been a flexible framework for structured code since then. It lets developers develop single page web applications and client-side applications that run in a web browser.

    It offers MVP network, which abstracts the data into models, Document Object Model (DOM) into views and binds these two using events.

    Unlike other frameworks, Backbone puts the developer in charge of choosing the right tool that works best for a given project. A templating engine of its own does not exist in Backbone.

    Companies like Sony Entertainment Network, Airbnb, and SoundCloud use Backbone.js for their projects. Companies and developers use Backbone due to its ability to use any code as its controller while keeping the controller optional.

    Mithril.js
    Mithril, a lesser known JS library is the modern JavaScript framework which is used for creating single-page applications on the client-side.

    It is tiny (less than 8KB gzip), fast, provides routing and XHR utilities. It supports all the browsers like IE9 without the requirement of any polyfills.

    Mithril is currently being used by companies like Nike and Fitbit and other open source platforms like Lichess. Mithril makes use of sophisticated and optimized virtual DOM algorithm to minimize the amount of DOM updates.

    It also creates vnode data structures that are compiled using JavaScript engines for data structure access performance.

    The reason why Mithril supports a rendering model which recreates the whole of virtual DOM tree is to provide a declarative API which makes it easier to manage UI complexity. Mithril is known to be pragmatic since it is straightforward to learn components, routing and XHR in less than 15 minutes to start building applications.

    Mithril has in-built modules for XHR and routing while React needs third parties for the same along with a lot of memory usage. Also, the library load time and update performance of Mithril is fast when compared to React or Angular or even Vue! Vue.js’ size, also being small and compact, is still larger than Mithril. Unlike Vue, Mithril has lesser concepts and organizes apps regarding data layers and components.

    Polymer.js
    Polymer is yet another open-source JavaScript library for building web applications using Web components. This library is developed by Google developers and has contributors on GitHub. Unlike any other JavaScript framework, Polymer is built to leverage the features that are present in the web platform to let developers build components. It was the very first library to allow interactive building applications by composing components.

    Polymer is used by a lot of Google services and websites. It is being used by YouTube, Google Play Music and Netflix, to name a few. The polymer has started to gain recognition in the market with a lot of attention given to its structured design process. Since components are the biggest strengths of Polymer, it has better support for web components and has better offline modules when compared to React.

    The power of React and Polymer can be used to have a more component-oriented future for web development. Polymer ‘s components and Angular’s directives show some kind of similarity but have a different approach to create custom HTML elements.

    Node.js
    Node.js is one of the most downloaded, an open source, a cross-platform runtime environment for executing JavaScript code outside of a browser. It is used for building back-end services or APIs and developing server-side and networking applications. It is a platform which is built on Google Chrome’s JavaScript Engine (V8 Engine).

    The applications built on Node, are written in JavaScript which can be run within the Node.js runtime on OS like Microsoft Windows, Linux as well as MacOS. Check out some of the best Node.JS managed hosting platforms too.

    Meteor.js
    MeteorJS is an open-source, full-stack and free JavaScript framework which is written using Node.js. It allows rapid prototyping and creates cross-platform codes. It is fast in developing smaller and reactive applications on the Node.js platform. Meteor uses a front-end JavaScript that runs on the browser and back-end on meteor server within Node.js.

    Meteor integrates with other JavaScript frameworks such as React, Express and Angular. It also integrates with MongoDB and Cordova technology to build hybrid applications using HTML, CSS, and JS which run on WebView.

    With Meteor, applications for any device can be developed with a lesser amount of coding in just one language that is JavaScript. This is the kind of UI most of the companies are looking for. Companies like Mazda, Honeywell, and Qualcomm use Meteor. It uses data on the wire which means that the server sends data and not the HTML while client renders it.

    Aurelia
    Aurelia is a collection of open source modern JavaScript modules and is called as the “next-gen UI framework” written in ECMAScript. Sponsored by Blue Spire, it serves as a robust platform for building browser, desktop, and various mobile applications. Aurelia has been gaining a lot of recognition ever since its launch. Companies like Freska, Ordami and BTEK Software make use of Aurelia in their projects.

    Not to forget, Aurelia is the only framework that lets developers build components with plain, Vanilla TypeScript or JavaScript. Aurelia has been said to have overtaken Angular regarding modularity.

    Since Angular has all of its components bundled into one large pack, it becomes difficult to remove or change components in this architecture. Aurelia, on the other hand, consists of a vast collection of libraries that work together using well-defined interfaces so that it turns out to be completely modular.


    每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg

  • 2018年10月12日:开源日报第218期

    12 10 月, 2018

    每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg


    今日推荐开源项目:《Java 指南 JavaGuide》传送门:GitHub链接

    推荐理由:Java 的学习指南,包括基本成为惯例的数据结构与算法,走到哪里都通用的 MySQL 和 Linux 的知识,还有面试必备的知识点面试题以及……写简历的方法,学习一下如何写简历总不会错的,不是吗?


    今日推荐英文原文:《How to Decide What to Do With Your Life》作者:Ayodeji Awosika

    原文链接:https://medium.com/swlh/how-to-decide-what-to-do-with-your-life-59198b8d4a86

    推荐理由:这篇文章将会告诉你如何选择你接下来的道路,虽然这很重要,但是我个人认为,这篇文章中提到的更重要的一点可能就是:这并不是一个太需要思考的问题,比起思考这些,花时间脚踏实地的继续前进而不是幻想将会有意义得多

    How to Decide What to Do With Your Life

    Existential crises are the soup du jour.

    With the rise of personal development and a generation of people who want more meaning from life, topics like passion and purpose permeate our thinking. The question burns in your mind — you want to figure out what to do with your life.

    You have tons of options — maybe even too many.

    You want to make a decision, but you don’t want to make the wrong one because, if you do, you’ll feel like you’ve wasted a bunch of time.

    Paradoxically, continuing to think about what to do with your life without, you know, actually doing anything, wastes time too.

    It’s an enigma wrapped in a catch 22 stuck between a rock and a hard place.

    No wonder we’re so stressed out all the time.

    I’ve been fortunate enough to more or less figure out what I want to do with my life at least for the near future. Here’s everything I know about finding your path.

    Be Grateful You Have the Option in the First Place

    When you’re trying to figure out what to do with your life, consider the fact that humans didn’t always have a choice about their circumstances.

    If you grew up on a farm in the 18th century, you were going to be a farmer. If your father was a blacksmith, you were to apprentice under him and become one yourself.

    Even when we fast forward to more recent times, we still didn’t have as many opportunities as we do now. A few generations ago, you were likely working at some sort of industrial plant if you were a man and stayed at home if you were a woman. Moving into the corporatist era, you got one job, worked there for forty years, and got your gold watch with your pension.

    Now, things are totally different. People switch careers like clothes.

    Naval Ravikant put it best when he said:

    The Internet has massively broadened the possible space of careers. Most people haven’t figured this out yet.

    Before you dive into trying to figure out what to do with your life, pause and sit back in awe at the sheer opportunity in front of you.

    There’s no need for so much angst in the times we live in, yet there seems to be. Why?

    I might have an explanation.

    “man on front of vending machines at nighttime” by Victoriano Izquierdo on Unsplash

    Stop Doing This to Yourself

    What’s your purpose in life?

    What’s your passion?

    These questions send cortisol grenades throughout your body when you think about them for too long. It’s good that people are trending towards wanting more meaning in their life, but we put ourselves under way too much pressure to find our one-true-life-defining-cure-all-magical-fairy-tail-purpose-in-life.

    On top of that, the idea of “searching” for your passion or purpose seems like progress. It isn’t. The more time you spend thinking and pondering instead of doing, the further away you move from your passion.

    People often take this as “don’t think about your future at all,” but it really means stop overthinking things so much.

    That’s the double-edged sword of self-help. It’s useful to think about things like passion and purpose to give you the swift kick in the rear you need to develop them. But this thinking quickly turns into “mental masturbation.” You’re more focused on your fantasies than you are of doing the work because…the work is hard.

    It’s easy to think about a new path you want to take in your life. It’s hard to put one foot forward, then the second, and repeat it for however long it takes.

    You can’t really decide what to do with your life prior to acting. You’re making an educated guess first. The action crystallizes the vision.

    The Formula for Figuring Our What to Do With Your Life

    “Following your genuine intellectual curiosity is a better foundation for a career than following whatever is making money right now.”

    Don’t overthink the process.

    The beginning steps to figuring out what to do with your life are simple.

    Follow your curiosity and find out what you’re good at.

    For a detailed step by step process for finding your strengths, read this guide.

    Or this book.

    Or this book.

    A few highlights:

    • What did you enjoy doing when you were 14 years old?
    • Take personality tests — they are scientifically useless, but they’re a good guide to start
    • Cross-reference your strengths and personality with careers and paths

    I found my passion for writing almost five years ago, but I didn’t realize it the first time I wrote a blog post. No. I wrote one post and enjoyed that. Then a second, third, fourth, etc.

    I realized around post 100 or so that I really found it. Doing the work, experiencing the up and downs, and still wanting to move forward after the downs helped me realize it was meant to be.

    “Your first 100 blog posts will mostly suck.

    Your first 100 podcasts will mostly suck too.

    Your first 100 talks will not be perfect.

    Your first 100 videos will be nightmares.” — Cammi Pham

    The recipe here — gauge your interest in something and do it poorly for a while.

    Sucking at something doesn’t feel good. Uncertainty doesn’t feel good. Mentally, we want guarantees, certainty, safety, a sense of ease.

    We don’t want to give it everything we have a fail because there’s nowhere to go from that point — it’s scary as hell.

    I wish I had the answer to make you feel better about all of that but I don’t.

    You will have to suck it up.

    Find What You Love and Let it Kill You

    The tone of this post isn’t super positive, is it?

    I love what I do, a lot. But it’s far from easy.

    If there’s one thing to take away from this piece it’s this — most of the good things in your life will come from discomfort.

    “silhouette on man on mountain” by Guillaume Briard on Unsplash

    I haven’t even spent much of this time answering the question “what should I do with my life?” because that’s the least important part of the equation.

    I could read your mind, scan through your life’s database, and create a custom-tailored plan for you to follow, but it still wouldn’t matter if you weren’t willing to be uncomfortable.

    You, more or less, know what do to with your life. You’re just not doing it because you’re scared.

    Here’s the thing, though. If you find something you love, you have to be open to pain.

    That’s what love is.

    When you get married, you’re essentially giving your heart to someone else and trusting they won’t break it. We all know this deal doesn’t always work out, yet we take it anyway because the positive outweighs the negative.

    It’s the same when it comes to a real life path or a real vocation.

    Settling for any old career or life is equivalent to dating someone you know you’ll never marry. It feels okay, but you’re missing out on a feeling that’s orders of magnitude better.

    If finding this true love is so important, why do we often choose the opposite?

    “man pointing at white paper using pen” by rawpixel on Unsplash

    Escape Society’s Box

    “Understand this: The world wants to assign you a role in life. And once you accept that role you are doomed.” — Robert Greene

    I don’t personally care what you do with your life. I only care about how you come to that decision.

    Choose what you want to do, don’t let someone else choose it for you. If you’re obsessed with numbers and you genuinely want to be an accountant, be an accountant. Don’t be one because you think it’s what you’re supposed to do.

    I ran into a friend the other day. He asked me how things were going. I told him they were great. I asked him about his life, specifically his work.

    “I hate it.”

    “Why are you doing it, then?”

    He shrugged his shoulders. Most of us aren’t in dire straits. We’re living a metaphorical shoulder shrug.

    Before you have any type of passion in life, you’ll have to unlearn all the rules about life, careers, success, status, and all the other societal lessons that were forced on you.

    That’s one of the biggest problems — the “live a meaningful life” narrative is incongruent with the “fit into society’s box” one.

    If society had its way, you’d continue to do things you hate to buy things you don’t want to impress people you don’t like. People get caught in this situation all the time.

    You want to write books, but you’re already a software engineer. Or, you’re 18 years old, you want to write books but you’re dead broke and your parents told you to go to school to become a software engineer.

    Careers and money are both important and unimportant. Important in that you need them to survive. Unimportant in that the typical reasons we chase both involve useless status that doesn’t matter in the grand scheme of life.

    Now that we’ve unraveled some mental layers, let’s talk about the most important aspect of figuring out what to do with your life.

    You’ll Never “Figure Out” What to do With Your Life

    Your life isn’t a multiple choice test. It’s essay format. It’s open book.

    You’re allowed to change your mind. You should change your mind.

    If you have the same goals, tastes, and desires fives years from now, it could be a sign of stagnation.

    Right now I write. I’m also interested in technology, investing, marketing, and a bunch of other interests that weave into what I’m currently doing. I work on my craft, read, learn about the latest trends in the world, and keep my eye out for new opportunities.

    Your problem isn’t figuring out what to do with your life. It’s a lack of action.

    If you’re curious about wanting to write, then start writing — physically place your fingers on a keyboard repeatedly.

    Want to start a non-profit? Go volunteer.

    Want to code? Take a class or boot camp.

    Jim Rohn had a saying along the lines of “I’d rather try something than think about it because even if I’m wrong…I’ll find out faster.”

    I don’t have the magic recipe to get you to act. I try. I write these posts, respond to emails, have conversations. But ultimately, you’re in the driver’s seat here.

    Someone just replied to an email I wrote three months ago telling me they wrote their first blog post.

    That. That kind of action right there is the whole key to “figuring out what to do with your life.”


    每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,欢迎关注开源日报。交流QQ群:202790710;微博:https://weibo.com/openingsource;电报群 https://t.me/OpeningSourceOrg

←上一页
1 … 204 205 206 207 208 … 262
下一页→

Proudly powered by WordPress