lunes, 6 de marzo de 2017

unamatematicaseltigre: 2016 Retrospective

The ancient Greeks thought of the future as something that was behind us and the past as being in front of, or before us1. Today, this conception of time seems very odd and counterintuitive - I mean, everyone knows the future is what lies ahead, not behind us, don't they? However, in the ancient Greek view, we navigate through time as someone who rows a boat. The oarsmen turn their backs towards the course of the ship and ahead of them lie past waters. Indeed, the future is behind us because we cannot see it. The very English words give testimony to this: the future, what comes after, is posterior, and the past lays before us. We literally move forward through time by advancing backwards. With this idea in mind, I open my text editor and begin to write some thoughts on the prospective/retrospective of this site unamatematicaseltigre while attempting to tie it to some speculation on the future of distance education, digital technologies, and heutagogy.

Traffic metrics

At about this time last year I was writing some lines of Javascript code to implement the auto-assessment system for the Mathematics I UNA course. This is still a work in progress, but it was the first tentative in making this blog richer in student interaction and less of a simple repository of course administration materials for my students at the distance education university where I teach. To be sure, I would occasionally write a blog entry covering some mathematical topic related to the courses I teach or to some area of my fancy such as data visualization, statistics, machine learning and of course, the R programming language. However, judging by the traffic analytics, these entries remained for the most part unread and although I enjoy writing and teaching, I do not enjoy preaching in the desert so much.

The results of my blogging activity were disappointing in terms of traffic, but I felt that the common SEO metrics such as number of daily visits, page views, bounce rate, and duration of visits were only part of the picture. What I was aspiring to was student engagement and although this engagement is somehow related to the said traffic metrics, I felt that what most of the content on SEO out there, with its usual marketing and monetization spin, did not pertain to me and my goals as an educator trying to create a genuine learning community within the very specific context of an outdated distance education institution that needs urgent revision of its instructional delivery model.

Digital technologies are subverting all facets of society. We are in the threshold between two epochs or civilizations and no one can predict the social changes that will ensue from an evolutionary perspective2. However, it was clear to me, as I laid it out in this essay written over 5 years ago3 that these changes entail the decentralization of social institutions, a growing preponderance of the individual versus corporate or collective entities and the attention that individuals garner as a form of social and even economic capital in the so-called attention economy. .

So while these SEO metrics do say something about a site's popularity, which in turn relates to attention garnering, they do not in themselves account for the quantity or quality of learning that occurs in an educational blog. What is missing here is a theoretical framework to explain the characteristics a communicational platform must have in order to promote learning in an on-line community as well as fostering the learning community, the sort of education that a highly decentralized and globalized society would need and maybe even how to turn this education into an economically viable human endeavor for individuals in light of dwindling labor markets and an unsustainable predation of our planet's natural resources.

The junction between digital technologies and distance education

Once I resolved to improve my blog as a communicational platform, I set out on two parallel learning paths. One of them was diving into the topic of traffic metrics and search engine optimization (SEO) about which there is a profusion of content on the Internet. Much of this content is centered around the on-line marketing bottom-line: how to increase your site's traffic and make a profit out of it. While this was in line with one of my personal goals (to make educational blogging a viable source of income for me), I felt that this whole "earn tons of money through Internet marketing" thing was just not suited for my other goals because I was not into the business of selling merchandise, but rather, my blog's core function is about transmitting knowledge, attitudes, and my own personal learning and teaching experiences.

I eventually gravitated to the subscription list of two bloggers: Michael Hyatt and Anna Hoffman. Like many bloggers in this niche, they write about traffic generation and SEO, but they do so from a broader perspective. By "broader perspective" I mean that beyond giving tips, tidbits of isolated information here and there, and all the usual marketing hype usually associated with these types of blogs (online courses, ebooks, etc.), to me these bloggers have successfully established good emotional rapports with their audience and their blogs and writing style themselves give testimony to this. In other words, they transmit a certain quality of sincerity, honesty, a willingness to share their knowledge and experience with others and a concern for their audience as individuals and not as some amorphous mass to be strip-mined for revenue.

This is the other learning path I set myself out on: to acquire this certain quality in my teaching practice through digital online media. To be an effective teacher, one must be (not just appear to be) genuine and concerned about your students, because this fosters a trust without which learning can't take place. The problem is, how can one achieve such a learning environment in a digital, distance education medium where there are no non-verbal cues? How can your teaching practice in such online environments be personalized yet serving an audience of hundreds, maybe thousands of students? Or, as they would say in the tech startup context, how can we make this thing scale? This question is paramount in distance education, really.

From my limited experience as a participant student in MOOCs, I remember one particular MOOC I took on machine learning (Learning from Data by Caltech Professor Yaser Abu-Mostafa) in which the professor himself would take the time to individually interact with students in the forums. This MOOC remarkably stood out from the others, where sure enough there were forums too, but only with student-student interaction and occasionally, teacher assistant-student interaction. This seemingly small detail of having the professor himself addressing students individually sets a huge difference in the quality of the MOOC. As they saying goes- the devil is in the details.

So to provisionally answer my question as to how can we make distance education scale, I would say that we stop obsessing with this scalability issue and assume that digital media affords us the possibility of engaging with a much larger audience as we would on a personal, physical level. I don't mean this literally of course, as most non-verbal communication simply cannot take place adequately through the Internet. But taking the time to personally answer comments or emails from your students are the sort of details I'm talking about.

We are bound to review and rethink about the way we use technology in distance education; this in turn induces us to think about the very nature of communication that digital technologies afford us. The Universidad Nacional Abierta (UNA), the distance learning institution where I work, is still grounded on a second-generation distance learning model perhaps "timidly groping towards the third generation"4, according to the technology used in instructional delivery. It would seem that the path in this direction imposes the implementation of on-line courses on a Moodle platform such as the ones currently offered by the different post-graduate programs at the UNA, and the perceived obstacles or bottle necks in this path are the inadequacy of the physical technological infrastructure and the lack of training of course facilitators on the use of digital technologies. It has been noted that while some members of the UNA community have been creating Facebook groups and blogs since 2011 to publish complementary text materials and information pertaining to course administration, these initiatives are personal and do not "stem from the institutional policy of information dissemination through the use of communication"5.

An effective use of such technology for educational purposes requires an inquiry on the nature of digital technologies, the type of bias in communication dynamics they represent and its inter-relation with the distance education tenets. Communication through the Internet is, at least in essence, asynchronous and long distance. These characteristics are by no means a novelty in the evolution of communication media technology, which began with the invention of the alphabet and the written text thousands of years ago as a means to preserve and disseminate cultural traditions. Newer technologies such as television also afforded us the possibility of "seeing at a distance" and transcend the geographical separation between emitter and receiver. However, this is where the similitude between these older communication technologies and digital technologies ends.

The novelty in digital technologies as a means of communication lies in the fact that they are interactive, multidirectional, concurrent, and above all, are able to respond to their environment (the users) according to algorithms and programs written by other users. This is a subtle but important difference frequently overlooked by many who would use digital technologies in educational contexts. As an obvious consequence of this, users become producers of information instead of passive spectators. But the old models of communication technology are so deeply entrenched at the UNA, an institution based on the industrialized production and broadcasting of instructional media that was once avant-garde during the 70's, that its authorities still speak of an "institutional policy of dissemination of information". Even today, with very few exceptions, the small number of UNA facilitators that administer blogs do so simply to publish information on course administration.

