Add more chapters

This commit is contained in:
Roman Pushkin 2018-10-05 23:27:51 -07:00
parent eb7ec08857
commit 59ce4883ba
5 changed files with 82 additions and 0 deletions

19
manuscript/004.txt Normal file
View file

@ -0,0 +1,19 @@
## What we will study
As stated earlier, there are many trends in software development. Each trend is unique and requires its own know-how. The author believes that there are currently at least two “tried and tested” trends in programming which give the maximum result in the minimum time. “Results” here means both cash compensation and knowing how to do something with your own hands.
The first is mobile development programs for mobile phones (Android, iPhone), tablets (iPad) and other devices.
The second is web programming (or web development).
However, mobile development itself often means optimizing the code for mobile devices in all sorts of ways. The programming language and SDK (software development kit) is very often bound up with a certain style of development. And this style is very different from the _classic_ object-oriented programming, it is more procedural. With procedural programming, you cant always make full use of the languages capabilities, though this is not always important, particularly if your aim is to earn a salary.
A second aspect of program development for mobile devices is that there are two main mobile platforms at the present time. One belongs to Apple Corporation, the other to Google. How these platforms will develop in the future depends entirely on the policy of these companies.
In the case of web programming in Ruby, it all looks somewhat different. The language itself is being developed and supported by the programmers themselves. The web framework Rails about which more later is also supported exclusively by the community. This enables programmers from all over the world to create a convenient tool just as they want, without having to look over their shoulder at the policy of any company.
Furthermore, programming in Ruby is rarely used on mobile devices, therefore in practice, they hardly ever have to be “specially” optimized. But the main difference between Ruby and the mobile development languages is that Ruby is a dynamic language not in the sense that it is developing dynamically (though it is), but that it includes what is called _dynamic typing_ of data as mentioned earlier.
The main advantage of dynamic typing compared with static is that there are fewer rules and less strictness, which gives a higher rate of development of apps by the programmer (admittedly at the cost of slower performance of the written programs, and of “sufficient” reliability. But performance rate does not particularly interest us, since Ruby is not used for developing mobile apps, although it is more often than not a key link on the server and facilitates the functioning of mobile apps for iOS, Android, etc.).
No doubt other programming trends not checked by the authors of this book do exist. For example, the development of computer games. A lifetime would probably not be enough to “check” all the trends, so we will leave this task to more inquisitive minds, and restrict ourselves to what is actually in demand in the market, permits “rapid input” and is more or less interesting rather than boring.

9
manuscript/005.txt Normal file
View file

@ -0,0 +1,9 @@
## Web programming or something else?
The book “Ruby is for fun” is divided into two parts. In Part One (which you are reading now), we consider the basis of the Ruby language and its use from the so-called command line. Part Two (upcoming) will include web programming and the Rails framework.
“_Wait!_” the observant reader will say. “_Surely weve just been talking about web programming? Yet its going to be in Part Two as well?_”
Quite true. The point is that Ruby is quite a powerful tool in itself. Students of the online Ruby school have found work even without knowledge of web programming. The basics of the language and the ability to find and use the required libraries already make possible the creation of quite useful apps which can be used for data processing (for example, so-called “web-scraping”) to create script configurations and to control an operating system (which will definitely come in handy for any system administrator), for working with files of different formats etc.
The ability to use a language for jobs of various kinds not connected with web programming gives an indisputable advantage before you start web programming. Web programming itself involves the knowledge of certain generally accepted concepts. And well now be able to solve these problems using a tool we are already learning how to handle.

19
manuscript/006.txt Normal file
View file

