janzeteachesit / 100-days-of-writing

100 days journal - to keep yourself accountable
https://janzeteachesit.github.io/100-days-of-writing/
GNU General Public License v3.0
3 stars 5 forks source link

Weekly Digest: Any new issue (1 item) #1158

Open janzeteachesit opened 6 years ago

janzeteachesit commented 6 years ago

[100-days-of-writing] Weekly Digest: Any new issue (1 item) Weekly Digest: Any new issue (1 item) By janzeteachesit Assigned to [100-days-of-writing] Weekly Digest: Any new issue (2 items) Weekly Digest: Any new issue (2 items) By janzeteachesit Assigned to [100-days-of-writing] Weekly Digest: Any new issue (1 item) Weekly Digest: Any new issue (1 item) By janzeteachesit Assigned to [100-days-of-writing] Weekly Digest: Any new issue (4 items) Weekly Digest: Any new issue (4 items) By janzeteachesit Assigned to [100-days-of-writing] Why Vim is so much better than Atom Makers Academy Why Vim is so much better than Atom Makers Academy By janzeteachesit Assigned to Why Vim is so much better than Atom – Makers Academy http://ift.tt/2tVcq2N GRIST4  Vim  2print  CSP  Why Vim is so much better than Atom by Leo Allen Leo AllenAug 4, 2016 Coder, coach, Teal advocate Ever since coders have started to code, they’ve been arguing over which tool is the best for getting their job done. Although these debates can easily descend into interminable editor wars it’s an important thing to consider, particularly when you consider that as a programmer you’ll be spending the majority of your working time typing into whatever editor you decide to choose. Recently I’ve noticed a lot of the students who are learning to code at our intensive bootcamp here at Makers Academy have begun switching to Atom, an open-source editor made by developers at GitHub. As impressed as I’ve been with Atom, I personally believe you can have a far more productive experience using a text-editor that first emerged nearly 40 years ago — even if you’re just beginning to learn to code. Enter Vim Vim is an open-source and free clone of vi, a text-editor developed in 1976 by Bill Joy. It is generally run in the terminal, and when you first look at some code in Vim it admittedly does still look like something that was developed long before people discovered that computers could actually be friendly to humans: If you type vim into your Unix-based terminal something similar probably will come up. If vim isn’t installed you can install it on a Mac using homebrew by running brew install vim — I’d recommend doing this anyway as the default version on a Mac is pretty out of date. While you’re at it I strongly recommend taking Jilles Soeters’ advice to badassify your terminal and shell — once you switch to Vim you’re going to be spending even more time in the terminal and you want the experience to be as enjoyable as possible. What Atom does better Before I start extolling the virtues of Vim, I’ll be honest: there are some things that Atom does better… Configuration and set-up Out of the box Atom is fully-featured: it already has syntax highlighting, Git integration, file management and so on. And if you want to change any of the configuration steps, there’s a nice visual Settings screen which guides you through the process. Vim on the other hand requires a little more work, although it’s really not as hard as you might assume: Don’t worry if at the moment you don’t understand what’s going on, at the beginning I just started with Thoughtbots base template and gradually tweaked it to my needs as my knowledge of Vim deepened. Packages Atom has an impressive package management system, allowing you to add any of the thousands of community-created packages to enhance your editor by simply searching for and installing packages, all from inside of Atom. Vim lacks such a simple and clean interface for installing and finding packages, but fortunately someone created Vundle, a plugin manager that works very similarly to Ruby’s Bundler (hence the name Vundle). Once you get it installed, you can then add new plugins by defining the GitHub repo where the plugin is stored, e.g. Plugin 'tpope/vim-surround' and then type :VundleInstall to install it. Vundle is not quite as easy as Atom’s system, but once you get it setup it’s actually almost as quick. You can also quickly search for plugins using the website VimAwesome — you’ll soon see you can do pretty much anything in Vim with the right plugin. Themes GitHub have always paid great attention to design and Atom is no exception, coming pre-installed with some great looking themes and again offering a simple interface for finding and installing more. But we can once again use Vundle to install themes, in exactly the same way we installed plugins, and use VimColors to search for new ones. Try getting gruvbox using Vundle and then setting it as your theme by adding colorscheme gruvbox to your .vimrc. We can now see that things already looking much better: What Vim does better than Atom Although we’ve seen that setting Vim up is not quite as easy as setting up Atom, it’s really not that difficult. And although there’s still a bit of a learning curve left, we can now start looking at the real advantages of using Vim over Atom. Navigating When you first start using Vim, it seems counter-intuitive. It forces you learn numerous different editing modes such as Normal, Insert and Visual; and you can’t use a mouse. Yet this in fact is where Vim starts to really show its power. Navigating around code in an editor like Atom, you’ll eventually need to move your hands off the home-row of your keyboards and either pick up a mouse or use the arrow keys, hugely slowing you down if you’re a touch typer (which you should be). Vim gets around this problem by having an Insert mode (basically the same mode that Atom offers) but an additional Normal mode where all of the keys become movement keys, so that for example j moves your cursor up and k moves it down. You can switch between these modes by pressing i to go into insert mode and Escape to go back into Normal mode. I speed this up by remapping jj to perform the same function, so my fingers don’t have to leave the home key to find the escape key: inoremap jj This is an example of how Vim’s ability to customise almost anything can really speed up your workflow. To start learning how to use Vim my colleague Spike has a great guide to getting started which I’d recommend starting with. Navigating files When coding we’re constantly jumping between files, so it’s crucial that our editor has a powerful tool for navigating between them. Although Atom has a Find in Buffer tool, the Vim package CtrlP works in a similar way but is significantly more useful. At it’s most basic you open Vim from the root folder of the project you’re working on, type Ctrl and P to open the fuzzy-finder and then start typing the file you want to open. Because it’s a fuzzy finder you don’t need to type all the letters of the file you’re looking for to bring it up: So far, no different from Atom’s finder. But CtrlP gives us much more. We can open that file just by pressing Return, but we can also press Ctrl-V to open a buffer in a split: Or Ctrl-T to open a buffer in a new tab (the tabs are shown at the top of the file): Or if the file doesn’t exist, you can press Ctrl-Y to create a new file. Given how many files you end up juggling in a large web app, having these shortcuts will end up saving you a tonne of time. In addition, I would recommend remapping your Caps Lock key to Ctrl, as once you start using Vim with CtrlP you’ll be finding yourself using Ctrl far more than Caps Lock. Another use CtrlP has is to quickly open a file and its related test in a window next to it — particularly crucial if you practice TDD like we do at Makers Academy. Personally it was the need for a tool that worked seamlessly with my TDD workflow which was why I finally gave up on Atom and switched over to Vim. I had become frustrated with a workflow where I would write a test, switch windows to the terminal to run my tests, and then switch back again to make them pass. With Vim, because it’s already based in the terminal, it’s trivial to run tests directly from Vim, either by running a terminal command by prepending :! to it, such as :!npm test or even better by using a plugin like Vim RSpec that adds shortcuts to various test commands, as described on Thoughtbot’s blog. Taking inspiration from Gary Bernhardt’s Vim/TDD workflow I also have remapped the return key so in Normal mode it saves my files and repeats the last command: nnoremap :wa:!! This has radically changed my TDD workflow — now with one press of the Return key, I can run my tests, immediately see their results and press the Return key to go straight back to my code. It’s a workflow that’s so fast that often when I’m pairing I’m told by my pair that I need to slow down so they can see what’s happening with the tests! Pairing On the subject of pairing, this is another of Vim’s strengths. You can use Vim with Tmux, a programme which allows someone else to SSH directly into your computer, and not only see your Vim screen on their computer but jump in and start editing as well. It takes a little bit of setup to get around some of Tmux’s intricacies but it’s worth it once you get going — you can even pair remotely using the same Vim session. Going further If somehow you’re still not convinced, it’s worth pointing out that what I’ve talked about here is just the tip of the iceberg. There’s so many more things I love about Vim: Airline gives you a nice status bar at the bottom of your Vim like the ones in my screenshots NerdTree is a great partner to CtrlP for browsing files from within Vim Ag.vim can search in all your files almost instantaneously EasyMotion will speed up you moving around Vim in Normal mode AutoFormat correctly formats your files with press of a button Syntastic checks your files for syntax errors as you type Finally all of Tim Pope’s Vim plugins are worth a look — they integrate Vim with Rails, Git and loads more So hopefully I’ve done enough to convince you to at least give Vim a try — once you’ve gotten over it’s learning curve you won’t go back, and you’ll finally be able to call yourself a hipster hacker: Originally published at blog.makersacademy.com on September 30, 2015. Show your support Clapping shows how much you appreciated Leo Allen’s story. Makers Academy Makers Academy is a 12-week computer programming bootcamp in London Why Vim is so much better than Atom – Makers Academy Label: grist Date: October 01, 2017 at 06:54PM Labeled: October 1, 2017 at 06:59PM via GitHub http://ift.tt/2yQlFRL October 01, 2017 at 07:03PM via GitHub http://ift.tt/2yQlFRL [100-days-of-writing] You Dont Need an Icon Designer or Even Photoshop Hacker Noon You Dont Need an Icon Designer or Even Photoshop Hacker Noon By janzeteachesit Assigned to You Don’t Need an Icon Designer or Even Photoshop – Hacker Noon http://ift.tt/2fDZfLm GR GRIST4  You Don’t Need an Icon Designer or Even Photoshop An independent creator’s guide to getting a quality icon for free. Jacob PeddicordJul 28 Wishlist+ current app icon Here is the logo that I made for my app Wishlist+. It was made by me, for free, without using any paid tools such as Photoshop or Sketch. It may not win any icon design awards but it definatly doesn’t look out of place on a homescreen either. There are several key ingredients to making an icon like this for yourself: Time I made the first draft of this icon in an hour and a half. As you can see in this image the final icon only had a few more minutes of tweaks added on a month later. Small refinements made in minutes Contrary to popular belief, I did not find this process time consuming. As long as you combine all of the right elements, the process is straightforward and short. Restraint Before you go looking for inspiration for your idea you need to set rules for yourself. I limited myself to basic shapes and color schemes. This is one of the biggest keys to making the design time so short. When you are just dealing with a bunch of rounded squares on one color gradient, you can not only create you icon quickly, you can rapidly make changes. Designing a mostly flat icon with simple shapes takes minutes rather than days. Inspiration At first, you will probably struggle to find an idea for your app. When I was stuck I looked at Apple’s system apps for inspiration. I was specifically inspired by the Apple News icon. Wishlist+ and the icon that inspired it If you are still struggling to find an idea for you app think of what physical metaphors you can use to represent your app. For example, my app is a wishlist so my icon is a list. The Apple News app contains news so the icon is a news paper. Tools The entire creation process took place in two web apps, http://designapp.io/ and https://makeappicon.com. All of the design was done for free in Designapp and that file was uploaded to MakeAppIcon, which generates all of the necessary icon files for iOS or Android. Both of these tools are 100% free to use. Designapp may not be the best design client, feel free to use Photoshop if you have it, but it lets you make app icons with our limited rules. You can many geometric shapes and color gradients, but I used one shape, the rounded square. designapp.io and the rounded square A note on icon designers I am in no way saying that what icon designers are doing is worthless or easily replaceable. Making a free icon in a web app does not replace professional work for people with enough money. However, if you want to make your icon yourself, for free, it is possible. It is probably preferrable for smaller companies/independant creatives as well. To conclude, if you are making your first app or need branding for a website, you do not have to pay $100s of dollars for a designer to do it for you. If you would rather spend a couple hours you can get a design exactly the way you want it for free. Thank you for reading my article, the app discussed is called Wishlist+ and it is available on the App Store here: http://ift.tt/2x8zZYF You Don’t Need an Icon Designer or Even Photoshop – Hacker Noon Label: grist Date: October 01, 2017 at 06:55PM Labeled: October 1, 2017 at 06:59PM via GitHub http://ift.tt/2xIT0QY October 01, 2017 at 07:03PM via GitHub http://ift.tt/2xIT0QY [100-days-of-writing] Identify Colors with an RGB LED Hackster Identify Colors with an RGB LED Hackster By janzeteachesit Assigned to Identify Colors with an RGB LED – Hackster’s Blog http://ift.tt/2vHtCWC GRIST4  STEM  Electronics  Identify Colors with an RGB LED Hackster StaffAug 29 When you look at an object, what you’re sensing is the different red, green, and blue components of light bouncing off of it. While something that’s purely red will absorb the green and blue light components, most of what we see is some mixture of these shades. Taking this principle and applying it with an RGB LED and a simple photoresistor, YouTuber Tech Martian was able to make a basic RGB sensor. His design shines light onto a colored piece of paper, reflecting it onto the photoresistor. Since the Arduino program knows which color is emitted by the LED, the amount of light taken in by the photoresistor can be recorded for each shade, allowing it to determine the paper’s color. In order to take accurate readings, the program first goes through a calibration routine, emitting a variety of colors, while a black then white piece of paper is used as the reflector. Be sure to check out the project’s write-up for more info on the build, along with the code used. Identify Colors with an RGB LED – Hackster Label: grist Date: October 01, 2017 at 06:57PM Labeled: October 1, 2017 at 06:59PM via GitHub http://ift.tt/2yQWK0u October 01, 2017 at 07:03PM via GitHub http://ift.tt/2yQWK0u [100-days-of-writing] Build Your Own Rubiks Cube-Solving Bot Hacksters Blog Build Your Own Rubiks Cube-Solving Bot Hacksters Blog By janzeteachesit Assigned to Build Your Own Rubik’s Cube-Solving Bot – Hackster’s Blog http://ift.tt/2vCajyY GRIST4  STEM Projects  Build Your Own Rubik’s Cube-Solving Bot Cameron CowardAug 29 If you’ve been alive for any of the last 40 years, you’ve probably tried your hand at solving a Rubik’s Cube at least once. The dastardly devices draw you in with their bold primary colors and simple-sounding concept. But, how long did you try to solve it before throwing it away in disgust, and going back to something comparatively easy, like rocket science? If you’re anything like us, it didn’t take long. However, as impossible as it seems when you’re just turning the blocks pretty much at random, Rubik’s Cubes can actually be solved very quickly and easily. That’s because there is a mathematical method to solving them, if you understand it and follow the steps properly. Entrants in Rubik’s Cube speed-solving competitions use these steps to complete the puzzle in just a matter of seconds. If a task can be completed following predefined steps, as in the case of the Rubik’s Cube, then a robot can be programmed to do it. Wouldn’t it be amazing to have a robot that can easily complete a real, physical task that you, yourself, cannot? That is the true allure of robotics in general, isn’t it — when our creations are more capable than we are? Designing a robot to solve a Rubik’s Cube is still a difficult and time consuming task though. Luckily the good people at OTVINTA have a design, 3D-printable parts, and detailed instructions ready to go to build your own bot. The total cost of the hardware and electronics will run you roughly $225, and if you want to use OTVINTA’s software you’ll need to pay for it after 30 days. But, the bot looks robust, well-designed, and can do what most of can’t: solve a Rubik’s Cube in a jiffy! Build Your Own Rubik’s Cube-Solving Bot – Hackster’s Blog Label: grist Date: October 01, 2017 at 06:58PM Labeled: October 1, 2017 at 06:59PM via GitHub http://ift.tt/2xIT5UM October 01, 2017 at 07:03PM via GitHub http://ift.tt/2xIT5UM Github Weekly Summary Weekly Digest: Any new issue (4 items) Label: grist Date: October 07, 2017 at 06:51PM Labeled: October 7, 2017 at 06:54PM via GitHub http://ift.tt/2fUKPGU October 07, 2017 at 06:56PM via GitHub http://ift.tt/2fUKPGU Github Weekly Summary Weekly Digest: Any new issue (1 item) Label: grist Date: October 14, 2017 at 07:37PM Labeled: October 14, 2017 at 07:40PM via GitHub http://ift.tt/2iaI0pl October 14, 2017 at 07:45PM via GitHub http://ift.tt/2iaI0pl [100-days-of-writing] Deep-sea mining for rare metals threatens rare species - The Verge Deep-sea mining for rare metals threatens rare species - The Verge By janzeteachesit Assigned to http://ift.tt/2ymqBRx GRIST4 Deep-sea mining for rare metals threatens rare species - The Verge Label: grist Date: October 15, 2017 at 02:10PM Labeled: October 15, 2017 at 03:00PM via GitHub http://ift.tt/2ic17iX October 15, 2017 at 03:05PM via GitHub http://ift.tt/2ic17iX Github Weekly Summary Weekly Digest: Any new issue (2 items) Label: grist Date: October 21, 2017 at 06:57PM Labeled: October 21, 2017 at 07:02PM via GitHub http://ift.tt/2xWcSvX October 21, 2017 at 07:03PM via GitHub http://ift.tt/2xWcSvX Github Weekly Summary Weekly Digest: Any new issue (1 item) Label: grist Date: October 28, 2017 at 06:43PM Labeled: October 28, 2017 at 06:47PM via GitHub http://ift.tt/2yTaVoK October 28, 2017 at 06:49PM via GitHub http://ift.tt/2yTaVoK Github Weekly Summary
Weekly Digest: Any new issue (1 item)
Label: grist
Date: November 04, 2017 at 06:39PM