Among educators, the web 2.0 is usually referred to as a technologically different thing from the previous web but in reality, the creation of dynamic web pages in which users create content (think forums, social networks and of course, blogs) is simply a new way of using technology that was previously there, and not a radically different technical specification of the web6. Among the education crowd, some might say: "of course, blogs, wikis, forums - we use all this for the construction of knowledge and social collaborative learning". It would be a mistake to persevere in this line of thought and conclude that the "potential uses of digital technologies have been sufficiently explored and verified in different educational scenarios"7. I think the last word on the possibilities of digital technologies in education has not been said and we need to urgently consider, particularly in the UNA, not how we can update our instructional delivery methods to be at par with the most recent technological developments, but rather, how can we, from within this institution, promote those technological changes to contribute to a truly open education and a more democratic, creative, and better educated society.

Program or be programmed?

If we are to seek out ideas on the full potential of digital technology for education, we must look where the fundamental difference between digital technology and older communication technologies lies. We must consider the fact that digital technology can be programmed to change the way these devices interact with users, because it is thanks to this that we can design the sort of interaction we want to produce between the user/student and our application- a design that is hopefully conductive to learning. I am not advocating that educators learn about every aspect of low-level electronic architecture up to computer science and high-level software engineering. I am simply referring to the idea of really embracing the possibility that we can build, almost from scratch, our own applications and user interfaces better suited to our own educational purposes.

Permíteme ilustrar esto tomando como ejemplo este mismo blog. Este blog fue creado en Blogger, un servicio gratuito subsidiario de Google. Si has creado tu propio blog de esta manera sabes que en muy poco tiempo y con mucha facilidad puedes agregar tus propias entradas mediante un editor muy parecido a un procesador de palabras y jugar con ciertas plantillas para modificar colores por aquí y gráficos de fondo por allá, además de agregar algunos gadgets o mini-aplicaciones ya prefabricadas. Todo esto sin pagar hospedaje o comprar un dominio. Seguramente algunos me preguntarán: y porqué no creaste el blog en Wordpress, ya que es una plataforma más "profesional" para la cual hay una mayor cantidad de plantillas y gadgets disponibles? La razón es porque Wordpress, en su versión gratuita por lo menos, no permite que el administrador del blog acceda al código HTML o agregue su propio código Javascript.

Let me illustrate this with an example, taken from this very blog you are reading. This blog was created using Blogger, and while some might argue that Wordpress has a wider range of tools and plugins available to craft a more professional-looking blog, Blogger provides blog administrators with something Wordpress doesn't (at least in the free version of these services): the possibility of modifying and adding our own HTML and Javascript code.

I'll explain this in more detail. A web page is really a text file containing HTML8 code, that's fetched from a remote server to the client browser. The browser, regardless of the operating system used or whether one navigates from a mobile device or from the desktop pc, then interprets the HTML code in this file to display the web page. Through the HTML code, web developers indicate how each element of the page is to be visualized, the type of fonts used, colors, image sizes or positions, which parts of the content are hyperlinks, etc. However, besides interpreting HTML code, which only includes page layout and design directives, browsers can also interpret Javascript code, which is a full-fledged programming language specifically designed for the web. This is where the magic begins.

Thanks to the fact that Blogger permits me to modify the HTML code and include Javascript snippets in my blog's pages or entries, I was able to create the self-assessment feature for the Mathematics I course I mentioned at the beginning9. I will briefly explain what this feature does in order to illustrate the enhanced possibilities that arise when one is able to create or modify the HTML/Javascript code in a blog.

When a student navigates to the Mathematics I course page, a Javascript code snippet executes, ordering the browser to fetch a csv file containing data of all the students enrolled in that course nationwide for the current semester. When the student writes his Id number in the "Cédula" field, the other respective data fields, such as his/her full name and the UNA campus where the student is enrolled are shown. In case the Id number does not correspond to an enrolled student, an error pop-up message appears. When a valid student chooses a learning outcome and clicks on the "Ir al quiz" (Go to quiz) button, another Javascript code snippet loads yet another Javascript file that creates the data structures defining the question items and the general and specific learning outcome statements. The application then selects 5 of those questions at random for the chosen learning outcome, shuffles the answer choices for each question and generates the HTML code to display them. Once the students selects his answers and proceeds to check them, the application then loads another page and generates the HTML code to display the feedback. In the interim, the data about the student, the time/date, the learning outcome chosen, the questions that appeared and even the time in seconds taken to answer the quiz is recorded in a spreadsheet file hosted on Google Drive (via Google Forms).

The previous example is a very concrete and modest illustration of the educational potential of digital technologies. It is a pertinent example because it illustrates how applying those digital technologies in the distance education context supposes something more than just using apps and services created by others. After all, whoever created Blogger simply could not foresee that someday someone would be using their blogspot blog as a self-assessment tools for students of a distance education institution. In the same vein, the creators of Facebook, who by the way are mostly programmers and not educators, did not create their app to further on-line education across the globe, but rather, the goal of this startup is ultimately to keep their shareholders happy. Keeping these facts in mind and seeing them from ``a programming point of view'' helps us to evaluate these digital technologies more critically to appraise their proper use in distance education and the type of teacher-student interactions they help foster.


Anatoli Fomenko
The information feed that comes up in our Facebook wall and the search results on Google, to mention two examples, is the result of extraordinarily complex algorithms that are the best kept secret of the Silicon Valley giants. No one knows exactly how these algorithms will shape the social, political and economical facets of our civilization. The network effect that emerges as a consequence of interconnecting the entire planet creates a complexity too big to permit us to even hazard a guess. At this point, we can only say that to contemplate this process more clearly and to avoid being programmed by these algorithms, we ourselves must learn how to program. To know how to program is to acquire access to our civilization's control panel10 and this, of course, is what we educators are supposed to do.

Big-Data and Artificial Intelligence

If you ask a teenager what Facebook is for, he or she will probably answer that it is to make more friends. If you ask a Facebook executive the same question, he or she will tell you it is for gathering strategic data about people's preferences and tastes as consumers. The substrate upon which this social networks phenomenon is built, its raison d'être even, is something called Big Data. The interaction of millions of users on the web leaves a gigantic trail of data that when mined by statistical learning algorithms, allow computers to predict events and perform tasks that could heretofore only be performed by humans, but now at a truly super-human scale. The majority of these tasks are geared towards the production of income through advertising and marketing. In exchange for allowing us to create free email accounts, profiles, and blogs, these companies mine our data and we end up practically working for them for free.


Anatoli Fomenko
As a mathematician interested in computational statistics and machine learning topics, this Big Data issue has captured my attention since I first learned about it. Big Data is data with a magnitude in the order of terabytes or petabytes, collected in real-time, with a very high level of detail and resolution. The evolution of computing hardware and machine learning algorithms has made the handling of such large data-sets possible and the creation of predictive mathematical models such as the ones that provide the news-feed in your Facebook wall, the recommendation systems in Netflix or Amazon and even the Hummingbird version of the Google search engine being able to understand natural language queries to predict what the user's intent really is.

Artificial Intelligence is now a reality and not a realm of science-fiction. No one could have foreseen the enormous progress in this field during the last decade. We now have self-driving drones and cars, just to cite one example. Another example: it is now possible to determine with a certain degree of uncertainty when a person has caught or is at risk of catching the flu11 from the data generated by the smartphone and other wearable electronic devices the person is carrying. Nowadays it would be too risky to state that there is any activity or profession that can only be performed by humans and is not susceptible of being automatized in the future. We are in the presence of machines that gather all our data in real-time and maybe know more about us and our activities than we ourselves. All these advances in AI have been made possible through Big Data and its associated machine learning techniques and this will have profound consequences on our society, our economy, and in all certainty, on our educational system.

