0

دانلود کتاب پایتون برای روانشناسی، علوم اجتماعی و آموزش

بازدید 118
  • عنوان کتاب: Python for Psychology, Social Sciences, and Education
  • نویسنده: Josep M. Roig-Fusté
  • حوزه: برنامه‌نویسی پایتون
  • سال انتشار: 2026
  • تعداد صفحه: 340
  • زبان اصلی: انگلیسی
  • نوع فایل: pdf
  • حجم فایل: 5.81 مگابایت

من تصور می‌کنم هنگام شروع پروژه‌ای از این نوع، لازم است دو سؤال پرسیده شود و تا حد امکان به آنها پاسخ واضح داده شود. سؤالات عبارتند از: چرا یک روانشناس یا یک دانشمند علوم اجتماعی باید در مورد برنامه‌نویسی کامپیوتر بداند یا برنامه‌نویسی یاد بگیرد؟ و چرا به طور خاص برنامه‌نویسی پایتون را انتخاب کند؟ بنابراین سعی خواهم کرد به هر دو سؤال به روشی پاسخ دهم که برای همه خوانندگان این کتاب رضایت‌بخش باشد. این یک واقعیت غیرقابل انکار است که در 40 سال گذشته کامپیوترها به زندگی و کار ما هجوم آورده‌اند، زیرا در تمام زمینه‌های دانش و فعالیت‌های انسانی، و همچنین به طور طبیعی در روانشناسی، علوم اجتماعی و آموزش و پرورش کاربرد دارند (Roig-Fusté، 2018)، بنابراین اگر کسی بخواهد در کارش کارآمد باشد، نمی‌تواند هیچ متخصصی را در این زمینه‌ها کنار بگذارد. هر دانشمندی که باید اطلاعات جمع‌آوری کند و حجم زیادی از داده‌ها را پردازش کند، به یک کامپیوتر نیاز دارد و کامپیوتر را می‌توان در بسیاری از کارهای دیگر و به روش‌های کاملاً متنوع به کار برد. اما اگر به روشی مناسب به کامپیوتر گفته نشود که چه کاری باید انجام دهد، هیچ ابتکاری ندارد و هیچ کاری انجام نمی‌دهد. این بدان معناست که لازم است تصمیم گرفته شود کدام برنامه‌ها ساخته شوند و چه کسی آنها را می‌سازد و به کامپیوتر گفته شود که چه کاری باید انجام دهد، به عبارت دیگر، چه کسی کامپیوتر را برنامه‌ریزی می‌کند. من اساساً می‌توانم سه احتمال را در نظر بگیرم که هر کدام مزایا و معایب خود را دارند. این احتمالات عبارتند از اینکه توسط یک روانشناس انجام شود، توسط یک دانشمند کامپیوتر یا یک متخصص برنامه‌نویسی انجام شود، یا توسط یک تیم چند رشته‌ای متشکل از دانشمندان علوم اجتماعی و دانشمندان کامپیوتر انجام شود. این گزینه سوم تا حد زیادی مناسب‌ترین گزینه خواهد بود، اما این بدان معنا نیست که هیچ نقص یا محدودیتی ندارد، عمدتاً اینکه گران‌ترین گزینه خواهد بود و اگر دانشمندان علوم اجتماعی هیچ دانشی از علوم کامپیوتر یا علاقه‌ای به آن نداشته باشند و دانشمندان کامپیوتر نیز به نوبه خود دانشی از علوم اجتماعی یا علاقه‌ای به آنها نداشته باشند، کار نخواهد کرد. علاوه بر این، در مورد مؤسسات یا پروژه‌های بزرگ، این گزینه عملی‌تر و مؤثرتر خواهد بود و اعمال آن به پروژه‌های فردی که ممکن است فقط مورد توجه تعداد کمی از افراد خاص باشد، دشوار است. می‌توان پروژه‌ای را به یک دانشمند کامپیوتر سفارش داد، اما این کار پرهزینه نیز خواهد بود و بسیاری از مفاهیم موضوع باید توضیح داده شوند که ممکن است برای انجام صحیح کار مهم باشد. حتی هنگام سفارش یک پروژه، توصیه می‌شود فردی که آن را سفارش می‌دهد، دانش علوم کامپیوتر داشته باشد، زیرا این امر به او امکان می‌دهد اطلاعات مربوط به پروژه را راحت‌تر آماده کند و از پیچیدگی واقعی پروژه آگاه باشد. در نهایت، روانشناس کل پروژه را انجام می‌دهد، زیرا او می‌داند چه چیزی مورد نیاز است و چگونه باید انجام شود. اگر محاسبات آسان و در دسترس همه باشد، این گزینه ایده‌آل خواهد بود. محاسبات آسان نیست و هر روز پیچیده‌تر می‌شود. خوشبختانه، جوانان به استفاده از کامپیوتر عادت بیشتری دارند و علاقه بیشتری به استفاده از آنها دارند. علاوه بر این، دانشگاه‌ها معمولاً دوره‌های برنامه‌نویسی را در تمام شاخه‌های آموزش ارائه می‌دهند. صرف نظر از اشکالات و سختی‌ها، متخصصان باید جاه‌طلبی کافی برای گنجاندن تمام ابزارهایی که می‌توانند دانش ما را تسهیل، بهبود و پیشرفت کنند، داشته باشند. روانشناسان، مانند هر کس دیگری، مجبور به کار با کامپیوتر شده‌اند، اما ما اغلب در کارهای حاشیه‌ای فاقد دانش و جاه‌طلبی هستیم و به اولین چیزی که یاد گرفته‌ایم یا چیزی که به سادگی در دسترس است، بسنده می‌کنیم و در نتیجه امکانات پیشرفت خود را محدود می‌کنیم، به خصوص با توجه به تکامل سریع فناوری اطلاعات و افزایش بدون شک پیچیدگی آن با گذشت سال‌ها. بنابراین، یادگیری برنامه‌نویسی برای هر دانشمند یا تکنسینی ضروری به نظر می‌رسد. از اینجا به بعد، امکانات مختلفی از نظر زبان‌های برنامه‌نویسی وجود دارد: بیسیک، اسمال بیسیک، جاوا، جاوا اسکریپت، پاسکال، پایتون…، برخی از زبان‌های قدیمی‌تر مانند فورترن و برخی دیگر پیچیده‌تر مانند اسمبلر، سی، سی پلاس پلاس یا سی شارپ، که تنها چند نمونه از این امکانات هستند. من پایتون را توصیه می‌کنم، اما هر کدام از این گزینه‌ها را که انتخاب کنید، امیدوارم این کتاب بتواند برای دیدن امکانات جدید و یافتن راهی برای تسهیل کار حرفه‌ای روزانه شما مفید باشد. علم کامپیوتر امکانات زیادی دارد و اگرچه درست است که در ابتدا به تلاش قابل توجهی نیاز دارد، اما این نیز درست است که معمولاً وقتی می‌توان پس از غلبه بر مرحله یادگیری اولیه، از تمام پتانسیل آن استفاده کرد، نتایج چشمگیری می‌دهد. همچنین باید توجه داشت که یادگیری یک زبان برنامه‌نویسی به رشد فکری بیشتر کمک می‌کند، امکانات و انعطاف‌پذیری بیشتری در استفاده از رایانه ارائه می‌دهد و یک برنامه درسی حرفه‌ای را تکمیل می‌کند. با توجه به علاقه به محاسبات و گزینه‌های کاربردی آن، باید مسیرهایی را که می‌خواهید برای هدف خود انتخاب کنید در نظر بگیرید. اگر این برنامه‌نویسی است، حتی اگر کاربردهای ساده‌ای داشته باشد، باید از بین صدها زبان برنامه‌نویسی موجود، یک زبان برنامه‌نویسی را انتخاب کنید.

