Sunday, November 27, 2016

First week in Hampi

On the bus
We have a left Goa, Renana and I are on the way east to Hampi. We planned to go southward to Gokarna, as it should be very beautiful and quiet, but instead we have decided in the last minute that it is time for Hampi.

Every person we asked about Hampi didn't say much, but their dreamy eyes said enough. Hampi is also one of the reasons why I came to India. My brother stayed there for a long time, and his stories always made me want to go there. He told me about Yoga and Rock climbing and it sounded amazing.

After looking for information about the way to Hampi all over the Internet (ok, all over Google) we decided to let go and find our way. I'll try to break it down, so the following generations will be able to find it.

We started by going to Arambol’s bus station. These days it is by the HDFC bank, but just ask about it and people will help you.

From Arambol we took a bus to Mapusa, about 30 minutes. From Mapusa we've taken another 30 minutes' bus to Punjab. Now we're on the bus to Dharwad. We wanted to take a bus to Hubli (or Hubballi) because we know it's a main city on the road to Hampi, but the driver misled us and told us this is the right bus, only after he started driving he said we need to take another bus from Dharwad.

I'll update this after we finish the trip and know the way :-)

We spent a week in Goa, and we stayed only in Arambol. It's a big beach, with many restaurants and guesthouses (and more on the way). I could stay there for a longer time, but since we already left I can tell you that I'm not a beach person. Humidity, sand and salt are not my favorites :)

We arrived in Dharwad and immediately took the bus to Hubli. The bus arrived in Hubli by night time, and we decided to sleep in a hotel there and continue in the morning. We didn't find a good hotel, every one of them was expensive and dirty, but we settled on something and went to sleep.

In the morning we took a bus to Hospet and from there another bus to Hampi.

As much as the road was long and we had to sleep in a dirty hotel, I really enjoyed the way. I didn't feel the hours (about 7 hours on the first day and 5 hours the second one), they passed really quickly. I saw beautiful scenery on the way (no pictures, sorry, we were too focused on the view). I would prefer this road every time versus taking a tourist bus (which always go at night).

So we have arrived to Hampi. I'm writing this passage on Friday, after being 5 days here. And I can already see me staying here for a month. That is what we're planning to do. I'm planning to finish the FCC frontend certificate and start looking for a remote job. I figured that I should start by having something to show, so when I'll finish the certificate I'll start working on my own side project.

Every day I'm sitting for a few hours in the café with my laptop. Working on my blog and FCC. I actually feel like I'm putting more time on my blog than I want, although I don't post much. My day starts with some exercise, yoga, running or acrobalance. Afterwards we're having breakfast and I'm working on my laptop. Then we're taking a trip around.

One day Renana rented a motorbike and we went to a waterfall and a lake that were beautiful. We had to go to the lake as soon as we could because it's a dry season here. The lake gets lower every day because of the lack of rains and the use of its water for the local agriculture. Anyway, we arrived at the lake and it was amazing; you drive on a straight road seeing only glimpses of water hidden behind a wall and when you pass a curve in the road, you suddenly see the whole lake.


We stopped at some spot near the lake and went to watch the sunset. We don't have luck with sunsets and also this time we arrived when the sun had disappeared behind the mountain. But we stayed at the lake for an hour and enjoyed the view. Our bikes were left a few minutes' walk from where we sat and when we were back, we found out someone stole a bottle of gas we left in one of the bikes' trunk. Since there wasn't anything we could do we decided to continue and go back to our guesthouse.