In a more philosophical context, Big Data entails an epistemological revision of the philosophy of science and will perhaps become a new scientific paradigm of its own, although this is debatable because machine learning is more oriented towards making predictions than towards explaining cause and effect of phenomena. Nevertheless, there are areas of intersection between science and machine learning because the latter is also concerned with the validation of hypotheses and models through empirical evidence (data) and generating hypotheses from data12 (model building). In fact, machine learning makes possible the mechanization of model building tasks without human intervention. I would have to delve deeper into this in future posts.

Be it as it may, the examples I just mentioned illustrate how these data learning methods are being used to solve practical problems. Knowing if a student is at risk of dropping out, or if he or she has difficulties with a certain content that could be remedied by reviewing another piece of content are two examples of how these techniques could be useful in education.

Apparently, all of this is completely outside the radar of the community of academics and researchers at the UNA, for the majority of whom, it would seem, the "emergent"13 paradigms of research in education are more along the lines of hermeneutics, ethnographic studies and similar qualitative, Frankfurt School currents of thought. To me, this is unthinkable because, being the Universidad Nacional Abierta an institution of higher education founded upon the principles of distance learning, one would think that due to the pervasive technological mediation that distance learning involves, this institution would make use of the stream of data generated by this mediation to learn more about and to constantly improve the teaching/learning process of its students and its instructional delivery methods.

We are back to what was commented earlier, when we mentioned the need to create virtual, made-to-measure learning environments through programming. One of the goals I set for myself from the beginning of 2016 was not only to create my own instructional tools for this blog in order to make it more interactive, but also to gather as much data as possible on every interaction between my students and this site. So, for example, I mentioned that every time a student takes an on-line quiz, the relevant data of this event is registered.

I began to conceive each interaction between the student and the blog as a micro event, a moment in the learning process of the student that leaves a trail of data. The interface for consulting grades, which previously consisted of publishing a listing with the entire student enrollment, was modified so that each student must enter his/her Id number to view his grades. This made for a more personalized and individualized experience where I could post feedback comments for just that student only. And it also made possible recording this event (grades lookup). Whenever I eventually publish video tutorials in this blog, I will also implement a similar feature to record which student sees a certain video class and when.

This data, along with the data I already gathered by hand during live tutoring sessions and workshops14, is still not on an order of magnitude that could be considered Big Data, but it does provide interesting possibilities for my educational research and the construction of mathematical models to predict and diagnose student learning and prosecution. So far, it is only a modest personal initiative, an experiment as it were. However, it paves the path towards future research using Big Data methods.

The Network Effect


Luzes. 2010. Marcel Caram
It would seem that I'm advocating for the complete mechanization of instructional processes at the UNA- nothing could be further from the truth. Education has always been and will be a social phenomenon. Genuine social contact between people is one of the few things that cannot be purveyed by machines. If we have to face a future where paid work as we know it today - an exchange of someone's time for some form of salary or payment - is being eclipsed by robot labor of some form or another, this can only mean that there will be a greater demand for painters and sculptors to delight us with their plastic art, actors, comedians and musicians to entertain us with their spectacles, and of course thinkers, scientists and above all, educators to give sense and meaning to our culture.

In face of the inexorable wave of labor mechanization created by AI, I prefer to err on the optimistic side: human creativity will be better appraised in the future. Should this also be supplanted by AI, then we'd be irremediably screwed. On the other hand, mechanization of labor is a good thing when it liberates us from the burden of performing tedious tasks in favor of more transcendent and enjoyable activities. I confess that for me at least, administrative tasks inherent to the job of an educator are among that tedium. In contrast, I have fond memories of the social contact with student that occurred in more conventional classroom settings when I worked in non-distance education institutions.

UNA academics such as Dr. Leal Ortiz have written profusely about the loneliness of the UNA student. In view of this, digital technologies open up interesting possibilities for creating social interaction in distance higher-education institutions such as ours. Despite the existence of these technologies, many of our students still complain about the lack of assistance they receive from us facilitators and also attest to the feeling of orphanage that they experience as students in a distance education system. For this reason, it is imperative that we facilitators take up the use of blogs and social network media to assuage the student's isolation, which moreover is an inherent characteristic of any distance learning situation.

AFor my part, I had never been to keen on social networks such as Facebook, Twitter or Google+, considering it a waste of time to indulge in such banalities. Notwithstanding, since I wanted to increase my blog's traffic and have an impact on my student audience, it became inevitable for me to come to terms with social network media. I found that, for some reason which would be worthwhile to analyze at a later opportunity, the greater part of the UNA student population uses Facebook as their social network of choice. While (in my opinion) the Facebook interface may not be the most adequate to produce meaningful and useful dialogue conductive to fostering a robust online learning community, becoming an active Facebook user myself was necessary in order to reach out to UNA students.

Soon I discovered that even a little promotion of my blog posts in these social network communities went a log way towards driving traffic to my site, which was one of my core objectives. On the other hand, it is worth noting that since my blog is bilingual, the entries in Spanish and English are directed to different online audiences. The Spanish language posts are directed primarily towards the UNA student public, whereas the English language posts are aimed at an audience more interested in statistics, data learning, R programming and their application in educational contexts. Moreover, I found that Facebook was the primary referral source for the Spanish language posts while Google+ referrals were the primary source of visits to the English language posts. The takeaway message here is that bloggers should reach out to their audiences in their "natural" spaces and, in the case of UNA students, this natural space seems to be Facebook.

The explanation for this is something called the network effect. In economics, the network effect is defined as the effect generated by additional users of a good or service upon the value of that good or service to other users. When the effect of additional users on the price of the good is positive, there are positive externalities. The telephone is a classic example of this principle: the more users of a telephone service there are, the greater the utility of this service to other users. The same phenomenon occurs with social networks like Facebook, where the great number of users of this app makes it more and more attractive for other people to join in. In system dynamics terms, we would say that positive externalities amount to positive feedback loops that cause the user network to grow exponentially. Surely this is the effect sought after by the creators of Facebook.

The network effect begins to kick in when a critical mass of users is reached and this usually takes a long time, depending on the intrinsic value of the good or service provided. In the case of a blog, its intrinsic value depends on the quantity, and above all, on the quality of its written content. Another factor is the novelty of this content, which translates to the frequency and regularity with which a blogger updates his blog: blog readers prefer content that is up-to-date. In the case of a blog, it is not so clear how the network effect kicks in. I suspect it has to do with organic search in search engines like Google. The more hits in searches to a blog increases the blog's ranking in search engines, which in turn leads to a greater number of hits and so on.

In the case of online forums, there seems to be a time of latency at the beginning, while a few daring forum members gather enough courage to participate. After seeing some participation and seeing what others have written, the more shy forum members venture to participate. In this regard, I have been playing with some system dynamics simulation models of online forum participation in the UNA's Distance Education Master program which I'll eventually write about in a future post. In this particular context, the online fora to these courses is based on Moodle, and since there are about 20-40 participants in each of these courses, the network effect is virtually nonexistent. It would be desirable, in the measure of possibilities, to group as many participants as possible in a single course as it were, since the network effect would kick in sooner.

