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

开源日报

  • 开源日报第460期:《美观模板 readme-md-generator》

    18 6 月, 2019
    开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
    今日推荐开源项目:《美观模板 readme-md-generator》
    今日推荐英文原文:《Why people will beat machines in recognising speech for a long time yet》

    今日推荐开源项目:《美观模板 readme-md-generator》传送门:GitHub链接
    推荐理由:每个 GitHub 项目都不会把 Readme 给落下的,这个项目能够让你按照模版生成一个 Readme.md,你只需要像写填空题一样把它填满就好。每个项目的 Readme 如同矛盾一样,具有共性和个性,共性是指每个项目都有安装方法和版本号等等这些方面,而个性则是每个项目的特性等都不相同,共性和个性是相互渗透,相互影响的,在一定条件下也可能相互转化。
    今日推荐英文原文:《Why people will beat machines in recognising speech for a long time yet》作者:Edge
    原文链接:https://medium.com/edge/why-people-will-beat-machines-in-recognising-speech-for-a-long-time-yet-115e8dd09690
    推荐理由:说话的语音变化对于人类来说可能可以识别,但是对于机器来说可能并非如此

    Why people will beat machines in recognising speech for a long time yet

    Imagine a world in which Siri always understands you, Google Translate works perfectly, and the two of them create something akin to a Doctor Who style translation circuit. Imagine being able to communicate freely wherever you go (not having to mutter in school French to your Parisian waiter). It’s an attractive, but still distant prospect. One of the bottlenecks in moving this reality forward is variation in language, especially spoken language. Technology cannot quite cope with it.

    Humans, on the other hand, are amazingly good at dealing with variations in language. We are so good, in fact, that we really take note when things occasionally break down. When I visited New Zealand, I thought for a while that people were calling me “pet”, a Newcastle-like term of endearment. They were, in fact, just saying my name, Pat. My aha moment happened in a coffee shop (“Flat white for pet!” gave me a pause).

    This story illustrates how different accents of English have slightly different vowels — a well-known fact. But let’s try to understand what happened when I misheard the Kiwi pronunciation of Pat as pet. There is a certain range of sounds that we associate with vowels, like a or e. These ranges are not absolute. Rather, their boundaries vary, for instance between different accents. When listeners fail to adjust for this, as I did in this case, the mapping of sound to meaning can be distorted.

    One could, laboriously, teach different accents to a speech recognition system, but accent variation is just the tip of the iceberg. Vowel sounds can also vary depending on our age, gender, social class, ethnicity, sexual orientation, level of intoxication, how fast we are talking, whom we are talking to, whether or not we are in a noisy environment … the list just goes on, and on.

    The crux/crooks of the matter

    Consider that a recent study I was involved in showed that even moving house (or not) can affect one’s vowels. Specifically, there is a correlation between how speakers of Northern English pronounce the vowel in words like crux, and how many times they have moved in the last decade. People who have not moved at all are more likely to pronounce crux the same as crooks, which is the traditional Northern English pronunciation. But those who have moved four times or more are more likely to have different vowels in the two words, similarly in the south of England.

    There is, of course, nothing about the act of moving that causes this. But moving house multiple times is correlated with other lifestyle factors, for instance interacting with more people, including people with different accents, which might influence the way we speak.

    Other sources of variation may have to do with linguistic factors, such as word structure. A striking example comes from pairs of words such as ruler, meaning “measuring device” and ruler, meaning “leader”.

    These two words are superficially identical, but they differ at a deeper structural level. A rul-er is someone who rules, just like a sing-er is someone who sings, so we can analyse these words as consisting of two meaningful units. In contrast, ruler meaning “measuring device” cannot be decomposed further.

    It turns out that the two meanings of ruler are associated with a different vowel for many speakers of Southern British English, and the difference between the two words has increased in recent years: it is larger for younger speakers than it is for older speakers. So both hidden linguistic structure and speaker age can affect the way we pronounce certain vowels.

    End never in sight

    This illustrates another important property of language variation: it keeps changing. Language researchers therefore constantly have to review their understanding of variation, which in turn requires continuing to acquire new data, and updating the analysis. The way we do this in linguistics is being revolutionised by new technologies, advances in instrumental data analysis, and the ubiquity of recording equipment (in 2018, 82% of the UK adult population owned a recording device, otherwise known as a smartphone).

    Modern day linguistic projects can profit from the technological advancement in various ways. For instance, the English Dialects App collects recordings remotely via smartphones, to build a large and constantly updating corpus of modern day English accents. That corpus is the source of the finding concerning the vowel in crux in Northern English, for example. Accumulating information from this and many other projects allows us to track variation with increased coverage, and to build ever more accurate models predicting the realisation of individual sounds.

    Can this newly refined linguistic understanding also improve speech recognition technology? Perhaps, but in order to improve, the technology needs to know a lot more about you.
    下载开源日报APP:https://opensourcedaily.org/2579/
    加入我们:https://opensourcedaily.org/about/join/
    关注我们:https://opensourcedaily.org/about/love/
  • 开源日报第459期:《良好的结构 css-architecture》

    17 6 月, 2019
    开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
    今日推荐开源项目:《良好的结构 css-architecture》
    今日推荐英文原文:《How to Get Better at Coding Interviews》

    今日推荐开源项目:《良好的结构 css-architecture》传送门:GitHub链接
    推荐理由:在为网页添加 CSS 的时候,如果只是个简单的网页还好,界面复杂组件数量繁多的时候如果没有好好的整理好每种组件的样式,最后就会变成牵一发而动全身,稍微一点点修改就会影响到整个大局的情况,显然这会浪费不少时间。这个项目就是介绍如何编写好的 CSS 架构的指南,尽管比起随心所欲,遵守一些规则看起来会让事情变得麻烦不少,但是这会让你避免更多的麻烦。
    今日推荐英文原文:《How to Get Better at Coding Interviews》作者:Jake Z.
    原文链接:https://medium.com/@jacobjzhang/how-to-get-better-at-coding-interviews-781086ace349
    推荐理由:面试时可以帮上忙的小技巧和思考方式

    How to Get Better at Coding Interviews

    So you want to get better at interviewing? It’s all in the approach — this guide is a step by step walkthrough on exactly how to answer coding interview question from companies like Facebook, Amazon, Microsoft, Netflix, or Google.

    This article will cover a lot. It’ll walk you through a common technical (whiteboard or non-whiteboard) interview question, and you’ll be exposed to things like:
    • The mentality you need to conquer nerves
    • Every step to take during the interview
    • What patterns to brush up on
    And much more. Let’s start by tackling the mental aspects of the interview before the tangible steps to approaching such problems.

    Note: this was originally published at https://algodaily.com.

    Getting Over Nerves

    Software engineering and technical interviews are nerve-wracking. We all know this, but rarely do we ask why.

    Why do these kinds of interviews specifically conjure up such dread?

    Really, there are few consequences.

    Worst case scenario, you fail to correctly express the algorithm they’re looking for. Or maybe you can’t think of the correct definition for something. You then probably don’t get the job.

    That’s not a great outcome, but there are far worse things. You can always just go home, brush up on what you missed, and try to apply elsewhere.

    Knowing that doesn’t seem to help though, and here’s why.

    Our fears usually derive from uncertainty. That is, the belief that there’s a chance you’ll presented with a question or challenge that you have no idea how to solve.

    But this is not actually the case!

    First off, with the right approach — which the rest of this article will explore, you can solve any problem.

    Secondly, yes there is a chance you’re asked something completely out of left field. But for the most part, interviewers really do want to see how you think. As someone who’s been on the other end quite a number of times, know that we want you to do well.

    If nerves are still in the way, there are some other solutions. Some things that might be helpful are daily meditation, eating a healthy meal that fuels your brain, and regular aerobic exercise.

    What to Do If You Blank Out Completely

    With almost any technical challenge, if you have the right approach, you can figure out a way to solve a problem. But what if you genuinely have no idea where to start?

    So let’s address something quickly — if you really have no clue, here’s what to do.

    Let’s say you’re a frontend engineer with a few years of Javascript Single Page App development under your belt. You’re asked the following technical question in an interview.

    When would you apply asynchronous communication between two backend systems?

    You freeze, and suddenly your chest tightens. You’ve never worked on any backend systems, and you’ve forgotten what asynchronous means. For a few seconds, you stare at the interviewer, and your mind has nowhere to go.

    Here’s two potential ways to address this:
    1. Link it to something you’ve done
    2. Emphasize how excited you are to learn and work on such things
    The first response works because it still allows you to demonstrate your experience:

    I haven’t directly worked on backend systems, but can you remind me what asynchronous means again? Ah, a form of a programming that allows work to be done separately from the primary application thread? I’ve done something similar with React– sometimes inserting data into the database via a REST endpoint takes some time, but we want to give immediate feedback to the user that it’s being persisted. So my educated guess is that it would be when you want to have a process do something while waiting for something else to complete.

    In this case, it may not be 100% what the interviewer wanted to hear, but you’ve shown some technical acumen. You were also able to include some discussion about past experiences.

    On the other hand, what if there’s nothing at all you can relate the question to? Talking about how excited you are and how you would learn this might be a good alternative:

    To be honest, I’m not sure, but I’ve heard the term asynchronous and would love to learn more about backend systems. I’ll be sure to read up on it after this interview, do you recommend any books or articles to start with?

    Are Whiteboard Algorithm Interviews Good?

    The rest of this lesson will be talking about approaching standardized data structures and algorithm based questions. It will be still relevant, but less so, to small sample challenges like “here’s a basic setup, implement a REST API with some scaffolding”.

    Yes, whiteboard algorithm interviews are controversial. However, there are several reasons they still persist. Firstly, they give several strong signals to the interviewer, such as:
    • Can the candidate can think with clarity in front of others (what this lesson aims to address)
    • Do they sound like they’ve prepped for the interview (signal for work ethic)
    • Do they have a reasonable amount of logical ability?
    • Can they tell a good solution from a bad one?
    • How is their grasp of computer science fundamentals?
    Secondly, they are easy to do at scale, a consideration especially important if you are a conglomerate that needs to make thousands of annual hires.

    Yes, there are take-home assignments, build-a-feature type of interviews, and week-long “trial” periods. I’m sure these are all great methods.

    However, the standard “can you solve this problem in front of me” data structure and algorithm questions are still very much the standard at most software companies.

    Let’s figure out how to tackle them.

    The Approach of Good Interviewees

    Before we dive in, here’s an important note. For any of this to work, you’ve got to have your data structures and algorithms down pat.

    The more practice you have with these topics, the easier it will be to patternize them. It’ll also be easier to retrieve them from memory come interview time.

    A good starting point is, of course, AlgoDaily’s Premium Course and daily newsletter problem. Other recommendations can be found in our article on How to Prepare for a Technical Interview.

    With all that said, here’s the typical steps we recommend for solving whiteboard questions. We’ll spend plenty of time exploring each in depth.
    1. Run through 1–3 example inputs to get a feel for the problem
    2. Unpack the brute force solution quickly by asking how a human would do this
    3. Tie the brute force solution back to a pattern, data structure, or Computer Science technique
    4. Optimize and run through the same test cases from step 1 again
    5. If you have time, call out edge cases and improvements to the problem

    Communication During the Interview


    It’s not a secret that a big part of the interview is a test of your communication skills. Software engineering is a team sport.

    The myth of the lone genius programmer is simply that — a myth. This is especially for big, hairy, impactful projects that require hundreds of thousands of engineers.

    How do you demonstrate strong communication skills?

    You must keep talking — I can’t emphasize this enough. Unless you need complete silence to think — which is fine — you should be voicing your thoughts.
    • If you’re stuck, let the interviewer know
    • If you don’t understand the problem, ask more clarifying questions
    • If you have no idea what’s going on, say you need more context
    • If you need a hint, let them know!
      If you’re shy, that’s perfectly fine. But with regards to the interview — know that you might be working with either this person, or someone of a similar aptitude and technical ability. For better or worse, how the interviewer sees you during the interview is what they think they’ll get when you come on board. Try your best to be friendly and vocal, if only for the few hours it takes to land the job.

    How to Gather Requirements

    Let’s move on to practical technical interview tips. We can examine the Zeros to the End problem. Here’s the prompt:

    Write a method that moves all zeros in an array to its end.

    The very first thing you should do is to clarify the requirements. Until you know exactly what the problem is, you have no business trying to come up with a solution. Here’s why:

    Candidate: Cool, zeros to the back, nonzeros in front. That’s it right?

    Seems simple enough. Why not jump right to the solving it? Because the interview might then say:

    Interviewer: Also, note that you should maintain the order of all other elements. Oh, and this needs to be done in O(n) time.

    If you hadn’t considered that, you might have gone a very bad path. It’s crucial to always repeat the question in your own words and clarify heavily. Get the full scope of requirements, and repeat it so they know you’ve fully grasped the entirety of the problem

    Candidate: So we want to move all the zeros to the back, while keeping nonzeros in front. We want to also keep the order the nonzeros were originally in, and the algorithm should run in linear time.

    Interviewer: Right on.

    Start With Inputs and Outputs

    The very next thing to do is either ask for few sample arrays, or come up with your own. Start building your test cases. It helps you start to process how to transform the inputs to get the outputs.

    Try to start with a very small input, and increase its size as you do more examples. Here’s what you might say:

    Candidate: Very interesting problem. Alright, just to make sure I understand the transformation and result that we want, let me run through a few examples. So if I’m given [0, 1], we’d want [1, 0] back?

    Interviewer: Yes, exactly. (Candidate begins to think of how to move that lone zero in the first example)

    Candidate: Hm, for that one, we just needed to swap the 0 with the 1. Now, if given [1, 0, 2, 0, 4, 0], I would want [1, 2, 4, 0, 0, 0] back.

    Interviewer: Correct.

    Candidate: And [0, 0, 4] becomes [4, 0, 0]. Hm…

    How to Come Up With a Brute Force Solution

    Now that you’ve tried some inputs and outputs, the primary question to ask is this:

    If a machine were not available, how would a human manually solve this?

    Remember, computers are just tools. Before we had them, humans had to calculate things by hand. So asking yourself how you’d do it manually is a great way to start brainstorming ways to solve the problem. When loops and conditionals aren’t available, you’re able to say in plain English what you need to do.

    Candidate: Hm, yeah, for these examples, the result keeps returning an array of the non-zeros plus an array of the zeros at the end. Thinking through a very basic implementation, what I’ve been doing is: iterating through, finding the non-zeros, and just putting them in an another temp array. Then I’ve been filling the rest of the result array with 0 s until we’ve gotten the original length.

    Interviewer: Interesting. Want to write that implementation out?

    Use Pseudocode To Clarify Your Thoughts

    Unless an algorithm is extremely simple, you’ll want to write pseudocode first.

    This is especially true for brute-force solutions. The interviewer may be okay with just the pseudocode for the first pass, and could ask you to spend the remaining time solving and coding an optimized solution.

    Additionally, thinking in pseudocode is much easier to modify should you find a deleterious error. Here’s what it might first look like:
    temp = []
    zero_count = 0
    iterate through array:
      if nonzero, push to new temp
      if zero, increment count
    for zero_count times:
      push to temp
    return temp
    
    It’s a good sign you’re on the right track if the interviewer modifies the problem to make it a bit more complicated. They might do this by adding a constraint (do this in constant time), or by making the input significantly larger. In my experience, most interviewers will plan to do one easy problem and one harder problem.

    Interviewer: Great, now can you do this without instantiating a new array?

    Don’t lose your cool at this point, and also don’t get too excited about passing the first part. It’s time to tie our brute force solution to a technique to improve it. We will now cover a number of ways to do so.

    How to Optimize With Patterns and Abstractions

    After you’ve done about ~50–100 practice interview challenges, you’ll begin to recognize patterns you can leverage. Here’s an example of one: If you want speed, you usually need more space/memory. This is especially relevant to the next section about using a data structure.

    Look at each step in your solution so far and think about any potential ways to simplify it or break it down. Are there any ways to reduce its complexity?

    One trick is to think about what you’re doing from a higher-level. By this, I mean get yourself out of the weeds of the logic, and go back to input-to-output. In the above example, yes we’re moving zeros to the end by concatenating arrays, but what are the actual things we’ll need to do? The process might be thought of as:
    • Identify the non-zero elements
    • Put elements at different indexes
    • Find out how many 0s there are
    The beauty of having clear steps like the above is that you can now explore alternative ways to accomplish each one.
    • For example, to identify the non-zero elements, you can iterate over the array and use a conditional.
    • Alternatively, you can use a filter method.
    • And if that’s not helpful, you can also look for multiple zeros in a row and splice a new array out.
    Something else to ask yourself: What am I trying to do in plain English?

    Another very easy way to make progress is to try to futz with the input.
    • If it’s a collection, does sorting or grouping help?
    • If it’s a tree, can we transform it into an array or a linked list?
      If tweaking the input doesn’t make a dent, maybe it’s time to make a bigger transformation.

    Introduce a Data Structure or Abstract Data Type

    This is where a study of data structures (and experience implementing and using them) really helps. If you can identify the bottleneck, you can start to try to throw data structures at the problem to see there any performance or spatial gains.

    Going back to the Zeros to the End problem we did earlier, our bottleneck is likely the step of putting elements at different indexes. In that case, we may realize that using a counter variable is beneficial.

    Note that the data structure doesn’t need to be fancy. In our case, we’re literally introducing a single int variable– but sometimes that’s all you need.

    What should the counter be counting? Well, once we’ve split the array up into non-zeros ([1, 2, 3]) and zeros ([0, 0, 0]), we only really care about where the non-zeros end.

    Because we don’t need to worry about what is in the array after non-zero elements, we can simply keep a separate pointer to track the index of the final array. It will let us know where to start the zeros.

    We could then write the follow pseudocode to utilize this strategy:
    insert_position = 0
    for i in nums
      if i is not 0
        increase insert_position
        keep it in insert_position
      fill the rest in with 0
    
    Despite having two loops, the time complexity simplifies to O(n). However, the space complexity is constant since we’re using the same array, so we have an improvement!

    A Tactical Data Structure Cheatsheet

    Need access to an element in a collection really fast? An array already has the location in memory.

    Have to insert data quickly? Add it to a hash table or linked list.

    Need a maximum or minimum in O(1) time? Call in a heap.

    Need to model connections? Get a graph in there.

    The more data structures you know, the better. You can check the curriculum for a list of absolute requirements.

    It’s also useful (but not necessary) to play with more advanced structures — think AVL trees, tries, priority queues, suffix arrays, and bloom filters. They are less likely to be needed, but they are useful in industry and can be impressive to pull out during an interview.

    A special note about hash tables:

    Get to know these guys very well! They can be used in a surprising number of solutions.

    Many problems can be reduced to searching for elements in a large data collection, finding duplicates in said collection, or storing/retrieving items. Hash tables/hash maps do these things extremely well, so always have it top of mind.

    If an additional data structure doesn’t help, it may be time to try out an old-school (but reliable) technique.

    Introduce a Computer Science Algorithm Technique

    There are a few techniques that everyone should be aware of. Usually these are covered in Intro to Algorithms classes to categorize algorithms.

    They are generally tools not just beneficial for interviews, but for software engineering work in general, so get to know them!

    Divide and Conquer: try to divide the problem into sub-problems that are easier to think through or solve. This allows for the possibility of..

    Recursion — see if you can leverage a function that calls on itself. Be especially wary of recursion for trees.

    Memo-ization- Can the partial results you’ve generated in the brute force solution can be used for larger or different inputs? If so, leverage caching of some sort. What data can you store in memory (or create and store in memory) to help facilitate the algorithm?

    Greedy — think about what the best move at each iteration or step is. Is there an obvious one at each step? This comes up a lot in graph traversal problems like Dijkstra’s algorithm.

    What to Do When None Of the Above Worked

    So none of the above patterns, data structures, or techniques are shining any light on the problem. What to do?

    You have two options.

    Ask more questions.

    OR

    Say, I’m stuck. Can I please get a hint?

    Keep communicating! Interviewers are usually more than happy to give a hint — in fact, that’s their job. Certain interview questions will unfortunately have one or two “key intuitions” that you must grok before you can get to a solution.

    After You Have A Working Solution

    Here’s a huge key that takes a while to click. After you’ve written pseudocode for an optimized solution, manually run through 1–3 example inputs, step by step, through your pseudocode to make sure it works. Warning: nerves will be there, and you may lose your place from time to time, but this is extremely important.

    Good engineers test their code thoroughly and can step through logic. The space between having a pseudocode solution and writing code on the whiteboard is a good time to demonstrate this.

    At this point, you’ll also be able to weed out incorrect assumptions or make important realizations (“oh wait, we should use a Map instead of a JS object instead”).

    Candidate: Let’s start with [1, 0, 3], I think that’s a good test candidate. OK, starting with 1, we see that it’s not a zero, so it can stay put. We’re going to the next element so let’s increment our final array index counter. Now we have 0, let’s skip. OK, 3, not a zero, our counter is at 1 so we put it after 1 and we have [1, 3]. Great! Then we put a 0 at the end and we get the results we want.

    The interviewer will likely say something like “great, let’s code it up”, or they may try to find out how confident you are in your solution. If the input-outputs check in, you should feel good about moving on.

    Note: if you’re going to be interviewing on a whiteboard, buy a Magnetic White Board Dry and practice handwriting code on it.

    There’s many things that people don’t consider about coding on a whiteboard: space management mostly, but also how to use shorter variables, and writing horizontally.

    Anyway, you’ve now written this code:
    function zerosToEnd(nums) {
        let insertPos = 0;
        for (let i = 0; i < nums.length; i++) {
            if (nums[i] != 0) {
                nums[insertPos++] = nums[i];
            }
        }
    
        for (let j = insertPos; j < nums.length; j++) {
            nums[j] = 0;
        }
    
        return nums;
    }
    
    Once you’ve written your solution code out, the technical portion should be done.

    The interview will now steer towards questions for the interviewer. Make sure that you have questions prepped, and try your best not to think about your performance.

    At that point, whatever happened is out of your control, so be forward looking and keep your mind in the present with the interviewer. You’ll come across as much more professional if you can maintain your composure, even if the interview didn’t go exactly how you wanted.

    I hope you’ve found this guide helpful. Remember that any coding challenge can be solved with the right approach, and the right mentality. Best of luck!
    下载开源日报APP:https://opensourcedaily.org/2579/
    加入我们:https://opensourcedaily.org/about/join/
    关注我们:https://opensourcedaily.org/about/love/
  • 开源日报第458期:《旗鼓相当的对手 Never-Blink》

    16 6 月, 2019
    开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
    今日推荐开源项目:《旗鼓相当的对手 Never-Blink》
    今日推荐英文原文:《Could Machines Become Creative?》

    今日推荐开源项目:《旗鼓相当的对手 Never-Blink》传送门:GitHub链接
    推荐理由:很简单的游戏,它会随机帮你连上一个对手开始真刀真枪的对决,你们所做的每一步都关系到游戏的胜败,而你能做的就是计算好每一次行动——实际上只要不眨眼就好了。这个游戏的规则很简单,眨眼的算输。尽管它现在还没有放到公共服务器可以使用(没办法同时处理太多的客户端),但是眨眼者输这样简单的规则相当有意思,在不需要在现实中面对面这样的限制解除之后你能和相当多的玩家进行搏斗(眼皮上的)。
    今日推荐英文原文:《Could Machines Become Creative?》作者:Jonathan Follett
    原文链接:https://towardsdatascience.com/could-machines-become-creative-49f346dcd3a3
    推荐理由:如果人工智能变得有创造性而没有相应的行为准则,那么它们可能会犯下和人类一样的错误,比如牺牲自然来发展,就像以前一样

    Could Machines Become Creative?


    Figure 01: Creative output from AI, like artwork, has seen its proof of concept in recent years. What can we expect from AI in the years ahead? [Photo: by Martino Pietropoli on Unsplash]

    AI automation is coming, and it’s going to impact knowledge workers — writers, artists, designers, scientists, managers, and entrepreneurs. However, even when AI automation completely replaces the need for a human — such as in its conquest of strategy games like Chess and Poker — the world doesn’t end and the human element doesn’t disappear. Things are different. Largely better, in some ways worse, but life in fact goes on. Humans keep doing our thing. And the machines keep getting better, and better, and better. Artificial intelligence is both amazing and over-hyped. Humanity is safe for a few decades or centuries, at least.

    So, what can we really expect from AI in the years ahead? How will AI impact the world of creativity and knowledge work? While AI has certainly been used to create artwork, these pieces have been more curiosity or proof-of-concept. In 2016, J. Walter Thompson’s Next Rembrandt project taught an AI to paint like the master. And in 2018, Christie’s New York sold an AI-produced work of art for the first time, the Portrait of Edmond Belamy. The print itself was created by an algorithm developed by humans from the French art collective Obvious. These are recent and remarkable achievements, but they are isolated exercises. There is no clear path to AI collaborative art becoming mainstream.

    To get a clearer picture of when AI might begin changing creative work of all kinds we spoke with Katja Grace of AI Impacts, a research organization focused on decision-relevant questions about the future of artificial intelligence. It’s forecasting, broadly defined, AI’s advances and the impacts on society. Grace was the lead author on a 2017 paper entitled “When Will AI Exceed Human Performance? Evidence from AI Experts.” Taking Incremental Steps or Sprinting Forward?

    Technology often advances slowly, then quickly when a key new advance is realized. But the slow is often not as slow as it seems, and the quick isn’t as quick as we think, either. So regardless of how artificial intelligence evolves we should expect the manifestation of it to be less extreme than we imagine.

    “You could imagine AI progress happening in an incremental way where, every year, there’s slightly better AI than previously. Or, you could imagine that, at some point, we have some amazing insight that [results in] having very good AI quite suddenly. Often, people expect the latter one to happen and sort of plan accordingly… We are interested in how likely it is to go either of those ways,” says Grace.

    Historically, there are a number of reasons we might think that AI will advance incrementally. However, there are various arguments for expecting there to be sudden and surprising progress. What might enable a surge in AI automation to be possible? “The digitization of much of our lives recently means there’s a lot more data …” says Grace. “And deep learning lets you use lots of hardware and data to get good results. The availability of hardware has allowed the science to progress rapidly.”

    Automating Knowledge Work

    The idea of automation as a core to creative work remains either unknown or uncomfortable to most. In Grace’s work as an AI researcher, though, the model of automation as a ubiquitous force is clear: “I think part of the reason to suspect that deep learning will automate knowledge work is we think that probably something will automate knowledge work eventually,” says Grace. “We know that humans can do knowledge work. So probably it’s possible to get machines to do it as well — unless you think that humans sort of have some magic spark of consciousness that is needed for it that we’ll never be able to automate.”

    “I think many people suspect that’s not the case, so the question is what technology will let us do this? A reason to suspect that deep learning might be it is, we’ve recently seen a lot of progress in automating some things that are part of normal human functioning, that we hadn’t previously been able to do, that are key to most work, for instance, recognizing and dealing with images and speech and writing.”

    “We’ve seen deep learning do some things that seem fairly intellectual, for instance, playing various games quite well. You might think that the kind of technology that lets us play Go well wouldn’t be that far off what we need for being able to [do] some jobs well, that are relatively straightforward intellectual jobs. I suppose some people think that this sort of technology might take us all the way to having artificial general intelligence that can do basically everything humans can do, but that’s more controversial.”

    Grace’s 2017 paper, “When Will AI Exceed Human Performance? Evidence from AI Experts”, was based on a survey polling researchers who published at the 2015 Conference on Neural Information Processing Systems and the 2015 International Conference on Machine Learning. A subset of respondents were asked a question that emphasized consequences for employment. The question defined full automation of labor as when all occupations are fully automatable. That is when, for any occupation, machines could be built to carry out the task better and more cheaply than human workers. The aggregate forecast put the 50% chance 122 years away, or by 2138. The timeline of median estimates for AI achieving human performance in various kinds of knowledge work, included:
    • in 5–10 years, writing a high school essay
    • in 10–15 years, generating a Top 40 pop song, and
    • in 25 years or more, writing a New York Times bestseller
    Given that Grace’s paper is predicting timeframes for when AI will eclipse human performance in a number of areas, we wanted to get her opinion on some of the core knowledge work — specific creative practices like writing and music.

    Writing

    How soon might AI be able to write at a human level? “You might imagine tools for helping to write better that are not really entirely automated in the process. Or you could imagine something that just does journalism for you,” says Grace. “I expect there to be better tools for it relatively soon.” However, “In order to [write] well enough that the writer has a coherent picture of the world and a message or goal that they’re trying to convey and an idea of the audience they’re trying to convey it to, [this] seems close to AGI complete. But, I expect [it] may be earlier for AI to be able to produce written words that are interesting in some way or amusing or people find worth reading.”

    The limits Grace identifies around machines independently writing relate to their inability to bring a broad understanding of the world to bear on the things they write. We’re going to find context is the Achilles heel for AI — and should continue to be beyond the upcoming decade — a crucial chalk line that helps guide what AI will and will not be able to do. Grace also equates the ability to have context with being AGI complete, meaning that there is an artificial general intelligence that eclipses human capacity. This goes down the path of science fiction and the machines-will-take-over-the-world narratives. While this throughline is, indeed, visible it is a mistake to yoke context and AGI too closely. Having broad knowledge is one thing; have the ability to act broadly is another thing entirely.

    Figure 02: How soon might AI write at a human level?
    [Illustration: “The Artist’s Son Writing”, 1887, Paul Cezanne, National Gallery of Art, Open Access]

    Music

    What about pop music? In the survey paper, “One of the things that was quite early that I thought was interesting was, we asked when AI would be able to basically write a new Taylor Swift song as well as Taylor Swift can, so that a dedicated Taylor Swift fan would not be able to tell the difference between this new song and one that she wrote and performed. [Researchers surveyed] put that about 10 years out. You might think, in order to write, to really properly be a songwriter, you need to sort of understand the words that you’re saying. It’s possible these machine learning researchers just didn’t have a great view of Taylor Swift that they thought that this would be automatable soon.”

    All jokes about the substance of Taylor Swift songs aside, music specifically and art in general are right in the crosshairs of today’s AI automation. For example, Aiva (Artificial Intelligence Virtual Artist) an AI composer, has created music used in the soundtracks for films, advertising, and games, and was the first virtual artist to be recognized by an author’s rights society.

    Figure 03: Music is one creative area with numerous AI advances in automation. [Photo: by Franck V. on Unsplash]

    The Consequences of a Creative AI

    What are some risks or unintended consequences with advanced development of a creative AI? “It might be straightforward to make a technology that can … make very high-quality decisions, and play games really well, play games in the real world very well, [and for example] make a lot of money. But if that’s quite easy and we haven’t figured out exactly how to make them do exactly what we want, we might end up with a giant mess,” says Grace.

    “If you can look at how to set up a company that makes money by producing stuff, but you haven’t figured out to make it care about all of human values that you care about — like whether the rivers are polluted, you will tend to end up with polluted rivers. Similarly, if you make machines that are very good at optimizing for something and don’t really know what you care about, then, without any malice, they will end up destroying the things that you cared about.”

    Those sounds like the same sort of risks and consequences that the industrial revolution produced. Of course, even though actual change is happening far slower than it should or we may like there is an evolution of mindset and intention. Eventually, policy will catch up to that and we will see nations, corporations, and ultimately individuals writ large avoiding the sort of destructive, polluting behaviors brought to us by industrialization. Doing things in a more holistically correct way will be baked into the basic way that things are done.

    So, how smart could machines become and how would that compare to human intelligence? “I guess the question is: Are humans as intelligent as a thing can be? Reasons to suspect not are, it seems like the human brain is fairly constrained by the need for it to fit in a human head and for mothers to be able to give birth to their children — that sort of thing biologically — and how much energy does it use? … It looks like there are biological constraints in our brains that mean they couldn’t be a lot more impressive even if there were, in theory, greater heights of intelligence to have,” says Grace. “Even having machines that were somewhat smarter than the smartest humans we’ve ever had would make a big difference to the world.”
    下载开源日报APP:https://opensourcedaily.org/2579/
    加入我们:https://opensourcedaily.org/about/join/
    关注我们:https://opensourcedaily.org/about/love/
  • 开源日报第457期:《查错 HTMLHint》

    15 6 月, 2019
    开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
    今日推荐开源项目:《查错 HTMLHint》
    今日推荐英文原文:《How To Become an Effective Software Engineer》

    今日推荐开源项目:《查错 HTMLHint》传送门:GitHub链接
    推荐理由:一个用于帮你的 HTML 文件查错的工具。这个工具可以根据设置好的规则检查你的文件,从中标记出违反规则的部分帮助你修改,比如标签必须配对,标签必须唯一和属性不能为空等等,对于初学者来说可能这些问题会发生的更多,这个时候它就能帮你省去一行行检查的时间了——但是它不能总是帮你省下这些时间,养成良好的代码书写习惯才是一劳永逸的选择。
    今日推荐英文原文:《How To Become an Effective Software Engineer》作者:Luis Santiago
    原文链接:https://medium.com/better-programming/how-to-become-an-effective-software-engineer-b2d25b588bc8
    推荐理由:一些提高效率的思维方式和技巧

    How To Become an Effective Software Engineer

    When I first started my journey as a software engineer I quickly noticed the great amount of cognitive load involved when working on enterprise projects. There are many moving targets throughout the execution of a plan. Clean code, tests, security, config files, performance, deployments, and many more variables commonly form part of the mental load required for successful completion of a project. I was contemplating a paradox I have seen many engineers face — trying to stay up to date with the latest trends in this ever-changing software industry while delivering great value to the company I work for. I was craving time outside Jira Stories to dedicate effort to my growth. And then I started seeking tools that could help me add tremendous value to my organization, maintain growth, and become effective.

    Awareness about what matters

    My main source was mentorship from people in the technology industry. Especially, mentorship in book formats from authors like Gary Vaynerchuk, Cal Newport, and Edmund Lau. I identified a pattern in their advice. It was awareness — deeply understand what matters and execute towards that goal. The identification of clear goals gives us opportunities to measure them. Self-awareness allows us to recognize the things we do best and also see our weaknesses.
    “Accept your shortcomings, and strive to become more conscious of who you really are.” — Gary Vaynerchuk

    Leverage

    In the book The Effective Engineer, Edmund Lau suggests leverage as a yardstick for effectiveness. Leverage is the return on investment for the effort that is put in. I see this as a generic definition of leverage. Combining Edmund Lau’s equation of leverage gives me a whole new perspective of its definition: Edmund Lau’s definition of leverage. Looking at the equation above I make sense of the parameters that influence the outcome of leverage. Before I start developing code, I commonly have an idea of how the product implementation will produce impact to the business. Even after implementation, I can measure its true impact by tracking logs, usage, and adoption rate. This numerator — impact produced — is indirectly given to us. The denominator is the parameter we have the most trackability over. Time invested is the value we can measure; before, during, and after execution. Putting in effort to keep this parameter to a minimum, yields a higher leverage. This means higher return on investment (ROI). In the case of software engineers, ROI could mean improving trust with business partners, higher rate of adoption, or reducing the time it takes to perform a certain task. To achieve this, we have to get good at getting things done efficiently.
    “Effective engineers are not the ones trying to get more things done by working more hours. They are the ones who get things done efficiently — and who focus their limited time on the tasks that produce the most value.” — Edmund Lau
    In the book High Output Management, ex-CEO of Intel Andrew Grove shares three ways to increase leverage:
    1. Reduce the time it takes to complete a certain task
    2. Increase the output of an activity
    3. Shift to higher-leverage activities
    And Edmund Lau complements them with three questions:
    1. How can I complete this activity in a shorter amount of time?
    2. How can I increase the value produced by this activity?
    3. Is there something else I could spend my time on that would produce more value?
    I sometimes get laser-focused on a specific coding task. However, I find it beneficial to stop once in a while and ask myself these three questions. I see them as a pulse check for effectiveness.

    Mindset

    The perspective of our own intelligence, character, and ability deeply affects how we lead our lives. The adoption of a growth mindset is one of the most impactful concepts I have come across. Mostly because it is an effective tool for developing our confidence. There comes a time in which we feel the famous imposter syndrome creeping in. We might feel like our skills don’t line up with what “they” are looking for. But when you adopt a growth mindset, you tell your story. You tell who you are, what skills you’ve built, what you are excited about doing next, and why. Consciously recognizing areas of improvement and actively executing a plan of self-betterment. It means taking responsibility for each aspect of a situation that you can change. Learning, just like invested money, also compounds:
    1. Knowledge gives you a foundation to gain more knowledge.
    2. The earlier you optimize for learning, the more time your learning has to compound.
    3. Even small deltas in your learning rate can make a big difference in the long run.

    Limit the amount of work in progress

    Checklists can improve outcomes. They are a tool used to reduce errors in many fields. Keeping a checklist helps me transfer all the effort of remembering what I have to do next from my mind to another place. This allows me to focus my brain power on problem solving and development. Avoid context switching. Focus your undivided attention to one task at a time. Any form of distraction, including working on multiple tasks at the same time, takes away from my ability to become effective. When possible, I apply deep work; a skill I learned from Cal Newport’s book Deep Work. I make a conscious effort to shut off all distractions and work on developing mastery. Cal Newport defines deep work as:
    “Professional activities performed in a state of distraction-free concentration that push your cognitive capabilities to their limit. These efforts create new value, improve your skill, and are hard to replicate.” — Cal Newport

    Wrapping up

    The practice of adopting a growth mindset towards new skills makes us better learners and more willing to stretch beyond our comfort zone. Many times, I’ve felt excited about a new project idea. I think about the amount of value its implementation could add. Then I also think about all the things that could go wrong. I think about failure. I feel fear. I stop. But with a growth mindset, I understand I must reach beyond that thinking cycle. I understand I am always learning. Just like a product in beta — always in progress. Always in a constant iteration. Then I keep moving onwards along my journey to effectiveness.
    下载开源日报APP:https://opensourcedaily.org/2579/
    加入我们:https://opensourcedaily.org/about/join/
    关注我们:https://opensourcedaily.org/about/love/
←上一页
1 … 144 145 146 147 148 … 262
下一页→

Proudly powered by WordPress