It seemed like luck wasn't on our side and one of the bikes couldn't start. We started pushing it to the nearest village, depressing... After a few minutes three people riding a big bike stopped on our side to offer help. The first thing the driver said to Renana "I know you, you're from my guesthouse". It appears that he's the nephew of our landlord and he has a guesthouse by the lake that he's opening soon (The name of the guesthouse is "The Whispering Rocks". He was on his way to his place when he saw us and decided to help.

They checked the bike and decided we cannot run it. He told us to join the other bikes and they will push the bike. Before we understood what's happening, one of them went on the faulty bike and the others started riding by him, pushing him and helping him to speed. In a few seconds they were far away and we had to run after them. They continued pushing him this way all the way to our guesthouse where we took the bike and thanked them. Everything ended good and now we will remember this as a good experience. I'm really looking forward for him to open his place, so we can come and celebrate with him and offer our help.

Another day I woke up early and went for a run. As always, I let my feet decide where I go and they took me to a farm not far from the village. There was a gate blocking the way, but when asked, the gatekeeper agreed for me to go inside for a run. He explained to me that this is an Ashram, where people have meditation retreats. I ran around the farm, through the rice fields, and arrived to a beautiful river where I saw a group of people meditating on its shore.

My morning run  
Today we went to the other side of the river. We're staying on the Israeli side. It's actually full of tourists from all over the world but you can feel the Israeli vibe here. The main village is on the other side, but in addition to the village there are many temples. We had a short tour in some of the temples and after that we decided to climb up one of the hills. We saw on the hill top a small white temple and we decided to visit it. Climbing wasn't long and there were steps most of the way. And the view was AMAZING.

The hilltop

On the way down we took a different turn from the way up and ended on the other side of the hill. We did a long round tour and ended where we started. On the way, in the entrance of a temple we met this jewelry seller, Babu. He showed us some of his merchandise and told us about his village. He offered to give us a lesson in jewelry making which sounded very interesting, although I think my jewelry making abilities won't be very good.

When he heard we are hungry he offered us a Dhabha (Hindi for restaurant) close to where we sat. We went there and ate "Gobi Rice" as he recommended us to eat. It's fried rice with cauliflower – tasty. The restaurant workers and owner were very excited to have tourists at his place and made a very good meal for us. We will be back to the restaurant next week and I'll have a picture of the place for you.









Saturday, November 19, 2016

Queuing in India

8am - Sitting in front of a closed ATM, only two locals with me, the line will get longer as the opening hour gets closer.

Closed ATM in Arambol
There's a money crisis in India, PM Mudy and his government decided to cancel the 1000 and 500 bills because of fraud and their use in the black market. These bills are the most used in the Indian economy, and people are rushing to the banks. The ATMs are only dispensing 2000 rupees (about 100 or 20$) per a day per person.

As I write, more and more people are coming; I guess we will need to stand in line soon, even though none of us knows if there's a reason for standing.

We, as tourists, also have a problem. We rely on the ATMs, going once a week to withdraw money. Now we need to go every day, and I didn't withdraw once since it began a week ago. I thought it would end by now, so I borrowed some money from a friend and now both of us are in trouble.

For you there at home, don't worry. First there's nothing to do. Secondly we have more options. We eat in restaurants that take credit cards, so we pay some commission, but at least we eat :-)

8.30am - We're about 7 people here. I'm not sure who came for the bank and who came for the ATM. And I'm not sure that the ATM will even open. I decided to wait today until I know something.

We arrived to Goa two days ago, Arambol Beach.
I didn't write for a long time. A combination of no WiFi, tiredness from the driving and the situation and writers block. Fortunately, I need to wait, and I have figured out that I can write on my phone.

I wish I could understand what the people around me are saying. They're probably saying that the ATMs won't be open today.

The way to goa was amazing, putting the current situation aside.  We stayed in Udaipur for two days. It's a very beautiful city and I saw only a fraction of it. We went to see the palace gardens. You can go inside and pay more, but the entrance to the garden is only 30 rupees. It's a very nice building, and behind it we found a “bay” for boats.

You can take one for a ride in the lake and see the city from a different perspective. I guess we missed the last one, because nobody offered us the ride, so I don't know the prices. We even saw a simple boat, and people loading it with fruits and vegetables. Renana decided to offer them our help and to get a ride in return. But they didn't understand our English and were shocked when we started raising the sacks of fruits and loading the boat.

With that failed, we just went for a walk along the water and watch the sunset.

Udaipur
From Udaipur we continued south towards Mumbai. We didn't plan to do it in one day, so we stopped by night at a roadside hotel. We decided not to rush it and wake up when we wake up the next day. So I used this opportunity to wake up early and went for a short run.

I was feeling a little low when we arrived to Mumbai. The cancellation of the bills started at the day we left from Udaipur and you could feel it in the air. The toll booths on the way were packed, and there were huge traffic jams on the way because of that. People were confused about it, some took our old bills, some didn't. We had to pay with credit card for gas, and had to bargain our way to buy lunch and pay for the hotel.

In the end everything is OK, but the way is very consuming.

We stopped in Mumbai mostly to make arrangements. We went to the bank to replace our bills.

I suddenly realized that the ATM is probably empty, otherwise it would be opened, so I guess we have a long time to wait.

Didi and I went to the RTO (regional transport office) to take care of his car registration. We got only information about where he needs to go next time and what he needs, but that’s something.

On Friday night we sat with a friend I met in Leh; he showed us a tiny bit of town. We went for dinner and afterwards to a members' club and visited his house in Mumbai.

Ok, I lost count. There are tons of people here, the bank is supposed to be open in half an hour but nobody knows what about the ATM. Hoping for the best. I hope I won't need to push to get to my place in line.