We UNA facilitators have an advantage over other people who would begin to create a blog- we have a captive audience of students. This could provide a good kernel from which to begin to grow an online community to exert influence, as long as we regularly provide original content, which the Google search engine is good at discerning. Another tool to propel faster growth of our online learning communities is by making strategic use of social networks. This consist in maximizing the dynamic participation patterns inherent in social networks with already consolidated positive externalities. In this sense, to channel student interaction through closed or walled independent platforms such as Moodle in the UNA courses mentioned above would amount to depriving the online community of positive externalities that already exist in the more widely used social networks.

Heutagogy and the preponderance of the individual

Digital technologies have mutually complementary effects. On the one hand, it is creating an ever widening gap in the inequality of productivity in societies. In primitive, hunter/gatherer type societies for example, there was almost no variation in the productivity of its individuals. In such societies, by what order of magnitude or factor can the productivity of the best hunter differ from the worst hunter? Maybe by a factor of 2? However, when you give each individual in a group a tool like a computer, the differences in productivity can be dramatic15.

The difference lies not in being able to solve specific programming problems or the performance of certain tasks in a fraction of the time it takes other individuals, but in being able to decide which tasks to perform and seeing the problems (and their solutions) before others become aware that such problems existed. In all this, imagination and creativity play an important role.

Industrial society was organized around corporations where each individual was just an expendable cog, easily replaceable by another individual with similar qualifications to perform the same specific job within the organization. Today, big corporations and individuals are all nodes in a network, at the same level of hierarchy and competing under equal conditions. Sometimes even, single individuals can surpass entire corporations in terms of online influence as measured in terms of number of followers and so on. It all depends on originality and being flexible enough to adapt to ever-changing circumstances, which is something that individuals are more competitive at than corporations with a larger amount or operational inertia.

On the other hand, the tendency towards automatization is drastically reconfiguring the employment landscape. Some economists such as Jeremy Rifkin have been talking about a future with less jobs and weekly working hours for some time now. As financial capital (technology) becomes the new workforce and humans are left out of the production process, our society will have to devise ways to distribute income, which according to Rifkin will be possible thanks to the growth of a third sector - community groups and volunteer organizations - as opposed to the traditional public and private sectors16.

Douglas Rushkoff, media expert and author of Throwing Rocks at the Google Bus, proposes in that book the idea that what we have today is the result of a value extraction economic model geared towards maintaining already unsustainable levels of growth of corporate capital. The blame, he argues, is not to be placed on the digital technology we use, but rather on the fact that we're using this technology to operate an old economic model based on centralized currency, corporatism and monopolies that is essentially unchanged since it first appeared in Europe at the end of the XIII century. The result of running this old capitalist model on new digital technology, he says, is "capitalism on steroids". Facebook, by the way, is an extreme example of this idea: the use of data generated by millions of users for its corporate purposes without paying them any money in return. He proposes using digital networks to subvert the centralized economic system and promote direct economic interchange between producers and consumers.

Through a complete restructuring of the labor markets and the sheer magnitude of the changes in productivity of each individual, digital technologies create extremely complex and unpredictable societies that force us to revise the fundamental premises of our educational system. We college teachers are supposed to prepare our students for the future job market, but the said market could probably no longer exist by the time they graduate. Or in a more benign scenario, the knowledge and competencies acquired during college could be obsolete. Educators are supposed to prepare their students for the future but the fact is that no one can predict with any degree of reasonable certainty what the future will bring in 10, 5 or even 2 years.

Our current formal educational system is built upon the fundamental notion of curriculum and this word is etymologically related to the idea of a circular racetrack with horses racing from a starting line and eventually reaching a finish line. Analogously, the curriculum stipulates a starting point, a goal stated by learning outcomes and a duration of time to reach from one to the other. On this basis, teachers structure the instructional process. The problem with this approach lies in the unpredictability of future professional requirements that hamper setting goals and establishing useful learning outcomes. We need an educational system that produces individuals that can quickly respond to the changes in professional contexts that so complicate setting goals in curriculum design. More than setting goals or learning objectives, we need to establish a general direction and a quality of action oriented towards improvising and being able to improvise collaboratively in teams. In such a complex scenario, individuals need to learn constantly, think creatively, reinvent themselves and learn how to learn. Thus, lifelong learning has become a key concept in education.

Such learning situations are best approached by heutagogy, which lies beyond andragogy on the pedagogy-andragogy continuum of learner autonomy. In heutagogy, the student, not the teacher or the curriculum, is at the center of the learning process. The learner determines what will be learned, when, and how. Or at the very least, the student can negotiate the what, when and how with the teacher/facilitator. This entails a high degree of personalization of both instruction and the student's learning path. I suppose that higher education curricula will follow in the steps of the album in the music industry: as the production of albums is replaced by the ongoing production of singles and the album itself tends to disappear, so probably will the 4 or 5 year programs be replaced by shorter courses and students will have greater control and personalization of their learning paths. These learning paths will likely be more differentiated and less standardized, which is more in conformity with a post-industrial society where individual differentiation has ascendancy over collectivist uniformity.

This brings us back to the previous considerations on the perspective of time made at the beginning of this post. It turns out the ancient Greeks also had two distinct concepts for time. On one side there was Cronos, the term designating the universal, sequential time flow. To us, Cronos would be industrial-age time, with synchronized clocks and railroad time tables. On the other side, there was Kairos, the time frame upon which humanly significant events take place. Digital technologies and the heutagogic paradigm of education open up interesting possibilities to create learning environments based on Kairos, in which each student learns at his own pace and assumes control of his evaluation process, deciding when and how the learning outcomes will be assessed. While traditional education still lies in our view, behind us there is Kairos and the fulfillment of the vision of a truly open education.

Notes

  1. See Simon, 2016.
  2. See Brünner, 2003, pp. 153-154.
  3. I have not yet translated this essay into English.
  4. See Corredor, 2016, p. 20.
  5. See Corredor, 2016, p. 17.
  6. See the Wikipedia article on the web 2.0.
  7. See Corredor, 2016, p. 5.
  8. HTML means Hyper Text Markup Language. It is one of the standards of interoperability or technical specifications of the web 2.0 that we were referring to earlier. The web 2.0 is not really a radical change in these standards and technical specifications, but rather a design philosophy or an added layer of functionalities with which web sites are built.
  9. If you are curious to try it, go to the Mathematics I course page, wait for the page to load completely and under the "Autoevaluación" section, write 12345678 next to the "Cédula" field. For "Objetivo" choose any from 1 to 5 and then click on "Ir a quiz" (Go to quiz), where you will be shown 5 multiple choice questions based on the selected learning outcome. Once you answer the questions and click on the "Corregir" button, you will be given your quiz results and my feedback for your answers.
  10. SThe original quote by Douglas Rushkoff is more dramatic: In the emerging, highly programmed landscape ahead, you will either create the software or you will be the software. It’s really that simple: Program, or be programmed. Choose the former, and you gain access to the control panel of civilization. Choose the latter, and it could be the last real choice you get to make.
  11. See Williamson, 2010.
  12. These were emergent research methods ... in the sixties!
  13. By the way, I am noticing that the assistance to these tutoring sessions is decreasing while the amount of on-line tutoring sessions is increasing.
  14. See Graham, 2004.
  15. This is one of the conclusions that Rifkin (1995) draws in his prophetic book, "The End of Work".

References



