Planet CDOT (Telescope)

Tuesday, January 19, 2021


Mintae Kim

New Challenge Open Source

The OSD600 I learned last semester was a big shock to me. I followed the College curriculum for many semesters and I did my best in all the curriculum. So I thought I was confident in programming and good at it. I took OSD600 on my friend’s recommendation and I thought it was my first time to get a fun and necessary skill. I wasn’t used to working with someone. It was very fun to communicate with my school friends and do assignments together. And I only had very simple skills about Git. I was able to learn how to use Git properly through last semester.

My Plan for OSD700

OSD700 requires the team to work with the task. Therefore, I will take responsibility for the task. As I finished the last semester, Professor wanted me to be more responsible and finish my work. However, I didn’t think about whether my assignment was merged or not with the thought that I had to finish it in time. This attitude is not helpful to the team. I will fix my shortcomings this time. I’m very excited to learn something new. I will be able to understand the real job through this course. And I want to improve my research skills. I still have a lot to learn, so I have to learn many experiences indirectly.

I will also have to improve my code reading skills. It still takes me a long time to understand when I read someone else’s code. And I’m confused if I understood correctly. I want to experience and understand many codes through this course.

What I expect

I will produce the final project as a React.js as the last semester. I want to learn more about React and learn. Through telescopes and final projects, I will learn the basic concepts and usage of the web’s front and back. I will finish this semester well so that I can be of great help when I get a job later. I want to be a more active student than last semester.

by Mintae Kim at Tue Jan 19 2021 16:49:42 GMT+0000 (Coordinated Universal Time)

Sunday, January 17, 2021


Jie Yang

Some Thoughts on OSD700

As a junior developer, you know how to code is adequate. While as a senior developer, you should know how to maintain and manage a project, as well as how to review other’s code. From now on, I will be learning these skills and gaining experience in the field of open source development.

There are two areas that I will be focusing on, project management and technical improvement.

Project management

This is a big challenge of this course. Since I have no experience in managing and maintaining a big project, I don’t know where to start it.

For instance, I reviewed a Pull Request #1527, it failed in Continuous Integration check – Netlify. After doing a research, I found that Netlify is a web deployment platform. But I was confused that we had already included Vercel in CI check, and why we need to include Netlify as well? Another question is, what message I could leave to the author? As I didn’t find any useful error messages on Netlify app, the logs only pointed out “Failing build”. I could not give the author any suggestion on this issue, if I encounter the same problem, I don’t know how to improve my code to pass the check. Therefore, although I have reviewed this PR, it looks like I have not done anything.

Technical Contribution

This weekend, I went through 3 projects.

I definitely want to get involved in Telescope. I am sure I will spend my time on this project.

I gave my contribution to project Blockly last semester. It is written by pure JavaScript, so you don’t need to know numerous frameworks or libraries to get involved. However, it is a full-fledged project, finding an existing bug or issue to fix is not easy. Therefore, I will keep checking out its issues to find something I can do.

I know this project from David’s case study. I am interested in this project and set it up locally, if I have enough time, I think I will give a try on it.

Let’s start a new journey.

by Jie Yang at Sun Jan 17 2021 20:26:14 GMT+0000 (Coordinated Universal Time)

Saturday, January 16, 2021


Yuan-Hsi Lee

Advanced Open Source

What is the difference between programmer and developer?

After taking the Open Source Development course last term, I started to think about this question.

After 2 years studying in computer programming in college, I may be confident enough to say that I'm an okay programmer, I know how to solve the issue and make the program works. However, it is not enough for a developer. A developer should be able to design the program and write quality code. What is quality code? In my opinion, it has to be well-structured in order to efficiently use the resources, no duplicates, and easy to maintain.

And these are the abilities that I need to gain in order to become a real developer. The Open Source Development course that I took last term helped me to get these conclusions and gave me some experience to practice.

This semester, I take an advanced version of open source development, Open Source Development Project. We're focusing on 2 part in this advanced course, keep diving in open source community, and start to work on project management.

Project management

We're using an open source web application project to practice project management. For example, we've already had our first triage meeting in this week. In this very first meeting, we, the new team members learned about the schedule of release. Also, we went through the rules and steps of reviewing open PRs. Reviewing other people's PRs seems to be overwhelming and difficult, but it can actually be analyzed in different ways. Reviewing PRs isn't only about checking code, it also relates to managing the description and ensure the contributor and the maintainer are on the same page. Moreover, by declaring the issue and PR content, the maintainer can give the contributor more help.

Even though we are provided with an excellent documentation to teach us how to do the PR review, I'm still a bit anxious about reading people's code since I'm not sure whether I'm able to handle it or even be good enough to understand the code. However, I'll never know how good or how many things I should learn until I do a real PR review. By practical experiencing it, I'll figure out what kind of help I need to ask for and what else do I need to learn.

Keep contributing

In the last term, I started to contribute to the open source community. During the time, I began to work on browser extensions and some new languages and tools such as Python and Docker. In this term, I do have interests on VS Code extension and also want to keep working on browser extension. However, from my experience in the last term, I found out my JavaScript skill needs to be improved. Moreover, I'm not quite familiar with NodeJS and some popular JS frameworks such as React, NextJs, and Gatsby.

Therefore, I want to get more familiar with this powerful language and gain experience on these tools. I will be focusing on the projects using these frameworks in this term. If possible, I would like to try on VSCode extension or some more complex browser extensions.

by Yuan-Hsi Lee at Sat Jan 16 2021 04:17:31 GMT+0000 (Coordinated Universal Time)


Mohammed Ahmed

Lab 9, pip!

Well, this is it. We learnt how to package our code, and upload them to pypi. The final stretch. The last hoorah.

I actually found this Lab really easy. All I had to do was to invoke setuptools and wheel, and voila! All done. It was very fast, because I’ve already created a setup.py, way back when we first started the course.

Fun fact, when I mentioned that we can run our tool as a cmd by invoking the “install” command from pip3, it technically builds the script as a package, and then invoked by the name. Yeah, pip. It’s a package installer.

Output from pip

When I was building my package, it generated a lot of output. However, it worked, as I got 2 new directories!

the new folders

Great! Now I just need to upload it to PyPi. Shouldn’t be too hard.

Now that I have everything ready, I started with downloading Twine. I need that in order to upload my files onto the Index. So I invoked pip again, to install Twine. After that, I just passed the token username and password, and it uploaded! nice.

And that’s it. With this being uploaded, I’ve completed all the labs.

My experience in this class was phenominal. I got to work on repos and I learnt so much about Git, GitHub, Python and Pip! I got to learn automation on code, linting, and contributing to other peoples PRs. I’m very excited for DPS911, and I can’t wait for what’s in store.

by Mohammed Ahmed at Sat Jan 16 2021 03:39:20 GMT+0000 (Coordinated Universal Time)

Lab 8, Testing time!

Now this was an interesting Lab. We had to create Test scripts for our URL Tester! Now, I’ve never really used any Testing utilities for Python. I’ve used valgrind for C/C++, and JUnit in Java. Since I never really used PyTest before, I just wanted to describe my learning process when I was learning & reading the documentation.

First, PyTest. It was quite easy to be honest. The syntax, really helped a lot (mainly because it’s in Python), and the function names were easily identifiable. To be honest, before I wanted to make the test, I needed make sure I understood how PyTest worked, so I made a basic test for playing around.

a test for PyTest

After that worked, I started to create my tests, and see if they work.

My Tests

I asked my friend Abdul to test if my tests work, and it does! Great! Now I can merge them and start with my linting.

Man, oh, man. PyLinter on GitHub is…. something. I’ve been working on fixing my Linting for a while, and for the most part, I’ve fixed a lot of my linting. However, I still have some errors that make the CI test not pass, mostly due to the bot being very… pedantic.

PyLint’s… very annoying screen

I’ve tried everything, but in order for me to get PyLint to work, I have to re-write everything, and I don’t think I can do it on time. For the most part, I’ve learnt a lot about CI’s in GitHub, and PyLint. Hopefully, when I use it next time, it won’t be as messy, and stressful. Mmm.. on second thought, I don’t think that’ll ever happen, haha.

by Mohammed Ahmed at Sat Jan 16 2021 02:28:52 GMT+0000 (Coordinated Universal Time)


Royce Ayroso-Ong

A New Year Brings New Change

Working to upgrade my skills to version 2.0

Photo by Immo Wegmann on Unsplash

Hey everyone! I hope 2020 treated you well. Though, between you and I, I’m glad 2021 is finally here.

What I’ve Been up To

To recap the winter break, I spent a lot of time refining my skills in Adobe XD and messing around with Flutter (Google’s mobile cross-platform sdk) as I am working with my capstone group to push an app to the Play Store. For the past week I’ve been firing on all four cylinders to get my courses and due dates in order as well as brushing off the cob webs off of Docker as I will need it in one of my courses this semester.

Specifically, I’ve decided to take DPS911 — Open Source Project (successor course to last year’s DPS909 — Topics in Open Source Development). One of the goals of this course is to contribute to Telescope (a blog aggregator tool to track fellow Seneca student’s involvement in open source) and a technical project of my choice. This begs the question, “what project do I want to contribute to?”

What I’m Planning

This got me thinking, I’ve always enjoyed how Seneca exposed me to different languages and specializations of software development, though I never really asked myself what I preferred working on. If I was to choose to dedicate the next 4 months to contributing to a project, I would want it to be something I was genuinely interested in. After a bit of reflection, I would say that I really enjoy designing things — specifically how users see and use things, and how I can make that experience better by altering the design. I went on to further reflect and see that I like testing software, with each iteration being better than the last. I point this out because it brings me to where I stand now, I want to start focusing more on web and mobile development, specifically cross-platform applications where my interest in user experience can really come to life. Which is why I want my technical project to be on Telescope, as it uses quite a few interesting technologies present in modern web development. This is an opportunity that I may not get for a while, which is why I am eager to start meeting with the team regularly to take the project to it’s 2.0 version.

With that being said, I plan to spend some time on the weekend checking out the numerous issues and pull requests on Telescope waiting to be reviewed. I will talk with you all again in my next blog post, for now I wish you good luck to your New Year!

by Royce Ayroso-Ong at Sat Jan 16 2021 02:16:54 GMT+0000 (Coordinated Universal Time)

Friday, January 15, 2021


Anton Biriukov

Telescope 2.0 — Thoughts and Ideas

Telescope 2.0 — Thoughts and Ideas

As we finally tuned our calendars to begin the new year, it has marked a year since I last actively involved with the Telescope project. I have spent a year learning and gaining professional experience in full stack development at my co-op placement with TMX Group. I am now ready to join back, for which I am really excited.

Thoughts

Unlike so many things in 2020, Telescope has definitely made a big step forward. It has truly transitioned from a ‘garage project’ into a full-scale modern web application.

Banff National Park — Photo by Anton Biriukov

This is one of the first drafts of the project (remember this one, Dave?) made back in November 2019:

A year later we are looking at the system encompassing such technologies as Node.js, Gatsby.js, Next.js, Redis, BullMQ, Ngnix, Elasticsearch and whole lot more. I am really excited to learn more about the tech stack and make a positive contribution to drive the project further.

Ideas

After recapping existing plans for the 2.0 release, I got inspired by the ideas of adding a social side to the platform. If we manage to find a way to run live video sessions and have them available recorded, that would be a great step forward. I think this might actually engage way more students from within and outside of Seneca, transforming Telescope into an open-source learning tool.

One great thing to add in the future could be an online embedded IDE, running on cloud container. This would allow site users to actually follow what is recorded on video sessions hand-in-hand right there on the website. It might be quite helpful for the learning experience. In addition, factor in the new normal…

Another thing that crossed my mind is the possibility of adding automated tests to the project with Selenium, Cucumber or some other alternative library. Since Seneca, unfortunately, does not offer any courses on testing strategies, this might be a great opportunity for current and upcoming students interested in this field to get involved. It might also help us ensure Telescope works as expected, which might especially become needed as we add new features and more complexity to the Next.js front-end.

Lastly, we should make sure that we pay attention to accessibility of the system. It should ideally meet at least WCAG 2.0 standard. This is definitely an area we should spend some time on to make sure we support each and everyone willing to access Telescope. It is also almost like a must-have asset for any web developer to have, so it would be a great learning opportunity as well.

Conclusion

To sum up, I will fully focus on Telescope project for the Open Source Project course. It has a really solid tech stack, exciting opportunities for further development and a great community of collaborators. Let’s get the work going and shape the future of Telescope together!

by Anton Biriukov at Fri Jan 15 2021 22:52:26 GMT+0000 (Coordinated Universal Time)


Chris Pinkney

New Horizons with Open Source Development

​ A new month, a new year, and a new semester is upon us. I always felt the idea of a 'new year' to be a weird one. Like as evolved monke's we all decided that our rock rotating once around our closest star was something to revel in and make plans over...

​ Anyway, here's the plan I want to revel in later: I'd like to lose this extra Covid Christmas weight, and I'd like to contribute in open source more. I'd also like to try and take the next four months "easy," not to say that I'll be doing nothing but my previous semester required a lot of work so hopefully this one won't turn into that.

​ But given that this blog post is about Open Source Development, lettuce digress.

​ Last semester I took a course about Open Source Development: OSD600. This semester I decided to take its successor class: OSD700. OSD700 is a much more personal and team development oriented course. Essentially, we're given the option to work on an open source project of our choosing for the duration of the semester. Furthermore, Our Lord and Saviour Humph has mandated a stay at home and code order, as well as a stay at home and blog order. So here we are. Blogging. And coding. At home. Alone. With wine. And telescopes.

I've given it some thought towards what project I want to work on this semester, and decided that I'd like to help push Telescope to the next level. I'm really starting to enjoy React and JavaScript, well, web development in general I suppose. It's rewarding, rapid, and visual. But it's also quirky, and occasionally annoying. But it's also somewhere that I'm starting to envision myself. The two runner ups were WoWUp and Signal.

