Tuesday, November 24, 2009

The Brief History of Time

I've read this book 2 times by Professor Stephen W. Hawking. It gave me better understanding of astronomy.

Thursday, October 15, 2009

stride

to walk with long steps, as with vigor, haste, impatience, or arrogance

grain of salt

view a statement with a skeptical attitude

Tuesday, October 13, 2009

feeble

- physically weak, as from age or sickness; frail.
- weak intellectually or morally: a feeble mind.
- lacking in volume, loudness, brightness, distinctness, etc.: a feeble voice; feeble light.
- lacking in force, strength, or effectiveness: feeble resistance; feeble arguments.

The 4-Hour Workweek, Tim Ferriss

I read this book twice. Good and interesting writing

Sunday, October 4, 2009

Apple Picking

I went today apple picking with my friend and nephew to Stony Hill Gardens (http://www.stonyhillgardens.com/gardens/index.php)

Saturday, October 3, 2009

kowtow

1. to act in an obsequious manner; show servile deference.
2. to touch the forehead to the ground while kneeling, as an act of worship, reverence, apology, etc., esp. in former Chinese custom.

Friday, September 18, 2009

Monday, September 14, 2009

Sunday, September 13, 2009

doodle

1. to draw or scribble idly: He doodled during the whole lecture.
2. to waste (time) in aimless or foolish activity.
3. Dialect. to deceive; cheat.

Monday, August 31, 2009

SVN Add Recursively

svn status | grep "^\?" | awk '{print $2}' | xargs svn add

Sunday, August 30, 2009

Wednesday, August 19, 2009

shrug

shrug

–verb (used with object)
1. to raise and contract (the shoulders), expressing indifference, disdain, etc.
–verb (used without object)
2. to raise and contract the shoulders.
–noun
3. the movement of raising and contracting the shoulders.
4. a short sweater or jacket that ends above or at the waistline.
—Verb phrase
5. shrug off,
a. to disregard; minimize: to shrug off an insult.
b. to rid oneself of: to shrug off the effects of a drug.

hush-hush

hush-hush
highly secret or confidential: a hush-hush political investigation.

Tuesday, August 18, 2009

The Creature from Jekyll Island

Finished reading the book The Creature from Jekyll Island
by Edward Griffin. I like some facts about Financial System specially how Federal Reserve works.
Edward Griffin opinions about conspiracy theories are not very convinced. Too much theories and blames in the world.

Tuesday, August 11, 2009

Guns, Germs, and Steel


I just finish reading Guns, Germs and Steel. It's very interesting and knowledge books. I'm not going to summarize the book - just read it :)

Monday, August 10, 2009

Friday, August 7, 2009

Fireworks on Coney Island

After work I decide to ride bicycle to Coney Island. I do this few times a week during summer time.
Every Friday on Coney Island around 9:30pm-10pm are fireworks. Today I witnessed first time! :)

Thursday, August 6, 2009

kleptocracies

a government or state in which those in power exploit national resources and steal; rule by a thief or thieves.

Wednesday, August 5, 2009

sysv-rc-conf

Use for Ubuntu instead of chkconfig
sudo aptitude install sysv-rc-conf

Tuesday, August 4, 2009

VIM (continue)

