Friday, December 4, 2015

Visual Studio Keyboard Shortcuts text

Text navigation
Shortcut Description
Left Arrow Moves the cursor one character to the left
Right Arrow Moves the cursor one character to the right
Down Arrow Moves the cursor down one line
Up Arrow Moves the cursor up one line
Page Down Scrolls down one screen in the editor window
Page Up Scrolls up one screen in the editor window
End Moves the cursor to the end of the current line
Home Moves the cursor to the beginning of the line. If you press Home when the cursor is already at the start of the line, it will toggle the cursor between the first non-whitespace character and the real start of the line
Ctrl-End Moves the cursor to the end of the document
Ctrl-Home Moves the cursor to the start of the document
Ctrl-G Displays the Go to Line dialog. If the debugger is running, the dialog also lets you specify addresses or function names to go to
Ctrl-] Moves the cursor to the matching brace in the document. If the cursor is on an opening brace, this will move to the corresponding closing brace and vice versa
Ctrl-K, Ctrl-N Moves to the next bookmark in the document
Ctrl-K, Ctrl-P Moves to the previous bookmark
Ctrl-K, Ctrl-I Displays Quick Info, based on the current language
Ctrl-Down Arrow Scrolls text down one line but does not move the cursor. This is useful for scrolling more text into view without losing your place. Available only in text editors
Ctrl-Up Arrow Scrolls text up one line but does not move the cursor. Available only in text editors
Ctrl-Right Arrow Moves the cursor one word to the right
Ctrl-Left Arrow Moves the cursor one word to the left
Ctrl-Shift-1 Navigates to the next definition, declaration, or reference of an item. Available in the object browser and Class View window. Also available in source editing windows if you have already used the Edit.GoToReference (Shift-F12) shortcut
Ctrl-Shift-2 Navigates to the previous definition, declaration, or reference of an item


Text manipulation
Shortcut Description
Enter Inserts a new line
Delete Deletes one character to the right of the cursor
Insert Toggles between insert and overtype insertion modes
Tab Indents the currently selected line or lines by one tab stop. If there is no selection, this inserts a tab stop
Shift-Tab Moves current line or selected lines one tab stop to the left
Backspace or Shift-Backspace Deletes one character to the left of the cursor
Ctrl-K, Ctrl-C Marks the current line or selected lines of code as a comment, using the correct comment syntax for the programming language
Ctrl-K, Ctrl-U Removes the comment syntax from the current line or currently selected lines of code
Ctrl-T or Shift-Enter Swaps the characters on either side of the cursor. (For example, AC|BD becomes AB|CD.) Available only in text editors
Ctrl-K, Ctrl-L Removes all unnamed bookmarks in the current document
Ctrl-M, Ctrl-O Automatically determines logical boundaries for creating regions in code, such as procedures, and then hides them. This collapses all such regions in the current document
Alt-Right Arrow or Ctrl-Spacebar Displays statement completion based on the current language or autocompletes word if existing text unambiguously identifies a single symbol
Ctrl-K, Ctrl-\ Removes horizontal whitespace in the selection or deletes whitespace adjacent to the cursor if there is no selection
Ctrl-K, Ctrl-F Applies the indenting and space formatting for the language as specified on the Formatting pane of the language in the Text Editor section of the Options dialog to the selected text.
Ctrl-L Cuts all selected lines or the current line if nothing has been selected to the clipboard
Ctrl-Shift-L Deletes all selected lines or the current line if no selection has been made
Ctrl-Enter Inserts a blank line above the cursor
Ctrl-Shift-Enter Inserts a blank line below the cursor
Shift-Alt-T Moves the line containing the cursor below the next line
Ctrl-J Lists members for statement completion when editing code
Ctrl-U Changes the selected text to lowercase characters
Ctrl-Shift-U Changes the selected text to uppercase characters
Ctrl-Shift-Spacebar Displays a tooltip that contains information for the current parameter, based on the current language
Ctrl-M, Ctrl-U Removes the outlining information for the currently selected region
Ctrl-M, Ctrl-P Removes all outlining information from the entire document
Ctrl-R, Ctrl-P Swaps the anchor and endpoint of the current selection
Ctrl-M, Ctrl-L Toggles all previously marked hidden text sections between hidden and display states
Ctrl-K, Ctrl-K Sets or removes a bookmark at the current line
Ctrl-M, Ctrl-M Toggles the currently selected hidden text section or the section containing the cursor if there is no selection between the hidden and display states
Ctrl-K, Ctrl-H Sets or removes a shortcut in the tasklist to the current line
Ctrl-R, Ctrl-R Enables or disables word wrap in an editor
Ctrl-R, Ctrl-W Shows or hides spaces and tab marks
Ctrl-Delete Deletes the word to the right of the cursor
Ctrl-Backspace Deletes the word to the left of the cursor
Ctrl-Shift-T Transposes the two words that follow the cursor. (For example, |End Sub would be changed to read Sub End|.)
Ctrl-.[dot] Display options on smarttag menu.Very useful for showing using/Imports options.


