Thursday, March 30, 2023

My notes on "The art of being" by Erich Fromm

Below I'm going to write some notes on "The art of being" by Erich Fromm.

30.03.2023, Thu, 11pm. 

Istanbul, Turkey.

by Tirkish Baymyradov.

- Today, by and large, individual narcissism is simply being strengthened and the inability to reason and to love (which, according to Fromm, are characteristics of an orientation toward being) entrenched, as techniques of self-awareness offer new crutches of orientation toward having. [from Foreword]

- In the end, a person orients his life either toward having or toward being. [from Foreword]

- All that matters to us is that we have esteem, a certain image, health, beauty, or youth, and when this is no longer possible, then we at least want to have "experience" or "memories." [from Foreword]

- Convictions of a political, ideological, and religious nature can also be acquired as possessions and staunchly defended - to the point of bloodshed. [from Foreword]

- Yet each person can quickly test himself or herself by asking what he or she finds particularly valuable, thereby getting an idea of what would happen if he or she were to lose what was important and valuable: whether he or she would lose the ground from under his or her feet and whether life would then become meaningless. [from Foreword]

- He or she is himself or herself only insofar as that person has something. [from Foreword]

- Orientation toward being always means that one's purpose in life is oriented toward one's own psychic forces. [from Foreword]

Foreword by Rainer Funk, 1992, Tübingen, Germany.

 

The Art of Being by Erich Fromm

1. On the Art of Being. (pages 1-9)

-----

    Just my ideas and criticism. Both in English and Turkish. 05 Apr 2023, 06:51 am, Istanbul

    As far as I understand Fromm criticises owning. But what he doesn't know is that without owning we wouldn't have this level of knowledge. For example, if I hadn't owned an iPad then I wouldn't have read his book. His book reaches multitude thanks to materialism. Without the internet or technological devices present today his book wouldn't have reached the fame it has today. I read it from Internet archive of e-books on archive.org; somebody built the website for sharing, somebody scanned the book and uploaded it there, and somebody (me, e.g.) read it online. And tonight we are going to discuss that book with my friends on the internet, via zoom meeting. Last week my friend called and informed of book reading group that was going to be established anew. As you see all these things are thanks to the developed society. 

    The author idolises the primitive hunter-gatherers but he forgets that even though the gatherers were active in production they wouldn't be able to think this far in terms of intelligence or analysis. Yes, they were pretty good observers, they had common sense much better than us, they were active and developed in most areas, not like us, focused on the sole or a few areas. But to indulge in the faculties takes some price. 

    What comes to your mind when you are asked of the first civilisation? Most would think of ancient Greece. They gave themselves on philosophy and science because of excessive materialism. They were built after the small tribes. In small tribes you have what you need, I mean basic needs, no more. As tribes grew, they needed leaders; as it grew more, they needed people for other areas like defense, health, belief (e.g. church) and so on. They appointed people there and fed them. Thus started a central kingdoms; all the excess materials gathered in the centre - in king, for instance. It created cities, cities created idle thinkers, idle thinkers created science and philosophy, and that created Erich Fromm, and he created "the Art of being." You see, we need a lot of things to arrive to that book. 

    I agree with Mr Fromm when he says that children and wives were also property in the past and they are not now, at least to certain degree. That knowledge is surprising. He also claims that production line has alienated the workers. Worker thinks that he created a car but in fact he just did a small part in the production of that car. He didn't achieve something great. It is all fake in modern workforce because you are never (or at least hardly ever) involved in the production of a total thing from beginning to the end. I guess the author claims we need to produce a thing compact in order to satisfy our being. Otherwise we are incomplete. And he is right. 

    Fromm claims that one should not be naive. I was one in the past and I can relate to that. I used to believe that all people are nice until vice versa is experienced. Erich says that is a bad idea; he writes that one should be aware of bad people; and he provides examples of Gandhi, Jesus Christ and many more martyrs of the knowledge against ignorance. I experienced this first hand; it is much better if you know it beforehand and act accordingly. The world is not a nice place!

     He claims there is arrogance under extreme modesty; one hides his arrogance under the mask of modesty. He says that people act humble in order to attract others' attention and gain their respect to oneself. The opposing characters are hidden under the mask he says. Cowardice under the bravery (I made it up), arrogance under the modesty, narcissism under altruism, maybe ignorance under the knowledge, avarice under generosity and so on. 

    He opposes the owning, possession if it is not necessary. The cars, not necessary for him. I disagree, it is good to have in modern world. I agree with him that people just want own everything because of greed, because of the fake ads. Freud and the author claim that to own everything is an psychic illness. Babies want to own at the beginning; and if they continue to do so in their adulthood then they haven't matured. Also, the feces are likened to gold. Many mythological examples are provided.  

    After all, book is both easy and difficult at the same time. Easy because you feel as if you are having a conversation with the author. Difficult because you need understand some concepts described there.  