If you found this post interesting or useful, please share it on Google+, Facebook or Twitter so that others may find it too.

viernes, 17 de febrero de 2017

Talleres para el Lapso 2017-1

Matematicas I (175-176-177)

Se efectuará un taller de inducción sobre cómo abordar el estudio de Matemáticas I en el sistema de estudios a distancia de la UNA el día sábado 25/02/2017 a las 9:30am en la EB Trujillo.

Estadística General (745)

DíaHora - LugarContenido
04/03/20179:30am sede UNA El TigreObjetivos 1-4
01/04/20179:30am sede UNA El TigreObjetivos 5-8
27/05/20179:30am sede UNA El TigreObjetivos 1-8

Estadística Aplicada (746)

DíaHora - LugarContenido
11/03/20179:30am sede UNA El TigreObjetivos 1-4
29/04/20179:30am sede UNA El TigreObjetivos 5-8
03/06/20179:30am sede UNA El TigreObjetivos 1-8

viernes, 6 de enero de 2017

Retrospectiva de unamatematicaseltigre 2016

En la antigua Grecia, el futuro se concebía como algo que estaba detrás de uno y el pasado como lo que estaba delante de uno1. Hoy, esta concepción del tiempo nos es extremadamente rara y contraintuitiva- todo el mundo sabe que el futuro es lo que está delante de nosotros, ¿no? Pero en la antigua concepción griega, el sujeto es como el que rema en un bote: el curso que lleva el bote está a sus espaldas y las aguas pasadas estan al frente. El futuro está a nuestras espaldas y no lo podemos ver. Las mismas palabras en castellano dan testimonio de ello. El pasado, el antes, está ante nosotros. El futuro, lo que viene después, es posterior. Está detrás de nosotros. Literalmente, caminamos en el tiempo avanzando hacia atrás. Con esta idea como preámbulo y en los estertores del 2016, abro mi editor de texto y comienzo a redactar una retrospectiva/prospectiva de mi sitio unamatematicaseltigre y tratar algunas ideas relativas al futuro de la educación a distancia, las tecnologías digitales y la heutagogía.

martes, 27 de diciembre de 2016

Interacción

Mi nombre es José Loreto Romero Palma y soy asesor del Área Matemática del Centro Local Anzoátegui, ubicado en la Unidad de Apoyo El Tigre. Actualmente, soy nivel corrector de las siguientes asignaturas:

AsignaturaEstudiantes de las sedes
Matemática I (códigos 175-177)Barcelona y El Tigre
Matemática II (códigos 178 y 179)Barcelona y El Tigre
Matemática III (código 733)El Tigre
Introducción a la Probabilidad (códigos 737 y 747)Barcelona, El Tigre y Anaco
Inferencia Estadística (códigos 738, 748)El Tigre y Anaco
Estadística General (745)Barcelona, El Tigre y Anaco
Estadística Aplicada (746)Barcelona, El Tigre y Anaco

¿Cuál forma de interacción prefieres, presencial o virtual?


Modo Presencial


Horario de AtenciónTeléfono
Miercoles, Jueves y Viernes: 4:00 pm a 6:00 pm
Sábado: 8:00 am a 12:00 m.
0283- 9893503
Ubicación

Nota

  1. Los talleres (presenciales) serán en la sede de la UNA o en la EB Trujillo (ver mapa).
  2. Las asesorías individuales (presenciales) serán en la sede de la UNA en el horario indicado arriba. Si vienes de Anaco o de Barcelona, por favor avísame por algún medio (correo electrónico o por los comentarios de Google+ abajo) con anticipación para asegurarte que te atienda y no hagas el viaje en vano.
  3. Queda terminantemente prohibido llamarme por celular, a menos que estes cansado de vivir o quieras que te recuerde a tu progenitora. Hablando en serio- sencillamente no atiendo llamadas de números desconocidos y mucho menos fuera de mi horario de trabajo.

Modo Virtual

Es mi modo de contacto favorito y seguramente, en la medida en que te vayas adaptando al sistema de estudios a distancia, con el tiempo será tu modo de contacto favorito también. La ventaja principal de este modo de interacción con el asesor es que es asíncrono y a distancia- te comunicas conmigo cuando quieras y desde donde estés. Constantemente estoy monitoreando los canales de comunicación de comunicación en línea que he dispuesto para ti- en cuestión de minutos u horas o en todo caso a la brevedad posible, te responderé.

Empecemos por el correo electrónico- un medio de comunicación más personal y más uno-a-uno. El mío es jlaurentum@gmail.com. Si para plantear tus dudas debes escribir formulismos matemáticos, te sugiero que utilices el método indicado en mi entrada sobre LaTeX. Para este método requieres tener una cuenta de correos Gmail. Por cierto, si no dispones de una cuenta de correos Gmail, te sugiero que crees una.

Lo que antes era el buzón de mensajes (o Chat Box) ubicado en la parte superior derecha del blog lo he cambiado por dos mecanismos de interacción: el Twitter y el sistema de comentarios propio de Google+. El Twitter lo utilizo más que todo para hacer anuncios sobre la publicación de objetivos logrados en exámenes, aclarar dudas muy generales o cosas así. Es un canal de comunicación de una sola vía (asesor ⇒ estudiante) tipo noticioso. Puedes ver mis tweets donde antes estaba el buzón de mensajes al abrir el blog. Por cierto, si me sigues (haciendo clic sobre el botón debajo del feed de Twitter), podrás recibir mis actualizaciones via el app de tu smartphone o en la página de Twitter también.

Los marcos para comentarios de Google+ sustituyen y amplian las funcionalidades del viejo buzón de mensajes en esta página, pero debes disponer de una cuenta Gmail para comentar. Las ventajas de este sistema de interacción son varias. Por una parte, como todos los servicios de google son integrados, cuando alguién responde a tu comentario o hace referencia a tí en un comentario, recibes una notificación de Google si te encuentras navegando en alguna página de Google (como por ejemplo en tu correo Gmail). Por otra parte, los marcos de comentarios, la comunicación es multidireccional (asesor ⇔ estudiante ⇔ estudiante) y multi-hilo.