@ -0,0 +1,19 @@
## How much do programmers earn?
This is a very important question for those who know nothing about programming. But before answering it, I want to go back.
Since Ruby is mainly a language for web programming, it is Ruby on which programmers base remote work. The idea of working remotely on one project is particularly prevalent in web programming.
This is understandable. To create software for aircraft, for example, it is more useful to be in a science center working hand in hand with colleagues there. But in the case of web projects, it is often unimportant where the developer is actually located. The team “_37 signals_”, the developers of which are in various places around the world and even in different time zones, has also contributed to the remote development concept. It was in “_37 signals_” that the first version of Rails, probably the most popular framework for web development, appeared.
It has been proved over the last ten years that remote development is possible. You dont always need to keep a team of programmers all in the same office. This is a huge plus for Ruby programmers: it means that they are not tied to any specific location, and can work for a company in the USA from a small town in Greece or Spain, for example. And that way they will receive a salary far in excess of what they could get locally.
If you look at [the statistics of remote working](https://remoteok.io/stats.php), Ruby holds second place for the number of vacancies available. First place goes to JavaScript, but only because a basic knowledge of JavaScript is essential, and is required along with other languages: Java, PHP, Ruby etc. But “pure JavaScript” (Node.js) for full-stack programming is only in third place.
It is worth noting that the number of jobs in a certain language is not the most important indicator, and it can be of no importance at all in making the right choice for the rest of your life. We are only speaking of what we know now. Its very hard to predict several years ahead in the IT industry. But undoubtedly, the good news is that you dont need thousands of jobs, you only need to find one. Nor is it all that important how much time you spend looking for a job a week, two weeks or two months, youll certainly find one.
Here we come to statistics collected by Ruby School students. How much do Ruby programmers earn? Before answering, we will stipulate that we are only talking about remote working. The remote salary market is more stable. It was balanced out by programmers from different countries, and a certain value was arrived at for it. There is no sense in comparing salaries “on the spot”: a Ruby programmer can (perhaps even must) work remotely, in most cases this is more profitable. It is also assumed that programmers have a basic knowledge of English, so that they can communicate with clients from other countries.
Salary categories can be divided into three parts. They may differ depending on type of work (remote or in an office) and on geographical location (immaterial if you are working remotely). At the present time the hourly rate for a programmer with one years experience is from 15 to 30 US dollars an hour. From one to three years, roughly from 30 to 50. From three years upward, roughly from 50 dollars an hour. On reaching the 50-dollar level, it all becomes very individual. By the way, the average number of hours a month is 160.
From our own experience, it is quite possible, with no special talents, to master Ruby programming in one year and find your first remote-working job. Many Ruby School students have done so, and you can find confirmation of these words on our website.

22
manuscript/007.txt Normal file
View file

@ -0,0 +1,22 @@
## Your advantage
Before we start creating our first program, it is important to remind ourselves what is not related to programming. Everyone has different life experience. Some may have come to programming from music, some from finance. Any musician will find it vastly simpler to write a program for teaching people to read music. It will be simpler for a financier to write a program for a commercial balance sheet. What does your advantage consist of?
As you study Ruby, the question of creating your own program or series of programs based on your ideas will keep cropping up. This is necessary for the following reasons.
Firstly, any program usually concerns some business problem. Programmers are paid money to optimize business processes, simplify real life and save the time that people spend on all sorts of actions. For example, imagine a queue in some state institution in 1986. Many people have gathered in the waiting room and are waiting their turn. And now imagine that there is a programmer who has written an “electronic queue” program. Anyone can sign up to be seen, and come precisely at the appointed time. He or she could use the time that would have been wasted in the queue, e.g. teaching a math lesson to school-kids.
The economic benefit is obvious. Time that would have been spent in the queue can now be put to good use. And all because a useful website has been created. It is the same with your knowledge. Knowledge of any subject field is a valuable asset in itself. Try to see your advantage, think in what way you can improve the world. Its a good thing to have several ideas written down on paper. As you work with this book, you can come back to it and ask yourself: Could I do this with Ruby?
Secondly, by using your advantage in a particular field, you can create a program simply to demonstrate your knowledge. Even the simplest program written by a professional musician will delight programmers of great experience, which musicians are not.
Dont throw your programs away, even the most naïve of them can be improved later. They will also come in handy when you are looking for work. It is far better to have some code sample available than not to have one. Your programs may seem insignificant, but in getting a job it is not one isolated program that matters, but the combination of everything you have demonstrated: a knowledge of programming, programs you have written, your resume, domain knowledge, an active GitHub account and an active blog about programming.
Thirdly, if you are not working on your project, your success will depend on chance, It is hard to predict in just what group you will end up or what software quality standards there will be in your company. People are naturally hopeful about the future, but experience shows that in real life, everything is somewhat different, and success often depends on chance.
Its a pity to find yourself in a company with bureaucratic complexities or working in a group of people with low technical qualifications. Furthermore, the newbie programmer may not even recognize these signs, and consequently can suffer depression and disappointment in his or her chosen profession. But in fact programming should give you satisfaction. And your own project is your landmark, an indicator of your level of improvement and insurance against bad luck.
In any difficult situation in your new work, you can say to yourself: “_Yes, maybe Im not very productive in this job, but here is my project and here is a demonstration of my technical qualifications. So the problem is most likely not in me but in something else._” Furthermore, this argument can always be used for a dialog with your manager, and the project itself can be added to your resume. Your project depends only on you, and there is a better-than-zero probability that one day your own project will start bringing in money for you.
X> ## Do this
X> Keep an ideas notebook. Write in it absolutely all the ideas that come into your head. You may return to them a week, a month or a year later.

13
manuscript/008.txt Normal file
View file

@ -0,0 +1,13 @@
# Part I. First steps
## Runtime environment
Runtime environment is an important concept. The concept of “environment” itself will be introduced later, but its not the same thing. Runtime environment is where and “by whom” your programs will be launched in Ruby. Lets say a qualified chemist conducts an experiment in a test tube, a big glass jar and even his or her own bath. It can be used by any “interpreter” (program-launching program) in Windows, Mac and Linux.
When the author first started with a computer, there was only one runtime environment, because there was no choice. When the computer was switched on, a cursor and the letters “OK” came on, meaning a program could be loaded. Now computers have become more intelligent, and a newbie also has to understand how to launch a program, where to enter the program text, “with what” to launch the written program and which runtime environment is best.
In fact. it is not particularly important to us which actual program the system is launched in. These days a program written in any of the popular programming languages can be launched in three OS: Windows, MacOS and Linux. Usually no changes are required in the program itself. If there are, they are minimal.
Statistics on the use of operating systems shows that the most popular one today is Windows. So we will begin with Windows, although it is not the best choice. The reason we decided to do this is to get us as quickly as possible into the run of things, so that any starting programmer can write a required program as quickly as possible. After all, setting up the runtime environment is not usually a very simple matter for beginners, and its apparent complexity may scare off a student at the first stage.
In spite of the fact that we shall begin by launching our programs in the Windows OS, we advise strongly against using the Windows for _launching programs_ in Ruby, However, if you like, this OS can be used for _writing programs_. In any case, the authors recommend installing Linux as soon as possible (the _Linux Mint Cinnamon_ edition, as the simplest installation medium), and using it. If you use Mac, there is no need to install Linux.