class: center, middle, slides # Making Windows Work ## Dan Schlosser ###[dan@adicu.com](mailto:dan@adicu.com) [static.schlosser.io/making-windows-work](http://static.schlosser.io/making-windows-work) [![Creative Commons License](https://i.creativecommons.org/l/by-nc/4.0/88x31.png)](http://creativecommons.org/licenses/by-nc/4.0/) --- # Introduction [.right-side[.wrap[![Windows_Logo](./images/Windows_Logo.png)]]](./images/Windows_Logo.png) **Goals** - Take apart the stigma against Windows and Windows users in the tech community. - Make Windows faster, smarter, and easier to use **Disclaimers** - I am not perfect (ask me questions when I mess up)! - My opinions are my own and do not represent the beleifs of ADI or any of its affiliates. - This content is geared towards users of Windows 7/8. If you are using Vista or below, consider upgrading. --- # The Three Golden Rules of Windows [.right-side[.wrap[![Golden_Rules_1](./images/Golden_Rules_1.jpg)]]](./images/Golden_Rules_1.jpg) ##1. Keep crap out - Software, files, viruses ##2. Stay up to date - Software, Windows, directory structure ##3. Take ownership of your computer - Workflows, directory structure, education --- # Helpful Applications for Programmers - [7-Zip]() - Unpackage any package, period. - [Dropbox](https://www.dropbox.com/) - File syncronization across multiple computers for free. - [Eclipse](http://www.eclipse.org/) - Full featured, heavy-duty IDE. - [Git](http://git-scm.com/) - Version control system used by the likes of Linux and Android. - [Google Chrome](http://www.google.com/chrome/) and [Firefox](http://www.mozilla.org/en-US/firefox/new/) - Use one as your main browser, and another as a fallback. I pity the fool who falls back onto [IE](http://windows.microsoft.com/en-us/internet-explorer/download-ie). - [Greenshot](http://getgreenshot.org/) - Simple tools for professional looking screenshots. - [MarkdownPad](http://markdownpad.com/) - For editing markdown documents like this slideshow and GitHub READMEs. - [Microsoft Security Essentials](http://windows.microsoft.com/en-us/windows/security-essentials-download) or [Avast Antivirus](http://www.avast.com/index?ClickID=dozhctrtms0cr0hrrbhsb0cbssybmc2s2roy) - Antivirus software - [Notepad++](http://notepad-plus-plus.org/) - Lightweight, versitile, and free text editor for programmers. Some people use [SublimeText](http://www.sublimetext.com/), which is slightly less feature rich, but much more beautiful. --- # Places You Should Visit More Often [.right-side[.wrap[![Places_2](./images/Places_2.png)]]](./images/Places_2.png) [.right-side[.wrap[![Places_1](./images/Places_1.png)]]](./images/Places_1.png) ### Programs and Features List (Uninstall that Sh*t!) - **Windows 8** - `WIN + X + F` - **Windows 7** - `START`, type "add remove", press `ENTER` ### Startup (Disable that Sh*t!) - **Windows 8** - `CTRL + SHIFT + ESC`, switch to "Startup" tab - **Windows 7** - `START`, type "msconfig", switch to "Startup" tab ### Google - **Both** - [www.google.com](http://www.google.com) solves ALL of your problems. --- # CMD: An Overview [.right-side[.wrap[![CMD_An_Overview](./images/CMD_An_Overview.png)]]](./images/CMD_An_Overview.png) - CMD sucks. It's worse than terminal, iTerm, ZSH, etc. But it's ours. And we can learn to love it. - Problems: - Navigation - Copy / Paste - Syntax for common tasks - Solutions: - Workarounds (Best, see rule #1) - Download a CMD replacement, like [Cygwin](http://www.cygwin.com) - Install Linux --- # CMD Tips: [.right-side[.wrap[![CMD_Tips_1](./images/CMD_Tips_1.png)]]](./images/CMD_Tips_1.png) [.right-side[.wrap[![CMD_Tips_2](./images/CMD_Tips_2.png)]]](./images/CMD_Tips_2.png) ## Enable copy / paste 1. Open CMD. 2. Press `Alt + Space + D` to open the default settings. 3. Under the "Options" tab, check all three boxes in the "Edit Options" section. 4. Restart CMD. 5. Click and drag to select, `Enter` to copy, and right click to paste. ## Beautify CMD 1. In the same window, switch to the "Colors" tab. 2. Edit "Screen Background" and "Screen Text". 3. Restart CMD --- # CMD Tips: Making Your Own Commands Using .bat Files [.right-side[.wrap[![CMD_Tips_3](./images/CMD_Tips_3.png)]]](./images/CMD_Tips_3.png) **Batch Files** are text scripts that contain a series of commands to be carried out by CMD or a similar interpreters. They can be run from CMD without their extensions. ##Steps: 1. Learn [Batch Programming](http://www.robvanderwoude.com/batchfiles.php). 2. Make a directory, call it `scripts`. _I use `C:\Dropbox\scripts`_ 3. In that directory, make `ls.bat` with containing the following two lines: ``` @echo off dir %~f1 ``` 5. Repeat 3-4 for as many scripts as you like 6. Add the scripts folder to your `PATH` (see next slide) --- name:path # CMD Tips: Adding to Your PATH ##Through the GUI 1. Navigate to `Control Panel\All Control Panel Items\System` 2. Click "Advanced system settings" on the left panel 3. Click "Environment Variables..." 4. Select the "Path" row in the "User variables for %YourName%" box. 5. Click "Edit..." 6. Change the "Variable value" to look like this: ``` "C:\OtherPaths\";"C:\MorePaths\";"C:\Full Path\To\scripts" ``` 7. Click OK 3 times. ##Using CMD 1. To view your PATH type `echo %PATH%` 2. To set your PATH type ``` SET PATH=%PATH%;"C:\Full Path\To\scripts" ``` --- # CMD Tips: Adding to Your PATH [.center[![CMD_Tips_4](./images/CMD_Tips_4.png)]](./images/CMD_Tips_4.png) --- # Some Neat Batch Files - **nb.bat** - Open any file in Notepad++ ``` @echo off "c:/Program Files (x86)/Notepad++/notepad++.exe" "%~f1" "%~f2" "%~f3" ``` - **cr.bat** - Open a file or valid URL in Google Chrome ``` @setlocal @echo off set str1=%1 if exist %~f1 ( start chrome "%~f1" ) else ( set ok_=true ping -n 1 %str1%|find "Lost = 0">nul||set ok_= if defined ok_ ( start chrome %1 ) else ( echo Bad url, please check for typos. ) )endlocal ``` --- # Some Neat Batch Files cont. - **favs.bat** - Open a bunch of freqented links. ``` start chrome http://www.adicu.com start chrome http://github.com start chrome http://woot.com ``` - **groove.bat** - For when you want to groove out ``` start chrome http://thumbs.dreamstime.com/thumblarge_64/11495193558xDENJ.jpg start wmplayer C:\Windows\Media\flourish.mid ``` - **matrix.bat** - Enter the Matrix. ``` @echo off :start echo %random% %random% %random% %random% %random% %random% %random% %random%^ %random% %random% %random% %random% %random% %random% goto start ``` --- # Workflow: CMD + File Explorer [.right-side[.wrap[![CMD_+_File_Explorer_1](./images/CMD_+_File_Explorer_1.png)]]](./images/CMD_+_File_Explorer_1.png) [.right-side[.wrap[![CMD_+_File_Explorer_2](./images/CMD_+_File_Explorer_2.png)]]](./images/CMD_+_File_Explorer_2.png) ##Idea: Use File Explorer most of the time, and launch CMD in current location when needed. ##Setup (Windows 8) 1. Open File Explorer (Windows Explorer) 2. Press `Alt + F` to enter the File menu, right click "Open command prompt" and click "Add to Quick Access Toolbar". 3. Press `Alt` and note the shortcut _NB: This workflow is possible on Windows 7, but requires the use of an [AutoHotkey](http://www.autohotkey.com/) script like [this one](http://superuser.com/questions/205359/how-to-open-command-prompt-in-current-folder-by-keyboard-shortcut)._ --- # Use Case: Collaboration Using Git [.right-side[.wrap[![CMD_+_File_Explorer_3](./images/CMD_+_File_Explorer_3.png)]]](./images/CMD_+_File_Explorer_3.png) [.right-side[.wrap[![CMD_+_File_Explorer_4](./images/CMD_+_File_Explorer_4.png)]]](./images/CMD_+_File_Explorer_4.png) ##Steps 1. Press `Alt + [Number]` (Windows 8), your AutoHotKey shortcut (Windows 7/8), or hold `SHIFT`, right click, and click "Open command window here". 2. Type Git commands using CMD 3. Type `exit` to close CMD ##What is Git? [Git](http://git-scm.com/) is a distributed version control system widely used by programmers of all kinds. It's super awesome, and you should definitely use it! Many people use it with [Github](https://github.com/). --- name:eclipse #Workflow: Eclipse [.right-side[.wrap[![Eclipse](./images/Eclipse.png)]]](./images/Eclipse.png) ##Principles - IDEs mean more work upfront and less work overall - Eclipse has an ecosystem of plugins that ensure that you can develop *virtually* any project using it. - Uses a series of *perspectives*, which are custimizable views designed specifically for differnet each language. - Compatible with your current working directory: put your workspace there and import the projects. *NB: While Eclipse does support Git in the form of EGit, Git should still be handled at the command line where it belongs.* --- # Good Practices: Keeep a Working Directory [.right-side[.wrap[![Keep_a_Working_Directory](./images/Keep_a_Working_Directory.png)]]](./images/Keep_a_Working_Directory.png) - A directory for all of your coding projects - Should be located at `C:\working\` for easy access *You can get there in CMD by typing* `cd/working`* from **anywhere*** - This should be your [Eclipse workspace](#eclipse), and the place where you called `git init`. --- # Good Practices: Installing Languages - Download an executable from the official website for the language ([python.org/download](http://python.org/download/), [ruby-lang.org/en/downlaods](http://www.ruby-lang.org/en/downloads/), etc.) - Do your very best to only only install one version of a given language at a time on your computer. This saves a lot of heartache. - Be consistent about where you install them. Choose a directory close to the root and without spaces. Choose either: - `C:\dev\Python27`, `C:\dev\Ruby191`, etc. OR - `C:\Python27`, `C:\Ruby191`, etc. - **Run the installer yourself** (See rule #3) - Verify installation success in CMD (be sure the executable is [in your PATH](#path)). - Integrate with Eclipse using a plugin. --- class: center, middle # Thank you ###[dan@adicu.com](mailto:dan@adicu.com) Slideshow made with [Remark](http://gnab.github.io/remark/)