On the next day we went for a walk and saw that there are slums 5 minutes from where we walked with him. Again the contrasts in India don't fail to surprise me.

Didi had friends that were planning to leave India on Thursday, so we decided to try to get to Goa in one day.

9.30am - I just figured out the ATM is not going to open soon, only the bank. I walked to a different ATM, hopefully this one will be active soon.

The queue in front of the bank
It was a long ride; we traveled with breaks for around 13 hours, but we did it. We saw some marvelous views on the way, but I can't stop feeling like we missed too much by skipping to Goa, and that we should have found a place to stop on the way. Some nice village or another beach.

10am - A policeman started making some order out here, and I see some people walking inside the bank, hopefully it's a good sign.

But since we already here there is no reason to feel anything other than enjoying the sea. We found a nice guest house on the beach, and we have a few friends here, a few friends are coming soon. Many nice restaurants, hopefully many who take cards.



10.15am - The Brinx car just came, it's a small minivan and a guy with a gun walks out of it with the money. I wish I had taken a picture. Hopefully a good sign.

11.15am - An hour later and the ATM is still inactive. There were some activities, like a guy opening the gate and walking inside trying to withdraw money, but it didn't work for him. Just a few minutes ago the bank guard came and looked inside.

Every time there's some action everyone in line is standing up, with hope in their eyes, but we’re still out of knowledge.

At least I can go and have a small samosa to eat. I love samosa.


11.30am - The Brinx van wasn't here to give money, only to take the old bills for burning. Nobody knows when the money will be here.

12.30pm - Rumors everywhere. A guy just said he heard they are going to fill the ATM where I was in the morning by 4 o'clock. I don't know if it's true, or if it means that this ATM is not going to be filled today.

13.53 - Another Brinx van just got here. This time it's money for sure. They are now filling the ATM. Finally!

This is the Brinx car!


14.24 Yeah! I have some money…


Thursday, November 17, 2016

JavaScript Calculator or how I try to learn

This post is not a tutorial, just a part of a series of posts about how I think when I try to solve challenges and learn as a programmer.

I decided it’s time to start writing about what I do programming wise. I worked for 3 years, until last August, in a small startup in Herzliya, and like many startups I can’t say too much about it. I worked as a full stack developer, working backend with C#, .NET and front with JavaScript, angular. It was a great experience, I even got the honor to write the first line of code in our solution and many more since. I started working with one guy, and when I left we were already a real company with CEO, CTO and a full team of developers and a QA team. Since I quit I heard the company is doing very well.

I didn’t become a nomad recently, it started a long time ago. I always liked to move around, and working in the company didn’t change that. I arrived to the office once or twice a week, and most of the work I did from home. A home which changed a lot in the last two years, a few months in Tel-Aviv, a few more in Rishpon, Beer-Sheva, and the last few months in Israel I lived in a farm in Gush-Etzion. The last few months I also spent studying in Beer-Sheva, working in Herzliya, staying at Renana’s house in Nitzan and living in the estate (the name we gave our farm). So life before the flight prepared me for this trip, and hopefully life.

But I didn’t want to give you my résumé, I wanted to talk about what I did since then. I started using freecodecamp.com for studying full stack development. Although I already have experience in that, I figured that doing a complete route will give me some insights and lots of experience. I’d actually like to get the backend certificate very much, but I really like to doing things by their order, and since the frontend certificate appears before the backend one, I want to finish this before. It’s also easier for me (although designing and CSS is not my strength) and I do learn a lot. I started building my projects using React and now I know a new framework (or library, depends on your definitions I guess).

I’m already on the last projects, and I have three more projects to finish the certificate. This week I finished the JavaScript Calculator project. I also started hosting my projects in GitHub instead of using CodePen.io, (learning git on the way). You can see the calculator on https://chiptus.github.io/fcc-projects/calculator/ — If you find any bug or if you have other feedback, tell me in the comments.

I want to say a few things regarding using GitHub and git vs. using CodePen.io. First, in CodePen you have three files, one file for each kind: JS, HTML, and CSS. It’s very good for prototyping and writing a simple page. But when your project starts being more complicated, which happens very fast, you’ll want to use git.

First you want to have its version control features, which many, many people praised before me, and if you’re not using them as a developer (either working alone or in a team), then now is the time. Start when you have small projects, I know it feels stupid, but when you understand it (and I still have much to learn) it is wonderful.

Secondly, when working with JavaScript, very fast you’ll want to use a bundler, work with modules and different transpilers. So you want to work with Webpack and npm, you want to add babel, maybe even use TypeScript. And although CodePen lets you use SCSS and Babel, it’s not enough. A simple web app can be a few hundred lines of code, and it can be very confusing to work with one file. On the other hand, building a new environment for each small project can be exhausting or even too much work sometimes, and for these cases CodePen is excellent.

