Tag Archive


Aashish Aashish Dutta Koirala Aashish Koirala Add new tag basantapur bhaktapur Buddha children d2 Daman deerwalk Dhulikhel football Godavari Hike Hiking hiking in nepal indra jatra Kathmandu Lamatar Life Life in Nepal Life In Nepal Photograph LIN love nagarkot Nepal Nepali oracle pashupatinath patan Peace People photography Pokhara Ravi Sharma Sankhu Shutterbug Sundarijal Telkot temple Tihar US village Women

First Steps to Digital Detox – Room for Debate Blog – NYTimes.com

Russell A. Poldrack is the director of the Imaging Research Center and professor of psychology and neurobiology at the University of Texas at Austin.

As a busy researcher who owns an iPhone, iPad, and several computers, I often find it very difficult to practice what I preach when it comes to the dangers of multitasking (though I absolutely never talk on the cellphone while driving).

Our research shows that multitasking can have an insidious effect on learning, making it less flexible.

I think that the first key to successfully unplugging is to gain some insight into the effects that multitasking and information overload have on our own minds. As nicely discussed in the book “The Invisible Gorilla” by Chris Chabris and Dan Simons, humans are often very poor at understanding how our own minds work, and multitasking is a perfect example: Everyone thinks that they are one of those 3 percent of “supertaskers,” even as the scientific data shows that multitasking takes a serious toll on our performance as well as on our emotional lives.

Our research has shown that multitasking can have an insidious effect on learning, changing the brain systems that are involved so that even if one can learn while multitasking, the nature of that learning is altered to be less flexible. This effect is of particular concern given the increasing use of devices by children during studying.

via First Steps to Digital Detox – Room for Debate Blog – NYTimes.com.

RYW Read-Your-Writes consistency explained | DBMS2 — DataBase Management System Services

The core ideas of RYW consistency, as implemented in various NoSQL systems, are:

Let N = the number of copies of each record distributed across nodes of a parallel system.

Let W = the number of nodes that must successfully acknowledge a write for it to be successfully committed. By definition, W <= N.

Let R = the number of nodes that must send back the same value of a unit of data for it to be accepted as read by the system. By definition, R <= N.

The greater N-R and N-W are, the more node or network failures you can typically tolerate without blocking work.

As long as R + W > N, you are assured of RYW consistency.

Example: Let N = 3, W = 2, and R = 2. Suppose you write a record successfully to at least two nodes out of three. Further suppose that you then poll all three of the nodes. Then the only way you can get two values that agree with each other is if at least one of them — and hence both — return the value that was correctly and successfully written to at least two nodes in the first place.

In a conventional parallel DBMS, N = R = W, which is to say N-R = N-W = 0. Thus, a single hardware failure causes data operations to fail too. For some applications — e.g., highly parallel OLTP web apps — that kind of fragility is deemed unacceptable.

On the other hand, if W< N, it is possible to construct edge cases in which two or more consecutive failures cause incorrect data values to actually be returned. So you want to clean up any discrepancies quickly and bring the system back to a consistent state. That is where the idea of eventual consistency comes in, although you definitely can — and in some famous NoSQL implementations actually do — have eventual consistency in a system that is not RYW consistent.

Much technology goes into eventual consistency, as well as into the data distribution and polling in the first place. And in tunable systems, the choices of N, R, and W — perhaps on a “table” by “table” basis — can get pretty interesting. I’m ducking all those subjects for now, however, not least because of how much I still have to learn about them.

One point I will note, however, is this — RYW consistency and table joins make for awkward companions. If you want to join two tables, each of them distributed across some kind of parallel cluster, there are only two possibilities:

  • In most cases, the data you need to join is co-located on the same nodes.
  • You’re going to have an awful lot of network traffic.

In an R = W = N scenario, co-location may be realistic. But when R < N and W < N, a join can return incorrect results even when both of the tables being joined would have been read correctly.

In our example above, we had N = 3 and R = W = 2. Single-table RYW consistency was ensured. But suppose you join two records, each of which had been written correctly to 2 out of 3 nodes — but with only 1 node being correct about both records. Then only that 1 node out of 3 will return a correct value for the join, and badness will ensue.

Any architecture I can think of to circumvent that problem results in — you guessed it — an awful lot of network traffic.

via RYW Read-Your-Writes consistency explained | DBMS2 — DataBase Management System Services.

C++ Programming: Static Code Analysis and the New Language Standard C++0x – CodeGuru