​ During our first lecture / meet the team, I had mentioned that I wasn't sure where I wanted to head, or what I want to do with myself. This still holds true, but I've always kind of wanted to do something with web and mobile technology, despite losing further and further interest in my phone these days. Coincidentally there's an issue up right now about porting Telescope to a PWA which kind of blends my two desires nicely together, despite PWA not technically being mobile development, but close enough, and at least a mere taste of the world.

​ Nonetheless, I'm really excited for the next four months and for what the future for me holds. Thankfully the OSD700 team all seem really great. It's going to be an interesting time in my life.

In other news...

  • Cyberpunk was a disaster. Yikes.

  • My Christmas was nice, but I didn't get my entire (and endless) TODO list done.

  • We're back in a state of emergency in Ontario.

  • My capstone is going really well so far.

  • I can't for the life of me figure out why my domain isn't working with Digital Ocean's App platform or AWS Amplify. Gotta play around with it some more.

  • Been listening to Vektor's Terminal Redux a lot 🤘.

by Chris Pinkney at Fri Jan 15 2021 22:13:41 GMT+0000 (Coordinated Universal Time)


Mohammed Ahmed

Release 0.4, My Experiences

I wanted to talk about my experiences about contributing to GitHub as a whole on projects. What I’ve learnt along the way, and my next steps. This has been an incredible course, and really helped me in terms of my confidence with contributions.

First, I want to talk about my experiences with OpenWPM. It was a repo by the Mozilla team that I saw on my GitHub feed, and I felt comfortable with contributing, as it was in Python. My task was to change up the Status Queue from a Tuple[str,str] into a special Status object.

We’ve discussed this in the past, talking about the stuff that we needed to do.

Our initial convo

So, I got to work! I knew that I needed to parse the Tuples into a readable object, so I made a simple Object called ‘Status’ and it parses the data, and stores it into the Object.

The Object that was made

While the Object itself works fine, unfortunately we found out that the Status Queue was intertwined with other modules, and we had to postpone the changes, at least until we found out how the Status Queue is used.

Why we didn’t Merge

Even though I didn’t push my PR, it made me learn a lot about developing in general. I had to run my own version of OpenWPM for testing, check my own code if it conflicts with other files, and test my own Status module to see if it’s created properly. The journey was the best part.

After that OpenWPM issue, I made one more easy PR before things started to get awry. GitHub recommended me another PR. It was an A.I tool that developed pictures. I noticed that they’re using an older version of GCD (greatest common denominator), and the code would break if they used Python 3.10. I made a simple, easy fix.

The fix to future proof for Python 3.10

From what I’ve experienced in this course, it’s been a journey. I’m very grateful for everything. It’s been rough, but I felt like the entire course, especially the professor (thank you, Dave) really cares about your success.

I’m excited for DPS911, and I know it’s going to be great.

by Mohammed Ahmed at Fri Jan 15 2021 16:53:53 GMT+0000 (Coordinated Universal Time)


Abdulbasid Guled

DPS911: Looking into the future

I blog so much, I may end up DDoSing the telescope servers with all my blogs :D

Short update blog here. It would appear as my speculations about how the course would be ran were 95% right. There's a technical contributions portion that's worth more marks which we can do for any project of our choice. I think the cover photo should make the answer pretty obvious, but I've decided to focus on Telescope for this semester.

My reasoning for doing so is pretty simple. Telescope is a very complex code base with many different technologies being used. From Docker and BASH, to Gatsby and Jest, with all the environment settings and config files. All to run the website. There's issues for both the front-end and back-end. These are areas that I'd like to really focus on improving. The NextJS migration will allow me to get more experience with both Next and Typescript. The experience will be nice to put on my resume and make me more attractable for coop, but more than ever, it's the learning experience that I'm interested in.

That should just about do it. As for what Telescope 2.0 goals are, my professor actually blogged about that. You can find that here. The main thing that caught my eye was making Telescope a PWA. I know these things are very hot in the scene now so it'll be interesting to see how these things progress. Next time, who knows? I may end up blogging my progress for Telescope version 1.5. Until then, stay tuned!

by Abdulbasid Guled at Fri Jan 15 2021 15:34:34 GMT+0000 (Coordinated Universal Time)

Wednesday, January 13, 2021


Tony Vu

Tony’s open source journey — chapter 2

Tony’s open source journey — chapter 2

As the title has suggested, this blog marks my “return” to the world of open source. After having a challenging but fun adventure in OSD600, I decided to continue to part 2 of the series in OSD700 as a way to practice my skills and test my knowledge. I was debating if I should take the course at the end of last semester and the decision became harder to make when I accepted the offer to do coop in Winter term because I was not sure if I could handle the workload in good manners. However, professor Dave has been supportive and he encouraged me to take it as he believed it will help me a lot in the long run. Also, I don’t want to miss the opportunity to learn from him again. So here I am now doing both coop and OSD700 with the hope to get the most software development knowledge I could in the next 4 months. I look forward to having another fun adventure and becoming a better developer at the end of it.

The structure of OSD700 is a bit different compared to OSD600 in the sense that you won’t learn many new skills but rather than to apply what you have learned in OSD600, put those skills into practices and polish them. OSD700 also has no quizzes or tests or final. The course is divided into two main grading criteria “Technical Contribution” and “Management/Leadership” . While the “Management/Leadership” focus would be on Telescope, the “Technical Contribution” part is your choice to make. You would need to pick a project and contribute to it. I have a very clear idea that I want to continue my contribution to Telescope as well, so I can spend all of my times learning about a single code base. Another reason is because Telescope team has been active and would be willing to help when there were problems. My goal is to learn how the app works thoroughly, for both backend and frontend and start contributing to the analytics part of the app. It has always been something I want to work on and add to my skill set. Maybe after that, I can even help to apply some ML/AI implementation on Telescope if we decide to develop the app into an platform for open source with social elements involved.

As Steve Jobs has said “Stay Hungry. Stay Foolish”, I will be hungry to ask for bigger assignments and I will be foolish to ask many questions. I am ready to take the next leap and become a valuable contributor/maintainer of Telescope.

Thank you all for reading!

Tony Vu.

by Tony Vu at Wed Jan 13 2021 00:45:36 GMT+0000 (Coordinated Universal Time)

Tuesday, January 12, 2021


David Humphrey

Toward Telescope 2.0

Last winter I worked with an excellent group of students to develop and release Telescope 1.0.  This year I'm gearing up for another round of development, shipping a 2.0 Release with a new group of equally gifted students.

I'm not 100% clear what our goals are yet for the 2.0 release.  To begin, we've got more than a hundred issues filed and a whole bunch of PRs to merge from last term.  After that, I want to focus on finishing our port from Gatsby to Next.js and start thinking about stability, maintainability, performance, and developer experience.  Ideally by 2.0 we'll get to the point where the project is mostly "done" and just something we use and maintain, without having to require so much attenion.

In terms of fixes and features I know I want to see happen:

  • Migrate User data and Feed storage out of Redis and into to better database
  • Fix our Redis data corruption when we lose power on production
  • Migrate away from the Wiki Feed List as the source of truth, and use the Feeds from the database
  • Modify our Authentication/Authorization system to allow token based authentication
  • Figure out how to integrate user GitHub activity and contributions (PRs)
  • Prototype having Twitch Streams, YouTube Live, and other "Telescope Podcast" experiences.  I think this idea is great, but I'm still waiting to see if the students agree.  Not everyone is comfortable to stream their work. Maybe we'll do it, maybe not.
  • Make the app installable as a Progressive Web App (PWA) on mobile
  • Improve the Admin dashboard(s) experience
  • Better Admin tools for content (user, feed, post) management
  • Analytics
  • Build out our error/log reporting that we started with Kibana
  • Improve UX for adding new feeds (e.g., automatic RSS feed discovery from blog URL)
  • Improve accessibility
  • Improve developer experience
  • More and better automated tests
  • Improve docs
  • Refactor and Simplify backend code
  • Split code into separate pieces and properly Dockerize: REST API, deployment server, feed processer, frontend
  • Continue building on the improvements we've started with Search (e.g., autocomplete for author names)
  • Swag?  We have talked about having shirts, mugs, and stickers in the past, but it hasn't happened yet.  Maybe for the 2.0?

These are just some of the ideas that I can think of, and I'm sure the students and community will have other priorities too.  I've asked them to blog about their ideas this week, so watch https://telescope.cdot.systems/ for updates.

If you want to join us as we work on shipping Telescope 2.0, please get involved.

by David Humphrey at Tue Jan 12 2021 18:18:10 GMT+0000 (Coordinated Universal Time)


Mohammed Ahmed

Release 0.3, My Experience with Docker

Wow, what a roller-coaster. Unfortunately, due to my contraction of COVID-19, I was essentially bed ridden for roughly 2 weeks. However, I did have a PR from Telescope and I just want to talk about my experiences with Telescope, and Docker for Windows (I normally use Mac OS X, but for this release, I wanted to setup Docker for Windows).

First off, Docker needed Windows Subsystem for Linux. Well, that was easy to install, right? Wrong. After I installed WSL, Docker still wouldn’t launch. I later found out that I needed WSL2, not WSL1. Thankfully, there’s a command for you to switch into WSL2, however it takes a very long time to convert.

WSL Version with Docker

I launch up Docker, and hooray! It works! I think for the most part, it was quite challenging to setup Docker onto Windows (compared to Mac OS), but I really wanted to learn how to use different environments when it comes to setting up a local version of Telescope, and testing for unique cases.

I used my URL Checker to test if Telescope is running locally

With the screen-cap above, I found it weird as to why I see something like “[32m]” on the output. That never happens on Mac, so what’s wrong? Well, I found out that Windows doesn’t natively use colour encoding. After I found that out, I just made a simple fix and it works right.

Before writing the blog, I still wanted to know how to create a Docker script on Windows. I felt that it was important to learn if I ever need to use a Non-Unix machine as an emergency.

I needed to know the following on Windows: creating metadata in a Dockerfile, writing and creating a file onto a disk image/directory, and binding commands in a Dockerfile.

Thankfully, Microsoft and Docker created a wiki page, describing how the commands are used on Windows, and with that in mind, I wanted to test it on my end to see if it works.

A basic test