So when you work with GitHub, you control the environment and together with GitHub pages (a feature GitHub gives you to host your own apps on their server — I might write a post about it soon) it’s much easier to work with their platform then with CodePen.io’s one.
So after praising git and GitHub, I want to go back to my calculator. As I said I’m not a designer, and you can see that my calculator is very similar to the one of windows 10. I used their design, and tried to make it work similarly to their calculator.

I used React for the project. React together with bootstrap for the design and I’m going to use font-awesome icons for the buttons’ icons. I’m using bootstrap and font-awesome because they make my life as a developer and not a designer easy. My CSS file is very thin, and I intend on it staying this way.

I chose React because I want to learn it, and in future versions, I might try using Redux or Mobx (which I always confuse with mbox). It’s a very nice experience to write React apps, and although I’m writing simple apps, I can understand the various talks about it simplicity vs. working with Angular 1.

So I started building my app, using some advice I got from the React documentation, and first built my static app, finishing its design as I like. This step you can do with CodePen, and if you didn’t create your Webpack environment, it might be a good idea. I used a pre-built one with Webpack, react, bootstrap, fa, babel (if you read my offline-npm post, I chose the copy paste solution for now, but had and succeeded using cache-min for bootstrap). Raising an environment seems a bit out of context, but there are many tutorials about it (and here is one!).

Ok so this is how I’ve started: bootstrap with the following static html:
Static html
My static calculator
As you see, it still doesn’t do anything, only for show.

And now it’s time to start dividing my app into components. I have the app component of course. As this is a very simple app, it is the only stateful component. All the other components are meant to be only dummy components, meaning they don’t change the state the app handles. The state is the result and a stack which will hold the history of operations, so that it can be displayed, and be calculated at the end.
App.jsx
Output.jsx
Buttons.jsx
The app component is divided into two sub components — output and buttons. I always try (also when using angular 1.5 components) to make my components self-descriptive, meaning that their name will explain what they do. That also means that if I have a complex component that isn’t self-descriptive, then I need to divide it. Actually, very much like using functions.

I can have a button component too, but it’s not so meaningful as it’s only a one liner and html has a button tag so it can be confusing.

That’s it — as you see React is very easy and simple to build a component based app, again as long as you don’t need state — but I still have nothing to show, and this version works exactly like the static one. In the next post I will do the harder part which is to put state into the app.
The beach where I sit while posting this
This post was originally posted on my blog: tdigitalnomad.blogspot.com

On the road - Pushkar to Udaipur - 6-7.11.2016

We just left Pushkar. We're leaving with the car which a friend, Didi, bought and we are heading south. Traveling with a private car is a very different experience from traveling by train or bus, that is what I can tell you after five minutes of being in this car. 


First, you are the master of the way. You can decide when to stop, where and for how long. We are not traveling by night, so we have a few hours of traveling every day (of course we're not waking up at 6 am). I like traveling during the day, because I can see the views India has to offer us. India's driving culture is completely different from what we know in Israel, and you need to feel comfortable enough with it to drive. Fortunately, Didi is this kind of driver. Renana wants to add, that driving the public transportation is very alienated from the street, big busses where you sit above the street or trains that hardly pass through town; a private car is part of the street. We just passed a long street in Ajmer that is full of cars, everyone honking and talking to each other, and we are a part of that. Didi has to push to get forward, needs to know when to honk.

Something which I do miss from driving by local bus is the people. I know I'm repeating myself, but Indians are very curious about tourists and when you walk the street or go up on a local bus, everyone starts to talk with you, asks questions, takes a selfie. It can be very exhausting but also very interesting. Everyone wants to know where I am from, what I do, and to see pictures of my family and Renana (if she's not with me). Most of the times they hardly speak English, and all they can ask is "which country?". But we try to understand each other, and we get to see the differences and, in my eyes even better, the similarities.


Didi is the driver, he bought the car in Parvati and traveled from there to Pushkar. He's a friend from where I live in Israel. Now we are going to Goa, and thinking of doing it slowly, maybe stop in interesting places on the way. (Ideas anyone?) Today we will sleep in Udaipur, stay there for a day or two and continue forward. Udaipur should be beautiful and I hope my hopes are not set too high. It's called The city of lakes, or the white city. 

