From eb03c49ac738fa8fb3f9b080501b994a988c2e89 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 Jan 2017 09:28:04 +0800 Subject: [PATCH 01/73] =?UTF-8?q?20170111-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...70107 Min Browser Muffles the Web Noise.md | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 sources/tech/20170107 Min Browser Muffles the Web Noise.md diff --git a/sources/tech/20170107 Min Browser Muffles the Web Noise.md b/sources/tech/20170107 Min Browser Muffles the Web Noise.md new file mode 100644 index 0000000000..814c19d0ae --- /dev/null +++ b/sources/tech/20170107 Min Browser Muffles the Web Noise.md @@ -0,0 +1,122 @@ +Min Browser Muffles the Web's Noise +============================================================ + ![Min Browser Muffles the Web's Noise](http://www.linuxinsider.com/ai/637666/browser-tabs.jpg) + +[Min][1] is a Web browser with a minimal design that provides speedy operation with simple features. + +When it comes to software design, "minimal" does not mean low functionality or undeveloped potential. If you like minimal distraction tools for your text editor and note-taking applications, that same comfort appeal is evident in the Min browser. + +I mostly use Google Chrome, Chromium and Firefox on my desktops and laptop computers. I am well invested in their add-on functionality, so I can access all the specialty services that get me through my long sessions in researching and working online. + +However, I sometimes prefer a fast, uncluttered alternative on-ramp to the Internet. With multiple projects in progress, I can amass a wide collection of open tabs or even separate windows of the powerhouse browsers in no time. + +I have tried other browser options with little success. The alternatives usually have their own sets of distracting add-ons and features that tend to pull me into more off-task behavior. + +The Min browser does not do that. It is a GitHub-sourced Web browser that is easy to use, and it keeps the typical interruptions from distracting me. + + ![Min browser ](http://www.linuxinsider.com/article_images/2017/84212_620x514.jpg) +The Min browser is minimal-design Web browser that provides speedy operation with simple features. Just don't expect to take its tour any time soon. + +### What It Does + +The Min browser comes in versions for Debian Linux variants, Windows and Mac machines. It can not compete with the functionality available in the mainstream cross-platform Web browsers. + +It does not have to compete, though. Its claim to fame very well might be supplementing rather than replacing them. + +One big reason for this is its built-in ad blocking capability. Out of the box, the Min browser needs no configuration or hunting for compatible third-party apps to do end-runs around ads. + +In Edit/Preferences, you have three options to click/unclick for content blocking. It's easy to modify blocking tactics to suit your preferences. The Block Trackers and Ads option uses EasyList and EasyPrivacy. If nothing else, keep this option checked. + +You also can block scripts and block images. Doing both maximizes the website loading speeds and really ramps up your protection against rogue code attacks. + +### Have Search Your Way + +If you spend considerable time doing online research, you will adore the way Min handles searching. It is a top-notch feature. + +Search functionality is accessible right in the browser's URL bar. Min utilizes search engine DuckDuckGo and Wikipedia entries. You can enter search queries directly into the Web address field. + +This approach saves time since you do not have to go to the search engine window first. A nice bonus is the ability to search your bookmarks. + +In the Edit/Preferences menu, choose your choice for default search engine. The list includes DuckDuckGo, Google, Bing, Yahoo, Baidu, Wikipedia and Yandex. + +Try making DuckDuckGo your default search engine. Min is built around that option but does not impose it on you. + + ![Min browser search function ](http://www.linuxinsider.com/article_images/2017/84212_620x466.jpg) +Min browser's search functionality is part of the URL bar. Min utilizes search engine DuckDuckGo and Wikipedia entries. You can enter search queries directly into the Web address window. + +The search bar displays answers to your questions very rapidly. It uses information from DuckDuckGo including Wikipedia entries, a calculator and more. + +It offers quick snippets, answers and Web suggestions. It sort of substitutes for not being in a Google-based environment. + +### Navigating Aids + +Min lets you jump to any site quickly with fuzzy search. It throws suggestions at you almost immediately. + +I like the way the tabs open next to the current tab. You do not have to set this preference. It is there by default with no other choice, but it makes sense. + +[ + ![Min browser Tasks](http://www.linuxinsider.com/article_images/2017/84212_620x388-small.jpg) +][2]One of Min's really cool operations is the ability to organize tabs into Tasks that you can search anytime. (click image to enlarge) + +Tabs you have not clicked on for a while dim. This lets you concentrate on your current task without distractions. + +Min does not need an add-on tool to keep numerous tabs under control. The browser displays a list of tags and lets you split them into groups. + +### Stay Focused + +Min has an optional Focus Mode hidden in the View menu. When enabled, it hides all tabs except the one you have opened. You must return to the menu to turn off Focus Mode before you can open new tabs. + +The Tasks feature also helps you stay focused. You can create tasks from the File menu or with Control+Shift+N. If you want to open a new tab, you can select that option in the Files menu or use Control+T. + +Call the new task whatever fits your style. I like being able to organize and display as a group all the tabs associated with a work project or a specific portion of my research. I can recall the entire list at any time to easily and quickly find where I was in my browsing adventure. + +Another neat feature is found under the paragraph alignment icon in the tab area. Click it to enable Reading Mode. This mode saves the article for future reference and strips away everything on the page so you can focus on the task of reading. + +### Not Perfect + +The Min browser is not a perfect alternative to high-powered, feature-bloated alternatives. It does have a few glaring weaknesses that developers have taken too long to rectify. + +For instance, It lacks a solid developer website stocked with support forums and detailed user guides. That may be partly due to its home being GitHub rather than an independent developer website. Still, it's a weakness that is glaring to new users. + +Without website support, users are forced to struggle with lists of readme files and hard-to-follow directories on GitHub. You can access them from the Min browser Help menu -- but that's not much help. + +A case in point is the Welcome to Min splash screen that loads from the menu when you launch the browser. It displays two buttons. One says "Start Browsing." The other says "Take a Tour." Neither one works. + +However, you can start browsing by clicking on the menu bar at the top of the Min window. There is no workaround for the missing tour, though. + +### Bottom Line + +Min is not a full-featured Web browser with bells and whistles galore. It is not designed for add-ons and many other features you typically use in well-established Web browsers. However, Min serves an important niche purpose by offering speed and distraction-free browsing. + +The more I use the Min browser, the more productive it is for me -- but be wary when you first start to use it. + +Min is not complicated or confusing -- it is just quirky. You have to play around with it to discover how it works. + +### Want to Suggest a Review? + +Is there a Linux software application or distro you'd like to suggest for review? Something you love or would like to get to know? + +Please [email your ideas to me][3], and I'll consider them for a future Linux Picks and Pans column. + +And use the Reader Comments feature below to provide your input! + +-------------------------------------------------------------------------------- + +作者简介: + +Jack M. Germain has been writing about computer technology since the early days of the Apple II and the PC. He still has his original IBM PC-Jr and a few other legacy DOS and Windows boxes. He left shareware programs behind for the open source world of the Linux desktop. He runs several versions of Windows and Linux OSes and often cannot decide whether to grab his tablet, netbook or Android smartphone instead of using his desktop or laptop gear. You can connect with him on Google+. + +-------------------------------------------------------------------------------- + +via: http://www.linuxinsider.com/story/84212.html?rss=1 + +作者:[Jack M. Germain][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxinsider.com/story/84212.html?rss=1#searchbyline +[1]:https://github.com/minbrowser/min/releases/ +[2]:http://www.linuxinsider.com/article_images/2017/84212_1200x750.jpg +[3]:mailto:jack.germain@newsroom.ectnews.com From 3e840f70e4a24ea0417afe73195c386181fca18a Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 11 Jan 2017 09:30:32 +0800 Subject: [PATCH 02/73] translating --- ...Build Strong Real-Time Streaming Apps with Apache Calcite.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20161104 Build Strong Real-Time Streaming Apps with Apache Calcite.md b/sources/talk/20161104 Build Strong Real-Time Streaming Apps with Apache Calcite.md index df3f70e782..d29a8e594c 100644 --- a/sources/talk/20161104 Build Strong Real-Time Streaming Apps with Apache Calcite.md +++ b/sources/talk/20161104 Build Strong Real-Time Streaming Apps with Apache Calcite.md @@ -1,3 +1,5 @@ +translating---geekpi + # Build Strong Real-Time Streaming Apps with Apache Calcite From 6e95fae1f89058f5929d3d8103511404589cff3a Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 Jan 2017 09:31:24 +0800 Subject: [PATCH 03/73] =?UTF-8?q?20170111-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Delete ‘Files and Directories in Linux.md | 210 ++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 sources/tech/20160110 3 Ways to Permanently and Securely Delete ‘Files and Directories in Linux.md diff --git a/sources/tech/20160110 3 Ways to Permanently and Securely Delete ‘Files and Directories in Linux.md b/sources/tech/20160110 3 Ways to Permanently and Securely Delete ‘Files and Directories in Linux.md new file mode 100644 index 0000000000..03b954233e --- /dev/null +++ b/sources/tech/20160110 3 Ways to Permanently and Securely Delete ‘Files and Directories in Linux.md @@ -0,0 +1,210 @@ +3 Ways to Permanently and Securely Delete ‘Files and Directories’ in Linux +============================================================ + +In most cases the means we use to [delete a file from our computers][1] such as using `Delete` key, Trash files or `rm` command, which do not permanently and securely remove the file from the hard disk (or any storage media). + +The file is simply hidden from users and it resides somewhere on the hard disk. It can be recovered by data thieves, law enforcement or other threats. + +Assuming a file contains classified or secret content such as usernames and passwords of a security system, an attacker with the necessary knowledge and skills can easily [recover a deleted copy of the file][2] and access these user credentials (and you can probably guess the aftermath of such as scenario). + +In this article, we will explain a number of command line tools for permanently and securely deleting files in Linux. + +### 1\. Shred – Overwrite a File to Hide Content + +shred overwrites a file to hide its contents, and can optionally delete it as well. + +``` +$ shred -zvu -n 5 passwords.list +``` + +In the command below, the options: + +1. `-z` – adds a final overwrite with zeros to hide shredding +2. `-v` – enables display of operation progress +3. `-u` – truncates and removes file after overwriting +4. `-n` – specifies number of times to overwrite file content (the default is 3) + +[ + ![shred - overwrite a file to hide its contents](http://www.tecmint.com/wp-content/uploads/2017/01/shred-command-example.png) +][3] + +shred – overwrite a file to hide its contents + +You can find more usage options and information in the shred man page: + +``` +$ man shred +``` + +### 2\. Wipe – Securely Erase Files in Linux + +A Linux wipe command securely erases files from magnetic memory and thereby making it impossible to [recover deleted files or directory content][4]. + +First, you need to install wipe tool in order to it, run the appropriate command below: + +``` +$ sudo apt-get install wipe [On Debian and its derivatives] +$ sudo yum install wipe [On RedHat based systems] +``` + +The following command will destroy everything under the directory private. + +``` +$ wipe -rfi private/* +``` + +where the flags used: + +1. `-r` – tells wipe to recurse into subdirectories +2. `-f` – enables forced deletion and disable confirmation query +3. `-i` – shows progress of deletion process + +[ + ![Wipe - Securely Erase Files in Linux](http://www.tecmint.com/wp-content/uploads/2017/01/Wipe-Securely-Erase-Files.png) +][5] + +Wipe – Securely Erase Files in Linux + +Note: Wipe only works reliably on magnetic memory, therefore use the other methods for solid state disks (memory). + +Read through the wipe man page for additional usage options and instructions: + +``` +$ man wipe +``` + +### 3\. Secure-deletetion Toolkit for Linux + +Secure-delete is a collection of secure file deletion tools, that contains srm (secure_deletion) tool, which is used to remove files securely. + +First you need to install it using the relevant command below: + +``` +$ sudo apt-get install secure-delete [On Debian and its derivatives] +$ sudo yum install secure-delete [On RedHat based systems] +``` + +Once installed, you can use srm tool to remove files or directories securely on a Linux system as follows. + +``` +$ srm -vz private/* +``` + +where the options used: + +1. `-v` – enables verbose mode +2. `-z` – wipes the last write with zeros instead of random data + +[ + ![srm - Securely Delete Files in Linux ](http://www.tecmint.com/wp-content/uploads/2017/01/srm-securely-delete-Files-in-Linux.png) +][6] + +srm – Securely Delete Files in Linux + +Read through the srm man page for more usage options and information: + +``` +$ man srm +``` + +### 4\. sfill -Secure Free Disk/Inode Space Wiper + +sfill is a part of secure-deletetion toolkit, is a secure free disk and inode space wiper, it deletes files on free disk space in a secure method. sfill [checks the the free space on the specified partition][7] and fills it with random data from /dev/urandom. + +The command below will execute sfill on my root partition, with the `-v` switch enabling verbose mode: + +``` +$ sudo sfill -v /home/aaronkilik/tmp/ +``` + +Assuming you created a separate partition, `/home` to store normal system users home directories, you can specify a directory on that partition to apply sfill on it: + +``` +$ sudo sfill -v /home/username +``` + +The are a few limitations of sfill that you can read about in the man page, where you can also find additional usage flags and instructions: + +``` +$ man sfill +``` + +Note: These following two tools (sswap and sdmem) in the secure-deletetion toolkit are not directly relevant for the scope of this guide, however, we will explain them for knowledge purpose and future use. + +### 5\. sswap – Secure Swap Wiper + +It is a secure partition wiper, sswap deletes data present on your swap partition in a secure manner. + +Caution: remember to unmount your swap partition before using sswap! Otherwise your system might crash! + +Simply determine you swap partition (and check if paging and swapping devices/files are turned on using swapon command), next, disable paging and swapping devices/files with swapoff command (renders swap partition unusable). + +Then run sswap command on the swap partition: + +``` +$ cat /proc/swaps +$ swapon +$ sudo swapoff /dev/sda6 +$ sudo sswap /dev/sda6 #this command may take some time to complete with 38 default passes +``` +[ + ![sswap - Secure Swap Wiper](http://www.tecmint.com/wp-content/uploads/2017/01/sswap-Secure-Swap-Wiper.png) +][8] + +sswap – Secure Swap Wiper + +Make an effort to read through the sswap man page for more usage options and information: + +``` +$ man sswap +``` + +### 6\. sdmem – Secure Memory Wiper + +sdmem is a secure memory wiper, it is designed to remove data present in your memory (RAM) in a secure manner. + +It was originally named [smem][9], but because on Debain systems there exists another package called [smem – report memory consumption on per-process and per-user basis][10], the developer decided to rename it sdmem. + +``` +$ sudo sdmem -f -v +``` + +For more usage information, read through the sdmem man page: + +``` +$ man sdmem +``` + +**Suggested Read:** [PhotoRec – Recover Deleted or Lost Files in Linux][11] + +That’s it! In this article, we reviewed a number command line tools for permanently as well as securely deleting files in Linux. As usual, offer your thoughts or suggestions about the post via the comment form below. + +-------------------------------------------------------------------------------- + +作者简介: + +![](http://1.gravatar.com/avatar/7badddbc53297b2e8ed7011cf45df0c0?s=128&d=blank&r=g) +I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+ + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/permanently-and-securely-delete-files-directories-linux/ + +作者:[Ravi Saive][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/admin/ +[1]:http://www.tecmint.com/delete-all-files-in-directory-except-one-few-file-extensions/ +[2]:http://www.tecmint.com/photorec-recover-deleted-lost-files-in-linux/ +[3]:http://www.tecmint.com/wp-content/uploads/2017/01/shred-command-example.png +[4]:http://www.tecmint.com/recover-deleted-file-in-linux/ +[5]:http://www.tecmint.com/wp-content/uploads/2017/01/Wipe-Securely-Erase-Files.png +[6]:http://www.tecmint.com/wp-content/uploads/2017/01/srm-securely-delete-Files-in-Linux.png +[7]:http://www.tecmint.com/find-top-large-directories-and-files-sizes-in-linux/ +[8]:http://www.tecmint.com/wp-content/uploads/2017/01/sswap-Secure-Swap-Wiper.png +[9]:http://www.tecmint.com/smem-linux-memory-usage-per-process-per-user/ +[10]:http://www.tecmint.com/smem-linux-memory-usage-per-process-per-user/ +[11]:http://www.tecmint.com/photorec-recover-deleted-lost-files-in-linux/ From aa5ba9d5815ce452c6c1c8c8cce82de0ecad1963 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 Jan 2017 09:33:29 +0800 Subject: [PATCH 04/73] =?UTF-8?q?20170111-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Recover Deleted or Lost Files in Linux.md | 176 ++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 sources/tech/20170105 PhotoRec – Recover Deleted or Lost Files in Linux.md diff --git a/sources/tech/20170105 PhotoRec – Recover Deleted or Lost Files in Linux.md b/sources/tech/20170105 PhotoRec – Recover Deleted or Lost Files in Linux.md new file mode 100644 index 0000000000..4ae8ef5faf --- /dev/null +++ b/sources/tech/20170105 PhotoRec – Recover Deleted or Lost Files in Linux.md @@ -0,0 +1,176 @@ +PhotoRec – Recover Deleted or Lost Files in Linux +============================================================ + +When you delete a file accidentally or intentionally on your system using ‘shift + delete‘ or delete option or empty Trash, the file content is not destroyed from the hard disk (or any storage media). + +It is simply removed from the the directory structure and you cannot see the file in the directory where you deleted it, but it still remains somewhere in your hard drive. + +If you have the appropriate tools and knowledge, you can [recover lost files from your computer][1]. However, as you store more files on your hard disk, the deleted files are overwritten, you may only recover recently deleted files. + +In this tutorial, we will explain how to recover lost or deleted files on a hard disk in Linux using Testdisk, is a remarkable recovery tool ships in with a free tool called PhotoRec. + +PhotoRec is used to recover lost files from storage media such as hard drives, digital camera and cdrom. + +### Install Testdisk (PhotoRec) in Linux Systems + +To install Testdisk by running the relevant command below for your distribution: + +``` +------- On Debian/Ubuntu/Linux Mint ------- +$ sudo apt-get install testdisk +------- On CentOS/RHEL/Fedora ------- +$ sudo yum install testdisk +------- On Fedora 22+ ------- +$ sudo dnf install testdisk +------- On Arch Linux ------- +$ pacman -S testdisk +------- On Gentoo ------- +$ emerge testdisk +``` + +In case it is not available on your Linux distribution’s repositories, download it from [here][2] and run it on a Live CD. + +It can also be found in rescue CD such as Gparted LiveCD, Parted Magic, Ubuntu Boot CD, Ubuntu-Rescue-Remix and many more. + +Once the installation is complete, start PhotoRec in a text window as follows with root privileges and specify the partition from which the files where deleted: + +``` +$ sudo photorec /dev/sda3 +``` + +You’ll see the interface below: + +[ + ![PhotoRec Data Recovery Tool for Linux](http://www.tecmint.com/wp-content/uploads/2017/01/PhotoRec-Data-Recovery-Tool.png) +][3] + +PhotoRec Data Recovery Tool for Linux + +Use the `right` and `left` arrow keys to select a menu item, and press Enter. To continue with the recovery operation, select `[Proceed]` and hit Enter. + +You will be at the following interface: + +[ + ![Select Partition to Proceed File Recovery](http://www.tecmint.com/wp-content/uploads/2017/01/Select-Partition-to-Proceed-File-Recovery.png) +][4] + +Select Partition to Proceed File Recovery + +Select `[Options]` to view available recovery operation options as in the interface below: + +[ + ![Linux File Recovery Options](http://www.tecmint.com/wp-content/uploads/2017/01/Linux-File-Recovery-Options.png) +][5] + +Linux File Recovery Options + +Press `Q` to move back, at the interface below, you can specify the file extensions you want to search and recover. Therefore, select `[File Opt]` and press Enter. + +Press `s` to disable/enable all file extensions, and in case you have disabled all file extensions, only choose types of files you want to recover by selecting them using `right` arrow keys (or `left` arrow key to deselect). + +For instance, I want to recover all `.mov` files that I lost on my system. + +[ + ![Specify Recovery File Type](http://www.tecmint.com/wp-content/uploads/2017/01/Specify-Recovery-File-Type.png) +][6] + +Specify Recovery File Type + +Then press `b` to save the setting, you should see the message below after pressing it. Move back by hitting Enter (or simply press `Q` button), then press `Q` again to go back to the main menu. + +[ + ![Save File Recovery Settings](http://www.tecmint.com/wp-content/uploads/2017/01/Save-File-Recovery-Settings.png) +][7] + +Save File Recovery Settings + +Now select `[Search]` to start the recovery process. In the interface below, choose the filesystem type where the file(s) were stored and hit Enter. + +[ + ![Select Filesystem to Recover Deleted Files](http://www.tecmint.com/wp-content/uploads/2017/01/Select-Filesystem-to-Recover-Files.png) +][8] + +Select Filesystem to Recover Deleted Files + +Next, choose if only free space or the whole partition needs to be analyzed as below. Note that choosing whole partition will make the operation slower and longer. Once you have selected the appropriate option, press Enterto proceed. + +[ + ![Choose Filesystem to Analyze](http://www.tecmint.com/wp-content/uploads/2017/01/Select-Filesystem-to-Analyze.png) +][9] + +Choose Filesystem to Analyze + +Closely select a directory where recovered files will be stored, if the destination is correct, press `C` button to continue. Choose a directory on a different partition to avoid deleted files being overwritten when more data is stored on the partition. + +To move back until the root partition, use the `left` arrow key. + +[ + ![Select Directory to Save Recovered Files](http://www.tecmint.com/wp-content/uploads/2017/01/Select-Directory-to-Save-Recovered-Files.png) +][10] + +Select Directory to Save Recovered Files + +The screenshot below shows deleted files of the specified type being recovered. You can stop the operation by pressing Enter. + +Note: Your system may become slow, and possibly freeze at certain moments, so you need to be patient until when the process is complete. + +[ + ![Recovering Deleted Files in Linux](http://www.tecmint.com/wp-content/uploads/2017/01/Recover-Deleted-Files-in-Linux.png) +][11] + +Recovering Deleted Files in Linux + +At the end of the operation, Photorec will show you the number and the location of files recovered. + +[ + ![Linux File Recovery Summary](http://www.tecmint.com/wp-content/uploads/2017/01/Linux-File-Recovery-Summary.png) +][12] + +Linux File Recovery Summary + +The recovered files will be stored with root privileges by default, therefore open your file manager with elevated privileges to access the files. + +Use the command below (specify your file manager): + +``` +$ gksudo nemo +or +$ gksudo nautilus +``` + +For more information, visit PhotoRec homepage: [http://www.cgsecurity.org/wiki/PhotoRec][13]. + +That’s all! In this tutorial, we explained the necessary steps to recover deleted or lost files from hard disk using PhotoRec. This is so far the most reliable and effective recovery tool I have ever used, if you know any other similar tool, do share with us in the comments. + +-------------------------------------------------------------------------------- + +作者简介: + +![](http://1.gravatar.com/avatar/4e444ab611c7b8c7bcb76e58d2e82ae0?s=128&d=blank&r=g) + +Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/photorec-recover-deleted-lost-files-in-linux/ + +作者:[Aaron Kili][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/aaronkili/ +[1]:http://www.tecmint.com/recover-deleted-file-in-linux/ +[2]:http://www.cgsecurity.org/wiki/TestDisk_Download +[3]:http://www.tecmint.com/wp-content/uploads/2017/01/PhotoRec-Data-Recovery-Tool.png +[4]:http://www.tecmint.com/wp-content/uploads/2017/01/Select-Partition-to-Proceed-File-Recovery.png +[5]:http://www.tecmint.com/wp-content/uploads/2017/01/Linux-File-Recovery-Options.png +[6]:http://www.tecmint.com/wp-content/uploads/2017/01/Specify-Recovery-File-Type.png +[7]:http://www.tecmint.com/wp-content/uploads/2017/01/Save-File-Recovery-Settings.png +[8]:http://www.tecmint.com/wp-content/uploads/2017/01/Select-Filesystem-to-Recover-Files.png +[9]:http://www.tecmint.com/wp-content/uploads/2017/01/Select-Filesystem-to-Analyze.png +[10]:http://www.tecmint.com/wp-content/uploads/2017/01/Select-Directory-to-Save-Recovered-Files.png +[11]:http://www.tecmint.com/wp-content/uploads/2017/01/Recover-Deleted-Files-in-Linux.png +[12]:http://www.tecmint.com/wp-content/uploads/2017/01/Linux-File-Recovery-Summary.png +[13]:http://www.cgsecurity.org/wiki/PhotoRec From ba54c664a03b256eda774a5547f60229bfd390a2 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 Jan 2017 09:36:14 +0800 Subject: [PATCH 05/73] =?UTF-8?q?20170111-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Description and Location on File System.md | 168 ++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 sources/tech/20170104 5 Ways to Find a Binary Command Description and Location on File System.md diff --git a/sources/tech/20170104 5 Ways to Find a Binary Command Description and Location on File System.md b/sources/tech/20170104 5 Ways to Find a Binary Command Description and Location on File System.md new file mode 100644 index 0000000000..c4fb53f97f --- /dev/null +++ b/sources/tech/20170104 5 Ways to Find a Binary Command Description and Location on File System.md @@ -0,0 +1,168 @@ +5 Ways to Find a ‘Binary Command’ Description and Location on File System +============================================================ + +With the thousands of [commands/programs available in Linux systems][1], knowing the type and purpose of a given command as well as its location (absolute path) on the system can be a little challenge for newbies. + +Knowing a few details of commands/programs not only helps a [Linux user master the numerous commands][2], but it also enables a user understand what operations on the system to use them for, either from the command line or a script. + +Therefore, in this article we will explain to you five useful commands for showing a short description and the location of a given command. + +To discover new commands on your system look into all the directories in your PATH environmental variable. These directories store all the installed commands/programs on the system. + +Once you find an interesting command name, before you proceed to read more about it probably in the man page, try to gather some shallow information about it as follows. + +Assuming you have echoed the values of PATH and moved into the directory /usr/local/bin and noticed a new command called [fswatch (monitors file modification changes)][3]: + +``` +$ echo $PATH +$ cd /usr/local/bin +``` +[ + ![Find New Commands in Linux](http://www.tecmint.com/wp-content/uploads/2017/01/Find-New-Commands-in-Linux.png) +][4] + +Find New Commands in Linux + +Now let’s find out the description and location of the fswatch command using following different ways in Linux. + +### 1\. whatis Command + +whatis is used to display one-line manual page descriptions of the command name (such as fswatch in the command below) you enter as an argument. + +If the description is too long some parts are trimmed of by default, use the `-l` flag to show a complete description. + +``` +$ whatis fswatch +$ whatis -l fswatch +``` +[ + ![Linux whatis Command Example](http://www.tecmint.com/wp-content/uploads/2017/01/Whatis-Command-Example.png) +][5] + +Linux whatis Command Example + +### 2\. apropos Command + +apropos searches for the manual page names and descriptions of the keyword (considered a regex, which is the command name) provided. + +The `-l` option enables showing of the compete description. + +``` +$ apropos fswatch +$ apropos -l fswatch +``` +[ + ![Linux apropos Command Example](http://www.tecmint.com/wp-content/uploads/2017/01/Linux-apropos-Command-Example.png) +][6] + +Linux apropos Command Example + +By default, apropos may show an output of all matched lines, as in the example below. You can only match the exact keyword using the `-e` switch: + +``` +$ apropos fmt +$ apropos -e fmt +``` +[ + ![Linux apropos Command Show by Keyword](http://www.tecmint.com/wp-content/uploads/2017/01/Linux-apropos-Command-Keyword-Example.png) +][7] + +Linux apropos Command Show by Keyword + +### 3\. type Command + +type tells you the full pathname of a given command, additionally, in case the command name entered is not a program that exists as a separate disk file, type also tells you the command classification: + +1. Shell built-in command or +2. Shell keyword or reserved word or +3. An alias + +``` +$ type fswatch +``` +[ + ![Linux type Command Example](http://www.tecmint.com/wp-content/uploads/2017/01/Linux-type-Command-Example.png) +][8] + +Linux type Command Example + +When the command is an alias for another command, type shows the command executed when the alias is run. Use the alias command to view all aliases created on your system: + +``` +$ alias +$ type l +$ type ll +``` +[ + ![Show All Aliases in Linux](http://www.tecmint.com/wp-content/uploads/2017/01/Show-All-Aliases-in-Linux.png) +][9] + +Show All Aliases in Linux + +### 4\. which Command + +which helps to locate a command, it prints the absolute command path as below: + +``` +$ which fswatch +``` +[ + ![Find Linux Command Location](http://www.tecmint.com/wp-content/uploads/2017/01/Find-Linux-Command-Location.png) +][10] + +Find Linux Command Location + +Some binaries can be stored in more than one directory under the PATH, use the `-a` flag to show all matching pathnames. + +### 5\. whereis Command + +whereis command locates the binary, source, and manual page files for the command name provided as follows: + +``` +$ whereis fswatch +$ whereis mkdir +$ whereis rm +``` +[ + ![Linux whereis Command Example](http://www.tecmint.com/wp-content/uploads/2017/01/Linux-whereis-Command-Example.png) +][11] + +Linux whereis Command Example + +Although the commands above may be vital in finding some quick info about a command/program, opening and reading through its manual page always provides a full documentation, including a list of other related programs: + +``` +$ man fswatch +``` + +In this article, we reviewed five simple commands used to display short manual page descriptions and location of a command. You can make a contribution to this post or ask a question via the feedback section below. + +-------------------------------------------------------------------------------- + +作者简介: + +![](http://1.gravatar.com/avatar/4e444ab611c7b8c7bcb76e58d2e82ae0?s=128&d=blank&r=g) + +Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge. + +-------------------------------------------------------------------------------- +via: http://www.tecmint.com/find-linux-command-description-and-location/ + +作者:[Aaron Kili ][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/aaronkili/ +[1]:http://www.tecmint.com/category/top-tools/ +[2]:http://www.tecmint.com/tag/linux-tricks/ +[3]:http://www.tecmint.com/fswatch-monitors-files-and-directory-changes-modifications-in-linux/ +[4]:http://www.tecmint.com/wp-content/uploads/2017/01/Find-New-Commands-in-Linux.png +[5]:http://www.tecmint.com/wp-content/uploads/2017/01/Whatis-Command-Example.png +[6]:http://www.tecmint.com/wp-content/uploads/2017/01/Linux-apropos-Command-Example.png +[7]:http://www.tecmint.com/wp-content/uploads/2017/01/Linux-apropos-Command-Keyword-Example.png +[8]:http://www.tecmint.com/wp-content/uploads/2017/01/Linux-type-Command-Example.png +[9]:http://www.tecmint.com/wp-content/uploads/2017/01/Show-All-Aliases-in-Linux.png +[10]:http://www.tecmint.com/wp-content/uploads/2017/01/Find-Linux-Command-Location.png +[11]:http://www.tecmint.com/wp-content/uploads/2017/01/Linux-whereis-Command-Example.png From b25e6e662ce7681d9823c15eb2ea2f8d19c4a1a9 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 Jan 2017 09:37:50 +0800 Subject: [PATCH 06/73] =?UTF-8?q?20170111-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ands in Shell Script with Shell Tracing.md | 258 ++++++++++++++++++ 1 file changed, 258 insertions(+) create mode 100644 sources/tech/20161231 How to Trace Execution of Commands in Shell Script with Shell Tracing.md diff --git a/sources/tech/20161231 How to Trace Execution of Commands in Shell Script with Shell Tracing.md b/sources/tech/20161231 How to Trace Execution of Commands in Shell Script with Shell Tracing.md new file mode 100644 index 0000000000..4c86d67f49 --- /dev/null +++ b/sources/tech/20161231 How to Trace Execution of Commands in Shell Script with Shell Tracing.md @@ -0,0 +1,258 @@ +How to Trace Execution of Commands in Shell Script with Shell Tracing +============================================================ + +In this article of the [shell script debugging series][3], we will explain the third shell script debugging mode, that is shell tracing and look at some examples to demonstrate how it works, and how it can be used. + +The previous part of this series clearly throws light upon the two other shell script debugging modes: verbose mode and syntax checking mode with easy-to-understand examples of how to enable shell script debugging in these modes. + +1. [How To Enable Shell Script Debugging Mode in Linux – Part 1][1] +2. [How to Perform Syntax Checking Debugging Mode in Shell Scripts – Part 2][2] + +Shell tracing simply means tracing the execution of the commands in a shell script. To switch on shell tracing, use the `-x` debugging option. + +This directs the shell to display all commands and their arguments on the terminal as they are executed. + +We will use the `sys_info.sh` shell script below, which briefly prints your system date and time, number of users logged in and the system uptime. However, it contains syntax errors that we need to find and correct. + +``` +#!/bin/bash +#script to print brief system info +ROOT_ID="0" +DATE=`date` +NO_USERS=`who | wc -l` +UPTIME=`uptime` +check_root(){ +if [ "$UID" -ne "$ROOT_ID" ]; then +echo "You are not allowed to execute this program!" +exit 1; +} +print_sys_info(){ +echo "System Time : $DATE" +echo "Number of users: $NO_USERS" +echo "System Uptime : $UPTIME +} +check_root +print_sys_info +exit 0 +``` + +Save the file and make the script executable. The script can only be run by root, therefore employ the [sudo command][4] to run it as below: + +``` +$ chmod +x sys_info.sh +$ sudo bash -x sys_info.sh +``` +[ + ![Shell Tracing - Show Error in Script](http://www.tecmint.com/wp-content/uploads/2016/12/Shell-Tracing-Errors.png) +][5] + +Shell Tracing – Show Error in Script + +From the output above, we can observe that, a command is first executed before its output is substituted as the value of a variable. + +For example, the date was first executed and the its output was substituted as the value of the variable DATE. + +We can perform syntax checking to only display the syntax errors as follows: + +``` +$ sudo bash -n sys_info.sh +``` +[ + ![Syntax Checking in Script](http://www.tecmint.com/wp-content/uploads/2016/12/Syntax-Checking-in-Script.png) +][6] + +Syntax Checking in Script + +If we look at the shell script critically, we will realize that the `if statement` is missing a closing `fi` word. Therefore, let us add it and the new script should now look like below: + +``` +#!/bin/bash +#script to print brief system info +ROOT_ID="0" +DATE=`date` +NO_USERS=`who | wc -l` +UPTIME=`uptime` +check_root(){ +if [ "$UID" -ne "$ROOT_ID" ]; then +echo "You are not allowed to execute this program!" +exit 1; +fi +} +print_sys_info(){ +echo "System Time : $DATE" +echo "Number of users: $NO_USERS" +echo "System Uptime : $UPTIME +} +check_root +print_sys_info +exit 0 +``` + +Save the file again and invoke it as root and do some syntax checking: + +``` +$ sudo bash -n sys_info.sh +``` +[ + ![Perform Syntax Check in Shell Scripts](http://www.tecmint.com/wp-content/uploads/2016/12/Syntax-Check-in-Shell-Scripts.png) +][7] + +Perform Syntax Check in Shell Scripts + +The result of our syntax checking operation above still shows that there is one more bug in our script on line 21. So, we still have some syntax correction to do. + +If we look through the script analytically one more time, the error on line 21 is due to a missing closing double quote `(”)` in the last [echo command][8] inside the `print_sys_info` function. + +We will add the closing double quote in the echo command and save the file. The changed script is below: + +``` +#!/bin/bash +#script to print brief system info +ROOT_ID="0" +DATE=`date` +NO_USERS=`who | wc -l` +UPTIME=`uptime` +check_root(){ +if [ "$UID" -ne "$ROOT_ID" ]; then +echo "You are not allowed to execute this program!" +exit 1; +fi +} +print_sys_info(){ +echo "System Time : $DATE" +echo "Number of users: $NO_USERS" +echo "System Uptime : $UPTIME" +} +check_root +print_sys_info +exit 0 +``` + +Now syntactically check the script one more time. + +``` +$ sudo bash -n sys_info.sh +``` + +The command above will not produce any output because our script is now syntactically correct. We can as well trace the execution of the script all for a second time and it should work well: + +``` +$ sudo bash -x sys_info.sh +``` +[ + ![Trace Shell Script Execution](http://www.tecmint.com/wp-content/uploads/2016/12/Trace-Shell-Execution.png) +][9] + +Trace Shell Script Execution + +Now run the script. + +``` +$ sudo ./sys_info.sh +``` +[ + ![Shell Script to Show Date, Time and Uptime](http://www.tecmint.com/wp-content/uploads/2016/12/Script-to-Show-Date-and-Uptime.png) +][10] + +Shell Script to Show Date, Time and Uptime + +### Importance of Shell Script Execution Tracing + +Shell script tracing helps us identify syntax errors and more importantly, logical errors. Take for instance the `check_root` function in the `sys_info.sh` shell script, which is intended to determine if a user is root or not, since the script is only allowed to be executed by the superuser. + +``` +check_root(){ +if [ "$UID" -ne "$ROOT_ID" ]; then +echo "You are not allowed to execute this program!" +exit 1; +fi +} +``` + +The magic here is controlled by the `if statement` expression `[ "$UID" -ne "$ROOT_ID" ]`, once we do not use the suitable numerical operator (`-ne` in this case, which means not equal ), we end up with a possible logical error. + +Assuming that we used `-eq` ( means equal to), this would permit any system user as well as the root user to run the script, hence a logical error. + +``` +check_root(){ +if [ "$UID" -eq "$ROOT_ID" ]; then +echo "You are not allowed to execute this program!" +exit 1; +fi +} +``` + +Note: As we looked at before at the start of this series, the set shell built-in command can activate debugging in a particular section of a shell script. + +Therefore, the line below will help us find this logical error in the function by tracing its execution: + +The script with a logical error: + +``` +#!/bin/bash +#script to print brief system info +ROOT_ID="0" +DATE=`date` +NO_USERS=`who | wc -l` +UPTIME=`uptime` +check_root(){ +if [ "$UID" -eq "$ROOT_ID" ]; then +echo "You are not allowed to execute this program!" +exit 1; +fi +} +print_sys_info(){ +echo "System Time : $DATE" +echo "Number of users: $NO_USERS" +echo "System Uptime : $UPTIME" +} +#turning on and off debugging of check_root function +set -x ; check_root; set +x ; +print_sys_info +exit 0 +``` + +Save the file and invoke the script, we can see that a regular system user can run the script without sudo as in the output below. This is because the value of USER_ID is 100 which is not equal to root ROOT_ID which is 0. + +``` +$ ./sys_info.sh +``` +[ + ![Run Shell Script Without Sudo](http://www.tecmint.com/wp-content/uploads/2016/12/Run-Shell-Script-Without-Sudo.png) +][11] + +Run Shell Script Without Sudo + +Well, that is it for now, we have come to the end of the [shell script debugging series][12], the response form below can be used to address any questions or feedback to us, concerning this guide or the whole 3-part series. + +-------------------------------------------------------------------------------- + +作者简介: + +![](http://1.gravatar.com/avatar/4e444ab611c7b8c7bcb76e58d2e82ae0?s=128&d=blank&r=g) + +Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/trace-shell-script-execution-in-linux/ + +作者:[Aaron Kili][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/aaronkili/ +[1]:http://www.tecmint.com/enable-shell-debug-mode-linux/ +[2]:http://www.tecmint.com/check-syntax-in-shell-script/ +[3]:http://www.tecmint.com/enable-shell-debug-mode-linux/ +[4]:http://www.tecmint.com/su-vs-sudo-and-how-to-configure-sudo-in-linux/ +[5]:http://www.tecmint.com/wp-content/uploads/2016/12/Shell-Tracing-Errors.png +[6]:http://www.tecmint.com/wp-content/uploads/2016/12/Syntax-Checking-in-Script.png +[7]:http://www.tecmint.com/wp-content/uploads/2016/12/Syntax-Check-in-Shell-Scripts.png +[8]:http://www.tecmint.com/echo-command-in-linux/ +[9]:http://www.tecmint.com/wp-content/uploads/2016/12/Trace-Shell-Execution.png +[10]:http://www.tecmint.com/wp-content/uploads/2016/12/Script-to-Show-Date-and-Uptime.png +[11]:http://www.tecmint.com/wp-content/uploads/2016/12/Run-Shell-Script-Without-Sudo.png +[12]:http://www.tecmint.com/enable-shell-debug-mode-linux/ From d0f0c327b4608465fd57cf75334a44973b9116da Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 Jan 2017 09:40:18 +0800 Subject: [PATCH 07/73] =?UTF-8?q?20170111-6=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...x Distributions to Look Forward in 2017.md | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 sources/tech/20161229 5 Most Promising New Linux Distributions to Look Forward in 2017.md diff --git a/sources/tech/20161229 5 Most Promising New Linux Distributions to Look Forward in 2017.md b/sources/tech/20161229 5 Most Promising New Linux Distributions to Look Forward in 2017.md new file mode 100644 index 0000000000..c38a637780 --- /dev/null +++ b/sources/tech/20161229 5 Most Promising New Linux Distributions to Look Forward in 2017.md @@ -0,0 +1,121 @@ +5 Most Promising New Linux Distributions to Look Forward in 2017 +============================================================ + +If you visit [Distrowatch][1] regularly, you will notice that the popularity ranking barely changes from one year to another. + +There are distributions that will always make it to the top ten, whereas others may be in the list today and not at the end of next year. + +Another not so well-known feature of Distrowatch is a [waiting list][2] that consists of distributions: + +1. Not reviewed yet +2. With missing or faulty components +3. Without solid English documentation +4. Projects that do not seem to be maintained anymore + +Some of the distributions that have not been reviewed yet may be worthy of consideration due to their great potential. Keep in mind that they may never make it to the front page ranking due to lack of time or Distrowatchresources to review them. + +For that reason, we will share a list of what we consider the 5 most promising new distros for 2017 and a brief review on each of them. + +Since the Linux ecosystem is a live being, you can expect this article to be updated from time to time, or perhaps be radically different next year. + +That said, let’s take a look! + +### 1\. SemicodeOS + +[SemicodeOS][3] is a Linux distribution especially built for programmers and web developers. It includes out of the box all the compilers, [text editors][4], [IDEs of the most popular programming languages][5], and collaboration tools for teams. + +Even if you are not a programmer or developer but want to become one, SemicodeOS comes with the Scratch IDE to guide you in your first steps. While still in beta, this Sudan-based distribution has surely lots to offer to the community during the next year. + +Check their website for more information. + +[ + ![Semicode Linux Distro](http://www.tecmint.com/wp-content/uploads/2016/12/Semicode-Linux-Distro.png) +][6] + +Semicode Linux Distro + +### 2\. EnchantmentOS + +[EnchantmentOS][7] is a Xubuntu 16.04-based distribution that includes especially-selected applications with low-memory requirements. This makes it ideal for both old and new hardware. + +It follows the same Long-Term Support cycle than Xubuntu and aims at providing reliable and secure Linux software. On top of that, the built-in applications that is easy to use even for non-technical people. + +In addition, its creator takes pride in that EnchantmentOS offers great performance even when booted off USB flash drives. + +[ + ![EnchantmentOS](http://www.tecmint.com/wp-content/uploads/2016/12/EnchantmentOS.jpg) +][8] + +EnchantmentOS + +### 3\. Escuelas Linux + +[Escuelas Linux][9] (“Linux Schools” in Spanish) is a Bodhi Linux-based distribution that is built for elementary and high school education and includes out of the box a wide variety of educational software. Regardless of its Spanish name, it provides full English support as well. + +Other distinguishing features of Escuelas Linux are a lightweight desktop environment and low-memory and storage requirements. According to the official website, it can work perfectly fine with as low as 300 MB of RAM and 20 GB of available hard disk space. + +[ + ![Escuelas Linux](http://www.tecmint.com/wp-content/uploads/2016/12/escuelaslinux.png) +][10] + +Escuelas Linux + +### 4\. OviOS + +As opposed to the previous distributions on this list, [OviOS][11] is not a multi-purpose operating system. Rather, it is described as an enterprise level storage OS that is not based on any other distribution but that is fully-compatible with the Linux Standard Base (LSB). + +You can use OviOS as a robust storage appliance that can handle a iSCSI, NFS, SMB and / or FTP server. On top of this, the latest OviOS version features replication and high-availability. So what are you waiting to give it a try? + +[ + ![OviOS](http://www.tecmint.com/wp-content/uploads/2016/12/ovios.png) +][12] + +OviOS + +### 5\. Open Network Linux + +[ONL][13] (for short) is a Debian-based distribution, and (just like OviOS) it is not a multi-purpose operating system. + +If you are a network administrator you will be pleased to find out (if you didn’t know already) that you can use ONL on bare-metal switches that would otherwise require an expensive, licensed operating system. + +It is important to note that ONL stands out for the wide variety of network-oriented and bare-metal related software included out of the box. Ready to give it a try? + +##### Summary + +You will note that all these distributions have been submitted for review during the last few months. If you like any of them, go to the [Waiting List][14] page and click the Recommend button next to the distribution name. If you do, you will be contributing towards Distrowatch assigning a resource to review it. + +As always, feel free to let us know if you have any questions or suggestions about this article. Use the comment form below to drop us a note anytime. We look forward to hearing from you! + +-------------------------------------------------------------------------------- + +作者简介: + +![](http://1.gravatar.com/avatar/d9d14c5b51331864398e6288cb0c2091?s=128&d=blank&r=g) + +Gabriel Cánepa is a GNU/Linux sysadmin and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/new-linux-distributions-2017/ + +作者:[Gabriel Cánepa][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:http://distrowatch.com/ +[2]:http://distrowatch.com/dwres.php?resource=links#new +[3]:http://www.semicodeos.com/ +[4]:http://www.tecmint.com/best-open-source-linux-text-editors/ +[5]:http://www.tecmint.com/best-linux-ide-editors-source-code-editors/ +[6]:http://www.tecmint.com/wp-content/uploads/2016/12/Semicode-Linux-Distro.png +[7]:http://enchantment.sourceforge.net/ +[8]:http://www.tecmint.com/wp-content/uploads/2016/12/EnchantmentOS.jpg +[9]:https://escuelaslinux.sourceforge.io/ +[10]:http://www.tecmint.com/wp-content/uploads/2016/12/escuelaslinux.png +[11]:http://www.ovios.org/ +[12]:http://www.tecmint.com/wp-content/uploads/2016/12/ovios.png +[13]:http://www.opennetlinux.org/ +[14]:http://distrowatch.com/dwres.php?resource=links#new From bed7eef6fa7bac5d9c7ff4ec60b0b4be767d304d Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 Jan 2017 09:42:58 +0800 Subject: [PATCH 08/73] =?UTF-8?q?20170111-7=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ministrators New Years Resolutions 2017.md | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 sources/tech/20161228 10 Linux System Administrators New Years Resolutions 2017.md diff --git a/sources/tech/20161228 10 Linux System Administrators New Years Resolutions 2017.md b/sources/tech/20161228 10 Linux System Administrators New Years Resolutions 2017.md new file mode 100644 index 0000000000..5225846367 --- /dev/null +++ b/sources/tech/20161228 10 Linux System Administrators New Years Resolutions 2017.md @@ -0,0 +1,135 @@ +10 Linux System Administrators New Year’s Resolutions (2017) +============================================================ + +As we prepare to bid 2016 a more than deserved farewell, it is a time to make our New Year’s resolutions. Regardless of your experience level as a Linux system administrator, we think it is worthy and well to set goals for growth for the next 12 months. + +In case you are out of ideas, in this post we will share 10 simple professional resolutions that you may want to consider for 2017. + +### 1.: Decide to Automate More + +You don’t need to run like a chicken with its head cut off trying to solve foreseeable problems every day. If you find yourself spending time performing repetitive tasks on a daily basis, you need to stop here and now. + +With all the [Linux-based and open source tools][4] at your disposal, you can give yourself some leisure time by [automating as many of your Linux tasks][5] as possible. + +You will find that several of the following resolutions will help you work towards this goal, so keep reading. + +Additionally, do yourself a favor and take a couple of minutes to browse through our [Free eBooks][6] section. + +Chances are you will want to download the books related to [Bash shell scripting][7] and brush up your skills. Happy automating! + +### 2\. Learn a New Scripting Language + +Although every system administrator should be comfortable using Bash for scripting, it is important to consider other modern and robust tools such as [Python][8]. + +But don’t just take our word for it – check this [2-article series on Python][9] that we published not long ago. You will realize that, among other things, Python brings the power of Object-oriented programming and allows you to write shorter and more robust scripts. + +### 3\. Learn a New Programming Language + +In addition to learning a new scripting language, decide to take some time to start or brush up your programming skills. Not sure where to start? This year’s [Stackoverflow Developer Survey][10] reveals that Javascriptcontinues to lead the list of most popular languages for third year in a row. + +Other all-time favorites such as Java and C are also worthy of your consideration. Do check out our [Best Programming Courses of 2016][11]. + +### 4\. Create a GitHub Account and Update it Regularly + +Especially if you are new to programming, you should consider showcasing your work on GitHub. By allowing others to fork your scripts or programs, you will be able to improve your knowledge and create more sophisticated software through the help of others. + +Learn more on [how to install and create GitHub Account][12]. + +### 5\. Contribute to an Open Source Project + +Another great way to learn (or improve your knowledge about) a new scripting or programming language is by contributing to an open source project on GitHub. + +If this sounds like something that may interest you, check the [Explore GitHub][13] pages. There you can browse repositories by popularity or by language, so you will be able to find something interesting to work on. + +On top of this, you’ll get the satisfaction that comes from giving back to the community. + +### 6\. Try Out a New Distribution Each Month + +With new distributions or spin-offs coming out regularly, you have several options to choose from. Who knows that your dream distribution is just around the corner and you have not discovered it yet? Head to Distrowatchand pick a new distribution each month. + +Also, don’t forget to [subscribe to Tecmint][14] to stay informed about new distros hitting the streets, so to speak. + +Hopefully our reviews will help you to determine if you want to give a new distribution a try. Also do check out our articles on top Linux distributions here: + +1. [Top 5 Best Security-Centric Linux Distributions Of 2016][1] +2. [Top Linux Distributions To look Forward To In 2016][2] +3. [10 Top Most Popular Linux Distributions of 2015][3] + +### 7\. Attend a Linux or Open Source Conference + +If you live near a place where a conference sponsored by the [Linux Foundation][15] is scheduled to take place, I strongly encourage you to attend. + +This will not only provide the opportunity to enhance your knowledge about Linux but also give you the chance to meet other open source professionals. + +### 8\. Learn Free or Paid Course from Linux Foundation + +The Linux Foundation continually offers free and paid courses through edX.org and via their own portal, respectively. + +Topics for free courses include (but may not be limited to) Introduction to Linux, Introduction to Cloud Infrastructure Technologies, and Introduction to OpenStack. + +On the other hand, paid options include preparation for the [LFCS Certification][16] and [LFCE certification][17] exams, Linux for developers, Kernel internals, Linux Security, Performance testing, High Availability, and more. + +As a plus, they offer discounts for enterprise courses, so try to convince your boss to pay for your and your colleagues’ training. Additionally, free webinars are offered on a periodic basis so don’t forget to subscribe to< their newsletters! + +You may also consider checking out our best [Online Linux Training Courses][18]. + +### 9\. Answer X Questions in a Linux Forum Per Week + +Another great way to give back to the community is by helping others who are just starting off with their Linux journey. You will find lots of people looking for answers in Linux forums all over the web. + +Keep in mind that you were once a newbie just like them, and try to put yourself in their shoes. + +### 10\. Teach a Kid or Teenager to Use Linux + +If I could go back 20 years, I wish I had a computer back then and the chance to [learn Linux as a teenager][19]. + +I also wish I had to start off with programming much earlier than I did. Without a doubt, things would have been a whole lot easier. That kind of gives me the perspective that teaching at least basic Linux and programming skills to kids or teenagers (I do it with my own kids) is an important endeavor. + +Educating the raising generation on how to effectively use open source technologies will give them the freedom of choice, and they will thank you forever for it. + +##### Summary + +In this article we have shared 10 prospective New Year’s resolutions for system administrators. The [Tecmint.com][20] wishes you the best of luck as you work towards your goals and hope to keep you as a frequent reader in 2017. + +As always, don’t hesitate to use the form below if you have questions or comments about this article. We look forward to hearing from you! + +-------------------------------------------------------------------------------- + + +作者简介: + +![](http://1.gravatar.com/avatar/d9d14c5b51331864398e6288cb0c2091?s=128&d=blank&r=g) + +Gabriel Cánepa is a GNU/Linux sysadmin and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-system-administrators-new-years-resolutions-ideas/ + +作者:[Gabriel Cánepa][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:http://www.tecmint.com/best-security-centric-linux-distributions-of-2016/ +[2]:http://www.tecmint.com/top-linux-distributions-to-look-forward-in-2016/ +[3]:http://www.tecmint.com/10-top-most-popular-linux-distributions-of-2015/ +[4]:http://www.tecmint.com/category/top-tools/ +[5]:http://www.tecmint.com/using-shell-script-to-automate-linux-system-maintenance-tasks/ +[6]:http://tecmint.tradepub.com/category/information-technology-servers-and-linux-server-os/806/ +[7]:http://tecmint.tradepub.com/free/w_syst05/?p=w_syst05 +[8]:http://www.tecmint.com/category/python/ +[9]:http://www.tecmint.com/learn-python-programming-and-scripting-in-linux/ +[10]:http://stackoverflow.com/research/developer-survey-2016#technology +[11]:https://deals.tecmint.com/collections/best-of-bundles-2016 +[12]:http://www.tecmint.com/install-git-centos-fedora-redhat/ +[13]:https://help.github.com/articles/where-can-i-find-open-source-projects-to-work-on/ +[14]:http://subscribe.tecmint.com/newsletter +[15]:http://events.linuxfoundation.org/ +[16]:http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/ +[17]:http://www.tecmint.com/installing-network-services-and-configuring-services-at-system-boot/ +[18]:http://www.tecmint.com/linux-online-training-courses/ +[19]:http://www.tecmint.com/free-online-linux-learning-guide-for-beginners/ +[20]:http://tecmint.com/ From 6ba74181889210892c1f7b3385c1d4caed565e9b Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 Jan 2017 10:00:33 +0800 Subject: [PATCH 09/73] =?UTF-8?q?20170111-8=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...mand Line Tricks and Tips Worth Knowing.md | 251 ++++++++++++++++++ 1 file changed, 251 insertions(+) create mode 100644 sources/tech/20161224 10 Interesting Linux Command Line Tricks and Tips Worth Knowing.md diff --git a/sources/tech/20161224 10 Interesting Linux Command Line Tricks and Tips Worth Knowing.md b/sources/tech/20161224 10 Interesting Linux Command Line Tricks and Tips Worth Knowing.md new file mode 100644 index 0000000000..65f542ea1f --- /dev/null +++ b/sources/tech/20161224 10 Interesting Linux Command Line Tricks and Tips Worth Knowing.md @@ -0,0 +1,251 @@ +10 Interesting Linux Command Line Tricks and Tips Worth Knowing +============================================================ + +I passionately enjoy working with commands as they offer more control over a Linux system than GUIs(Graphical User Interfaces) applications, therefore am always on the look out to discover or figure out interesting ways and ideas to make [Linux so easy and fun to operate][1], primarily from the terminal. + +It is always thrilling when we discover [new tricks or tips while using Linux][2] especially a command line geek like myself. + +And the feeling of wanting to share newly learned practices or commands with millions of Linux users out there, particularly the newbies who are still getting their way around this exciting operating system normally sets in. + +**Suggested Read:** [10 Useful Linux Command Line Tricks for Newbies – Part 2][3] + +In this article, we will review a number of [useful command line tricks and tips][4] that can significantly enhance your Linux usage skills. + +### 1\. Lock or Hide a File or Directory in Linux + +The simplest way of locking a file or directory is by using Linux file permissions. In case your the owner of a file or directory, you can block (remove read, write and execute privileges) other users and groups from accessing it as follows: + +``` +$ chmod 700 tecmint.info +OR +$ chmod go-rwx tecmint.info +``` + +To know more about Linux file permissions, read this article [Managing Users & Groups, File Permissions & Attributes in Linux][5]. + +To hide the file/directory from other system users, rename it with a `(.)` at the start of the file or directory: + +``` +$ mv filename .tecmint.info +``` + +### 2\. Translate rwx Permissions into Octal Format in Linux + +By default, when you run the [ls command][6], it displays file permissions in `rwx` format, but to understand the equivalence of this format and the octal format, you can learn how to [translate rwx permissions into Octal format in Linux][7]. + +### 3\. How to Use ‘su’ When ‘sudo’ Fails + +Although [sudo command][8] is used to execute commands with superuser privileges, there are moments when it fails to work as in the example below. + +Here, I want to [empty the contents of a large file][9] named `uptime.log` but the operation has failed even when I used sudo. + +``` +$ cat /dev/null >/var/log/uptime.log +$ sudo cat /dev/null >/var/log/uptime.log +``` +[ + ![Empty Large File Content in Linux](http://www.tecmint.com/wp-content/uploads/2016/12/Empty-Large-File-Content-in-Linux.png) +][10] + +Empty Large File Content in Linux + +In such as case, you need to switch to the root user account using su command to perform the operation like so: + +``` +$ su +$ sudo cat /dev/null >/var/log/uptime.log +$ cat /var/log/uptime.log +``` +[ + ![Switch to Super User](http://www.tecmint.com/wp-content/uploads/2016/12/Switch-to-Super-User.png) +][11] + +Switch to Super User + +Try to understand the [difference between su and sudo][12], in addition, read through their man pages for more guidelines: + +``` +$ man sudo +$ man su +``` + +### 4\. Kill a Process in Linux + +Sometimes when you want to [terminate a process using kill or killall or pkill][13] commands, it may fail to work, you realize that the process still continues to run on the system. + +In order to destructively kill a process, send the `-KILL` siganl to it. + +First [determine its process ID][14] and then kill it like so: + +``` +$ pidof vlc +$ sudo kill -KILL 10279 +``` +[ + ![Find and Kill Process in Linux](http://www.tecmint.com/wp-content/uploads/2016/12/Find-and-Kill-Process-in-Linux.png) +][15] + +Find and Kill Process in Linux + +Check the [kill command][16] for additional usage options and information. + +### 5\. Delete File Permanently in Linux + +Normally, we use the rm command to delete files from a Linux system, however, these files do not completely get deleted, they are simply stored and hidden on the hard disk and can still be [recovered these files in Linux][17]and viewed by another person. + +To prevent this, we can use the shred command which overwrites the file content and optionally deletes the file as well. + +``` +$ shred -zvu tecmint.pdf +``` + +The options used in the above command: + +1. `-z` – adds a final overwrite with zeros to hide shredding. +2. `-u` – helps to truncate and remove file after overwriting. +3. `-v` – shows progress. + +[ + ![Delete File Permanently in Linux](http://www.tecmint.com/wp-content/uploads/2016/12/Delete-File-Permanently-in-Linux.png) +][18] + +Delete File Permanently in Linux + +Read through shred man page for additional usage instructions: + +``` +$ man shred +``` + +### 6\. Rename Multiple Files in Linux + +You can [rename multiple files in Linux][19] on the go by invoking the rename command. + +It renames the filenames supplied according to a rule specified in the first argument. + +The command below renames all `.pdf` files to `.doc`, here `'s/\.pdf$/\.doc/'` is the rule: + +``` +$ rename -v 's/\.pdf$/\.doc/' *.pdf +``` +[ + ![Rename Multiple Files in Linux](http://www.tecmint.com/wp-content/uploads/2016/12/Rename-Multiple-Files-in-Linux.png) +][20] + +Rename Multiple Files in Linux + +The next example renames all files matching `"*.bak"` to strip the extension, where `'s/\e.bak$//'` is the rule: + +### 7\. Check for Spelling of Words in Linux + +The look command displays lines beginning with a given string, it can help you to check for the spelling of word from within the command line. Although it is not so effective and reliable, look is still a useful alternative to other powerful spelling-checkers: + +``` +$ look linu +$ look docum +``` +[ + ![Spell Checking in Linux](http://www.tecmint.com/wp-content/uploads/2016/12/Spell-Checking-in-Linux.png) +][21] + +Spell Checking in Linux + +### 8\. Search for Description of Keyword in Manual Page + +The man command is used to display manual entry pages of commands, when used with the `-k` switch, it searches the short descriptions and manual page names for the keyword `printf` (such as adjust, apache and php in the commands below) as regular expression. + +``` +$ man -k adjust +$ man -k apache +$ man -k php +``` +[ + ![Show Description of Keyword in Manual Pages](http://www.tecmint.com/wp-content/uploads/2016/12/Show-Description-of-Keyword-in-Manual-Pages.png) +][22] + +Show Description of Keyword in Manual Pages + +### 9\. Watch Logs in Real-Time in Linux + +With watch command, you can run [another Linux command periodically][23] while displaying its output on fullscreen and alongside [tail command][24] which is used to view the last parts of a file, it is possible to watch the recording of log entries in a logfile. + +In the example below, you will watch the system authentication logfile. Open two terminal windows, display the logfile for watching in real-time in the first window like so: + +``` +$ sudo watch tail /var/log/auth.log +``` + +You can also use [tail command][25] which shows the last parts of a file. Its `-f` flag enables watching changes in a file in real-time, therefore it is possible to watch the recording of log entries in a logfile. + +``` +$ sudo tail -f /var/log/auth.log +``` + +And run the commands below in the second terminal as you observe the logfile content from the first window: + +``` +$ sudo mkdir -p /etc/test +$ sudo rm -rf /etc/test +``` + +### 10\. List All Shell builtin Commands + +A shell builtin is a command or a function, called from within and executed directly in the shell itself, instead of an external executable program which the shell would load from the hard disk and execute. + +To list all shell builtins and their usage syntax, run: + +``` +$ help +``` + +As a concluding remark, [command line tricks and tips][26] always come in handy and make learning and using Linux easy and fun especially for newbies. + +You can as well share with us other [useful and interesting command line tricks or tips][27] in Linux that you have come across via the comment form below. + +-------------------------------------------------------------------------------- + + +作者简介: + +![](http://1.gravatar.com/avatar/4e444ab611c7b8c7bcb76e58d2e82ae0?s=128&d=blank&r=g) + +Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-command-line-tricks-and-tips-worth-knowing/ + +作者:[Aaron Kili][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/aaronkili/ +[1]:http://www.tecmint.com/20-funny-commands-of-linux-or-linux-is-fun-in-terminal/ +[2]:http://www.tecmint.com/tag/linux-tricks/ +[3]:http://www.tecmint.com/10-useful-linux-command-line-tricks-for-newbies/ +[4]:http://www.tecmint.com/10-useful-linux-command-line-tricks-for-newbies/ +[5]:http://www.tecmint.com/manage-users-and-groups-in-linux/ +[6]:http://www.tecmint.com/tag/linux-ls-command/ +[7]:http://www.tecmint.com/check-linux-file-octal-permissions-using-stat-command/ +[8]:http://www.tecmint.com/su-vs-sudo-and-how-to-configure-sudo-in-linux/ +[9]:http://www.tecmint.com/empty-delete-file-content-linux/ +[10]:http://www.tecmint.com/wp-content/uploads/2016/12/Empty-Large-File-Content-in-Linux.png +[11]:http://www.tecmint.com/wp-content/uploads/2016/12/Switch-to-Super-User.png +[12]:http://www.tecmint.com/su-vs-sudo-and-how-to-configure-sudo-in-linux/ +[13]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ +[14]:http://www.tecmint.com/find-process-name-pid-number-linux/ +[15]:http://www.tecmint.com/wp-content/uploads/2016/12/Find-and-Kill-Process-in-Linux.png +[16]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ +[17]:http://www.tecmint.com/recover-deleted-file-in-linux/ +[18]:http://www.tecmint.com/wp-content/uploads/2016/12/Delete-File-Permanently-in-Linux.png +[19]:http://www.tecmint.com/rename-multiple-files-in-linux/ +[20]:http://www.tecmint.com/wp-content/uploads/2016/12/Rename-Multiple-Files-in-Linux.png +[21]:http://www.tecmint.com/wp-content/uploads/2016/12/Spell-Checking-in-Linux.png +[22]:http://www.tecmint.com/wp-content/uploads/2016/12/Show-Description-of-Keyword-in-Manual-Pages.png +[23]:http://www.tecmint.com/run-repeat-linux-command-every-x-seconds/ +[24]:http://www.tecmint.com/view-contents-of-file-in-linux/ +[25]:http://www.tecmint.com/view-contents-of-file-in-linux/ +[26]:http://www.tecmint.com/tag/linux-tricks/ +[27]:http://www.tecmint.com/5-linux-command-line-tricks/ From d439d5c2cf8034b501351bf9860541bb0483af4d Mon Sep 17 00:00:00 2001 From: jasminepeng Date: Wed, 11 Jan 2017 10:04:16 +0800 Subject: [PATCH 10/73] =?UTF-8?q?=E6=A0=A1=E5=AF=B9=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 校对中 --- ...161229 How Setup Go in Docker and Deploy an Application.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/20161229 How Setup Go in Docker and Deploy an Application.md b/translated/tech/20161229 How Setup Go in Docker and Deploy an Application.md index 300c9936b6..4b32b517de 100644 --- a/translated/tech/20161229 How Setup Go in Docker and Deploy an Application.md +++ b/translated/tech/20161229 How Setup Go in Docker and Deploy an Application.md @@ -184,9 +184,9 @@ via: http://linoxide.com/containers/setup-go-docker-deploy-application/ 作者:[Dwijadas Dey][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[jasminepeng](https://github.com/jasminepeng) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/dwijadasd/ -[1]:https://github.com/codegangsta/gin \ No newline at end of file +[1]:https://github.com/codegangsta/gin From 0f99d655a042faea0472dc0f3c22e662f6624c8f Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 Jan 2017 10:05:30 +0800 Subject: [PATCH 11/73] =?UTF-8?q?20170111-9=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...e your programming skills with Exercism.md | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 sources/tech/20170110 Improve your programming skills with Exercism.md diff --git a/sources/tech/20170110 Improve your programming skills with Exercism.md b/sources/tech/20170110 Improve your programming skills with Exercism.md new file mode 100644 index 0000000000..d280e8bd57 --- /dev/null +++ b/sources/tech/20170110 Improve your programming skills with Exercism.md @@ -0,0 +1,67 @@ +Improve your programming skills with Exercism +============================================================ + +### 33 programming languages are currently supported by these exercises. + + ![Improve your programming skills with Exercism ](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/code2.png?itok=CVgC8tlK "Improve your programming skills with Exercism ") +>Image by : opensource.com + +Many of us have a 2017 goal to improve our programming skills or to learn how to program in the first place. While we have access to many resources, practicing the art of code development independent of a specific job requires some planning. [Exercism.io][1] is one resource designed for this exact purpose. + +Exercism is an [open source][2] project and service aimed at helping people level up in their programming skills using a philosophy of discovery and collaboration. Exercism provides exercises for dozens of different programming languages. Practitioners complete each exercise and then receive feedback on their response, enabling them to learn from their peer group's experience. + +And what a lot of peers there are. Exercism racked up some impressive stats in 2016: + +* Participants from 201 different countries +* 29,000 participants submitted exercises since June 2013, with 15,500 of them submitting exercises in 2016 alone +* 15,000 participants provided feedback on exercise solutions since June 2013, with 5,500 of them providing feedback in 2016 +* 50,000 visitors a month and over 12,000 each week +* 33 programming languages are currently supported by exercises, with another 22 in the works + +The project provides a series of small wins to participants of all levels, allowing them to develop "a high degree of fluency even at a low level of proficiency," said [Katrina Owen][3], founder of Exercism. While Exercism does not aim to teach participants enough to become employed as a programmer, its exercises give them a deep familiarity with a language and its foibles. This familiarity removes the cognitive burden of language from learners (fluency), allowing them to focus instead on the more difficult problems of architecture and best practices (proficiency). + +Exercism does this through a series of (what else?) exercises. A programmer downloads the [command line client][4], retrieves the first exercise, adds code that fulfills the exercise, and then submits the solution. After submitting a solution the programmer can study the solutions of others and learn from different approaches to the same problem. More importantly, each solution receives feedback from other participants. + +Feedback is the super power of Exercism. All participants are encouraged not only to receive feedback, but also to provide it. According to Owen, members of the Exercism community learn more from providing feedback than from completing the exercises themselves. "It's a powerful learning experience. You're forced to articulate gut feelings and to examine your assumptions, habits, and biases," she said. She also pointed out that feedback can take many forms. + +"Just go in and make observations and ask questions," said Owen. + +Those who are new to programming, or even just to a specific language, can provide valuable feedback by questioning assumptions while also learning through collaboration and dialog. + +Beyond just enabling bite-sized learning of new languages, Exercism itself strongly supports and encourages new contributors to the project. In an [article on SitePoint.com][5], Owen stressed that, "If you want to contribute code to open source, the level of skill you need is 'good enough.'" Exercism not only encourages new contributors, but as a project it does everything possible to help new contributors land their first patch. To date nearly 1,000 people are contributors to the [Exercism project][6]. + +New contributors will have plenty to keep them busy. Exercism is currently reviewing [the health of its language tracks][7] with an eye toward making all tracks sustainable and avoiding maintainer burnout. It's also seeking [donations][8] and sponsorships to hire designers to improve the usability of the site. + +These improvements are necessary for the health of the site and for the well-being of Exercism's participants, but also these changes encourage and ease the path for new contributors to join, said Owen. "The product side would be much more maintainable if we could get this redesigned... When the user experience is a mess, there really is no point in having gorgeous code," she said. The project has a very vibrant [discussion repo][9] where community members collaborate to discover the best new approaches and features. + +Those who want to keep tabs on the project but not yet participate can follow along on the [behind the scenes mailing list][10]. + +-------------------------------------------------------------------------------- + +作者简介: + +![](https://opensource.com/sites/default/files/styles/profile_pictures/public/pictures/vmb_helvetica_sm.png?itok=mSb3xriS) + +VM (Vicky) Brasseur - VM (aka Vicky) is a manager of technical people, projects, processes, products and p^Hbusinesses. In her more than 18 years in the tech industry she has been an analyst, programmer, product manager, software engineering manager, and director of software engineering. Currently she is a Senior Engineering Manager in service of an upstream open source development team at Hewlett Packard Enterprise. VM blogs at anonymoushash.vmbrasseur.com and tweets at @vmbrasseur. + +via: https://opensource.com/article/17/1/exercism-learning-programming + +-------------------------------------------------------------------------------- + +作者:[VM (Vicky) Brasseur][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/vmbrasseur +[1]:http://exercism.io/ +[2]:https://github.com/exercism +[3]:https://twitter.com/kytrinyx +[4]:http://exercism.io/cli +[5]:https://www.sitepoint.com/exorcise-your-newbie-demons-by-contributing-to-exercism/ +[6]:https://github.com/exercism +[7]:http://tinyletter.com/exercism/letters/exercism-track-health-check-new-maintainers +[8]:http://exercism.io/donate +[9]:https://github.com/exercism/discussions/issues?page=1&q=is%3Aissue+is%3Aopen +[10]:http://tinyletter.com/exercism/archive From f17b69f07f3abff63ac5ac0ee5cb52de34e07b2c Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 Jan 2017 10:07:19 +0800 Subject: [PATCH 12/73] =?UTF-8?q?20170111-10=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...and marketers can learn from each other.md | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 sources/talk/20170110 What engineers and marketers can learn from each other.md diff --git a/sources/talk/20170110 What engineers and marketers can learn from each other.md b/sources/talk/20170110 What engineers and marketers can learn from each other.md new file mode 100644 index 0000000000..238093423c --- /dev/null +++ b/sources/talk/20170110 What engineers and marketers can learn from each other.md @@ -0,0 +1,103 @@ +What engineers and marketers can learn from each other +============================================================ + +### Marketers think engineering is all math; engineers think marketing is all fluff. They're both wrong. + + ![What engineers and marketers can learn from each other](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BIZ_fortunecookie3.png?itok=dlRX4vO9 "What engineers and marketers can learn from each other") +Image by :  + +opensource.com + +After many years of practicing marketing in the B2B tech world, I think I've heard just about every misconception that engineers seem to have about marketers. Here are some of the more common: + +* "Marketing is a waste of money that we should be putting into actual product development." +* "Those marketers just throw stuff against the wall and hope it sticks. Where's the discipline?" +* "Does anyone actually read this stuff?" +* "The best thing a marketer can tell me is how to unsubscribe, unfollow, and unfriend." + +And here's my personal favorite: + +_"Marketing is all fluff."_ + +That last one is simply incorrect—but more than that, It's actually a major impediment to innovation in our organizations today. + +Let me explain why. + +### Seeing my own reflection + +I think these comments from engineers bother me so much because I see a bit of my former self in them. + +You see, I was once as geeky as they come—and was proud of it. I hold a Bachelor's in electrical engineering from Rensselaer Polytechnic Institute, and began my professional career as an officer in the US Air Force during Desert Storm. There, I was in charge of developing and deploying a near real-time intelligence system that correlated several sources of data to create a picture of the battlefield. + +After I left the Air Force, I planned to pursue a doctorate from MIT. But my Colonel convinced me to take a look at their business school. "Are you really going to be in a lab?" he asked me. "Are you going to teach at a university? Jackie, you are gifted at orchestrating complex activities. I think you really need to look at MIT Sloan." + +So I took his advice, believing I could still enroll in a few tech courses at MIT. Taking a marketing course, however, would certainly have been a step too far—a total waste of time. I continued to bring my analytical skills to bear on any problem put in front of me. + +Soon after, I became a management consultant at The Boston Consulting Group. Throughout my six years there, I consistently heard the same feedback: "Jackie, you're not visionary enough. You're not thinking outside the box. You assume your analysis is going to point you to the answer." + +And of course, I agreed with them—because that's the way the world works, isn't it? What I realize now (and wish I'd discovered out far earlier) is that by taking this approach I was missing something pivotal: the open mind, the art, the emotion—the human and creative elements. + +All this became much more apparent when I joined Delta Air Lines soon after September 11, 2001, and was asked to help lead consumer marketing. Marketing _definitely_ wasn't my thing, but I was willing to help however they needed me to. + +But suddenly, my rulebook for achieving familiar results was turned upside down. Thousands of people (both inside and outside the airline) were involved in this problem. Emotions were running high. I was facing problems that required different kinds of solutions, answers I couldn't reach simply by crunching numbers. + +That's when I learned—and quickly, because we had much work to do if we were going to pull Delta back up to where it deserved to be—that marketing can be as much a strategic, problem-oriented and user-centered function as engineering is, even if these two camps don't immediately recognize it. + +### Two cultures + +That "great divide" between engineering and marketing is deep indeed—so entrenched that it resembles what C.P. Snow once called[ the "two cultures" problem][1]. Scientifically minded engineers and artistically minded marketers tend to speak different languages, and they're acculturated to believe they value divergent things. + +But the fact is that they're more similar than they might think.[ A recent study][2] from the University of Washington (co-sponsored by Microsoft, Google, and the National Science Foundation) identified "what makes a great software engineer," and (not surprisingly) the list of characteristics sounds like it could apply to great marketers, too. For example, the authors list traits like: + +* Passion +* Open-mindedness +* Curiosity +* Cultivation of craft +* Ability to handle complexity + +And these are just a few! Of course, not every characteristic on the list applies to marketers—but the Venn diagram connecting these "two cultures" is tighter than I believe most of us think. _Both_ are striving to solve complex user and/or customer challenges. They just take a different approach to doing it. + +Reading this list got me thinking: _What if these two personalities understood each other just a little bit more? Would there be power in that?_ + +You bet. I've seen it firsthand at Red Hat, where I'm surrounded by people I'd have quickly dismissed as "crazy creatives" during my early days. And I'd be willing to bet that a marketer has (at one time or another) looked at an engineer and thought, "Look at this data nerd. Can't see the forest beyond the trees." + +I now understand the power of having both perspectives in the same room. And in reality, engineers and marketers are _both_ working at the _intersection of customers, creativity, and analytics_. And if they could just learn to recognize the ways their personalities compliment each other, we could see tremendously positive results—results far more surprising and innovative than we'd see if we kept them isolated from one another. + +### Listening to the crazies (and the nerds) + +Case in point: _The Open Organization_. + +In my role at Red Hat I spent much of my day thinking about how to extend and amplify our brand—but never in a million years would I have thought to do it by asking our CEO to write a book. That idea came from a cross-functional team of those "crazy creatives," a group of people I rely on to help me imagine new and innovative solutions to branding challenges. + +When I heard the idea, I recognized it right away as a quintessentially Red Hat approach to our work: something that would be valuable to a community of practitioners, and something that helps spread the message of openness just a little farther. By prioritizing these two goals above all others, we'd reinforce Red Hat's position as a positive force in the open source world, a trusted expert ready to help customers navigate the turbulence of[ digital disruption][3]. + +Here's the clincher: _That's exactly the same spirit guiding Red Hat engineers tackling problems of code._ The group of Red Hatters urging me to help make _The Open Organization_ a reality demonstrated one of the very same motivations as the programmers that make up our internal and external communities: a desire to share. + +In the end, bringing _The Open Organization_ to life required help from across the spectrum of skills—both the intensely analytic and the beautifully artistic. Everyone pitched in. The project only cemented my belief that engineers and marketers are more alike than different. + +But it also reinforced something else: The realization that openness shows no bias, no preference for a culture of engineering or a culture of marketing. The idea of a more open world can inspire them both equally, and the passion it ignites ripples across the artificial boundaries we draw around our groups. + +That hardly sounds like fluff to me. + +-------------------------------------------------------------------------------- + +作者简介: + +![](https://opensource.com/sites/default/files/styles/profile_pictures/public/pictures/portrait_jackieyeaney_400x600.jpg?itok=zV4bnrzI) + +Jackie Yeaney - Chief Marketing Officer at Ellucian + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/17/1/engineers-marketers-can-learn + +作者:[Jackie Yeaney][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/jackie-yeaney +[1]:https://en.wikipedia.org/wiki/The_Two_Cultures#Implications_and_influence +[2]:https://faculty.washington.edu/ajko/papers/Li2015GreatEngineers.pdf +[3]:https://opensource.com/open-organization/16/7/future-belongs-open-leaders From 571519c59ac219e6f740d2e457f7e05d8efec668 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 Jan 2017 10:09:41 +0800 Subject: [PATCH 13/73] =?UTF-8?q?20170111-11=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...el to design and evaluate public policy.md | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 sources/tech/20170110 Why we need an open model to design and evaluate public policy.md diff --git a/sources/tech/20170110 Why we need an open model to design and evaluate public policy.md b/sources/tech/20170110 Why we need an open model to design and evaluate public policy.md new file mode 100644 index 0000000000..809d71349d --- /dev/null +++ b/sources/tech/20170110 Why we need an open model to design and evaluate public policy.md @@ -0,0 +1,69 @@ +Why we need an open model to design and evaluate public policy +============================================================ + +### Imagine an app that allows citizens to test drive proposed policies. + +[up][3] + ![Why we need an open model to design and evaluate public policy](https://opensource.com/sites/default/files/styles/image-full-size/public/images/government/GOV_citizen_participation.jpg?itok=eeLWQgev "Why we need an open model to design and evaluate public policy") +Image by :  + +opensource.com + +In the months leading up to political elections, public debate intensifies and citizens are exposed to a proliferation of information around policy options. In a data-driven society where new insights have been informing decision-making, a deeper understanding of this information has never been more important, yet the public still hasn't realized the full potential of public policy modeling. + +At a time where the concept of "open government" is constantly evolving to keep pace with new technological advances, government policy models and analysis could be the new generation of open knowledge. + +Government Open Source Models (GOSMs) refer to the idea that government-developed models, whose purpose is to design and evaluate policy, are freely available to everyone to use, distribute, and modify without restrictions. The community could potentially improve the quality, reliability, and accuracy of policy modeling, creating new data-driven apps that benefit the public. + +Today's generation interacts with technology like it's second nature, absorbing vast amounts of information tacitly. What if we could interact with different public policies in a virtual, immersive environment using a GOSM? + +Imagine an app that allows citizens to test drive proposed policies to determine the future in which they want to live. They would instinctively learn the key drivers and what to expect. Before long the public would have a deeper understanding of public policy impacts and become more savvy at navigating the controversial terrains of public debate. + +Why haven't we had greater access to these models before? The reason lies behind the veils of public policy modeling. + +In a society as complex as the one we live in, quantifying policy impacts is a difficult task and has been described as a "fine-art." Moreover, most government policy models are based on administrative and other privately held data. Nevertheless, policy analysts valiantly go about their quest with the aim of guiding policy design, and many a political battle has been won with a quantitative call to arms. + +Numbers are powerful. They build credibility and are often used as a rationale for introducing new policies. The development of public policy models lends power to both politicians and bureaucrats, who may be reluctant to disrupt the status quo. Giving that up may not be easy, but GOSMs provide an opportunity for unprecedented public policy reform. + +GOSMs level the playing field for everyone: politicians, the media, lobby groups, stakeholders, and the general public. By opening the doors of policy evaluation to the community, governments can tap into new and undiscovered capabilities for creativity, innovation, and efficiency within the public sphere. But what are the practical implications for the strategic interactions between stakeholders and governments in public policy design? + +GOSMs are unique because they are primarily a tool for designing public policy and do not necessarily require re-distribution for private gains. Stakeholders and lobby groups could potentially employ GOSMs along with their own privately held information to gain new insights into the workings of the policy environment in which they are economic players for private benefit. + +Could GOSMs become a weapon where stakeholders hold the balance of power in public debate and strategize for optimal benefit? + +Being a modifiable public good, GOSMs are, in notion, funded by the taxpayer and attributed to the state. Would it be ethically appropriate for private entities to gain from GOSMs without passing on the benefits to society? Unlike apps that may be used for more efficient service provision, alternate policy proposals are more likely to be used by consultancies and contribute to public debate. + +The open source community has frequently used the "copyleft license" to ensure that code and any derivative works under this license remains open to everyone. This works well when the product of value is the code itself, which requires re-distribution for maximum benefit. However, what if the code or GOSM redistribution is incidental to the main product, which may be new strategic insights into the existing policy environment? + +At a time when privately collected data is becoming prolific, the real value behind GOSMs may be the underlying data, which could be used to refine the models themselves. Ultimately, government is the only consumer with the authority to implement policy, and stakeholders may choose to share their modified GOSMs in negotiations. + +The big challenge government has when publicly releasing policy models is increasing transparency while protecting privacy. Ideally, releasing GOSMs would require securing closed data in a way that preserves the key features of the modeling. + +Publicly releasing GOSMs empower citizens by promoting a greater understanding and participation into our democracy, which would lead to improved policy outcomes and greater public satisfaction. In an open government utopia, open public policy development will be a collaborative effort between government and the community, where knowledge, data, and analysis are freely available to everyone. + +_Learn more in Audrey Lobo-Pulo's talk at linux.conf.au 2017 ([#lca2017][1]) in Hobart: [Publicly Releasing Government Models][2]._ + +_Disclaimer: The views presented in this article belong to Audrey Lobo-Pulo and are not necessarily those of the Australian Government._ + +-------------------------------------------------------------------------------- + +作者简介: + +![](https://opensource.com/sites/default/files/styles/profile_pictures/public/pictures/1-_mg_2552.jpg?itok=-RflZ4Wv) + +Audrey Lobo-Pulo - Dr. Audrey Lobo-Pulo is a co-founder of Phoensight and is an advocate for open government and open source software in government modelling. A physicist, she moved to working in economic policy modelling after joining the Australian Public Service. Audrey has been involved in modelling a wide range of economic policy options and is currently interested in government open data and open policy modelling. Audrey's vision for government is to bring data science to public policy analytics. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/17/1/government-open-source-models + +作者:[Audrey Lobo-Pulo ][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/audrey-lobo-pulo +[1]:https://twitter.com/search?q=%23lca2017&src=typd +[2]:https://linux.conf.au/schedule/presentation/31/ +[3]:https://opensource.com/article/17/1/government-open-source-models?rate=p9P_dJ3xMrvye9a6xiz6K_Hc8pdKmRvMypzCNgYthA0 From f98c457a745d8ffb53ed0c0b887fbab0681407db Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 Jan 2017 10:11:33 +0800 Subject: [PATCH 14/73] =?UTF-8?q?20170111-12=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...et started as an open source programmer.md | 149 ++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 sources/talk/20170109 How to get started as an open source programmer.md diff --git a/sources/talk/20170109 How to get started as an open source programmer.md b/sources/talk/20170109 How to get started as an open source programmer.md new file mode 100644 index 0000000000..13aae3febd --- /dev/null +++ b/sources/talk/20170109 How to get started as an open source programmer.md @@ -0,0 +1,149 @@ +How to get started as an open source programmer +============================================================ + ![How to get started as an open source programmer](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/programming_keys.jpg?itok=_VDcN66X "How to get started as an open source programmer") + +Image credits :  + +Zagrev on [Flickr][1]. [CC BY-SA 2.0][2] + +Looking out at the world of technology is exciting. It has a lot of moving parts, and it seems the further you dig into it, the deeper it gets, and then it's [turtles all the way down][3]. For that very reason, technology is also overwhelming. Where do you start if you're keen to join in and help shape the way the modern world functions? What's the first step? What's the twentieth step? + +The first thing to understand is that open source is open. This might seem obvious, but the phrase "open source" is thrown around so often these days that sometimes people forget it's just a description of a cultural phenomenon, not the name of a Fortune 500 company. Unlike other jobs or groups, you don't have to interview or complete a sign-up sheet or registration form to become an open source programmer. All you do to become an open source programmer is _program_and then share your code, ideally with a guarantee that the code remains open regardless of how it's used. + +That's it. You're an open source programmer! + +You now have your destination, but what about the logistics? + +### Skill trees + +Have you ever played an RPG? In these games, there's the concept of linear "skill trees". When you play, you acquire basic skills that you build upon to "level up" and get new skills, which you use to acquire new ones and "level up" again. And so on. + +Becoming a programmer is a little like adding to your skill tree. You get some basic skills, you practice them until they're second nature, and then you get new skills, and so on, and then you are progressing along your chosen skill tree. + +You'll find you'll encounter more than one skill tree. Open source has many entry points and many individuals with their own unique strengths, talents, and interests. However, certain definable skills contribute to being a great programmer, and developing them is an important part of participating successfully in open source projects. + +### Scripting + + ![Scroll--How to program ](https://opensource.com/sites/default/files/scroll.png "Scroll--How to program") + +One of the biggest advantages of a POSIX system like Linux or BSD is that every time you use your computer, you've got the opportunity to practice a little programming. If you have no idea where to start programming, then begin with how you work. Find repetitive tasks that you perform every day, and start automating them. This step can be something simple, like converting or re-sizing batches of photos, checking email, or even just getting the five applications you use each day launched with one click. Whatever the task, take the time to automate something for yourself. + +If you can do something from a terminal, then it can be scripted. Learn `bash` or `tsch` and let system scripting be your introduction to writing code and to how your system works. + +### Sysadmin + + ![Caesar head](https://opensource.com/sites/default/files/caesar_0.png "Caesar head") + +From this point, you can continue on to become a programmer, or you can cross over to a different skill tree entirely: that of systems administration. The two careers have some overlap (a good sysadmin ought to have a little programming experience, and should be ready to wield Python, Perl, or a similar language to develop unique solutions), but a _programmer_ is someone who builds with code day in and day out. + +### Programmer + + ![Wizard hat--How to program](https://opensource.com/sites/default/files/pointy-hat.png "Wizard hat--How to program") + +Open source is a great way to learn programming skills; you get to look at other people's code, borrow ideas and techniques, learn from their mistakes, get a critique of your own code, and if you use Linux or BSD, the _entire_ stack is open to you—as far as the eye can see, it's all yours for the taking. + +That's what the travel brochure says, anyway. The reality is that you're probably not going to start digging into the source code of a project and come out the other side with the sudden realization that you accidentally learned to code. Programming is hard work. If it wasn't, everyone would do it. + +Luckily, programming is logical and structured, so it builds upon itself. You might not fall into programming, but the more you poke at it, the more you start to understand it. + +Understanding how to control and automate a computer is one thing, but knowing how to write the stuff that other people want to automate is the point that you cross over into the realm of _programming_. + +### Polyglot + + ![Parrot--How to Program](https://opensource.com/sites/default/files/parrot-head.png "Parrot--How to Program") + +All programming languages aim to do the same thing: make computers compute. Choosing one is a mix of what you think you want to do, what (if any) language is in common use in the industry you are targeting, and what language you happen to best understand given the materials available to you and your learning style. + +With a little bit of research, you can get a good idea of a language's complexity, and then decide what to try first based on your own level of comfort. + +Another way to choose a language is to look at your goal, find out if other people are working toward the same thing, and then look at what they're using. If your aim is to develop desktop tools, you might learn C and Vala for one, or C++ for another. + +At the end of the day, though, don't get overwhelmed with all the available choices. Languages stack well. Once you learn one programming language well enough to fall back on it when you need to get something done, you'll find it a lot easier to pick up another one. A "language" is just a set of syntax and rules, after all; learn one, and it's fairly trivial to superimpose new rules over the same theory. + +The primary goal is to learn a language. Pick the one that makes sense to you or the one that's most appealing to you or the one that your friends are using or the one that has the documentation you understand best, but focus on one and learn it. + +### Open Whazzit? + +Whether or not you're just learning to program or you're an old pro just getting into open source, before jumping head first into this brave new world, you need to learn what makes open source, well, "open source." + +Claiming software is open source is the latest marketing approach some software vendors are wielding. Unfortunately, some vendors just mean they've released a public API or that they're receptive ("open") to suggestions from their users. The word "open" isn't trademarked and no committee governs how or when the word is used. However, the [Open Source Initiative][4], co-founded by the late Ian Murdock of Debian Linux, [defines][5] what open source means (licenses that "allow software to be freely used, modified, and shared"), and formally approves and [tracks][6]licenses deemed truly "open." + +Apply one of those licenses to your code, and you're an open source programmer. Congratulations! + +### Community + + ![Community--How to program](https://opensource.com/sites/default/files/minions.png "Community--How to program") + +Ask any open source enthusiast and they'll tell you the most important thing about open software is the people. Without motivated contributors, software stagnates. Computers need users, bug reporters, designers, and programmers. + +If you want to join or cultivate the global open source community, you need to become a part of the community, even if you're not a people person. This usually encompasses subscribing to mailing lists, joining IRC channels, or hopping onto forums, and starting at the bottom of the totem pole. Any mature community has been around long enough to see prospective members come and go, so you have to understand that when you saunter in ready to change their world, before they all agree to your master plan, you have to prove that you're not going to disappear after three months when something sparkly on the other side of the Net catches your eye. Be ready for the long haul if you aspire to something big. + +If you're just around to lend a hand, then that's acceptable, too. I myself have submitted small patches to projects, and sometimes the project leads think these are good and other times they reject them. If the rejected patch is important to me, I maintain it for myself and clients, and otherwise I move forward. + +It's part of the process. + +Where do these communities exist? It depends on the project. Some projects have dedicated community managers who help bring everyone together in public spaces for everyone to see. Other projects form around forums, use mailing lists, or even issue trackers. Look for the communities, and you'll find them. + +Just as importantly, though, look at the code! They call it open "source" for a reason, so be sure to find the code and take a peek. Even if it's still above your level of full comprehension, it gives you an idea of how the software project organizes itself and possibly where they might need assistance. How is the code organized? Does the code have comments? Is it tidy with a consistent style? Review the documentation, particularly the README, LICENSE, or COPYING files. + +Don't under estimate the importance of following through on the promise of open code. It's the reason you're getting involved, so look at it critically from every angle to see what you can learn from it and how you might contribute. + +Finding the best community is a lot like dating, but specifically it's like dating in [Groundhog Day][7]. It takes time, and the first couple of tries might fall flat. The more you go through the process, the more you start to feel déjà vu. Eventually, though, you learn enough about yourself and your interests, you find the right combination of other people, and you settle in somewhere. Have patience, and let it happen naturally. + +### Actions > Words + + ![Wingfoot--How to Program](https://opensource.com/sites/default/files/wingfoot.png "Wingfoot--How to Program") + +Being an open source programmer is about the code (the "source" part of open source), and ideas are a dime a dozen. What speaks volumes is producing. You need to show you know what you're doing, willing to get your hands dirty, spend your time on the project, and can back up your ideas with something that compiles. + +To do that effectively, of course, you should do your homework on the project itself, including learning how a project prefers to receive submissions and which branches are the stable and development ones. + +To approach getting started: + +* Get familiar with a project and its development culture, and be respectful of it. +* Write patches, bug fixes, or small, requested features, and submit them. +* Don't get discouraged if your work is rejected. You are not being rejected personally, your work was evaluated and the development team made a call. +* Don't get discouraged if your work is accepted, but changed beyond recognition. +* Rinse, repeat, and try new and bigger changes. + + ![Leaderboard--How to program](https://opensource.com/sites/default/files/leaderboard.png "Leaderboard--How to program") + +There is no leaderboard in open source. Some sites try to make it seem like they have such a thing, but there isn't one. Participate, contribute, add to the pool of ideas, add to the stash of commits, and you're doing it right. + +### Develop + + ![Treasure Map--How to Program](https://opensource.com/sites/default/files/treasure-map.png "Treasure Map--How to Program") + +Programming in any environment is always, ultimately, about personal development. Whether you're searching for new ways of solving problems, looking for new ways to optimize code, learning a new language, or learning how to deal with other people better, you never want to stop growing. The more you develop yourself, the more a project benefits. + +Growth, both personal and professional, is the final one on the list, but it actually persists through the entire process. Becoming an open source programmer isn't like getting a government job; it's a process. You learn, you share, you keep learning, you get distracted and write a [Game of Life][8] implementation, and you learn some more. + +This process is what open source is about: the freedom to develop, in every sense of the word. So go find your skill tree, choose your super powers, pay your dues, level up, and get involved. + +-------------------------------------------------------------------------------- + +作者简介: + +![](https://opensource.com/sites/default/files/styles/profile_pictures/public/penguinmedallion200x200.png?itok=ROQSR50J) + +Seth Kenlon - Seth Kenlon is an independent multimedia artist, free culture advocate, and UNIX geek. He is one of the maintainers of the Slackware-based multimedia production project, http://slackermedia.ml + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/17/1/how-get-started-open-source-programmer + +作者:[Seth Kenlon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/seth +[1]:https://www.flickr.com/photos/zagrev/79470567/in/photolist-82iQc-pijuye-9CmY3Z-c1EJAf-4Y65Zt-dhLziB-51QVc-hjqkN-4rNTuC-5Mbvqi-5MfK13-7dh6AW-2fiSu7-48R7et-5sC5ck-qf1TE9-48R6qv-pXuSG9-KFBLJ-95jQ8U-jBR7-dhLpfV-5bCZVH-9vsPTT-bA2nvP-bn7cWw-d7j8q-ubap-pij32X-7WT6iw-dcZZm2-3knisv-4dgN2f-bc6V1-E9xar-EovvU-6T71Mg-pi5zwE-5SR26m-dPKXrn-HFyzb-3aJF9W-7Rvz19-zbewj-xMsv-7MFi3u-2mVokJ-nsVAx-7g5k-4jCbbP +[2]:https://creativecommons.org/licenses/by-nc-sa/2.0/ +[3]:https://en.wikipedia.org/wiki/Turtles_all_the_way_down +[4]:http://opensource.org/ +[5]:https://opensource.org/licenses +[6]:https://opensource.org/licenses/category +[7]:https://en.wikipedia.org/wiki/Groundhog_Day_(film) +[8]:https://en.wikipedia.org/wiki/Conway's_Game_of_Life From 2b347577fd2eeb6f5f017c04f96b4e218030d050 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 Jan 2017 10:13:54 +0800 Subject: [PATCH 15/73] =?UTF-8?q?20170111-13=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tips for the 5 most common Linux issues.md | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 sources/tech/20170109 Troubleshooting tips for the 5 most common Linux issues.md diff --git a/sources/tech/20170109 Troubleshooting tips for the 5 most common Linux issues.md b/sources/tech/20170109 Troubleshooting tips for the 5 most common Linux issues.md new file mode 100644 index 0000000000..62253ac0fd --- /dev/null +++ b/sources/tech/20170109 Troubleshooting tips for the 5 most common Linux issues.md @@ -0,0 +1,70 @@ +Troubleshooting tips for the 5 most common Linux issues +============================================================ + +### Learn how to tackle the most common challenges Linux desktop users encounter. + + ![Troubleshooting tips for the 5 most common Linux issues](https://opensource.com/sites/default/files/styles/image-full-size/public/images/law/rh_003601_05_mech_osyearbook2016_containers_cc.png?itok=0ZEfXLEE "Troubleshooting tips for the 5 most common Linux issues") +Image by :  + +Opensource.com + +Although Linux installs and operates as expected for most users, inevitably some users will run into problems. For my final article in The Queue column for the year, I thought it would be interesting to summarize the most common technical Linux issues people ran into in 2016\. I posted the question to LinuxQuestions.org and on social media, and I analyzed LQ posting patterns. Here are the results. + +### 1\. Wifi drivers (especially Broadcom chips) + +Generally speaking, wifi drivers—and Broadcom cards in particular—continue to be one of the most problematic technical issues facing Linux. There were hundreds of posts about this topic on LQ alone in 2016, and myriad more elsewhere. Dozens of Broadcom wireless cards are available, and detailed instructions for getting them to work with each distribution is far too involved for a single article, but the basic troubleshooting steps are the same: + +* ascertain exactly which Broadcom card you have by using _lspci_ to find out the PCI ID, +* determine whether the distribution you use supports that card, +* and if it does, identify the proper way to get the card working. + +For example, if you have a 14e4:4315 PCI ID and are using Ubuntu, then you know the BCM4312 card is supported by installing the _firmware-b43-installer_package. The other option you have is to research the wifi card before your purchase to ensure it's fully supported by your distribution of choice out of the box. + +### 2\. Printer drivers (especially Canon and Lexmark) + +Printers also continue to be problematic, with Canon and Lexmark repeatedly cited for being an issue. If you're purchasing a new printer, research compatibility before you buy. But if you are migrating from another operating system, that may not be an option. If you are doing research, the [OpenPrinting][1] database and the official support channel for your distribution are the two best places to start. Note that you should ensure all functionality of a device is fully compatible, especially if it's a multifunction product. One common complaint with Canon printers is that the drivers are often only available on non-English and sometimes obscure sites. + +>If you're purchasing a new printer, research compatibility before you buy. + +### 3\. Video + +Video is a nuanced topic, as simple straightforward video works extremely well out of the box on Linux. Where the issues pop up are video accelerators/​acceleration; the latest video cards and newest technologies, such as NVIDIA Optimus and ATI dynamic GPU switching; installation and stability of proprietary drivers; efficient power management; and reliable suspend and resume. If you're not a gamer, do not need high-end graphics for another reason, and are not on a laptop, then you probably don't have to worry about this. If you're looking for a new laptop, be sure to research compatibility before your purchase. If you're a gamer or need the highest-end graphics, you'll need to know exactly what your requirements are and start your research there. Luckily, the situation here is improving and, Wayland teething issues aside, the situation should be quite a bit better in 2017. + +### 4\. Audio + +Once again, for simple setups, audio has been easy to configure and reliable under Linux for a while. As soon as you get into professional production, echo cancellation, audio routing, unified mixing, and other complex setups, however, it can go south pretty quickly. My suggestion is to use one of the dedicated audio-related distributions if you need high-end real-time audio. + +### 5\. Installation + +With a category this all-encompassing, it's almost guaranteed to be high volume. That said, I don't know that it's fair to say Linux has wide-spread installation issues. The vast majority of installs go as expected. The sheer variety of hardware that Linux supports, and nearly infinite combinations of hardware on which Linux installs are attempted, inevitably lead to edge cases here and there. Keep in mind that end users rarely install other operating systems, such as Mac OS and Windows, as they come pre-installed on new devices. + +>The vast majority of installs go as expected. + +### Future looks bright + +Other issues that were mentioned frequently include Bluetooth, suspend/resume, HiDPI, and touchscreens. You may see a pattern forming here—most of the issues noted in this article focus on desktop use cases. When you think about it, that makes sense. With Linux desktop adoption being relatively low, the result is that less testing and resources go into finding and fixing related issues. As desktop usage increases, you can anticipate these areas improving. + +On that note, I thought it would be nice to end with a mention of one area that used to pop up frequently as a problem area for Linux, and very rarely does these days: fonts. Only a few short years ago, getting high-quality antialiased fonts were the exception. With modern distribution releases, it has become the rule. + +What technical Linux issues did you find most common in 2016? Let me know about them in the comments. + +-------------------------------------------------------------------------------- + +作者简介: + +![](https://opensource.com/sites/default/files/styles/profile_pictures/public/pictures/jeremy-garcia.jpg?itok=kqOMWJIg) + +Jeremy Garcia - Jeremy Garcia is the founder of LinuxQuestions.org and an ardent but realistic open source advocate. Follow Jeremy on Twitter: @linuxquestions + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/17/1/yearbook-linux-troubleshooting-tips + +作者:[Jeremy Garcia][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/jeremy-garcia +[1]:http://www.openprinting.org/printers From ce2ac1f85ce2c4350ab85bdd1e94cda5ab47be0c Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 11 Jan 2017 10:16:30 +0800 Subject: [PATCH 16/73] =?UTF-8?q?20170111-14=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...echnology for land rights documentation.md | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 sources/tech/20170109 Open technology for land rights documentation.md diff --git a/sources/tech/20170109 Open technology for land rights documentation.md b/sources/tech/20170109 Open technology for land rights documentation.md new file mode 100644 index 0000000000..d9f568cad5 --- /dev/null +++ b/sources/tech/20170109 Open technology for land rights documentation.md @@ -0,0 +1,77 @@ +Open technology for land rights documentation +============================================================ + +### One-third of people on the planet don't have documented rights to the land on which they rely. + +[up][3] + ![Open technology for land rights documentation](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/life_tree_clouds.png?itok=dSV0oTDS "Open technology for land rights documentation") +Image by :  + +[Pixabay][4]. Modified by Opensource.com. [CC BY-SA 4.0][5] + +The [Cadasta Foundation][6] creates tech to allow communities to document their land rights. By helping groups document the evidence of their individual and community rights to the land on which they depend, they can eventually obtain legal recognition of their land rights, and in the meantime, enjoy greater security. + +We are motivated by the fact that most of the world does not have documented legal rights to the land on which they live. Technology is only a small part of this larger social issue, but our hope is that tech tools can be part of the solution even in the most remote and low-tech environments. + +### The magnitude of property rights + +Many of us who come from the global north probably take our rights to our land, property, and home for granted. We have titles, deeds, and rental agreements that document and solidly protect our rights. + +But one-third of the people on the planet, from urban shanty towns to forest-dwelling indigenous communities, do not have documented rights to the land on which they rely. In fact, an estimated 70% of the property in emerging economies is undocumented. An estimated 25% of the world’s urban population live in homes to which they have no legal right.  A majority of smallholder farmers around the world farm without the protection of having legal rights to their land documented by government records. + +This is simply because government land and property records in many areas of the world either were never created or are out of date. For example, most rural land records in the state of Telangana, India haven't been updated since the 1940s. In other areas, such as parts of sub-Saharan Africa, there were never any records of land ownership to begin with—people simply farm the land their parents farmed, generation after generation. + +Consider for a moment working land to which you have no secure rights. Would you invest your savings or labor in improving the land, including applying good quality seeds and fertilizer, with the knowledge that you could be displaced any day by a more powerful neighbor or investor? Imagine living in a home that could be bulldozed or usurped by an official any day. Or how could you sell your house, or use it for collateral for a loan, if you don’t have any proof that you own it? + +For a majority of the world's population, these are not rhetorical questions. These are daily realities. + +### How open source matters for land + +Technology is only one part of the solution, but at Cadasta we believe it is a key component. While many governments had modern technology systems put in place to manage land records, often these were expensive to maintain, required highly trained staff, were not transparent, and were otherwise too complicated. Many of these systems, created at great expense by donor governments, are already outdated and no longer accurately reflect existing land and property rights. + +By building open and user-friendly technology for land rights documentation we aim to overcome these problems and create land documentation systems that are flexible and accessible, allowing them to be treated as living documents that are updated continually. + +We routinely train people who have never even used a smartphone before to use our technology to document their land rights in a single afternoon. The resulting data, hosted on an open source platform, is easy to access, update, and analyze. This flexibility means that governments in developing countries, should they adopt our platform, don't need to hire specially trained staff to manage the upkeep of these records. + +We also believe that by contributing to and fostering open communities we can benefit more people, instead of attempting to develop all the technology ourselves. We do this by building a community around our tools as well as contributing to other existing software. + +Over the past two years we've contributed and been involved in [OpenStreetMap][7]through the [Missing Maps Projec][8]t, used [OpenDataKit][9] extensively for data collection, and currently are integrating [Field Papers][10] with our system. Field Papers is technology that allows users to print paper maps, annotate those maps with pen, and then take a picture of those annotations with their phone and upload them to be transcribed. + +We've also released a few Django libraries we hope will be useful to others in other Django applications. These include a policy-based permission system called [django-tutelary][11] and [django-jsonattrs][12], which provides JavaScript Object Notification (JSON)-based attribute management for PostgresSQL. If others use these pieces and contribute bug reports and patches, this can help make Cadasta's work stronger. + +This work is critically important. Land rights are the foundation of stability and prosperity. Communities and countries seeking economic growth and sustainable development must document land rights and ensure land rights are secure for women, men, and communities. + +_Learn more in Kate Chapman's talk at linux.conf.au 2017 ([#lca2017][1]) in Hobart: [Land Matters: Creating Open Technology for Land Rights][2]._ + +-------------------------------------------------------------------------------- + +作者简介: + +![](https://opensource.com/sites/default/files/styles/profile_pictures/public/pictures/kate-crop.jpg?itok=JkHxWrIQ) + +Kate Chapman - Kate Chapman is Chief Technology Officer of the Cadasta Foundation, leading the organization’s technology team and strategy. Cadasta develops free and open source software to help communities document their land rights around the world. Chapman is recognized as a leader in the domains of open source geospatial technology and community mapping, and an advocate for open imagery as a public good. + +-------------------------------------------------------------------------------- + + +via: https://opensource.com/article/17/1/land-rights-documentation-Cadasta + +作者:[Kate Chapman][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/wonderchook +[1]:https://twitter.com/search?q=%23lca2017&src=typd +[2]:https://linux.conf.au/schedule/presentation/50/ +[3]:https://opensource.com/article/17/1/land-rights-documentation-Cadasta?rate=E8gJkvb1mbBXytsZiKA_ZtBCOvpi41nDSfz4R8tNnoc +[4]:https://pixabay.com/en/tree-field-cornfield-nature-247122/ +[5]:https://creativecommons.org/licenses/by-sa/4.0/ +[6]:http://cadasta.org/ +[7]:http://www.openstreetmap.org/ +[8]:http://www.missingmaps.org/ +[9]:https://opendatakit.org/ +[10]:http://fieldpapers.org/ +[11]:https://github.com/Cadasta/django-tutelary +[12]:https://github.com/Cadasta/django-jsonattrs From 370d06067232459b89f836e2d9396625c73319aa Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 11 Jan 2017 10:20:03 +0800 Subject: [PATCH 17/73] translated --- ...Time Streaming Apps with Apache Calcite.md | 56 ------------------- ...Time Streaming Apps with Apache Calcite.md | 56 +++++++++++++++++++ 2 files changed, 56 insertions(+), 56 deletions(-) delete mode 100644 sources/talk/20161104 Build Strong Real-Time Streaming Apps with Apache Calcite.md create mode 100644 translated/talk/20161104 Build Strong Real-Time Streaming Apps with Apache Calcite.md diff --git a/sources/talk/20161104 Build Strong Real-Time Streaming Apps with Apache Calcite.md b/sources/talk/20161104 Build Strong Real-Time Streaming Apps with Apache Calcite.md deleted file mode 100644 index d29a8e594c..0000000000 --- a/sources/talk/20161104 Build Strong Real-Time Streaming Apps with Apache Calcite.md +++ /dev/null @@ -1,56 +0,0 @@ -translating---geekpi - -# Build Strong Real-Time Streaming Apps with Apache Calcite - - - ![Calcite](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/calcite.jpg?itok=CUZmjPjy "Calcite ") -Calcite is a data framework that lets you to build custom database functionality, explains Microsoft developer Atri Sharma in this preview to his upcoming talk at Apache: Big Data Europe, Nov. 14-16 in Seville, Spain.[Creative Commons Zero][2]Wikimedia Commons: Parent Géry - -The [Apache Calcite][7] data management framework contains many pieces of a typical database management system but omits others, such as storage of data and algorithms to process data. In his talk at the upcoming [Apache: Big Data][6] conference in Seville, Spain, Atri Sharma, a Software Engineer for Azure Data Lake at Microsoft, will talk about developing applications using [Apache Calcite][5]'s advanced query planning capabilities. We spoke with Sharma to learn more about Calcite and how existing applications can take advantage of its functionality. - - ![Atri Sharma](https://www.linux.com/sites/lcom/files/styles/floated_images/public/atri-sharma.jpg?itok=77cvZWfw "Atri Sharma") - -Atri Sharma, Software Engineer, Azure Data Lake, Microsoft[Used with permission][1] - -**Linux.com: Can you provide some background on Apache Calcite? What does it do?** - -Atri Sharma: Calcite is a framework that is the basis of many database kernels. Calcite empowers you to build your custom database functionality and use the required resources from Calcite. For example, Hive uses Calcite for cost-based query optimization, Drill and Kylin use Calcite for SQL parsing and optimization, and Apex uses Calcite for streaming SQL. - -**Linux.com: What are some features that make Apache Calcite different from other frameworks?** - -Atri: Calcite is unique in the sense that it allows you to build your own data platform. Calcite does not manage your data directly but rather allows you to use Calcite's libraries to define your own components. For eg, instead of providing a generic query optimizer, it allows defining custom query optimizers using the Planners available in Calcite. - -**Linux.com: Apache Calcite itself does not store or process data. How does that affect application development?** - -Atri: Calcite is a dependency in the kernel of your database. It is targeted for data management platforms that wish to extend their functionalities without writing a lot of functionality from scratch. - -**Linux.com: Who should be using it? Can you give some examples?** - -Atri: Any data management platform looking to extend their functionalities should use Calcite. We are the foundation of your next high-performance database! - -Specifically, I think the biggest examples would be Hive using Calcite for query optimization and Flink for parsing and streaming SQL processing. Hive and Flink are full-fledged data management engines, and they use Calcite for highly specialized purposes. This is a good case study for applications of Calcite to further strengthen the core of a data management platform. - -**Linux.com: What are some new features that you’re looking forward to?** - -Atri: Streaming SQL enhancements are something I am very excited about. These features are exciting because they will enable users of Calcite to develop real-time streaming applications much faster, and the strength and capabilities of these applications will be manifold. Streaming applications are the new de facto, and the strength to have query optimization in streaming SQL will be very useful for a large crowd. Also, there is discussion ongoing about temporal tables, so watch out for more! - --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/build-strong-real-time-streaming-apps-apache-calcite - -作者:[AMBER ANKERHOLZ][a] - -译者:[译者ID](https://github.com/译者ID) - -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 组织编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.linux.com/users/aankerholz -[1]:https://www.linux.com/licenses/category/used-permission -[2]:https://www.linux.com/licenses/category/creative-commons-zero -[3]:https://www.linux.com/files/images/atri-sharmajpg -[4]:https://www.linux.com/files/images/calcitejpg -[5]:https://calcite.apache.org/ -[6]:http://events.linuxfoundation.org/events/apache-big-data-europe -[7]:https://calcite.apache.org/ diff --git a/translated/talk/20161104 Build Strong Real-Time Streaming Apps with Apache Calcite.md b/translated/talk/20161104 Build Strong Real-Time Streaming Apps with Apache Calcite.md new file mode 100644 index 0000000000..7b01bd8541 --- /dev/null +++ b/translated/talk/20161104 Build Strong Real-Time Streaming Apps with Apache Calcite.md @@ -0,0 +1,56 @@ +# 用 Apache Calcite 构建强大的实时流应用 + + ![Calcite](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/calcite.jpg?itok=CUZmjPjy "Calcite ") + +Calcite 是一个数据框架,它允许你创建自定义数据库功能,微软开发者 Atri Sharma 在 Apache 即将到来的 11 月 14-16 日在西班牙塞维利亚举行的 Big Data Europe 中解释。[Creative Commons Zero][2] + +Wikimedia Commons: Parent Géry + +[Apache Calcite][7] 数据管理框架包含许多典型的数据库管理系统,但省略了其他部分,如存储数据和算法来处理数据。 Microsoft 在 Azure Data Lake 的软件工程师 Atri Sharma 在西班牙塞维利亚的即将到来的 [Apache:Big Data][6] 会议上的演讲中将讨论使用 [Apache Calcite][5]的高级查询规划能力。我们与 Sharma 讨论了解有关 Calcite 的更多信息,以及现有程序如何利用其功能。 + + ![Atri Sharma](https://www.linux.com/sites/lcom/files/styles/floated_images/public/atri-sharma.jpg?itok=77cvZWfw "Atri Sharma") + +Atri Sharma,微软 Azure Data Lake 的软件工程师,已经[授权使用][1] + +**Linux.com:你能提供一些关于 Apache Calcite 的背景吗? 它有什么作用? + +Atri Sharma:Calcite是一个框架,它是许多数据库内核的基础。Calcite 允许你构建自定义数据库功能并使用 Calcite 所需的资源。例如,Hive 使用 Calcite 进行基于成本的查询优化、Drill 和 Kylin 使用 Calcite 进行 SQL 解析和优化、Apex 使用 Calcite 进行流式 SQL。 + +**Linux.com:有哪些是使得 Apache Calcite 与其他框架不同的特性? + +Atri:Calcite 是独一无二的,它允许你建立自己的数据平台。 Calcite 不直接管理你的数据,而是允许你使用 Calcite 的库来定义你自己的组件。 例如,它允许使用 Calcite 中可用的 Planner 定义自定义查询优化器,而不是提供通用查询优化器。 + +**Linux.com:Apache Calcite 本身不会存储或处理数据。 它如何影响程序开发? + +Atri:Calcite 是数据库内核中的依赖项。它面向希望扩展其功能的数据管理平台,而无需从头开始编写大量功能。 + +** Linux.com:谁应该使用它? 你能举几个例子吗?** + +Atri:任何旨在扩展其功能的数据管理平台都应使用 Calcite。 我们是你下一个高性能数据库的基础! + +具体来说,我认为最大的例子是 Hive 使用 Calcite 用于查询优化、Flink 解析和流 SQL 处理。 Hive 和 Flink 是成熟的数据管理引擎,并使用 Calcite 高度专业目的。这是对 Calcite 应用进一步加强数据管理平台核心的一个好的案例研究。 + +**Linux.com:你有哪些期待的新功能? + +Atri:流 SQL 增强是令我非常兴奋的事情。这些功能令人兴奋,因为它们将使 Calcite 的用户能够更快地开发实时流式应用程序,并且这些程序的强大和功能将是多方面的。流程序是新的事实,并且在流 SQL 中具有查询优化的优点对于大部分人将是非常有用的。此外,关于暂存表的讨论还在进行,所以请继续关注! + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/build-strong-real-time-streaming-apps-apache-calcite + +作者:[AMBER ANKERHOLZ][a] + +译者:[geekpi](https://github.com/geekpi) + +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 组织编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linux.com/users/aankerholz +[1]:https://www.linux.com/licenses/category/used-permission +[2]:https://www.linux.com/licenses/category/creative-commons-zero +[3]:https://www.linux.com/files/images/atri-sharmajpg +[4]:https://www.linux.com/files/images/calcitejpg +[5]:https://calcite.apache.org/ +[6]:http://events.linuxfoundation.org/events/apache-big-data-europe +[7]:https://calcite.apache.org/ From 8fcf538cffb30389e9fc4af585f9c475c68eba23 Mon Sep 17 00:00:00 2001 From: xiaojin Date: Wed, 11 Jan 2017 10:32:33 +0800 Subject: [PATCH 18/73] Update 20161229 5 Most Promising New Linux Distributions to Look Forward in 2017.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申请翻译 --- ...Promising New Linux Distributions to Look Forward in 2017.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20161229 5 Most Promising New Linux Distributions to Look Forward in 2017.md b/sources/tech/20161229 5 Most Promising New Linux Distributions to Look Forward in 2017.md index c38a637780..42199e36a8 100644 --- a/sources/tech/20161229 5 Most Promising New Linux Distributions to Look Forward in 2017.md +++ b/sources/tech/20161229 5 Most Promising New Linux Distributions to Look Forward in 2017.md @@ -1,3 +1,5 @@ +#rusking translating + 5 Most Promising New Linux Distributions to Look Forward in 2017 ============================================================ From ebb068bc0c3e40c5e1e58a97ad949edcfceda16e Mon Sep 17 00:00:00 2001 From: xiaojin Date: Wed, 11 Jan 2017 10:35:59 +0800 Subject: [PATCH 19/73] =?UTF-8?q?Update=2020170105=20PhotoRec=20=E2=80=93?= =?UTF-8?q?=20Recover=20Deleted=20or=20Lost=20Files=20in=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申请翻译 --- ...0170105 PhotoRec – Recover Deleted or Lost Files in Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170105 PhotoRec – Recover Deleted or Lost Files in Linux.md b/sources/tech/20170105 PhotoRec – Recover Deleted or Lost Files in Linux.md index 4ae8ef5faf..b9e18192bb 100644 --- a/sources/tech/20170105 PhotoRec – Recover Deleted or Lost Files in Linux.md +++ b/sources/tech/20170105 PhotoRec – Recover Deleted or Lost Files in Linux.md @@ -1,3 +1,5 @@ +#rusking translating + PhotoRec – Recover Deleted or Lost Files in Linux ============================================================ From bacbfb04292b807cf712c50ee03b2006fa5d4542 Mon Sep 17 00:00:00 2001 From: ypingcn <1344632698@qq.com> Date: Wed, 11 Jan 2017 03:09:45 +0000 Subject: [PATCH 20/73] translating by ypingcn (#4906) --- ...10 Linux System Administrators New Years Resolutions 2017.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20161228 10 Linux System Administrators New Years Resolutions 2017.md b/sources/tech/20161228 10 Linux System Administrators New Years Resolutions 2017.md index 5225846367..25ad1a53b9 100644 --- a/sources/tech/20161228 10 Linux System Administrators New Years Resolutions 2017.md +++ b/sources/tech/20161228 10 Linux System Administrators New Years Resolutions 2017.md @@ -1,3 +1,5 @@ +translating by ypingcn + 10 Linux System Administrators New Year’s Resolutions (2017) ============================================================ From b6957906c61c5db58dc353d1756c13530f122b85 Mon Sep 17 00:00:00 2001 From: jasminepeng Date: Wed, 11 Jan 2017 11:28:50 +0800 Subject: [PATCH 21/73] =?UTF-8?q?=E6=A0=A1=E5=AF=B9=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 校对完毕 谢谢 @geekpi --- ... Go in Docker and Deploy an Application.md | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/translated/tech/20161229 How Setup Go in Docker and Deploy an Application.md b/translated/tech/20161229 How Setup Go in Docker and Deploy an Application.md index 4b32b517de..3ac6ca3f67 100644 --- a/translated/tech/20161229 How Setup Go in Docker and Deploy an Application.md +++ b/translated/tech/20161229 How Setup Go in Docker and Deploy an Application.md @@ -1,13 +1,15 @@ -嗨,本教程中,我们将学习如何使用 docker 部署 golang web 应用程序。 你可能已经知道,由于 golang 的高性能和可靠性,docker是完全是用 golang 写的。在我们详细介绍之前,请确保你已经安装了 docker 以及 golang 并对它们有基本了解。 +如何在 Docker 中设置 Go 并部署应用 +============================================================ +嗨,在本教程中,我们将学习如何使用 docker 部署 golang web 应用程序。 你可能已经知道,由于 golang 的高性能和可靠性,docker是完全是用 golang 写的。在我们详细介绍之前,请确保你已经安装了 docker 以及 golang 并对它们有基本了解。 ### 关于 docker -Docker 是一个开源程序,它使一个 Linux 应用程序捆绑完整的依赖并打包为容器来共享主机操作系统的相同内核。 另一方面,像 VMware 这样的基于 hypervisor 的虚拟化操作系统容器提供了高级别的隔离和安全性,由于客户机和主机之间的通信是通过 hypervisor 来实现的,因为它们不共享内核空间。这也导致了由于硬件仿真带来的性能开销。 所以容器虚拟化诞生了以确保一个轻量级的虚拟环境,它将一组进程和资源与主机以及其他容器分组及隔离。因此,容器内部的进程无法看到容器外部的进程或资源。 +Docker 是一个开源程序,它使一个捆绑完整的依赖并打包为容器的 Linux 应用程序共享主机操作系统的相同内核。另一方面,像 VMware 这样的基于 hypervisor 的虚拟化操作系统容器提供了高级别的隔离和安全性,由于客户机和主机之间的通信是通过 hypervisor 来实现的,它们不共享内核空间。硬件仿真也导致了性能开销。 所以容器虚拟化诞生了,以确保一个轻量级的虚拟环境,它将一组进程和资源与主机以及其他容器分组及隔离。因此,容器内部的进程无法看到容器外部的进程或资源。 -### 用 Go 语言创建一个 "Hello World" web 应用 +### 用 Go 语言创建一个 “Hello World” web 应用 -让我们创建一个 Go 应用的目录,它会在浏览器中显示“Hello World”。创建一个 web 应用目录并使它成为当前页面。进入 web 应用目录并编辑一个 “main.go”。 +首先我们为 Go 应用创建一个目录,它会在浏览器中显示 “Hello World”。创建一个 web-app 目录并使它成为当前目录。进入 web-app 应用目录并编辑一个名为 “main.go” 的文件。 root@demohost:~# mkdir web-app root@demohost:~# cd web-app/ @@ -28,11 +30,11 @@ Docker 是一个开源程序,它使一个 Linux 应用程序捆绑完整的依 http.ListenAndServe(":8080", nil) } -使用下面的命令运行上面的 “Hello World” Go 程序。在浏览器中输入 http://127.0.0.1:8080/World 测试,你会在浏览器中看到“Hello World”。 +使用下面的命令运行上面的 “Hello World” Go 程序。在浏览器中输入 http://127.0.0.1:8080/World 测试,你会在浏览器中看到 “Hello World”。 root@demohost:~/web-app# PORT=8080 go run main.go -下一步是将上面的应用容器化。因此我们会创建一个 dockerfile 文件,它会告诉 docker 如何容器化我们的 web 应用。 +下一步是将上面的应用在 docker 中容器化。因此我们会创建一个 dockerfile 文件,它会告诉 docker 如何容器化我们的 web 应用。 root@demohost:~/web-app# vim.tiny Dockerfile @@ -61,7 +63,7 @@ Docker 是一个开源程序,它使一个 Linux 应用程序捆绑完整的依 ### 构建/运行容器 -使用下面的命令构建你的 Go web 应用,你会在成功构建后获得确认。 +使用下面的命令构建你的 Go web-app,你会在成功构建后获得确认。 root@demohost:~/web-app# docker build --rm -t web-app . Sending build context to Docker daemon 3.584 kB @@ -113,12 +115,12 @@ Docker 是一个开源程序,它使一个 Linux 应用程序捆绑完整的依 Removing intermediate container 6cb6bc28e406 Successfully built b32ca91bdfe0 -现在可以运行我们的 Go 应用了,可以执行下面的命令。 +现在可以运行我们的 web-app 了,可以执行下面的命令。 root@demohost:~/web-app# docker run -p 8080:8080 --name="test" -d web-app 7644606b9af28a3ef1befd926f216f3058f500ffad44522c1d4756c576cfa85b -进入 http://localhost:8080/World 浏览你的 web 应用。你已经成功容器化了一个可重复的/确定性的容器化 Go web 应用。使用下面的命令来启动、停止并检查容器的状态。 +进入 http://localhost:8080/World 浏览你的 web 应用。你已经成功容器化了一个可重复的/确定性的 Go web 应用。使用下面的命令来启动、停止并检查容器的状态。 列出所有容器 root@demohost:~/ docker ps -a @@ -131,9 +133,9 @@ Docker 是一个开源程序,它使一个 Linux 应用程序捆绑完整的依 ### 重新构建镜像 -假设你正在开发 web 应用程序并在更改代码。现在要在更新代码后查看结果,你需要重新生成 docker 镜像、停止旧镜像并运行新镜像,并且每次更改代码时都会继续。为了使这个过程自动化,我们将使用 docker 卷在主机和容器之间共享一个目录。这意味着你不必重新构建镜像以在容器内进行更改。容器如何检测你是否对 web 程序的源码进行了更改?答案是有一个名为 “Gin” 的好工具[https://github.com/codegangsta/gin][1],它能检测是否对源码进行了任何更改、重建镜像/二进制文件并在容器内运行更新过代码的进程。 +假设你正在开发 web 应用程序并在更改代码。现在要在更新代码后查看结果,你需要重新生成 docker 镜像、停止旧镜像并运行新镜像,并且每次更改代码时都要这样做。为了使这个过程自动化,我们将使用 docker 卷,在主机和容器之间共享一个目录。这意味着你不必为在容器内进行更改而重新构建镜像。容器如何检测你是否对 web 程序的源码进行了更改?答案是有一个名为 “Gin” 的好工具 [https://github.com/codegangsta/gin][1],它能检测是否对源码进行了任何更改、重建镜像/二进制文件并在容器内运行更新过代码的进程。 -要使这个过程自动化,我们将编辑 Dockerfile 并安装 Gin 将其作为 entry 命令执行。我们将开放 3030 端口(Gin代理),而不是 8080。 Gin 代理将转发流量到 8080 端口的 web 程序。 +要使这个过程自动化,我们将编辑 Dockerfile 并安装 Gin 将其作为 entry 命令执行。我们将开放 3030 端口(Gin 代理),而不是 8080。 Gin 代理将转发流量到 web 程序的 8080 端口。 root@demohost:~/web-app# vim.tiny Dockerfile @@ -168,11 +170,11 @@ Docker 是一个开源程序,它使一个 Linux 应用程序捆绑完整的依 root@demohost:~/web-app# docker build --rm -t web-app . -我们会在当前 web 程序的根目录下运行 docker 并通过暴露的 3030 端口链接 CWD 到容器中的应用目录下。 +我们会在当前 web 程序的根目录下运行 docker,并通过暴露的 3030 端口链接 CWD 到容器中的应用目录下。 root@demohost:~/web-app# docker run -p 3030:3030 -v `pwd`:/go/src/web-app --name="test" -d web-app -打开 http://localhost:3030/World, 你就能看到你的 web 程序了。现在如果你改变了任何代码,它会在刷新后反应在你的浏览器中。 +打开 http://localhost:3030/World, 你就能看到你的 web 程序了。现在如果你改变了任何代码,会在浏览器刷新后反映在你的浏览器中。 ### 总结 From 07f76fa6e0e9df8eeb9e5504e605cadb2848fef3 Mon Sep 17 00:00:00 2001 From: jasminepeng Date: Wed, 11 Jan 2017 11:30:45 +0800 Subject: [PATCH 22/73] =?UTF-8?q?=E6=A0=A1=E5=AF=B9=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 校对中 --- ...161227 The Dos and Donts of Writing Test cases in Android.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20161227 The Dos and Donts of Writing Test cases in Android.md b/translated/tech/20161227 The Dos and Donts of Writing Test cases in Android.md index ae26094e16..73ac7a1680 100644 --- a/translated/tech/20161227 The Dos and Donts of Writing Test cases in Android.md +++ b/translated/tech/20161227 The Dos and Donts of Writing Test cases in Android.md @@ -160,7 +160,7 @@ via: https://blog.mindorks.com/the-dos-and-don-ts-of-writing-test-cases-in-andro 作者:[Anshul Jain][a] 译者:[kokialoves](https://github.com/kokialoves) -校对:[校对者ID](https://github.com/校对者ID) +校对:[jasminepeng](https://github.com/jasminepeng) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 26f6de44db69879be4fe19f72e63b68158850f48 Mon Sep 17 00:00:00 2001 From: vic Date: Wed, 11 Jan 2017 17:05:16 +0800 Subject: [PATCH 23/73] pick up one --- ...9 Troubleshooting tips for the 5 most common Linux issues.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20170109 Troubleshooting tips for the 5 most common Linux issues.md b/sources/tech/20170109 Troubleshooting tips for the 5 most common Linux issues.md index 62253ac0fd..912b76583e 100644 --- a/sources/tech/20170109 Troubleshooting tips for the 5 most common Linux issues.md +++ b/sources/tech/20170109 Troubleshooting tips for the 5 most common Linux issues.md @@ -1,3 +1,5 @@ + Vic020 + Troubleshooting tips for the 5 most common Linux issues ============================================================ From 7f694021648857bf1a6efc6795f06ea7f127c325 Mon Sep 17 00:00:00 2001 From: jasminepeng Date: Wed, 11 Jan 2017 17:35:11 +0800 Subject: [PATCH 24/73] =?UTF-8?q?=E6=A0=A1=E5=AF=B9=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 校对完毕 --- ... Donts of Writing Test cases in Android.md | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/translated/tech/20161227 The Dos and Donts of Writing Test cases in Android.md b/translated/tech/20161227 The Dos and Donts of Writing Test cases in Android.md index 73ac7a1680..d6df221b5d 100644 --- a/translated/tech/20161227 The Dos and Donts of Writing Test cases in Android.md +++ b/translated/tech/20161227 The Dos and Donts of Writing Test cases in Android.md @@ -1,20 +1,17 @@ -编写android测试单元应该做的和不应该做的. +编写 android 测试单元该做的和不该做的事 ============================================================ -在本文中, 根据我的实际经验我将为大家阐述一个测试用例.在本文中我将使用Espresso编码, 但是它们可以用到单元测试当中. 基于以上目的, 我们来研究一个新闻程序. +在本文中, 我将根据我的实际经验,为大家阐述一个编写测试用例的最佳实践。在本文中我将使用 Espresso 编码, 但是它们可以用到单元和 instrumentation 测试当中。基于以上目的, 我们来研究一个新闻程序. -> 以下内容纯属虚构,如有雷同纯属巧合:P +> 以下内容纯属虚构,如有雷同纯属巧合:P -一个新闻APP应该会有以下几个工作流. +一个新闻 APP 应该会有以下这些 活动activities。 +*   语言选择 - 当用户第一次打开软件, 他必须至少选择一种语言。选择后,选项保存在共享偏好中,用户跳转到新闻列表 activity。 +*   新闻列表 - 当用户来到新闻列表 activity,将发送一个包含语言参数的请求到服务器,并将服务器返回的内容显示在 recycler view 上(包含有新闻列表的 id _news_list_)。 如果共享偏好中未存语言参数,或者服务器没有返回一个成功消息, 就会弹出一个错误对话框并且 recycler view 将不可见。如果用户只选择了一种语言,新闻列表 activity 有个 “Change your Language” 的按钮,或者如果用户选择多种语言,则按钮为 “Change your Languages” 。 ( 我对天发誓这是一个虚构的 APP 软件) +*   新闻细节 - 如同名字所述, 当用户点选新闻列表项时将启动这个 activity。 -* 语言选择页面- 当用户第一次打开软件, 他必须至少选择一种语言. 当选择一个或者多个语言, 用shared preferences保存选项,用户跳转到新闻列表页面. -* 新闻列表页面- 当用户来到新闻列表页面, 将发送一个包含语言参数的请求到服务器,并将服务器返回的内容显示在recycler view上(包含有新闻列表的 id?_news_list_). 如果语言参数不存在在shared preferences或者服务器没有返回一个成功消息, 就会弹出一个错误对话框并且recycler view将不可见. 新闻列表页面有个名叫 “Change your Language” 的按钮,如果用户选择了一种语言 或者用户选择多种语言“Change your Languages” 永远是可见的. ( 我对天发誓这是一个虚构的APP软件) -* 新闻详细内容-如同名字所述, 当用户点选新闻列表项将启动这个页面. - - -这个APP已经研究的足够了,让我们深入新闻列表页面编写测试用例. 这是我第一次写的代码. - +这个 APP 功能已经足够,,让我们深入研究下为新闻列表 activity 编写的测试用例。 这是我第一次写的代码。 ``` /* @@ -42,9 +39,10 @@ } ?} ``` -#### 仔细想想测试什么. -我们首先来测试新闻列表项的点击_?testClickOnAnyNewsItem()_, 如果服务器没有返回成功信息, 测试用例将会返回失败,因为recycler view是不可见的. 但是这个测试用例的通过或者失败并不是我们所期望的结果, 它要求不管什么原因recycler view都是可见的, 如果recycler view不可见,将返回失败信息. 正确的测试代码应该像下面这个样子. +#### 仔细想想测试什么。 + +在第一个测试用例 _testClickOnAnyNewsItem()_, 如果服务器没有返回成功信息,测试用例将会返回失败,因为 recycler view 是不可见的。但是这个测试用例的目的并非如此。 **不管该用例为 PASS 还是 FAIL,它的最低要求是 recycler view 总是可见的,** 如果因某种原因,recycler view 不可见,那么测试用例不应视为 FAILED。正确的测试代码应该像下面这个样子。 ``` /* @@ -66,8 +64,8 @@ } catch (AssertionFailedError e) { return; } - //Here we are sure, that the news_list recyclerview is visible to the user. - onView(allOf(withId(R.id.news_list), isDisplayed())).perform(RecyclerViewActions +    //在这里我们确信,news_list的 recyclerview 对用户是可见的。 +    onView(allOf(withId(R.id.news_list), isDisplayed())).perform(RecyclerViewActions .actionOnItemAtPosition(1, click())); intended(hasComponent(NewsDetailsActivity.class.getName())); } @@ -76,13 +74,15 @@ ``` #### 一个测试用例本身应该是完整的 -当我开始测试, 我通常按如下顺序测试 +当我开始测试, 我通常按如下顺序测试 activities: -* 语音选择页面 -* 新闻列表页面 -* 新闻详细内容 +* 语音选择 -当我开始测试语音选择页面, 总有一种语音已经是选择好了的. 但是当我测试新闻列表页面, 测试用例开始返回错误信息. 原因很简单- 没有选择语音,recycler view讲不会显示出来.因此, 测试用例的执行顺序不能影响测试结果. 因此在运行测试用例之前, 语言选项必须是保存的. 在本例中,测试用例独立与语言选择页面单独运行. +* 新闻列表 + +*   新闻细节 + +因为我首先测试语音选择 activity,在测试 NewsList activity 之前,总有一种语音已经是选择好了的。但是当我先测试新闻列表 activity 时,测试用例开始返回错误信息。原因很简单 - 没有选择语言,recycler view 不会显示。**注意, 测试用例的执行顺序不能影响测试结果。** 因此在运行测试用例之前, 语言选项必须是保存在共享偏好中的。在本例中,测试用例独立于语言选择 activity 的测试。 ``` @Rule @@ -111,9 +111,9 @@ intended(hasComponent(NewsDetailsActivity.class.getName())); ?} ``` -#### 在测试用例中避免使用条件代码. +#### 在测试用例中避免使用条件代码。 -现在在第二个测试用例_testChangeLanguageFeature()_, 我们获取到用户选择语言个数, 我们写了if-else条件来进行测试 . 但是 if-else 条件应该写在你的代码当中, 不是测试代码里. 每一个条件应该单独测试. 因此, 在本例中, 我们将写如下两个测试用例. +现在在第二个测试用例 _testChangeLanguageFeature()_中,我们获取到用户选择语言的个数, 基于这个数目,我们写了 if-else 条件来进行测试。 但是 if-else 条件应该写在你的代码当中,而不是测试代码里。每一个条件应该单独测试。 因此, 在本例中, 不是只写一条测试用例,而是要写如下两个测试用例。 ``` /** @@ -143,16 +143,16 @@ ``` #### 测试用例应该独立于外部因素 -在大多数APP中, 我们与外部网络或者数据库进行交互.一个测试用例可以向服务器发送一个请求并获取返回信息. 但是当获取失败信息以后, 我们不能认为测试用例没有通过.试想一下如果测试用例没有通过, 然后我们修改客户端代码,测试用例通过. 但是在本文中, 我们有在客户端进行任何更改吗?-没有. +在大多数应用中,我们与外部网络或者数据库进行交互。一个测试用例运行时可以向服务器发送一个请求,并获取成功或失败的返回信息。但是不能因从服务器获取到失败信息,就认为测试用例没有通过。这样想这个问题 - 如果测试用例失败,然后我们修改客户端代码,以便测试用例通过。 但是在本例中, 我们要在客户端进行任何更改吗?- **NO**。 -但是你应该也无法避免要测试网络请求和响应. 由于服务器是一个外部代理, 我们可以设想一个场景,发送一些可能导致程序崩溃的错误请求. 因此, 你写的测试用例应该覆盖所有可能来自服务器的响应,通过这种方式来保证你的代码不会崩溃. +但是你应该也无法完全避免要测试网络请求和响应。由于服务器是一个外部代理,我们可以设想一个场景,发送一些可能导致程序崩溃的错误响应。因此, 你写的测试用例应该覆盖所有可能来自服务器的响应,甚至包括服务器决不会发出的响应。这样可以覆盖所有代码,并能保证应用可以处理所有响应,而不会崩溃。 -> 正确的编写测试用例非常重要的. -感谢你阅读此文章。你可以联系我[LinkedIn][1]. 你还可以阅读我的其他文章[here][2]. +> 正确的编写测试用例与编写这些测试代码同等重要。 -获取更多资讯请关注?_[_Mindorks_][3]_?, 你将获得我们的最新信息. +感谢你阅读此文章。希望对测试用例写的更好有所帮助。你可以在 [LinkedIn][1] 上联系我。还可以[在这里][2]阅读我的其他文章。 +获取更多资讯请关注_[Mindorks][3]_, 我们发新文章时您将获得通知。 -------------------------------------------------------------------------------- From f63506318c83acb6525d776c8f6cce2772f8722f Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 11 Jan 2017 22:07:00 +0800 Subject: [PATCH 25/73] PROOF:20160823 Getting Started with HTTP2 - Part 1 @hkurj --- ...823 Getting Started with HTTP2 - Part 1.md | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/translated/tech/20160823 Getting Started with HTTP2 - Part 1.md b/translated/tech/20160823 Getting Started with HTTP2 - Part 1.md index fe7c434563..62358240f2 100644 --- a/translated/tech/20160823 Getting Started with HTTP2 - Part 1.md +++ b/translated/tech/20160823 Getting Started with HTTP2 - Part 1.md @@ -1,53 +1,54 @@ -初识 HTTP/2(第一部分) +初识 HTTP/2(一) ============================================================ ![](https://static.viget.com/_284x284_crop_center-center/http2-pizza.png?mtime=20160822160641) -用披萨来说明当你订单数很大的时候HTTP/2是怎么打败HTTP/1.1的。 +> 用披萨来说明当你订单数很大的时候 HTTP/2 是怎么打败 HTTP/1.1 的。 -在建立网站和应用上 _HTTP/2 有些令人惊叹的改变,在 HTTP/2 发布后的一年半,几乎[10%的网站使用了 HTTP/2][4]。它是绝对值得被采用的,但是这篇博文应该首推给使用 HTTP/2 的前端开发者。这是个连载的博文是指导前端开发者怎么转换到 HTTP/2。_ +在建立网站和应用的方式上 HTTP/2 有些令人惊叹的改变,在 HTTP/2 发布后的一年半,几乎 [10% 的网站使用了 HTTP/2][4]。它绝对值得采用,但是这篇文章应该首先推给使用 HTTP/2 的前端开发者。这个连载的文章是指导前端开发者怎么转换到 HTTP/2。 -_这个推送涵盖了 HTTP/2 对 HTTP/1.1 来说有什么提高,并且向前端开发者介绍了 HTTP/2。_ +本文涵盖了 HTTP/2 对 HTTP/1.1 来说有什么提高的内容,并且向前端开发者介绍了 HTTP/2。 -### 再次让我想起什么是HTTP... +### 再次让我想起什么是 HTTP ... -超文本传输协议,也就是 HTTP,这个协议决定了 web 内容怎么传输。HTTP/1.1 在1999年被标准化,那时候的 web 和现在有很大的不同,表格霸占了整个网络。样式通常被内联在元素中,如果网站管理员更加的细致,他们会在头部写个 `