05 Apr 2023, 07:26 am, Istanbul.

Monday, March 13, 2023

Codeforces Round 379 (Div. 2) - 734 A. Anton and Danik solution

 Codeforces Round 379 (Div. 2) - 734 A. Anton and Danik solution

 

  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main() {
  5. #ifndef ONLINE_JUDGE
  6. freopen("input.txt", "r", stdin);
  7. freopen("output.txt", "w", stdout);
  8. #endif
  9. int n, anton=0, danik=0;
  10. char c;
  11. scanf("%d", &n);
  12. do {
  13. scanf("%c", &c);
  14. if(c=='A') anton++;
  15. else if(c=='D') danik++;
  16. } while(n--);
  17. if(anton<danik) printf("Danik\n");
  18. else if(danik<anton) printf("Anton\n");
  19. else printf("Friendship\n");
  20. //printf("Anton: %d, and Danik:%d.\n", anton, danik);
  21. return 0;
  22. }

 



Sunday, March 12, 2023

Codeforces Beta Round 55 (Div. 2) - 59 A. Word solution

 

Codeforces Beta Round 55 (Div. 2) - 59 A. Word solution

  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <ctype.h>
  4.  
  5. int main() {
  6. #ifndef ONLINE_JUDGE
  7. freopen("input.txt", "r", stdin);
  8. freopen("output.txt", "w", stdout);
  9. #endif
  10. char s[101];
  11. scanf("%s", s);
  12. int upL=0, lowL=0;
  13. for(int i=0; i<strlen(s); i++) {
  14. //check how many uppercase letters
  15. if(isupper(s[i])!=0) upL++;
  16. //isupper() function of ctype.h checks whether the char ->
  17. //-> is a upper (or capital) letter, returns true ->
  18. //-> if it is upper letter. returns 0 if not
  19. } //check how many uppercase letters, for loop ends here
  20. for(int i=0; i<strlen(s); i++) {
  21. //check how many lower letters
  22. if(islower(s[i])!=0) lowL++;
  23. } //lower letter check loop ends here
  24. if(lowL<upL) { //checking if lower letter is less than upper letter
  25. for(int i=0; i<strlen(s); i++) {
  26. //if so then we need to convert all chars in string to uppercase
  27. s[i]=toupper(s[i]);
  28. //that is achieved by toupper() of ctype.h
  29. //basically we pass through all chars in a string
  30. //and convert them to upper letter
  31. }
  32. }
  33. else { //if lower letters are equal to or more than upper letters
  34. for(int i=0; i<strlen(s); i++) {
  35. s[i]=tolower(s[i]);
  36. //similar to toupper(). tolower() function of ctype.h helps us
  37. //to lowerletter all chars of a string
  38. }
  39. }
  40. printf("%s\n", s);
  41. //printf("up letter is %d\n", upL);
  42. //printf("low letter is %d\n", lowL);
  43. return 0;
  44. }

all necessary information is provided in the code. thanks




Codeforces Round 340 (Div. 2) - 617 A. Elephant solution

Codeforces Round 340 (Div. 2) - 617 A. Elephant solution

I tried to solve it via ceil() funtion in math.h but it gave errors. 

The easiest way to get the least amount of steps is to have the largest number, 5 here, as many times as possible. And then you cover the remaining part with other numbers once. For instance, let's assume input is 14; you need two 5 and one 4; or 27, you need five 5 and one 2; and so on. 

