Release 0.6

In my previous blog post, I promised to be back with another pull request for the translation of Reactjs.org into Hindi. Good news is that I did manage to get another pull request done, but bad news is that my previous pull request has not yet been merged – something that I was eagerly looking forward to.

I managed to get the maintainers to agree that I am comfortable with working on translating multiple pages and I would be happy to do another page. Due to my good work and prompt responses in my previous pull request, they assigned me another page.

r6d

r6e

This time I did not make the mistake of translating a lengthy page, since I know it is going to take ages for the maintainers to review and merge it.

So I took on the task of translating one of the API reference pages – ReactDOM.

The react-dom package provides DOM-specific methods that can be used at the top level of your app and as an escape hatch to get outside of the React model if you need to. Most components do not use this module, which made me curious to learn how I could incorporate it into making simple React apps.

This page describes five functions of the React-dom package.

r6c

I found that translating this page had gotten alot easier since the previous. With this page, I exactly knew what the maintainers were looking for, what words needed to be kept in English and what needed to be translated into Hindi but with the English word and knowing what tense the documents should be in.

I did learn quite a few things that I had never used with react before since these functions are rarely used in the making of react apps.

Issue link: https://github.com/reactjs/hi.reactjs.org/issues/1

PR link: https://github.com/reactjs/hi.reactjs.org/pull/31

Preview: https://deploy-preview-31–hi-reactjs.netlify.com/docs/react-dom.html

Conclusion:

Translating reactjs.org into Hindi is a huge plus point for the Hindi speaking community in India and being able to contribute to this feels like a good deed done. The maintainers are slow or else this would have been translated a long time ago. Translating React into Hindi would mean, schools and colleges in India with a Hindi base, incorporating this into their curriculum since not many important documents like visual studio or android has been translated.

This Release is the last one for this course, but I am looking forward to contributing to this repository till it is entirely translated.

 

Advertisements

Release 0.5

Release 0.5 is a continuation of Release 0.4. The pull request to Release 0.4 is not yet merged due to so many stages of review it needs to go through. The second review of the merge is going on quiet slow.

r6.

This entire week, has been about reviewing my translations and also reviewing the translations done by the maintainers since many of their suggestions do not seem right.

Since the page that I chose to translate has 7 parts and is longer compared to the other pages, the maintainers are being too specific about it.

r6b

 

 

r6a

As you can notice in the above images that this particular pull request has 174 conversations with the maintainers and 24 commits all done by me.

Localisations need a lot of patience. I chose to do a harder page to translate since there was something more to learn about in React and it would make a more heavier pull request.

For Release 0.6, I have been trying to get the maintainers to assign me another page even though the first page has not been merged.

This is all for Release 0.5, I hope to come back with another translated page for Release 0.6.

 

My Journey through Open Source

My experience with open source has been a roller coaster ride since last semester. It has been such a wonderful and learning experience by connecting with people from all around the globe on this platform.

The Beginning:

I am grateful for taking this course last semester. Before this I was on the side of seeking help from open source, but now I have the opportunity to actually contribute and give back to this community. The highlight of OSD600 was the Hactoberfest, which was making 5 pull requests for a T-shirt. For OSD600, I tried different aspects of programming like  javascript, testing, localisation and making small fixes in different projects. I chose to take OSD700 since I wanted to learn more about open source and contributing to different projects.

sm6

The Journey:

This semester, I started of by contributing towards react documentation. The issue I worked on was researching and adding more details about Shallow Renderer. It was fun since I got to refresh my memory on React and I learnt a little bit of Enzyme. The pull request was not merged since it was not what they needed but I was a good learning experience.

sm5

 

For my second release, I switched to Android development since I had just started learning about it. It was really interesting and I wanted to explore more about it. I worked on a simple issue in the Project called Simple Calendar in the XML file, and instead of getting feedback from the maintainer, I was just closed off. Release 0.2 was a bad experience with maintainers but a good learning experience with Android. Simple Calendar is an awesome android project in Kotlin that can be played around to explore more about android, but sadly the maintainer is not open to suggestions.

sm1

For my third release, I moved on to a different android project called Minimal-To-Do. In this project I fixed two issues. Since it is a simple project there are a lot of errors and it was interesting to find out these errors and work on them. I fixed errors in the layout of the application with the android keyboard. It is a good project to work on but there has been no activity by the maintainer since February.

sm3