Text selection
Shortcut Description
Shift-Left Arrow Moves the cursor to the left one character, extending the selection
Shift-Alt-Left Arrow Moves the cursor to the left one character, extending the column selection
Shift-Right Arrow Moves the cursor to the right one character, extending the selection
Shift-Alt-Right Arrow Moves the cursor to the right one character, extending the column selection
Ctrl-Shift-End Moves the cursor to the end of the document, extending the selection
Ctrl-Shift-Home Moves the cursor to the start of the document, extending the selection
Ctrl-Shift-] Moves the cursor to the next brace, extending the selection
Shift-Down Arrow Moves the cursor down one line, extending the selection
Shift-Alt-Down Arrow Moves the cursor down one line, extending the column selection
Shift-End Moves the cursor to the end of the current line, extending the selection
Shift-Alt-End Moves the cursor to the end of the line, extending the column selection
Shift-Home Moves the cursor to the start of the line, extending the selection
Shift-Alt-Home Moves the cursor to the start of the line, extending the column selection
Shift-Up Arrow Moves the cursor up one line, extending the selection
Shift-Alt-Up Arrow Moves the cursor up one line, extending the column selection
Shift-Page Down Extends selection down one page
Shift-Page Up Extends selection up one page
Ctrl-A Selects everything in the current document
Ctrl-W Selects the word containing the cursor or the word to the right of the cursor
Ctrl-= Selects from the current location in the editor back to the previous location in the navigation history
Ctrl-Shift-Page Down Moves the cursor to the last line in view, extending the selection
Ctrl-Shift-Page Up Moves the cursor to the top of the current window, extending the selection
Ctrl-Shift-Alt-Right Arrow Moves the cursor to the right one word, extending the column selection
Ctrl-Shift-Left Arrow Moves the cursor one word to the left, extending the selection
Ctrl-Shift-Alt-Left Arrow Moves the cursor to the left one word, extending the column selection

Reference: http://www.dofactory.com/reference/visual-studio-shortcuts

Monday, March 9, 2015

Install Ruby on Ubuntu server

image

Summary
Use the following commands
sudo apt-get update
 sudo apt-get install ruby
The following demonstration was done on a Ubuntu server 14.04 accessed via Putty
image
Here are the commands and steps used to install Ruby on a Ubuntu server or Ubuntu via command line.
sudo apt-get update
Next step is to install Ruby
sudo apt-get install ruby
Now lets make a directory for Ruby Code
Mkdir rubyCode
The next step is to use Vim. If the machine has no Vim, enter the install command below
sudo apt-get install vim
Now use vim with the command below which creates a new .rb file
vim helloWorld.rb
Hold your typing vim. Follow these steps to write the hello world ruby app
image
Press the 'I' keyboard key
Type 'puts "Hello World in Ruby" '
 
Press the escape keyboard key
Type ':wq'
image
Now you should be back to the command line. Test the code with the following command
 ruby helloWorld.rb
