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

开源日报

  • 开源日报第834期:《中文代码补全 vscode_Chinese_Input_Assistant》

    15 7 月, 2020
    开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
    今日推荐开源项目:《中文代码补全 vscode_Chinese_Input_Assistant》
    今日推荐英文原文:《10 Things to Look for in Every Code Review》

    今日推荐开源项目:《中文代码补全 vscode_Chinese_Input_Assistant》传送门:GitHub链接
    推荐理由:如果说文言编程只是为了好玩的话,那么这个插件相对而言有着更多的实用性(或许吧)。这款 VS Code 插件能用中文表达部分语法,添加中文变量,更重要的是提供包含全拼、双拼、五笔等方式的代码快速补全。
    今日推荐英文原文:《10 Things to Look for in Every Code Review》作者:Julie Elise
    原文链接:https://medium.com/better-programming/10-things-to-look-for-in-every-code-review-3f7fe67ba817
    推荐理由:毕竟重新检查一遍代码是个复杂且枯燥的工作。

    10 Things to Look for in Every Code Review

    A guide to making your code more maintainable and robust

    Code reviews are an integral part of the development process. They help to ensure you’re building robust and maintainable tools. The benefits of code reviews include increasing visibility of a project, sharing knowledge among team members, and, most importantly, detecting bugs and improving maintainability.

    Any developer putting their code up for review wants constructive feedback. Feedback should not be limited to notes about style, line spacing, or naming.

    The main focus of a code review should be on giving constructive feedback that will make the code more readable, maintainable and bug free.

    Here are the top 10 things to look out for in every code review.

    1. Functionality

    Does the code do what the developer intended? First and foremost, the code reviewer is responsible for checking if the goals defined in the code review are met. Have the changes addressed all features or bug fixes?

    2. Design

    In an ideal world, any software design changes would have been discussed and evaluated before implementation. Alas, we don’t live in a perfect world, so there may be occasions where the design was not discussed beforehand and an extensive refactoring is needed to bring the code changes up to standard.
    • Check to see if the proposed design pattern matches the changes in the code review. How is the program logic divided among classes and how do these classes interact with each other?
    • Does the code adhere to object-oriented design principles?
    • Is the UI code separate from the logic code? Are components divided up in a way that makes sense?
    • Are the files in the project organized intuitively? For instance, are UI files, images, scripts, classes, and headers all in separate folders?

    3. Identify Repeated Code

    Don’t Repeat Yourself (DRY)

    Repeated code is a recipe for repeated bugs, increased complexity, and unnecessary overhead. Don’t Repeat Yourself (DRY) is a common mantra among software developers.

    Reasons to avoid repeated code:

    + It makes the codebase lengthy and harder to maintain. + A maintainer could potentially fix a bug in one place but not the other. + Repeated code means that a repeated number of tests will need to be run. How to Fix:

    + If functionality is repeated throughout a class this code should be moved to a single function. + If this repeated code is used across multiple projects the code should be added to a submodule or separate project, which is referenced by all projects. + Is there repeated functionality in multiple classes? Ensuring that inheritance is used will reduce the number of repeated functions.

    4. Consider Run Time of Algorithms

    The run time of an algorithm depends on the number of operations executed and can be expressed in Big O notation. The more operations, the more time it takes to run the application.

    + Are there any unneeded operations? All unnecessary calculations should be removed. + Is the algorithm doing repeated work? Can we cache the data using memoization to avoid running the same computation more than once? + Identify nested loops. Is there a way to simplify the operations without using them? + What is the lookup cost when accessing data? Is there a data structure that could be used to reduce it?

    5. Remove All Hardcoded Values in the Code

    Hardcoded values are a firm “no.” If hard-coded values need to exist in the project use constants and descriptive variable names.

    + Constants specific to a class should be added as static class variables. + Configurable constants should be part of a configuration class. + Constants that aren’t configurable and that are shared between classes should be in a constant file and only included as needed.

    6. Error Handling

    Does the code contain thorough error handling?

    + Exceptions should handle invalid inputs due to user input, hardware constraints, network issues, etc. + Assertions should validate conditions to help detect bugs and validate test cases.

    7. Memory Allocation

    Memory allocation can be error-prone if malloc() or free() is misused. A detailed list of the top dangerous software errors due to memory allocation can be found here.

    + Memory leaks will occur if unused objects in memory are never freed. This will cause the application to use more memory than it needs and potentially slow down the system. + Premature freeing occurs when an object that’s still used by the program is freed. The result is a stale pointer, which will cause further calls to malloc and free to crash. + An object can be double freed by freeing an object that’s already free. Again, future calls to malloc and free may crash. You’re less likely to run into memory allocation issues when working with languages such as Python that have built-in garbage collection.

    8. Comments

    If it’s unclear why a portion of code exists, that’s a good indication that a comment is needed.

    + Comments should be concise and actionable. + Comments should explain why the code exists — not what the code is doing. + IDE comment keywords such as TODO, FIXME, CHECKME, PENDING, etc should be used to identify specific categories of comments.

    9. Consistency

    The style throughout the codebase should be consistent in terms of the naming, spacing, and brackets. Ideally, the style guidelines have already been established by your team.

    + Is the function, variable, and class naming consistent? + If there isn’t a style guide, the code should maintain consistency with the rest of the codebase.

    10. Safe Parallel Programming

    If the code contains parallel programming, it’s essential to check for deadlocks and race conditions. These issues can be challenging to test by just running the code, so it’s critical to have this looked at by another developer.

    Additional Resources

    Here are some standard code review tools:

    + Crucible + Review Board + Gitlab
    (Gitlab Code Review From Gitlab Release Notes)
    Coding style guidelines:

    + Python Pep 8 Style Guide + Google C++ Style Guide + Google Javascript Style Guide

    Conclusion

    I hope this article has given you more insight into what to look for when reviewing code.

    If you follow the guidelines in this article, code reviews can reduce bugs, and ensure consistency, efficiency, and maintainability.

    If you don’t currently require code reviews on your team, I hope this article has convinced you of the important part they play in developing and maintaining robust systems.


    下载开源日报APP:https://opensourcedaily.org/2579/
    加入我们:https://opensourcedaily.org/about/join/
    关注我们:https://opensourcedaily.org/about/love/
  • 开源日报第833期:《实验用数据 generatedata》

    14 7 月, 2020
    开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
    今日推荐开源项目:《实验用数据 generatedata》
    今日推荐英文原文:《The Pros and Cons of Functional Components in React》

    今日推荐开源项目:《实验用数据 generatedata》传送门:项目链接
    推荐理由:有些项目在运行的时候需要对数据进行处理——很明显你需要一些数据来测试它们能否正常工作。这个项目能够生成各种各样的数据,上到各种随机公司名与人物姓名,下到随机日期和随机数,涵盖了相当广的需求。如果这还不能满足你手上某个奇奇怪怪的需求,它们也提供了开发者文档以供其他人对其进行扩展,剩下的工作就是自己动手丰衣足食了。
    今日推荐英文原文:《The Pros and Cons of Functional Components in React》作者:Rianna Cleary
    原文链接:https://medium.com/better-programming/pros-cons-of-functional-components-in-react-f52bded98db0
    推荐理由:在 React 中函数组件相较于类组件的优缺点介绍

    The Pros and Cons of Functional Components in React

    Are functional components better to implement than class components? If so, why?

    In this article, I’m going to be explaining what functional components are and when you should use them in your applications! First, I’ll be doing a quick overview of class components. Then, we’ll jump into functional components.

    What Are Class Components?

    Class components are sometimes categorized as smart or stateful components because they implement logic and state. They’re ES6 classes and contain the Component class in React. Lifecycle methods can be used inside these components ( componentDidUpdate, componentDidMount, etc.). Class components are a bit more complex because you have to keep track of not only lifecycle methods but also their side effects such as re-rendering, and data flow management.
    import React, { Component } from "react";
    
    class Planet extends Component {
     state = {
      message: ''
    }
     render() {
        return (
          <div>
            <h1>Hello from Planet!</h1>
          </div>
        );
      }
    }
    
    export default Planet;
    

    Functional Components

    Functional components are JavaScript (or ES6) functions that return React elements. They’re a bit easier to understand because there isn’t as much going on as there would be in a class component. They can also be written as a simple JS functions or as an arrow function using ES6 syntax, and their props are passed in as arguments (if any).
    function Planet() {
     return (<h1>This is a functional component!</h1>);
    };
    //OR//
    const Planet = () => {
     return (<h1>I'm also a functional component!</h1>)
    };
    
    Unlike class components, functional components are stateless, which means that there are no lifecycle methods or state management. However, with React Hooks, there are provided functions for us to do so, such as useState() & useEffect(). To learn more about hooks, please check out the documentation.

    Pros

    • Easier to test: You don’t have to worry about hidden state and there aren’t as many side effects when it comes to functional components, so for every input, the functions will have exactly one output.
    • Easier to read/write: The syntax is less complex than that of class components, and it’s easier to read due to knowing how much you can’t do with functional components already. The use of prop destructuring makes it really beneficial to see what’s going on and what’s coming out of the component.
    • Easier to debug: Again, functional components depend on the props they are given and don’t reply on state. There isn’t a reason to console.log() your state to constantly understand the changes that are going on.

    Cons

    • Relearning new syntax: The syntax could be unusual at first glance and difficult to pick up because of how long class components have been around. In classes, you declare a render function. With functions, you don’t. For passing around props in classes, you could either send them as class properties to the component or declare default props below the component. In contrast, functional components send props as arguments. Differences like these can be challenging for other devs to understand if they’re not used to writing their apps this way.
    • Performance optimization: There isn’t really a difference in terms of which components benefit you more performance-wise; however, since functional components don’t have access to methods like shouldComponentUpdate and PureComponent, it could be a bit of an inconvenience to optimize them for performance.

    Conclusion

    Functional components are sort of becoming equal to class components in terms of functionality. Developers usually used functional components if they were just rendering something and didn’t need to pass state around or use lifecycle methods. Although, as mentioned before, hooks were introduced with React version 16.8. This has allowed developers to use lifecycle methods and state with functional components! It’s not recommended to go back into your apps and convert your classes to functional components because there’s a difference between how state is manipulated and how lifecycles work. Definitely give functional components a try in newer applications, and you’ll be amazed to see what you can create!
    下载开源日报APP:https://opensourcedaily.org/2579/
    加入我们:https://opensourcedaily.org/about/join/
    关注我们:https://opensourcedaily.org/about/love/
  • 开源日报第832期:《Magisk》

    13 7 月, 2020
    开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
    今日推荐开源项目:《Magisk》
    今日推荐英文原文:《Why Do We Hate What We Love?》

    今日推荐开源项目:《Magisk》传送门:GitHub链接
    推荐理由: Magisk 是一套用于定制 Android 的开源工具,支持 Android4.2 以上的设备。目前许多使用者将它作为获取 root 权限的工具,不过它的功能不止于此。它不仅能够有针对性地隐藏权限,还包含许多不同功能的模块满足用户的定制化需求,不过安装有点复杂。
    今日推荐英文原文:《Why Do We Hate What We Love?》作者:Emily Wilcox
    原文链接:
    推荐理由:真正热爱一件事情时,我们的感情是很复杂的。最好的情况是,痛并快乐着。

    Why Do We Hate What We Love?

    To do something you love is to know that you won’t always like it.

    The other day I made like a corkscrew and began spiralling down a narrow hole. Except not a wine bottle (because wine sucks, Nesquik is the future), but a Google search (the internet also sucks, but if you know what to type in then there’s a much higher likelihood of it at least being Robert Pattinson that you find).

    I looked up: “why do artists hate what they make?”

    Seventeen minutes later, plus an interlude filled with custard creams and a quick wee, it finally occurred to me. Loving what you do is not at all the same as liking what you do.

    And that, that is a tricky concept to accept.

    Love and Happiness are Not the Same

    First of all, this doesn’t just regard artists.

    This extends to everybody, all people, any human with the capacity for self-awareness (so not a certain American president then). We’ve all evolved alongside the notion that life is about doing what you love; which it is. About being happy; which it is. It is those that balance out your very existential purpose.

    But I think we have a tendency to get them misconstrued. We merge them together in places they are not meant to bisect.

    Loving something does not mean it will always make you happy. A musician often suffers for hours pouring their soul out through their fingertips and across the piano keys. Boxers are put through brutal, seemingly endless days of training only to potentially come out as the loser of their fight. Parents want to launch their kids out of many third storey windows more often than not. Teachers don’t get appreciated. Doctors get underpaid. Gillian McKeith deals with crap, daily. We suffer for what we love.

    It doesn’t, it won’t, it shouldn’t always make us happy — because to love something so wholly means to love all the darkness too. The shadows, the doubt, the thin line in which you teeter so precariously, toes hanging over the edge towards hate. It’s in knowing this that we find meaning and purpose. And it’s in knowing this that our happiness, ultimately, arises.

    When we love something, we don’t necessarily like each integral component that falls within that bracket. Football fans love football, but there’s still the odd penalty shot that drives them to hold up a specific finger, yelling out a specific naughty word as though the players can hear him, and only him, specifically. Writers love writing, but there’s still a few sentences (and the rest) that make them physically nauseous. Competitive eaters love competitive eating, but there will come a point where that one additional mouthful will be one mouthful too far (can’t relate. I haven’t stopped snacking since 2005 and that was only because I had the chicken pox and my hands were too busy scratchin’).

    Because love is this intrinsic connection we have with something, rooted deep inside our soul and extending out towards it. Happiness, too, is sourced directly from within us, it is not a product of any external activity or person. You can’t buy it online. You won’t find it printed onto the inside of a yoghurt lid. It’s not something that you have to outwardly seek out, scouring through charity shops and market stalls and the back of your sisters wardrobe. It’s not a thing that you find, it’s the way that you are. It’s a mindset. A style of living. You already carry it all within you.

    Ultimate happiness comes from introspection. From our ability to realise that doing what we love, dedicating our lives to the craft and persevering through the pain, that’s what makes it all worthwhile. To procure happiness, we have to accept that love comes in layers in which, sure, happiness is the surface level, but sometimes we have to dig deeper and wade through the darkness below before we can emerge into the light again. Doing what you love will sometimes suck. A lot. And then maybe a little. And then perhaps somewhere in between. We just have to remember that, to be happy overall, we have to accept that we won’t be happy for every all.

    That’s why it’s called a labour of love.

    Because sometimes it’ll feel like you’re tearing open your very flesh and this slimy, bald creature will emerge. It’ll stink, you’ll cry, it’ll cry, you might have even crapped yourself upon it’s birth. But look! You made this! This tiny thing that you turded out, you made it! You brought it to life. And even during the hours when its incessant wailing keeps you awake, when you’re about ready to peel off your own skin and use it as a parachute to sky-dive out your bathroom window, you’ll know somewhere inside yourself that you wouldn’t have it any other way. Because this lump of your DNA — whether that’s a child or a project or a skill — you can’t help but love it.

    Even when you hate it a little bit.

    But Why Do We Suffer Through It?

    Why does this even happen at all?

    Back to my earlier internet search: why do artists not like their art? Why do we dislike, even hate, the things we make?

    The Issue:

    Comparison.

    Because whatever we have created, it doesn’t match our expectations, it doesn’t live up to what we had imagined (ask anybody. Carry out some personal research. Quiz yourself as to why you’ve disliked something that you’ve made. Whether that’s a sculpture or a cuppa or a tattoo design. You’ll see). Whether that’s comparison to somebody else’s work, to an existing piece of our own, or even comparing ourselves to what we know we can achieve even if we haven’t yet — this is where we stumble.

    The Solution:

    STOP COMPARING YOURSELF TO OTHERS. The person we are right here in this moment is not that famous violinist on Instagram. We are not your best friend’s nephew who has his watercolour canvases curated in the Louvre. We are not Shakespeare or Thomas Edison or Mr Singh, my GCSE biology teacher who was one of the world’s leading experts on sneezing. We are ourselves. We are who we are right now. Nobody else. Only us. We cannot be them, the same way they cannot be us. Our talent is our existence. That’s all that matters.

    STOP COMPARING YOURSELF TO YOURSELF. If we are who we are right now, this also means we are not who we were yesterday — we’re an accumulation of every moment of ourselves, sure, but with the addition of everything that has happened since then, too. Every passing thought, every loo break, every spoonful of Coco Pops floating in dark chocolate almond milk. So it stands to reason that the circumstances surrounding us when we made our Great Thing the other week, they do not apply here. It’s a different day, a different time, our bowels might be at a different capacity of fullness, our hair a little more unruly, perhaps we’ve even gained an extra limb (oh wait no, don’t worry, it’s just a spot. Friggin’ huge one at that). So we can’t expect ourselves to produce something identical to before.

    Our abilities might have rusted a little depending on our practise since then. Or they might have improved tenfold. All that potential for greatness still resides within us, because it is us, we just need to observe it in the context of where we’re at right now. What we’re thinking. What we’re feeling. Then go from there. What we make now is just as important as what we made before; in different ways, in similar ways, but no matter what, in every way.

    STOP COMPARING YOURSELF TO THIS IMAGINARY, HYPOTHETICAL, PARALLEL UNIVERSE VERSION OF YOURSELF. We need to realise that what we had imagined and what we have right there before us, they’re two separate beings. Both beautiful, both unique, both not at all the same thing. What we picture in our mind is exactly that, a collection of thoughts merged into an image, residing in our brain. What we hold in our hands is exactly that, a collection of paints or sounds or words, merged into art, residing in our palms. They are two completely different manifestations, even if they do happen to appear identical. See them as such. Do not compare them. Appreciate them both for what they are — pieces of us. We need to go easy on ourselves. The image in our head is just as worthwhile as the product in our grasp. We can love both equally, you know? Just a shame we can’t gift wrap the one in our brains and send it to Aunt Lilah for her 60th.

    The point is, guys: we tend to dislike what we make because it either does not live up to the standard we have savagely set for ourselves, derived from our perceptions of other’s, or it did not quite turn out the way we’d thought it would. But you know what? That doesn’t make it any less great — this is just us expressing our innate tendency to never be happy with what we’ve got. We’re just human beings, being human. But just for a moment, be more than that.

    Transcend your humanity and return back to our very origins; the universe itself (we are starmade miracles, my friend). Be the cosmos looking in on itself and admiring what it has made. See your creation as an independent entity, this standalone spellbinding something, derived completely from you, right here, right now. Stop comparing it. Let it be what it is.

    And what it is is a masterpiece.

    You Know How

    No, really. You know how. To do anything. To be anyone. To live and love and be happy.

    Self-awareness. That’s all you need.

    Look inside yourself. Wade past all that dusty crap stored in boxes labelled “Adult Responsibilities” (trust me, it’s a trap. The cardboard is flimsy, rotten, mouldy and everything inside is just a mess) and dig deep for the good stuff. Find your inner kid.

    Because no kid hates what they’ve made — they are not comparing it to others, they are not limiting themselves to predetermined criteria. They are simply using their minds, all corners of it, to bring to life a piece of themselves. That’s the only difference you see. In the years that we’ve grown we’ve been exposed to comparison and self-doubt. We’ve witnessed others evolve in ways we have yet to, sprouting out in all different directions whilst we remain rooted in the soil. But not children. They are simply raw and ready and reaching up towards the sunlight. They don’t care what flower they blossom into. They only care that they do.

    So just remember: you can’t get a tattoo without first being stabbed.

    You can’t love something so wholeheartedly without suffering for it, somehow. Love, by definition, is the very deepest of feelings. The most potent, the most powerful, the most real. Which means you have to feel it all.


    下载开源日报APP:https://opensourcedaily.org/2579/
    加入我们:https://opensourcedaily.org/about/join/
    关注我们:https://opensourcedaily.org/about/love/
  • 开源日报第831期:《ultimate-go》

    12 7 月, 2020
    开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
    今日推荐开源项目:《ultimate-go》
    今日推荐英文原文:《Trump eyes a ban on TikTok: Everything you need to know》

    今日推荐开源项目:《ultimate-go》传送门:项目链接
    推荐理由:这个仓库包含了作者学习go和计算机系统的相关笔记. 作者非常赞同通过例子进行学习, 因此作者尽量将笔记以注释的形式放在源码中而非独立撰写markdown文本.
    今日推荐英文原文:《Trump eyes a ban on TikTok: Everything you need to know》作者:Queenie Wong, Laura Hautala
    原文链接:https://www.cnet.com/news/trump-eyes-a-ban-on-tiktok-everything-you-need-to-know/
    推荐理由:抖音, 外国名叫TikTok. 因为新冠病毒的印象, 全世界大部分人被迫呆在家里, 人们不得不刷短视频消磨时间. 抖音作为宣传中国文化的手段获得了巨大的人气, 与此同时, 美国等国家也开始了对抖音快速传播的阻挠.

    Trump eyes a ban on TikTok: Everything you need to know

    TikTok, an app known for quirky short videos, is facing political heat because of its ties to China.

    Owned by ByteDance, a tech company based in Beijing, TikTok’s popularity has exploded over the past year. It’s gotten a new boost from the coronavirus pandemic, drawing in users looking to escape the boredom of quarantine. The app has been downloaded more than 2 billion times, according to research firm Sensor Tower, with 623 million coming during the first half of this year. India is its largest market, followed by Brazil and the US. (TikTok isn’t available in China, where ByteDance distributes a domestic version called Douyin.)

    Now TikTok’s growth is under fire because governments are concerned the Chinese government might have sway over the app. Citing national security concerns, India banned TikTok last week. The US and Australia are also considering blocking the app. The US Army and Navy have banned service members from downloading the app to government-issued phones. Even Amazon has raised concerns. On Friday, the huge online retailer barred employees from using the app on devices that connect to the company’s email, citing “security risks.”

    Here’s what you need to know about the political backlash against TikTok:

    Why does the Trump administration want to ban TikTok?

    Politicians are worried the Chinese government could use the video app to spy on US citizens. In an interview with Fox News aired on Monday, Secretary of State Mike Pompeo said that users who downloaded the app are putting “private information in the hands of the Chinese Communist Party.” President Donald Trump cited a different reason for a potential TikTok ban: punishing China for its response to the coronavirus. Asked about Pompeo’s remarks in an interview with Gray Television, Trump confirmed the US is considering a TikTok ban. “It’s a big business,” Trump said. “Look, what happened with China with this virus, what they’ve done to this country and to the entire world is disgraceful.”

    It’s unclear how likely a ban would be, but analysts say it won’t be easy to implement.

    The US Department of State declined to provide any additional information. The White House didn’t immediately have a comment.

    How has TikTok responded to a possible ban?

    Concerns about privacy and national security aren’t new to TikTok, and it’s tried to push back against political scrutiny. Last year, TikTok said in a blog post that all US user data is stored in the US with a backup in Singapore. TikTok also said its data centers are outside China and none of its data is subject to Chinese law.

    “TikTok is led by an American CEO, with hundreds of employees and key leaders across safety, security, product, and public policy here in the US,” a TikTok spokesperson said in a statement addressing Pompeo’s comments. “We have never provided user data to the Chinese government, nor would we do so if asked.”

    How would a ban work?

    The US government would have to find a legally sound reason to request that Apple and Google pull TikTok from their app stores, according to analysts. And the companies could put up a fight.

    “The tech community will be very hesitant to go along with this app ban,” said Wayne Lam, an independent technology analyst. “It sets a precedent for the government to ban other apps or even for other global apps to be inaccessible to the US market.”

    Even if the app were banned, users can install apps on Android devices without downloading them from the Google Play Store, said Carolina Milanesi, a tech analyst at Creative Strategies.

    “I don’t know at that point how you police that,” Milanesi said.

    The US Commerce Department could also put TikTok on its “entity” list, restricting the company’s access to US technology, she said. Chinese tech company Huawei is already on that list. Adding TikTok to the list would mean the app wouldn’t be allowed on Google’s or Apple’s store, she said.

    Lam said that the US government could block traffic to TikTok, but that is “unlikely to succeed given our legal systems.”

    Governments that have banned TikTok haven’t been able to fully block access. Last week, India banned TikTok and 58 other Chinese apps, saying in a statement that the services are “prejudicial to the sovereignty and integrity of India, defence of India, security of state and public order.” The move came after at least 20 Indian soldiers were killed during a clash with Chinese troops along a disputed border in the Himalayas.

    The Indian Express reported that TikTok has been removed from the Google and Apple app stores, preventing new users from downloading the app. But users who already had TikTok on their phones were still able to access the service. Some TikTok users in India also started seeing alerts that said TikTok is working with the government to comply with its order.

    Google declined to comment. Apple didn’t respond to a request for comment.

    Can the government ban a specific app?

    The administration has limited authority to ban outright any specific piece of software, like an app. But it could potentially lobby Congress to enact legislation that targets TikTok, said Kurt Opsahl, general counsel at the Electronic Frontier Foundation, an advocacy group.

    Currently, Opsahl said, “There is no law that would authorize the federal government to ban ordinary American from using an app.”

    Sounds like a ban would prompt challenges by TikTok and the app stores. What would they likely do?

    Any scenario would create opportunities for legal challenges. A law or executive order that targets TikTok could spur a challenge under the First Amendment, Opsahl said. The challenges would be based on previous court rulings that show “code is speech,” Opsahl said. Such rulings include Bernstein v. DOJ, in which the court found a computer scientist had the First Amendment right to publish an encryption algorithm.

    Additionally, Apple and Google could push back on any orders to remove TikTok from their app stores, challenging a potential executive order or any fines charged by the Commerce Department after placing TikTok on the entity list.

    Is there anything short of a ban the government can do to ruin TikTok’s day? The Committee on Foreign Investment in the US is already investigating TikTok for national security concerns. The investigation, first reported in November 2019 and run out of the Commerce Department, could end up requiring changes to TikTok’s substantial operations inside the US.

    One requirement could be selling off Musical.ly, a US company ByteDance acquired in 2017 for $800 million that was rebranded as TikTok. The acquisition helped TikTok gain traction with US teens.
    下载开源日报APP:https://opensourcedaily.org/2579/
    加入我们:https://opensourcedaily.org/about/join/
    关注我们:https://opensourcedaily.org/about/love/
←上一页
1 … 50 51 52 53 54 … 262
下一页→

Proudly powered by WordPress