For my fourth release, I was back with react, but this time it was localisation of React. My decision to translate the reactjs.org page into Hindi has been the best decision so far I have made in this course. This repo is slow but the maintainers are very interactive and very supportive. In the first release itself, I translated an entire page. From this experience I learnt that localisation is not as easy as I thought it was. It needs alot of patience and time specially when some one else reviews the translations I have made.

sm4

For my fifth and sixth releases, I have been contributing to the same project and enjoy the experience. There is so much to learn with react since it is something that is so important with web development, and translating the documentation line by line helps you learn about react and build you skills in programming in that language.

Conclusion:

I had planned to contribute to Angular, vscode and React in the very beginning but things did not go according to plan. I started with React, drifted off to Android development and then back with react again. It was a really good learning experience. My classmates and professor played an important role in this class, as with the help of their feedback and suggestions, I was able to better my skills in programming and presenting step by step throughout this semester.

 

 

Localisation

For Release 0.4, I wanted do something different and get into a repository that is more interactive than the other ones that I contributed to in the past.

I was introduced to the translation of reactjs.org into different languages by a classmate – Is React translated yet? I found it very interesting as react is being translated into 42 different languages. Out of these 42 languages I know 3 languages – Hindi, Bengali and Gujarati. I chose to go with translating reactjs.org into Hindi since this repository is more interactive with really good maintainers.

Building React in Hindi was easy since I had already done it before in English. You need to install yarn and run command “yarn dev.” Open up react hindi on your localhost.

r4i

Issue

I observed the hindi repository for a few days to see how the maintainers of this repo were. They followed rules strictly and only gave second pages to translators if their first page was merged. The work is slow but the level and quality of translation is high.

I picked “Style and Lifecycle” to translate into Hindi. I wanted to go in order instead of choosing randomly and I thought why not learn something new about react.

I requested this issue and had an immediate response from the maintainers. After assigning me this issue, I could not start on it for a couple of days but the maintainers were concerned on the progress made which shows their interest in their work.

r4b

Issue Link: https://github.com/reactjs/hi.reactjs.org/issues/1

Pull Request

I was able to translate the entire page in three to four hours. I do have experience typing in Hindi when I was in high school. I did some programming too in Hindi but it was a long time ago. So actually getting a hang of typing in Hindi all over again was interesting. It brought back a lot of memories of home and school.

I had made the pull request in the morning and by the end of the day the maintainers had responded to correct certain errors. I like the way the maintainers work. It is organised and specific, which makes it easier for me to correct my errors. Each line is checked for errors and it is done in sections.

r4d

PR link: https://github.com/reactjs/hi.reactjs.org/pull/26

Conclusion

Once this page is merged I can work on another page and keep contributing to this repository. Localisation is not easy. I thought I could finish four pages in a day but it takes a lot of time and effort to translate each word correctly into a different language. This issue not only enhanced my skills to program in Hindi but also taught me new things about React.

I plan to keep working in this for the rest of the semester.

Release 0.3

For Release 0.3 I chose to work on a different android project called Minimal-To-Do.

This application reminds you to do tasks on a daily basis. It’s a basic project so there is a lot of scope to fix errors and update features. This project was active till December with the owner merging some pull requests. But after that there is no sign of the owner on any of the issues or pull requests. But issues are still being filed and pull requests being made.

Setting Up

To set up the project on android studio I had to simply add the repository url from github through version control and it sets up on its own.

3b

The Issue

Issue 1https://github.com/avjinder/Minimal-Todo/issues/115

r3a

So in this issue when the android keyboard is activated, the reminder text is hidden and it looks clumsy.

To fix this I made a few changes to the AndroidManifest.xml.

3a

This attribute resizes the layout and brings the editable text into focus.

r3d

PR link: https://github.com/avjinder/Minimal-Todo/pull/123

 

Issue 2https://github.com/avjinder/Minimal-Todo/issues/39

r3c

For this issue when you add tasks it does not sort them in any way i.e alphabetically or by date.

To solve this I used  “Collections.sort” in android studio java to sort it alphabetically. This issue is still underway as the app keeps crashing after opening it the second time.

r3b

Status Update

For the next release I will be working on this issue I found while doing my Release 0.3.

WhatsApp Image 2019-03-08 at 3.13.12 PM

As you can see, the time in the screenshot is 3:12pm 8th March but when I try to put in a reminder for 5pm 8th March, it gives me the error “The date you have entered is in the past” which is not true.

For next week, I will complete the second issue and third one.

 

Kotlin Vs Java in Android

I started learning Android development with Java and XML as Java is the official language for android development. But in the recent years it has come to light that Java isn’t the only language for Android development. Kotlin, which was launched in 2016, has now become the official language for Android development.