I imagine that when starting a project of this kind, it is necessary to ask two questions and to answer them as clearly as possible. The questions are: Why should a psychologist or a social scientist know about computer programming or learn to program? And why choose Python programming in particular? I will therefore try to answer both questions in a way that can be satisfactory to everyone reading this book. It is an unquestionable fact that in the last 40 years computers have invaded our lives and our work, since they are applied to all fields of knowledge and human activity, also naturally to psychology, social sciences, and education (Roig-Fusté, 2018), so no professional in these areas can be left out if they want to be efficient in their work. Any scientist who must collect information and process a large amount of data will need a computer, and the computer can be applied to many other tasks and in quite diverse ways. But the computer has no initiative and does nothing if it is not told, in a convenient way, what it must do. This means it will be necessary to decide which applications are made and who makes them, telling the computer what it must do in a way that it understands, in other words, who programs the computer. I can think of basically three possibilities, each of them with its advantages and disadvantages. These possibilities are that it be done by a psychologist, that it be done by a computer scientist or a programming specialist, or that it be done by a multidisciplinary team made up of social scientists and computer scientists. This third option would be by far the most appropriate, but that does not mean it does not have drawbacks or limitations, mainly that it will be the most expensive option and that it will not work if the social scientists do not have any knowledge of computer science or interest in it and the computer scientists do not have, in turn, knowledge of social sciences or interest in them. In addition, it will be a more viable and effective option in the case of institutions or large projects, and it is difficult to apply to individual projects, which may only be of particular interest to a few specific people. It is possible to commission a project to a computer scientist, but it will also be expensive, and many concepts of the subject matter will have to be explained, which may be important for carrying out the work correctly. Even when commissioning a project, it would be advisable for the person commissioning it to have knowledge of computer science, since this will allow them to prepare the information for the project more conveniently and be aware of the true complexity of the project. We are left with the psychologist carrying out the entire project, since they know what is needed and how it should be done. This option would be ideal if computing were easy and accessible to everyone. Computing is not easy and is becoming more complex every day. Fortunately, young people are more accustomed to using computers and have a greater interest in using them; in addition, universities usually offer programming courses in all branches of education. Whatever the drawbacks and difficulties, professionals must have enough ambition to incorporate all those tools that can facilitate, improve, and advance our knowledge. Psychologists, like everyone else, have been forced to work with computers, but we often lack knowledge and ambition in marginal tasks, and we settle for the first thing we have learned or what is simply closest to hand, thereby limiting our possibilities for progress, especially taking into account the rapid evolution of information technology and its undoubted increase in complexity as the years go by. So, learning to program seems to be something essential for any scientist or technician; from here there are various possibilities in terms of programming languages: Basic, Small Basic, Java, JavaScript, Pascal, Python…, some older ones like Fortran, and others more complex like assembler, C, C++ or C#, to name just a few possibilities. I recommend Python, but whatever you choose from these options, I hope this book can be useful to see new possibilities and find the way to facilitate your daily professional work. Computer science has many possibilities, and although it is true that it requires a significant effort at the beginning, it is also true that it usually gives spectacular results when it can be used to its full potential once the initial learning stage has been overcome. It should also be noted that learning a programming language helps with greater intellectual development, offers more possibilities and flexibility in the use of computers, and completes a professional curriculum. Given the interest in computing and its application options, you must consider the paths you are going to choose for your objective. If this is programming, even if they are simple applications, you will have to choose a programming language among the hundreds that exist. So why do it in Python? In fact, for many applications in the field of psychology there are some alternatives, such as Matlab (Borgo, Soranzo and Grassi, 2012; Rosenbaum, Vaughan, and Wyble, 2015), which is expensive, and learning it is not easy either. Another alternative is the R language (Adler, 2010; López, 2012, Mair, 2018), designed mainly for data processing and statistical calculations, which can be complicated if not used with a menu such as R-commander (Elosua, 2011; Navarro, 2013) or with the help of RStudio (Kronthaler and Zöller, 2021). This is free and powerful, replacing the SPSS program that psychologists and social scientists have used so much since the 1980s to do our statistical calculations. But if you want a more general, flexible option with more possibilities and broader horizons, this could be Python. Python is undoubtedly in fashion, which means there are many people working with it and many resources available: books, in Spanish and English, in-person and online courses, tutorials, specialized websites, support groups to solve difficulties, and so on. Python defenders say that it is an easy language to learn; personally I do not believe that this is true because there are no easy languages to learn, especially for someone who is not a computer scientist and is starting out in programming, as can often happen in the case of professionals in our areas of knowledge. Learning to program from scratch is not an easy task; but, although it has its complexities, in the case of choosing Python we will surely have the advantage of working with a language that will not be the most technical or most difficult to handle. The choice of Python may also be for other reasons: it is a free, powerful, multiplatform, and welldocumented language (van Rossum, 2012, 2020). For all these reasons, it has been used on many occasions to introduce people to the world of programming, replacing the old BASIC1 or the Pascal language in more technical environments, both very popular just a few years ago, but which have become obsolete or have disappeared from the market. Furthermore, Python has already been widely used in psychology and social science applications (Dalmaijer, 2017; Peirce, 2007, 2009, 2019; Peirce, Gray, Simpson, S., MacAskill, Höchenberger, Sogo, Kastman, & Lindeløv, 2019; Peirce & MacAskill, 2018; Bexter & Kampa, 2020) and is very powerful for statistical applications (Nawaz, 2020). Some of the concepts and terms that we will use in this work may be unknown to a beginner, but if you want to program, you will have to become familiar with them and many more. If you have many years of computer use behind you, you will probably know many of the terms that we are forced to use and the task will become easier; if not, I recommend you first take an introductory book on computing (for example Norton, 2006; Farrell, 2013), familiarize yourself with the subject in general, and do not miss any opportunity to read about computing topics that particularly interest you. This will expand your computer culture and the information you have on the subject and will facilitate your understanding, while making you see how interesting it can be to spend a little more time on computing and improve the use of it in your daily work, taking advantage of all its potential. To begin, I will explain a little about what the mentioned advantages of using Python refer to and to expose some of its characteristics: Python is free, meaning you don’t have to pay anything to use it; you can get it on the Internet and start using it right away. It is multiplatform, meaning that it works on computers with the most common operating systems, i.e., Windows, Apple, or Unix, and others that are not so common such as Android. This has the advantage that an application does not have to be programmed, i.e., written, three times, or more, if we want to use it on some of these operating systems. Python is an interpreted language, which means it runs on the fly and allows you to see the results of your programming efforts, as well as to correct errors, when they occur, by applying the desired modifications. The fact that it is interpreted does not mean it cannot be compiled to obtain a directly executable file. There are also simple options for this, which can be used when the program has already been finished and has been tested in the interpreter, to rule out errors or any type of malfunction. You will learn about these options later. Python is a powerful and well-documented general-purpose language (Van Rossum, 2012, 2020). Languages allow you to do simple things, such as adding two numbers, and some of them allow you to do complex things, such as managing and directly collecting values from a measuring device, such as those found in experimental psychology, or consulting a database on the Internet. A general-purpose language is more flexible and better suited to a wide variety of tasks. If you choose a language that has technical limitations, for example the already mentioned BASIC, which has nevertheless been used in psychology (Deni, 1986), and you progress in its use, there will possibly come a time when the language is not useful for what you want to do, and you will also have the difficulty that some modes of the simple and easy-to-learn language can compete with those of a more powerful language and even make it difficult to learn a second language that is better, when learning this one is necessary. The lack of documentation can also make it difficult to learn and to obtain optimal use once learned. Python has extensive documentation by its authors, and hundreds of books have also been published on the subject, some of them very specialized and in some part of the field of our interest (Dalmaijer, 2017, 2024). However, both the documentation and most of the books are in English, which is sometimes a drawback for some people, because they are less accessible documents: more difficult to acquire or understand. You will surely ask yourself other questions: Why read a programming book written by a psychologist? Simply because this book talks about both programming and its possible applications to psychology, social sciences, or education, and of these two topics perhaps the first is not the most important for a scientist in our area; therefore, it does not intend to usurp the teaching of programming and create experts in programming computers, but rather to introduce a topic and help professionals in a specific area to use programming effectively for their daily work, giving some basic concepts and looking in greater depth at some fields, in which it can be applied with advantage, such as psychology, social sciences or education. In my experience, one of the things that most facilitates learning a complex subject like this, is having a clear idea of what you want to do with what you are learning. If you know how you want to apply what you learn about programming, you will be more consistent and will advance more easily. You should also consult other books that allow you to delve deeper into the field of strict programming and expand your experience with your own practice. Therefore, this book does not propose to teach programming in Python, a goal that may be too difficult for someone who is not a computer professional, but we will refer to how to program in Python, since we are going to deal with the application of this programming language. This book aims to study how to make some computer applications that may be useful for psychologists and social scientists, stimulating the interest of professionals in these sciences in computer science and programming, starting from the basis that we have already chosen the programming language of Python and providing a guide to get started effectively. If you want to delve deeper into the topic of the importance of learning to program for any human being and how computers and programming are changing and will continue to change not only our lives but also our way of thinking, you can find some philosophical reflections in Rushkoff’s book (2010). To read this book, I assume that no prior knowledge of computer science or programming is required, although it may be advantageous to have used a computer and to understand the most basic aspects, such as what an operating system is and how to use it, what applications are and how to interact with a computer, etc. If you have no experience in these fields, supplementing the information in this book with a general Python programming book (Matthes, 2022) or searching the Internet for specific information about these concepts or fundamental knowledge may be necessary and extremely helpful. I have already said that learning to program is not easy, and learning to program in Python is not either, no matter what its defenders say; you have to learn new concepts and new ways of doing things or handling abstract concepts, all without seeing the utility until you have mastered the language and can create an application from start to finish, hoping that it is useful and efficient and works correctly; this makes it easy to get bored or discouraged, when in reality it is only possible to learn by persisting. There is a point in learning where things get complicated and getting past this point; becoming a real programmer requires time and dedication, as well as a lot of perseverance and effort. On the other hand, some of the advantages of Python that we have mentioned, such as working on various platforms or operating systems or the large number of libraries available or the multitude of development environments, can confuse the beginner; for all this we will limit ourselves to the most fundamental: exposing the essentials of the language, using a single version of Python, version 3, to a single development environment, Python’s own, which is called IDLE (Integrated Development and Learning Environment). IDLE is an environment consisting of an editor in which programs are written and that accompanies the original language by default. We will also focus on a single operating system: Windows. At the end of the book we will mention, in passing, other possibilities that can facilitate the work so that you can continue to delve deeper into the subject and chart your own path of progress toward where you want to go. Computer science evolves very quickly, and professionals cannot be satisfied with the first thing they have learned; they need to learn new things and incorporate everything that can facilitate their understanding or their daily work, even if this requires more effort. This book has been written in this spirit, to point out possibilities and start new paths. It is up to the professional to integrate them into their daily practice. To achieve this, the best thing is to have an objective. Learning to program, in this case, is not an objective for a social scientist; it is only a means to achieve the objective that you have. By having an objective when starting this adventure, you will have a truly clear idea of what you want to do with the knowledge you acquire in computer science, that is, what this knowledge will be applied to. Knowing, for example, that you want to plan experiments with the help of a computer and which ones, or that you want to write teaching programs or automate tasks such as collecting survey data or correcting tests, preparing reports based on test results, doing statistical research, etc., will greatly help progress, will force you to look for solutions, will consolidate what you have learned sooner and, above all, will make the journey more enjoyable. It will certainly not be possible to develop in detail all the possibilities of applying programming to psychology, partly because some of them are very new and have not yet reached a wide diffusion, but we will be able, or will try, to expose their bases and their infinite possibilities for the future. Finally, I would like to point out that writing a programming book can be complicated because, in programming, there are many ways of doing the same thing, reiterating that the objective of this book is not so much to teach how to program as to show the advantages of having a tool such as programming for research and for daily practice, while stimulating the interest of social science professionals in the application of computer science in their work. Since computer science is of great interest to all fields of psychology and psychological software is an area of great potential and future, the current panorama is rather bleak; an Internet search using the terms psychological software or, more advisable, psychological software, to try to obtain a greater number of results, can convince us of this. Although in recent years some researchers have addressed the issue and a multitude of companies with applications in this field have emerged, few of them have evolved, and many have already disappeared, which indicates that the subject has not yet taken root strongly or has found a safe path to evolve, being at the moment situated between two extremes: that of the programs that are too expensive or that of those that are not very useful. Nevertheless, some collaborative or public domain applications have been developed; we can refer as an example to the PEBL Test Battery (Mueller and Piper, 2014), an open-source program that has the disadvantage of being written in C++, a very powerful language as well as very specialized and more complex, less known by professionals in the human sciences, or to PsyToolkit (Stoet, 2010, 2011), an application for Unix, a valuable operating system, but not very widespread among less professional users or personal computers in our country. In both cases, they can be used immediately and are useful for professionals, provided they are skilled in the use of computers and are particularly familiar with these applications. In comparison, Python is a longer path, because you have to learn to program, but it is also more flexible and promising, since it is not necessary to limit ourselves to what is already done. As you will see, you can take advantage of much of what is already done to expand your work and make it more useful. Any suggestion or comment that may contribute to improving this book or correcting errors in subsequent editions can be sent to info@mtrpsicologia.com, putting the title of this book in the subject of the message.

این کتاب را میتوانید از لینک زیر بصورت رایگان دانلود کنید:

Download: Python for Psychology, Social Sciences, and Education

نظرات کاربران

  •  چنانچه دیدگاه شما توهین آمیز باشد تایید نخواهد شد.
  •  چنانچه دیدگاه شما جنبه تبلیغاتی داشته باشد تایید نخواهد شد.

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *

X