After that, it worked properly when I built it. The reference I used came from here (https://docs.docker.com/engine/reference/builder/).

If it wasn’t for release 0.3, I probably would be dumbfounded on how Telescope works. This gave me a huge opportunity to play around with Docker and see how it works on different platforms. Even though I only have 1 PR, I think that I’ve learn a lot on this release, and the knowledge might benefit me in the future.

by Mohammed Ahmed at Tue Jan 12 2021 15:10:23 GMT+0000 (Coordinated Universal Time)

Lab 7, Formatting and Linting

Unfortunately, the past two months haven’t been great, however that still doesn’t stop me from learning about Formatting and Linting Code.

I’ve had some experience with Formatting code in Python, as I had to use Black for other Open Source repositories. (OpenWPM). I’ve encountered Linting during Hacktoberfest (repositories needed to be linted properly). I’ve read a lot about PyLint, and how it works, so I thought it would be a great Linter for my URL Checker.

First off, because our Linter and Formatter will be executed automatically, this means that I need to create a simple Shell script in order to invoke said libraries on my URL Tester.

simple shell script

Hooking said Script is actually a lot easy on Atom, cause there’s a package meant for hooking Shell Scripts onto a key (see — https://atom.io/packages/atom-shell-commands).
Once that’s done, it’s really just pressing a single key to check if the Linting is correct, and formats your code.

Lab 7 wasn’t too bad, because it exposed me to the tools that I’ve already been using. I think it helped me with my confidence, in terms of properly formatting my code, and hooking Scripts onto my IDE.

by Mohammed Ahmed at Tue Jan 12 2021 13:55:50 GMT+0000 (Coordinated Universal Time)


Andrew Alvarez

How to be a Hackerman

Working with computers or programming is more than having the brains to come up with code and programs. You'll notice more than one coding instructor going backspace letter by letter to fix a typo, or someone dragging their mouse from the top of the document until the bottom to select everything (just press Ctrl+A for the love of Shia Labeouf, just do it). I have found out that using the mouse incredibly hinders your speed and makes us think more than twice even the most simplest of decisions.

I would like to teach you a set of skills that will improve your speed and performance and help you be anywhere as cool as this guy:

Disclaimer: This guide is meant to work on Windows with WSL (Windows Subsystem for Linux), any Linux distro and MacOS.

distro means distributable, and its just a tailored version of Linux for certain specific needs. For example, Red Hat is the enterprise version, Mint is a general customizable build, and Raspbian is optimized for Raspberry PIs.
I recommend Ubuntu 20.04 since it's user friendly and has a lot of support.

Think of your terminal as the manual way to operate your computer without a graphic interface. Everything can be controlled via keyboard, you just have to know how to access what you need.
Typing is the Hackerman way.

Ergo, lesson 1: Learn them hotkeys.

Now, how can I navigate around if I can't see anything or don't have anything to click?

The first command you'll enter will be pwd.

$ pwd
/user/kweizar
Enter fullscreen mode Exit fullscreen mode

This is a path, it's the address that leads to your Present Working Directory on the computer's file system. Paths are case sensitive, so mind what you type.

You can move between directories by using the cd path command, cd stands for Change Directory.
There are many options you can pass as the cd command argument.

$ cd 
/  : go to the root directory of your system.
.. : go to the parent directory // /user in this case
/user/kweizar/photos : an absolute path.
~/photos 
// or       } these two are relative paths.
./photos 
Enter fullscreen mode Exit fullscreen mode

More on absolute and relative paths later on.

Assume you are on the D/ folder, invoking cd .. would take you to C/, cd ~ would take you to A/ since it's assigned as your home directory.
The command cd / would take you to the root folder and invoking cd . wouldn't do anything since you'd be navigating to the same folder.

This concludes the Navigation part, we're now able to go to any directory we require.

It's important to note that everything on your computer are files. These follow a parent/child hierarchy starting from root (/) and keep branching out like a tree.

Directories are files too; they possess extra metadata that greets them their "folder" properties.

Tip: File extensions are actually not required, they just help the OS associate the program that's meant to open that specific type of file.

Now, we'll want to get some Information of our surroundings. Let's use the ls command to list the content of the current directory

$ ls
photos/
documents/
main.go
calculator
Enter fullscreen mode Exit fullscreen mode

Our terminal prints out all of the files in /user/kweizar
We can also combine the command with a path and check remotely the content of that directory.

$ ls ./photos/event/
photo1.jpg
photo2.jpg
Enter fullscreen mode Exit fullscreen mode

Wait, what the heck is . ? This is an alias that represents the directory you're currently at. There are others like .. which as mentioned above, goes to the parent directory.

We printed out information that's already irrelevant to us, let's clear the screen out for less clutter. You can type clear or press ctrl + L and reset your console prompt screen.

🪧 To open the console's manual use the man man command. It will contain the instructions to open the multiple sections of the manual.
This contains information for the shell commands (like ls, cd, etc.), system calls, the C and C++ libraries and their specifications, and many others. Combine man with other commands to get their specific manual pages.
Always refer to this guide first when you need thorough documentation.

Once you start building a project, you're going to have to create files and folders.
To create a file, use the touch command. This will create a blank file with the specified name.
To create a folder, use the mkdir command.

📢 Avoid using spaces in names, preferably use a naming format system like camelCase or snake_case and stick to it!

You will combine 99% of the commands with a filepath. I will introduce two news pattern for commands though, take for example the cp command.

// Pattern 1:
// command source_path destination_path
$ cp ./photos/event/photo1.jpg .
Enter fullscreen mode Exit fullscreen mode

You guessed correctly, cp is the copy command. Now a copy photo1.jpg exists in my current directory.

You can also move files with mv, this is also the command to rename a file, just specify the new name at the destination path!

$ mv ./photos/event/photo1.jpg ./movedpicture.jpg
Enter fullscreen mode Exit fullscreen mode

now photo1.jpg will be moved and renamed to my current directory as movedpicture.jpg

I'll use the mkdir command for our second pattern.

// Pattern 2:
// command destination_path1 destination_path2 destination_path3 ...
$ mkdir music videos pictures
Enter fullscreen mode Exit fullscreen mode

This will create three separate folders called music, videos and pictures.

We've learned enough for today, in no time you will be speedily hacking into any mainframe.

Takeaway:
-Use the keyboard!
-Learn the shortcuts.
Information commands:
    -pwd
    -ls
    -man
Navigation:
    -cd
File Management:
    -touch
    -mkdir
    -mv
    -cp
-Command Patterns
-Aliases
Enter fullscreen mode Exit fullscreen mode

This is my first part of the How to be a Hackerman series. I hope to cover more themes like programs, Vim, Bash Scripts, Piping, Regex, more hotkeys and tips to control your shell, your editor and your OS.

Thanks for reading and let me know if you'd like me to expand on an topic of your interest.

by Andrew Alvarez at Tue Jan 12 2021 00:54:23 GMT+0000 (Coordinated Universal Time)

Sunday, January 10, 2021


Abdulbasid Guled

DPS911: The beginning of a new journey

God, what did I get myself into? The break really came and left us that quickly.

It's been awhile. First off, I did pass DPS909, no surprises there. While I did struggle a bit towards the end, my start and finish were good enough to get the grade that I got. Secondly, I really needed the time away from school the past few weeks. I was experiencing burnout around mid-November and some other stuff that had occurred in my life had made it really hard for me to really focus on my schooling. As shameful as it is for me to admit, I did also experience alot of the imposter syndrome around this time too as many of my peers were doing really well with their releases and labs and I had little to show. The time off has really helped give me the breathing space I need.

In my last post, I talked about my approach to DPS911. That has not changed. I did notice, however, that only 5 students had enrolled in this class as of the writing of this blog post (Saturday January 9th, 2021). I'm actually acquainted with 3 of the students so I guess that's a plus. I can only assume the list for CPA equivalent, OSD700, has much more student enrolled.

Stalking github, I noticed that a new wiki page was made for the Winter 2021 DPS911/OSD700 was made. I won't link here as I'm sure it's still a work in progress and the school year hasn't even started yet. I didn't open it either. This only leaves me with the assumption that we'll continue working on Telescope. Since last year's students officially released it under ver 1.0, then perhaps, we'll push it to ver 2.0. Just a thought.

With only one scheduled class per week this time as opposed to two, maybe we're going to have synchronous meetings discussing what everyone's going to do with Telescope? I wouldn't be surprised if it was asynchronous, but I would think for a class of this caliber, that there would be live discussion meetings similar to an actual working environment. This class also doesn't get many students compared to the previous course so with less students, organizing the material should be easy too? I'll be patient with this.

Assuming Telescope is the plan for this semester, I'll need to continue reading over Typescript, and Material-UI. I used the latter in my capstone project, with limited experience, especially since I'm terrible at UI/UX design. I can code it in ofc, but actually designing stuff is where I struggle immensely with, especially when it comes to feedback. So, I'll continue to practice this.

God, I'm still writing alot, and the semester hasn't even started yet. I can only imagine what will come once the semester started. I'll see you guys in DPS911

PS: I needed to make something useful and fun, so I used a template design to make a portfolio website. It's still a work in progress as I'll need to work on some more projects to add to my resume section, but I'm happy with the design. Leave some constructive feedback. I already got some on the font size of my navbar, so I'll have to fix that, but anything else would be a plus. It was made with react. I hate plugging, but this is a one-time occasion, I promise! :D

Check it out here

by Abdulbasid Guled at Sun Jan 10 2021 03:10:34 GMT+0000 (Coordinated Universal Time)

Saturday, January 9, 2021


Yuan-Hsi Lee

Review, and write something better

This post will be mainly talking about fixing my old PR. In my previous blog posts, I mentioned that I plan to redo a previous PR that I submitted but didn't get merged.

I've started coding for about 2 years. In these 2 years, I focused more about giving the solution and make the program work. I seldom look back to my code and review it. However, to become a developer, having the ability to write clean, quality code is critical.

In my last blog post, I mentioned that my old commit in this PR was duplicate and messy. The changes I make in the new commit accomplish the same functionalities, but it improves the code to be more maintainable and understandable. For example, instead of using letters 'l', 'e', 'i', to represent the image sizes of 'large', 'medium', and 'icon', I use an array object to store the value of these 3 image sizes. It is more readable and better for trouble-shooting.

// store the value into an array of objects
const sizeOptions = {
  LARGE: { value: 0, name: 'Large', code: 'l' },
  MEDIUM: { value: 1, name: 'Medium', code: 'e' },
  ICON: {value: 2, name: 'Icon', code: 'i' }
};
// call the object.code value to replace the old letter 'l'
switch (size) {
  // case 'l': // <-- the old one
  case sizeOptions.LARGE.code: // <-- the improved one
  // ...
}
Enter fullscreen mode Exit fullscreen mode

After graduation, we'll be working on real projects instead of school work. For school work, we usually don't need to maintain the code after the submission. However, that's not how the system work. When we're doing a real project, we need to keep the application work until the client doesn't need it, which means we'll be facing different issues and be required to fix them often. That's why we need to keep our code easy to maintain. Moreover, we'll be working with other developers. We'll need to follow certain coding style and convention, and we certainly don't want to make other developers waste their time to understand our code logic or style.

Compare with the last time, the repo owner seems to be satisfied with my new changes instead of asking for many change requests. I believe my PR will be merged this time. In the future, I'll spend more time studying about writing quality code and reviewing my code.

by Yuan-Hsi Lee at Sat Jan 09 2021 02:04:11 GMT+0000 (Coordinated Universal Time)

Friday, January 8, 2021


Yuan-Hsi Lee

Packaging and Releasing C# console application

Work with NuGet package

NuGet Package Explorer

For C# application, it can be easily packed to a NuGet package. When I was doing internship last year, I luckily had the experience working with NuGet package using NuGet Package Explorer. After finishing a feature that can be reused in other applications, I packed it to a NuGet package. The structure of the package can be divided to couple parts, however, I only have experience dealing with lib and content.

It was quite simple to create a NuGet package with NuGet Package Explorer; template folders can be created using its GUI. By putting the .dll and .exe to the lib folder, the package will be able to run the program. Moreover, developers can add the folder or file to content folder, after package installation, the files will be placed in the application with a same folder name (if it doesn't exist, it'll create one), therefore, developers can reuse these files.

For other setting such as author, package version, documentation, can all be fill out and edit on the sidebar of NuGet Package Explorer.

In a non-Windows environment (.Net CLI)

However, my OS is Linux mint, which means I can't use these kinds of useful tools for managing/creating NuGet package because I can neither install them, nor the functionalities are limited. In this case, I'm using .Net CLI. For every C# project, there is a .csprj file which is automatically created while the application is created. (I was using dotnet new console command to create my console application) The main setting for NuGet package will be done in this .csproj file.

For example,

  <PropertyGroup>
    <!-- other info -->
    <Version>1.0.9</Version>

    <ToolCommandName>goodOrBad</ToolCommandName>
    <PackageOutputPath>./nupkg</PackageOutputPath>
    <Authors>Yuan-Hsi Lee, Roger Yu, Abu Zayed Kazi</Authors>

  </PropertyGroup>
Enter fullscreen mode Exit fullscreen mode

The tag is your package version; is the command name to use this application after user install the package; is the place to put the Author name(s).

After testing the console application and being ready to pack to a NuGet package, move the working directory to the one contains the .csproj file, and use dotnet pack command. This command will create the NuGet package of this application, the package will be located in ./nupkg directory by default, you may change it in the project file.

The NuGet package can be published by updating it to NuGet Gallery. Developers can also manage the packages and view the download numbers on this website.

Before this scheduled release of the application, I actually have been packing my application into NuGet packages whenever I implemented new features. Therefore, there has been 8 versions of packages. It's a bit odd to publish these packages before a release. I eventually tag the historic commit with the respective version tag name. (i.e. tag v1.0.3 to the commit that v1.0.3 NuGet package was created) Next time, I'll make a better plan of publishing packages and make releases. Thanks to my friends who test my GoodLinkOrBadLink tool and provide user feedbacks for me to improve and fix the mistakes.

by Yuan-Hsi Lee at Fri Jan 08 2021 18:41:54 GMT+0000 (Coordinated Universal Time)

Thursday, January 7, 2021


Raymond Rambo

The first After-School Project

Finishing OSD600 was a major milestone in my development as a programmer and as a software maintainer. I genuinely cannot express how happy taking that class has made me and how ready I feel to take on the next big project.

But first...

I want to make something simple. I took a break from coding for about a week after my class ended (and thus my stint at Seneca College in general), and decided to enjoy the holidays with the many hours I was given at my part-time job and my girlfriend, with whom I spent lots of time cooking food with on Christmas Day.

But back to the project. I want it to be simple and brush me back up on coding for the front-end. Though the projects I was working on in OSD600 were fun and great, I loved creating link checker and releasing it as well as working on other Javascript-heavy projects, I do feel like my back-end skills have been worked hard for now and though I will return to that, I want to learn more about webpage design and front-end frameworks like React and Vue (having worked largely with Angular the last year).

However, this first project won't be in either of those - it will be with Jekyll.

Yes, that's right, I building a personal website for myself. The project every software developer ruins into at least once. Allow me to outline what I want to build and what I would like to learn:

I would like to learn how to design appealing-looking web pages

The biggest thing for me is that as a software developer, I don't have a terribly great eye for beauty. That doesn't mean I don't understand the basics of how to make something pleasing to look at, it just means that I don't the skill required to design something that's more complicated than, say, a simple blog or table of information. I also am not that confident in my CSS knowledge and I'd like to fix that.

I would like to learn Jekyll

I was originally going to build my website in vanilla Javascript, but I think now that was foolish and instead I'd like to learn a static site generator that will work for simple webpages because even though I love Javascript, I don't want to work for a simple website.

I would like to learn about GitHub Pages

Frankly, I think being able to host my projects straight from GitHub would be such a great option since all my code is going to be there anyway. I know locking yourself into an ecosystem is kind of a bad idea but I don't see anyone raising alarms about it so I'm not too perturbed.

Let's start

First, I created my GitHub pages repository and connected it to a local git repo, then I started getting into Jekyll. I recommend this blog post if, like me, you've gotten used to using WSL in vscode for your web development work.

Jekyll

Getting started with Jekyll is pretty easy. GitHub Pages even has a section on initializing the Jekyll site with Pages.

Not that I have a templated site on my Pages domain, I'd like to make this blog, my dev.to blog, display on my site.

A great GitHub repo for this is equalcoding.github.io, with this template I managed to build a website in about 30 minutes that would display all my dev.to blogs and my GitHub repos.

Next

The next things I would like to do are change up the look of the site and maybe add repos that I've recently contributed to? Or are in general involved with.

Though I didn't particularly learn a ton about Jekyll, since the site I cloned used a lot of vanilla Javascript and HTML, I think themes are very important and I can't wait to explore them more.

If you;d like to take a look at my site, you can see it here.

Until next time!

by Raymond Rambo at Thu Jan 07 2021 04:44:17 GMT+0000 (Coordinated Universal Time)

Wednesday, January 6, 2021


Yuan-Hsi Lee

Fix the previous mistake

In this post, I want to talk about my a PR I sent about 2 months ago, and how do I pick it up and improve it to meet the requirements.

Old issues

In the Hacktoberfest, I gave myself a new challenge, browser extensions. I checked many repos and worked on some issues. One of them is to add keyboard shortcuts for image size selection. In my last PR, my code works fine, but it's duplicate, long, and seems to be breakable.

There were some issues in my old PR, firstly, I use some brittle attribute names to get the elements which might be broken once the class names have been changed.

const openTool = document.querySelector(
        '[class="PNyWAd ZXJQ7c"][jsname="I4bIT"]');
Enter fullscreen mode Exit fullscreen mode

Secondly, I neglected the usage of different languages.

if (dropDownWithSize.innerHTML == 'Large') { /*...*/ }
Enter fullscreen mode Exit fullscreen mode

In other languages, the innerHTML values are not Large, therefore, this line of code will not work.

Thirdly, I didn't test all the scenarios. In some cases, the variables I defined might be null or undefined, however, my functions didn't check their value before using them, which will be causing errors while running the extension.

Lastly, there were several parts of my code that were similar or even duplicate which could be combined and reuse.

New solution

To solve these issues, I did some research in order to find alternatives. For example, instead of checking the innerHTML value, I go up to the parent component and check the aria-label value. In this case, the aria-label won't be affected in different languages.

if (dropDownWithSize.getAttribute('aria-label') == 'Large') { /*...*/ }
Enter fullscreen mode Exit fullscreen mode

To utilize and shorten my duplicate code, I use the basic method, drawing flowchart to find the solution to design my code. In my case, I need to reopen a dropdown to re-select an element. However, this element should be reused instead of using getElement function call again. I design a function with getElement, therefore, once I finish dealing with the reopened dropdown, I can simply call my customize getElement function again to get the same element, but with less code.

After truly working on solving this old issue, I realized that I overestimated the difficulty of it. When I receive the owner's change request, I was anxious and didn't have the confidence to make these changes. However, it turns out that I might actually able to solve these issues that I thought I couldn't, I just need to calm down, breaking things to pieces, and make a plan.

by Yuan-Hsi Lee at Wed Jan 06 2021 21:32:19 GMT+0000 (Coordinated Universal Time)


Krystyna Lopez

Java Servlets and CORS


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 first and second methods are more reliable because it only applies a filter on the program that has been created by us while using an extension to the browser can cause some security issues.

by Krystyna Lopez at Wed Jan 06 2021 05:21:34 GMT+0000 (Coordinated Universal Time)

Monday, January 4, 2021


Ray Gervais

Lessons from Developing the GopherNotes 0.1.0 MVP

A quick CLI notetaking application written in Go. Logo TBD I’ve wanted to write a Go-based application for a while now; the problem was always how to approach it without following the suspected purpose of said language: networking. See I’ve for a while been wanting to develop tooling which doesn’t have to rely on API calls to provide value. A local note-jotting application made the most sense since it also fills a need of mine: a cli-centric workflow which is fast and flexible.

by Ray Gervais at Mon Jan 04 2021 00:00:00 GMT+0000 (Coordinated Universal Time)

Saturday, January 2, 2021


Yuan-Hsi Lee

Release 0.4 - Planning

Release 0.4 is the last release in this course, in this release, I'm supposed to do something bigger, something more challenging than the previous releases.

What is a bigger challenge for me?

In release 0.2, I had my first couple PRs to real world projects. I chose a field that I have never touched, browser extensions. I even learned some new languages and tools and did find an issue for beginner and solve it.

In release 0.3, I learned more react knowledge and had my first attempt at Twitter API.

However, what should I do for a bigger challenge than the previous ones?

Learning a new language or starting a new field seems to be overwhelming to me, I can't be expertise in 2 weeks, and it's hard to find a practical issue in that field for a beginner like me. Therefore, I decided to solve the issues that I couldn't solve. In release 0.3, my PRs are both merged. However, in release 0.2, there are 1 PR got closed because I couldn't find a solution to make the requested changes, and 1 PR that is still open and wait for my changes. At that time, I didn't think I can resolve those requests. To be honestly, I don't think I can make it.

However, this should be the bigger challenge that I should take in this very last release.

My PRs both worked, but I wasn't able to make the request changes. There were 2 reasons, the unprofessional code and the lack of research/experience. What I need is to use a different method to resolve the issue. I did find the solution, but it's not qualified or not good enough. I just need to find a better and more professional solution. Since I found the solution once, I should be able to find a better one again.

by Yuan-Hsi Lee at Sat Jan 02 2021 22:14:54 GMT+0000 (Coordinated Universal Time)

Sunday, December 27, 2020


Yuan-Hsi Lee

Unit test in C# without IDE

This lab, we’re working on unit test and CI.

About unit test

I’ve heard about unit test and did some in internship. However, I never got a chance to really understand what I’m supposed to write in unit tests. This is a good chance for me to study about unit test.

My link checker project uses C#, therefore, I searched the unit test in dotnet environment. There are several tools such as XUnit, NUnit. However, most of the documentations and tutorial are using Visual Studio and rely on its functionalities. In my case, my OS is Linux Mint which can’t install this IDE. After trying all the unit test tools that I can find, NUnit works perfect for me. Here are the steps for using NUnit with IDE:

1. Create a test directory

Move the original code files and its project file (.csproj)that run the application to an independent directory (not in the root), and create a new directory for test files.

For example, I moved the application's project file and relevant .cs to GoodLinkOrBadLink directory, and created a GoodLinkOrBadLink.Tests directory for placing my unit tests.

2. Create unit test project in test directory

cd to your test directory and use this command to create a .csproj file and a .cs file. The default file name of .cs is UnitTest, I changed it to Tests.cs.

dotnet new nunit
Enter fullscreen mode Exit fullscreen mode

3. Add reference to the test project file

In the test project file, add the application file path as reference. Below is an example in my test project file. The file path in the Include points to my application's project file.

  <ItemGroup>
    <ProjectReference Include="..\GoodLinkOrBadLink\OSD600.GoodLinkOrBadLink.csproj" />
  </ItemGroup>
Enter fullscreen mode Exit fullscreen mode

4. Modify UnitTest1.cs (or whatever test file name you have)

In step 2, a .cs file is generated with the command dotnet new nunit. By default, there is a line of C# directive using NUnit.Framework; for us to use the NUnit testing framework. I modified the class name and include my application's namespace as a C# reference.

By adding [Test] code block, we can add the unit test that we want to test our functions. For example,

[Test]
public void Version_ValidOptions_ReturnTrue()
{
    //arrange
    string isVersionOpt_1 = "--v";
    string isVersionOpt_2 = "--version";
    string isVersionOpt_3 = "/v";

    //act
    var underTestT_1 = CLIUsage.Version(isVersionOpt_1);
    var underTestT_2 = CLIUsage.Version(isVersionOpt_2);
    var underTestT_3 = CLIUsage.Version(isVersionOpt_3);

    //assert
    Assert.IsTrue(underTestT_1);
    Assert.IsTrue(underTestT_2);
    Assert.IsTrue(underTestT_3);

}
Enter fullscreen mode Exit fullscreen mode

I'm using arrange, act, assert pattern to write my unit tests. I'm very new to write unit test, therefore, I will not explain how to write a unit test; I followed this documentation to write my unit tests, it is beginner-friendly.

5. Try to run the test!

Open terminal, move to the test directory and run this command to run the test project:

dotnet test
Enter fullscreen mode Exit fullscreen mode

If your test units are all passed, you'll see something like this,

However, if there is any test that didn't pass, you'll see something like the below picture with the number of failed tests with the error message and stack trace.

Just like how we debug in a normal bug; use the error message and stack trace to find the issue.

Create a GitHub Action as CI

After having unit tests in your repo, we can include the tests to ensure the new PR pass all the test before we merge it.

GitHub has its own CI service named Action. I followed its documentation which is very straightforward. You might need to make some changes after what I did in my dotnet.yml file.

Writing unit test is critical, however, this is actually the first time that I start a unit test from scratch. I'm now more confident to write testing and will study some good practice to improve my skill.

Thank you for reading my blog!

by Yuan-Hsi Lee at Sun Dec 27 2020 20:32:59 GMT+0000 (Coordinated Universal Time)


Paul Sin

Amazon Web Services

I am still trying to decide on my target audience. .. please forgive me if I talk about the most obvious concepts in my blog posts. This week I was working with AWS, for those of you who are not familiar with AWS here is the definition from Wikipedia.

"Amazon Web Services is a subsidiary of Amazon providing on-demand cloud computing platforms and APIs to individuals, companies, and governments, on a metered pay-as-you-go basis."

This was not my first time using AWS. I actually have 3 EC2's running at all times. Although it wasn't my first experience using AWS you have to understand that EC2's are just a subset of what AWS provides. This week I was challenged to upload user profiles into a Simple Storage Service, aka S3. Writing this in NodeJS / Express.js was an interesting challenge. 

The first obstacle I encountered was sending the file to the backend server. This task came with many challenges, such as, handling the file uploading and saving in a local variable. Some youtube videos told me to handle the file uploading as an event and pick out the file itself and store the object as a variable. Once I had the file object, I created a FormData object and appended the file Object. This allows me to send the FormData object to AWS for storing.

Another issue was the storing of data on my bucket. The current project I am working on needs a profile picture upload and an image gallery. I am not sure if they would like these images to be an album... however, saving these images in a well organized manner became the problem. I will not lie.... since this is an unpaid internship I was temped to just upload all images into one massive bucket and let the next round of developers figure it out. Since it was Christmas, I embarked on a journey to find the most efficient solution. I found a solution in passing a path as a parameter will allow me to sort the images into sub- folders. This also allows me to group these images in an efficient manner.

Currently I am procrastinating on reading the dotenv environment documentation. I am wondering how it works when you have two dotenv files in your repository... Can I specify with dotenv I would like to fetch my variables from? Can I just reach into all dotenv files using require('dotenv') package? Hope everyone is having a great holiday. Stay safe and happy hacking.


References:

https://en.wikipedia.org/wiki/Amazon_Web_Services

by Paul Sin at Sun Dec 27 2020 04:17:25 GMT+0000 (Coordinated Universal Time)

Paving the Way

Sorry my blog hasn't been updating recently, Im so busy getting ready to get in the groove back at home. Im not going to lie the vacation life is great! Waking up at 3pm, taking baths, and the food is ready when I sit down at the table. It's a privilege I take for granted.  Since writing a blog post helps me take a minute to reflect on the experiences I have been going through, I will keep making these blog posts. In addition, I noticed these blog posts encourage me to acknowledge the accomplishments of today, keep me focused on the progress I am making, and finally.. I must work on articulating sentences.

Here is a visualization of myself: 


An update on what I have been doing. I moved back home for Christmas, I started working on my pool hall app, and Ive been applying to positions. With Christmas break upon us I would like to get some personal projects going. This will give me the opportunity to solidify my knowledge of what I have learned so far.

I started working on this pool hall application since every billiard I visited in Toronto was keeping their data on paper... sounds like a nightmare. The current website looks like this Pool Hall App. Originally I thought this would be a simple task! keep track of each tables time played and pay! It was too good to be true. While thinking about the design and use case for this application I have run into a wide array of problems. Some of these include ensuring this webpage application is mobile friendly, ensuring this UI is intuitive, and how will this scale up.

Currently, I am tackling some smaller problems, such as, moving the date tab to a header and removing the current time ( refactoring code), a few confirmation alerts, and making the tab components are highlighted when looking at that tab. Another task on my to do list is to make sure that the regular price is adjustable as well. I will also create an Informations page for new users to read. I don't know what should be done first, the documentation or the functionality. Solo projects are always an interesting experience. 

Another task I have been working on is this website for fitness and health. I found a start up company that is looking to get their website working. Currently, I am having a difficult time pulling down the changes from Github. Apparently he doesn't know the password to the Github that deploys this website. The owner is not very tech savvy. I think we might have to just move the entire project over to Heroku. This would be a little bit more money, however, I do enjoy the platform that Heroku allows us to have. All the environment variables are located in one spot and I never have to log into the dropplet / EC2 or server. I'll keep you updated on how it goes.

by Paul Sin at Sun Dec 27 2020 03:51:56 GMT+0000 (Coordinated Universal Time)

Monday, December 21, 2020


David Humphrey

SnowyOwls.ca

tldr; I made you a little birding web app for Christmas with Begin.com and Next.js to help you find Snowy Owls in Canada. The code is here.

On the Healing Powers of a Side Project

I've finally finished the semester, and am ready for a holiday.  The past three weeks have been non-stop marking: labs, assignments, quizzes, tests, projects, you name it.

I find that these long marking periods go better for me if I also work on a side project in parallel.  When you teach programming, and your marking involves reading and reviewing a million lines of code, you start to yearn for opportunities to write some code of your own.  I always need a project, so while I work through my marking pile, I give myself little breaks to implement bits of my chosen side project.  It keeps me moving forward and happy.

Owls as Inspiration

I've been obsessed with owls throughout the pandemic.  I wrote previously about our woods' new Barred Owl, and how we installed a nest box for it (UPDATE: we've had a second Barred Owl move in, so everything seems to be going to plan).  Our Great Horned Owls have started hooting to each other every evening, which is amazing to listen to as we go for our walks.

But as the snow begins to fall each December, my attention turns to another owl: the Snowy Owl.  Normally at this time of year I'm seeing Snowy Owls on my long commutes to and from work.  With COVID, I'm not out driving anymore, and as such, I'm not having as easy a time finding them.

I decided that this year's marking-side-project would be a tool to help people find Snowy Owls near where they live.  I've long wanted to play with eBird and the eBird API, and hoped that I could get recent sighting data this way.  To use the eBird API, you have to create an account and then request an API key.  After that you can do all sorts of interesting queries to get current or historical data about sightings by species, region, or location.

My goals for the project were these:

  • Had to be shipped at the end of my marking period
  • Include a write-up with some general info on Snowy Owls and advice on how to find them.  I would need to do research for this part.
  • Include some historical data (i.e., charts) from eBird of sightings in Canada to show when Snowy Owls are most often seen
  • Create an interactive, live map of current sightings for the past month
  • Create a sortable tabular view of the same data, with locations and how old the sightings are

Serverless with Begin + Next.js

I also wanted to use this project to learn a few new technologies.  I decided to write the back-end as AWS Lambda functions using Begin, and build the front-end in React with Next.js.

First, I've been meaning to try Begin for over a year.  I've been following along with Brian LeRoux's work on arc.codes and Begin, and every time it comes up in my feed, I tell myself "next time, I'll try this."  Well, this is the time!

Second, I have to teach a bunch of web and front-end React courses next term.  I also need to learn Next.js for a few of the projects.  Picking React and Next.js seemed like an easy way to refresh myself.

Thoughts on Begin.com

Begin is a platform for deploying modern web apps (CDN, data, lambda functions, etc).  I've worked a lot with static hosting platforms like GitHub Pages, Vercel, and Netlify, but never with Begin.  One of my goals for 2021 (first time I've written that, goodbye 2020!) is to learn more about AWS.  My institution has become part of AWS Educate, which means that my students and I can get access to AWS services for our courses.

I thought that Begin would be nice, because it lets me try AWS, but with training wheels on.  I'm not on the hook for configuring or securing anything directly.  Begin gives me a code-based, declarative pipeline from GitHub to AWS, including S3, CloudFront, Lambda, API Gateway, DynamoDB, and probably other stuff I don't know about.  I push to my main branch, and my code is linted, tested, built, and deployed to staging.  Similarly, if I push a tag, everything goes to production.  They have a very generous free tier, which blows away what you get from the other JAM stack providers I've used.

Things that I like about Begin:

  • I bring a git repo, and they connect everything else within AWS.  I'm not ready or interested (yet) in twisting all the dials in AWS, so this is a fantastic option for me.  For the most part, I never felt like complexity of the underlying AWS infrastructure or configs "leaked" into my project.
  • Begin is technology/framework agnostic.  I could have written this web app 50 different ways, and they'd all be workable with Begin.  You aren't forced into a particular framework or set of tooling.
  • Almost everything is configured via files in the repo vs. enormous web consoles.  Begin does have a nice web console where you can see what's happening and change how certain things work.  But the bulk of what you do is done declaratively.  I also like that you work at a high enough level that you aren't stuck authoring thousand-line YAML files.
  • The docs are fairly complete and had most of what I needed.  I've read them all multiple times, and often when I thought something hadn't been covered, I'd go back and discover that the details were in fact there.
  • I love that everything you need for a web app is here.  Almost every platform I use is missing something: static hosting I expect, and serverless functions are becoming mandatory, too;  but to also have a database built in is amazing.  Just about every project you build has some need for data, and Begin has it. I used it to build a simple analytics back-end (thanks to Wes for the sample code I used to write my own), and with more time could have done a lot more. It's really flexible.
  • Being able to bring my own domain and have it hooked up automatically with SSL certs.  I didn't have to fiddle with nginx or certbot.  Amazing.
  • The various pieces of what you're building fit together in ways that make sense.  I've used some other JAM stack platforms, and their functions often felt bolted-on as an after-thought vs. part of the initial offering.  With Begin I have a src/http/* directory for all my functions, and my root directory holds my React app, while shared code lives in src/shared. I like working in monorepos, and this feels like a good design, with everything in easy reach.
  • A lot of what Begin's CI/CD pipeline does for you, I can do myself with GitHub Actions.  But, here I didn't have to do any of it.  Having the entire pipeline preconfigured was excellent, and let me work more quickly.

Things that I found confusing or difficult with Begin:

  • The name.  It's impossible to Google for bugs, docs, StackOverflow, etc.  My general search algorithm uses the technology name as a prefix.  But literally every technology you work with has "begin" in their docs, so that doesn't work.  I never really figured out a good workflow for finding things with Google.  Netlify, Vercel, etc. don't have this problem.
  • Edge cases with the tooling.  I ran into a bunch of situations where the docs and tools didn't match my experience.  For example:
  1. the docs claim you can generate boilerplate code for your http functions. I started from one of their sample projects that didn't have any http functions.  As a result, when I wanted to add my functions, nothing was installed or wired up correctly (e.g., no sandbox).  The docs assume this is all done for you, so when you have to do it yourself, you end up having to dig around in other sample projects to see how they do their configs and setup.  This isn't easy, though, because there aren't very many complex apps to use as an example (or I couldn't find them, see naming issues above).  I'm used to working without docs, so I got most things working on my own.  But I think this could be improved.
  2. Getting my custom domain set up with Begin was difficult (for me).  Their docs discuss a number of suggested domain name registrars.  Based on this I chose Namecheap and bought my domain, snowyowls.ca.  Begin wants you to create CNAME records for staging.snowyowls.ca and www.snowyowls.ca.  I followed all the docs carefully but couldn't get it.  Eventually I found out that Namecheap needs me to include the .www and .staging suffixes for my CNAMEs.  I still don't have all the HTTP to HTTPS redirects working the way they should.  Probably this is something that people who do this all the time would know, or could figure out, but it seems like Begin is aiming for devs who do need help with this.  I wasted a lot of time on issues like this.
  • ENOSPC errors during install or build steps. Begin has hard limits on the size of your development directory (~500M), and also each of your functions (~5M).  As a result of these ceilings, I was constantly banging my head.  So many of the packages I normally reach for were suddenly too big.  This includes many dev dependencies I rely on (Prettier, Jest, and all the ESLint plugins I usually use).  I would get everything working locally, push my code, and have Begin fail with ENOSPC.  Sometimes it would be the total size of my repo; other times a particular function was overweight; still other times the error would be wrong, and trying a rebuild would make it work.  In all cases you get an opaque ENOSPC error and that's it.  I had to rewrite a bunch of modules to inline, stripped-down versions of code I needed.  I don't know how Netlify gets around this while Begin can't (or hasn't), but I think it's a major blocker for them, and will hurt adoption.  (As an aside: we joke about how massive node_modules is, but seriously, the fact that I can't fit a reasonable JS dev environment in 500M without a lot of extra work is totally ridiculous. The environmental impact of having to download close to 1G of deps every time I want to write a single line of JS in a new project, or for every CI run, is a problem we could and should solve.)

Overall, I enjoyed working with Begin on this project.  Once I figured out how everything worked, I was able to work quickly with their pipeline.  It was great writing my back-end and front-end together, and being able to include persistent data for analytics.  I have zero concern about scaling, security, cost surprises, etc.

Begin is great and you should try it.  I'll use it again for sure.

Thoughts on Next.js

When I'm writing React code, I usually use create-react-app.  It works well for small projects, but I find its lack of opinion on lots of things means you have to supplement it with all kinds of extra packages.  I find this frustrating, because I want to focus on my project, not on picking winners in the endless front-end arms race.  At the other extreme you have something like Angular, which I also have to teach next term.  It has an opinion on everything, almost none of which I share.  It's too stifling, and I usually want something in between.

Another option is Gatsby, which I spent a lot of time using last year on another project.  However, it doesn't really fit with the kind of apps I like to write (i.e., dynamic client-side apps vs data-driven static sites).  Next.js seems to offer an interesting alternative, with lots of good decisions already made for me and excellent developer experience, but without a strictness that would limit me from customizing the things I have to.  I was excited by what I read about the version 10 release, and wanted to give it a try.

Things that I like about Next.js:

  • Their "zero config" really is exactly that.  I didn't have to spend any time on setup or fighting with configs.
  • The choice between server-side rendering (SSR), pre-rendering at build time (SSG), or client-side rendering.  I use a mix of pre-rendering and client-side rendering, and it works great.  When I'm done I use npm run build and npm run export and I have a statically built out/ directory that Begin can upload to S3.
  • useSWR is perhaps the best data fetching library I've ever used.  Period.  I absolutely love it, and I'll use it on every React app I build in the future.
  • The filesystem routing is easy to use.  Drop a file in pages/ and it's a page in the app.
  • I love that all static assets in public/ are automatically available at the root within the web app (e.g., public/favicon.ico is href="/favicon.ico").

Honestly, there is so little Next.js code in my repo that it's hard to discuss it or even find it as I scroll through the repo!  Everything is just my React app, with a few cli tools I don't have to configure.  This is what I want.

Things that I found confusing or difficult with Next.js:

  • A lot of the awesome things you read about Next.js 10 doing require a server.  For example, the component and automatic image optimization is something I was excited to try.  In Gatsby I've loved using the automatic build-time image magic it offers.  However, it turns out that you have to render these images on a server, which breaks with my serverless approach.  Another example is asset compression.  The docs claim you can gzip your text assets.  However, dig a little deeper and this is offloaded to your serverless provider.  I'd love for Next.js to embrace a bit more of what Gatsby does for static optimizations.  Side note: why is this not happening automatically for me with Begin?
  • I initially really enjoyed the simplicity of the Next.js Router.  However, a few weeks into the project, I started to run into problems.  For example, scroll position restoration when navigating between pages is horribly broken.  I had to write my own custom scroll restoration code, which was a total pain and waste of time.  If next.js is going to call them "pages" it really needs to track scroll position between navigations like a regular web page does.  I also had problems getting Next.js and Begin to play nice with deep linking into my app.  For example, I have a page called /map but going directly to that page renders the home page.  I'm not sure whose bug this is, Begin, Next.js, or mine, but I'd like it fixed.
  • I had to write my own custom dev server to get Begin's sandbox and Next.js to play nicely together locally.  With create-react-app, proxying a backend is already baked in. It was a bit annoying to have to stop work on my project in order to implement this myself.  Again, I think that Next.js assumes you have a server, and my use case doesn't seem to be their primary one.  It would be good if they put the serverless use case on an equal footing.  There is a serverless build target, but it didn't do what I wanted (or I don't understand how to leverage it, yet).
  • I don't like having to choose between React and HTML.  Next.js assumes you're only working with React components.  Yes, I want to use React components, but I also care a lot about the HTML that surrounds them.  Next.js lets you escape this and override the HTML, but it's not the default.

I'd use Next.js again.  It's closer to what I want than Gatsby or create-react-app.  I love how minimal it is (a few CLI calls, some components, and hooks). But I also think there's still room for another "React Distro" that does some things differently.  Maybe the type of web projects I want to build are the problem, but I really enjoy making web sites and apps at the same time.  I don't want to choose.  I want both.

Conclusion: Stay Safe and Go Find Some Owls

As we enter our tenth month of the pandemic, I wanted to make something for the current moment.  Christmas won't be the same this year: we won't be able to celebrate or visit our parents, siblings, or their families; I can't get together with any friends for a meal; and many of the usual traditions our family has are off the table.  I'm sad at all of it.

I can't fix any of this, but I wanted to do something to give some small bit of joy over the holidays.  While the pandemic forces us to avoid each other, we're still allowed to go outside, to drive in the country, to walk in the park or along the shoreline, and to look for Snowy Owls.

As I was finishing up the app's code, I noticed that a new owl had been spotted 15 minutes from our house.  My wife and I drove off into the falling snow in search of it, creeping along an old fence line stretched across a farmer's field.  It was really beautiful to be out, to be hopeful, and to be focused on what is yet to come.

Merry Christmas.

by David Humphrey at Mon Dec 21 2020 14:39:30 GMT+0000 (Coordinated Universal Time)

Sunday, December 20, 2020


Chris Pinkney

Things I'd like to learn by next year

Hoping this will be an annual thing.

Here are several things I'd like to learn by this time next year (19th December 2021):

  • More DSA / Leetcoding
  • Better Python
  • Java
  • CTCI / EPI

by Chris Pinkney at Sun Dec 20 2020 03:12:19 GMT+0000 (Coordinated Universal Time)

Wednesday, December 16, 2020


Krystyna Lopez

Java Console App with AWS and JDBC as a database connector

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. It means that anybody can go to my AWS account and use that database etc. So how to set up Environmental Variables for the class where we need to use a cloud database.

In SpringTool

Run Configurations ...

You should see this screen



Next select Environment. On the left side, we pick .java files for which we need to set up environmental variables.

Press Add. Provide with name and value. I name them DB_URL, DB_USER, and DB_PASSWORD.
If I connect to my AWS cloud database, I use a URL from the AWS account that is under the database endpoint connection. USER and PASSWORD are credentials that were set up when we create our database on AWS.  
Environmental variables set up.

Problem 2. 

Database handling in Java. In my application, I separated controllers, services (business logic), and repositories (database handling). In my repositories, I created files that will be managing data. I use simple queries to manipulate data create, update, select. All the logic once the data is retrieved is residing on the service layer. 
Steps to manipulate data. 

1) I have to create a connection to my ConnectionFactory file.
2) Creating methods to create, update, or select.
In the methods, I must initialize my Connection by calling the getConnection method. In my case, I use only one connection, while in real-world applications, I will have to manage multiple threads because there will be more than one connection.
Once the connection initialized, I have created a string 

`String sql = "select * from account where account_user=?;";`
account is my table name, and account_user is the name of the column in the table account

I used parameter for an account_user, and that is why I have to use 

`PreparedStatement getUser=conn.prepareStatement(sql);
getUser.setInt(1, customerID);
                  ResultSet res=getUser.executeQuery();`

PreparedSatement design for parameters in SQL string as well as increase performance. 
`setInt(1, customerID);` will set our parameter with value we pass, in my case it is customerID. The result will be store in the object of a specific type. 
`executeQuery()` - will run this statement and pull data from the database.

A tip to keep in mind. 
If I set my auto-commit to false, I will change it to true once the transaction complete.
`conn.setAutoCommit(false); `
`conn.setAutoCommit(true);`

I set AutoCommit to false only when I update or create objects. If the values I am passing to the database are not accurate, the transaction will not occur.

by Krystyna Lopez at Wed Dec 16 2020 20:09:49 GMT+0000 (Coordinated Universal Time)

Tuesday, December 15, 2020


Abdulbasid Guled

4 months of open source. What I've learned from taking DPS909 and what I plan to do about DPS911 next month

Topics in Open Source Development, or DPS909 for short. It's been an up and down rollar coaster of some sort. I originally picked this course because one of my colleagues and close friend, Mo, recommended me to take this class after having a conversation with the professor of this course, David Humphrey. I didn't think too much about it at the time, since I was missing the Java course necessary to take this class (BTP400). I wasn't even too sure about what professional options course I was going to take this fall semester too. Most of the ones offered this time weren't to my liking. I would've taken iOS development and took advantage of the iMacs in the computing commons to do my work there, but the global pandemic made that impossible. The game related courses weren't to my liking and the robotics class would've been much better in person than online. Ultimately, DPS909 was the outlier and seeing how passionate Mo was for this class, I figured I had nothing to lose. I went in and enrolled in this class.

The course seemed to be tailored to online learning before the pandemic made it a reality too. The lectures were provided asynchronously, allowing us to focus on our other classes and lives while having an opportunity to go over the topics for each week. The main thing though was to be as vocal as possible in this class compared to other classes that I've taken until this point. Being vocal is not something I enjoy doing unless it's with a group of people that I'm comfortable being with. The same can also be said with being a leader. If I have to lead, I'll do it, but my introverted nature naturally leads me to being that guy in the back that does what he needs to do and not let anyone else down. I had to adjust that mentally here.

I think that DPS909 is a course that should be integrated into the curriculum here in BSD. A lot of what was taught in this course were relevant to technologies that we'd have to use in the real world. GitHub was the core engine that kept everything together, but the little stuff like CI/CD or the linters and formatters that help keep the styling of the code nice and consistent. BSD to me seems to be very resistant to change for reasons that I don't know and don't wish to speculate on. Until I did DPS909, the only course that felt remotely like what we'd be handling career-wise was the web programming courses, and that's also subjective too. Someone that wants to work on the backend would prefer the linux systems development pro option course, which I'm ironically taking next winter semester too. One thing me and my colleagues agree though for sure, is that the financial accounting class is unnecessary and that we have way too many writing/presentation courses. For example, BTC240 is focused on building up interpersonal communication, so why is it that we need a separate presentation course the following semester, LSP400 (Previously BTC340). Likewise, the financial accounting aspects could be a part of the business course we did this semester. Either way, you get the point. Open Source Development was the first course in which topics that were covered were relevant to what real life software developers would have to deal with.

This leads into the 4 releases. I did well in the first one, okay in the second one, terrible in the third one, and okay on the fourth one. I think the releases were designed well and actively encouraged you to have discussions on what you're trying to accomplish and how. After all, this course is built on discussions. The same can also be said of the labs. I liked how it forces you to take the first release and continue working on it until you have it ready to be released and shared to the public. It's not perfect, but it's a project that can continue to be worked on. The same practices can be made with any open source project, which I find very valuable.

Overall, my experiences with DPS909 were very positive. Even when I was down, I tried to work my way back up. Today, I found out my final grade for the course and I'm satisfied with what I got. This course is a lot of work you must do, but it's also work that's satisfying to accomplish. That's how I felt as I made my PR for release 0.4. I plan to use the next day or so to relax, before I turn my attention to fixing the PR to have it ready to be merged. It's not everyday that I work on something outside of school, but that's what we have here with open source. The open source life continues onwards.

Lastly, I'll try and talk about my approach to DPS911, the follow-up course. It seems that not too many students took it. As of Tuesday December 15, 2020, only 4 students, including myself, enrolled in DPS911. I'm not sure about the numbers for the CPA equivalent, OSD700, but I'm sure it'll be a similar amount. This means that the group will be much smaller than any course I've ever taken. In addition, we'll have to continue working on projects, working towards releases every few weeks. It's a time commitment that's needed in order to do well. What makes this harder for me is that I also enrolled in 2 other pro options courses, linux systems development, and cross-platform mobile app development. Along with the 4 mandatory semester 6 classes and my work-term prep course, this adds to a total of 8 classes, 7 since WTP200 is probably not a course imo. This is a very demanding schedule, and the level of time management I'll need will be incredible. I'll probably drop a course or 2 at some point, which will alleviate the stress and give me more time to focus on the classes I didn't drop. At the end of the day, the simplest approach is effective time management and communication between my colleagues and professors. I'll be asked to work on issues that may seem hard to be at first. I'll have to ask a lot of questions on the PR/issues thread and the slack channels. It's gonna be a challenge, and one that I'm happy to accept. More than just building up my resume for my coop in the summer, I can gain valuable experience working with relevant technologies and industry practices that will be valuable to me. I also need to keep reminding myself, that failure does not ever define who I am. It's how I come back from failure that shows what I'm really capable of. Without the failures I've had until now, I wouldn't be the person I am today. So I'm ready to continue learning, practicing, and developing the skills needed to be successful in the industry.

Right now though, I'd like to relax and play some video games. Next time, a whole new adventure awaits us in DPS911. I wonder what new challenges the course will bring to us. As always, stay tuned! See you all in 4 weeks!

by Abdulbasid Guled at Tue Dec 15 2020 20:46:49 GMT+0000 (Coordinated Universal Time)

Monday, December 14, 2020


Joel Azwar

Release 0.4 : The End (of OSD600)

This will be my last post written for my OSD600 course, after that, every post will be about my own journey in programming. And so I wanted to say that this course, out of all the classes I've taken so far in Seneca College for my program (CPA), is by far the absolute best course I've had in the school. The topics it covers, the knowledge it teaches, and the practicality of it is just exceptional. I've learnt so much from this course, from both the professor and my own, and that's thanks to Prof. David Humphrey's mentoring. He not only taught us how to use GitHub, make pull requests, and use Git, which I should mention is one of the most well taught guides on how to use it and I recommend anyone to watch his recorded lectures on his YouTube channel, but he also taught us how to go out on our own and expand our knowledge through the beauty of Open Source Programming. With this newfound knowledge I've acquired from the class, I'm much more confident and eager to continue to grow as a programmer and as a contributor in the open source community. My only regret is that my work ethics kind of fell of towards the end of the semester and I wasn't able to or didn't give my full 100% effort in the final assignments. Though I won't let that hold me back from the things I did learn from the rest of the course.

There's so much more I could say about the outstanding quality of the course but I'm sure you can hear it from the rest of my peers taking the same course on Telescope where you can read about their blogs.

So back to the main topic, Release 0.4! I've finished all that I could before the submission date (which shout out to Prof. H who gave me an extension) And I'm a bit disappointed since I wasn't able to complete one component that I set out to port for telescope. But I want to talk about the efforts that I did put into my attempt.

Dynamic Image

The DynamicImage component was much more complicated then when I thought it was when I first started trying to port this component. Especially compared to the other 2 components that I worked on. DynamicImage is used in the landing page of telescope to present randomised splash photos taken from a website using an API. This component is initially coded in a gatsby opiniated method using gatsby components and graphql to query data. This makes porting it to Next much more complicated since data fetching compared to Gatsby is a whole another topic that I tried to learn in a weekend and failed to. But that's not to say I didn't learn anything, I somewhat figured out how graphql works with gatsby and how Telescope queries images for the component, and I tried my best to figure out how to convert it to Next Js.

The Gatsby front end included a file called gatsby-node.js that fetches the splash images used in the Dynamic Image component, so that was an extra component to port.

This was a great reference in understanding how to implement graphql in Next Js


The original Dynamic Image Gatsby component used other components such as StaticQuery and graphql from the gatsby module. The 'graphql' module used to code GraphQL queries was easy to replace, using the apollo-server-micro module commonly used as a substitute. But the static query was something that had to be rebuilt when porting to next js, since it queried data much differently in its Gatsby counterpart.

The Image component used in the current front end is also taken from the gatsby/image module, Next JS has its own image that the migration guide recommended to change to, but the props are different to since the gatsby image component worked in conjunction with the StaticQuery component

Safe to say this wasn't a topic to be crammed in a weekend and so as much progress as I tried to make, it was still way out of my reach.

BackToTopButton & GitHubContributorCard

The other two components thankfully were simpler to port and mostly consisted of dependencies added in the package json and converting the components to typescript/tsx. But I know the whole migration process is a slow and gradual one that requires the cooperation of with the open source community of the repo. So there's still lots still left to do. 


I wish I hadn't ended my final assignment in OSD600 this way, but I know that my work in open source doesn't end here, in fact it pretty much starts here. Even if I hadn't finished the work I set out to do now (I mean my PRs are still yet to be reviewed! Lots to followup still) I'm still looking forward to contributing to more open source repos starting with Telescope.

The telescope slack page


Thanks for reading

by Joel Azwar at Mon Dec 14 2020 11:35:00 GMT+0000 (Coordinated Universal Time)


Abu Zayed Kazi

Release 0.4 – Post

Release 0.4 has been an amazing experience. In this post, I will talk about my reflection towards the work I have done for Release 0.4. This will also be my last blog for OSD600.

For Release 0.4, we were tasked to contribute to issues that were harder than any issues ever done in this semester. I have written blogs on both my planning and progress on the issues. I basically worked on a family of issues that would help the developers and the users of Dragon6-API pull their game-profile data.

My first impressions with this project was “Wow, there is so much happening here!”. I started contributing to this project on Hactoberfest and back then the issues were smaller. I couldn’t test the application to know what the methods were doing (since I don’t play Rainbow Six Siege) but the tasks were small enough for me to create a PR and move on. When I came back for Release 0.4, the owner gave me the option to contribute to either Orbit-API or Dragon6-API. Orbit-API is also an application that pull a gamer’s stats, but for a game call osu!. The issue proposed requires a developer to have played the game. Since it’s a unique point-and-click sort of game I chose to stick with Dragon6-API. To be honest, I am glad I chose something familiar since it gave me a second-chance to work on a project the right way. I have spoke about experience on the issues I contributed in this blog here.

Overall, I am happy with what I have pushed to the project and the new stuffs I have learned in C#. A big thank you to David Humphrey for being an amazing teacher for OSD600. I felt this course would have been a lot harder if it weren’t for his welcoming and encouraging style of teaching throughout all his lecture in this semester. Thanks to my classmates and the Telescope community in the Slack channel that answered my questions and curiosities. And thank You for reading my posts as I share my experience on C# throughout this semester.

Stay safe and stay healthy. Until next time.

by Abu Zayed Kazi at Mon Dec 14 2020 04:36:06 GMT+0000 (Coordinated Universal Time)

Sunday, December 13, 2020


Muskan Shinh

Release 0.3 Finale

As discussed before, I submitted 3 Pull Requests for 3 issues that I created myself. The issues were to implement the following routes:

  • GET api/users
  • GET api/users/s/:username
  • DELEE api/users/:id

I thought that these issues would be enough work for Release 0.4. But then I realized that I had time and there was no harm in being safe and submitting more Pull Requests.

I thought it’s a good opportunity to get my newly developed testing skills on work. I decided I will submit tests for the routes I created.

The testing framework was already setup, so I didn’t have to do much in that area. The framework used was Mocha.

Testing GET all users

I created the issue. Then I implemented a test for the route GET api/users.

I wrote the test under the test folder in the project directory and wrote the following test:

/**
 * Testing get users
 */
describe('GET /api/users', function () {
    it('respond with all the users', function (done) {
        request(app)
            .get('/api/users')
            .set('Accept', 'application/json')
            .expect('Content-Type', /json/)
            .expect(200, done)
    });
});

I submitted the Pull Request for the issue.

Testing GET users by username

The next issue I created was to write test to test the GET api/users/:s/username route.

I wrote the following test:

/**
  * Testing get user by username
  */
 describe('GET /api/users/s/:search', function () {
     it('check with invalid user name', function (done) {
         request(app)
             .get('/api/users/s/:search')
             .set('Accept', 'application/json')
             .expect('Content-Type', /json/)
             .end(function(err, response) {
                 if (err) { return done(err); }
                 assert.strictEqual(response.status, 400);
                 done();
             });
     });
 });

I submitted the Pull Request to this issue.

What I learnt?

I am very glad I enrolled in this course and it has helped me gain confidence in my skills, learn new things, be more vocal about things. The best thing I am taking away from this course is this Project. I am so involved and curious about this and I have decided that I will continue to contribute this project after this course as well. I believe I had started contributing to this project when when the fundamental structure wasn’t finished. I would love to see it grow and contribute to it with the best of my capabilities.

by Muskan Shinh at Sun Dec 13 2020 23:12:42 GMT+0000 (Coordinated Universal Time)

Release 0.4 Progress

As discussed in my previous blog, I planned to work on backend routes of the project. Release 0.4 required to make a relatively bigger contribution to a project. Since implement a backend route wouldn’t count as a “big” contribution, I decided to work on family of issues. I decided to work on

  • Create a new issue – add login route with authentication
  • Second issue – adding route to get user by id
  • Third issue – adding validation for registration

As I was looking at the backend to understand it and how should I fix the above issues, I realized that I was going to need user backend routes in order to implement login route. I’ll be honest here, I am not sure if that is correct. But while I was trying to figure out I just thought maybe I am gonna need the user backend routes as well. So, I stopped and there and hovered over to the userRouter file. I thought okay, maybe I will work on the second issue i.e. add route to get user by id. I looked at the file and I saw that the route had already been implemented. Ahhhh, I felt so bad.

Get All Users

The only two routes in the userRouter were:

  • POST /api/user – to add a new user
  • GET /api/user/:id – to get a user by id

I decided that I am going to write a backend route for fetching all users i.e. GET /api/users. I tested my route on Postman by first making a POST request to add user “John Doe”

{
  "username": "John Doe",
  "password": "test123"
}

I then made a GET request to fetch all users and the response gave an array with one user details.

It worked well so I made a Pull Request for this issue.

After fixing that issue, I realized that the userRouter doesn’t have all the necessary routes to manage the user. Just seeing that I couldn’t hold myself back. At that moment my pre-decided issues, my goal was to fix them, changed. I decided what I want to contribute for this project was to add all the necessary routes for userRouter.

Search a User by Username

Next issue I opened was to implement route to search for a user by username. This would return a user array with all users with matching username. This issue wasn’t too hard but I had to do little thinking about the route that was to be made. I mean, I couldn’t simply make a route such as – GET api/users/:username.

Why? Because it was similar to the GET route to get a user by id. So, I decided that the route for this could be GET api/users/s/:username. I implemented this route and it worked well! I then made a Pull Request for it.

Delete a User

The next issue was to delete a user using id. For this, the route was DELETE api/users/:id

I implemented the route and it seemed good to me. Now, I had to test it. In order to test it, first I made a GET request to get all users in the database. This gave me the following response.

I then sent the following request

DELETE api/users/:id with id matching the id of user “muskan”. This gave me the following response “OK“.


I believed that the route worked and the user has been deleted but to double check I made the GET all users request again. And got the following array of user objects. The user had been deleted.

I submitted Pull Request for the issue.

by Muskan Shinh at Sun Dec 13 2020 22:52:27 GMT+0000 (Coordinated Universal Time)


Royce Ayroso-Ong

Maslow-Fulfilled Last Update

A final report on my progress

https://cdn.psychologytoday.com/sites/default/files/styles/amp_metadata_content_image_min_1200px_wide/public/field_blog_entry_images/Finish-line.jpg?itok=pDZbm3ms

Hey guys! I can’t believe that my endeavor to contribute to NesaByte’s Maslow-Fulfilled is coming to an end. I am proud to say that I overcame my earlier challenges to deliver a feature to allow NesaByte’s app to read from a local JSON file and populate the calendar and homepage progress bars. I am quite happy with the results, they both work as I intended. I believe that I can truly say that I have achieved my goals of contributing an appreciated, bug-free feature and I want to thank NesaByte herself for helping me work on her project whenever I got stuck.

The Nitty and the Gritty

I’ll quickly go over each pull request and discuss the technicalities behind each feature. For the calendar markers, I first created some mock data (hard coded dates to test with) and then created a map (used to map data) to essentially build a list of events- which can be now be seen on the calendar.

Progress bar code example

As for the progress bar, Flutter uses Material UI (which provides a host of widgets to import and use). I changed what NesaByte currently had, which was just a simple CircularPercentIndicator object and switched it to multiple LinearPercentIndicators, all stacked on top of each other in a pyramid style (see example) to better fit the theme of her app.

Essentially, I created padding objects with the LinearPercentIndicators as it’s child to display the progress bar. The padding allows for space between each progress bar. In the above example, you can see the attributes that one can modify to change the look and behavior of each progress bar.

Moving on, I added code to be able to read from a JSON file (see image to the left). This allows me to read and then build/extract data to be used in the progress bars. Additionally, I created a JSON file in the projects asset folder to hold mock data that I used to test to see if it worked. Before, each progress bar had a hard coded value for it’s percentage, but now I can read from an array built from the JSON file.

Percentage containing hard-coded data.
Percentage being read from an array built from the JSON file.

What did I learn?

I learned a little bit more of what Flutter can offer regarding it’s widgets and functionality. By experimenting with different ways to display data (changing from the circular to linear indicator), I can now build apps with varying UI’s that can also read from the phones local files. I also learned a little bit more about good communication; being able to befriend and message NesaByte allowed me to complete features to her liking. Furthermore, whenever I got stuck on parts of the app that I didn’t understand, she was able to quickly hop on and walk me through her code. I think after all of this, I have realized that there is no shame in getting help from others- and if you can you should always reach out when stuck.

by Royce Ayroso-Ong at Sun Dec 13 2020 18:57:28 GMT+0000 (Coordinated Universal Time)

Maslow-Fulfilled Update

Hey everyone, this blog is just a quick update on my progress on NesaByte’s Maslow-Fulfilled. I just wanted to say that so far, everything is going according to plan. I followed up on three issues: add calendar marker, redesign progress bar, and read from JSON file. As of writing this update, I have already completed working on the calendar marker and the progress bar (pr for marker, and pr for progress bar).

Despite completing the first two features that I planned, I have realized that I need data for my newly created progress bars to have any sort of purpose. That’s where my third planned feature - being able to read from a JSON file - comes into play. However, reading from a file in a newly acquired language has proved slightly difficult for me.

That being said, I feel proud that I have managed to actually complete both of my first features to NesaByte’s satisfaction. In order to fulfill my goals of contributing bug-less features to her project, I still have to make a third tester for the JSON file reader. I may adjust my priorities and iron out a more robust tester for the first two features to truly make sure that what I have contributed so far does not produce any undesirable results.

by Royce Ayroso-Ong at Sun Dec 13 2020 17:49:37 GMT+0000 (Coordinated Universal Time)

NesaByte’s Maslow-Fulfilled

A quick check on life’s needs

https://www.verywellmind.com/thmb/upCPDuqVUUA7tU4-ALTApHN7NCk=/1000x1000/smart/filters:no_upscale()/4136760-article-what-is-maslows-hierarchy-of-needs-5a97179aeb97de003668392e.png

Why I decided to Work on NesaByte’s Maslow-Fulfilled

During my previous semester at school, I realized that when things get a bit hectic and stressful I often lose track of my own physical and mental health. This was especially apparent when I refused to take time off of work even though I was struggling to balance it with school. That’s why I decided to work on NesaByte’s Maslow-Fulfilled- I think that making Maslow’s hierarchy of needs more accessible via an app can be very useful as a quick life priority check.

What Features to Add

To begin, I want to add some quality of life improvements, page redesigns, and added functionality when reading data. More specifically, I want to add some sort of marker for calendar events, that way you (the user) will know which days you’ve entered data. Furthermore, I would like to redesign the homepage to use a stylized progress bar to display the user’s status. Lastly, I would like to add a way for the app to read data from a JSON file instead of having the values be hard coded as a JSON table somewhere.

Goal Setting

In my quest to learn Flutter, I really want my contributions to NesaByte’s project to be fully functional, appreciated, and bug free. To go about achieving this, I will make my own test files to check the code that I write at every step of the way. Hopefully, by fostering good communication with the project author I can add contributions that she appreciates and desires.

by Royce Ayroso-Ong at Sun Dec 13 2020 01:17:59 GMT+0000 (Coordinated Universal Time)


Joel Azwar

Release 0.4 : Migration Progress

So for the past week I've been working on and off with migrating the components for telescope I've taken from the list that needs porting. 

The Components I've undertaken are

  • BackToTopButton
  • GitHubContributorCard
  • DynamicImage
I was hoping to work on one of the Search components since I've spent so much time previously working on them, but it looks like some of my other peers have already beat me to it. Nevertheless, I still wanted to help with the migration as much as I can.

So I used this reference our professor had posted in the Meta issue regarding migrating from Gatsby to Next JS.

The first thing to do is to edit the dependencies in the package.json, since it's different than the one used for the Gatsby front-end. We will still need the Material UI modules for our front end, but all the gatsby dependencies will now be removed in place of something else.

For example, the Image component used from gatsby-image will now be replaced with next/image. Where as in build times, the images are optimised using the gatsby-image component, with the next/image component images are optimised on demand when they are requested.




Querying data is also different and I'm currently in the process of trying to migrate components such like StaticQuery and graphql from gatsby to its next counterparts.

As for the other 2 components, they were fairly simple, but usually that's a sign that there's a lot more to be done. What I've done so far is kept the most of the code the same but changed the way functions and objects are coded to its typescript version. So declaring variables is slightly different. Now, I'm waiting for them to be reviewed by the other maintainers of the repo for their input.


So far I feel like I'm making progress but I just know this is going to be harder than it seems.

Thanks for reading

by Joel Azwar at Sun Dec 13 2020 11:25:00 GMT+0000 (Coordinated Universal Time)


Abdul Abdi

The End of Release 0.4

To finish separating the code into modules I had to take some time to approach how I was going to deal with passing all the data that needed to move around. After reviewing the code, I found that the biggest barrier to moving the code was that a lot of functions passed data that it didn't necessarily need to use to another function that was called in it. I believe this is why the owner of the project decided to use global variables to provide a solution to this issue. But with how I wanted to arrange the modules using global variables would not work so I needed to find a way another to get around this. 

I tried a few different solutions to this problem. The first thing I tried was to try cutting down on the number of functions that were used by repurposing a few functions so that they could be reused more than once. This worked for a few functions but the way the code was written it didnt really solve the problem as the amount of parameters the functions started to have were getting to be too much, as well as the functions becoming bloated and overcomplicated. After reviewing the code once more and arranging the code a little differently, I noticed that most of these variables that needed global access were being created in the initialization functions I had moved to an initialization module. With this information I decided that it would be best to create an initialization dictionary that would hold all the data that would be used by the further module. This way that dictionary could easily be passed as one variable and the needed information can be used or passed again using the keys in the dictionary. 

Once I had decided on using the dictionary solution, I went ahead and started work on removing the global variables and the ways they were used with the initialization dictionary and adding parameters to functions were needed. When I had completed that I made sure that all the imports were correct and the modules were working correctly. I did some tests to make sure the app was working as intended and made my pull request

In the end, I was able to learn a lot about reading and repurposing code that I didnt write in this release. When you write code yourself you take for granted the logic you write and may not take the time that is needed to make sure the code is readable to others. I was also able to learn the importance of modularity and making code as compact as possible. Overall, it was a good experience for a project I think is worthwhile and is something I would definitely like to continue working with the repo owner on going forward. 

This being the last release/post for my open source development I also wanted to say that I learned a lot about myself and what it takes to do software development especially open source development. I was able to learn how to use git and github in a much broader way compared to the very basic push and pull knowledge I had going into the course. I was also able to learn and gain confidence in approaching other developers for projects to work and overcome some of the imposter syndrome I feel sometimes. Its still something I struggle with but with this course I was able to identify those feelings quicker and get over it a little better. Finally and probably the biggest lesson I learned was the value of time management and managing setbacks. I didnt really succeed with the time management or approach to setbacks this semester but I was able to learn through consequences that the approach to setbacks is make immediate and constant communications and adapt and make new timelines from there. I am hoping I can apply that knowledge better moving forward.

I would like to thank all my classmates and my professor, David Humphrey, for a great learning experience even though I may have not interacted with you all as much as I should have, I would like anyone reading this to know that I was reading a lot of your blogs or posts on slack and I learned a lot. 


by Abdul Abdi at Sun Dec 13 2020 08:37:00 GMT+0000 (Coordinated Universal Time)


Jason Jiang

Release 0.4 Completed

    This is the final blog post for this semester. I've finished and sent out a Pull Request for my Issue on Import Youtube Playlist Feature. There were some changes in terms of how the items are returned as items, and due to that, the number of items in a valid playlist will be reduced to 100 items.

    In this project, I spent a lot of time going through routes and components, as well as how the frontend gets data from its server by using Axio HTTP requests. I got the UI part of the issue done relatively quick due to me getting quite used to making react components, but the majority of the time was spent on knowing how Youtube API will work as well as how I can set up an API endpoint in the server for the data that I will need to retrieve for my feature.

    Basically, the user will enter the playlist's URL into the input box and that string of URL will be passed to a function on click and concatenated to the server's API path where an Axios request will be made to call the server side's function that identifies the URL with Regex and then cut the string to get the playlist Id. The Id will be passed through an npm package named yt-search, which is a web scraper that returns in object format all the videos featured in the playlist. This method does not require me to make usage of an API key and is quite straightforward in terms of logic and steps need, one downside is that the tool only accepts playlists with under 100 videos for unknown reasons.

    I asked the repository's owner about this and he seemed to be ok with accepting small playlists only because this is the first time the feature is being implemented and nothing else inside the project uses Google API. I am very grateful to Ian (The repository owner) for his willingness to help me out and point me in the right direction when I am lost in the code as to where things go throughout the entire time I was working on the feature.

    I learned the basics of how data transfer from server to frontend as well as basic API requests in this project, and I am planning to stay notified about this project for future issues that I can work on or help out at.



    I'm glad that I took the Open Source Development course, I've learned a bunch of things about web development along with Git commands from every assignment. I will definitely continue to make contributions on Github to grow more as a programmer.

by Jason Jiang at Sun Dec 13 2020 07:49:08 GMT+0000 (Coordinated Universal Time)

Release 0.4 - qasong Import Youtube Playlist

     I have started working on the Issue after the repository's owner Ian had assigned it to me. As of now, I could say that I am about 40 percent to finish adding this feature. So far I added a new component inside the Navbar's menu which when clicked will show a dialog box prompting for a Youtube playlist URL.

    The input box's value will be passed to another function that accesses the server to generate an object containing the Youtube playlist's items in the same format as qasong's queue items. If the URL is blank or invalid, an error message will appear above the button to notify the user.




    As for how to get the playlist's items, I learned that you could access data from Youtube links by utilizing Google API's Youtube API. One problem that came up is that it requires the use of an API key that is created from Google Developer Projects which might hit a limit for the number of requests allowed to be made. I then tried to use several npm packages that handle Youtube URLs. Packages like youtube-playlist-summary, yt-search, and youtube-playlist. youtube-playlist what I tried to use initially, but it kept returning an error whenever I passed.

    For now, I decided to wait for the repository's owner''s reply to my question about using API inside his project.

by Jason Jiang at Sun Dec 13 2020 04:28:43 GMT+0000 (Coordinated Universal Time)


Matthew Ross

The End of the Beginning - Release 0.4 pt. 3

It's finally here! My completion of Release 0.4 is at hand!

Before we dive into the technical aspects of this issue and the features I built for ContestReminder, I would like to begin by reflecting on the goals I set for this work.

The first piece of the puzzle I set out to make was a Profile page for the logged in user, where they could choose from a list of Code Contests to determine which ones they received notifications for. To save this list to their account, I chose to create a button that would handle the submitting of the form and refreshing the Profile page.

This goal was completed with a few hiccups when it came to determining the logged in user. This was the hardest aspect of the project, since user authorization has always been something that eluded me, and will be something I strive to tackle head-on as I continue my career. For now, learning on way to do it with Django and Python was nice to add to the toolbelt. While I first thought that using an implemented 'sessions' attribute was my way to go, it was only one of the many paths I could have taken. Thanks to the help from repo owners codestromer and omiz_1812, I was able to piece together what I needed to accomplish this feat. Their helpful notes can be found here and here.

From there, taking the knowledge I had gained from creating the Profile page, it was time to take on the next hurdle to overcome. I next had to create a Delete Account page, where (you guessed it) the user would be given the option to delete their account. From the Profile page, I placed another button beside the Update button, which would redirect the user to the confirmation page. On this page, the user was left with 2 options: return back to the Profile page, or proceed with the account deletion. Upon deletion, the user would then be logged out, and all trace of that account would get lost in the void, never to be recovered again (deleted, gone, eliminated, GOODBYE!).

Now, I did have a third optional goal that I had initially made for myself, which was to email the user about the changes/deletion of the account. In the end, I decided to skip out on it due to time constraints. I may revisit that option in the future though, since I would like to continue to help the repository grow.

Now to the juicy parts: here are the 5 files that I needed to create/make alterations on for all of this to work.

users/urls.py: Within this file, I needed to include the 2 new views that I created (ProfileView and DeleteUserView) to be able to use them in my paths (line 9).

Also, I needed to import a decorator to allow me to restrict users that weren't logged in from accessing these pages (line 8).

I then created the paths for these Class-based views and provided the appropriate names (lines 15 and 16).

Loading https://gist.github.com/matt-ross16/fe401c5b89b8ea44bb02545cf068b23c....

users/views.py: To start, I needed to import a couple of basic Django view types (UpdateView and DeleteView) so that I could carry out the necessary functions for my Profile and DeleteUser views (line 10).

Next, I imported the CustomUserChangeForm that was made to handle profile update tasks, as well as the CustomUser model, structures how this data will be handled (lines 13 and 14).

Finally, the views themselves are set up. Both follow a similar structure:

1) The user model is set up (lines 22 and 31)
2) On success, the URL that is to be redirected to is specified (lines 24 and 32)
3) The template name for the corresponding HTML file is assigned (lines 25 and 33)
4) The current user object is returned to the class for use (lines 27-28 and 35-36)

