Save Firefox!

Once upon a time, there were two major browsers that virtually everyone used: Netscape and Internet Explorer, locked in a death-battle for the future of the Web. They went to enormous lengths to tempt Web publishers to optimize their sites to work best inside their windows, and hoped that users would follow.

Then, a game-changer: the open, nonprofit Mozilla browser spun out of Netscape, with the mission of putting users, not publishers, in charge. Mozilla defaulted to blocking pop-up ads, the scourge of the early Web. It was a step none of the major browsers could afford to take, because publishers were convinced they would go broke without them, and any company whose browser blocked pop-ups by default would alienate the publishers, who’d throw their lot in with the competition.
A little over a decade later, and the world of browsers is unrecognizable: Mozilla turned into Firefox; Internet Explorer turned into Edge, Apple launched Safari, and Google launched Chrome. Every one of them blocks pop-ups by default! Literally none of the dominant browsers from a decade ago are in widespread use today.
Which is not to say that there isn’t competition. There is, and its as fierce as ever, and as ever, it’s a strategic fight to please both publishers and users, whose interests are not always the same. Publishers want to gather more information on users; users want to keep their information private. Publishers want to control users’ browsing and viewing experience; users want to sit in the driver’s seat.
We need competition; we also need diversity. We need the possibility that young, game-changing market entrants might come along. We need that idea to be kept alive, to make sure that all the browsers don’t shift from keeping users happy to just keeping a few giant corporations that dominate the Web happy. Because there’s always pressure to do that, and if all the browsers end up playing that same old game, the users will always lose.
We need more Firefoxes.
We need more browsers that treat their users, rather than publishers, as their customers. It’s the natural cycle of concentration-disruption-renewal that has kept the Web vibrant for nearly 20 years (eons, in web-years).
We may never get another one, though.
The World Wide Web Consortium (W3C), once the force for open standards that kept browsers from locking publishers to their proprietary capabilities, has changed its mission. Since 2013, the organization has provided a forum where today’s dominant browser companies and the dominant entertainment companies can collaborate on a system to let our browsers control our behavior, rather than the other way.
This system, “Encrypted Media Extensions” (EME) uses standards-defined code to funnel video into a proprietary container called a “Content Decryption Module.” For a new browser to support this new video streaming standard — which major studios and cable operators are pushing for — it would have to convince those entertainment companies or one of their partners to let them have a CDM, or this part of the “open” Web would not display in their new browser.
This is the opposite of every W3C standard to date: once, all you needed to do to render content sent by a server was follow the standard, not get permission. If browsers had needed permission to render a page at the launch of Mozilla, the publishers would have frozen out this new, pop-up-blocking upstart. Kiss Firefox goodbye, in other words.
The W3C didn’t have to do this. No copyright law says that making a video gives you the right to tell people who legally watch it how they must configure their equipment. But because of the design of EME, copyright holders will be able to use the law to shut down any new browser that tries to render the video without their permission.
That’s because EME is designed to trigger liability under section 1201 of the Digital Millennium Copyright Act (DMCA), which says that removing a digital lock that controls access to a copyrighted work without permission is an offense, even if the person removing the lock has the right to the content it restricts. In other words, once a video is sent with EME, a new company that unlocks it for its users can be sued, even if the users do nothing illegal with that video.
We proposed that the W3C could protect new browsers by making their members promise not to use the DMCA to attack new entrants in the market, an idea supported by a diverse group of W3C members, but the W3C executive overruled us saying the work would go forward with no safeguards for future competition.
It’s even worse than at first glance. The DMCA isn’t limited to the USA: the US Trade Representative has spread DMCA-like rules to virtually every country that does business with America. Worse still: the DMCA is also routinely used by companies to threaten and silence security researchers who reveal embarrassing defects in their products. The W3C also declined to require its members to protect security researchers who discover flaws in EME, leaving every Web user vulnerable to vulnerabilities whose disclosure can only safely take place if the affected company decides to permit it.
The W3C needs credibility with people who care about the open Web and innovation in order to be viable. They are sensitive to this kind of criticism. We empathize. There are lots of good people working there, people who genuinely, passionately want the Web to stay open to everyone, and to be safe for its users. But the organization made a terrible decision when it opted to provide a home for EME, and an even worse one when it overruled its own members and declined protection for security research and new competitors.
It needs to hear from you now. Please share this post, and spread the word. Help the W3C be the organization it is meant to be.

 
Source: Save Firefox!