This function cannot work on a 64-bit system with large arrays. If the
variable arraySize has a value more than UINT_MAX, the condition
"i < arraySize" will never be fulfilled and an eternal loop will 

occur.bool IsPresent(char *array,
               size_t arraySize,
               char key)
{
  for (unsigned i = 0; i < arraySize; i++)
    if (array[i] == key)
      return true;
  return false;
}

warning C4267: 'initializing' :
conversion from 'size_t' to 'unsigned int', possible loss of data
void f(const vector<int>& a,
       vector<float>& b)
{
  typedef decltype(a[0]*b[0]) Tmp;
  for (int i=0; i<b.size(); ++i)
  {
    Tmp* p = new Tmp(a[i]*b[i]);
    // ...
  }
}

This code has a 64-bit error: the function behaves correctly when compiling the Win32 version and fails when the code is built in the Win64 mode. The error is in using the type unsigned for the variable “n”, although the type string::size_type must be used which is returned by the function find(). In the 32-bit program, the types string::size_type and unsigned coincide and we get correct results. In the 64-bit program, string::size_type and unsigned do not coincide any more. When the substring is not found, the function find() returns the value string::npos that equals 0xFFFFFFFFFFFFFFFFui64. This value is cut to the value 0xFFFFFFFFu and placed into a 32-bit variable. As a result, the condition 0xFFFFFFFFu != 0xFFFFFFFFFFFFFFFFui64 is true and we have the situation when the function Find_Incorrect always returns true.

C++ Programming: Static Code Analysis and the New Language Standard C++0x – CodeGuru.

Portrait of a Multitasking Mind: Scientific American

our old legends showed Multitasking Devis Goddesses, now Mind from SciAm.com

We can do multitasking while driving, working, loving, caring, nurturing, protecting, memorizing, walking, running, concentrating, reading, writing, and practicing.

It seems that chronic media-multitaskers are more susceptible to distractions.

Heavy media multitaskers performed worse on task switching than light media multitaskers.

We all know Hindu Goddesses with 1000 of hands doing multiple things at a time killing all demons, compared to computer parallel thread model when RaktaBIJ , one demon would be alive with every blood drop, like thread killed rising ever again from nowhere.

So, our eastern culture religious model is connected to mind, our heart and spirit and soul.

Media multitasking is increasingly common, to the extent that some have dubbed today’s teens “Generation M.”

A national Kaiser Family Foundation survey found children and teens are spending an increasing amount of time using “new media” like computers, the Internet and video games, without cutting back on the time they spend with “old” media like TV, print and music. Instead, because of the amount of time they spend using more than one medium at a time (for example, going online while watching TV), they’re managing to pack increasing amounts of media content into the same amount of time each day.

Goddess model is now implemented across newer CPUs like NEON XEON processors..whatever from Intel, Dell to name a few.

The internet, with its increasing use of nonlinear nonsequential hypermedia, multimedia, and sophisticated graphic and visual features, has changed our habits of searching, locating, retrieving, accessing, using, and producing information. Users of hypertexts constantly conduct dual tasks or switch tasks by switching screens or web pages. The computer is a highly media-multitasked medium because it offers many opportunities for media multitasking, both within itself and across other platforms (7). The nonlinear and decentralized structure of information on the web, which is potentially contributing to media-multitasking behaviors, may have the potential to promote learning and creativity. Weinberger (8) argues that individuals exposed to a concept in multiple decentralized sources may gain deeper and more complex understandings of this concept.

While the researchers focused on a type of control known as “top-down” attention, meaning that control is initiated by higher-level mental processes such as cognition in service of a specific goal, they suggest that heavy media-multitaskers might be better at “bottom-up” attention.

Those who engage in media-multitasking more frequently are “breadth-biased,” preferring to explore any available information rather than restrict themselves.

Look around yourself – do you see notes and to-do lists? Piles of objects meant to remind you about tasks and goals? These sorts of reminders are a great way to take advantage of bottom-up attentional control, and this type of control might in fact be more influential in our lives than we realize.

Technology has long been identified as the catalyst that allows us to do more with less time or effort. McLuhan (6), whose work is viewed as one of the cornerstones of media theory studies, reminded us that media and technologies are extensions of humankind. According to McLuhan, each medium adds itself on to what we already are, creating both “amputations and extensions” to our senses and bodies, shaping them into a new technical form (6). It is our dependency and linkage to technology that makes it an integral part of our lives.

Portrait of a Multitasking Mind: Scientific American.