The only difference between the two is on line 23, where the necessary form class (CustomUserChangeForm) is set.

Loading https://gist.github.com/matt-ross16/9053a3679d54da9a9254fa91f2a2f93e....

home.html: The only change needed to be made here was the addition of a button to redirect the logged-in user to their profile page (line 10)

Loading https://gist.github.com/matt-ross16/247b29b266441931c3bd8c6dd0e46da7....

delete.html: Within this template, only a few things are different from the normal template structure:

1) The block title reflects what page we are on (line 10)
2) A form is set up to post the necessary information on deletion (lines 16-30)
3) A csrf_token (Cross Site Request Forgery) is used as protection from CSRF attacks (line 17)
4) A heading, followed by two buttons are used for the functions of this page (return to profile and delete account (lines 18-22)

Loading https://gist.github.com/matt-ross16/4a60acb....

profile.html: Much like the delete.html file, this template follows a familiar structure. The unique parts of this HTML file are as follows:

1) If there is an error in parts of the form, an error message will be displayed on the screen (lines 19-21)
2) Each form field is looped through and displayed, along with the necessary tags and input options (in this case, checkboxes) (lines 25-29)

Loading https://gist.github.com/matt-ross16/03f2836....


And that's it! A working Profile and Delete set of options are now available for the app, and all of it's users!

