Saturday, May 19, 2012
Procrastination: Ten Things To Know
Procrastinators sabotage themselves.
They put obstacles in their own path.
Procrastination is learned in the family milieu, but not directly.
It is one response to an authoritarian parenting style
procrastinators turn more to friends than to parents for support, and their friends may reinforce procrastination because they tend to be tolerant of their excuses
They distract themselves as a way of regulating their emotions such as fear of failure
Procrastination destroys teamwork in the workplace and private relationships.
http://www.psychologytoday.com/articles/200308/procrastination-ten-things-know
Wednesday, May 16, 2012
There's Nothing Wrong With Turning Red: How Embarrassment Helps Us
Part of what makes embarrassment so embarrassing is the fact that it’s a dead giveaway of a private internal state. Feelings we would rather not display for all to see
become readily apparent.
embarrassment reveals that a person cares about others and values relationships. In other words, it's a way of saying, "I feel bad for messing up, and I want to do
better next time because this relationship matters to me.
Importantly, embarrassed targets did not evoke greater compassion, nor did they appear weaker than other targets. Rather, they evoked more trust because they were judged to be more prosocial.
embarrassment when interacting with a romantic interest may also be functional in that it signals fidelity and the potential to be a "high-quality mate."
Consistent with this idea, in one study they found an association between embarrassment expression and support for monogamy.
Perhaps, they suggest, online daters who look embarrassed in their profile pictures are more popular
http://www.psychologytoday.com/blog/in-love-and-war/201205/theres-nothing-wrong-turning-red-how-embarrassment-helps-us
Tuesday, May 15, 2012
The Drowned Men's Inn
The Drowned Men's Inn
Georges Simenon's famous French detective Inspector Jules Maigret investigates a seemingly ordinary car crash
episode1
episode2
http://www.bbc.co.uk/programmes/b00lnmwq
Friday, May 11, 2012
The Shadow Over Innsmouth
The Shadow Over Innsmouth
Young historian Robert Olmstead journeys to the mysterious, shunned town of Innsmouth in New England. Read by Richard Coyle.
http://www.bbc.co.uk/programmes/b015flrz
Tuesday, May 8, 2012
Jagged Prayer
Jagged Prayer
Murder brings Detective Inspector Cromwell and Mother Helen together to try and solve a mystery. Robert Smith's comedy drama
Where's Father Jack?
A murder unites DI Cromwell and convent Mother Helen. Robert Smith's mystery with Cheryl Campbell and Timothy Spall.
Icon, or A Pocketful of Nuns
The theft of a treasure from her convent reunites Mother Helen with DI Cromwell. Stars Cheryl Campbell and Timothy Spall.
Murder brings Detective Inspector Cromwell and Mother Helen together to try and solve a mystery. Robert Smith's comedy drama
Where's Father Jack?
A murder unites DI Cromwell and convent Mother Helen. Robert Smith's mystery with Cheryl Campbell and Timothy Spall.
Icon, or A Pocketful of Nuns
The theft of a treasure from her convent reunites Mother Helen with DI Cromwell. Stars Cheryl Campbell and Timothy Spall.
Monday, May 7, 2012
auto-boxing, boxing, unboxing
- Lesson3 Boxing & Unboxing
http://www.youtube.com/watch?v=ujbeM5MD84M&feature=autoplay&list=ULr_jhKrpDD5c&playnext=1
- java 09 - Wrappers and Boxing
http://www.youtube.com/watch?v=KUdvCjLqP_0
wrapper class wraps primitive type into an object
- Java Tutorial 7.1 Autoboxing Part 1/3
http://www.youtube.com/watch?v=JPIN1vZBM8M&feature=relmfu
- Java Tutorial 7.2 Autoboxing Part 2/3
http://www.youtube.com/watch?v=uGLoHyjURtc&feature=relmfu
- java Tutorial 7.3 Autoboxing Part 3/3
http://www.youtube.com/watch?v=jqKn_dCBU20&list=UU77mSrM47r2NgFoxGSl4DXw&index=154&feature=plpp_vide
- Autoboxing
Autoboxing and unboxing is introduced in Java 1.5 to automatically convert primitive type into boxed primitive( Object or Wrapper class).
before Java 1.5 then you are familiar with the issues like you can not directly put primitives into Collections, instead you first need to convert them into Object only then only you can put them into Collections. Wrapper class like Integer
With the introduction of autoboxing and unboxing in Java this primitive to object conversion happens automatically by Java compiler which makes code more readable
it becomes even more important because they are automatic and can create subtle bugs if you are not sure when autoboxing in Java code occurs and when unboxing happens.
When Java automatically converts a primitive type like int into corresponding wrapper class object e.g. Integer than its called autoboxing because primitive is boxed into wrapper class while in opposite case is called unboxing, where an Integer object is converted into primitive int.
All primitive types e.g. byte, short, char, int, long, float, double and boolean has corresponding wrapper class e.g. Byte, Short, Integer, Character etc and participate in autoboxing and unboxing.
During autoboxing boolean is converted to Boolean, byte to Byte, char converted to Character, float changes to Float, int goes to Integer, long goes to Long and short converts to Short, while in unboxing opposite happens like Float to float.
for example In method invocation where an object argument is expected, if you pass primitive, Java automatically converts primitive into equal value Object.
Autoboxing mainly occur in two places one is during assignment and other is during method invocation
One of the danger of autoboxing is throw away object which gets created if autoboxing occurs in a loop. Here is an example of how unnecessary object can slow down your application
Integer sum = 0;
for(int i=1000; i<5000 i="i" p="p"> sum+=i;
}
In this code sum+=i will expand as sum = sum + i and since + operator is not applicable to Integer object it will trigger unboxing of sum Integer object and then autoboxing of result which will be stored in sum which is Integer as shown below :
sum = sum.intValue() + i;
Integer sum = new Integer(result);
here since sum is Integer, it will create around 4000 unnecessary Intger object which are just throw away and if this happens on large scale has It potential to slow down system with frequent GC for arithmetic calculation always prefer primitive over boxed primitive and look for unintentional autoboxing in Java
autoboxing is error prone e.g. equality operator "==". Since equality operator can be applied on both primitive and Objects it leads to confusion and can cause subtle issues
When you compare two object using "==" operator it compares object's identity and not value and also no auto boxing occur.
its not best practice to use equality operator to compare Objects, use equals method instead
if we compare one primitive with another object than unboxing of object is occur which could throw NullPointerException if object is null e.g.
Since autoboxing creates unnecessary object and if that goes beyond a limit usually outside the range of cached value it can potentially slow your program by frequently causing garbage collection.
http://javarevisited.blogspot.com/2012/07/auto-boxing-and-unboxing-in-java-be.html#ixzz22r1HOohK
5000>
what is transaction?
- Lesson6 Transactions
http://www.youtube.com/watch?v=r_jhKrpDD5c&feature=channel&list=UL
- transaction
In computer programming, a transaction usually means a sequence of information exchange and related work (such as database updating) that is treated as a unit for the purposes of satisfying a request and for ensuring database integrity.
A typical transaction is a catalog merchandise order phoned in by a customer and entered into a computer by a customer representative. The order transaction involves checking an inventory database, confirming that the item is available, placing the order, and confirming that the order has been placed and the expected time of shipment. If we view this as a single transaction, then all of the steps must be completed before the transaction is successful and the database is actually changed to reflect the new order. If something happens before the transaction is successfully completed, any changes to the database must be kept track of so that they can be undone.
http://searchcio.techtarget.com/definition/transaction
- What Is a Transaction Processing System?
Transaction processing system is a program or software that processes all transactions that go in and out of a business or a company.
The system goes over the transactions one by one, like in an automated teller machine (ATM) that permits only one user at a time
The term “transaction,” in this case, does not only refer to financial aspects, but to requests for information as a whole, such as booking a flight or just logging into an online bank account.
In direct contrast to a transaction processing system is a batch processing system.
This system processes multiple transactions—or a “batch” of transactions—simultaneously.
The main disadvantage is that the processed transactions do not return immediate results.
A modern analogy is a torrent file connected to a folder of files.
The user cannot immediately access a file until all the files in the folder are completely downloaded.
http://www.wisegeek.com/what-is-a-transaction-processing-system.htm
Subscribe to:
Posts (Atom)