Los invito a hacer uso de los marcos de comentarios en este sitio. El de esta página de "Interacción" en particular reservémoslo para temas y preguntas generales sobre la asesoría académica. En este caso, recuerden indicar su nombre, la asignatura y la pregunta específica. En las entradas del blog también hay marcos de comentarios. Los invito a comentar allí si quieren discutir sobre el tema presentado en la entrada. En todo caso, aplican las normas de cortesía para hacer que las conversaciones por los marcos de comentarios fluyan de la forma más natural y provechosa para todos. No toleraré conductas de troleo o insultos hacia mi persona u otros estudiantes, ni comentarios discriminatorios hacia un grupo de personas (cero racismo, misoginia, comentarios homofóbicos, etc.)- tales comentarios serán eliminados. Evita escribir todo en mayúsculas porque al hacerlo das a entender que estas gritando. Por último, si quieres dirigirte hacia una persona, puedes escribir el símbolo + (signo de más) seguido del nombre de esa persona tal como aparece en Google+ (por ejemplo, yo sería +José Romero. ¡Les deseo un feliz y provechoso aprendizaje virtual!

viernes, 23 de diciembre de 2016

Feliz Navidad 2016 (en R)

Quisiera desearle a mis lectores una feliz Navidad 2016 ... al estilo R. Vacílense mi arbolito navideño 3d creado usando el paquete plot3D de R:



Aunque esto sería aún otra decoración navideña hecha en R, lo original de esta es que el árbol se muestra en perspectiva tridimensional. Hace un tiempo, yo mismo elaboré un código en R para visualizar un árbol navideño en dos dimensiones (ver esta entrada), el cual a su vez era basado en el código que apareció en el blog Wiekvoet. Sin embargo, esta vez el reto era crear un modelo tridimensional del árbol visualizado en perspectiva con una animación mostrando el árbol en rotación.

jueves, 22 de diciembre de 2016

Merry Christmas 2016 (with R)

I'd like to wish all my readers a Merry Christmas 2016- R style! Behold my 3d Christmas tree created using the plot3D R package:



While this might seem like yet another Christmas decoration done in R, it is unique in that the tree is rendered in 3d perspective. I myself wrote some code for a 2d Christmas tree a while ago (see this entry in Spanish), in turn based on the code in the Wiekvoet blog. This time around though, I took it a bit further- the challenge now being to create a 3d model of a Christmas tree that I could rotate and animate in perspective. Heck, if others with enough leisure/boredom time to spare were to join in and showcase their own Christmas R creations for this time of the year, we might be witnessing the start of a new Christmas tradition for all R geekdom across the planet.

Mathematical model of a Christmas tree

Long before the birth of Jesus, most pagan cultures in Europe were sun worshipers and in December they celebrated the rebirth of the sun and the rich harvests. This is the significance of the Christmas tree in these festivities of fire and light, abounding in evergreens and holly branches. In Spanish America, instead of Christmas trees, people would place Nativity scenes (Nacimientos) in their homes, but with globalization and the prevalence of the Anglo-Saxon culture, the Christmas tree eventually found its way into our homes. At any rate, I for one have always found the lights and the bright decorations of the Christmas tree captivating and reminiscent of happier moments when friends are remembered and grudges are forgotten. So in a sort of weird tribute to the spirit of these festivities, I decided I would make a mathematical model of the Christmas tree. How geeky is that?

Mathematically, a Christmas tree is nothing but a fractal. A fractal consisting of a stub or segment of a tree trunk with two or three branches that separate outward from the trunk, and an extension, or outward projection of the trunk in the same direction as the trunk. The branches can in turn be considered as trunk segments, each comprising more branches and an extension outward in the same direction. The extension or outward projection of a trunk is in turn another stub with more branching off points and so on. Consequently, the tree construction process is recursive. Being a descendant of LISP, base R supports the list as the data structure of choice for implementing this recursive definition of a tree.

There are, to be sure, some considerations to be made so that this recursively-built tree ends up looking like a pine tree and not a palm tree, a cherry blossom tree, a mango tree or a bonzai tree. For one thing, pine trees are characteristically conical. This means that the angle of separation of the branches from the trunk is initially larger but "closes up" as the pine tree extends out or up. To control the degree of "outwardness" or "upness" associated to a particular tree-trunk stub there will be a depth parameter. Initially, the pine tree starts as one little green trunk stub of depth 1. As this stub branches off and extends upward, each of the children stubs has a lower depth than the parent stub. The most outward branches and leafs of the tree have a depth of almost 0. This will be useful for the dressing the tree with lights and decorations, as these lights are usually found on the more superficial or outward parts of the tree.

Another aspect of our tree growth model worth mentioning is how the tree trunk becomes thicker as the tree grows out an up. This is done via a width parameter that will eventually determine how thick the lines representing the trunk and the branches should be drawn. This width parameter also determines when the tree stem changes color from dark green to brown. In each growth cycle, the growth algorithm increases the width of each stub by a factor of 1.4, it then goes through the branches and the extension looking for the ending stubs (those whose branches and extensions are NULL or nonexistent). It then adds the branches and the extension and backtracks down to find the remaining end stubs. The width of the new branches and extensions is initialized to 1, but as can be seen, the width of the older stubs has been increased more.

The Christmas tree data structure is a list whose components are:

  • The starting point of the trunk segment, given as a vector with coordinates in \(\mathbb{R}^3\) as \((x_0,y_0,z_0)\).
  • The ending point of the trunk segment, as given by the vector with coordinates \((x_1,y_1,z_1)\). Together, the start and end points determine the direction vector of the tree stem as \(\vec{u}=(x_1-x_0,y_1-y_0,z_1-z_0)\). This direction vector will be useful for creating the extension stub, since the extension stub grows in the same direction as the parent stub. It is also used for determining where along the stub the branches start off and in what direction those branches are created.
  • The width parameter lwd which is also the thickness with which the tree stem is drawn as a segment when plotted.
  • The depth, which indicates how outward a branch or tree stem is, as already explained above.
  • Slots for three branches and one extension (branch1, branch2, branch3 and extension), which are nothing but lists recursively defined like this one. When a branch or extension is created, these slots are initialized to NULL.
Creating the extension of a tree stem poses no major problem. One simply takes as starting point of the extension the ending point of the parent tree stem. The ending point of the extension is determined by adding to its starting point a multiple of the direction vector \(\vec{u}=(x_1-x_0,y_1-y_0,z_1-z_0)\). This scalar multiple is such that the resulting length of the extension stem is slightly shorter than that of the parent stem. The most difficult issue in creating the Christmas tree lies with the creation of the branches. How can we create the branches so that they branch out from the stem in apparently uniform angles around the stem and not have all the branches branch out from the same side of the stem? How can we obtain the direction vectors for those branches so that they extend outwards from the stem? A little trigonometry and vector geometry is of use to us here.

If the \(\vec{u}\) vector is the direction of the tree stem being considered, then what we need is a vector perpendicular to \(\vec{u}\) - let's call it \(\vec{v}\) - so that we can obtain the direction vector of the branch \(\vec{b}\) by adding \(\vec{u}+\vec{v}\) and then multiplying \(\vec{b}\) by a scalar to set its length to the desired magnitude (see Fig. 1). However, considering we're dealing with the \(\mathbb{R}^3\) metric space, there are infinitely many such vectors. In fact, there is an entire two-dimensional space - a plane \(\mathcal{V}\) comprised of vectors that are all perpendicular to $\vec{u}$ (see Fig. 2). So what we need to obtain $\vec{v}$ is a orthonormal base of two vectors \(\{\vec{v_1},\vec{v_2}\}\) that will permit us to express \(\vec{v}\) as a linear combination of the two base vectors of \(\mathcal{V}\).

Fig. 1 Geometrical relationship between the main tree stem (\(\vec{u}\)) and one of its branches (\(\vec{b}\)). \(\theta\) is the angle at which \(\vec{b}\) branches outward from the main stem.

This is easy enough. Two vectors are said to be orthogonal if their dot-product is zero. So if we have a vector, say \((x,y,z)\) all we need to do is pick any non-zero coordinate and switch it with one of the remaining coordinates, changing one of the signs to negative and setting the remaining third coordinate to zero. So for example \((-z,0,x)\), \((0,z,-y)\), and \((-y,x,0)\) are all perpendicular to \((x,y,z)\), provided they are all non-null vectors. In short, to find an orthonormal base for the plane perpendicular to a vector \(\vec{u}\), pick any non-zero component of this vector, pick a second component to interchange it with while changing the sign of any of the two and set the third component to zero. This will give you a perpendicular vector to \(\vec{u}\). To find the other perpendicular vector, just repeat the above process, but interchanging the chosen non-zero component of \(\vec{u}\) with the component you had set to zero for the first vector. Finally, once you have your two vectors \(\vec{v_1}\) and \(\vec{v_2}\), you must multiply them by the inverse of their norms to set their norms to one. The procedure is better illustrated in the R code on this post.

Fig. 2 Finding vector \(\vec{v}\) as a linear combination of an orthonormal base of perpendicular plane \(\mathcal{V}\) and then using it to find the direction vector \(\vec{b}\) of the branch.

So once you have the base of the perpendicular plane to a given tree stem \(\vec{u}\), all you need is two scalar components \(c_1\) and \(c_2\) to define the perpendicular vector $v$ used for constructing the branch, as a linear combination of the base. How are we to go about this? Well, let's think about what we really need. For some parts of the tree - the deeper parts - we need three branches to a stem. For the more outward parts, two branches to a stem will suffice. We want these branches to be evenly distributed about the stem: in the case of 3 branches, we would like the angle of separation between the branches to be \(120^\circ\) (like the Mercedes-Benz star symbol), in the case of 2 branches, an angle of separation between them of about \(180^\circ\pm 20^\circ\) should be adequate.

What this means is that we want to choose the \(\vec{v}\) vectors in \(\mathcal{V}\) to have the sort of layout shown in Fig. 3. This is to ensure the pine tree will have a nice conical shape and not have its branches all projecting to the same side.

Fig. 3a 3 branch defining vectors Fig. 3b 2 branch defining vectors

Fig. 3 Distribution of two and three branch generating vectors on \(\mathcal{V}\)


Our problem now is to generate 2 or 3 vectors on a plane with such angles of separations. The good news is that we can define the vectors on the regular 2d plane with the canonical base \(\{\hat{i},\hat{j}\}\), and, because linear algebra is so cool, we can use the components of those vectors as \(c_1\) and \(c_2\) - the scalar coeficients used to define the \(\vec{v}\) vectors as linear combinations of \(\vec{v_1}\) and \(\vec{v_2}\). This is so because \(\{\vec{v_1},\vec{v_2}\}\) is an orthonormal base of a plane in the 3d space. So for example if the angle between \((0,1)\) and \((-\tfrac{1}{2},\tfrac{\sqrt{3}}{2})\) is \(120^\circ\), then the angle between \(\vec{v_2}\) and \(-\tfrac{1}{2}\vec{v_1} + \tfrac{\sqrt{3}}{2}\vec{v_2}\) will also be \(120^\circ\). Not only that, but the two vectors will lie on the \(\mathcal{V}\) plane in three dimensional space. Thus, we can translate the 2 dimensional vectors into vectors located on the \(\mathcal{V}\) plane perpendicular to the tree stem \(\vec{u}\).

Choosing the 2 or 3 vectors on the regular 2d plane later translating them as vectors on the $\mathcal{V}$ plane is a question of doing the following:

  • 2 branches: We first consider \((1,0)\) as the first vector and we determine the second unit-length vector by choosing a random angle between \(160^\circ\) and \(200^\circ\). We choose another random angle between \(0^\circ\) and \(360^\circ\) to rotate the entire set of two vectors.
  • 3 branches: Our three vectors will initially be \((1,0)\), \((\tfrac{\sqrt{3}}{2},-\tfrac{1}{2})\), and \((-\tfrac{\sqrt{3}}{2},-\tfrac{1}{2})\). We then choose a random angle between \(0^\circ\) and \(360^\circ\) to rotate the entire set of three vectors.
The reason we subsequently rotate the two or three vector set is to randomize the orientation of the branches so that our trees branches will project in all sorts of different directions. In either case, to rotate a 2d vector by an angle of \(\theta\) about the origin, we use the following linear transformation:

\[ (x,y)\quad\mapsto (x\,cos(\theta)-y\,sin(\theta),x\,sin(\theta)+y\,cos(\theta)) \]
There are a few remaining details to explain before we go into the R code. As we have already mentioned, the more superficial stems of the three have two branches whereas the deeper parts of the tree (those closest to the original thick stub from which the entire Christmas tree branches out) have three branches. This is controlled by the depth parameter. Whenever \(depth>0.8\), the tree stem will branch out into three branches, otherwise it will have only two. The depth parameter also controls where along the stem the branches are chosen. Stems of greater depth tend to branch off closer to its ending point \((x_1,y_1,z_1)\) whereas the more superficial stems branch off at points closer to its starting point \((x_0,y_0,z_0)\). Needless to say, the branching off points are chosen randomly. Finally, the placement of the lights and the tree decorations is also controlled by the depth parameter. The more superficial parts of the tree have a higher likelihood of containing lights and decorations. Again, the placement of these decorations is done stochastically.

R script for the 3d Christmas tree

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
library(plot3D)

trunk <- list(
  x0=0, y0=0, z0=0,
  x1=0, y1=0, z1=6,
  extension=NULL,
  branch1=NULL, branch2=NULL,
  branch3=NULL, branch4=NULL,
  depth=1,
  lwd=1,
  stub_color="brown"
)

draw_tree <- function(tree) {
  #function to draw the tree recursively
  if (is.null(tree)) return()
  with(tree,{
    segments3D(x0,y0,z0,x1,y1,z1,col=stub_color,
      lwd=lwd,add=TRUE)
    draw_tree(branch1)
    draw_tree(branch2)
    draw_tree(branch3)
    draw_tree(extension)
  })
}

extend <- function(tree) {
  #creates an extension of the main branch
  #in the same direction vector u=p1-p0
  with(tree,{
    growth_factor <- runif(1,min=0.9,max=1)
    return(list(x0=x1,y0=y1,z0=z1,
         x1=x1+growth_factor*(x1-x0),
         y1=y1+growth_factor*(y1-y0),
         z1=z1+growth_factor*(z1-z0),
         extension=NULL,
         branch1=NULL, branch2= NULL,
         branch3=NULL, branch4= NULL,
         depth=depth*0.9,
         lwd=1,
         stub_color="darkgreen"))
  })
}

create_branch <- function(tree,c1,c2) {
  #this function returns a branch for tree
  #c1 and c2 are the components for the vector
  #base {v1,v2}. v1 and v2 are two orthonrmal
  #vectors, both perpedicular to the direction
  #vector u=p1-p0 (p1 and p0 are the endpoints
  #of the tree trunk).
  #where_at is a scalar value in (0,1), indicating
  #where along p0=(x0,y0,z0) and p1=(x1,y1,z1)
  #the branch will grow.
  with(tree,{
    #vector u=(x1-x0,y1-y0,z1-z0) gives the 
    #direction of the tree trunk.
    #stub_length is the length of that trunk.
    u <- c(x1-x0,y1-y0,z1-z0)
    stub_length <- sqrt(sum(u*u))
    #growth_factor is how long the branch
    #will be with respect to stub_length
    growth_factor <- runif(1,min=0.7,max=0.8)
    where_at <- runif(1,min=0.4,max=0.8)
    #create two perpendicular vectors to u
    #and set their norms to 1
    i <- which(u!=0)[1]
    oi <- setdiff(1:3,i)
    v1 <- rep(0,3); v1[i] <- -u[oi[1]]; v1[oi[1]] <- u[i]
    v2 <- rep(0,3); v2[i] <- -u[oi[2]]; v2[oi[2]] <- u[i]
    v1 <- v1/sqrt(sum(v1*v1)); v2 <- v2/sqrt(sum(v2*v2))
    #vector v is a linear combination of v1 and v2,
    #hence it lies on the plane perpendicular to u
    v <- v1*c1+v2*c2
    #beta is the angle of separation between the
    #branch and the trunk. The angle is larger
    #for the "deeper" parts of the tree.
    beta <- runif(1,min=0.7*depth,max=0.9*depth)    
    #calculate the scalar k for multiplying with v
    #so that u+kv, the branch, will form a beta
    #angle with the trunk.
    k <- tan(beta)*sqrt(sum(u*u))/sqrt(sum(v*v))
    #new_u is the direction vector of the branch,
    #whose length will be the length of the branch 
    new_u <- u+k*v
    new_u <- new_u / sqrt(sum(new_u*new_u))*
             stub_length*growth_factor
    #the new (x0,y0,z0) point of the branch
    #is where along the main trunk the branch begins.
    new_x0 <- x0+(x1-x0)*where_at
    new_y0 <- y0+(y1-y0)*where_at
    new_z0 <- z0+(z1-z0)*where_at
    #the new (x1,y1,z1) point of the branch is
    #its ending point.
    new_x1 <- new_x0+new_u[1]
    new_y1 <- new_y0+new_u[2]
    new_z1 <- new_z0+new_u[3]
    list(
      x0=new_x0,y0=new_y0,z0=new_z0,
      x1=new_x1,y1=new_y1,z1=new_z1,
      extension=NULL,
      branch1=NULL, branch2= NULL,
      branch3=NULL, branch4= NULL,
      depth=depth*0.8,
      lwd=1,
      stub_color="darkgreen")    
  })
}

grow_tree <- function(tree) {
  if (is.null(tree) ) return(NULL)
  tree$lwd <- tree$lwd*1.4
  if (tree$lwd>2.0) tree$stub_color <- 'brown4'
  if (is.null(tree$extension)) {
    tree$extension <- extend(tree)
    if (tree$depth<0.5) {
      #make two branches at an angle of more than 160 degrees
      rot1 <- runif(1,min=0,max=2*pi)
      rot2 <- (runif(1,min=8*pi/9,max=10*pi/9)+rot1)%%(2*pi)
      tree$branch1 <- create_branch(tree,cos(rot1),sin(rot1))
      tree$branch2 <- create_branch(tree,cos(rot2),sin(rot2))
    } else { 
      #make 3 branches with 120 degree angles between them and
      #rotate the entire branch set.
      rot <- runif(1,min=0,max=2*pi)
      tree$branch1 <- create_branch(tree,-sin(rot),cos(rot))
      tree$branch2 <- create_branch(tree,
                        sqrt(3)/2*cos(rot)+sin(rot)/2,
                        sqrt(3)/2*sin(rot)-cos(rot)/2)
      tree$branch3 <- create_branch(tree,
                        -sqrt(3)/2*cos(rot)+sin(rot)/2,
                        -sqrt(3)/2*sin(rot)-cos(rot)/2)
    }
  } else {
    tree$extension <- grow_tree(tree$extension)
    tree$branch1 <- grow_tree(tree$branch1)
    tree$branch2 <- grow_tree(tree$branch2)
    if (tree$depth>=0.5) 
      tree$branch3 <- grow_tree(tree$branch3)
  }
  return(tree)
}

create_ornaments <- function(tree) {
  if (is.null(tree)) return()
  po <- (1-tree$depth)^6
  ornament <- sample(c(T,F),size=1,prob=c(po,1-po))
  co <- sample(c("red","darkgoldenrod4"),size=1,
               prob=c(0.6,0.4))
  if (ornament)
    ornaments <<- rbind(ornaments,
      data.frame(x=tree$x1,y=tree$y1,z=tree$z1,color=co))
  create_ornaments(tree$branch1)
  create_ornaments(tree$branch2)
  create_ornaments(tree$branch3)
  create_ornaments(tree$extension)
}

create_lights1 <- function(tree) {
  if (is.null(tree)) return()
  po <- (1-tree$depth)^4
  light <- sample(c(T,F),size=1,prob=c(po,1-po))
  if (light)
    lights1 <<- rbind(lights1,
      data.frame(x=tree$x1,y=tree$y1,z=tree$z1))
  create_lights1(tree$branch1)
  create_lights1(tree$branch2)
  create_lights1(tree$branch3)
  create_lights1(tree$extension)
}

create_lights2 <- function(tree) {
  if (is.null(tree)) return()
  po <- (1-tree$depth)^4
  light <- sample(c(T,F),size=1,prob=c(po,1-po))
  if (light)
    lights2 <<- rbind(lights2,
      data.frame(x=(tree$x1+tree$x0)/2,
                 y=(tree$y1+tree$y0)/2,
                 z=(tree$z1+tree$z0)/2))
  create_lights2(tree$branch1)
  create_lights2(tree$branch2)
  create_lights2(tree$branch3)
  create_lights2(tree$extension)
}

draw_ornaments <- function() {
  with(ornaments,
    {points3D(x=x,y=y,z=z,
              pch=19,cex=1.2,col=as.character(color),
              colkey=FALSE,add=TRUE)})
}

draw_lights1 <- function() {
  with(lights1,
    {points3D(x=x,y=y,z=z,pch="+",cex=0.8,col="white",
              colkey=FALSE,add=TRUE)})
}

draw_lights2 <- function() {
  with(lights2,
    {points3D(x=x,y=y,z=z,pch="+",cex=0.8,col="yellow",
              colkey=FALSE,add=TRUE)})
}

set.seed(20161224)
pine_tree <- trunk
for (i in 1:5) pine_tree <- grow_tree(pine_tree)
ornaments <- NULL;
lights1 <- NULL;
lights2 <- NULL;
create_ornaments(pine_tree)
create_lights1(pine_tree)
create_lights2(pine_tree)

png("tree%02d.png")
for (i in 0:35) {
    perspbox(x=c(-25,25),y=c(-25,25),z=c(0,40),bty="n",
             phi=8,theta=i*10,col="white",alpha=0)
    draw_tree(pine_tree)
    draw_ornaments()
    switch((i%%4)+1,{},
     {draw_lights1()},
     {draw_lights2()},
     {draw_lights1(); draw_lights2()})
}
graphics.off()


Bibliography



Dear Reader:

If you found this post interesting or useful, please share it on Google+, Facebook or Twitter so that others may find it too.

Below you will find a link to download a printable pdf version of this article for off-line reading and the R source code featured in this post, but essentially it's the same information I'm sharing with you in this blog entry. It will take you to a Bitcoin payment gateway which is very secure, anonymous and hassle free (I will not collect your sensitive personal information). The fee is small - 0.0005 BTC - or roughly $0.45 at today's rate. Think of this as a donation, not a business transaction that will help me continue writing content and survive in this hell-hole that Venezuela has become. Thanks in advance!

domingo, 11 de diciembre de 2016

La Era de la Información: ¿Ilustración o Ignorancia?

Este es un ensayo en el cual intento precisar el significado de la frase "Era de la Información" con la cual comúnmente nos referimos a nuestra época. Es ya lugar común decir que las Tecnologías de Información y Comunicación han masificado el acceso a la información en una escala planetaria sin precedentes, pero ¿quiere decir esto que ahora somos más sabios que nuestros antepasados? ¿Estamos ante las puertas de una revolución educativa? Estas son algunas de las cuestiones que abordo en este ensayo que, aunque escrito en el 2011, sigue plenamente vigente.