Posts

Showing posts with the label opensource

Seneca Digital Health Hackathon

Image
Seneca Digital Health Hackathon When I was preparing for the interviews I read many articles on how to answer one or another question. Of course, most of the answers have to be tailored to a specific job posting. One question that I was asked during one of my interviews was to tell about my hobbies. I never came across this question neither I thought this question was something that I could be asked. After my interview, I have looked into the potential answers for the software developer position. To my greatest surprise, I find very interesting hobbies such as teach coding classes, contribute to the Open Source community, and of course Hackathon. The last one was the most interesting to me. I decided that why can't Hacathon be my hobby either. A few weeks later my school friend mentions that there will be Seneca Digital Health Hackathon. That was an opportunity to try out my new hobby.  Days before Hackathon. I and my groupmates had to pick a challenge set that we will work on. Our...

Java Servlets and CORS

Image
Last few weeks, I was working on a project that required me to use Java Servlets. Servlet is a class that manages HTTP requests and responses. I ran into CORS  (Cross Origin Resourse Sharing) problem when I was working on the project. CORS allowed JavaScript applications to make AJAX requests to another domain when these domains are different. My backend where I use Java Servlets was working because I checked multiple times in the Postmaster. In the frontend, when I used fetch function I was not getting any data. Developer tools pointing to the CORS and Access Control Request Methods. Java Servlets are relatively new to me, and I need to research to make my application working. Here are the solutions that I found: 1. Implement Filter by creating a concrete class. Filter is invoked at the preprocessing and postprocessing of a request.  2. Add filter into web.xml file 3. Install the extension to the browser where we can add whitelisted websites in order to skip the CORS. The fir...

Java Console App with AWS and JDBC as a database connector

Image
Last week was very intense and full of new learnings. I had created a simple console bank application using Java. All my data stored in the cloud, and I used AWS. AWS database connected to Java through JDBC. It is the first time I use a cloud database in my Java application. It means that not all things run smoothly at first. In this post, I will discuss the problems I run into and their possible solutions. Problem 1.  Did you know that to run any app that has a connection to the database needs an environmental variable set up? And this has to be done for every class that has a main method.  Users can put this variable in the ConnectionFactory file and do not worry about the setting environmental variable, but one can ask how safe it is. This move is not safe if we need to store this program on Github. When I set up the remote database, I have to indicate URL, USER, and PASSWORD in the connection factory. Once the file is pushed to GitHub there is a sensitive information leak....

Final release - 1.0

It has been few days since I planned to write this post. It is very difficult to put all thoughts together. This is a final blog post for OSD700 and I wanted to make different than others. I have rewrite this post already for the third time and seriously I am just giving up. I read through others post to find some ideas and inspiration. How did I get to OSD600. My friend told me that this is a "nice to have" course. Why did she say that I don't know she never take this course herself. When I saw that requirements for this  is WEB422 and JAC444 I decide to give it a chance. Indeed that was only course that I was looking forward. Why? Well unfortunately I was not lucky enough to have good experience with web development. Since WEB222 I realize how much I don't like web development. I think it's related to the professor that teach me this course or may be I just was the one who prefer C/C++ (I know its sounds weird, but I always enjoy this weird old language). Ano...

Release 1.0 - Lazy Loading

Image
In this release I have covered one issue that add feature of Lazy Loading images of the blog post. It took me a little bit of time to add this feature and some help from my professor. What is lazy loading? When user open a website that consist of many big images and videos it will take some time to load all of them. This could be an issue because some users does not have time to wait until all media will be loaded and simply will just close the application. Luckily there is feature that allowed to load images while user scrolling through the web page. How do I know if my application uses lazy loading feature? That is not to hard to check. Here are steps: - Load web page - Open developer tools - Select network - Navigate to IMG Under the list of already load pictures (if any or all) there will be usages showing how much resources were used. If during scrolling the page the lower number of used resources is increasing once the image appear in the view its mean applica...

Release 0.9

Image
Last few weeks were pretty busy with studies. All school has moved online and students and professors had to adjust to a new way of study-teach workflow. For this release I was working on few front-end issues and I would like to share what experience did I gain while I was solving problems. My First Issue  was about making word Telescope in the top-left to go to home page.   At first when I look in this issue I did not know in what kind of problems I can run into. Seems it's only add link to the title  This is the only line of code I have to do for this issue. By doing this I have learn something new.  If I add <Link to='/'>{title} I assumed that {title} should still keep the style that was assign in the <Typography>  because I haven't specify any new className in the <Link> but the outcome was different than I expected From:   To: Uhhh...this is not look right due to our website design. So basically was g...

"Windows virus" or problems with Docker Toolbox

