Wednesday, September 16, 2020

Dotnet Threading & Threadpool concept

 http://www.learncsharptutorial.com/threadpooling-csharp-example.php

http://www.albahari.com/threading/#_Thread_Pooling

Thread safety

http://www.albahari.com/threading/part2.aspx#_Thread_Safety

Friday, August 7, 2020

Questions to be asked from Interviewer

 

  • What percentage of insurance does your company pay?

  • Does your company provide maternal/parental leave?

  • Will the company pay for training programs / certifications / conferences? What is the approval process like?

  • What are your expectations for how many productive hours a developer will have per day?

  • What do you enjoy the most about working here?

  • Does your codebase require a build process, and is it automated?

  • How well-documented is your codebase?

  • How old is your codebase?

  • Do you host your product yourself (Local, CoLo, VPS) or is it running on a cloud platform such as AWS or Heroku?

  • Do you use open source libraries?

  • Does your company release open source code?

  • How frequently will I be expected to visit the office?

  • How flexible are my hours? Can I take time off during the day if needed and make up for it in the evenings?

  • What timezone/hours does the company work in?

  • Will I be provided with a new laptop?

    • Windows, Mac or Linux? Do I get a choice?
  • What source control do you use? Can you explain why you chose it?
  • Do your developers pair program on a regular basis?
  • What programming languages will I be expected to work in?

Wednesday, August 5, 2020

finally block importance

Try Catch Finally block

Control Flow of the Finally Block is either after the Try or Catch block.
[1. First Code]
[2. Try]
[3. Catch]
[4. Finally]
[5. After Code]

with Exception 1 > 2 > 3 > 4 > 5 if 3 has a Return statement 1 > 2 > 3 > 4

without Exception 1 > 2 > 4 > 5 if 2 has a return statement 1 > 2 > 4

Thursday, July 16, 2020

useful cmd tricks


  • To unhide files 
           attrib -h -r -s /s /d j:\*.*


  • To list all files in folder


              dir * /s /b /A:-D


  • Notepad font i like:

               Lucida Sans unicode

  • Create a .vbs script to read text you want:
             CreateObject("SAPI.SpVoice").Speak"hai how are u surendra"





Monday, May 18, 2020

Sargable-query-in-SQL-server

Indexing of database do magic to improve the performance of the query. But sometime due to bad practice, Index are not used. Sometime we notice that after creating proper index also, SQL server is unable to use Index seek on desired column. Here the Index is ignored.

SARG is an acronym of “Search ARGumentable”. As per wikipedia SARGable is defined as "In relational databases, a condition (or predicate) in a query is said to be sargable if the DBMS engine can take advantage of an index to speed up the execution of the query.


Searches Types: 

Index scan: Scan all Records in a table
Index Seek : use of indexes created by B Tree structure to traverse the tree efficient way to search. To reduce searching . Less than O(n).   log n where base depends upon the branches created in b tree depending upon data.


Non - Sargable Query:  query to not able to harness the benefits  of indexes.


SELECT col FROM table WHERE OrderID *3 = 100

to make it sargeable


SELECT col FROM table WHERE OrderID = 100/3


Non-Sargable:
SELECT ... WHERE SUBSTRING(FullName,4) = 'Sure'

Sargable:

SELECT... WHERE FullName LIKE 'sure%'

Monday, May 13, 2019

TIPS1

To Get Access to Wifi Password:

-> netsh wlan show profile “NETWORK NAME” key=clear

Git Useful commands