Hopefully you enjoyed this series of posts, and were able to take away some knowledge from it!

by Matthew Ross at Sun Dec 13 2020 06:40:01 GMT+0000 (Coordinated Universal Time)

Saturday, December 12, 2020


Abu Zayed Kazi

Release 0.4 – Progress

Right off the bat, Release 0.4 did not go as expected. In my previous blog, I mentioned how I will be looking at unit tests and following the execution of the code to understand how the application does its thing. This bit of experience has helped me, but not how I had hoped. In this blog, I will talk about my contributions to the Dragon6-API project‘s issues.

In my planning post, I mentioned working with JSON files and the possibility of working on some new exciting features for the API. Unfortunately, none of that happened, yet. The new issue that I was supposed to work on would lead to a lot of complications in the existing program; possibly crashing the program and rendering it unusable. So issue#172 (the new issue) will be kept on hold before a new repository is ready to cherry-pick the new stuff into the new repo. Because of this decision, the owner of this repo has decided to create refactoring issues to revert certain changes back to how it looked like. So, it’s not the refactoring that I had in mind but a different kind.

Let’s start with issue#187. This required renaming every method that had the name Classic back what it used to be. I think, Classic is the old data that the game was displaying to the gamer’s profile. Now that there is a new API (possible name could be Modern), the project was supposed to pull data from both API and my job was to figure out a way to fetch the data and filter out which data was worth displaying to the gamers. Since that project is on hold, the progress made so far must be reverted. Most of my time went towards renaming the method including the class files. On the bright side, I got the opportunity to look at what the classes were doing and how the code was fetching data from a custom library.

