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

开源日报

  • 开源日报第706期:《家庭助理 home-assistant》

    4 3 月, 2020
    开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
    今日推荐开源项目:《家庭助理 home-assistant》
    今日推荐英文原文:《Oh Wait, Let Me Take a Screenshot of That》

    今日推荐开源项目:《家庭助理 home-assistant》传送门:GitHub链接
    推荐理由:Home-assistant 是一款开源的家庭智能助手,将本地控制和用户隐私放在首位。该项目由世界各地的爱好者提供支持,非常适合在本地服务器上运行。
    今日推荐英文原文:《Oh Wait, Let Me Take a Screenshot of That》 作者:Lasse Kallesøe
    原文链接:https://medium.com/better-programming/oh-wait-let-me-screenshot-that-d2b5deaf4502
    推荐理由:本文是一项关于如何改进ios的调查,关于人们频繁使用的屏幕截图和快照,为了不让我们当时留下的的截屏最后躺在相册里吃灰。

    Oh Wait, Let Me Take a Screenshot of That

    A UX designer’s investigation into how we remind ourselves — and how we might improve iOS

    (Photo by Dayne Topkin on Unsplash)

    Context

    Have you ever tried capturing a screenshot or a photo of something you wanted to be reminded of in the future? Capturing screenshots or photos as self-addressed reminders is a habit most people are familiar with.

    Almost everyone has tried capturing a screenshot or a photo to remind themselves of a book to buy, an inspirational quote, travel plans, something to be shared with a friend, or something else we want to act on at a later point in time.

    This event-based reminder has no exact time of when we want to act. We just know that this is interesting and that we want to act on it at a later point in time.

    To define the scope, we asked ourselves the questions:
    • “How are photos and screenshots that serve as self-addressed reminders captured and organized?”
    • “Are the reminders acted upon, and in that case, how long does it take before acting?”

    Methodology

    In this mini-research project, we have so far only focused on the research part and to come up with design suggestions on how Apple might improve their user experience on iOS, based on the findings from investigating this phenomenon.

    The design suggestions have therefore not been tested with any users yet. Therefore, part of the reason for posting this article is also to get the ideas out there and test assumptions with users.

    Because the phenomenon is definitely happening, so there is a huge chance that you might be a user. Therefore, a response would be highly appreciated for further investigation.

    The suggestions in this article only come from asking ourselves the question: “How might we improve the user experience on iOS, based on the findings from our research?”

    We used contextual inquiry to interview 14 participants who all were asked to go through the last ten pictures they captured and answer some questions about each picture.

    The study contains answers from around 120 pictures, which all serve as self-addressed reminders. In the interviews, we asked the participants questions about what they were storing, where they were, if they organized the pictures in any specific way and if they acted on the reminder.

    To figure out what the participants were storing, thematic analysis was used to firstly code all the pictures into themes and secondly, code the themes into concepts, to draw the meaning of what it is people are storing.

    The next was to answer our research question where we visualized the answers from our participants to get a better overview of the results.

    Results

    It was significant that this phenomenon is going on right now. All participants were storing screenshots and photos as self-addressed reminders, but the objectives of the pictures were different.

    The most significant concepts stored were inspiration, share, and purchase.
    (This model shows the count of different concepts that were stored as self-addressed reminders)
    There were some similarities between the participants. Participant 1 and 7 were the most similar as they both mostly stored pictures of things to purchase and inspirational stuff such as quotes and memes.

    (This model shows the count of different concepts the participants were storing as self-addressed reminders)
    Another question answered was where they were when they were storing the different concepts. Around 50% of the concepts were stored at home, which shows that this is something that is done both at home or when the participants were on the move.
    (This model shows where the participants were when the reminder was captured.)
    The last question we got answered was if the participants acted on the reminder. 57 out of 110 did not act and 53 out of 110 did act. This shows that more than half of the reminders that were being captured were not being acted upon.
    (This model shows how long time it took the participants to act on their reminders)

    Defining the Design Challenge

    The results were showing that the participants did not act on most of their reminders and that they were likely to be on the move or busy with something else while capturing the reminder.

    So, we came up with the problem definition:

    How might iOS facilitate the user in the capture and re-finding phase to increase the percentage of reminders being acted upon?

    Design suggestions — How might we (HMW)?

    To visualize the challenge, we created a simple hypothetic user journey.
    (Simple hypothetic user journey created on journeytool.io)
    Afterwards, we split the challenge into more manageable chunks and came up with some HMW questions for each touchpoint of our hypothetic user journey.

    The first HMW question was: “How might we improve the capture phase when capturing a photo through the camera app so iOS opens edit mode, like when capturing a screenshot?”

    On the screenshot side, iOS already knows that it is a screenshot that is being captured, so it is categorized and the edit mode opens after capturing.

    On the camera side, we came to a possible solution being a “reminder” mode that the user can switch to in the camera app. See the design suggestion below.
    (Suggestion: Capture (Left: Screenshot, Right: Photo))
    The next HMW question we asked was: “How might the user be able to set a reminder when entering edit mode?”

    The possible solution we came to was to implement a reminder button in edit mode, so the user is able to set a reminder. See the design suggestion below.
    (Suggestion: Set reminder (Left: Screenshot, Right: Photo)) The next HMW we asked was: “How might the user quickly set a notification and categorize a reminder to make it easier to re-find a screenshot or photo at a later point in time?”

    Here, a possible solution could be to show a pop-up that allows the user to organize the reminder with color and three simple choices of when to receive a reminder notification. See the design suggestion below.
    (Suggestion: Set notification and organize (Left: Screenshot, Right: Photo))
    The next HMW question asked was: “How might the user be able to re-find a reminder at a later point in time?”

    The possible solution we came up with was to make another folder in the album where the user is able to sort reminders by colour. See design suggestion below.
    (Suggestion: Re-finding reminders (Left: Album overview, Right: Reminders album))

    Acknowledgement

    A huge thanks to Aalborg University Copenhagen and Toine Bogers for supervision on this project. Also credits for collaboration on the project to Victor Graffmann.

    Future Work

    If you have any ideas, thoughts, suggestions, etc., it would be highly appreciated if you write a response to the article below. This will help us in further investigation. Thanks!


    下载开源日报APP:https://opensourcedaily.org/2579/
    加入我们:https://opensourcedaily.org/about/join/
    关注我们:https://opensourcedaily.org/about/love/
  • 开源日报第705期:《这道题在第五层 fucking-algorithm》

    3 3 月, 2020
    开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
    今日推荐开源项目:《这道题在第五层 fucking-algorithm》
    今日推荐英文原文:《Developers Should Play Video Games》

    今日推荐开源项目:《这道题在第五层 fucking-algorithm》传送门:GitHub链接
    推荐理由:算法题目千变万化,但是其背后的思想却是万变不离其宗,只要掌握解法思想,不管是往水坑里下雨下雪还是下冰雹的题目都能轻松应对。这个项目对 LeetCode 上的算法题目进行分析,介绍算法背后的解法思想,推荐正在钻研算法的同学一读,如果同样方式的题目解了很多次但是依然对其中奥妙不甚理解的话,这个项目没准能够为你答疑解惑。
    今日推荐英文原文:《Developers Should Play Video Games》作者:Anupam Chugh
    原文链接:https://medium.com/better-programming/developers-should-play-video-games-ec011df94e3e
    推荐理由:游戏虽好,可不要过度哦

    Developers Should Play Video Games

    Video games are often thought of as time-wasters but they can benefit developers in many ways

    Video games are often thought of as a source of entertainment that provides no good value. Perhaps that’s how society sees it. Of course, playing games the whole day isn’t good for anyone.

    But there’s a good side to it too which is often ignored. Specifically, for developers, video games can be a boon sometimes.

    Developers tend to have rigorous working schedules and are under the pump, most of the time. Video games, in such cases, help in improving mental fitness. It’s like a workout session for the brain.

    Let’s discuss a few perks that video games offer to a developer. Skills that you can translate to your work.

    It Sharpens Your Thinking Skills

    Programming and video games have a lot of commonalities. For example, both require following a predefined set of rules to arrive at the solution.

    Video games often force us into thinking our way around an obstacle. They do that a countless number of times. This boosts our lateral thinking which is often useful when finding new ideas to solve a complex algorithm or squashing a bug that isn’t really straightforward.

    Another important aspect of thinking that video games help us to get better at is critical thinking.

    Critical thinking requires you to make rational and logical decisions based on the facts presented to you.

    While practicing code is the most obvious way of strengthening this skill, video games that are designed in the form of levels (that are interconnected) often encourage you to apply your critical thinking skills.

    It Improves Focus and Multi-Tasking

    Programming is a mentally stimulating job. It requires a high degree of concentration. Certain video games, especially action ones like counter-strike, help achieve this as they require a good amount of attentiveness.

    Having good attention skills goes a long way in improving a developer’s productivity and performance at work.

    Playing a video game for an hour can help in boosting your brain activity and improving focus.

    Every developer has to deal with multitasking at some point. Video games ensure that you’re prepared to handle more than one task anytime. Be it a list of key combinations and objectives to keep in mind or fighting multiple enemies— multi-tasking is tested in almost all video games.

    It’s a Good Stress Buster and Promotes Thinking Out Loud

    Software development is a mentally taxing job. Often, it requires you to work in a high-pressure environment. The immersive and engaging experience of video games lets you take a breather by escaping into a different reality.

    The mental health benefits of video games extend deeper than people may realize. They’re intrinsically motivating and designed in a way to challenge you with each passing level which gives a sense of achievement. Regular playtime is good for restoring yourself and reduces workplace stress.

    Research proves how certain games make it easier to deal with stress, depression, and other mental health issues.

    Besides, playing games promote thinking aloud. Thinking out loud is not only good for stress relief but also helps in finding clarity in one’s own thoughts.

    Gamers tend to think aloud, especially when they’re stuck in a mission. Today, a lot of technical interviewers encourage the candidates to do the same. It helps in evaluating the thought process and removes any scope of misinterpretation.

    Video games are a good place to practice thinking out loud, especially if it doesn’t come naturally to you.

    It Fosters Team Building and Productivity

    A product is the reflection of the team working on it. Every company aims to have efficient teams and a positive working atmosphere. To achieve that, they invest a lot in team-building activities (sports, weekly outings, and more).

    While that’s all great, collaborative video games are scientifically proven to boost team productivity and morale at the office.

    It creates trust and gets the co-workers talking among themselves which can work wonders for newly formed teams.

    Multiplayer games also require you to assume different roles and responsibilities at different times which helps you get better in coordination, leadership, and other team-based skills. Besides, it keeps the competitiveness spirit in you alive.

    Offices today are happy to invest in dedicated gaming areas for socialization and relaxation purposes. It’s a good place for brainstorming new ideas or inadvertently solving a problem.

    Closing Thoughts

    Video games are helpful to developers in other ways as well. They enhance our logical thinking, planning, and decision-making skills whilst also teaching us a thing or two about patience and perseverance.

    While there are a lot of benefits to video games, indulging in it for long hours is considered harmful. It doesn’t really enhance your programming skills. Or teach you how to code.

    Besides, it’s important to note that not being a gamer is no disadvantage by any means. There is no one-size-fits-all rule in software development and playing video games certainly does not determine the fate of a developer.

    I hope the above benefits of video games will encourage you to try it out sometime and analyze its impact on your productivity at work. And again, if you’re not into games, it’s completely OK.

    That’s it for this one — thanks for reading.
    下载开源日报APP:https://opensourcedaily.org/2579/
    加入我们:https://opensourcedaily.org/about/join/
    关注我们:https://opensourcedaily.org/about/love/
  • 开源日报第704期:《电商系统: mall》

    2 3 月, 2020
    开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
    今日推荐开源项目:《电商系统: mall》
    今日推荐英文原文:《The Top 10 Open Source Tools of 2019》

    今日推荐开源项目:《电商系统: mall》传送门:GitHub链接
    推荐理由:mall项目是一套电商系统,包括前台商城系统及后台管理系统,基于SpringBoot+MyBatis实现,采用Docker容器化部署。 前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务、帮助中心等模块。 后台管理系统包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、设置等模块。
    今日推荐英文原文:《The Top 10 Open Source Tools of 2019》作者:The Top 10 Open Source Tools of 2019
    原文链接:https://opensourceforu.com/2020/02/the-top-10-open-source-tools-of-2019/
    推荐理由:本文提供了2019年十大开源工具的现成参考资料,并对每个工具进行了简要的介绍。对于新手来说,了解更多关于最好的开源工具是一个好方法去提升自己的眼界。

    The Top 10 Open Source Tools of 2019

    This article presents a ready reference of the top ten open source tools of 2019, with a small write up on each of these. This list will be of help to newbies in the software industry.

    For tech newbies, it is always a good idea to learn more about the best open source tools. So let’s go through a list of open source tools that were the most popular over the past year.

    NetBeans

    NetBeans is free-to-use software for developing different kinds of mobile and desktop applications. It can also be used to develop software through popular programming languages, like HTML5, JavaScript, Java, C/C++ and more.

    Developers can use NetBeans for accurate project management and competent coding. This means that you can stay on top of your game and write defect-free code. NetBeans is managed by the Apache Software Foundation.

    Pencil

    Prototyping is a key part of any project. Pencil is a GUI based open source prototyping tool that lets you handle prototyping efficiently. It is available on all platforms, including Windows, Linux and Mac.

    Pencil is a desktop tool, which means you need to download it to use it. Its key features include easy GUI prototyping, built-in shape collections, diagram-drawing support, output format exporting, inter-page linking, and clip art.

    Atom

    Atom is a free, open source text plus source code editor for MacOS, Linux and Microsoft Windows. It has built-in support for plugins, Node.js and embedded Git Control, and has been developed by GitHub. Atom is a desktop application built using Web technologies. Most of the extended packages have free software licences, which are community-built and maintained. Atom is based on Electron (formerly known as Atom Shell), a framework that enables cross-platform desktop applications using Chromium and Node.js. It is written in CoffeeScript (a programming language that compiles to JavaScript) and Less. It is fully customisable within HTML, CSS and JavaScript.

    Linx

    Low code development is gradually gaining popularity. Linx is one of those popular tools that lets you do just that!

    Through Linx, you can automate workflows and tasks, as well as build back-ends for mobile apps and APIs. It is an ideal tool for quick development and design, and can also improve the custom business process.

    Linx offers an easy-to-use IDE and server that also come with a vast collection of built-in plugins. It enables one-click deployment, live debugging and automated processes using different methods.

    Manta

    Developers find client invoicing one of the most challenging parts of their job. Manta is an elastic invoice desktop app that simplifies invoicing for developers. It comes loaded with customisable templates and makes it easy to send and control clients’ invoices.

    KompoZer

    KompoZer is a WYSIWYG HTML editor. It uses the Mozilla Composer codebase. With it, you can do easy Web authoring. Its rich set of features includes a file management system, a WYSIWYG editor and an easy-to-use interface. It works on all major operating systems including Windows, Linux and OS X.

    Cypress

    Cypress is a Web testing tool that lets you test anything that runs on a browser. It can be installed on Linux, Mac and Windows, and focuses on end-to-end testing. But Cypress tests can be written only in JavaScript.

    With Cypress, you can write, run and debug tests. The tool is designed for QA engineers and developers who love to work with Web technologies. It lets you write reliable tests. Moreover, you can run all types of tests, including unit, integration and end-to-end tests.

    Hyper 2.0

    This is a cross-platform terminal that uses JavaScript, HTML and CSS. The application is built on top of Electron to create cross-platform desktop apps. It powers apps like Visual Studio Code, Atom and GitHub Desktop. Under the hood, Hyper uses React and Redux in the UI layer.

    BRL-CAD

    BRL-CAD is a free and open source cross-platform modelling system that includes interactive geometry editing, a system performance analysis benchmark suite, geometry libraries for application developers, and high-performance ray-tracing for rendering and geometric analysis.

    Godot Engine

    Godot Engine is a free and open source game engine that lets developers get creative with their games without reinventing the wheel, and without any strings attached, i.e., no royalties.

    It is team-friendly, and ships with a wide set of common tools to speed up game development. It features sleek 2D and 3D graphics, and is simple to use. With Godot Engine, the games you build are 100 per cent yours.


    下载开源日报APP:https://opensourcedaily.org/2579/
    加入我们:https://opensourcedaily.org/about/join/
    关注我们:https://opensourcedaily.org/about/love/
  • 开源日报第703期:《人工智能 Google AI Research》

    1 3 月, 2020
    开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
    今日推荐开源项目:《人工智能 Google AI Research》
    今日推荐英文原文:《Google Hash Code 2020: How we Took 98.5% of the Best Score》

    今日推荐开源项目:《人工智能 Google AI Research》传送门:GitHub链接
    推荐理由:该项目包含Google AI Research发布的代码。Google AI 致力于推动该领域的最新发展,将AI应用于产品和新领域,并开发工具以确保每个人都可以使用AI。附上Google AI 的官方网站:https://ai.google/research
    今日推荐英文原文:《Google Hash Code 2020: How we Took 98.5% of the Best Score》作者:Yelysei Lukin
    原文链接:https://medium.com/better-programming/google-hash-code-2020-how-we-took-98-5-of-the-best-score-e5b6fa4abc1b
    推荐理由:前不久 Google Hash Code 的线上资格赛开赛,本文记录了一个乌克兰团队的解题经历。

    Google Hash Code 2020: How we Took 98.5% of the Best Score

    How we came in 53rd in Ukraine and 530th in the world

    (Photo by Mitchell Luo on Unsplash)
    Since we didn’t get a chance to participate in this year’s Google Hash Code, we decided to try our best in the extended round. Here’s the result: 530th in the world ranking and 53rd in Ukraine.

    What is Google Hash Code?

    Google has been organizing a competition for programmers since 2016 called Hash Code. Teams of two to four people can participate in the competition, where they have to solve an optimization problem. Every year it attracts thousands of people from all over the world.

    It has two rounds: main and extended. The main round continues only for four hours, while the extended one can go on for up to two weeks. Of course, the extended round does not count on the scoreboard, but it’s still a good chance to check your knowledge and skills.

    As we mentioned, we didn’t have a chance to participate in the main round, but maybe our solution will be interesting for you. Or perhaps it will push you to try to implement your own solution.

    This Year’s Task Description

    This year the participants were given the problem of scanning books from different libraries.

    You have to choose books with the biggest score, from libraries which first have to sign up. This must be done within the given deadline. The same books can be available in more than one library, but you can get a score for each book only once. Furthermore, each library can provide different numbers of books per day.

    This is the initial data that we have:
    • Only one library can be signing up at one moment.
    • Only a signed up library can provide you with books for scanning.
    • You have a total deadline.
    • Your goal is to get the highest possible score of all provided books.

    It may sound a little complicated, at least in our words! Hopefully, this image will help you to get to the bottom of the situation:
    If you haven’t solved this issue yet, we suggest you postpone reading the rest of this piece and try to do it on your own first.

    Our Solution

    Analyzing the task description, we came to the conclusion that there’s basically only one issue that we needed to solve: Each time the sign-up process is empty, we have to find the most suitable library that we will pass to sign up.

    In order to find this library we decided to evaluate them by the following criteria: two positive — the score of library books and the number of books we can scan per day; and one negative — how many days are required to sign up for a library.

    The first algorithm that we stopped at is pretty straightforward. It basically calculates how much score the library will produce if we start the sign up at this moment.

    • Сalculate how many days will remain after the sign up is finished.
    • Multiply by the number of books scanned per day.
    • Sort books by their score and get top books.
    • The cumulative score of scanned books is the library value.
    After that, we just select the library with the highest value. If there’s more than one library with the max value, we select the one with the lowest sign-up duration.

    Here are the results:
    This solution was pretty good but still far from perfect. So we kept trying.

    After further brainstorming, we figured out that the negative criterion (days count to sign up a library) is not represented properly in our equation.

    Among many ways to introduce this criterion in our formula (define some coefficients for criteria, etc.), we selected the following one — divide the calculated value by the number of days to sign up. This way we get the ratio between the good input and the bad one.

    The results that we received were pretty astonishing and they turned out to be just 1.5% less than the best results at that moment.

    Here’s our source code (do not judge us, we did it in a hurry!):

    const fs = require('fs');
    
    const files = {
      a: {
        input: 'tasks/a_example.txt',
        output: 'results/a_result.txt',
      },
      b: {
        input: 'tasks/b_read_on.txt',
        output: 'results/b_result.txt',
      },
      c: {
        input: 'tasks/c_incunabula.txt',
        output: 'results/c_result.txt',
      },
      d: {
        input: 'tasks/d_tough_choices.txt',
        output: 'results/d_result.txt',
      },
      e: {
        input: 'tasks/e_so_many_books.txt',
        output: 'results/e_result.txt',
      },
      f: {
        input: 'tasks/f_libraries_of_the_world.txt',
        output: 'results/f_result.txt',
      },
    };
    
    const file = fs.readFileSync(files[process.env.FILE].input, 'utf-8');
    
    const result = file.split('\n').map((item) => item.split(' '));
    
    const readyLibraries = [];
    
    const set = {
      booksNumber: parseInt(result[0][0]),
      deadLine: parseInt(result[0][2]),
      booksScore: [...result[1].map((it) => parseInt(it, 10))],
      libraries: [],
    };
    
    for (let i = 0; i < result[0][1]; i++) {
      const firstRow = result[i * 2 + 2];
      const secondRow = result[i * 2 + 3];
    
      set.libraries.push({
        daysToSignUp: parseInt(firstRow[1]),
        scanPerDay: parseInt(firstRow[2]),
        books: [
          ...secondRow
                .map((it) => parseInt(it, 10))
            .sort((a, b) => set.booksScore[b] - set.booksScore[a]),
        ],
      });
    }
    
    let signUpLibrary = null;
    
    for (let i = 0; i < set.deadLine; i++) {
      if (!signUpLibrary) {
        signUpLibrary = findLibraryToSignUp(i);
      }
    
      if (signUpLibrary) {
        signUpLibrary.daysToSignUp--;
    
        if (signUpLibrary.daysToSignUp === 0) {
          const scannedBooks = set.libraries[signUpLibrary.id].books.slice(0, signUpLibrary.booksCount);
    
          readyLibraries.push({
            id: signUpLibrary.id,
            books: scannedBooks,
          });
    
          set.libraries[signUpLibrary.id] = undefined;
    
          signUpLibrary = null;
    
          removeDuplicates(scannedBooks);
        }
      }
    }
    
    function findLibraryToSignUp(currentDay) {
      const availableLibraries = set.libraries
        .map((library, index) => (library !== undefined ? {
          id: index,
          value: 0,
          daysToSignUp: library.daysToSignUp,
        } : undefined))
        .filter((item) => item !== undefined);
    
      availableLibraries.forEach((library) => {
        const activeDays = set.deadLine - currentDay - library.daysToSignUp;
    
        const trueLibrary = set.libraries[library.id];
    
        const scannedBooks = Math.min(
          activeDays * trueLibrary.scanPerDay,
          trueLibrary.books.length,
        );
    
        library.booksCount = scannedBooks;
    
        trueLibrary.books.slice(0, scannedBooks).forEach((id) => {
          library.value += set.booksScore[id];
        });
    
        library.value /= library.daysToSignUp;
      });
    
      const sorted = availableLibraries.sort((a, b) => {
        if (b.value === a.value) {
          return b.daysToSignUp - a.daysToSignUp;
        }
    
        return b.value - a.value;
      });
    
      return sorted[0];
    }
    
    function removeDuplicates(booksToRemove) {
      set.libraries.forEach((library) => {
        if (library) {
          library.books = library.books.filter(
            (book) => !booksToRemove.some((book1) => book1 === book),
          );
        }
      });
    }
    
    let results = 0;
    
    readyLibraries.forEach((lib) => {
      lib.books.forEach((book) => {
        results += set.booksScore[book];
      })
    });
    
    console.log(`score: ${results}`);
    
    const finalResult = [readyLibraries.length];
    
    readyLibraries.forEach((library) => {
      finalResult.push(`${library.id} ${library.books.length}`);
    
      finalResult.push(library.books.join(' '));
    });
    
    fs.writeFileSync(files[process.env.FILE].output, finalResult.join('\n'));
    

    What We Learned From This Experience

    • Think algorithmically
    • Find the root of the problem — even if the task looks complicated at first glance, the real issue may be pretty easy.
    • Consider all variables of the equation.
    • Don’t stop improving results — if something works, it doesn’t mean it can’t work better.
    • Use TypeScript instead of JavaScript. We spent a lot of time debugging JavaScript issues that could have been prevented by using TypeScript.

    Credits to team members:

    Yelysei Lukin (LinkedIn)

    Oleh Zaporozhets (LinkedIn)


    下载开源日报APP:https://opensourcedaily.org/2579/
    加入我们:https://opensourcedaily.org/about/join/
    关注我们:https://opensourcedaily.org/about/love/
←上一页
1 … 82 83 84 85 86 … 262
下一页→

Proudly powered by WordPress