General
man | Displays extended help | man reboot (the letter q quits help) |
–help | Displays basic help | reboot –help |
clear | Clears console screen | clear |
su | Switches to superuser or between users | su su or su |
pwd | Reveals present working directory | pwd |
Is | Lists files in a directory Lists long listing with hidden files Lists scrollable long listing |
ls / ls –al ls –l | less |
cd | Changes to new directory | cd |
fdisk -l | Lists disk partitions | fdisk –l |
mkdir | Makes a directory | mkdir |
rmdir | Removes an empty directory | rmdir |
rm | Removes a file (or directory) | rm ,rm –r |
cp | Copies a file or directory | cp |
mv | Moves a file or directory | mv |
passwd | Manages passwords | passwd |
find | Locates a file or directory | find / –name |
tar | Creates a compressed file Extracts a compressed file |
tar –czvf tar –xzvf |
mount | Attaches to media, as in CD-ROM mount Mounts CD-ROM Mounts floppy drive |
mount mount /dev/cdrom /mnt/cdrom mount/dev/fd0 /mnt/floppy |
umount | Disconnects from media or partition Unmounts floppy drive Unmounts CD-ROM |
umount umount /mnt/floppy umount /mnt/cdrom |
eject | Ejects CD-ROM | eject |
service | Controls system services and stops Starts system services Restarts system services |
service stop service start service restart |
ps | Lists system processes | ps –efa | less |
free | Displays memory statistics | free –m |
ifconfig | Reveals IP addressing information | ifconfig –more |
uname | Reveals host name | uname –a |
ping | Stands for Packet Internet Groper | ping |
reboot | Restarts the ESX host server | reboot |
Load Runner
- VUGen.
- Controller.
- Analyzer.
It is commonly believed that the earlier a defect is found the cheaper it is to fix it.
Silk Test
- Silk Test is a tool specifically designed for doing regression and functionality testing.
- It is developed by Segue Software Inc.
- Flexible and robust 4Test scripting language.
Notes
- Public – The type or member can be accessed by any other code in the same assembly or another assembly that references it. Private – The type or member can be accessed only by code in the same class or struct. Protected – The type or member can be accessed only by code in the same class or struct, or in a class that is derived from that class. Internal – The type or member can be accessed by any code in the same assembly, but not from another assembly. Protected internal – The type or member can be accessed by any code in the assembly in which it is declared, or from within a derived class in another assembly. Access from another assembly must take place within a class declaration that derives from the class in which the protected internal element is declared, and it must take place through an instance of the derived class type.
- The classes are internal by default whereas its members are private.
- Interfaces can contain methods, properties, events, indexers, or any combination of those four member types. Interface members are automatically public, and they can’t include any access modifiers. Members also can’t be static.
- A sealed class cannot be inherited.
- The constructor is provided by default if no other constructor is created by programmer.
- Any abstract method does not point to any method implementation.
- The variables that have type BaseClass continue to access the members of BaseClass, and the variable that has type DerivedClass continues to access members in DerivedClass first, and then to consider members inherited from BaseClass. The keyword new, you are asserting that you are aware that the member that it modifies hides a member that is inherited from the base class and hence no compiler warning. This is known as shadowing. When a virtual method is invoked, the run-time type of the object is checked for an overriding member. The overriding member in the most derived class is called, which might be the original member, if no derived class has overridden the member. You cannot use the virtual modifier with the static, abstract, private, or override modifiers. Methods override using override keyword.
- The main method is static void Main(string [] args)
- Abstract class and methods can be provided and a class has to be abstract if abstract method is provided
- Extension methods extend the default methods provided to say data type like int where we use static class and methods and provide this in parameters
- There is positional and named arguments wherein named argument is written as below and can be provided only after positional arguments
- Example is
show (name:”vinod”, age:”29”, “chess, cricket”);
- Indexers can be provided for a class as below
-
Class IPAddress { public int ip[]; public int this [int index] { get { return ip[index]; } set { ip[index] = value; } } } IPAddress myip= new IPAddress(); myip[0] = 0;
- Reference variables use ref in calling arguments as well as called parameters.
- It is used in generics and function call is swap(ref a, ref b)
- Narrowing can occur with int as well as float and for integers it is called truncation and for floats it results in PositiveInfinity for overflow and NegativeInfinity for underflow. We can check by IsInfinity.
- If P p1 = new P() and E p2 = new E() where P and E represent person and employee e1 = (E) p1 may result in ClassCastException.
- Arrays can be casted as with its individual types. Otherwise ArrayMismatchException occurs.
- For incompatible conversions we use (1) (int.Parse etc) parsing that can result in FomatException occurs (2) System.Convert (3) Sytem.BitConveter.
- Unmanaged code is that code written outside CLR which is Common Language Runtime. They are ActiveX and Win32 code. They can be utilized using P/Invoke and COM Interop.
- P/Invoke uses DLLImport(“kernel32.dll”, CharacterSet = Character.Auto, SetLastError=true) which are the DllName, Charcter Set and entry point inside DLL which would be method called if not provided. This can be used along with MarshallAs as in following
Static extern uint GetShortPathName ([MarshallAs(UnManagedType.LPSTR)] string Pathname);
- For COM Interop we use Add Reference from Solution Explorer and gets information on members and uses dynamic (Static data type) for variables whose data types need to checked only at runtime. This can be done implicitly as you don’t declare or explicitly.Strings that store same value points to same entry in intern pool and hence have been kept immutable.
- Some of the string constructors take (1) array of characters, (2) array of characters along with start and count and (3) character with repeat count.
- String indexers are read only.
- Compare (a,b) gives 1 if a.
- StringBuilders are mutable with no indexers and are faster for 7 or more concatenations.
- StringWriter used for only concatenations are when a class derived from TypeWriter is required. StringReader when a class derived from TypeReader required.
- Strings can be formatted by ToString and String.Format.
- Standard format strings are C c (currency $), D d (decimal), E e (scientific), F f (fixed-point), G g (general-comma and decimal), N n (numeric), P p (percent), X x (hexadecimal). There are also Custom format strings.
- For dates we have d D, f F (Full) and g G (General) with small letter indicating shorter form.
- Constructors are called as A (int a) : base(a) or : this(a).
- If a class implements Interface explicitly, we need to use interface members through instance of interface. Here the Interface name is used along with relevant method implementation inside class. With explicit interface implementations you can only access them when class object assigned to the interface instance. Class object can’t otherwise access interface methods.
- With implicit interface implementation you access the interface methods and properties as if they were part of the class. With implicit interface implementation you access the interface methods and properties as if they were part of the class.
- If a class inherits from 2 or more interfaces and if the interfaces happen to have the same method names, the class doesn’t know which interface method is being implemented if you use implicit interface implementation? This is one of the scenarios when you would explicitly implement an interface.
- IComparable has int CompareTo(Class ClassObject) and its generic form used in Array.Sort(ClasObject).
- IComparer has int Compare(Class ClassObject) and its generic form used in Array.Sort(ClassObject, SortBy).
- IEquitable has bool Equals(Class ClassObject) used in ClassObject.Contains(ClassObject).
- ICloneable has Object Clone() used in Object.Clone(). It uses shallow cloning if second parameter is false and deep cloning if true.
- IEnumerable has IEnumerator GetEnumerator and its generic form.
- IEnumerator has int Current property and bool MoveNext(), void Reset(), void Dispose().
- You can also use Yield which returns IEnumerable.
- GarbageCollector GC has a non-deterministic finalization where it calls Finalize method.
- Destructors are created with ~and class name and cannot be called directly. They are converted to Finalize method by compiler and we can’t override Finalize method. The unmanaged resources are cleared by Destructors.
- IDisposable has Dispose method that clears managed resources and can also clear unmanaged resources.
- If dispose is called, we won’t call destructors as managed resources may be attempted to free twice. Also, we call GC.Finalization to stop Finalize call being invoked once Dispose is called.
- Using is a keyword we can used to ensure unmanaged code is freed in the end.
- They have following forms.
-
using (DisposableClass object = new DisposableClass) {} DisposableClass object = new DisposableClass; using(object) { } DisposableClass object; using (object = new DisposableClass) {}
- Delgates are function delegates or callbacks which are completed once function completes execution
- public delegate type delegatemethod(parameters);
- public delegatemethod = method;
- Covariance means return type can be a subclass whereas contravariance means parameter can be superclass for the method
- Action delegate returns void whereas function delegate returns a value
-
Public Action< T1> (T1 arg) // Public delegate void delegatename(T1 arg); delegatename = methodname; Public Func(T1, TResult> (T1 arg) // Public delegate TResult delegatename(T1 arg); delegatename = methodname;
- Anonymous methods use delegate([parameters]) {code} which is like () => expression; or even param => expression for one parameter.
- Asynchronous works like await DoSomethingAsync(); and async task DoSomethingAsync();.
- Events have a single publisher and many subscribers.
- public event EventHandler Eventname;.
- Events passes two parameters which are the object which raises the event and the parameters derived from EventArgs class that passes arguments to the events.
- If we subscribe more than once the event handler is called that many times. If we unsubscribe when not subscribed it creates no error.
- In event delegete a delegate is declared with event.
- Try catch is used for exception handling. The base exception is Exception and we can create our exception by inheriting from exception and creating methods with parameters overridden to base constructors.
- If a method gives information on exception through return value throwing of exception can be ignored.
- [Serializable] to ensure exception crosses AppDomain boundary.
- Debug.Asset halts execution if false.
- Thow new Exception (Data, HelpLink,HResult, Message, Source,StackTrace, TargetSite) Here exception stack is reset to current location Simple throw would keep the stack.
- We can make class derive from Exception with each method call to base with information and no code.
Tracking Defects
- New =>Rejected.
- Open.
- Fixed =>Reopened =>Open.
- Closed.
Notes
- Identifiers must start with a letter, a currency character ($), or a connecting character such as the underscore (_).
- Class members are given default values equivalent to binary 0s and objects null.
- An assignment in if is fine if we assign a Boolean.
- Modifiers:
Default: Default has scope only inside the same package.
Public: Public scope is visible everywhere.
Protected: Protected has scope within the package and all sub classes.
Private: Private has scope only within the classes.
Final modifier is used to declare a field as final i.e. it prevents its content from being modified. Final field must be initialized when it is declared.
Static Modifiers are used to create class variable and class methods which can be accessed without instance of a class. Let’s study how it works with variables and member functions. Static block is used to initialize static data member. Static block executes beforemain()
method.
Synchronised is used when a method is synchronized it can be accessed by only one thread at a time. We will discuss it in detail in Thread.
Volatile modifier tells the compiler that the volatile variable can be changed unexpectedly by other parts of your program. Volatile variables are used in case of multithreading program. It keeps the local copy in sync with the main variable copy.
Transient modifier is used for variables which need to be skipped for serialization. - Interfaces can be implemented by a class or extended by another interface whereas classes can only be extended.
- Polymorphism can be done by overloading or overriding.
- An instance method in a subclass with the same signature (name, plus the number and the type of its parameters) and return type as an instance method in the superclass overrides the superclass’s method.
1 We cannot widen and then box (int -> Long).
2 We can box and then widen (int -> Object, via Integer).
3 We can combine var args with either widening (byte -> int) or boxing (int -> Integer).
4 Widening preferred over boxing.
5 Widening preferred over var args.
6 Boxing preferred over var args. - Overriding, the implementation given in base class is replaced with that in sub class.
1 Return types cannot be more general.
2 Access type cannot be more specific. - Constructor should always have a call to super or this. if we give our constructor default constructor not created. So, if we gave a constructor in base, we have to provide super in derived. The compiler generates a super() call in default constructors.
- Static methods called by class name and instance by objects.
- An instance cannot be passed to a function object because the Java passes variables by value that is even in case of objects the stack value referencing copy is passed.
- Nested Classes … It is very important to state that the instance of the Inner class doesn’t exist in isolation, rather it is bounded by and associated with an instance of their enclosing top-level-class, and this impose a slight restriction on the inner nested classes which is that they can’t have any static members that normal top-level and static nested classes can. Anonymous inner classes come in handy when an object instance is required on the fly that extends a certain class or implement a certain interface without the need to write a complete top-level-class for that. Static nested classes exist in isolation from within the top-level-class that they are defined within. On the contrary to the non-static nested classes, static nested classes can’t directly access the members of the class that they are defined in (simply because they are static members, and in static class members can only access other static members directly), but they can do so using an object instance of the enclosing top-level-class.
- Strings use same objects if same value and hence immutable. StringBuffer for thread safety and StringBuilder otherwise are faster for concatenations.
- Serialization the object is stored in serialized fashion. transients are not stored and also static. ReadObject and Write object used.
- Garbage collector finally calls Finalize method if no termination. It removes garbage in non-deterministic fashion.
- In try-catch-finally finally is always executed and we have to catch the most specific exception first or compile time error. The exceptions are cascaded down. We can throw exceptions. If checked needs to be declared by throws keyword.
- Throwable is at the top off all exceptions. Underneath Throwable you have Error and Exception. Underneath Exception you have RuntimeException. Unchecked exceptions represent defects in the program (bugs) – often invalid arguments passed to a non-private method. They are subclasses of RuntimeException, and are usually implemented using IllegalArgumentException, NullPointerException, or IllegalStateException. A method is not obliged to establish a policy for the unchecked exceptions thrown by its implementation (and they almost always do not do so). Unchecked exceptions represent invalid conditions in areas outside the immediate control of the program (invalid user input, database problems, network outages, absent files) are subclasses of Exception a method is obliged to establish a policy for all checked exceptions thrown by its implementation (either pass the checked exception further up the stack, or handle it somehow) Errors are at same level as unchecked exceptions. You should not catch an Error unless you really know what you are doing.
- List, Sets, Maps and Ques.
- Linked is ordered, Tree is sorted.
- Vector is thread safe.
- Equals and Hashcode can be overridden. It is better both uses same variables.
- Comparator in Java is defined in java.util package while Comparable interface in Java is defined in java.lang package, which very much says that.
- Comparator should be used as an utility to sort objects which Comparable should be provided by default. Comparator interface in Java has method public int compare (Object o1, Object o2) which returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. While Comparable interface has method public int compareTo(Object o) which returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. Comparator can be used to produce different sorting.
- Threads can be inherited from Thread class or using an instance of Runnable interface. Wait can wait till Notify occurs on the object or NotifyAll. Notify means inform any object waiting for the lock and NotifyAll means notify all objects. Yield means yielding thread execution and can result in the same thread execution if of highest priority. Sleep sleeps for required period of time and can result in InterruptedExcpetion if awaken before. Start will start thread and Run can be used to execute Run method. Join mean the joined thread is added infront for thread execution. If you call T1.join() from T2 it will wait for T1 to die (finish).IllegalMonitorStateException occurs if object is in illegal state.
- Assertions (by way of the assert keyword) were added in Java 1.4. They are used to verify the correctness of an invariant in the code. Assetion trigger AssetionException if condition false and can be used to print message provided after: (colon).
- The normal import declaration imports classes from packages, so that they can be used without package reference. Similarly, the static import declaration imports static members from classes and allowing them to be used without class reference.
- JARs checked (1) …/jre/lib/ext with JAR files (2) the commandline classpath if overriden (3) Classpath variables if not overridden.
Excel Template to Replicate QC
- Requirements (Name, Priority, Type).
- Test Plan (Attachment, Step Name, Description, Expected Results).
- Test Lab (Attachment, Run Name, Status, Host, Duration, Execution Date, Execution Time, Tester).
- Defects (Summary, Category, Detected By, Project, Severity, Reproducible, Subject, Detected on Date, Detected in Version, Status, Regression, Description).
General
Agile management is an iterative method of determining requirements. The customer could provide further requirements after experiencing previous deliverables.
- Agile comes to prominence whenever requirement gathering will take huge time delay or when requirements constantly alter.
- For large classical project however where requirements are relatively constant traditional Waterfall management is employed.
Lean management believes in continuous production that maximizes customer value by minimizing wastage in minimum time through standardization. It involves the following.
- Eliminate waste – identify and break down the process and refine the process and eliminate wastage between them.
- Empowerment, respect and integrity – empowerment for decisions.
- Decide later and deliver fast – Aggressive targets and continuous spread relay work and protect critical paths.
- Amplify learning – environment of continuous learning.
- See the whole – look and picturize whole process and look for improvement.
People Management should be insistent, persistent and consistent. It should be value and result driven.
- People – Identify and allocate and empower.
- Place – Create a workspace of learning sharing and rewarding and fun.
- Mission – Add sense and meaning to tasks.
- Vision – Leverage actions and plan road ahead.
HP Quality Center
- HP Quality Center (earlier called Mercury Test Director).
- HP Quality Center Starter Edition.
- HP Quality Center Enterprise.
- HP Quality Center Premier Edition.
IT Notes
I am a full stack software engineer who happened to fall in love with computers from my teenage days. I have completed many projects in PHP, JAVA and .NET and Python. I have excellent knowledge of front-end technologies like HTML, CSS, JS and jQuery. I am good at MySQL, MSSQL, DB2 and Oracle. I have worked with photoshop, wire framing, SEO and digital marketing. I handled manual testing, QC and automation using QTP during my initial three years. I keep an active interest in data science and machine learning.
I enjoy API integrations and over the years I have transitioned into Salesforce and WordPress architect helping CRM, CMS and E-Commerce platforms. I have worked in Salesforce performing administration, development including LWC, Einstein Analytics, chatbots, Marketing Cloud and Pardot and help my clients sell their products across Amazon, Ebay using Linnworks and Websites using WordPress-WooCommerce. I perform client and project management in addition to my individual contribution. If you need my services kindly drop in a mail at jobs[at]vinodsebastian.com with your requirements.
I wrote these rough notes as a quick lookup though recently I have started to develop these into useful videos and articles. I made these rough notes while programming. They were rough points to aid my memory and may contain omissions and errors. They were not fully developed texts and may have varied levels of content across a spectrum of categories. They are insufficient to make you a programmer since I firmly believe language is just an aid. Real software engineers are logicians 🙂
Now you may think I am a nerd. I am quite far from it and am currently pondering whether Al Pacino or Robert De Nero is better. It is an overkill for me to believe that pearl is something more important than a decorative ornament for a girl or python has more relevance than being a snake. I would conclude by saying… “I am someone whose tyre got punctured by ‘IT’ and decided to make it my destiny.”
So vinodsebastian.com presents ‘IT Notes’ that make your life easier. The site currently has notes on HTML, CSS, Regex, OOPS, JavaScript, jQuery, PHP, Java, ASP.NET, C#, Database, Linux, URL Rewrite, SEO, Project Management, Hosting and so on. I plan to add and edit existing notes and make into useful videos and articles. I plan to host videos in YouTube channel ‘IT Made Easy’. Please do share and subscribe this site and the channel if you like and please mail me suggestions and errata at admin[at]vinodsebastian.com