The second issue was an extension method that helps gamers get their user information. The owner wanted me to work on this issue if I had the time. That way, it would help him and others who were using this application to call a simple function rather than having to call the same one with empty strings in the parameter. So, I created two methods that would help get user info through the user’s name and also by userId.

As an addition, I also took the opportunity to change one of the methods to return FirstOrDefault(). This is a GetUsers method that returns the first user it gets from a list of users. FirstOrDefault() allows the program to return the first data it retrieves, if it doesn’t find the data then it returns a default data. This way there is a lower chance for the program to return a null value. The owner was pretty happy with my PR.

My third PR is a combination of two issues. Initially, I wanted to create one PR for each issue but my code prettier extension (CodeMaid) kept making changes as I was saving my work which led to an unwanted new line added to the file, which was then pushed for PR. Once I noticed that issue I tried reverting my branch back but git kept giving me errors so I decided to create a new branch for Issue#190 which will also have changes for Issue#189. Two changes in the same file combined in one PR, why not! Once the changes were made, I raised my PR which superseded my mistake PR.

The changes were merged and a new release for this application was made. I was pretty happy with the work I did.

I am still waiting for the new repo to come alive so that I can continue working on the Modern API project. If it doesn’t come up by tonight I might not have time to do the issues. Therefore, this is the end of my contribution for Release 0.4.