If entered number is divisible by 5, meaning mod 5 is 0, then just divide it by 5 to get the number of the steps. If its mod 5 is not equal to 0 then divide the number by 5 and 1 so as to floor it up, or ceil up, or round up. 

I wish we could use ceil() function. 

Write your comments below. 

Thanks. Good luck! 

  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main() {
  5. #ifndef ONLINE_JUDGE
  6. freopen("input.txt", "r", stdin);
  7. freopen("output.txt", "w", stdout);
  8. #endif
  9. int a;
  10. scanf("%d", &a);
  11. if(a%5!=0) printf("%d\n", a/5+1);
  12. else printf("%d\n", a/5);
  13. return 0;

Codeforces Round 405 (rated, Div. 2, based on VK Cup 2017 Round 1) - 791 A Bear and Big Brother solution

After years, maybe 9 or 10, of being away from competitive programming, I'm finally back, and glad :)

I love competitive programming. I missed it. I missed those days in 2013 and 2014 when I would be listening to music in the background and would be coding. Finally, I'm back. This time I think I have brought with me the different skill set: Linux and Emacs. 

Anyway, let's get to the business. This is the solution for Codeforces Round 405 (rated, Div. 2, based on VK Cup 2017 Round 1) - 791 A Bear and Big Brother. 


  1. #include <stdio.h>
  2.  
  3. int main() {
  4. #ifndef ONLINE_JUDGE
  5. freopen("input.txt", "r", stdin);
  6. freopen("output.txt", "w", stdout);
  7. #endif
  8.  
  9. int a, b, c=0;
  10. scanf("%d %d", &a, &b);
  11. while(a<=b) {
  12. a=a*3, b=b*2, c++;
  13. }
  14. printf("%d\n", c);
  15. return 0;
  16. }

Tuesday, February 7, 2023

Solution for Robozzle puzzle no 291 - Huh? part 2

I want to solve Robozzle puzzle number 291 - Huh? Part 2.

You can see it raw in the image below. You need to collect the stars without falling out of the given grid. You are the rocket on top-left corner of the grid; starting point is red cell here.

Robozzle 291 raw

You give certain commands to the rocket and it obeys them. The less command, the better. Commands for this puzzle are shown below.

Robozzle 291 given commands

Commands are displayed on right side. From top to down they are: go straight, turn left, turn right; call F1 function, call F2 function, call F3 function; change colour of the current cell to green, change colour of the current cell to blue; execute this command no matter what the colour of cell is, execute this command in red cell, execute this command in green cell and execute this command in blue cell.

Each time it starts with F1 function. If you don't call F2 function in F1 then it will not execute commands in F2. Same applies for F3; if you don't call it, it won't be executed.

Let me show you how to play this game in another easy puzzle.

robozzle stairs blank

This puzzle is called "Stairs." You can see the commands and given function on the bottom right corner again. They are blank. If I click on Go! nothing happens because there are no commands given in function.

Now, let's fill in the function with some necessary commands.

Robozzle Stairs with commands but no iteration or recursion

You can see where robot stays. It hasn't collected all the stars. Function was called but it was executed just once. Why? Because there is no iteration (or recursion) or repetition of commands.

Remember we need to collect all the stars, so let's call F1 function again at the end of commands so that it iterates (or recurses) or repeats itself.

stairs completed

The rocket has collected all the stars because F1 was called again at the end so that it repeatedly goes beginning when it finishes executing all the commands. At the bottom you can see what the next steps are such as turn left, go, turn right and F1. This was completed in 5 commands.

Now, hoping that you understood how to solve this puzzle I'm returning back to my puzzle in question; I was able to collect only one star in the centre (in green cell) by calling only 2 functions: F1 and F3. However, that's not enough to solve the puzzle. Remember, I needed to collect all the stars.

Robozzle 291 only green star collected

Now, with the image below, there is still no solution. It just does repetitious U-turn between the green cells in the centre. What I did was to turn right after red cell and colour the cell to green on the corner. I wanted to utilise those green cells on the corners when I return back from the star in the middle. I need to collect the star on the upper left corner also. But, it didn't work.

291 still no solution

There are a lot of possible solutions for this puzzle. One way is to collect the star behind the rocket (on the upper left corner) first and then collect the star in the middle. For this one you don't need to use colour changes as far as I know because I have read the comments in that website: comments for Robozzle 291.

And there is another solution: you collect the star in the middle and colouring the corners (or just the cell near the corner, like red one was) to utilise them when returning back. I thought about colouring the cell after you turn right, so that it acts as milestone when returning back. So that you turn left after green when returning back from the middle; as you did turn right after red when going forward to the middle. It is shown below.

291 green after turn

Still, I couldn't solve it. I have been dealing with this puzzle for more than 3 days and I think more than when a person spends more than a day or two is enough for asking help from others. There are a lot of solutions for these puzzles and they are fun. You can see my another question in this website where I got a lot of nice answers each of them being quite different: Shorter solution for Robozzle puzzle no 132 - Split. Thanks beforehand.

I asked this question in Puzzling website of Stack Exchange network: https://puzzling.stackexchange.com/q/119678/64563

Friday, January 27, 2023

Shorter solution for Robozzle puzzle no 132 - Split

I wonder a shorter solution for Robozzle puzzle number 132, "Split."

Puzzle is shown below. I have solved it but I'm wondering shorter solution for this and there many exist.

Basically, the rocket has to collect stars.

robozzle puzzle 132 "split" blank

You give certain commands to the rocket and it obeys them. The less command, the better. Commands for this puzzle are shown below.

Commands are displayed on bottom right corner. From top to down they are: go straight, turn left, turn right; execute F1 function, execute F2 function; execute this command no matter what the colour of cell is, execute this command in red cell and execute this command in green cell.

Each time it starts with F1 function. If you don't call F2 function in F1 then it will not execute commands in F2.

robozzle "split" with commands

Let me show you how to play this game in another easy puzzle.

robozzle stairs blank

This puzzle is called "Stairs." You can see the commands and given function on the bottom right corner again. They are blank. If I click on Go! nothing happens because there are no commands given in function.

Now, let's fill in the function with some necessary commands.

Robozzle Stairs with commands but no iteration or recursion

You can see where robot stays. It hasn't collected all the stars. Function was called but it was executed just once. Why? Because there is no iteration (or recursion) or repetition of commands.

Remember we need to collect all the stars, so let's call F1 function again at the end of commands so that it iterates (or recurses) or repeats itself.

stairs completed

The rocket has collected all the stars because F1 was called again at the end so that it repeatedly goes beginning when it finishes executing all the commands. At the bottom you can see what the next steps are such as turn left, go, turn right and F1. This was completed in 5 commands (or steps).

Now, hoping that you understood the fundamentals of this puzzle let me show you my longer solution for Robozzle puzzle number 132 - "Stairs". It contains 11 commands (or steps).

Split long solution

I screenshot it during the execution of commands so that you can see the upcoming steps (or commands) on bottom command line. I directly called F2 because F1 was very short. In F2 I turned 180 degree back, stepped forward, turned 180 degree back again, and stepped forward twice. I repeated these steps as long as the cells were blue. After blue cells I put turn right on green and go straight on any colour.

Basically, I stepped back once and stepped forward twice. Repeated this action (or recalled F2) as long as the rocket was in blue cells. Since there were a lot of blue cells, the F2 called itself again and again postponing the commands (or steps) I entered after F2 there: turn right on green and go straight on any colour. As far as I know this is called "stacks" (or "stacking") in programming. You can see them piled up on the command line at the bottom of the image. When the rocket arrives at the green cell it gives up calling F2 and executes the stack or piled steps after F2: it turns right on the green cell and goes straight. It ignores turn right on green afterwards. Why? Because there are no green cells except the corner.

My solution contains 11 commands (or steps). I'm looking for a shorter solution for this Robozzle "Split" puzzle: http://www.robozzle.com/js/play.aspx?puzzle=132.

There exist 7 command (or 7 step) solution.

Thanks for your time and efforts beforehand!

 I asked this question Puzzling Stack Exchange website: https://puzzling.stackexchange.com/questions/119505/shorter-solution-for-robozzle-puzzle-no-132-split