Time Lapse Film Using Scanner

In this post we will see how to make  a time-lapse animation of something which changes over time, with a scanner. Most probably you have seen some amazing time -lapse photography of different objects. Common examples include the ever changing skyscape, blooming flowers, metamorphosing insects etc. I wanted to do a similar stuff, but due to my lethargy and other reasons I did not. Though the cameras have intervelometer, and I have used it once to take photos of a lunar eclipse, (moon changing position which I was supposed to merge later, but never did), and wanted to do the same with a blooming of a flower. But as Ghalib has said, they were one of those हज़ारों ख्वाहिशें…
The roots of the idea what follows are germinated long back, when I had a scanner. It was a basic HP 3200 scanner. That time I did not have a digital camera, (c. 2002-2003), but then I used the scanner as a camera. I had this project lined up for making collages of different cereals. Though I got a few good images from botanical samples (a dried fern below) as well and also fractals from a sheet of rusting iron. Then, I sort of forget about it.
white-fern-00
Coming to now, I saw some amazing works of art done by scanning flowers. I remembered what had been done a few years back and combined this with the amazing time-lapse sequences that I had seen , the germ began can we combine the two?
http://vimeo.com/22439234
Can we make the scanner, make scans at regular intervals, and make a animation from the resulting images. Scanning images with a scanner would solve problem of uniform lighting, for which you may require an artificial light setup. So began the task to make this possible. One obvious and most easy way to do this is to scan the images manually, lets say every 15 minutes. In this case you setup the scanner, and just press the scan button. Though this is possible, but its not how the computers should be used. In this case we are working for the computer, let us think of making the computer do work for us. In comes shell scripting to our rescue. The support for scanners in GNU/Linux is due to the SANE (Scanner Access Now Easy) Project. the GUI for the SANE is the xsane, which we have talked about in a previous post on scanning books and scanimage is the terminal option for the sane project.
The rough idea for the project is this :
1. Use scanimage to acquire images
2. Use some script to make this done at regular time intervals.
3. Once the images are with use, combine them to make a time-lapse movie
For the script part, crontab is what is mostly used for scheduling tasks, which you want to be repeated at regular intervals. So the project then became of combining crontab and scanimage. Scanimage has a mode called --batch in which you can specify the number of images that you want to scan and also provides you with renaming options. Some people have already made bash scripts for ADF (Automatic Document Feeders), you can see the example here. But there seems to be no option for delay between the scans, which is precisely what we wanted. To approach it in another way is to introduce the the scanimage command in a shell script, which would be in a loop for the required number of images and you use the sleep command for the desired time intervals, this approach does not need the crontab for its operation. But with I decided to proceed with the crontab approach.
The first thing that was needed was to get a hang of the scanimage options. So if your scanner is already supported by SANE, then you are good to go.
$scanimage -L
This will list out the devices available for scanning. In my case the scanner is Canon Lide 110, which took some efforts to get detected. For knowing how to install this scanner, if it is not automatically supported on your GNU/Linux system, please see here.
In my case it lists out something like this:
device `genesys:libusb:002:007' is a Canon LiDE 110 flatbed scanner
If there are more than one devices attached to the system the -L option will show you that. Now coming to the scan, in the scanimage programme, we have many options which control various parameters of the scanned picture. For example we can set the size, dpi, colour mode, output type, contrast etc. For a complete set of options you can go here or just type man scanimage at the terminal. We will be using very limited options for this project, namely the x, y size, mode, format, and the resolution in dpi.
Lets see what the following command does:
$scanimage -d genesys:libusb:002:006 -x 216 -y 300 --resolution 600dpi --mode Color --format=tiff>output.tiff
-d option specifies the device to be used, if there is nothing specified, scanimage takes the first device in the list which you get with -L option.
-x 216 and -y 300 options specify the size of the final image. If for example you give 500 for both x and y, scanimage will tell us that maximum x and y are these and will use those values. Adjusting these two values you will be able to ‘select’ the area to be scanned. In the above example the entire scan area is used.
--resolution option is straight forward , it sets the resolution of the image, here we have set it to 600dpi.
--mode option specifies the colour space of the output, it can be Color, Gray or Lineart
--format option chooses the output of the format, here we have chosen tiff, by default it is .pnm .
The > character tells scanimage that the scan should be output to a file called “output.tiff”, by default this will in the directory from where the command is run. For example if your command is run from the /home/user/ directory, the output.tiff will be placed there.
With these commands we are almost done with the scanimage part of the project. With this much code, we can manually scan the images every 15 minutes. But in this case it will rewrite the existing image. So what we need to do is to make sure that the filename for each scan is different. In the --batch mode scanimage takes care of this by itself, but since we are not using the batch mode we need to do something about it.
What we basically need is a counter, which should be appended to the final line of the above code.
For example let us have a variable n, we start with n=1, and each time a scan happens this variable should increment by 1. And in the output, we use this variable in the file name.
For example, filename = out$n.tiff:
n =1 | filename = out1.tiff
n = n + 1
n = 2 | filename = out2.tiff
n = n + 1
n = 3 and so on…
We can have this variable within the script only, but since we are planning to use crontab, each time the script gets called, the variable will be initialized, and it will not do the function we intend it to do. For this we need to store variable outside the script, from where it will be called and will be written into. Some googling and landed on this site, which was very helpful to attain what I wanted to. Author says that he hasn’t found any use for the script, but I have 🙂 As explained in the site above this script is basically a counter, which creates a file nvalue. starting from n=0, values are written in this file, and each time the script is executed, this file with n=n+1 is updated.
So what I did is appended the above scanimage code to the ncounter script and the result looks something like this:
#!/bin/bash
nfilename="./nvalue"
n=0
touch $nfilename
. $nfilename
n=$(expr $n + 1)
echo "n=$n" > $nfilename
scanimage -x 80 -y 60 --resolution 600dpi --mode Color --format=tiff>out"$n".tiff

What this will attain is that every time this script is run, it will create a separate output file, depending on the value of n. We put these lines of code  in a file and call it time-lapse.sh
Now to run this file we need to make it executable, for this use:
$chmod +x time-lapse.sh
and to run the script:
$./time-lapse.sh
If  everything is right, you will get a file named out1.tiff as output, running the script again you will have out2.tiff as the output. Thus we have attained what we had wanted. Now everytime the script runs we get a new file, which was desired. With this the scanimage part is done, and now we come to the part where we are scheduling the scans. For this we use the crontab, which is a powerful tool for scheduling jobs. Some good and basic tutorials for crontab can be found here and here.
To edit your crontab use:
$crontab -e
If you are using crontab for the first time, it will ask for editor of choice which has nano, vi and emacs. For me emacs is the editor of choice.
So to run scans every 15 minutes my crontab looks like this:
# m h  dom mon dow   command
*/15 * * * * /home/yourusername/time-lapse.sh

And I had tough time when nothing was happenning with crontab. Though the script was running correctly in the terminal. So finally the tip of adding in the cronfile
SHELL=/bin/bash
solved the problem. But it took me some effort to land up on exact cause of the problem and in many places there were sermons on setting PATH and other things in the script but, I did not understand what they meant.
Okay, so far so good. Once you put this script in the crontab and keep the scanner connected, it will produce scans every 15 minutes. If you are scanning in colour at high resolution, make sure you have enough free disk space.
Once the scans have run for the time that you want them , lets say 3 days. You will have a bunch of files which are the time lapse images.  For this we use the ffmpeg and ImageMagick to help us out.

Latex Tufte class in org-mode

Edward Tufte is known for graphical excellence in his famous books. Some enthusiasts combined his design principles into LaTeX and you have the tufte-book and tufte-handout classes for excellence in typesetting. This has support for sidenotes, margin figures, full width figures etc.
Now, since I have shifted to org-mode on Emacs for most of my writing work including that of LaTeX, it was but natural to take this in org-mode output.
For this a small addition to your .emacs file and you are done. Of course after installing the dependencies. I also came to know about another nice package nicefrac for using in the documents.
For Fedora #yum install texlive-tufte-latex should do the job. Also some font problems may arise which can be solved by running updmap and enabling the needed font.

 ;; tufte-book class for writing classy books
(require 'org-latex)
(add-to-list 'org-export-latex-classes
'("tuftebook"
"\\documentclass{tufte-book}\n
\\usepackage{color}
\\usepackage{amssymb}
\\usepackage{gensymb}
\\usepackage{nicefrac}
\\usepackage{units}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
 ;; tufte-handout class for writing classy handouts and papers
(require 'org-latex)
(add-to-list 'org-export-latex-classes
'("tuftehandout"
"\\documentclass{tufte-handout}
\\usepackage{color}
\\usepackage{amssymb}
\\usepackage{amsmath}
\\usepackage{gensymb}
\\usepackage{nicefrac}
\\usepackage{units}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

Once you have added these to .emacs, in the org-mode you have to define #LaTeX_CLASS: tuftehandout or #LaTeX_CLASS: tuftebook to invoke this style in the tex output.
Enjoy the Tuftesque typesetting in your own work! Some snippets from my work in progress, no figures so far.
tufte-latex-book

Title Page

tufte-latex-book-2Table of contents

tufte-latex-book-3Main text

What is in thy name?

They say “What is in the name?”, I ask “What is in thy name?”
I use the alias damitr in many places. It is actually an acronym for my full name. My name among its various meanings also means something which is ‘the immeasurable.’ But recently while solving an anagram problem it had an idea: what all meanings can be derived from this acronym?
So I used a Free Software named an,  apparently one of the original writers of the program is Julian Assange. But the usage is very simple, and it is available on Debian repositories,
So I typed
$an damitr
And I got all the possible combinations of these 6 words. It turned out some of them are quite meaningful and do actually make sense why I am ‘the immeasurable’!
Some of the interesting  anagrams are:
triad m
admit r
dirt am
am  dirt !
dirt ma
ma dirt
dart i’m
i’m dart
dart mi
dram it
Mt. Arid
Mt. Raid
rid mat
rid tam
dim tar
dim art
dim rat
mid art
mad it r
Dr Mita
Dr. Amit!
Dr Tima
Dr. Tami
Dr. Itam !
di mart
i’d mart
id mart
id tram
i’d tram
di tram
ad trim
d tarim
Among others…

Sharing knowledge and learning collaboratively at schools

(This article was written for a college magazine.)

We have a vision for a better society in which the values of sharing and collaborating knowledge and technical know-how form an integral part. There are two aspects to this issue. One is why it should be done, and given the current social structure how it can be done. Though the why question is as important as the how one in this article we will try to focus more on how it can be done with aid of proper technology and what are the possible implications of this intervention to the citizens of the future.

The current education system does little to promote and impart the ideas of sharing knowledge with peers to the students who will be the future citizens. In our educational system it is more like each-one-for-oneself; if you help your peers you will be at a loss in the future. Another aspect is that the educational system by its nature is consumerist. By consumerist we mean that the schools system treat the students more like consumers, who are then passively fed in what has already been produced by others. There is no or little scope left for students to produce or construct anything meaningful. So the platform/technology which will address these issues should have the following qualities:

  • It should be based on principles of Free Software (see http://gnu.org/education).
  • It should allow for collaboration / sharing of knowledge.
  • It should allow for active, meaningful and collaborative production / construction contexts, through which students will learn.
  • It should give immediate feedback to the student, not the delayed one (year end) which the current school system has. This is essential as it makes children reflective about the work that they are doing.

Learning in the context of constructing some tangible thing is a philosophy of education proposed by Seymour Papert, called constructionism. Constructionist learning is inspired by the constructivist theory that individual learners construct mental models to understand the world around them. However, constructionism holds that learning can happen most effectively when people are also active in making tangible objects in the real world. A closely related term that you might have heard is that of constructivism, but there are differences though.

The potential for transforming classrooms in a revolutionary way is present in the constructionist way of learning, which the existing CBTs (computer based tutorials) do not challenge but reinforce. The advances in technology have made it possible now to implement constructionist ways of learning to masses. So where are the examples of this?

The Sugar learning platform  is just one such example which is specifically developed keeping in mind the above considerations. But the idea of constructionist learning is not limited only to using computers. displayed. The very idea of the platform is centered around the idea of constructionism. Though initially developed for OLPC (One Laptop Per Child) Project, now it can run on almost all computers. Learning in an environment where sharing knowledge is an inherent principle rather than an added externality provides the students with a whole new way of learning. Each activity on Sugar is designed keeping in mind the collaborative, construction context and immediate feedback principles.

The Sugar platform provides construction contexts from different areas to learn collaboratively like language, mathematics, science, drawing, music, games, programming, photography, audio and video recording among other things. For each of this activity can be done collaboratively by the students and can be shared with others. This also provides students to make meaningful connections between different concepts. In this context we have seen a strong urge in the children to share the knowledge and activities that they have with others, but in the current school system there is no or little provision for this. Sharing of activities provides context for feedback from peers, which in turn is fruitful in improving learning. Thus we see that the tools and time is ripe for changing our perspective towards education for a more inclusive and better society, whose core values are sharing of knowledge and collaboration.

There are pilot projects of Sugar running at many places across India, one is the Khairat Project which is running successfully for past 4 years at a primary tribal school of first generation learners near Mumbai, another one is at Merces School near Panaji in state of Goa.

Using Inkscape in Batch Mode

Recently I had to make and print a lot of certificates, each with different names and affiliations. There are programs in the Office environment which do this. They are called as Mail Merge, primarily being used for sending mass mails to many individuals.
Basically following happens:
You have a database of Names / Addresses and Affiliations with you. Lets say there are 500 names in this database. If you want to make certificates for everyone of them, it is not very bright to manually add every name to the certificates. What the program does is takes this list of names, and inserts it into a template and generates a file for each entry in the database. Which is to be printed.
I had designed a certificate for one of the programs using a Free Software   SVG Editor Inkscape, initially the number of entries was not large, but then they became too much for me to manage manually.
So then there is small plugin called the Inkscape Generator that came to help  me big time.
This is something that I had been exactly looking for.
As explained on the page for the plugin the database has to be in a csv format, which can be conveniently generated and edited in any of the spreadsheet programs like Calc for Libre Office. With this it becomes super-easy to generate pdf’s for each of the entries in the database.
Once all the pdf’s have been generated using pdftk one can simple join all the files in a single pdf file and print at one go.
To join:

pdftk *.pdf cat output combined.pdf

As simple as this.
 
 
 

RMS on Success

“Success” is not our goal; we’re not here to win a race, we are here to win freedom. I didn’t write GCC with the idea of making a “better” C compiler. I wrote it so there would be a freedom-respecting C compiler, and while I was at it, I did the best job I knew how. We didn’t develop GNU to have a “better” operating system than Unix; we developed it so we could have a freedom-respecting operating system. It’s the same today.

via RMS Answers Your Questions – Slashdot

Explosives or Not

We have earlier seen some quotes from the book The Golem: What You Should Know About Science. There are two companion volumes to this book The Golem Unleashed: What You Should Know about Technology and Dr. Golem: How to think about Medicine. These series of books by Harry Collins and Trevor Pinch provide us with examples from these fields which most of the times are ‘uncontested’. For example in the first volume they discuss about the famous 1920 experimental confirmation of Einstein’s predictions in general relativity by Eddington. This experiment is told as a matter-of-fact anecdote in physics, where petty borders of nationalism could not stop physics and physicists. But in the book, as they show inspite of scanty or almost no positive evidence, Eddington “Concluded” that the predictions were true. This they term “experimenters’ regress”.

The experimenter’s regress occurs when scientists cannot decide what the outcome of an experiment should be and therefore cannot use the outcome as a criterion of whether the experiment worked or not.
The Golem Unleashed pp. 106

In The Golem Unleashed they present us with many examples of this from field of technology. One of the examples is from the Challenger accident which Feynman made famous by courtroom drama. In this case they call the “experimenter’s regress” as “technologist’s regress”.
Recently I read (all further quotes from the same link)an episode in India which would fit in very with these episodes. This is regarding baggage  scanning machines installed at Indian airports. They were brought at 2 crore rupees per unit in 2010. But in August 2011 they failed the tests on tasks they were supposed to do.

The scanners are called in-line baggage inspection systems as they scan bags that go into the cargo hold of the aircraft after passengers check in and hand over their luggage to the airline. They use x-ray imaging and “automatic intelligence” to verify the contents of bags and determine whether they include explosives.

Now one would think that this would be as easy as it gets. Either the scanner detects whether the explosives are present in the baggage or they do not. But it is not as simple as it seems so. Now when the tests were done, the testers found the machines failed.

During the tests, security sources said that a technological specification committee of officials from the IB, RAW, SPG, NSG, BCAS and the civil aviation ministry passed bags containing 500 gm of six kinds of explosives, including PETN and ammonium nitrate, as well as IEDs through these systems. The scanners did not flag any of these bags as suspicious, the sources said.

So after this “failure” the companies which supplied these machines were asked to improve upon the machines or to share the software to recalibrate them. But the companies and interestingly Airport Authortiy of India AAI said that the testing methods were at fault. Now the explosives were passed and the machines did not detect them, then how can companies say that the testing methods were not working?
The machines work on the so called 70:30 principle.

“Though it works on a 70:30 principle, if there is an explosive in the 70 per cent, it will throw up the image of each and every bag that has dangerous substances. We would like to emphasise that the systems supplied and installed by our company at Indian airports are of state-of-the-art technology and are fully compliant with current standards.”
The 70:30 principle refers to the “automatic intelligence” used by Smiths Detection machines to clear 70 per cent of the baggage and reject the rest, according to the Airports Authority of India (AAI). “The machines reject 30 per cent of the baggage, the images of which are then sent to the screener. These systems have automatic intelligence capability and have been tested against a wide range of substances considered dangerous for aircraft. The details and specifications are never disclosed, or else terrorists would understand the software,”

But if anyway machines are doing the job, why not do it 100%? And the funny thing is that they are not sharing the software, which is the main agenda of the proprietary software companies. This is a case where people realize that they are just Users of the software under question. This argument that  “or else terrorists would understand the software” does not hold. They don’t need to if the machine is going to reject a whole lot of bags And in anyway if there are bus/holes in the software, a thousand eyes repair them much faster than a few. And this is The companies further say that

“The technology or physics is that x-ray based system can’t detect explosives, it is only approximate detection of dangerous substances,”

Why is the AAI siding (they are rather defending the companies) with the companies is something worth pondering.

AAI people say “The problem could be due to the sheer ignorance of officers who lacked the skills to test for explosives,”

Still with no unanimity in the testing results, the case truly presents us with a “technologist’s regress.”

Reading in e-book era

Reading without surveillance, publishing without after-the-fact censorship, owning books without having to account for your ongoing use of them: these are rights that are older than copyright. They predate publishing. They are fundamentals that every bookseller, every publisher, every distributor, every reader, should desire. They are foundational to a free press and to a free society. If you sell an ebook reader is designed to allow Kafkaesque repossessions, you are a fool if you expect anything but Kafkaesque repossessions in their future. We’ve been fighting over book-bans since the time of Martin Luther and before. There is no excuse for being surprised when your attractive nuisance attracts nuisances.
via Boing Boing.

I agree completely.Though cases like these are going to become more common, unless we switch to a technology which we can see that is Free as in Freedom. Governments and corporates are going to use this technology against the people who are using it. It will create profiles of “dangerous” people who are reading revolutionary material, for example. It will go unchecked if we just are using the technology without questioning it.
Also see RMS’s view on this topic.

Reason and Faith – Misconceptions in Science Education

Reason does not work in matters of faith. But it may have a chance at clearing misconceptions.
via Tehelka

Truly so. In case of my field of study, namely science education research, it may be the other way round. The classic studies in science education aim at identifying the misconceptions that the learners have regarding a particular subject and then finding a mechanism by which they could be addressed.
This was a very simple but very basic presentation of  what most studies try to achieve, though the methodology may be different. There are some studies which present us with a conceptual framework so that all the responses and the problems with the learners can be seen in light of a theoretical construct. This they say will enable us to make sense of what we see in the classrooms, and what is present as representation in the learners mind. What I think they are trying to say is that we need to get to the conceptual structures that lead to formation of the misconceptions.
Now mind you that many of these misconceptions in science are very stubborn and people are very reluctant to give them up. The reason may be that many of these misconceptions come from direct factual experience in the real world. And from what I know about Philosophy of Science, we might want to make a case that all science is counter-intuitive to our everyday experience. This would explain why misconceptions in science arise. But would this case explain all the known misconceptions?
Let us do some analysis of how a particular misconception might arise.There can be two different reasons for a misconception to arise, if we adhere to deductive logic. That is to say we assume that we have a set of starting statements that are given, whose authenticity is not questioned. And from these set of statements we make certain deductions regarding the world out there. Now there can be two problems with this scenario, one is that the set of statements that we are taking for granted might be wrong, the other is that in the process of deduction that we have followed we made a mistake. The mistake is learnt only when the end result of our analysis is not consistent with the observations in the real world. Or it might be even the case that the so called misconception will lead to a correct answer, at least in some cases.  In these cases we have to resort to more detailed analysis of the thought structure which lead to the answers. Another identifying characteristic of the misconceptions is presence of the inconsistencies across different areas known to the learners. Whereas they might get a particular concept clearly and correctly, in applying same thing for another concept they just might revert to a completely opposite argument and in doing this they do not realise the inconsistency.
We will be clearer on this issue when we talk with a few examples. Suppose that we have a scenario in which we are trying to understand the phenomena of day and night, its causes and consequences. A typical argument in our class goes like this:

How many have seen the Sun set?

Almost all hands would go up, then comes the next question:

How many have seen the Sun rise?

Almost same number of hands go up, excepting a few, who are late risers like me. Some of the more intelligent and the more knowledgeable would say,
“Wait! Sun doesn’t rise and set, it is the Earth that is moving, so it causes the apparent motion of Sun across the sky, the start and end of which we call as day and night. So in conclusion the Sun doesn’t rise and set, it is an illusion created by motion of Earth.”
To this all of the class agrees. This is what they have learned in the text-book, and mind you the text-book represents truth and only truth, nothing else. It is there to dispel your doubts and misconceptions and is made by a committee of experts who are highly knowledgeable about these things. Now let us continue this line of reasoning and ask them the next question in this series.

Does the Moon rise? If so, does it rise everyday?

The responses to this question are mixed. Most of them would say that it does not rise, it is always there, up in the sky. Some would gather courage and say that it does rise.

Does the Moon set?

Again to this the response is mixed, and mostly negative. Most of them are adamant about the ever presence of the moon in the sky. The next question really upsets them

Do the stars rise and set?

Now this question definitely gets a negative response from almost all of them. Even the more knowledgeable ones fall. They have read different parts of the story, but have not connected them. They tell you the following: “No the stars do not move, they are there all the time.” They also tell you that there is something called as the fixed stars and this is in the text-book, which cannot be wrong. And when asked:

Why are we not able to see the stars during the day time?

They tell you “Of course you cannot see the stars during the day time. This is because our Sun, which is also a star, is too bright and the other stars too far away and hence are dim. So our Sun’s brightness, overwhelms the other stars, and hence they are not visible during the day time, but they are there nonetheless. In the night time, since the Sun is no longer visible, the stars become visible. Have you never noticed that during the evening twilight the stars become visible one by one, the brighter ones first. Whereas in the morning the brightest are the last ones to disappear.”
Of course, the things said above and the reasoning given sounds good. So much so that the respondents are convinced that they understand how things work, and have an elaborate reasoning mechanism to explain the observed things, in this case the formation of day and night and appearance / disappearance of stars during night and day respectively.
You ask them:

Don’t you think there is a problem with what you have just said?

“Where is the problem?”, they tell you. “We just explained scientifically how things are in heaven.”
Then you open the Pandora’s box,
“Well you have just said that the Sun doesn’t move really, it is the Earth that moves, and hence we see the apparent Sun rise and Sun set.”
Then they say, “Yes, that is the case. The Sun doesn’t move, but the Earth does.”
You ask, “How do you know this? Do you see that the Earth is moving?”
They say, “The textbook tells us so ” Some of the more knowledgeable ones say that “Galileo proved that the Earth moves and not the Sun. Since we are on Earth, we see only apparent motion of the Sun.”
You say: “But wait, just now you said that the Moon does not move, it is always in the sky. Also you said that the stars do not move, they are there all the time. Now if the Earth moves, then all these bodies should also move, if only, apparently.Then the stars must also move, just like the Sun does, do not forget that Sun is a star too! So other stars should also just set and rise like the Sun, and so should also the Moon!”
Or you can argue just the opposite: “I claim that it is the Sun that moves, Earth does not move. Isn’t it a lot more easier to explain this way, why we do see the Sun moving, because it moves. And we anyway do not see Earth moving! How will disprove me?”
Then the grumbles start. They have never thought about this. They knew the facts, but never connected them. This lead to the misconceptions regarding these things. They were right in parts, but never got a chance to connect the dots, metaphorically speaking.The reason for these misconceptions is the faith in the text-books, but if the text-books fail to perform the job of asking them the right question, where the reasoning alone can get rid of many of the misconceptions.
If we choose the alternative question, of challenging them to disprove that the Earth is stationary, almost most of them are unable to answer the question of disproving that the idea that the Sun moves and not Earth. They would suggest that we can see this from the satellite in the sky (Can we really?).
Most of us take the things for granted and never question many (or as in most cases, any) of them. And many times the facts are something we do not question. We say that “It is a fact.” This statement basically posits that the information which we think is out there can be unquestionable. But there are many flavours of the post-modern philosophy which challenge this position. They think that the facts themselves are relative, that is to say that one culture has different science than another one.  But let us leave this, and come back to our problem of the stars and the Sun and Moon.
Lets put out the postulates for the above arguments and try to deduce deductively the results that were obtained.
Claim 1: Sun doesn’t move.
Claim 2: Earth moves.
Observation 1: We see the Sun moving across the sky daily, it rises and it sets.
Explanation 1:  Since the Earth moves, and the Sun is stationary, we see that Sun moves apparently. This apparent motion of the Sun is seen as the Sunrise and the Sunset by us. This is what causes the day and night.
But we can have Observation 1 explained by another set of claims, which is exactly opposite, namely, that the Earth doesn’t move but the Sun moves.
Claim 3: The Sun moves.
Claim 4: The Earth does not move.
Explanation 2: Since the Earth does not move, and the Sun does, we just see the Sun passing by in the sky, around the Earth. This causes day and night.
We see that Explanations 1 and 2 are both valid for Observation 1, if the claims 1 and 2, 3 and 4 are true then the respective deductions from them, in this case the Explanations 1 and 2 respectively are also true.So in this case the logical deduction is correct, provided that the Claims or assumptions are correct. But this process does not tell you whether the claims themselves are true or not. But both set of assumptions, cannot be true at the same time. Either the Earth moves or it does not, it cannot be in a state of both. If at all we had an explanation which came from these assumptions which did not correspond with the observations, but was logically deducible, then we can question the assumptions or premises as philosophers call them.
Of course, the things said above and the reasoning given sounds good. So much so that the respondents are convinced that they
understand how things work, and have an elaborate reasoning mechanism
We can have one example of this type.
Assumption 5: Stars do not move, there are so called “fixed stars”.
Assumption 5: During the day time the Sun is too bright, as compared to the other stars.
Now in this case combining Assumption 5 (A5) with Observation 1 (Ob1) we would get the following:
Explanation 3: The stars are too dim as compared to Sun, hence we cannot see them during the day time, but they are present. Hence they do not move.
In Explanation 3 (E3) above the deduction has a problem. The deduction does not follow from the assumption. This is the other problem in which we talked about above.
Most of the people who would suggest these responses have mostly no background in astronomy. Even then the basic facts that Earth goes round the Sun and not the other way round are forced upon them, without any critical emphasis on why it is so. Neither are they presented at point with the cognitive struggle of another view point, namely the geo-centric view. So presenting the learners with opportunities that will make them observe things and make sense of the explanations in light of the assumptions that were made, will enhance the reasoning and help them to overcome some of their misconceptions.
But there is another observation which can be made of the skies. And it can be either done in the classroom with the aid of Free Softwares like Stellarium. After the round of above questions, we usually show the class the rising of the stars from the east. In a darkened room with a projector the effect is quite dramatic for those who have not witnessed such a thing before. So you can show the class, just as the Sun rises, all other celestial bodies like the Moon and the stars also must rise and this is an observed fact.
Observation 2: The stars and planets and the Moon also rise and set everyday.
So how do we make sense of this observation, Ob2 in the light of the assumptions that we have.
Assumption 6: Sun is a star.
Explanation 4: We observe that Sun moves during the day, from East to West. Sun is a star, hence all other stars should also move.
Now why this should be the case will be different for the geo-centric and the helio-centric theories. In case of H-C theory the explantion is simple. The Earth moves hence the stars appear to move in the opposite direction. And this applies to all the objects in the sky.
Since the Earth moves all other celestial objects will appear to move. In case of G-C theory we have to make an assumption that the
stars are “fixed” on some imaginary sphere, and the sphere as a whole rotates.
But coming back to the misconceptions, it is just the ad-hoc belief that the stars do not move (“fixed stars”) in conjunctions with another observation that in presence of too bright objects dim objects cannot be seen leads to belief that the stars are immobile and do not rise and set as the Sun does. There is another disconnection from another fact that they know, or are told in the textbooks, that  the apparent movement of the Sun is caused by the actual movement of  the Earth. There is no connection between these two facts which is  made explicit.
We think that providing opportunities for direct observation aided by software, Stellarium in this case, which help in visualizing the movements of celestial bodies will help in developing the skill of reasoning and explaining an observed phenomena.