Last week was the Diwali in India. I celebrated the first day in Jaisalmer and left to Jodhpur on the next day. I actually came there without much patience, because Renana and I were going to meet again in Pushkar on Thursday, so I mostly had that in my mind.  Jodphur was ok (for me), but that was mostly because I didn't prepare enough. Jodhpur is called the blue city and there is a part of the city which is blue, mostly the old city. I didn't know exactly where it was and I booked a hotel on the wrong side of town, thinking (by mistake) that all hotels were in the blue city. My hotel wasn't in the blue city, and I just thought that the small number of houses that were in blue were the reason for this name. 

Just a day before I left to Pushkar someone asked if I saw the blue city and then I realised my mistake. So I had a two days in Jodhpur as a tourist, went to Mehrangarh Fort and The Jaswant Thada mausoleum and to Umaid Bhavan Palace, and of course the blue city. What I really liked to do in Jodhpur was climbing up to the fort, and from there climb a bit more. There's a temple on the mountain peak, with a great view of the desert and the sunset. I went there every evening to see the sunset and think.


We arrived to Pushkar just a few days before the camel festival. It's a huge festival to which many camel owners come with their herds, to show and of course to sell. It's a big celebration, with four ferris wheels (I just learned this word :P). It also means that Pushkar is full of people and the guesthouses prices rise. Rise to a point that many Israelis including us are leaving. Pushkar is one of the tourist places in India that are full of Israelis, and even though I'm looking for quiet places I felt the need to visit it. It's one of the holy cities for Hindus and a site for pilgrimage. 

There's a big difference between how I feel that holy places should look and how the Hindus feel about it. You can see this contrast in Pushkar. The main site in Pushkar is its lake, with many pilgrims walking around the lake barefoot, bathing and having different Puja ceremonies. At the same time, the lake is very dirty and you see many cows, dogs and pigeons walk (or fly) around, doing their business everywhere and nobody cares. A few meters from the lake you find Pushkar's huge market. I grew up learning that holiness comes with cleanness and India surprised me in that aspect.

We slept in Pushkar for four days, one day to rest, and three days of shopping. I didn't see much of the city other than the market and the lake. The lake is very beautiful at first glance, and from far , because its shores are all built into big white steps that go into the lake. But as I mentioned, once you start walking on its shores you start seeing all the dirt and cow poo everywhere. 



Savitri Temple is recommended. It's situated on the hill top above Pushkar and you can walk all the way to the top or take the cable car. We took the cable car, it was 90 rupees both ways and very nice. The cable car stops for about 30 seconds while in air to let you enjoy the view, we weren't prepared so it was a bit alarming, but afterwards I saw the signs telling us about it and we relaxed and really enjoyed it. 


On the last two days we got to make many good friends in Pushkar, in a restaurant called The Koala. Great food, great deserts, magical lassi ;). I suggest Thali Pinukim – Pinukim is a Hebrew word meaning treats – and the portion is served in a thali dish with each part of the dish filled with ice cream or chocolate syrup and as chapatti you get very fluffy pancakes. You have to taste to know. We really enjoyed sitting there and came back more than one time. 
Will continue updating from the road. See you on the next post.

Wednesday, November 2, 2016

Tutorials - Doing them while offline


 
I'm in Jodhpur, Rajasthan, in the middle of a war. It's Diwali here; the holiday should represent the winning of light over darkness, but I guess the people are thinking the war is still going on.

My shelter is a room in a guesthouse without a name; it was just opened, but I think it has very good view of town. It sits on a cliff, very close to the fort  Mehrangarh Fort and Jaswant Thada. While hiding, my heart jumps with every boom, I thought of the subject for my next post. I have been doing a lot of programming tutorials in the past month, and most of the time I didn't have an internet connection.


This situation calls for a bit of preparation.

First, I need to choose the tutorials in which I am interested. Whether it's a blog I am reading, or post in Hashnode, or maybe some package documentation. Every tutorial that seems interesting to me, I try to save it as a PDF. Hashnode is gives some problems, but most blogs print well. And If I'm printing from GitHub, there's a site called gitprint.com – you can simply change the domain from github.com to gitprint.com. It prints GitHub documentation very well. If you can print it, you can print it to PDF. Chrome has this ability built-in, I don't know about other browsers, but if not, you can download Foxit and it will add a pdf printer to your printers.

After saving the tutorials as PDF, I try checking what online stuff every tutorial needs. First, download everything that is needed for this tutorial – e.g. npm packages, script files. Now if the app that we build using the tutorial needs to do some online requests (e.g. using some online API), we have two options. Wait to do the tutorial until I have any connection. Or try and figuring the scheme of the response, and make a small webserver that will handle our requests – but most of the time this is just too much work and I prefer to wait.

Of course, any tutorial stands by itself, and you need to figure out what to do. But these steps occur on most tutorials I do – print to pdf and download npm packages.

Short post for today,
Happy Diwali!