cron expressions

0 15 10 * * ? 2005 Fire at 10:15am every day during the year 2005
Field Name Mandatory Allowed Values Allowed Special Characters
Seconds YES 0-59 , – * /
Minutes YES 0-59 , – * /
Hours YES 0-23 , – * /
Day of month YES 1-31 , – * ? / L W
Month YES 1-12 or JAN-DEC , – * /
Day of week YES 1-7 or SUN-SAT , – * ? / L #
Year NO empty, 1970-2099 , – * /


send emails using linux command

# echo “Sending an attachment.” | mutt -a -s “attachment”

This command will send a mail to with the subject (-s) “attachment”, the body text “Sending an attachment.”, containing the attachment (-a) Like with the mail command you can use the “-c” option to mark a copy to another mail id.


brown bag

fear is a feature, not a bug. ( it is fear which keep us alive for most times, not a problem that stops ppl from doing something.)

  • replace condtions with polymophism: switch operation depends on the type

make subclass, in superclass the method is abstract, and different type subclass overidden it

prefer polyphosim over switch conditions


instead of

class Opnode {double evaluate(){

switch op
case +
case *}}

make evaluate() in Opnode abstractclass

AdditionNode extends Opnode{double evaluate() { return left.evaluate() + right.evaluate()}}

class MultipleNOde extend Opnode{double evaluate() { return left.evaluate() * right.evaluate()}}

  • seperate if conditions to different subclass (piles of objects), one state of if conditions corresponds to one subclass
  • the if logic does not go away, it sits in the factories/builders/provider ( piles of construction)
  • Java, Guice for provider
  • benefit: condition is localized in only one place; no duplication; separate of responsibility and global state

performance levels


Performance consistently far exceeds expectations in the rated competencies and quality
of work performance was superior.

Exceeds Expectations

Performance consistently meet expectations in all essential areas of responsibility, and the quality of work over was excellent. Annual goals were met.

Meets Expectations

Performance consistently met expectations in all essential areas of responsibility,
at times possibly exceeding expectations and the quality of work overall was very good. The most
critical annual goals were met.

Improvement Needed

Performance did not consistently meet expectations。 performance failed to
meet expectations in one or more essential areas of responsibility, and/or one or more of the most
critical goals were not met. A professional development plan to improve performance must be outlined,
including timelines and monitored to measure progress.


Performance was consistently below expectations in most essential areas of
responsibility, and/or reasonable progress toward critical goals was not made. Significant improvement
is needed in one or more areas. A plan to correct performance, including timelines, must be outlined
and monitored to measure progress.

super in ruby

The “super” keyword in ruby behaves a little differently than other languages. Instead of returning an instance of the superclass, it checks all the way up the ancestry tree to find the inherited method.

def foo(a)

Is the same as

void foo(a)

  • supper is a keyword, not a method; Methods can be overridden in subclasses of ruby.

  • ancestor tree: An ancestor of a class is either the class itself, a module included by any of the class’s ancestors or the superclass of any of the class’s ancestors. In short the ancestors of a class are all the classes and modules in which ruby will look for the method definition when you call a method on an object of that class.

module Vehicular
  def move_forward(n)
    @position += n

class Vehicle
  include Vehicular  # Adds Vehicular to the lookup path

class Car < Vehicle
  def move_forward(n)
    puts "Vrooom!"
    super            # Calls Vehicular#move_forward
puts Car.ancestors.inspect

# Output
# [Car, Vehicle, Vehicular, Object, Kernel, BasicObject]

Note the inclusion of the Vehicular Module object!

new for struct

struct ListNode {
ListNode* next;
int data;

The first constructor –new ListNode- without parenthesis – provides what is called default initialization (do not confuse with default constructor). Default initialization leaves the values of fundamental types (int, double, etc) uninitialized, i.e. arbitrary. Therefore, with new ListNode; you get uninitialized chunk of memory with arbitrary values in the fields.

The second constructor –new ListNode() with parenthesis – provides what is called value initialization. Value initialization zeros fundamental types. Therefore, with new ListNode(); you get zero-initialized chunk of memory – all fields in this case will be zeros.