In this release I have worked on few front-end issues. But before I jump into describing what did I do and what new things I learned I would like to share my "experience" with Docker. Once Telescope launch Elastic search things start to become more and more interesting.  When I update my master branch I try as usual to run Telescope locally. I did my usual set of commands to run App and to add feeds on the page.  `npm run develop` in VSCode `npm start` (this I'll explain later) After that all problems begin. I realize I'm not the only one who has same problem.  So what was the problem? Me and my classmates call it "Windows virus".  What are the symptoms ? 1. Your machine has Windows 10 Home Edition version. 2. There are no Linux or Unix install as secondary Operating System on the machine 3. You have no other option but just Docker Toolbox installed. I heard many times that people complain about the Toolbox and how inconvenience it is, ...

Yesterday I had a hope... Or release 0.8

Image
It has been few days since I'm trying to put all the thoughts together. I think I'm finally ready. I'm writing this post in the time when the whole world going through the major tryouts. Despite that nobody cancel Open Source, moreover somebody find this time of self isolation as a time to contribute more to the Open Source Community. Last week I was working on few Telescope issues. I even find a time to submit one bug and review two pull request. A first issue I was working on was about link that overflow in mobile view. Actually as I discovered later that issue was as well on the desktop view. Interesting fact that not all links were overflowing so it was not easy to spot where the problem came from. In order to solve this problem I find interesting article about similar issues. First I will talk about possible solution and than about the one    picked. CSS has few solutions: ` overflow-wrap: break-word;` `word-wrap: break-word;` Both of those lines will brea...

Release 0.7

Image
Every week bring me close to the release 1.0. Do I feel excited? I don't know answer for this question because it's not just Release 1.0 but also the end of the course, the end of the semester and hopefully the end of school. All I know for sure 1.0 is not carry just one meaning for me. What did I do for Release 0.7. This time I had a chance to work on styling and get to know CSS a bit more than I knew before. My first issue was to fix look of our posts Issue #700 . The idea behind this issue is to make all posts have same fonts, sizes, line spacing, image size, etc. This issue was base on comparing our website to other websites that also focused on presenting articles. Medium , Longreads , The New Yorker ,  The New York Times  were analyse as an example to follow. While this sources provide good idea of what fonts for the title and post itself should be used, sizes spacing there were still other tags that need adjustment for Telescope . For example: <code> and ...

Release 0.6

Image
Going back to Telescope. Between release 0.5 and 0.6 I was working on the Telescope project. I was assign to few issues during the 2 weeks period.  My first issue was to add test to make sure our application starts. This issue reference to the page where possibly I can look for solution. Ideally issue -363 should solve: a) make sure that our app is working b) allowed to hit correct root. After reading examples and documentation I have learned that there is 'start-serve-and-test' npm package that starts server, waits for URL, then runs test command; when tests end, shuts down server.  How to use this package: Install this package  npm i  start-server-and-test Add command to the script. In my case Telescope already has command to start server and command for the tests. This way I just had to combine both commands into one that I named "CI" and add localhost.  Indeed this package did not solve the intention  of the issue I was working on....

Release 0.5 React Experimental continuation

Image
In this post I will continue to describe what I have done so far to complete my issue . This issue try to conquer problem of integrating React Experimental channel into the Gutenberg project. Steps that I have to do: 1. First I read through all the documentation about Experimental channel and what the ways to implemented. Experimental channel can only be implement on the projects that use React as external library. The reason is because if the project uses React for GUI and there is any bugs or features that can fail it can botched the front end. Gutenberg uses React as external library so that is why they try to see how Experimental will work on Gutenberg and on the other side to test new features. 2. Currently Gutenberg uses React 16.9.0. So after reading through the all documentation I updated version of the React on Gutenberg. Because Gutenberg uses React as an external library there are some changes to be done in the PHP. So here is my files with changes: Af...

Release 0.5. Integrating React Next into Gutenberg Project

Image
This is the first part of release 0.5 and in this post I will talk about steps that I will take in order to solve issue #18216  in Gutenberg Project .  What is issue about: Find a way to integrate React Prerelease channels into WordPress/Gutenberg . React Prerelease channels allows Projects that are not using React as a user-facing application test features that are might will be available in the next releases. By integrating React Prerelease channels into Project community will help in improving React while testing out new features. What needs to be done in Gutenberg : 1. Install Next or Experimental channels  (as I'm waiting for respond which channel I have to integrate Next or Experimental I will talk for now only about Next channel ) inside of the project  In package.json  change version of react and react-dom to  "next" so package.json will look this way: 2. Set up CircleCI or Travis CI in order to run occasionally tests. ...

Release 0.4 part 3

Image
This is the end. The end of not just release 0.4 but also the end of semester. Many things were planned but as usual not everything is done. I completed 2 issues( external , internal ) and 2 PR ( external , internal ) as were required and still had some extra time and I wanted to keep working on other issues. Indeed, when I reach this last week before exam I realize how time consuming extra work could be. Anyway, I did my best to accomplish at least something. 1. While I was working on my external issue  I have learn and review few things from C++. My goal in this issue was to increase performance of the compiler. In this snipped of code calling _STD invoke(_STD declval<_Types>()...) is very expensive in the meaning of performance. That is because template function invoke() is implemented by calling static function call(). So my task was to use _Invoke::Call(), and this will increase performance. 2. In my internal issue , I faced some problems. I was not able to run w...