image
You should see the text "Hello World in Ruby"
image
There you have it. Ruby is installed in the Ubuntu machine. You can learn more on Ruby on some tutorial sites like http://rubylearning.com/satishtalim/tutorial.html.
As for Vim, you can also learn about it online an example site is this page https://www.linux.com/learn/tutorials/228600-vim-101-a-beginners-guide-to-vim

Reference https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm



























Saturday, January 3, 2015

Developer Confessions: Superficial Testing

Developer Confessions

I am a developer who not thoroughly debug and test his code. I leave most of the quality assurance work to the testers and supervisors. While I just try to make the functionality to "work". I just did the old run and see if my assigned feature works along with the incomplete or not so thorough unit testing. Of course this habits changed as time passed by and classical beginner mistakes are corrected (most of the time). The classical mistakes I did in debugging involved testing my work.

I was lectured that testing and quality assurance of features should begin as early as requirement phase but some details eluded me. At the requirements phase where I get the to know my assignment, I clarify expectations but many times I do not clarify well enough. The depth of how I validate my expectations is not always complete. Moreover, special cases and their expected outcomes on those scenarios should have been thought of planned ahead for risk mitigation. I am ashamed that I fail to those at that phase. There are always scenarios I miss and not discussed to testers or requirements. Consequently, my test plans missed problematic scenarios that will happen.

Furthermore, my test plans are usually focused on functional areas only. Functional areas were my main focus to debug and test in isolation. Isolated debugging has proven to be efficient. I debug code and correct bugs quickly since the scope of where to look for risks were isolated. This practice works until my assigned features interact with other features. Not to mention the usability issues missed with this bias for functional testing. Additionally, some of my assigned features require a sequence to be completed before being used such as log in and region/age check. My test plans usually assumed that the sequence is completed. I do not always think about what can go wrong in the sequence before my feature is shown such as negative age, null parameter, invalid file path and among other causes of errors. This was a sign that my test plans were more oriented to functions and meeting requirements rather than use cases. The bias for functional testing makes the test plan ignore configuration, stress and cross functional tests.

Configuration test is for quality check of the software on different settings, environments, hardware, operating system (with different versions), third party software interactions, network infrastructure among other kinds of configurations. While stress tests is for quality assurance under heavy load like checking if a website breaks with 25 concurrent sessions or an analytic application processes heavy datasets slowly. Both kinds of tests are expensive and can overwhelm me as a developer but my test plan should have something like graceful error handling for those for problematic configurations and stressful workloads. I give all the cross functional testing to the testers unless there is something the requirement that compels me to work with another functionality. Given the importance of those tests, part of me believes that programmers do the functional tests while testers do the other kinds of tests. I did believe that since I assumed that the testers are more aware about other functionalities as I am. In effect, my tests are usually isolated with my functionalities like my unit tests.
Unfortunately, my unit tests are also shallow at times. I have the habit of not making a unit test for any null case which results to more puzzling null reference errors appearing later. My unit test just involves checking the right value given the sample parameter I give. I usually put valid parameter values. My seldom test of invalid and null parameters risks the project as I noticed when my functionalities are mixed with the work of others. Yes unit test isolate tests to a unit/component/module. Nevertheless, there must be unit tests for cases where my component interact with other components if the requirements or use case specify what other units interact with my assigned functionalities.

Through my experience as a programmer, debugging became a hassle because of classical novice testing mistakes. Good debugging requires a keen eye on detail and sequence. Other habits needed is being systematic and organized with testing. Testing is needed in debugging. I have improve in debugging and testing for the sake of bug elimination. However, I am a programmer and I am not motivated to test nor do I like it. Nonetheless, I find it as a necessary hassle. This dislike has made my tests plans lack depth or superficial during my novice days. What further discourages me from testing in depth until now is the fact that every application has bugs just as every human commits sin.

Looks like I have some resolutions to make for 2015
End of Confession.