My last blog will wrap up my entire contribution for Release 0.4. Thank you for reading my blog. Stay safe and stay healthy!

by Abu Zayed Kazi at Sat Dec 12 2020 23:32:56 GMT+0000 (Coordinated Universal Time)


Muskan Shinh

Release 0.4 Plan

Finally, the last Release! Let’s get down to business.

After giving it loads of thought, I decided to work on the project that I contributed for two of my previous Release – 3Dev-fullstack. The idea of this project is to develop a website which is an online book library. The user can register, have his favourite books added to the account. A guest also has access to the website, for now.

In my previous two Releases, I had contributed towards the frontend part of the website. Two important aspects – Book and Login pages. Let me be honest here, I don’t know what it is but I get scared when I have to work at backend. So, I decided to face it – I decided to work on the project’s backend routes. I looked at this Release as an opportunity to overcome my fear and give my best shot to it.

by Muskan Shinh at Sat Dec 12 2020 21:44:40 GMT+0000 (Coordinated Universal Time)


Abdul Abdi

Release 0.4 Progress - Organizing the code

 After taking some time to understand the code that runs the bot, I was able to separate the code out into a few different categories that would be placed into their own files, code that creates the classes that manage the checking of reddit posts and comments, code that manages the bot streaming and posting to reddit, code that initialized the initial state of the bot and code that provides general utility to the bot. 