New Commands
% - match brackets {} [] ()
l - move letter
w - move word
e - end of word
$ - end of line
'. - jump to last modification like (SUPER)
`. - jump to exact spot in last modification line

logograms

Logograms - meaning that one written sign stands for a whole word.

Monday, August 3, 2009

First Sentence of Tolstoy's great novel Anna Karenina

Happy families are all alike; every unhappy family is unhappy in it's own way. "By that sentence, Tolstoy meant that , in order to be happy, a marriage must succeed in many different respects; sexual attraction, agreement about money, child discipline, religion, in-laws, and other vital issues" Jared Diamond

Fertile Crescent

The Fertile Crescent is a region in the Near East, incorporating the Levant and Mesopotamia, and often incorrectly extended to Egypt. Mesopotamia is considered the cradle of civilization and saw the development of the earliest human civilizations and is the birthplace of writing and the wheel.

Thursday, July 30, 2009

etc

et cetera, a Latin expression meaning "and other things" or "and so on"

Tuesday, July 21, 2009

VIM TUTORIAL

$ - end of the file/line
1 - beginning of the file
yy - (yank) copy current line (3yy - copy 3 lines)
dd - (delete) cut current line
p - paste (3p paste 3 times)
/ search
? - reverse order search
n - next occurrences in search
:1,$s/test/test (search and replace in the file from beginning)
u - undo
. - repeat last modification
x - delete backwards
A - insert end the of the line
cw - change word

I Think, Therefore I Laugh



I finished reading I Think, Therefore I laugh by John Allen Paulos. It's good book to read...The book contains a number of anecdotes, stories, parables, puzzles in which one way or another relate to various philosophical problems. As Ludwig Wittgenstein, the Australian philosopher, one remarked that a "serious and good philosophical workd could be written that would consist entirely on jokes".

parable

1. a short allegorical story designed to illustrate or teach some truth, religious principle, or moral lesson.
2. a statement or comment that conveys a meaning indirectly by the use of comparison, analogy, or the like

Monday, July 20, 2009

fiat

1. an authoritative decree, sanction, or order: a royal fiat.
2. a formula containing the word fiat, by which a person in authority gives sanction.
3. an arbitrary decree or pronouncement, esp. by a person or group of persons having absolute authority to enforce it: The king ruled by fiat.

fiat money - paper currency made legal tender by a fiat of the government, but not based on or convertible into coin.

Saturday, July 18, 2009

Smorgasboard

1.a buffet meal of various hot and cold hors d'oeuvres, salads, casserole dishes, meats, cheeses, etc.
2.an extensive array or variety: The company has a smorgasbord of employee benefits.

Source

Selling the Wheel



I just finished reading the book Selling the Wheel by Jeff Cox and Howard Stevens.

It's good and very informative book about sales. The book is written in story style and is about sales and business. I always had negative opinion about sales in general. The opinion basically didn't change but I understand more about the profession and role of in the business.

Sales People Types:

  • Wizard

  • Closer

  • Relationship Builder

  • Captain and Crew



Recommend the book for reading

chariot

CHARIOT - a light, two-wheeled vehicle for one person, usually drawn by two horses and driven from a standing position, used in ancient Egypt, Greece, Rome, etc., in warfare, racing, hunting, etc.

Friday, July 17, 2009

csplit - Split a file into sections

csplit -k -f name file.txt 500000 {1000}
This command basically splits files into chunks of file (500000 lines) and repeats 1000 times.
So it will create files name01, name02...

Thursday, July 16, 2009

Sillygism

A sillygism is a sequence of statements which appear logical but which produce nonsense.
Refer

Sunday, July 12, 2009

Ubuntu into OS X

I'm kind of looking to get Apple laptop. Want to buy laptop for myself and my nephew (as birthday present). On Saturday I found interesting article on Ycombinator and follow the instructions on the blog (Ubuntu into OS X. I like the setup so far.

Tuesday, July 7, 2009

BSD vs. Linux

I found interesting link in hacker news about BSD vs. Linux

Interesting and unbiased article.

Monday, June 29, 2009

PDO (PHP Data Objects) && Prepared Statements


A prepared statement s, essentially, the template of an SQl statement that has been pre-parsed and compiled and is ready to be executed by passing it the appropriate date.
Steps:
1. Create Prepared Statement (replacing your data with a set of markers uch as question marks, or named entities.
2. Load Data in the statement
3. Execute


// Example
$clean = array();

if (ctype_al[ha($_POST['username']))
{
$clean['username'] = $_POST['username'];
}

// Set a named placeholder in the SQL statement for username
$sql = 'SELECT * FROM users WHERE username = :username';

// Assume the database handler exists; prepare the statement
$stmt = $dbh->prepare($sql);

// Bind a value for the parameter
$stmt->bindParam(':username', $clean['username']);

// Execute and fetch results
$stmt->execute;
$results = $stmt->fetchAll();

Saturday, June 20, 2009

The Genetic Code (ISAAC ASIMOV)

Almost finished the book. Don't see point to read about DNA, molecules. Not everything is clear in the book for me..

Brothers Karamazov (Fyodor Dostoevsky)

I've read this book in high school (in Russian Language). I was in Williamsburg a month ago and bought 2 books(used) from street seller for $5. I re-read Brother Karamazovin English and like it.

Saturday, June 13, 2009

Computer Build

I always wanted to assembly computer for myself. So about 3 weeks ago I start researching on computer parts. Newegg is very resourfsul website. After debating I decided to go with DUAL CORE (QUAD CORE for the same price has lower speed, less cache and most of the application don't run on more than one core). So I chosed Inter Core 2 DUO E7200 (Wolfdale) (here is good article that compate Intel Core 2 Duo E7200 (Wolfdale) and Intel Core 2 Quad Q9300 (Yorkfield)

List of Computer Parts:
- Memory CORSAIR 4GB (2 x 2GB) 240-Pin DDR2 SDRAM DDR2 1066 (PC2 8500) Dual Channel Kit Desktop Memory Model TWIN2X4096-8500C5 - Retail
- Harddrive Seagate Barracuda 7200.12 ST31000528AS 1TB 7200 RPM SATA 3.0Gb/s 3.5" Internal Hard Drive - OEM
- Tower Computer Case Rosewill R5601-BK 0.8mm Japanese Cold Rolled Steel Screw-less Dual 120mm Fans ATX Mid Tower Computer Case - Retail
- MotherBoard GIGABYTE GA-EP45-UD3P LGA 775 Intel P45 ATX Intel Motherboard - Retail
- VideoCard Kensington 62630 3 ft. 6 Outlets 70 joules Guardian Basic Strip - Retail
- Processor Intel Core 2 Duo E8500 Wolfdale 3.16GHz LGA 775 65W Dual-Core Processor Model BX80570E8500 - Retail
- PowerSupply Rosewill RP600V2-S-SL 600W ATX12V v2.01 SLI Ready Power Supply - Retail

It took me about about 2 hours to assemble the computer (started from first try). The assembling process was very interested. After that I install Ubuntu 9.04 OS and Sun VirtualBox with Windows XP.

BLITHE SPIRIT

Yesterday (06/12/2009) after work I saw Broadway show Blithe Spirit. Angela Lansbury as Madame Arcati. It was funny show with British accent. I had fun. Comming back on TimeSquare I saw new that Pittsburg Penguins won a Stanley Cup.

Sunday, June 7, 2009

Tour De Brooklyn 2009

I pick my nephew Felix at 7am on Manhattan beach and we pedal to Surf and West 19 (Keyspan building on Coney Island). The weather was great and about 2,500 people participate in the event.

I've register here for the tour and Felix weren't. So Felix got register, we ate some snack and ride 23 miles. Prospect park was the main area rest area. The tour ended by 1pm.

Tuesday, June 2, 2009

X Window Restart

To restart X Window (CTRL + ALT + BACKSPACE) or
/etc/init.d/$GDM restart. Replace $DM with gdm or kdm.

Friday, May 29, 2009

Nuke Everything (Firefox)

Nuke Everything ability to remove text from the page - can be helpful.

Ubuntu - 0.94

I've install Ubuntu yesterday. The installation process was very smooth - even Netgear wireless card was detected :)
I like better than CENTOS. Also, order new computer parts that I will assemble on the weekend. I'm going to use Dual-Core
Wolfdale. Most of the OS don't use more than 1 Core.
So Dual-Core should be enough for now. I will install Ubuntu(maybe with XP).

Thursday, May 28, 2009

PHP Defined vars, functions, contstants

When debugging PHP application - it's convinient to print defined values on the
screen. PHP has build in functions:
- get_defined_vars();
- get_defined_functions();
- get_defined_constants();

Wednesday, May 27, 2009

MySQL command line prompt

export MYSQL_PS1="(\u@\h) [\d]> "
http://dev.mysql.com/doc/refman/5.1/en/mysql-commands.html

CMS

CMS - Content Management System

Saturday, May 23, 2009

Feeling Good (David D. Burns M.D)


I've finished reading "Feeling Good" book by David D. Burns. It's easy to read. To get some results from the book - requires to do homework. I got few interesting points from and recommend for reading.

Friday, May 22, 2009

PHPMailer - PHP email class

I've used PHPMailer class for few years already and recommend it. It works with sendmail, qmail, postfix and others. The class is very flexible and workd with PHP 4 & 5.

Here is link to download from http://www.coderworxtech.com

Click Here to download the package.

Thursday, May 21, 2009

Firefox Extensions


Here is list of Firefox extensions:

- ColorZilla
- Delicios
- DOM Inspector
- Embedded Objects
- Firebug
- Google Bookmarks
- Hide Unvisited
- IE Tab
- Java Quick Starter
- Live HTTP headers
- Firebug
- Transliterator
- Web Developer
- Xmarks

Friday, May 8, 2009

Whole Wheat (Whole Grain)

I'm always trying to buy whole food. Never knew what it is.
Today reading "The ABC DIET" book I found the answer.

Grains like wheat, corn, oats, barley, and rye are seeds that come from grasses, and they're broken into three parts - the germ, the bran , and the endosperm. Bran contains all minerals and fiber and germ where all the protein and vitamins are. When food manufactures process the refine grains bran and germ are removed and nutritional bankrupt endosperm is left.

Therefore, Whole Wheat (Whole Brain) includes germ and bran.

Thursday, May 7, 2009

INNUMERACY by John Allen Pulos


I read by INNUMERACY - Mathematical Illiteracy and its Consequences that was recommended by Shlomi's blog. The book has a lot of examples from real life using mathematics and statistics. If you would like to read the book and understand it - use pen and paper.

Google Analytics

I just install google analytics for the blog. It may take up to 24 hours to see the results.

Wednesday, May 6, 2009

ABC Diet


Recently I started to gain weight. I'm going to try "The ABC Diet" once again.
Bought the book and will try to follow it.

The ABC DIET POWER 12:
Almonds and the other nuts
Beans and legumes
Spinach and other green vegetables

Dairy (fat-free or low-fat milk, yogurt, cheese)
Instant Oatmeal (usweetend, unflavored)
Eggs
Turkey and other lean meats

Peanut butter
Olive Oil
Whole-grain breads and cereals
Extra-protein (whey) powder
Raspberries and other berries

Tuesday, May 5, 2009

Anhedonia

Anhedonia is the technical name for a diminished ability to experience satisfaction and pleasure.

Monday, May 4, 2009

WHENCE

–adverb
1. from what place?: Whence comest thou?
2. from what source, origin, or cause?: Whence has he wisdom?
–conjunction
3. from what place, source, cause, etc.: He told whence he came.

Sunday, May 3, 2009

Symmetric Multiprocessing (SMP)


Symmetric Multiprocessing (SMP)
A multiprocessor computer-architecture where two or more identical
processors can connect to a single shared main memory. Most of the common
multiprocessor systems today use an SMP architecture. In the case
of multi-core processors, the SMP architecture applies to the cores,
treating them as separate processors. SMP systems allow any processor to
work on any task no matter where the data for the task are located in memory;
with proper operating system support, SMP systems can easily move tasks between
processors to balance the workload efficiency.

For more information, please refer to wikipedia

Just for Fun (Linus Torvald)



I just finished the book by Linus Torvalds (Just for fun). The book is basically Linus & Linux story. Linus explains his view of the life. According to him - "There are three things that have meaning for life: survival, social order and entertainment". The book was published in 2002 (ISBN: 0-06-662072).

Friday, May 1, 2009

Genius: The Modern View

Interesting article today in NYT "Genius: The Modern View" by David Brooks.

The article is base on funding by 2 books:
“The Talent Code” by Daniel Coyle;
“Talent Is Overrated” by Geoff Colvin.

Wednesday, April 29, 2009

UHLL (Universal Hospitality Language Layer)

Looking on UHLL specifications. UHLL is a language that was developerd for the hospitality industry. It is expandable message-based language that enables a Property Management System (PMS) to interface with Lodging Link through one simple, well defined interface. For more information

Lock Verizon Cellphone

I locked cellphone accidently. Called Verizon Support - to unlock cellphone (enter 4 last digits of phone number). Also, Verizon will get iphone. I still use my old cellphone for about 2 years

Saturday, April 25, 2009

lard

the rendered fat of hogs, esp. the internal fat of the abdomen.

Wednesday, April 22, 2009

BASH (PATH setup)

PATH=$PATH:/data/myscripts
export PATH

1. One User ($HOME/.bash_profile)
2. All users except root /etc/profile
3. root /root/.bash_profile

FOR JAVA:
$JAVA_HOME=/usr/java/jdk1.6.0_13 (java location)
$PATH=/usr/java/jdk1.6.0_13/bin (for javac and java)

Tuesday, April 21, 2009

adolescence

- the process or state of growing to maturity
- a period or stage of development
- the transitional period between puberty and adulthood in human development

culprit

- a person or other agent of or responsible for an offense or fault
- a person arraigned for an offense

Monday, April 20, 2009

AKA for XML

DTD - Document Type Definition
PCDATA - Parsed Character Data (text)
CDATA - Character Data (unparsed Data)
PI - Processing Instructions (sticky notes)
SAX - Simple API for XML
BNF - Backus-Naur Form (define Grammars)
DOM - Document Object Model

whim

whim (noun)
- An odd or capricious notion or desire
- A sudden or freakish fancy
- A sudden whim to take a midnight walk
- Capricious humor
- To be swayed by whim

Sunday, April 19, 2009

feeble, vigorous, irresolute and scarcity

feeble - physical or intellectual weak
vigorous - strong, active, robust, energetic, powerful in action
scarcity - shortness of supply
irresolute - not resolute, doubtful
vowel - a,e,i,o,u and sometimes w and y
consonant - opposite of vowel

The Psychology Influence of Persuasion



The book was recommended by Joel Spolsky. I like the book. The book is divided into 6 parts (Reciprocation, Commitment and Consistency, Social Proof, Liking, Authority and Scarcity) and it has plenty examples and researches.

Few phrases from the book:

Everything should be made as simple as possible, but not simpler - Albert Einstein

It is easier to resist at the beginning that at the end - Leonardo DA Vinci

Where all thin alike, no one thinks very much - Walter Lippmann

The main work of a trial attorney is to make a jury like his client - Clarence Darrow

The way to love anything is to realize that it might be lost - G.K. Chesterton

Adjust Car Mirrors

Here is good articles how to adjust car mirrors. I would need to make changes on my car to avoid blind spots. We'll make the adjustment tomorrow and see how it works.
In any case here are few materials for the topic:

Set your car sideview mirrors
Adjust SideView Mirror Video - YouTube
Adjust Mirrors - Ehow.com

Isaac Asimov and sport phrase

I'm reading "The Psychology Influence of Persuasion" boom by Robert B. Caildini.
Here is good phrase by Isaac Asimov in the book "All things being equal , you root for you own sex, your own culture, your own locality... and what you want to prove is that you are better the other person. Whomever you root for represents you; and when he wins, you win". I agree with the saying!!

Note: I would get few books of Isaac Asimov to read.

Friday, April 17, 2009

New Words - April 17

Here are few words that I found for last few days:


Here is few new words that I found today:
1. vat - large container
2. drudge - a feeling of ill will or resentment.
To hold a drudge against a former opponent.
3. lowball - to deliberately estimate a low price
4. tardy - late behind time
5. dichotomous - divided or dividing into 2 parts.
6. efficacy - capacity for providing a desired result or effect.
7. placebo - a substance that have no pharmaceutical effect

Binge Eating

I have craving from time to time to clean up refrigerator and eat everything.
The term for such thing is Binge eating
Definition: is a pattern of disordered eating which consists of episodes of uncontrollable overeating. It is sometimes a symptom of binge eating disorder. During such binges, a person rapidly consumes an excessive amount of food.

Main Reasons:
- Cortisol Cravings
- Social Eating
- Nervous Energy
- Childhood Habits
- Stuffing Emotions

Rumination

I just found new word that I would like to add to my dictionary - Rumination.
Definition: This human tendency to obsess, trying to work things out in one's mind, is common.
When these thougns turn more negative and brooding, that's known as rumination.

The word is actual psychological state. Rumination has several negative effects:
- Stress
- Negative Frame of Mind
- Less Proactive Behavior
- Self Sabotage (binge eating, self-sabotaging)
- Hypertension

For more information there is good article

How Can I Clear My Mind?

About two weeks ago I started to make changes to my life Live Stressful Live. I start to see some progress. Also, I realized that my mind is not clear. So searching on Google I found interesting article How Can I clear My Mind?

I see that I have the symptoms therefore I should try to resolve it. Here are the methods how ti clean my mind:
- Try Mediation
- Cultivate Mindfulness
- Try Expressive Writing
- Distract Yourself

I also realize that I have "Type A" personality. Here is explanation and advice for the Type A

Negative Effects of Type A Behavior:
- Hypertension
- Heart Disease
- Job Stress
- Social Isolation

What Can Be Done for Type A's:

- Change Your Work Life
- Change Thought Patterns
a). Fake It Till You Make It
b). Start Journaling
1). Keep a record
2). Write about your feelings
3). Write about solutions
4). Face Your Fears:
- Long Lines in the Grocery Store
- Make It A Game
- Breathing Exercises
- Love Your Pets
- Gardening

Wednesday, April 15, 2009

AKA for mail

MUA - Mail User Agent
MTA - Mail Transport Agent
MDA - Mail Delivery Agent
POP3 - Post Office Protocol
IMAP - Internet Message Access Protocol

Tuesday, April 14, 2009

PHP objects, Patterns, and Practice


The book is about OOP and design patterns specifically for PHP5. It also includes chapters for CVS, PHPUnit, Phing, Pear and phpDocumentor. I pleased with reading and information in the book. The book is a good programmer reference.

Monday, April 13, 2009

The Ten Commandments


1. I'm the Lord your God, you shall have no other gods before me.
2. You shall not take the name of the Lord your God in vain.
3. Keep holy the Sabbath day.
4. Honer your father and your mother.
5. You shall not kill.
6. You shall not commit adultery.
7. You shall not steal.
8. You shall not bear false witness.
9. You shall not covet your neighbor's wife.
10. You shall not covet your neighbor's goods.


Source: Predictable Irrational (Dan Ariely)

Sunday, April 12, 2009

Predictable Irrational (Dan Ariely)


I start reading the book yesterday and I like it so far. It shows how to look on thing rational. Here is good word by Woody Allen : "The most expensive sex is free sex" (laugh)

I finished reading the book. The book was interested and informal for me. I would highly recommend the book.

Friday, April 10, 2009

new AKA - EULA, SaaS, OSS

Few new aka for the week:
EULA - End User License Agreement
SaaS - Software as a Service
OSS - Open Source Software

PS: A promise to update on living less stressful life.
I drink regular water, focus on one thing at a time(NO MULTITASKING), almost didn't check email/phone at work, looking for gym membership and bought furniture for parents.

Thursday, April 9, 2009

Bigtable: A Distributed Storage System for Structured Data

I just found an interesting article that I'll read tomorrow:
Here is a link

RFC - 40 years

on April 6, 2009 the 40th anniversary of what is known as Request for Comments. Here is article in New York Times (How the Internet Got Its Rules

Bash Script to check internet connectivity

Today I decided to search for Linux website/blog LinuxScrew.

Here is example from website of very simple bash script to check internet connection:

#!/bin/bash

WGET="/usr/bin/wget";

$WGET -q --tries=10 --timeout=5 http://www.google.com -O /tmp/index.google &> /dev/null
if [ ! -s /tmp/index.google ];then
echo "no"
else
echo "yes"
fi

Tuesday, April 7, 2009

Singleton Pattern

Singleton Pattern is designed to restrict instantiation of a class to one object. The pattern can be used for global variables or database connection.

class Preferences {
private $props = array();
private static $instance;

// cannot be instantiated
private function __construct();

public static function getInstance() {
if ( empty( self::$instance )) {
self::$instance = new Preferences();
}
return self::$instance;
}

public function setProperty( $key, $val ) {
$this->props[$key] = $val;
}

public function getProperty( $key ) {
return $this->props[$key];
}
}

Monday, April 6, 2009

UML - Unified Modeling Language

UML stands for Unified Modeling Language. Abstract classes are represented either by italicizing the class name or by adding {abstract} to the class name. Interfaces are defined in the same was as classes, except they must include a stereotype (<< interface >>). Visibility Symbols:
+ (Public, Available to all code)
- (Private, Available to the current class only)
# (Protected, Available to the current class and its subclasses only)

The UML describes the inheritance relationship as generalization. This relationship is signified by a line leading from the subclass to its parent. The line is tipped with an empty closed arrow.

The UML describes the relationship between an interface and the classes that implement it as realization(- - - |>)

An association occurs when a class property is declared to hold a reference to an instance (or instances) of another class).

Sequence Diagram is object based rather than class based. It is used to model a process in a system step by step.

Encapsulation

Encapsulation simply means the hiding of data and functionality from a client. On the simplest level, we encapsulate data by declaring properties private or protected. By hiding a property from client ode, we enforce an interface and prevent the accidental corruption of an object's data.

Polymorphism

Polymorphism, or class switching, is a common feature of object-oriented systems. Polymorphism is the maintenance implementations behind a common interface. Polymorphism illustrates another kind of encapsulation. By placing different implementations behind a common interface, we hide these underlying strategies from the client. This means that any changes that are made behind this interface are transparent to the wider system.

Sunday, April 5, 2009

Words Definition: ubiquitos, IRA, transient, piffle, astute, aphorism

1. IRA - Individual Retirement Arrangement
2. ubiquitous - existing, being elsewhere
3. transient:
adjective: not lasting, lasting short time, staying only short time
noun: a function that tends to zero as the independent variable tends to infinity
4. velcro a brand of fastening tape consisting of opposing pieces of fabric, one with a dense arrangement of tiny nylon hooks and the other with a dense nylon pile, that interlock when pressed together, used as a closure on garments, luggage, etc., in place of buttons, zippers, and the like.
5. piffle - nonsense as trivial
6. astute - clever, cunning
7. aphorism - a terse saying embodying a general truth, a brief statement of a principle
8. levy - to impose a tax

Friday, April 3, 2009

Less Stressful Life

Because of recent changes in my personal life I'm experience stress. I'm not feeling
good for some time - today I search for some advices online. So I decided try to make changes to my life and make it less stressful. Here is list of recommended items for the article

1. One thing at a time.
2. Simplify your schedule.
3. Get Moving.
4. Develop one healthy habit this month.
5. Do something calm
6. Simplify your finances.
7. Have a blast!
8. Get creative.
9. Declutter
10. Be early.

For next few weeks I will try to do the following:
1. Check email at night (ONCE a day).
2. Drink Water (no juice or coke)
3. Going to gym (sign for membership in Local gym) and Walking
4. Focus on one thing at once (1)
5. Don't listen to radio (instead listen to music)
6. No Political news online (except www.slashdot.org)
7. Have schedule for a day.
8. Eat healthy.

I'll promise to update the post weekly.

Binary Editor/Viewer

I was trying to view '/bin/ls' binary file on linux using VIM. So searching on the internet I found two good tools to binary view file.

1. Binary Visual Editor. Easy to compile from source.

2. Hexedit

Thursday, April 2, 2009

Dual-Core


Dual-core (DP) refers to a CPU that includes two complete execution cores per physical processor. It has combined two processors(cache and cache controllers) onto single integration circuit (silicon chip). DP processors are well-suited for multitasking environments because there are two complete execution cores instead of one, each with an independent interface to the front side bus. Since each core has its own cache, the operating system has sufficient resources to handle most compute intensive tasks in parallel.

Multi-core is similar to dual-core in that it is an expansion to the dual-core technology which allows for more than two separate processor.

Google Server

Google Data Center - 1AAA shipping containers packaged with 1160 servers each, with many containers in each data center. Each server has its own 12-volt battery to supply power is there''s a problem with the main source of electricity.

For more information Google unlocks once a secret server - CNET

Wednesday, April 1, 2009

vimdiff


A useful command called vimdiff is bundled with the Vim package. Using vimdiff, you can display multiple files next to each other, similar to sdif. See below the screenshot.

Honeypot

Honeypot - is a trap set to detect, deflect, or in some manner contract attempts at unauthorized use of information systems. A honeypot is valuable as a surveillance and early-warning tool.

Tuesday, March 31, 2009

Affluenza

I heard word 'Affluenza' before. Today, I decided to read actual definition.
Affluenza - a painful, contagios, socially transimeeted condition of overload, debt, anxiety... An usustainable addiction to economic growth. Pursuit of the American Dream and etc.
More Information can be found in Wikipedia (http://en.wikipedia.org/wiki/Affluenza)

Monday, March 30, 2009

Paste (Unix command)

I'm using list for some time now. Accidentally found new command that is useful.
paste is a Unix command line utility that join files horizontally (parallel merging).
paste who where when > www

ntbstat

ntbstat - Display protocol statistics and current TCP/IP connections using (NETBIOS over TCP/IP) resolves NetBIOS names to IP addresses. NetBIOS name resolution , including local cache lookup, WINS server query, broadcast, LMHOSTS lookup, Hosts lookup and DNS server query. Nbstat is designed to help troubleshoot NetBIOS name resolution problems.

nbtstat help
nbtstat -A IP_Address (to get MAC from any computer on the subnet). Works only on Windows.

Sunday, March 29, 2009

File System Type (Linux)

To determine File System Type enter the command df -T

Regression Testing

Regression testing is any type of software testing which seeks to uncover software regressions. Such regressions occur whenever software functionality that was previously working correctly, stops working as intended. Typically regressions occur as an unintended consequence of program changes. Common methods of regression testing include re-running previously run tests and checking whether previously fixed faults have re-emerged.

Revision Control (RC)

Revision Control (aka version control , source control or (source) code management (SCM) is the management of changes to documents, programs, and other information stored as computer files.

Linux FileSystem Hierarchy

/bin - binary
/dev - devices (virtual directory, devices add to the directory at boot)
/etc - configuration settings
/home - home directory
/lib - shared library
/mnt - mount directory
/proc - virtual directory (current state of the system)
/root - root home directory (security user)
/sbin - security bin (Require Secure Access)
/tmp - temporary directory
/usr - unix system resources
/var - variable data (logs, crons, spool, db files)

Saturday, March 28, 2009

VI(m) commands

dw - delete word in VI (foreward)
D - Delete remainer of line

Friday, March 27, 2009

Man Pages Navigation

space - page down
b - page up
q - quit/exit
down arrow OR j - quit/exit
up arrow OR k - line up
g - top of the document
G - end of the document
/search_pattern - top of the document
?search_pattern - end of the document
n - repeat search
N - repeat search in opposite direction
h - help

Input and Output Redirection in Linux

Standard Input - 0
Standard Output - 1
Standard Error - 2

> - Output Redirection
< - Input Redirection

# Send an error when file doesn't exist
ls -l myfile.txt 2> test.txt (/bin/ls: adad: No such file or directory)

2>&1 (redirect input and error) into normal file
ls -l xxx.txt 2>&1 another_file

VIM settings (vimrc)

set expandtab
set shiftwidth=4
set softtabstop=4
set tabstop=4
syntax on (enable highlighting)

Putty Settings Summary

Below are settings that I recommend for Putty on Windows.

Putty Settings Summary
Category: Session
Connection type: SSH

Category: Window
Lines of scrollback: 20000

Category: Window > Appearance
Font: Lucida Console, 9-point
Font quality: ClearType
Gap between text and window edge: 3

Category: Window > Translation
Character set: UTF-8
Handling of line drawing characters: Unicode

Category: Window > Selection
Action of mouse buttons: xterm (Right extends, Middle pastes)
Paste to clipboard in RTF as well as plain text: enabled

Category: Window > Colours
Default Foreground: 85 85 85
Default Bold Foreground: 0 0 0
Default Background: 242 242 242
Default Bold Background: 255 255 255
Cursor Text: 85 85 85

Category: Connection
Seconds between keepalives (0 to turn off): 25

Category: Connection > SSH > X11
Enable X11 forwarding: enabled

For More Information, please refer to
Putty Settings on Windows

Thursday, March 26, 2009

bash commands

C-a # Move to the beginning of line
C-e # Move to the end of line
C-l # Clear screen
C-k # Kill the text from the point to the end

Linux distribution information

To get Linux Distribution information use:
cat /etc/issue

To get kernel info:
uname -a

PHP Logic & Bit Operations

Here is good example of bit operations in PHP:
Bit Operations in PHP

Wednesday, March 25, 2009

Pointer, Malloc in C

Pointer
Is a programming language data type whose value refers directly to (or "points to") another value stored elsewhere
in the computer memory using addess. A pointer refereces a value stored elsewhere in memory, and obtaining
or requesting the value to which a pointer refers is called dereferencing. A pointer is a simple implementation of
general reference data type.

Malloc
Is a subrioutine provided in the C and C++ programing languages's standard libraries for performating dynamic memory
allocation. The C programming language manages memory either statically, automatically, or dynamically. Static-
duration variables are allocated in main (fixed) memory and persist for the lifetime of the program;
automatic-duration variables are allocated on the stack and come and go as functions are called and return.

Unix/Linux - find utility

find where-to-look creteria what-to-do

# find files changed in the last 1 day
find . ctime -1 -type f
# find files larger than 1 MB in /tmp
find /tmp -size 1M -type f
# find files newer than main.css in /~src
find ~/src -newer main.css
# files file with permission
find . -name -perm 664 -print

File Types (-type)
b - Block special file
c - Character special file
d - Directory
f - Plain File
p - Named Pipe File
l - Symbolic link
s - Socket

Useful Links:
http://content.hccfl.edu/pollock/Unix/FindCmd.htm

CVS HOW TO

Terminology:
CVS - Concurrent Versions System
RCS - Revision Control System (RCS)
Module - particular set of files kept in CVS
Repository - Location on CVS server where modules are kept
Tag - A certain milestone in a file or module's development
Branch - A fork of the module.

SETUP CVS:
1. export CVSROOT=/cvs (add to the path)
2. cvs init (create depository)
3. cd /home/mike/cvs/project_directory (change directory to projec directory)
4. cvs import -m "Sample Program" project sample start (import project to CVS repository)
5. cvs checkout projectname (get copy of the $projectname. Can be done from Linux(ssh/pserver or Windows(through ssh using WINCVS[http://www.wincvs.org/])

Most Useful Commands:
Add/Update changes to CVS - [cvs commit -m 'Message to the update' $filename]
Add a New File:
1. cvs add $filename (CVS to version control the file)
2. cvs commit $filename (CVS to check in the file to the repository)
3. cvs log $filename
4. cvs diff -r tag1 tag2 $filename

Remove:
1. rm $filename (remove file from the modulo)
2. cvs remove $filename (CVS to delete the file)
3. cvs commit $filename (perform the removal from the repository

SHELL (CVS over SSH) on Linux for bash:
1.export CVS_RSH=SSH
2.cvs -d :ext:USERNAME@host:/cvsroot CVS_COMMAND

Tuesday, March 24, 2009

The Programatic Programmer. Book authors: Andrew Hunt and David Thomas (notes)

Programmer Goals:
1. Learn at least one new language every year.
2. Read a technical book each quarter.
3. Read nontechnical books, too.
4. Take classes.
5. Participate in local user groups.
6. Experiment with different environments.
7. Stay current
8. Get wired.

DRY - Don't Repeat Yourself.

The Law of Demeter for functions attempts to minimize coupling between modules in any given program.

Metadata - is data about data. Put Abstractions in Code, Details in Metadata.

MVC is typically taught in the context of GUI development, it is really general-purpose programming technique.
- Model. The abstract data representing the target object. The model has no direct knowledge of any views or controllers.
- View. A way to interpret the model. It describes to changes in the model and logical events from the controller.
- Controller. A way to control the view and provide the mode with new data. It publishes events to both model and the view.

The O() Notation
Is a mathematical way of dealing with approximation. Some common O() notations

O(1) - Constant
(access element in array, simple statements)
O(log(n)) - Logarithmic (binary search)
O(n) - Linear (sequential search)
O(n lg(n)) - Worse the linear, but not much worse
(average runtime of quicksort, heapsort)
O(n2) - Square law (selection and insertion sorts)
O(n3) - Cubic (multiplication of 2 n x n matrices)
O(Cn) - Exponential (traveling salesman problem, set partitioning)


Common Sense Estimation
Simple Loops:
If a simple loop runs 1 to n, then the algorithm
becomes to be O(n)-time increases linearly with n.
Examples include exhaustive searches, finding the maximum value in an array, and generating checksums.

Nested Loops:
If you nest a loop inside another, then your algorithm becomes
O(m x n), where m and n are two loops' limits. This commonly
occurs in simple sorting algorithms, such as buble sort,
where the outter loop scans each element in the array in turn,
and the inner loop works out where to place that element in the
sorted result. Such sorting algorithms tend to be O(n2)

Binary Chop:
If your algorithm halves the set of thins is considers each time
around the loop, then it is likely to be algorithmic, O(lg(n)).
A binary search of a sorted list, traversing a binary tree, and
finding the first set bit in a machine word can all be O(lg(n)

Divide and Conquer:
Algorithms that partition their input, work on the two halves
independently, and then combine the result can be O(nlg(n)). The
classic example is quicksort, which works by partitioning the
data into two halves and recursively sorting each. Although
technically O(n2), because its behavior degrades when it is fed
sorted input, the average runtime of quicksort is O(nlg(n))

Combinatoric:
Whenever algorithms start looking at the permutations of things, their
running times may get out of hand. This is because permutations involve
factorials (there are 5! = 5 x 4 x 3 x 2 x 1) = 120 permutations of the
digits from 1 to 5). Time a combinatoric algorithm for five elements: it will
take six times longer to run it for six, and 42 longer for seven. Examples
include algorithms for many of the acknowledged hard problems - the traveling salesman problem, optimally packing things into a container, partitioning a set of numbers so that each set has the same total and so on. Often, heuristics are used to reduce the running times of these types of algorithms in particular problem domains.

March 24, 2009 - first post

This is my first post in the blog. I worked today (setup CVS, SUSE 10 and yast2). Walk after work for about 2 hours. I'm planning to use the blog for everything that I found interesting and useful in my life.

Note: yast2 is rpm packaging system for SUSE10.