Release 0.4 part 2

I'm writing this post on November 29th. This is mean that the due date for Release 0.4 is due in one week. This is also mean that semester is almost over. This time of the semester usually gets pretty intense. (Projects, Assignments, Releases, etc..).  This week unfortunately I didn't have chance to spend a lot of time on the school project Telescope  or any external project but I'm very eager to spend most of my time for my external and internal projects in the next week. My external issue is fixing issue in Microsoft/STL . In this issue I will have to work on enhancement that will make STL work about 25% faster. This should happend when I will reduce the number of calls  _STD invoke(_STD declval<_Types>()...). As I mention in previous post   I really enjoy to work with Microsoft/STL  because they are very helpful in solving problems and they are very fast in the responding. My internal project. Here I will work on the issue ...

Release 0.4 part 1

It's been one week since Release 0.4 start and I was able to manage some work in open source. For my external project I picked as always Microsoft/STL . This time I was working on correcting return type as per documentation of STL. Why I always pick issues from Microsoft/STL? This is because the way they explain the bug. It is very well define, there is description how to reproduce the bug and files that are crashing or need updates. Another reason is that there are only 20 contributors to this project and I'm 8th by the amount of contributing (even though it is only 31 line of code). This contributors are very quick to respond if I need any help or to review my PR. My goal for external project is to contribute to Wordpress/Gutenberg . I find it challenging because it is much harder to get in contact with some members of this project and when the issue is exist its not always very well describe. This can take quite a bit of time to solve the bug. As per my internal pr...

Release 0.3 - Work that's done

Image
In the previous blog I was describing issues that I was planning to work on this week. Indeed I saw many different issues that I would like to contribute on. In the internal project Telescope I was working on Issue that suppose to update Stylelint in order to check only .css files. After few hours of reading through and working on this issue I send my PR . I was also able to create a new issue so I can keep working on this project and contributing to it. As I said before, to work on the Telescope is new experience for me and I hope with professors supervising me and my classmates will be able to create a nice project. For my external issue I was thinking to work on Wordpress/Gutenberg   project but in the end I change my mind and decide contribute to Microsoft/STL . There are many issues that has to be fixed on this project and looks like not too many people have time to help this project solve issue. This week I picked this issue . I'm very glad that I was a...

Release 0.3

Release 0.3 is another step that bring me closer to the end of the semester. It is a challenge for me. This task require to work on 2 bugs one is internal and one external. At the first glance seems like nothing new than any other release, but the most difficult  is that we as a group of students have to create piece of software that will be replacement for CDOT Wiki . Before I begin to write what have I done so far I want to share what I feel about this release. At first project Telescope  make me feel like I'm in the tunnel with out a light and trying to find a way to get out. What I have done so far. First I try to to file issue, but a moment after I got 2 comments that saying that someone already file that issue, than I realize that my strategy is wrong and before filing any issue I should read through and see what else has to be done. Well, that is where problem arise because I don't know which steps should be taken and how to accomplish them to reach final produc...

Hacktoberfest - Issue #4, Pull Request #4

Image
It is Monday 8:00 am, this time I schedule to write a blog for my Issue #4 and Pull Request #4 that I was working on in order to complete Hacktoberfest. No thoughts come into my mind and all I want right now a cup of coffee. May be this stopping me from putting my ideas into this blog. As it is Monday after the Study break I have to say that summarizing all that was planned to do and everything that I have actually done the result make me feel said. The only thing that cheers me up, is that I have become contributor to Microsof t/STL . It's a little thing but for some reason every time I look at my Github profile it is warm ing up my heart. What is Issue #4 about. In Microsoft/STL there are classes and structs, by default struct is a public and  StephanTLavavej open an Issue to remove redundant word "public" that followed after the struct. Here are screenshots of few files where I made changes Before I contribute to Microsoft I was not sure if I can ...

Hacktoberfest - Issue#3 PR#3

Image
It's been already 3rd week of October and this is mean that Hacktoberfest is going to an end just in 11 days. More PR and more lines of coding, different projects and different problems all this is very familiar to anybody who are in Open Source and specially for the one who participate in Hacktoberfest. In Lab 3 the main task is same as in Lab 1 and Lab 2  it's to find an issue, fix it and create Pull Request. As other times this could not go smoothly. My Lab 2 was base on the contribution to the WordPress Gutenberg project . In Lab 3 I've decided to keep working on the same project but I picked different issue . What was the issue about. To use the proper terms in code to match the Designer Handbook  of Gutenberg project. In the project there are terms "inspector" and "sidebar" which have same meaning. The task was to change name "inspector" to "sidebar". Only JS itself contains 67 files that has name "inspector". ...