Once I was able to separate out all that logic, the next issue I need to tackle now is how to make the code work while flowing through these different files. Currently since the app operates in one file, the bot creator has been making use of a lot of global variables instead of constantly passing variables through several functions. I dont think this solution is ideal so I currently I am working on a more efficient solution that doesnt involve passing several variables across functions and files. I think perhaps creating a dictionary that contains critical data that can be stored and passed along instead of having several different variables. 

I also want to see if there is any option to cut down on the amount of code needed by making some functions more reusable. 

by Abdul Abdi at Sat Dec 12 2020 18:32:00 GMT+0000 (Coordinated Universal Time)

Planning for Release 0.4

 For this final release I was able to find a project that has created a reddit bot that scans titles in reddit subreddits and if it matches the criteria laid out in the code it offers the poster some useful resources and/or some great projects to begin practicing coding. I thought this was a worthwhile project as this is something that would definitely be helpful to me and it seems like a great addition to the programming  community. 

The specific issue that I wanted to work on was one were the creator of the bot had all the code for the bot basically in one python file and the file was growing to over 500 lines and he wanted to move to a more modular approach that would include separating out the logic into different files. I thought this would be a good issue to tackle because it would require me to get a full understanding of the code as well as add optimizations throughout while a separated out the code. 

The approach I plan to take is first to review the code so I can get a more complete understanding. From there I plan to start grouping the code in logical groupings and move them to their own files. Along the way I would like to add optimaztion were I can as well make sure the code is flowing through the files correctly and the imports are correct. Finally I would do some final testing to make sure that the way I split the code didnt break the code. 

by Abdul Abdi at Sat Dec 12 2020 08:13:00 GMT+0000 (Coordinated Universal Time)


Matthew Ross

The Middle of the Middle - Release 0.4 pt. 2

 Phase 1 is complete!

As an update for my progress on Release 0.4, I now have the Profile page the was requested set up, with options visible for enabling/disabling notifications for any of the Code Contest emails. Alongside that, there is a button to save the changes, and another one to delete the account itself. So far, neither of these buttons are functioning, however.

That is where the next issue comes up: I'm still trying to sort out how to check the current user within the current "session".

Since this is my first time encountering Django, I'm finding myself sorting through all sorts of docs to find the solution to my issue while I await advice from the repo owner (codestromer). So far, what I've gathered is that when the project was set up, the majority of the functionality should have been set up alongside it, which it looks like it has, since everything is where it should be (see Enabling Sessions). From there, it seems like there is very little to do aside from just using it, but I must be missing SOMETHING (also see Using sessions in views).

Once this hurdle is solved, the rest should be relatively smooth sailing, since I would then have a user to update the email notifications settings against, as well as an account to point to for deletion. I'll check back in one final time once everything is solved and go over what the final piece of the puzzle was.

Until then, take care!

by Matthew Ross at Sat Dec 12 2020 15:59:07 GMT+0000 (Coordinated Universal Time)


Ruby Anne Bautista

Release 0.4- The End

I really need to learn how to commit more often and how to write more descriptive commit messages. This was a bit challenging for me. While flutter was easier to work with than android, I still found the implementation to be difficult. Front-end things are hard for me 😅.

In any case, I was able to finally get the interface to display the questions, which made me very happy.

This is under the DailyProgress tab in the navBar. Since it’s something that the user would visit often, it makes sense for it to have it’s own dedicated page. Once you finish the quiz, it displays the following dialogue:

The results would then be calculated and displayed on the calendar. Overall, I enjoyed this endeavour. I hope to continue working with Nesa on this project. Since I found the front-end to be challenging, perhaps I could contribute more to the back-end. I think that the app could benefit from a firebase backend to store the user’s data and history so that they wouldn’t lose all of their information when they uninstall the app. There are many possibilities. This also marks the end of DPS909 for me. A reflection on my entire experience with the course deserves its own blog post. I suppose all that I will say about it here is that; I enjoyed it, and I learnt a lot. I’m very grateful to have gotten the opportunity to work with the various people that I’ve met through this course.

by Ruby Anne Bautista at Sat Dec 12 2020 08:08:19 GMT+0000 (Coordinated Universal Time)

Release 0.4- In progress

Flutter… is great. I find it much easier to get things done in flutter than I did in Android. It also has the added benefit of being cross-platform which I appreciate.

I wanted to do a little more research on the theory behind Maslow’s hierarchy of needs so I could write good quiz questions that reflect each need well. Once I had done this, I modified the questions file that already existed in the project into a bank of questions that the app can draw from. I then put the actual question class into its own file. Once I created this, I then had to create an interface that the user could interact with to answer these questions. I’ll have to draw out the interface in order to be able to move forward with more direction.

The many questions of the quiz

Since the structure of the questions is true or false, I’ll have to design accordingly. I’m thinking a thumbs up and thumbs down button would be a good way to show this in a nice, streamlined manner rather than having radio buttons for yes and no. I’ll be booting up Adobe XD for this. I hope that Nesa will like the design I come up with.

by Ruby Anne Bautista at Sat Dec 12 2020 08:06:54 GMT+0000 (Coordinated Universal Time)


Isabella Liu

A meaningful and interesting journey

The most important thing that I want to express is that I really appreciate professor David's help and guidance throughout the course.
The most important thing that I want to express to myself is that I'm sorry, and thank you. I'm sorry that I had not pushed myself hard enough to make bigger progress, and I have wasted too much time and energy fighting with my own feelings and imposter syndrome, which should not have taken so much of my time and energy. I should have spent more on the real stuff that I should try to work on. But I am also grateful for not giving up and tried my best to survive till the end. God knows how many times I have considered dropping the course.

by Isabella Liu at Sat Dec 12 2020 07:19:45 GMT+0000 (Coordinated Universal Time)