In this blog post I am going to talk about differences between Kotlin and Java and the disadvantages associated with it.

What is Kotlin?

Kotlin is a general purpose, open source, statically typed “pragmatic” programming language for the JVM and Android that combines object-oriented and functional programming features. Kotlin originated at JetBrains, the company behind IntelliJ IDEA, in 2010, and has been open source since 2012.

Kotlin vs Java

Alot of apps are still built in Java since Kotlin was introduced recently. There has been a lot of hype about Kotlin so let us go through the advantages of Kotlin over Java.

  1.  It is synonymous with Java.

One of the strong points of Kotlin is, it can exists in the same project with Java. You can have a part of your code in Java and a part of your code in Kotlin and the project would run perfectly.

kot1

With this advantage you can even use most of the Java libraries and frameworks in your Kotlin projects.

2. More Functionality, Less Code

Kotlin is very concise in its code. You can put in a lot of functionality with few lines of code as compared to Java.

kot2

Above is a usual Java class. It doesn’t do much. It just contains some data. But as you can see the code just to contain data is so large. Where as on the other hand, Kotlin, for that same code is just five lines of code.  Kotlin automatically has getterssettersequals()hashcode(),toString() and copy() functions for your data class.

3. No more view binding.

In java we use findviewbyId() to locate ID’s from the xml file. In Kotlin, viewing an ID becomes easier and concise.

kot3

Why Kotlin does not appeal to me!

Kotlin may claim to be easier and more concise than Java but it confuses a lot of users. It reduces so much that it is confusing to understand where half of the functionality has gone from the code, even though it produces the desired result. Java may be more verbose, but the upside is that everything is clearly spelled out, which means unfamiliar Java code tends to be easier to decipher than unfamiliar Kotlin.

As a new Kotlin programmer, I tend to look for more documents online based on Kotlin to help me understand functionality better. Since Kotlin is relatively new, there are hardly any support documents online.

 

Release 0.2

For Release 0.1, I did some documentation on react. It was good but I was not satisfied with my work. I felt it was too less or that I was in the wrong place. So I switched to Android Development.

I was introduced to Android development at the beginning of this year through the course MAP524. I took an immediate interest in the course and decided to work on the same for OSD700 with a little encouragement from my professor.

The project I chose to work on is Simple Calendar from Simple Mobile Tools.

Simple Mobile Tools have a number of simple mobile apps like Simple Gallery, Simple Contacts, Simple Notes and Simple File Manager. As an android user, I already have apps like these pre-installed on my device. These apps need permissions to access files from my device and come with a lot of disturbances like advertisements.

The creator of Simple Mobile tools did a great job in building these convenient apps for users like me. Simple and efficient.

But there are always bugs to fix even if a projects seems done. I chose to go through some of the bugs on Simple Calendar.

Building Simple Calendar

The issue about this project is there are no contributing guide lines and the README file is just a description of the app with its licence. After cloning the folder I tried to open it on Android studio using Version Control (git) since that is the general way of importing files from github to Android Studio. It failed to build.

All it took me to make it work was to add a file named keystore.properties .

storePassword=123456
keyPassword=abcdef
keyAlias=myAlias
storeFile="../keystore.jks"

I added this to the file and the build finally worked.

The Issue

With the way the create event page is formatted, event type is listed right at the bottom of the page, where you need to scroll down to the page to find it. ->

Original

Even on the README page, you do not see the Event type.

sc

The issue was to give event type a more prominent place at the side of the event title.

Issue Link – https://github.com/SimpleMobileTools/Simple-Calendar/issues/659

Pull Request

I chose to work on this issue since it was more of designing the application. This project is based on Kotlin and I have only learnt Android development with Java and Xml.

This issue helped me get a better understanding of the app and the way it is programmed in Kotlin. To bring the Event type color at the side of the Event title, I designed it with a Relative layout below Event title, Edit Text.

sc1WhatsApp Image 2019-02-08 at 11.30.08 AM (1)

This is a preview  ->

Redesigned

PR link – https://github.com/SimpleMobileTools/Simple-Calendar/pull/777

Conclusion

After working on it, I created the pull request and I was happy with it. But the owner did not like it and closed the issue. It was quite a disappointment for me. The problem with this repository is, people file issues, the owner labels them as a “bug” or “feature request” and when some tries to work on the issue he says he isn’t interested in this feature. Most of the bugs that were filed, I tested it out and it wasn’t a even bug.

This maybe a disappointment, so the next time I am here I will have more experience and knowledge about Kotlin so that I can work on some in depth issues.