Planet CDOT (Telescope)

Saturday, September 19, 2020


Alexi Joseph

Introduction

Hi, my name is Alexi Joseph and I am in my 4th year of the BSD program. I decided to take DPS909 because I was interested in open source and how the industry goes about developing applications with open source development in mind. I also wanted to learn the benefits of going open source compared to keeping everything closed down and seeing the reasons as to why people choose to go open source.

I’m currently at home in Richmond Hill, so covid-19 has not made too big of a difference with my school life, but is making many aspects of my everyday life more difficult than it used to be.

I’m hoping to see how open source can make me a better developer and find out what I’m capable of when put into a situation where I am not working on my own or in a small group, but with a large collective.

For my GitHub repo i decided to fork minecraft-react. I chose this project because I am a gamer myself, and was curious on how this was developed and how functional this project actually is compared to what was made from the original creators.

by Alexi Joseph at Sat Sep 19 2020 01:10:58 GMT+0000 (Coordinated Universal Time)

Friday, September 18, 2020


Hyunji Lee

Introduction

 Hi, my name is Hyunji Lee and I am taking OSD600 (Open Source Development) course which is one of the professional options at Seneca, CPAC (Computer Programming and Analysis with Co-op) diploma program. Currently, I am located in Toronto. I do not go outside like before due to COVID-19. It is a little bit boring but I think it is a good chance to improve my developing skills in this situation.

I have developed a variety of programming skills at college and am trying to improve my skills. Specifically, I have an interest in web development. This website named BookEat is the one I have created with my team a few months ago. We used a MERN (MongoDB, Express, React, and NodeJS) stack application with a platform named Heroku. We managed our codes using git and that was impressive. As I usually manage my codes of my personal project using git & GitHub, I thought I know how to use git. However, when I was using a git for the team project, it was totally different. I should think about the collision, merging, branches, etc. I got I need more experience with the git.

This semester, I saw a course related to learning about the open-source is open. When I checked the course outline, I feel this course is the one I want to. I can learn about the git, how to contribute open-source, and how to find a bug in a huge project. I believe these skills will be great assets in the future.

The Github repository I forked from trending repositories is named generator-jhipster. When I looked around the jhipster’s website, it said JHipster is a development platform to quickly generate, develop, & deploy modern web application & microservice architecture. As the most interesting subject for me these days is a web application, I picked this open-source. I would like to look around this project later on. This is the repository I forked generator-jhipster.

by Hyunji Lee at Fri Sep 18 2020 22:15:00 GMT+0000 (Coordinated Universal Time)


Mohammed Niaz ul Haque

New Journey

Intro

Hey there guys! I wanna start everything with a self-introduction. I am Mohammed Niaz Ul Haque, a Bengali, but lived my entire life in Saudi Arabia (19 Years)(I am 21 now). Currently, I am in Canada for my studies. I am in my 5th semester of CPA (Computer Programming and Analysis) at Seneca College. Looking for coop opportunities for Winter 2021. I love Anime, Kpop/Jpop, KDramas and don't play a lot of games except for Among us and League of legends (2-3 months in LoL now, very new)

What I know so far

The past few semesters have been so informative, especially the web development area. I learned lots of technologies and frameworks, which helped me open new paths in the world of development. I have a good amount of experience in both front and backend development. I have a vast number of side projects under my belt (you can see in my GitHub - https://github.com/Niaz-Ul-Haque)

What I plan to do

The course OSD600 allowed us to go out of our comfort zone (my reason to take this course) and contribute to projects all around the world. I planned on working on something that I never worked with before. For instance, python, ruby on rails. I have a few open-source projects that I found interesting (looking for more) to work on.

They are -
a) Microsoft Edge and Chromium Open Source
Link - https://github.com/MicrosoftEdge/MSEdge

b) Visual Studio Code
Link - https://github.com/microsoft/vscode

c) Hoppscotch
Link - https://github.com/hoppscotch/hoppscotch

d) Algorithms
Link - https://github.com/williamfiset/Algorithms

e) Livewire
Link - https://github.com/livewire/livewire

These are just a few, for now. I'll probably have more projects I want to contribute throughout the course.

The First Close

Well, as this was(is) my first time writing a blog and it felt good. I don't plan on stopping and will always keep you guys updated on my path as a developer. Thank you and hope you all stay safe as the pandemic is getting worse day by day

by Mohammed Niaz ul Haque at Fri Sep 18 2020 17:53:36 GMT+0000 (Coordinated Universal Time)


Ruby Anne Bautista

Starting My Open Source Journey

Greetings, my name is Ruby and I am currently enrolled in an open-source course in Seneca College. My first memorable encounter with the concept of open-source software was with Linux. A few years ago, I did some very stupid things with an old laptop and proceed to render it completely unusable (I won’t disclose what I did here, it was very stupid. But I don’t regret it 🙂). In my desperation, I scoured the internet for some way to salvage my poor laptop. That is when I learned about Linux and the concept of open-source software. Prior to this event, all I knew of open-source software was that it was free. As I did more and more research, the more I came to appreciate open-source. Here was a community of people who contributed to a project because they wanted to and they provided it to others completely free. I loved the philosophy behind it and proceeded to install Linux Mint. To my utter delight, it made my laptop not only useable again but actually improved its performance. Since then, I held open-source software and its philosophy in high esteem.

Now, quarantined in my home in Toronto I am taking all my classes online and my interactions with other human beings have become severely limited. But, space is no barrier to the developer community; a community that I wish to become more active in. I am hoping to learn more from other developers and expand my skillset. I am deeply aware that I have much to learn. And though I am more comfortable in a classroom setting, I can’t deny that there are some things that you could only learn through applying your skills and making mistakes. I am intimidated and scared to be showing my code and submitting it for judgment to people far more experienced and skilled than I am. But I am also determined to become a better programmer and contribute what I can to projects that I care about.

I’m not quite sure yet what type of programmer I’d like to be. I suppose this is another way that this class will benefit me. Perhaps, I will be able to expand my horizons and determine the answer to that question by the end of the semester. I enjoyed working with C++ during the past semesters and I wouldn’t mind taking it up again. I am also hoping to take the Computer Vision professional option as well. Therefore, working on a project like OpenCV is something that I’m interested in. Though I also enjoyed the networking class last semester and would like to expand my knowledge of it further as well.

I have so much to learn. And I’m really thankful that I have this class to guide me in this endeavour. Hopefully, I will be able to contribute meaningfully and learn much in the following months. This blog may become something that I will look back on one day as the first step I took to become an active member of the developer community…we’ll see. Until next week, take care and be safe. 🙂

by Ruby Anne Bautista at Fri Sep 18 2020 17:48:51 GMT+0000 (Coordinated Universal Time)


Hongbin Li

Untitled

Week1 

Hi everyone, I'm hongbin li and live in Markham, Ontario now. I think programming can extend my working life, but it doesn't seem to be the case at the moment. I heard Open Source is a well-known platform, but know little about it. 

I think OSD600 is really a global course, which can slove my problem, and to find the best way to continue to connect us.

After accomplish this term, I hope to continue to stick in this Open Source platform. I am interested in many area, and a more realistic option might be testing. But everything is possible.

I just forked "https://github.com/hli261/computervision-recipes". This repository provides examples and best practice guidelines for building computer vision systems. The goal of this repository is to build a comprehensive set of tools and examples that leverage recent advances in Computer Vision algorithms, neural architectures, and operationalizing such systems. Rather than creating implementions from scratch, we draw from existing state-of-the-art libraries and build additional utility around loading image data, optimizing and evaluating models, and scaling up to the cloud. In addition, having worked in this space for many years, we aim to answer common questions, point out frequently observed pitfalls, and show how to use the cloud for training and deployment.

I just want to know about it. It's totally new to me.



by Hongbin Li at Fri Sep 18 2020 17:25:00 GMT+0000 (Coordinated Universal Time)


Michael Brackett

OSD600 - 1

Introduction
Hi, my name is Michael Brackett. I started programming when I was in grade 10 and have been loving it ever since. I found OSD600 very interesting while researching what my potential pro topics were going to be, what really intrigued me was the Hacktoberfest portion of the course. I got interested in Open Source when I was looking into chess engines and researching about Stockfish which made me realize that all the code is free and can be seen by anyone for this project. Looking at the repository right now there is an issue that I think I can do. Hopefully, it doesn't get taken before I really get into Open Source development!

Where are you
I'm currently located in the GTA

Hopes
I'm hoping to contribute to projects, learn more about open source programming, and learn a new programming language. I don't really have a preference for which projects I work on as long as I'm learning and it's fun. If I had to pick one I'd say my first choice is the previously mentioned Stockfish repository.

Github Fork
The project that I forked is the Ciphey repository. I chose to fork this repo because I think that encryption is a key technology that is currently being used and will become even more important as time goes on. Seeing something that is light weight and can decrypt fairly fast which is accessible to anyone is incredible.

by Michael Brackett at Fri Sep 18 2020 17:08:41 GMT+0000 (Coordinated Universal Time)


Isabella Liu

My Open Source Journey Starts Here

I am Isabella Liu and I am enrolled in OSD600. I live in Toronto and am currently in a co-op position as Java Developer.

I have completed four semesters' study at Seneca. The major reason that I chose OSD600 is our professor David Humphrey. I was lucky that I got David for my second half semester's WEB422 study. I learned a lot from David and impressed with David's professional teaching and enthusiasm in programming. This makes me desire to learn much more from him. After I get to know the outline of this course, I am more than happy that I made the right choice. Since I have no related background before at all, I have been so confused about which direction I should choose to focus on. Through this course, I can get more real-world information and I hope I can find something that I'm really interested in.

ML_course is the trending repo that I decide to learn more about. Since nowadays machine learning is so hot and popular, I would like to learn some modern techniques when I get the chance.

by Isabella Liu at Fri Sep 18 2020 16:35:49 GMT+0000 (Coordinated Universal Time)


Sanjida Afrin

My Intro to DPS909 — Open Source Development Course

My Intro to DPS909 — Open Source Development Course

Good morning/good evening/good night to whoever is reading my blog from anywhere at any time zone in the world! I’m Sanjida, currently enrolled in the BSD program at Seneca. I am in my 5th semester taking DPS909 along with 5 other courses. I live in Ontario, Canada. That’s a little bit about myself!

https://www.bgosoftware.com/blog/wp-content/uploads/2015/06/open-software.jpg

Why am I taking this course? What is it about Open source that attracted me?

To be honest, I took this course because most of my classmates were taking it and there weren’t other pro courses that caught my eye. I know this obviously isn’t a good reason, however, before joining this course I didn’t have a clue about open source development. My interest started growing after I watched David’s welcome videos and read more about open source. The way this course is designed is completely different from any other course I have done before. The freedom of this course excites me and terrifies me at the same time. Since the beginning of my programming journey, 2 years ago, I followed professor’s instructions and did only what I was supposed to do, nothing more or less. This course offers me to choose any language/project I am interested in which I find fascinating.

Other than the freedom, I love the idea of collaborating and helping each other out. Open source opens a door for me to meet new people and new community, work with, learn from and share a real-world experience with them.

As a shy introvert person (yes, I am calling myself out), it’s been very hard for me to talk to people and lately it’s been even harder online as everyone is unknown. And, I am blaming the quarantine for making it much worse than before:) I want to get out of my shell and I don’t see any other better opportunity than this course.

What am I hoping to accomplish this term? What kinds of projects do I want to work on?

As I mentioned earlier my goals for this course are gaining new experience, getting out of my comfort zone, making connections, learning new languages, working on new projects and hopefully becoming a better programmer than I am right now. I can relate to the imposter syndrome that David mentioned. Though it has not even been one week of this term, I already feel so left behind and less knowledgeable than others. Hopefully, I will prove myself wrong and keep my current GPA with 6 courses (finger crossed).

So far, I work with c, c++, java, javascript, html, CSS, react, angular, and android. I won’t say I am an expert at them because that would be a huge lie . Although I am hoping to turn this lie into a truth. I enjoy working on web development and mobile app development. This summer I took my first mobile development course-android and I absolutely loved it. I want to learn new language such as python(I saw on slack that a lots of people already pro at it ), Go, rust and many more.

GitHub trending repo I choose

apple/swift

This repo talks about swift language. This term I am taking iOS- mobile app development course where I am learning swift for the first time. Therefore, I find this GitHub pretty useful.

Anyway, this is the end of my first blog. No one will believe me if I say talking is hard for me after reading this blog:) Let’s end this week’s blog with a message that it is okay to fail; don’t be hard on yourself , “It is impossible to live without failing at something, unless you live so cautiously that you might as well have not lived at all — in which case, you fail by default.”(J.K. Rowling). See you next week!!

by Sanjida Afrin at Fri Sep 18 2020 15:11:07 GMT+0000 (Coordinated Universal Time)


Leon Li

Open source development course

 I'm Leon and a student of Computer Programming & Analysis program in Seneca College. I am taking OSD600 course of this semester in Toronto. 

I am vey interesting in the open source. The course is my opportunity to know more things about it. Open source development can provide us the opportunities to work with the developers around the world. Open source technology and open source thinking also can benefit everyone, not only programmers. I want to study the open source tools and accumulate the development experience of real software project. I'm gonna search for commercial service development projects to understand the requirements of a business project.

The GitHub trending repo I research is Rocket.Chat. It is Open Source Solution for team communications. Instant messaging is a widely used network application. I want to know how to develop this kinds of softwares.

I'm gonna share my learning process with this course during this semester in my blog. I'd like to contribute some pieces to the coming large open source projects.  

by Leon Li at Fri Sep 18 2020 14:45:00 GMT+0000 (Coordinated Universal Time)


Devansh Shah

The Beginning: My Start into Open-Source Development

Intro

My name is Devansh Shah. I am currently a student living in Toronto and actively looking for internships. Over the years I have attempted to do a lot with my skill set in programming but I have always found Open-Source Development to be a jarring task. Over the years I have used Open-source code in my projects but I have never really gotten into contributing to Open-source development. However, this stops now! Over the next few months I will be actively starting to contribute to the Open-Source community and I will blog my experience here. This blog will show you some of my interests and my plan for how I will go about this intimidating task.

The Plan


Photo by Glenn Carstens-Peters on Unsplash

First, I will write this blog post as a starting point. Then, I will keep up with trending GitHub repos to see what interests me and fork them to my personal GitHub. I will then look over the code repo for this project and then check out how I can contribute to the project. Another step in my plan includes networking with the community within these projects to find ways I can be an asset to their projects. Finally, I will actively blog this process and also let you know about my successes and failures dealing with development.

The Projects

The projects I have researched up till this point that interest me and hopefully I will contribute to in the future are the following repos.

  1. https://github.com/mikecao/umami
  2. https://github.com/carloscuesta/gitmoji
  3. https://github.com/mrdoob/three.js
  4. https://github.com/fable-compiler/Fable
  5. https://github.com/QuantConnect/Lean

These are visibly not the only projects I wish to contribute to but just a small list of projects that interest me with the little bit of research I have done.

The First one is an alternative to Google Analytics which interests me because I want to build tools that help users add value to their activities and a tool that allows the user to analyze their data is a perfect example.

The second one is actually an initiative that standardizes the use of emojis on GitHub commit messages. This project it allows contributors to contribute to the large Open-source community on GitHub.

The third one is interesting for me as it's a JavaScript Library for AR/VR creation. AR/VR are just quite intriguing topics for me and working on a library that assists developers create such things is a really superb fit for myself, and something I am very excited to work on.

The fourth one is a F# compiler that outputs JavaScript code compatible with ES2015. This one is interesting because I recently tried to learn F#, while JavaScript was the first language I learned. To work on something that I am learning with something I have been learning since 2014 is incredible.

The last one is an open-source algorithmic trading engine known as Lean. Lean is compelling for me because I enjoy programming and have a strong interest in trading. This one seems more challenging than the rest but I hope that one day I will be a able to work on projects such as this, and this is my first step in making that a reality.

The Closing

This is only the beginning and I look forward to sharing more over the next few months about this experience. If you have an interesting story about your Open-source journey, please leave it in the comments so we can connect and see where this journey will lead. "A Journey of a Thousand Miles Begins with a Single Step."

This is my first step.

-ZG

Heading Photo by Katie Doherty on Unsplash

by Devansh Shah at Fri Sep 18 2020 14:29:57 GMT+0000 (Coordinated Universal Time)


Philip Golovin

WISA: A Link Checking Tool

WISA or Who Is Still Alive, is the link checker I made using Go for Release 0.1. The tool is fairly straight forward, you pass it a file and it finds all URLs and checks whether or not they are alive or not hence the name. I decided to go with Go (ha.) because of its very easy to pick up syntax and nice libraries they provide aside from the odd error checking. The biggest reason though were go routines, they are green threads that are managed by Go’s runtime and they are incredibly useful for parallelization.

You can take a look at my project here.

Provided you have Go you can build WISA with go build wisa.go and use it like so wisa -f [filename]. The test_urls file included in the repository can be used for instance. You can also append the -v flag for verbose output if you’re interested in the error logs (although they are mostly timed out requests or EOF errors). In order to use it system wide you will have to add it to your PATH and optionally if on linux, to your bin folder.

WISA is fairly bare bones but it’s features include the usage of Go routines for parallelization, flags for file input and uses HEAD Requests which discards the body for network optimization.

WISA in action.

by Philip Golovin at Fri Sep 18 2020 07:41:52 GMT+0000 (Coordinated Universal Time)


Tonghuyn Yi

First Post

 Hi! My name is Tonghyun Yi (aka. Eric) and I am currently pursuing the Computer Programming and Analysis program at Seneca College. This is my first ever blog post on the blogger website.


Since my high school years, I have always used Wikipedia to help finish my homework or get useful information about the world. And when I knew that websites like Wikipedia and internet browsers like Mozilla Firefox are all open-source programs, I knew that open-source programs does increase the quality of internet life for individuals. This interest in the open-source program made me take OSD600 as my professional option course and now I am excited to learn about what potential power can open-source programming can have in the programming world.


Right now, due to COVID-19, my current location is in Red Deer, Alberta, which is where I spend most of my life in Canada.


By the end of the term, my goal is to build one simple open-source program that anyone can use and have insightful knowledge in the development process of open-source programming.


For the GitHub trending repo, I chose Compose samples of the Android environment. This repo gives examples of what kinds of different interactive UI can be achieved through the Compose toolkit using Kotlin. I chose this repo because I am interested in Android development and since Android is also an open-source operating system, I thought it would also fit my course's academic purpose.

by Tonghuyn Yi at Fri Sep 18 2020 03:19:00 GMT+0000 (Coordinated Universal Time)


Mamadou Diallo

Intro Blog

-           Why are you taking this course?

I'm taking this course as I want to have some experience working with people that I don't know.

With COVID-19 I know that working with people that you've never seen face to face is becoming more and more of a reality. I'm hoping that this course teaches me skills that I can later translate in my career.

-           What is it about Open Source that attracted you?

The ability to openly work on projects and know that it is a whole community of people that just want to improve things make Open Source interesting. 

-           Where are you? 

I was born in montreal and have a french background but live in Milton, Ontario ( Halton Region ). I moved closer to school when the campus transferred to Newnham but luckily moved back home right before COVID started.  

 

-          What are you hoping to accomplish this term? 

I'm looking to challenge myself & use this course to refresh myself with languages that I'm not too comfortable with (C/C++) or learn some sort of language to build websites.

-          What kinds of projects do you want to work on?

Although I don't have any disabilities, I would like to work with features related to accessibility as I believe it is an aspect that is widely overlooked by people that don't struggle with anything. 

-           What was the the GitHub trending repo you researched above?

 https://github.com/facebook/create-react-app 

 I've chosen this repo as oddly enough it was a suggested to me in my UI designing class (BTH745), I have never heard of it before and to see it come back in such a short amount of time caught my attention. 

 


by Mamadou Diallo at Fri Sep 18 2020 03:06:47 GMT+0000 (Coordinated Universal Time)


Muskan Shinh

“The Github Trending”

For our first lab, we’re given a task of finding a trending project repository that interests us. Let’s be honest here. When I first started scrolling through the lists while doing the search by day, week and month, I did not find something that would interest me in the first go. The thing that sparked me a little was the project on swift language by apple. I am doing an IOS development course this semester, so I thought why not. Maybe it will be helpful to me in my course.

Although, I had found an interest yet I was still scrolling through all the different projects. Then I came across the one that seemed most interesting to me because I use it myself. Iptv (Internet protocol television) is the delivery of television content over internet protocol networks. Using this, a great number of channels are delivered to countries across the globe with content in many different languages. This project caught my attention the most as I am myself an Iptv user and so are many of my relatives. It was a delight as well as surprising as I had no idea it was an open-source project.

by Muskan Shinh at Fri Sep 18 2020 02:55:21 GMT+0000 (Coordinated Universal Time)


Paul Sin

Open Source

Hello Everyone,

    My name is Paul Sin, I am a software developer starting my journey into Open source Development! This blog is apart of my journey at Seneca college which is dedicated to open source development. I took this course to challenge my skills in real world experiences and grasp the feeling of working with a team. What attracted me to open source was that it allows the community to come together and solve a common problem. 

    I am located in Scarborough, Ontario. I originally came to Toronto to surround myself in the growing start up culture, however, due to Covid-19 living in Toronto does not seem like an ideal location. Talking on Slack has given me an idea of how global the OSD600/DPS909 community is. It seems like we have students joining us from India, China, and Canada.
   
    This semester I would like to gain some experience on how to use git checkout to minimize the amount of mistakes made during coding. I would like to work on very small projects like a start up or very big projects working with professions. 

upon researching the trending repositories on Github, it seems like there are an abundant amount of opportunities to contribute to open source development. Some of the repositories that caught my attention include: 


react-challenge-amazon-clone
https://github.com/CleverProgrammers/react-challenge-amazon-clone

This repository first got my attention since I could read the code. It was something familiar that I knew I would be able to contribute on.


Cli

https://github.com/cli/cli


This repository seemed interesting since it worked with creating cli commands. For assignment one I we created a CLI command that took in a file and identified if the urls are good, bad or unknown. As an addition we created an argument for the CLI command itself. Which got me curious If the way I parsed the command and executed the code was similar to how this repository creates cli commands.


I took this course since OSD gives me the freedom to create ideas. I have always found it fun working with others to solve a problem/puzzle. I look forward to working with everyone involved in this community. Thank you for your time.


by Paul Sin at Fri Sep 18 2020 22:32:28 GMT+0000 (Coordinated Universal Time)

Thursday, September 17, 2020


Jasper Mui

My Me Check Link CLI Tool (MCL)

Me Check Link is a CLI (command-line interface) tool that I programmed that is open source. My initial motivation for this project is that it was required of me for my open-source course. At first, I thought this task was daunting as the professor gave no little direction and the programming language was not specified. During development, I started to get really into making this CLI tool as it was not as hard as I expected it to be and I began to program more features than that was expected of me.

Link to my project:
https://github.com/Jasper-Mui/me-check-links

To use the tool, download it at the link above, run npm install and npm link. This is to get the tool and ready it for use.

How to use it:
MCL is the command; if no arguments are entered, a help message will be displayed.
 -v or /v, to get the version number and name of the tool.
 -u or /u, to check the links of an HTML page of the supplied URL.

Features:
  • Links are displayed color-coded such that green links are good, red links are bad and grey links are unknown.
  • version number and name of the tool can be display through using option -v
  • The tool can check HTML page when given a URL(s) using the option -u
  • Multiple URLs or HTML pages can be check in a single command
  • Handling of Unix and windows style of args -u or /u will work

Examples:

Basic MCL command
MCL -v for version and tool name
MCL /v window version of option -v
MCL with a local html file
color coding link status
MCL -u with URL, URL version of the command
MCL -u with multiple URL, hard to see multiple output

For more information, please check out my project on GitHub. 

Note:
Many thanks to Dominik Kundel as his post on How to build a CLI with Node.js. As this post made it easy to learn how to build a CLI with node.js without added unnecessary complexity.

by Jasper Mui at Thu Sep 17 2020 22:45:39 GMT+0000 (Coordinated Universal Time)

Introduction

Hi, I am Jasper. This is the start of my open source journey and the start of my participation in the Open Source Development course at Seneca College. I got interested in open source as I hear and see it around a lot. The open source community creates powerful software of different natures.

Though to be honest, I am not sure what I expect to get out of this course, but I find a lot of the time, I never know when something I learn will be useful. I look forward to studying under David Humphrey as I hear many praised by other students. I do not have a kind of project I want to work on, but I hope I will contribute to an open source software called PathOfBuildingCommunity for a game called Path of Exile.

I am currently in the Greater Toronto Area; fortunately, COVID-19 has a relatively low impact on my life. I enjoy working out, running, biking, badminton, snowboarding, and gaming in my free time. It seems I cannot stop being an athlete.

This week I researched 30-seconds-of-code.1 At first, this project interested me because of the title, but after looking into it, I thought it was a cool project. 30-second-of-code is a tool to help JavaScript developers quickly find code snippets and other useful references to do something, such as using a react component. I thought this was a nice project as snippets and reference to using popular frameworks would speed up development.

1. https://github.com/30-seconds/30-seconds-of-code

by Jasper Mui at Thu Sep 17 2020 03:48:41 GMT+0000 (Coordinated Universal Time)


Plamen Velkov

Who am I?

Wag-wan people?!

My name is Plamen Velkov. I am an aspiring software developer. I am currently in my third and final year at Seneca college. I am enrolled in the Computer Programming and Analysis (CPA) program. This is going to be my blog for the OSD600-NSB course. I live in Canada in the "small" city of Toronto.

First off I would like to welcome you to this blog.

I want to start off by saying I enjoy problem solving and programming in general. I would say that at a very early age I was fascinated by technology and most, if not all, aspects of it. I enjoy learning about how and why something is working and or made. My interests involve a lot of gaming, specifically how games and game engines are made and optimized. With that being said, I have recently found a new passion that occupies my time. I bought an Oculus Quest to introduce me into the virtual reality community. I was blown away by how far VR has come since it's early stages. About 8 months ago I started dabbling in some VR programs and scripting and ever since then it has been a hobby of mine. With openVR becoming a more popular thing, I wanted to take a course which would give me the guidance and prosperity to start getting involved in open source projects such as this discord presence application for the quest. Since the Oculus Quest is a stand-alone Head Mounted Display (HMD) there is no requirement for a gaming PC, thus making discord and other similar applications not know what the user is doing right now. This application allows the user's discord status to be updated over LAN and display their current game and/ or application as the status message.

I picked this repo because it seemed interesting and a step in the direction of truly making the Oculus Quest a stand-alone monster which offers various kinds of functionality besides gaming.

This semester I am hoping to gain understanding of how the open source community thinks and works. The different ways I can contribute to projects, big or small. Most of all I am seeking the confidence I need to contribute something meaningful to the Mixed Reality Toolkit (MRTK) for the Unity game engine. The repo for that can be found here. I want to fully learn how to contribute and use the MRTK because I think it would be neat to have a functional IDE inside a Virtual/Mixed Reality world.

Well, that is enough about me and my plans for the near future (before the world ends).

I hope you liked this blog and stick around, at least until the next one. For future blogs, I am planning on taking you through my process of entering the open source community, and hopefully show you some interesting contributions I make.

Stay safe and take care of each other in these trying times,

Plamen

by Plamen Velkov at Thu Sep 17 2020 21:03:45 GMT+0000 (Coordinated Universal Time)


Jennifer Croft

Why am I taking OSD600?

My name is Jennifer and I live in North York. I am a Student at Seneca College in my 6th semester in Computer programming and Analysis. Because of COVID19 we are all doing our studies from home. Adapting to working from home on the computer can sometimes be challenging as I am surrounded by teenagers.

I am taking this course because my goal is in software development. I believe this course will help me get more experience in the field of development and help me become a better programmer.

Open source is interesting to me because it is community of people that help others solve coding problems together. It is also a creative outlet that helps all participants make better programs.

My hope is that I can increase my skills as a programmer and learn to use more online tools. I would like to work on ASP.NET, C++, C#, python, linux and if it is possible Scripting for generating objects with code in 3D modeling.

The trending github repo I found that was interesting was https://github.com/bevyengine/bevy. It is a game engine built in Rust that is data-driven and easy to use. What I have discovered in my research of this Bevy Engine is that is it allows you to write code to create 2D and 3D objects with short rendering time. It is designed to be easy to use by beginners. It also cross platforms on Windows, MacOS and linux. The Bevy Game Engine is still new in it's development phase and so it is not yet reliable for creators. I picked this trending repo because I think that the beginning of a new game engine that beginners can use is exciting. A new person interested in learning to code models is a good way to introduce them to design and modeling.

by Jennifer Croft at Thu Sep 17 2020 19:58:02 GMT+0000 (Coordinated Universal Time)


Jongwon Jang

About Me

 print("Hi! My name is Jongwon Jang")


    I'm a 3rd year student studying at Seneca College located in North York, Toronto and thrilled to study open source development with wonderful developers all around the world. I'm passionate about web development, especially using libraries such as React and currently exploring new tools and techs for back-end development. Also, I am planning to learn python in depth until the course ends and hoping I'll be good at it.

    I chose OSD600 over other courses, because I really wanted to know how programmers collaborate and learn how real life programming works. I've done several assignments during my studies, however, I only had this passive learning experience and wasn't actively searching and learning the things I really wanted to learn. I hope this opportunity will make me a better programmer than before. 

    Among countless trending repositories on Github, I picked a repo called "learn-python"( https://github.com/trekhleb/learn-python ). The reason why I chose this repo is because I wanted to go back to the basics and make sure I'm understanding python well enough. I will take some time to look through it and maybe make changes and have fun like the publisher wants us to do.



by Jongwon Jang at Thu Sep 17 2020 18:56:00 GMT+0000 (Coordinated Universal Time)


Abdulbasid Guled

Looks like I'm heading out to explore the universe, but in reality, it's actually open-source development

Hey everyone! My name is Abdulbasid (though people that know me just call me Abdul or AG for short :P) and this is actually the first blog post that I've wrote in my life. I'm not too keen on writing as I would really prefer to speak things out aloud, but alas, we all have to get out of our comfort zone at some point in time.

I'm currently in my 3rd year of the BSD program (Software Development) at Seneca College in Toronto, Ontario. This blog will be the first of many as I start to document my journey into open-source development. In my program, the course is called DPS909, Topics in Open Source Development. The main reason why I decided to take this course can really be attributed to one person. Mo (whose blog I do not have but will certainly link here when I get that) is a pretty good friend of mine who I've worked with alot the past year. I remember him telling me in November 2019 that he was talking with our professor, David, about his OpenTTC program. He was telling me that David was a really cool guy and that he planned on taking his course next year (Ironically, we needed BTP400 in order to take DPS909 and Mo had little experience with Java at the time) so we worked on passing that course so that we could both take open source in the Fall 2020 semester. It also helped that alot of my interest aligned with the course. In particular, the ability to work with new technologies that I had no experience with while also helping out to contribute to something bigger than anything I had worked with until this point. Obviously, getting a chance to work with OpenTTC was huge for me.
In a summer course I did this past semester, I had a short chat with James Inkster (https://grommers.wordpress.com/) who mentioned that he worked on a project called Telescope for open source last year, something that caught my interest.

So far, it appears that most of my peers had decided to take this course as well. Whether it was because they also enjoyed it or that they preferred it to the other professional options courses that were available this term is another entire question. This has been a relief so far as I knew that time zone would not be an issue. I'm residing in my home in the northwest area of Toronto as we've been forced indoors because of the ongoing Covid-19 pandemic (Which I seriously hope goes away soon, I miss the campus experience). The slack channel we were told to join has been exciting and talkative as I had expected it to be. Also, being able to work with OSD600 students, who as far as I'm aware are doing the equivalent course for CPA/CPD students, just increases the amount of people I can work with. David mentioned that the open source community was global and I look forward to see this firsthand.

Definitely, a goal for me is to work on the OpenTTC project my friend, Mo, is working on. I think it would be nice to have operational for those of us that love to complain about the TTC. I don't really have any goals in terms of what specific projects I would like to work on outside of that. It's mainly about learning new technologies to become more proficient for me. I adore web development so I would like to work on projects that would leverage my ability to pick up some more web technologies. In particular, VueJS is a JS library that I want to learn as it's the only JS library that I have not worked with and I feel like I can make some great use out of it.

I'll keep this last part short, but we had to pick a trendy repo and talk about why we chose it. I actually picked two repos for this one because I couldn't really decide on which one to choose. I chose the "ant-design-vue" repo (https://github.com/HyperTHD/ant-design-vue) and the algorithms repo (https://github.com/HyperTHD/Algorithms). Both were interesting topics that I wanted to look further into. In the case of the latter, I'm actually doing a Data Structures and Algorithms course this semester and I know how important of a subject this is with regards to job searching in the future so getting as much information as I can outta the topic is important for me. As for the former, I'm a sucker for design and it's a skill I want to get better at. I love the design that this repo allows us to use for Vue projects and it'll give me more of a reason to start practicing VueJS in case a future job requires experience with that JS framework.

Hopefully, most of my future blogs won't end up being this long. I always end up writing alot more than I really need to. This journey won't be an easy one but it's one that I'm looking forward to exploring with all of my peers this semester. Now, to get release 0.1 working and prepare myself mentally for Hacktoberfest next month!

by Abdulbasid Guled at Thu Sep 17 2020 18:34:48 GMT+0000 (Coordinated Universal Time)


Matthew Stewardson

Week 1: Introduction

About Me

Hello everyone this is going to be my first blog post for the class DPS909 which is about open source development. My name is Matt Stewardson and I am 23 and am from Thunder Bay but currently living in Toronto for school. In Thunder Bay I got my degree for computer programming and have since moved on to acquiring a bachelors for software development here at Seneca College. Since I already have a degree iv'e been taking some classes out of order here at Seneca which has been interesting to deal with and work around.

Why Did I Take This Class?

I took this class as one of my professional options because it seems to be one of the better ways to gain experience and skill with actual real world problems. Typically most programming classes I had taken taught me how to work with the language and how to use it, but not how to deploy and work on a real world piece of software and I'm hoping to understand the real world process of programming at least a little bit more after this course. I want something I can point too and show to company's that show off my skills and knowledge. 

GitHub Repository

I was asked to research and pick a trending repository, and I decided to choose the Bevy data-driven game engine. Game engines have always interested me whether its Unity or Unreal, Godot or Game-maker its interesting to try and understand how those engines handle things such as lightning, physics, and game logic.

This engine has been developed using the Rust programming language with the design goals to be fast and simple utilizing Rust structs and Rust functions. This engine can handle both 2D and 3D graphics in real-time and is planned to be open source forever. It's still in early development but Im planning to watch and learn from this project and maybe even help after learning some more.

Here is the GitHub Repository

What Am I Working Towards?

Eventually I want to be able to work in the field of game development, most likely working on game engines or related software. To get to this goal I'm going to finish this bachelors and along side this improve my skills with my own self practice and research. Recently I have been teaching myself more about the Unity engine and I'm going to continue doing so.


Thanks for reading my first blog post! Im looking forward to learning more about open source development over the course of this term!

- Matt

by Matthew Stewardson at Thu Sep 17 2020 17:58:00 GMT+0000 (Coordinated Universal Time)


Alexander Hugh

My Open Source Journey

Hello there! My name is Alexander Hugh. I’m a software development student at Seneca College in Ontario Canada currently doing the open source course DPS-909. For those who are in DPS-909 with me, I joined this class because I wanted an introduction into some real world programming before my co-op began. I also have a few friends taking this course and I always wanted to know what this open source stuff was. I’m hoping by the end of this term I’ll be more comfortable working with software, as for projects I want to work on some AI based ones, the prospect of AI has always intrigued me greatly and I hope that I can help to familiarize myself with them more. As for a little bit about me, I’m situated in Markham Ontario. I enjoy programming but I also enjoy building cosplay armors, woodworking, photography and of course, playing video games. Back on topic, I’m starting this blog because I, like many software developers, are trying open source and a common tool used is blogging to document their journeys… so here is mine! I’ll update the progress of what I’m doing here as often as I can but it may be a bit irregular.

As for my first project (and by extension, assignment) going into open source I‘m making a command line tool that will check for dead links/URLs in a file. For this, I’ll be using JavaScript.

I’ll be totally honest, I’m not very confident in my own JavaScript skills but what better way to get that experience than diving in, so this will be a learning experience for me. If anyone does read this then I’d love suggestions on what libraries, APIs and other tools I can use for this project. I will also be working and trying to learn the basics of how to use GIT for this so that I can build up real world skills.

Finally, each person in our class had to choose a trending repository on GitHub that interested us. Yesterday, a friend and fellow colleague (not in this course) showed me this amazing video on an open source project that is capable of increasing the number of frames in a video. To do this it: “synthesize non-existent frames in-between the original frames.” (Bao). As you read above, I’m very interesting in AI so seeing this blew my mind. Lucky for me, this very project was trending on the daily page and I knew I had to choose it for the trending repo part of this blog. I highly recommend you check it out, just seeing how it works is amazing and I think whoever reads this will be just as amazed as I am at it.

That’s it for my first blog post. I hope you stay tuned for my next post, progress and other things. Maybe you’ll gain some enjoyment seeing my struggling and success. Until then, goodbye!

by Alexander Hugh at Thu Sep 17 2020 17:47:33 GMT+0000 (Coordinated Universal Time)


Pedro Fonseca

Hello Friend.

01100110 01110010 01101111 01101101 00100000 01101101 01110101 01110011 01101001 01100011 (♫) 00100000 01110100 01101111 00100000 01100011 01101111 01100100 01100101

Hello, I’m Pedro, originally from Brazil, currently in Toronto. I worked as a soundtrack composer for plays and music professor; a mix of synthesizers, analogic sounds, and records of daily noises and soundscapes were always part of my compositions. In 2011 I founded the “Laboratorio Gambiarra* Music Studio”.

A music studio focused on composing and researching electroacoustic music; Place where I wrote music pieces, learned and taught music for more than five years — a safe place to share musical ideas that were different from the mainstream or academy(erudite) environment. You can check some of my works here: https://venturapedro.tumblr.com or a simple sample here.

I was always interested in computer programming; in 2017, I decided to start a computer programmer career; I moved to Toronto at the end of 2018 when I began Seneca’s CPD program.

Open Source was always something that I wish to reach because I love the community’s ideals, goals, and accomplishments.

In this term, I’m hoping to accomplish an in-depth knowledge of JS and WebAssembly; So, I would like to work on projects that use JS as a “primary” language.

And that is why I choose to fork the Node.js project:

https://github.com/nodejs/node

___________________________________________________________________

  • Binary to text here.

*Gambiarra: a Portuguese word with no direct equivalent in English, is the Brazilian art and practice of creating through improvisation — using simple, makeshift strategies to repair or create what you need with whatever you have around you. There is also a science called Gambiologia based on the way the practice can interact with digital technologies and an artistic movement that goes by the name “Gambiologia” that uses the practice for creative expression.

(from https://www.ibtimes.com/what-gambiarra-rio-olympics-opening-ceremony-themes-include-sustainability-amazon-2398189)

by Pedro Fonseca at Thu Sep 17 2020 06:34:35 GMT+0000 (Coordinated Universal Time)


Tony Vu

“Hello World”? Nah, it’s “Hello Open Source World” now

This blog post would act as a reminder on how I started this open source journey…

Photo by Markus Spiske on Unsplash

If someone told me about a year ago that I would develop an open source project one day all by myself, I would call them crazy. I didn't even know what is open source and what is not, they are all the same to me. All the terminologies came to me sound like bees in my ears. Today, I started my first blog with tag “Open Source” and about to finish my first open source project — A CLI tool that finds broken urls from files. Yes, life is like that, full of surprises and challenges.

My name is Tony Vu, currently a 4th semester student at Seneca School of Software Design and Data Science. My focus is on software architecture especially in the area of web development. My dream is to create useful techs that bring joy and convenience to many people. In this semester, I am taking OSD600 with the goal to learn more about open source development and hopefully be able to hack it. I am also excited to be in this course because of my belief that knowledge should be publicly accessed by everyone and open source development fits that belief. The idea that many people contribute their time and efforts for nothing to make a complete software solving others’ problems is fascinating to me. As a result, it motivates me to become an open source developer.

This term would be my most exciting term since I started studying at Seneca because I get to learn about different professional options that would help me decide my career path in the future. I am hoping to gain as much knowledge as possible. At the same time, I want to continue apply the knowledge I learn into practical projects to cement my understanding even further. Most importantly, I am looking forward to helping others and learning from them during the process of OSD600.

The fist step to start open source development is to pick a project to contribute. This seemed to be easy at first but it got difficult as I started finding. I know for a fact that I would like to continue exploring the architecture of web development as well as predict what technology will establish the next norm of the future web. In that aspect, I believe GO from Google has the potential to form an important part of the future web thanks to its features. That is why I decided to pick ultimate-go repo, an open source project that helps people learning everything GO effectively. Additionally, I want to challenge myself to learn a next generation language and am willing to spend my time polishing it so more people get helped learning GO. The more people use the language, the closer my prediction becomes true. And I just love the feeling of being true!

by Tony Vu at Thu Sep 17 2020 01:56:49 GMT+0000 (Coordinated Universal Time)


Philip Golovin

Who Am I?

Hey, I’m Phil. I am taking DPS909 because I like tinkering with things, especially with cool things other people have made. Mainly, I respect all things open source as with out it a lot people would not be exposed to the many great things people have to share for others to study, learn from and implement in their own projects.

In these crazy times I am currently studying from home here in Toronto, but I wouldn’t mind being anywhere else to get a change of scenery. Regardless, I hope to contribute to some projects of interest, whatever they may be… I have many projects that come to mind, but finding one suitable for my first contribution(s) may prove to be a challenge. I have recently become very interested in Portable Executable Injection and Memory Manipulation but I do not think I will be contributing to any projects involving these techniques.

Speaking of PE Injection, while looking into how it works, I was lead down a rabbit hole that brought me to OpenGL and DirectX ‘hooking’ and a little library I quickly fell in love with called ImGui which people used to draw a GUI over OpenGL/DirectX programs. ImGui is very different from your traditional GUI libraries, unlike Qt which is driven by events (Retained) ImGui on the other hand is immediate meaning the UI is redrawn every time it is polled making it very useful for analytical tools, game debugging tools and more.

Demo window showcasing variety of features and examples.

Above is an example of the many different features ImGui offers which user eliasdaler used to create a map editing tool for one of his games. Good stuff.

https://eliasdaler.github.io/using-imgui-with-sfml-pt2/#introduction

Thanks for reading.

by Philip Golovin at Thu Sep 17 2020 01:05:00 GMT+0000 (Coordinated Universal Time)

Wednesday, September 16, 2020


Chris Pinkney

Who is Chris?

Yo world.

My name is Chris and I’m an imposter. I’m currently a third-year student at Seneca College taking Computer Programming and Analysis, and this is my blog for Fall 2020’s OSD600-NSA. I currently reside on the third planet, but more specifically in Toronto, Canada.
Welcome.
I began dabbling with computer for longer than I’ve been alive now (which I will refrain from specifying at this time.) Anything digital has always attracted me, and thus I soon became the token “tech guy” of my family and friends. The natural step in this direction was either systems management (which I suppose is DevOps now), network administration, IT (shudder), or Software Development. It wasn’t until about 1-3 years ago that I started to seriously move past reading about development and technology to actively programming. Linux, modding, and game server administration were pillars of my technical youth so naturally, the next step in this direction was Open Source.
Most people want to feel as though they belong to something, and I think being an active contributor is the most time efficient way to provision this (or enlist.) Programming is my craft and I believe if you want to get better you should always strive to be the dumbest person in the room, and when you’re on the internet everyone is the dumbest person in the room (well, except for Linus Torvalds.)
That being said, I’m not sure what I’d like to work on over these next four months. I’ve been a World of Warcraft “player” since it came out, and a new major expansion pack is right around the corner. I’m sure there’ll plenty of opportunity to update the soon-to-be-broken User Interface addons (they break every expansion as Blizzard updates the UI API.)

I also have some experience in ML so playing around with visualization/analysis/ml libraries would be neat but I’m sure that’s way above my paygrade.
There’s also a workspace application that manages applications that would be fun to contribute to Rambox.

Finally, I’d like to actually migrate some of these posts to an actual blog when I get around to designing one for the purpose of boosting my employability communication.
An interesting trending repo is that of The Fastai Book. It’s an open source notebook that covers an introduction to deep learning, fastai, and PyTorch. The notebook is actually used in conjunction with an online course to learn the above topics! It contains code examples written in Python (which is quickly become the defacto ML language.) The notebook is separated into Jupyter Notebook files for corresponding chapters.
I chose this repo because I have passing interests and experience in ML, as I actually was involved in designing an Unsupervised Machine Learning model for the Ministry of Transportation as part of my 4 month co-op from May to August of this year. It’s something I’ve starred and bookmarked and will definitely be taking a look at. Although if there’s one thing I learned from my co-op, it’s that ML may not be the topic for me.
Anyway, that’s enough about me. I’m friendly most of the time so if any readers would ever like to chat about anything, I’m available.
Take care, be safe, and thanks for all the fish,
C

by Chris Pinkney at Wed Sep 16 2020 20:14:38 GMT+0000 (Coordinated Universal Time)


Ekaterina Grinberg

About me

My name is Ekaterina Grinberg and I am currently living in Toronto. I am a 4th-year student in a BSD program at Seneca College. Last year I graduated from the CPA program and as part of the program completed 3 co-op terms at the Ministry of Education as Application Programmer Analyst. Then I decided to continue the studies and transferred to the BSD program. I think I did the right decision because I finally could enrol in the Open Source course :) I tried to take this course earlier but it was really hard to get in since it gets filled up very fast. I wanted to take this course because many students recommend taking it and I really wanted to gain experience working with real projects. I think its important to learn how real projects are built since it provides an insight on how things work outside of school environment, students can learn from the experienced developers who write the code for the open-source projects and of course, it’s a bonus to the resume.

This term I would like to learn how Open Source projects are built. I would like to know the procedures that need to be done in order to contribute to the Open Source project, what are the practices and standards. I would like to contribute myself to one or several Open Source projects. Since I would like to concentrate on building Web Application in my career, I am interested in projects such as React, Angular, Visual Studio Code.

React-hook-form is the trending GitHub repo that I researched this week. I selected this repo because I am interested to learn more about React and be updated on the latest libraries and features that can help me build better and more efficient applications. This library helps to create “performant, flexible and extensible forms with easy-to-use validation”. Almost every application has a form which is used by many users therefore as a developer it is important to create efficient forms. React-hook-form helps to achieve it.

I will conclude this blog by saying that I am excited to take this course and looking forward to learning new things and contribute to real open source project 😊

by Ekaterina Grinberg at Wed Sep 16 2020 16:07:55 GMT+0000 (Coordinated Universal Time)


Xing Pan

Why do I take OSD600 @Seneca?

 My name is Xing. I am studying Computer Programming and Analysis at Seneca College.

It is my fifth semester now. I have to study online because of COVID-19 from last semester. The group work is turning more difficult since we cannot go to school. I hope COVID-19 will be end soon.

After I finished some web courses, I find it is hard to use my programming knowledge and create a new web app by myself. It is really hard to combine my knowledge and use them in real. When I chose the optional profession course for this semester, I found OSD600 (Open Source Development). It is a project-based and practical programming course. The students will develop open source software through direct involvement in a real open source project. I think it will improve my practical programming skill effectively in real.

This week, I started to study OSD600. I hope that I can work on a real web app for a real retail company. After this semester, I hope I would know how to use my programming knowledge in real.

For the first week lab, I forked Seneca2017LearningLab from humphd: https://github.com/xingpancanada/Seneca2017LearningLab. It introduces some basic points for GitHub. I think there are something I will use when I use GitHub more.

by Xing Pan at Wed Sep 16 2020 03:46:00 GMT+0000 (Coordinated Universal Time)


Jie Yang

New Adventure

Hi everyone! My name is Jie Yang. You can call me Jossie. I am currently living in Toronto. I am so excited to start blogging here to record my footprints on the path of learning open source development.

As a freshman in the field of computer programming, I want to practice my programming skills in real life, that’s the reason why I take the course OSD600. I believe this course would be the most practical and useful course that I have ever taken, although it may be not easy to get a “A+”. Additionally, I have a passion for building tools that enhance the quality and simplicity of our life, while Open Source gives me the opportunity to achieve the dream.

To be a qualified open source contributor at the end of this semester is the goal I set for myself, even though I have limited experience in GitHub right now. Moreover, I have no idea what project I want to work on now. But I already have some choices through the research on a trending repo, such as https://github.com/TheAlgorithms/C-Plus-Plus , a repository that is a collection of open-source implementation of a variety of algorithms implemented in C++. Since I am learning data structure and algorithm, I think I can do some contributions on that. I will keep seeking those projects I am interested in in the coming days, and keep updated in my blog.

I can only hope that this blog will open up a new journey for me where I can share my open source projects, meet new people, and of course keep track of my weekly work.

by Jie Yang at Wed Sep 16 2020 03:37:59 GMT+0000 (Coordinated Universal Time)

Tuesday, September 15, 2020


Roger Yu

Hello World

Welcome to my blog.

I am a third-year student at Seneca College located in Ontario, Canada. I am currently studying Computer Programming as I want to start a career in Software Development.

I am taking OSD600 because I believe in Open Source development. I like Open Source because it allows people all over the world to collaborate on software projects together, which I find very fascinating. Additionally, it is because of Open Source, that allows a lot of programs such as VLC to LibreOffice, to operating systems like Linux to exists and used freely. This course was attractive to me because it is unique and allows people to begin their journey across open-source software. Also, I like how this course allows us to create programs with a lot of freedom.

There are many things I would like to accomplish. I hope I can contribute to an Open Source project of my choice. I also hope to learn about the processes involved with Open Source projects, the backgrounds, the ideas, and the benefits and drawbacks. Additionally, I would like to gain some experience in Open Source development.

The GitHub repo that I decided to pick is called Ciphey, which is found here. This Open Source project looks interesting because has to do with cryptography. It is essentially a easy way to break encryption using CLI. I don’t have any experience in this area, but I am interested in learning about it. This is because cryptography is what started the whole computer race, with Alan Turing and the Enigma machine during World War II. Additionally, I would like to learn more about the concepts of algorithms and computer science, so I believe this may be a good project to learn from and apply my skills.

That is all for now. See you next time.

by Roger Yu at Tue Sep 15 2020 18:03:08 GMT+0000 (Coordinated Universal Time)


Zongwei Yang

goURL

Introduction

I am zongwei Yang living in Toronto,Canada.

goURL is a golang program which checks dead links from a file.

The GitHub trending I have rearched are vim-go, vscode, LeetCode-Go. They are the tools I use everyday. I benefit from the opensource programs, so I want to contribute back to the opensource community and take OSD600 this term.

fmt.Println("Hello, opensource")

by Zongwei Yang at Tue Sep 15 2020 16:45:56 GMT+0000 (Coordinated Universal Time)


Matthew Ross

My First Steps

 Hello readers! 

My name is Matthew Ross, and I am a currently a student at Seneca College in Ontario, Canada. This is my first (of many) posts that will attempt to track my progress as I get situated within the world of Open Source Development.

Why Blog?

While creating this blog is meant to be a requirement of a course focusing on Open Source Development, I have always considered documenting my thoughts in a way that will not only help me organize my thoughts, but also help others that are on a similar path to myself. My main reason for taking this particular course is to get over the overwhelming leviathan that is creating a presence in the OS world. It all seems overwhelming, and I hope that good instruction and guidance can get started. In the end, my plan is to collaborate with other developers, expand my knowledge on new and exciting topics, and make a name for myself (even if it is just a small piece of something much greater).

With the year 2020 being what it is, it makes sense to try and grow an online presence, since event such as networking are likely going to be through screens, so having a profile to show off can help break the mold. Currently, I'm working out of Kincardine, ON, which is situated along the coast of Lake Huron.

What I hope to get out of this practice

My goals with this blog and my participation in the community is to explore technologies and languages that I have only had a limited exposure to, and to contribute to projects that catch my attention. Once out of college, my eyes are set on Web Development, but being someone who enjoys working with data, the world of Machine Learning and Data Science are areas that have always intrigued me. On top of that, the other course that I am taking this semester is Computer Vision, so I'm curious to see how much that subject will alter my thoughts.

On that note, I scoured the trending projects on GitHub to try and find a repository that caught my attention. In the process, I discovered https://github.com/microsoft/computervision-recipes, which is a collection of "examples and best practice guidelines for building computer vision systems". While progress through my Computer Vision course, I plan on referring back to this repo to see if I can get a grasp on things I can improve on, and how well I'm capturing the knowledge needed to understand this field.

Thanks for checking out what will be the first of many posts by me, and I hope that my journey into the world of Open Source Development will be as adventurous for me as it will be for you!

by Matthew Ross at Tue Sep 15 2020 15:54:12 GMT+0000 (Coordinated Universal Time)


Andre Bhaseen

About Myself & Why I Chose This Course

Hi, my name is Andre. I am a software development student at Seneca College. I took this course in Open Source (DPS909) because I was interested in making my own fancy open source projects as well as being able to contribute to other people’s projects. I think being able to contribute to other people’s projects and help them build a better software is one of the things which really brings out the very best part about the internet. People are able to share ideas and improve and embetter the community and world around them as well as improving their own skills.

One particular open source project that really changed my life would be Blender. For those of you who don’t know, Blender is a 3D modeling and animation software. I first picked up using Blender in University when one of my friends told me they had 3D printers in the library. From there, I went on create 3D models to 3D print and now I even make assets for Cities Skylines. Not only that but because I learned animation, it lead me to picking up so many other things such as: Graphic Design, traditional hand drawing, digital drawing and special FX which I really enjoy. (You can see my projects here) If this wasn’t a free and open source project, I most likely would never have gotten into all of the things I just mentioned. So Open Source projects really mean a lot to me!

In terms of things I personally have an interest in programming are: hobby/toy robotics as well as application programs. (For example, my multi-instrument application which allows you to play the piano or drums in Java, which I made with a good friend of mine.) In terms of programming languages, my favorite, not necessarily my most used would be: C++, Assembly and Verilog HDL. (Though I’d probably never end-up using Verilog…) My most used languages are: JavaScript, Java and C++.

This term, I’m looking to work on projects that I find interesting, still not sure, but I have a vague idea of what I’d like to do. I’m thinking of things involving graphics or maybe something in front-end web development. Ultimately, if I find something that interests me other than those two subjects, I may pursue that instead. I’m also looking in terms of languages, if it’s C++, I’d definitely jump on the oppurtunity of doing something with graphics like particle effects generations for rendering/game engines.

For the trending Github Repos, I chose GORM which is documented here. I chose this because I heard a lot of good things about Golang and I hope to learn it one day. This project was made to simplify using SQL databases in Golang. As I was looking through the documentation, I noticed there were a lot of similarities to JavaScript’s Mongoose. So it would be familiar territory for anyone coming in from Web Development. Projects like these help to simplify the workflow of programmers. It allows people to easily integrate/implement code from another language into their language of choice.

by Andre Bhaseen at Tue Sep 15 2020 02:14:46 GMT+0000 (Coordinated Universal Time)

Monday, September 14, 2020


Kam Chan

DPS909 Week 1 Blog post

Hello My name is Kam Man Chan,

I’m currently study at Seneca Software Development program. I’m interest in Cloud computing and Smart contract also mobile development

I have been curiosity the open source community many years. but i have no ideal how to get my hands on the open source project.  And how to contribute code  to big project. How am I suppose to start.

Luckily Seneca has offer Open Source course. I’m looking forward to learn more about the Open source community and be able to contribute to the community.

Due to the Covid19, I’m Currently living in China (Hong Kong) right now.

I’m hoping to be able understanding how git command work, and be able to contribute code to open source project.

I have research a GitHub Trending repo about JavaScript code snippets for development needs. I believe this is very helpful for all the JavaScript developer or beginner to learn and understand how JavaScript can be use and different functionality of JavaScript
https://github.com/30-seconds/30-seconds-of-code

for example how to converts CSV to array, clone an object in JavaScript

If possible I would love to contribute to the community too

by Kam Chan at Mon Sep 14 2020 22:54:25 GMT+0000 (Coordinated Universal Time)


Kimin Lee

About Me!

Why are you taking OSD600?

Hello! everyone, I am so glad to join in the Open Source course in this semester with you guys. I always wanted to practice and develop skills in contributing a big project. To be honest, I barely knew what the open source was and how I could take advantage of it so far. So this will be the good chance for me to learn this thing and hopefully I can take away a lot throughout the course.
Once again nice to meet you guys and have some fun in this course

https://github.com/klee214
https://aboutkiminlee.herokuapp.com

Where am I?

I was originally born and raised in Korea(Not North!!). BUT, I didn't go back. I am currently living in Toronto and will be at least during this semester. Stay safe guys!

What am I hoping to accomplish this term?

Learning new skills and apply my skills to a project is my delight! I don't know much about Open Source, so I want to learn about what it is and how to use thoroughly. Besides I would like to contribute to a great project! So at the end of this semester, I would hopefully be a nicer open source programmer than now!

What was the the GitHub trending repo I researched above?

I have chosen Algorithm thing in Java. The reason is simple. I am learning DSA in this semester. So I thought maybe the extra algorithm thing would help me to understand the data structure thing.
Maybe, I would change the repo later in this course

That's all about me! Now, let's have some fun in this course!
Thank you

by Kimin Lee at Mon Sep 14 2020 21:31:11 GMT+0000 (Coordinated Universal Time)


Eunbee Kim

Eunbee in Toronto

Hi guys, Welcome to my blog!

WHO I AM?

I am Eunbee Kim and enjoying Toronto life. When I lived in South Korea, I worked as an IT Risk analyst for 3 years but my previous major is Business administration… During these experiences, I felt the lack of knowledge about the code and It was really hard to explain why this code had risk points to my client. I moved to Toronto in order to start studying programming 2 years ago and I love Web application, including API now.

OPEN SOURCE INTEREST?

I documented the security guideline of the open-source editor called WYSIWYG such as CKEditor and Naver editor. The prevent generally would be applied in the back-end side but I wanted to not show any weakness from the front-end to the back-end side. If I have the time, I will rewrite the documentation in this blog.

Anyway, I have one dream that I will code a unique authentication method and make it open to everyone. I looked over 30 API structures about payment system or login system authentication process. It is really complicated and elaborate.

Discussion?

I pick the one github repository below.

Easy to apply : https://github.com/laravel/fortify

Origin document : https://jetstream.laravel.com/1.x/introduction.html

This project is related to Laravel Jetstream Authentication and has simply registration, password reset and email verification.

I want to discuss two aspects of using this git project and . This project could make the programmer code easily by forking this method. However, if the hacker figures out the point that is able to pass him by authentication, he gets the valuable list that he can attack and get money from these sites on the list.

by Eunbee Kim at Mon Sep 14 2020 21:25:36 GMT+0000 (Coordinated Universal Time)


Joseph (Joey) Assal

OSD600 Post 1.0

Introduction:

Hello, my name is Joey and I am a student at Seneca studying Computer Programming. My whole life I have always been interested in technology. Towards the end of high school, I enrolled in Computer Science and enjoyed the subject. My passion for technology and love of code persuaded me to get an education in Computer Programming.

Why Are You Taking this Class?

I am taking this class to help widen my skill set and also because I have always been interested in Open Source. I know many programming technologies such as Java, C++ and SQL but I don't know anything about Open Source. It has been a goal of mine to learn but never had the time to look into it. Therefore, I decided to take this class as I believe this is one of the best opportunities to learn! 

What is it About Open Source that Attracted You?

The freedom the comes with it. I am fascinated by the idea that anyone can take my code and work with it, and I can do the same to theirs. I believe the more people that collaborate on something the better the outcome. This leads to "endless" improvement towards software since now (in a sense) everyone from around the world can come together and help improve software and add new innovations to it.

Where are you?

I am currently in Ontario

What are you hoping to accomplish this term? What kinds of projects do you want to work on?

I am hoping to learn about open source and get some experience working with it. I would also like to get an 'A' in this class. I know grades are not everything but I am hoping to maintain my GPA. I have always been interested in web development and really enjoyed the web classes we had to take at Seneca. So I would like to work on something using web technologies (Angular, Javascript, API's ect...).

What was the GitHub trending repo you researched above? Provide a link and tell us about it. Why did you pick it?

The trending repo I picked was "Algorithms" by williamfiset

Original repo: https://github.com/williamfiset/Algorithms 

Forked repo: https://github.com/joey2031/Algorithms

This is a collection of algorithms and data structures written in Java (search, sort, ect...) I picked this because I know data structures and algorithms are a very important topic in Computer Science/Programming so I think it's nice to have this repository as a reference on how to build them.  I am always documenting on my Github through private repositories so I can look back if I forget how to do something. Eg. archiving labs, assignments, or any testing code I wrote to learn a new concept. This caught my eye because this is something I would do (and contribute to).  




by Joseph (Joey) Assal at Mon Sep 14 2020 18:05:00 GMT+0000 (Coordinated Universal Time)

Friday, August 28, 2020


Ray Gervais

Building A Hardened Docker Image Using Modern Infrastructure Tooling

Hey friend, it's been a while since I last posted here -soon to be four months had I not started writing this article. It's been quite the past few months, but I thought about this subject quite a bit recently as enterprise lessons on design and iteration have prompted me wanting to explore similar practices. What am I exploring -as the title suggests, building Docker images leveraging infrastructure technologies and tooling such as Packer, Puppet, and InSpec! So, why would I use such technologies when a simple Dockerfile might suffice for an example like this? Because whereas a Dockerfile works only with Docker, these individual components allow us to create a modularized and portable set of layers which can be leveraged in various contexts, such as building virtual machines in a variety of public cloud providers such as Microsoft Azure, Google Cloud, and Amazon Web Services. It'll make sense hopefully as we go along, so let's identify the key layers and requirements:

  • Packer: Overall orchestrator which creates the Docker image
  • Puppet: Configures the image to our requirements, which are:
    • Create the following users: dev, qat, and uat
    • Update the image to include latest patches available through the respective repositories
    • Implement OS hardening using the dev-sec/os-hardening open source module
  • InSpec: Testing framework to validate various requirements were achieved

Digging Into Packer and Hashicorp's Control Language (HCL)2

HCL 1.0 could be mistaken for straight JSON, appearing as:

{
  "builders": [
    {
      "ami_name": "packer-test",
      "region": "us-east-1",
      "instance_type": "t2.micro",

      "source_ami_filter": {
        "filters": {
          "virtualization-type": "hvm",
          "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*",
          "root-device-type": "ebs"
        },
        "owners": ["amazon"],
        "most_recent": true
      },

      "ssh_username": "ubuntu",
      "type": "amazon-ebs"
    }
  ],
  "provisioners": [
    {
      "type": "shell",
      "inline": ["sleep 5"]
    }
  ]
}

This JSON-esque control language I've seen since entering the Cloud Engineering world, and was rather interested in trying HCL2 for this experiment since it builds off of the experiences of Hashicorp's Terraform configuration language. That being, no more JSON and instead following a more Golang syntax. So, let's get started building a Ubuntu 20.04 Docker image! The final source code can be found here for those wanting to follow along. I've included Packer's JSON to HCL2 comments to help provide context where possible.

# file: ubuntu.pkr.hcl
# version: 1.0

# the source block is what was defined in the builders section and represents a
# reusable way to start a machine. You build your images from that source. All
# sources have a 1:1 correspondence to what currently is a builder.
source "docker" "ubuntu" {
  image   = "ubuntu:20.04"
  commit  = true
}

# A build starts sources and runs provisioning steps on those sources.
build {
  sources = [
    "source.docker.ubuntu",
  ]

  # All provisioners and post-processors have a 1:1 correspondence to their
  # current layout. The argument name (ie: inline) must to be unquoted
  # and can be set using the equal sign operator (=).
  provisioner "shell" {
    inline = [
        "apt update -y",
        "apt upgrade -y",
    ]
  }

  post-processor "docker-tag" {
    repository = "raygervais/ubuntu-packer-build"
    tags       = ["1.0"]
  }
}

To run packer, you need to install it locally on your host machine. Then, you can execute with packer build . in the same directory as your ubuntu.prk.hcl file will produce a stock Ubuntu 20.04 Docker container. For this tutorial, I'm leveraging the WSL2-backend Docker setup I described here. Whereas we could leverage changes within the source block which allows us to add the typical ENV, WORKDIR, RUN, COPY, we're going to leave configuration of the image to Puppet for the most part. So, let's update the provisioner.shell array to install Puppet and Inspec on the docker image. The DEBIAN_FRONTEND environment variable is to ensure various packages such as timezone don't wait for user input or confirmations prior to installation.

provisioner "shell" {
  inline = [
    "apt update -y",
    "apt upgrade -y",
    "DEBIAN_FRONTEND='noninteractive' apt install puppet -y",
  ]
}

Handing Controls to the Puppet [Master]

So here's where modularity starts to come into play. The purpose of utilizing Puppet (or any configuration management system) instead of shell scripts is to leverage an abstraction layer between various package managers, operating systems and compute types using a single language / tool. Whereas we are currently working with Docker, the same could be run on virtual machines built in the public cloud, or orchestrated in VM Ware. Though it's against good practice, I'm going to write the configuration code all in a single class file purely for easier reading. If we are to create a single user, that can be done with the following puppet file and a simple puppet apply app.pp.

# app.pp
class app {
  user { 'rgervais':
    ensure     => present,
    managehome => true,
    home       => '/home/rgervais'
  }
}

Now, let's add the user accounts that we determined in our requirements. Though this array could be passed in via other configuration files, let's keep it simple for this example.

# app.pp
  user { "dev":
    ensure     => present,
    managehome => true,
    home       => "/home/dev"
  }

  user { "qat":
    ensure     => present,
    managehome => true,
    home       => "/home/dev"
  }

  user { "uat":
    ensure     => present,
    managehome => true,
    home       => "/home/dev"
  }

Validating With Inspec

So funny side note, I typically write these types of articles after writing the example code / project. I opted to not do that this time since I too was learning HCL2 and building Docker images using Packer in this monorepo fashion as I was writing. I wanted to write in this fashion so that I could quantify what I had learned into semi-reasonable understanding and update the post as I drafted it. With that, after debugging on the weekend what I thought would be a simple implementation, I ended up writing a issue ticket for Packer seeking help on the matter. Turns out, though we don't need Puppet installed on the host machine for it to run on the Docker image builder, we do require InSpec! No longer need this line which you'll find in the example repo's initial commit "DEBIAN_FRONTEND='noninteractive' curl -L https://omnitruck.chef.io/install.sh | bash -s -- -P inspec". So, I'm attempting to contribute some additional documentation so that others don't follow the same misunderstood workflow as I did. Thanks again @sylviamoss for your help!

InSpec, which was inspired by ServerSpec is a server testing framework built ontop of Ruby technologies by Chef, allowing for one to test and ensure "compliance as code". To get started, let's add our profile declaration in the inspec.yml file, located in our tests folder.

# inspec.yml
---
name: packer-puppet-inspec-profile
maintainer: Ray Gervais
license: MIT
summary: An InSpec Compliance Profile Example
version: 1.0

supports:
  - platform-family: linux

This allows profile allows us to pass variables as well, but that's for another post. The next folder we're going to create is controls, which is the folder inspec looks for to locate tests. It'll go in our tests folder and house our users.rb test.

# users.rb
control 'users' do
    impact 1.0
    title 'Ensure user accounts were created'

    # Resource: https://docs.chef.io/inspec/resources/user/
    describe user('dev') do
        it { should exist }
        its('home') { should eq '/home/dev' }
        its('badpasswordattempts') { should eq 0 }
    end

    describe user('qat') do
        it { should exist }
        its('home') { should eq '/home/qat' }
        its('badpasswordattempts') { should eq 0 }
    end

    describe user('uat') do
        it { should exist }
        its('home') { should eq '/home/uat' }
        its('badpasswordattempts') { should eq 0 }
    end
end

One of the benefits to utilizing InSpec is the how friendly / human-readable it is for developers and non-developers alike. With the file above, we are able to determine that the three users dev, qat, and uat are created with their corresponding user-homes and shells configured as described in the code.

    docker.ubuntu: Profile: packer-puppet-inspec-profile
    docker.ubuntu: Version: 1.0
    docker.ubuntu: Target:  ssh://raygervais@127.0.0.1:42261
    docker.ubuntu:
    docker.ubuntu:     users: Ensure user accounts were created
    docker.ubuntu:        User dev is expected to exist
    docker.ubuntu:        User dev home is expected to eq "/home/dev"
    docker.ubuntu:        User dev badpasswordattempts is expected to eq 0
    docker.ubuntu:        User qat is expected to exist
    docker.ubuntu:        User qat home is expected to eq "/home/qat"
    docker.ubuntu:        User qat badpasswordattempts is expected to eq 0
    docker.ubuntu:        User uat is expected to exist
    docker.ubuntu:        User uat home is expected to eq "/home/uat"
    docker.ubuntu:        User uat badpasswordattempts is expected to eq 0
    docker.ubuntu:
    docker.ubuntu:
    docker.ubuntu: Profile Summary: 1 successful control, 0 control failures, 0 controls skipped
    docker.ubuntu: Test Summary: 9 successful, 0 failures, 0 skipped

Hardening The Docker Image

What's the number one concern for a cloud engineer once their tools are out in the open? The security of the machine hosting and running said tools! It's for this overly dramatic (and poorly explained) reason that the CIS [Center For Information Security] benchmarks were created to create a standardized and well researched set of rules for both Windows and Linux-based operating systems. I've seen it everywhere I've worked in varying degrees, and have equally implemented systems which enable and test for compliance of our infrastructure against the benchmark. Having a secure docker image is like adding having the best security system for your house -it doesn't make it impenetrable, but removes common settings and configurations which when left untouched, prove to be an attack vector.

On Github, you can find countless implementations of the CIS rules for the common configuration management platforms such as Ansible, Chef, Salt, and Puppet. Since I have recent experience with Puppet, I'll be using the DevSec provided os-hardening module, which is described, This [puppet] module provides numerous security-related configurations, providing all-round base protection. Though it may not cover all of the CIS, I wanted to explore and understand the configuration differences between os-hardening, and the inspec-docker-cis or inspec-dil-cis profiles.

# hardening.pp
include class { 'os_hardening': system_environment => "docker"}
# ubuntu.pkr.hcl
provisioner "puppet-masterless" {
    manifest_file     = "config/hardening.pp"
    prevent_sudo      = true
    guest_os_type     = "unix"
    ignore_exit_codes = true
}

provisioner "inspec" {
    inspec_env_vars = ["CHEF_LICENSE=accept"]
    profile         = "https://github.com/dev-sec/linux-baseline"
    extra_arguments = ["--no-distinct-exit"]
}

When running the same packer build . with the new additions, we should see snippets such as the following in our output which allows one to slip in some peace of mind:

==> docker.ubuntu: Provisioning with Inspec...
==> docker.ubuntu: Executing Inspec: inspec exec https://github.com/dev-sec/linux-baseline --backend ssh --host 127.0.0.1 --user raygervais --key-files /tmp/packer-provisioner-inspec.234902354.key --port 37521 --input-file /tmp/packer-provisioner-inspec.960005257.yml --no-distinct-exit
    docker.ubuntu: [2020-08-27T16:06:33-04:00] WARN: URL target https://github.com/dev-sec/linux-baseline transformed to https://github.com/dev-sec/linux-baseline/archive/master.tar.gz. Consider using the git fetcher
    docker.ubuntu:
    docker.ubuntu: Profile: DevSec Linux Security Baseline (linux-baseline)
    docker.ubuntu: Version: 2.5.0
    docker.ubuntu: Target:  ssh://raygervais@127.0.0.1:37521
    docker.ubuntu:
    docker.ubuntu:   ✔  os-01: Trusted hosts login
    docker.ubuntu:      ✔  File /etc/hosts.equiv is expected not to exist
    docker.ubuntu:   ✔  os-02: Check owner and permissions for /etc/shadow
    docker.ubuntu:      ✔  File /etc/shadow is expected to exist
    docker.ubuntu:      ✔  File /etc/shadow is expected to be file
    docker.ubuntu:      ✔  File /etc/shadow is expected to be owned by "root"
    docker.ubuntu:      ✔  File /etc/shadow is expected not to be executable
    docker.ubuntu:      ✔  File /etc/shadow is expected not to be readable by other
    docker.ubuntu:      ✔  File /etc/shadow group is expected to eq "shadow"
    docker.ubuntu:      ✔  File /etc/shadow is expected to be writable by owner
    docker.ubuntu:      ✔  File /etc/shadow is expected to be readable by owner
    docker.ubuntu:      ✔  File /etc/shadow is expected to be readable by group
    docker.ubuntu:   ✔  os-03: Check owner and permissions for /etc/passwd
    docker.ubuntu:      ✔  File /etc/passwd is expected to exist
    docker.ubuntu:      ✔  File /etc/passwd is expected to be file
    docker.ubuntu:      ✔  File /etc/passwd is expected to be owned by "root"
    docker.ubuntu:      ✔  File /etc/passwd is expected not to be executable
    docker.ubuntu:      ✔  File /etc/passwd is expected to be writable by owner
    docker.ubuntu:      ✔  File /etc/passwd is expected not to be writable by group
    docker.ubuntu:      ✔  File /etc/passwd is expected not to be writable by other
    docker.ubuntu:      ✔  File /etc/passwd is expected to be readable by owner
    docker.ubuntu:      ✔  File /etc/passwd is expected to be readable by group
    docker.ubuntu:      ✔  File /etc/passwd is expected to be readable by other
    docker.ubuntu:      ✔  File /etc/passwd group is expected to eq "root"
    docker.ubuntu:   ✔  os-03b: Check passwords hashes in /etc/passwd
    docker.ubuntu:      ✔  /etc/passwd passwords is expected to be in "x" and "*"
    docker.ubuntu:   ✔  os-04: Dot in PATH variable
    docker.ubuntu:      ✔  Environment variable PATH split is expected not to include ""
    docker.ubuntu:      ✔  Environment variable PATH split is expected not to include "."
    docker.ubuntu:   ✔  os-05: Check login.defs
    docker.ubuntu:      ✔  File /etc/login.defs is expected to exist
    docker.ubuntu:      ✔  File /etc/login.defs is expected to be file
    docker.ubuntu:      ✔  File /etc/login.defs is expected to be owned by "root"
    docker.ubuntu:      ✔  File /etc/login.defs is expected not to be executable
    docker.ubuntu:      ✔  File /etc/login.defs is expected to be readable by owner
    docker.ubuntu:      ✔  File /etc/login.defs is expected to be readable by group
    docker.ubuntu:      ✔  File /etc/login.defs is expected to be readable by other
    docker.ubuntu:      ✔  File /etc/login.defs group is expected to eq "root"
    docker.ubuntu:      ✔  login.defs ENV_SUPATH is expected to include "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    docker.ubuntu:      ✔  login.defs ENV_PATH is expected to include "/usr/local/bin:/usr/bin:/bin"
    docker.ubuntu:      ✔  login.defs UMASK is expected to include "027"
    docker.ubuntu:      ✔  login.defs PASS_MAX_DAYS is expected to eq "60"
    docker.ubuntu:      ✔  login.defs PASS_MIN_DAYS is expected to eq "7"
    docker.ubuntu:      ✔  login.defs PASS_WARN_AGE is expected to eq "7"
    docker.ubuntu:      ✔  login.defs LOGIN_RETRIES is expected to eq "5"
    docker.ubuntu:      ✔  login.defs LOGIN_TIMEOUT is expected to eq "60"
    docker.ubuntu:      ✔  login.defs UID_MIN is expected to eq "1000"
    docker.ubuntu:      ✔  login.defs GID_MIN is expected to eq "1000"
    docker.ubuntu:   ↺  os-05b: Check login.defs - RedHat specific
    docker.ubuntu:      ↺  Skipped control due to only_if condition.
    docker.ubuntu:   ✔  os-06: Check for SUID/ SGID blacklist
    docker.ubuntu:      ✔  suid_check diff is expected to be empty
    docker.ubuntu:   ✔  os-07: Unique uid and gid
    docker.ubuntu:      ✔  /etc/passwd uids is expected not to contain duplicates
    docker.ubuntu:      ✔  /etc/group gids is expected not to contain duplicates
    docker.ubuntu:   ✔  os-08: Entropy
    docker.ubuntu:      ✔  3800 is expected to >= 1000
    docker.ubuntu:   ✔  os-09: Check for .rhosts and .netrc file
    docker.ubuntu:      ✔  [] is expected to be empty
    docker.ubuntu:   ↺  os-10: CIS: Disable unused filesystems
    docker.ubuntu:      ↺  Skipped control due to only_if condition.
    docker.ubuntu:   ✔  os-11: Protect log-directory
    docker.ubuntu:      ✔  File /var/log is expected to be directory
    docker.ubuntu:      ✔  File /var/log is expected to be owned by "root"
    docker.ubuntu:      ✔  File /var/log group is expected to match /^root|syslog$/
    docker.ubuntu:   ✔  package-01: Do not run deprecated inetd or xinetd
    docker.ubuntu:      ✔  System Package inetd is expected not to be installed
    docker.ubuntu:      ✔  System Package xinetd is expected not to be installed
    docker.ubuntu:   ✔  package-02: Do not install Telnet server
    docker.ubuntu:      ✔  System Package telnetd is expected not to be installed
    docker.ubuntu:   ✔  package-03: Do not install rsh server
    docker.ubuntu:      ✔  System Package rsh-server is expected not to be installed
    docker.ubuntu:   ✔  package-05: Do not install ypserv server (NIS)
    docker.ubuntu:      ✔  System Package ypserv is expected not to be installed
    docker.ubuntu:   ✔  package-06: Do not install tftp server
    docker.ubuntu:      ✔  System Package tftp-server is expected not to be installed
    docker.ubuntu:   ↺  package-07: Install syslog server package
    docker.ubuntu:      ↺  Skipped control due to only_if condition.
    docker.ubuntu:   ↺  package-08: Install auditd
    docker.ubuntu:      ↺  Skipped control due to only_if condition.
    docker.ubuntu:   ✔  package-09: CIS: Additional process hardening
    docker.ubuntu:      ✔  System Package prelink is expected not to be installed
    docker.ubuntu:   ↺  sysctl-01: IPv4 Forwarding
    docker.ubuntu:      ↺  Skipped control due to only_if condition.
    docker.ubuntu:   ↺  sysctl-02: Reverse path filtering
    docker.ubuntu:      ↺  Skipped control due to only_if condition.
    ..............
    docker.ubuntu:
    docker.ubuntu:
    docker.ubuntu: Profile Summary: 17 successful controls, 0 control failures, 38 controls skipped
    docker.ubuntu: Test Summary: 57 successful, 0 failures, 38 skipped

Ta-da! We can see our new Docker image in all it's glory by using docker images.

REPOSITORY                       TAG                 IMAGE ID            CREATED             SIZE
raygervais/ubuntu-packer-build   1.0                 7ac57917ef93        25 hours ago        107MB

Finally, if we wanted to jump into the container, we could do that with docker run -it raygervais/ubuntu-packer-build:1.0. Once in, we can verify that Puppet ran (if the InSpec tests weren't enough) with ls -la /home, to which we see our newly created home directories (and their respective users/owners):

root@382af3e8cd70:/home# ls -la
total 20
drwxr-xr-x 1 root root 4096 Aug 27 20:06 .
drwxr-xr-x 1 root root 4096 Aug 28 21:00 ..
drwxr-xr-x 2 dev  dev  4096 Aug 27 20:06 dev
drwxr-xr-x 2 qat  qat  4096 Aug 27 20:06 qat
drwxr-xr-x 2 uat  uat  4096 Aug 27 20:06 uat

Next Steps

To recap, our final project structure should have the following folders with their respective files:

Folder Description
config the puppet configuration files
scripts any additional shell scripts
templates packer HCL files
tests InSpec profile tests

If we wanted to now extend this to other operating systems or platforms, the configurations and various tests are separated in such a way that extending them is trivial! The investment would be in writing dedicated HCL files for the additional platforms, and extending our Puppet configurations to support additional systems (in the our use-case, it's incredible portable, but if you were leveraging the apt package manager for example, it wouldn't work with RHEL-based systems which utilize yum alongside rpm).

The beauty of this monorepo architecture (which is odd for me to advocate, but here we are. I blame 2020.) allows for us to pool the entire container workflow inputs into a single location which can be versioned via GIT or another tool. Instead of having to hunt through various repositories in your VCS, or look for the needle (commit) in the haystack (git history) of which commit broke your build over multiple projects, you only have one history to worry about. The best part? With CI/CD tooling, we can have test builds after each commit and ensure our main branch is always stable! You have no idea how much frustration I've experienced due to the last point in the past while. This has been a fun experiment learning how modern Packer + HCL2 writes, and utilizing a monorepo structure!

Resources

by Ray Gervais at Fri Aug 28 2020 00:00:00 GMT+0000 (Coordinated Universal Time)

Sunday, August 23, 2020


Bowei Yao

Kittens

TLDR: Got 2 kittens. Started youtube channel for them, recording their daily activities here. Channel link is here: https://www.youtube.com/channel/UCCdm3TpD4dW9Z7sv7B8I9NA?view_as=subscriber

How it all got started:

A friend of my wife has two adult cats, and she didn’t get them neutered. The cats are American shorthair and Ragdoll, respectively.

One day she woke up to a litter of triplets, so she realised the gravity of the situation. She proceeded to book neutering appointment for her pets.

Then COVID-19 struck. Vets were closed and her appointments were delayed. One day she woke up to another litter of quintuplets.

So she basically SOS’ed for help, asking her friends to adopt since she no longer has the capacity nor room to care for this many (2 + 3 + 5). We reached out and got two of them from her.

Here they are:

by Bowei Yao at Sun Aug 23 2020 20:02:41 GMT+0000 (Coordinated Universal Time)

Sunday, July 26, 2020


Catherine Leung

Summer Fully Online

I taught this summer term fully online This is different from the winter semester where I started with a class in person then went online towards the end the term. I thought it might be a good idea to write about this experience as it is a bit different from the first case.

Preparation and Tools

In the winter semester when we went online we had a week to convert our class. It was pretty fast, however as we already knew our students and had been communicating with them during the term, the way students would find their course materials (notes, assignments, etc.) were generally known to the students already. For me, the only new parts were online delivery and online testing. Once I figured out which platform to use, I was pretty much ready to go.

The summer term however posed a different challenge. I will not have had 9 weeks in person with the students before going online. As such, one of the challenges for me was one of organization. I will start by stating that organization is not my strong suit. Anyone who has ever met me know that my general method of organization is “piles”… throw things into various piles, look for things based on which pile you think it was thrown into… this has never been truly effective but /shrug… This term though, because I was online, I had to be really organized. I took the course led by Seneca’s Teaching and Learning department about teaching remotely. It was a pretty good course and there were a few things that I learned that I thought was really helpful.

  1. Create a welcome video. Because your students are learning remotely make a video to show them how to get started. Mine was posted as an unlisted video on youtube (though learning what I know, next term I’ll have to rethink this for next term… see below). Here is what I posted :
    https://www.youtube.com/watch?v=_KeNE-773eY
  2. Being fully online, I wanted a way to make it clear what materials were being covered and when. I borrowed this technique from the online teaching course as I thought it was a very tidy way to show the things that needed attention each week. Instead of organizing materials by category (reading, assignments, labs etc.) I set up blackboard chronologically and organized the tasks by week. In each week, I posted all the materials that were relevant for that week, all the readings, a blurb about lectures, labs and assignments. The materials were still hosted in my github repo and students were welcome to go to that repo directly. In the repository, the material is organized categorically as opposed to chronologically so students could access the material however they wished. Having the material organized in this way is nice… it makes it clear what materials were being covered, what assessments were required.

Access

In the winter term, when we went online, all my students were still local. That is they lived somewhere nearby…all my students were still in Canada and in same time zone. During the summer term, I had two students who were located far away. To different countries… in different time zones. Ensuring that they could still access the material was crucial.

We seem to take so much for granted that students would have access to what they need when they aren’t located locally that it is always shocking when they don’t. For example, we always think of youtube as being always available, easy to access for everyone. However, during a teachers group seminar, I learned that this was not the case… youtube (and I think google based things in general) is not accessible in China, so if you make your vids available through youtube… this is actually a problem.

Another thing that I thought was pretty widely available was github. As I am teaching software development to students, I think its a good idea for our students to be exposed to github and to learn how to use it effectively. I always set up a github organization for my students and provide private repositories for them via the github education program. I make my own materials available to my students via a github repo (course documents in wiki, code samples in repo). Never had a problem with this… until one of my students went home to be with their family in Iran. Because my student was in Iran, they lost access to their private repository. Work arounds ensued (submitting via other tools, making my course repository public etc.).

For another student, it wasn’t access but rather a 11 hour or so time difference. Even though I held synchronous classes, I recorded my classes so that they could be accessed after class. I think this is pretty important as it is really not reasonable to ask a student to go to class at 3am. Given the schedule for my class, the student would attend when it was reasonable and watch recordings when not. We need to really make this available to them.

TODO

One of the hardest things to do is to guage whether or not my students are following the material properly. In class, you can read the expression on student’s faces whether or not they understand the material. Online, this is simply not possible (most do not use their web cams). One of the things that I still need to work on is to be able guage whether or not the material is absorbed or not. Not too sure how to do this yet… I’m thinking intermitten surveys during class could be useful. I’ll need to think this through on how best to do this though.

by Catherine Leung at Sun Jul 26 2020 17:28:59 GMT+0000 (Coordinated Universal Time)

Monday, July 20, 2020


David Humphrey

On Boring Paths

I was chatting with a student today who couldn't figure out why his scripts wouldn't run.  He was doing everything correctly, but still the commands failed with a bizarre error.  I asked to see the output.  Here's an approximation:

PS C:\Users\student\OneDrive\Computer Programming\Assignments & Tests\assignment4> npm run server
'Tests\assignment4\node_modules\.bin\' is not recognized as an internal or external command,
operable program or batch file.
internal/modules/cjs/loader.js:969
  throw err;
  ^

The error here stems from the pathname, which contains an &.  In many shells, including PowerShell, this will often get interpreted as part of the shell command vs. the filename.  You can see the error message above referring to the portion of the path after the &, ignoring everything before it.

It's not an obvious problem until, and unless you know about using & in shell commands.  I also think that the proliferation of non-filesystem naming in tools like Google Docs and the like, contributes to a sense that a pathname can be any text you want.  After all, typing an & in the title of a Word Doc isn't a problem, why should it be in a file path?

Paths, filenames, URLs, and other technical naming formats are not the place to get creative with your use of the keyboard.  You want to keep things boring:  lowercase (looking at you, Apple), no spaces (looking at you, npm), no special characters.  Keep it short.  Keep it simple.  Keep it boring.

by David Humphrey at Mon Jul 20 2020 15:11:30 GMT+0000 (Coordinated Universal Time)

Saturday, June 27, 2020


Yoosuk Sim

Creating a patch for GNU GCC using Git

Overview and Target Audience

The GNU GCC project followed a blend of a traditional method with contemporary git tools when it comes to contributing code, making the experience unique from some other, git-based projects. This blog post will explore different aspects of the process, helpful commands, and various scripts that would make the experience more pleasent for new contributors. While this blog aims to help new contributors get acustomed to the GNU GCC code culture and make contributing easier, it must be stressed that this is not in any way in-depth exploration of the process. This should help you put your first foot forward; the community will help you take the rest of the steps from that point on. This post also assumes the user is in a POSIX environment (e.g. Linux, FreeBSD).

Git and GNU

As stated in this phoronix post, GNU GCC made a full transition to git early 2020. As of this writing, the community seems to be adjusting to the new tools. GNU GCC hosts its own git server as well as a Github mirror. As far as contributing code goes, making a PR is not the way to go; rather, the contributor is expected to make a patch file and submit it to their gcc-patches@gcc.gnu.org mailing list, where the patch will go through the process of being reviewed, fixed, and, hopefully, committed. Fortunately, git provides some useful tools for these purposes.

Useful Git commands

Some of the more famous git commands include: checkout, branch, commit, pull, push, clone, and merge. This post will not cover these commands as their detail instructions and examples are fairly easy to find. Instead, this post will cover some of the less-famous commands that are nonetheless very useful for projects such as GNU GCC.

format-patch

This git command can create an email-ready text file, complete with a from-address, subject line, a message, and a patch content. By default, it would go through each git commit and create a patch for each commit. Two of its noteable flags are:

  • -o: defines the destination of the output,
  • -M: defines the branch the current branch should compare to.
The command uses the commit title as the subject line, preceding it with [PATCH]. Different string may be used to preceed it if needed. The commit message body will be a part of the email body, along with the diff for patch.

send-email

This git command is useful for developers witihout a proper mailing client that would process the patch file. In particular, GMail is not very suitable for the process as it may handle its own formatting differently when content is pasted through the browser client. This command also allows easy way to script the process so that the patch can be sent with minimal user interaction. Some noteable flags are --to and --cc. They can be used multiple times to designate the receipient of the email.

NOTE: The --to and --cc flags also exits for the format-patch command and maybe used at the patch creation process if desired.

To use this feature with GMail, the account holder must supply additional information in the ~/.gitconfig file.

[user]
email = your-email-id-here@gmail.com
name = your-github-id-here

[sendemail]
smtpEncryption = tls
smtpServer = smtp.gmail.com
smtpUser = your-email-id-here@gmail.com
smtpServerPort = 587
smtpPass = your-gmail-App-password-here

Due to GMail security policy, putting your regular GMail password would not work for smtpPass: this password must be explicitely generated. Please refer to the related document for more information.

Python

The GNU GCC project makes use of python in various tasks. In particular, the contrib/ folder contains a number of useful python scripts that helps with the patch submission process. The Python community suggests using a virtual environment for each Python project by using commands like pipenv. This will keep each Python project dependencies separate from each other while also keep a document of Python dependencies, called Pipfile, for consistant project behavior across different development environment.

Setting up Pipfile

The GNU GCC unfortunately does not come with its own Pipfile. It is also not in its .gitignore file, too. For now, to keep a copy for use with the local repository, add the following line to the .git/info/exclude file:

Pipfile*
. This will ignore both the Pipfile and Pipfile.lock. Please also install pipenv using your distro's package management program. Then, go to the root of the project directory and run:
$ pipenv install requests unidef termcolor 

This should install three packages necessary to run the two very useful Python scripts in the contrib/ directory.

Now, from the root of the directory, you can run scripts like mklog.py like this:

 $ pipenv run contrib/mklog.py path-to-patch-file-here 

Some useful scripts

contrib/mklog.py: ChangeLog generator

Each patch must contain a passage called ChangeLog as a part of the body of the message, preceeding the patch information. While the exact formatting of the ChangeLog is beyond the scope of the blog, thankfully, the contrib/ provides a useful script, called mklog.py, that assists with the process. This script accepts an existing patch and outputs a formatted, skeletal body approprpriate for the patch. It usually require more input from the user to fill out the specific changes the patch introduces to the code base. Note that this introduces a catch-22 situation: the output of the script should go into the body of the patch, ideally when the patch is being made, but the script cannot run without an existing patch as an input. This issue will later be addressed with a script to streamline the process.

contrib/check_GNU_style.py: Styling checker

Like all well-maintained project, GNU GCC also has styling notes that the code should follow. Unfortunately, the project doesn't seem to come with tools like prettier that can be used to automate the proper formatting. They do have the next best thing: a format checker for an existing patch: contrib/check_GNU_style.py. It takes a patch as a required argument and outputs a report of styling suggestions to the standard out. It may optionally create a file of a condensed version of styling suggestion as needed. By using this script, the contributor may then manually make styling changes to their code.

Helpful Scripts

As programs and scripts that adheres to the Unix philosophy, many of the above can do one thing and one thing really well. Each of them are well suited as a single step among multiple steps necessary to achieve the goal. Fortunately, this makes them perfect component for scripts to streamline the process. Following scripts are proof-of-concept to handle a given situation. It works well for me; I hope it serves you well. Don't forget to customize it to fit your development environment.

For reference, the directory structure is as follows:


gcc/ # GCC local project directory that holds all GCC-related folders.
- gcc/ # GCC local git repo directory, i.e. GCCTOP.
- patch/ # patch destination.
- gcc-build # GCC build directory where that runs configuration and make.

gcccheckpatch.sh

This script is more for quality-of-life improvements and contains no real additional logic. Please note the environmental variable GCCTOP refers to the root of the gcc local repo.

gcccheckpatch.sh:
#!/usr/bin/env sh

pipenv run $GCCTOP/contrib/check_GNU_style.py $@

gccmklog.sh

This script accepts one argument: the path to the patch. It will then generate the ChangeLog formatted message and insert it to the body of the patch. It uses /tmp to store intermediate files that should automatically deleted by the script after the execution.

#!/usr/bin/env bash


TARGETPATCH=$1
TEMPLOGFILE=/tmp/changelog
TEMPPATCHFILE=/tmp/temp.patch
PATCHCUTOFFLINE=$(sed -n '/^---$/=' $TARGETPATCH)
CUTOFFTOPLINE=$(( PATCHCUTOFFLINE - 1))
DATE=$(date "+%Y-%m-%d")
NAME="YOUR-NAME HERE"
EMAIL="your@email.here"

ChangeLogSetup(){
printf "" > $TEMPLOGFILE &&\
printf "" > $TEMPPATCHFILE &&\
return 0 || return 1
}

ChangeLogGen(){
pipenv run $GCCTOP/contrib/mklog.py $TARGETPATCH > $TEMPLOGFILE &&\
return 0||return 2
}

ChangeLogPatchUpdate(){
sed -n "1,${CUTOFFTOPLINE} p" $TARGETPATCH >> $TEMPPATCHFILE &&\
echo "" >> $TEMPPATCHFILE &&\
echo "${DATE} ${NAME} <${EMAIL}>" >> $TEMPPATCHFILE &&\
echo "" >> $TEMPPATCHFILE &&\
cat $TEMPLOGFILE >> $TEMPPATCHFILE &&\
sed -n "${PATCHCUTOFFLINE},$ p" $TARGETPATCH >> $TEMPPATCHFILE &&\
return 0||return 3
}

ChangeLogPatchReplace(){
mv $TARGETPATCH ${TARGETPATCH}.bk && cp $TEMPPATCHFILE $TARGETPATCH && return 0 || return 4
}

ChangeLogCleanup(){
/bin/rm $TEMPLOGFILE $TEMPPATCHFILE && return 0 || return 5
}

ChangeLog(){
ChangeLogSetup \
&& ChangeLogGen \
&& ChangeLogPatchUpdate \
&& ChangeLogPatchReplace \
&& ChangeLogCleanup \
&& $EDITOR $TARGETPATCH \
&& echo "Success: $TARGETPATCH" || echo "Something went wrong with $TARGETPATCH: exit code $?" >&2
}

main(){

ChangeLog

}

main

gccmksquashpatch.sh

This patch is a proof-of-concept script that aims to first create single patch for all changes made in the branch. This is akin to making a squash-merge on a PR. As such, it is suitable when the branch introduces small changes to the code base. It also assumes that gcc local repo is inside of a dedicated gcc folder that contains another folder, called "patch". As a note, as the GNU GCC project suggests making build directory outside of the local repo, having patch on the parent directory of local repo sounds reasonable. It outputs each patch into its own folder whose name is defined by the

date
command.

This branch accepts one argument for $TARGET branch. The patch will first generate a squash-merged branch called

patch/feature-branch-name
by comparing the $BASE branch against the $TARGET branch. and outputs a patch to the patch folder. It can be modified to then send the patch over email using the other script.

#!/usr/bin/env sh

BASE=base-branch-name
TARGET=$1
PATCHBRANCH=patch/feature-branch-name
DATE=$(date "+%Y%m%d-%H%M%S")
OUTPUT=$GCCTOP/../patch/$DATE

PatchGen(){
git checkout $BASE &&\
git branch -D $PATCHBRANCH &&\
git checkout -b $PATCHBRANCH &&\
git merge --squash $TARGET &&\
git commit &&\
git format-patch -o $HOME/project/gcc/patch/$DATE -M $BASE &&\
return 0 || echo "Something went wrong in PatchGen"
return 1
}

main(){

PatchGen \
&& $HOME/bin/gccmklog.sh $OUTPUT/*patch \ #since there's just one squashed, let's run mklog
#&& $HOME/bin/gsocsendemail.sh $OUTPUT/*patch #uncomment this line if this command would send the patch email

git checkout $TARGET
}

main

gccsendpatch.sh

Once the patch is created, this simple script will send it to the recipients of the patch. As the blog is about sending the patch to gcc-patches mailing list, the appropriate address is added to --cc flag. It also provides one last chance to look over the messages if needed.

This script accepts one argument, which is the path name to the patch.

Provided the ~/.gitconfig is set up properly, the patch should be received by the community in short order.

#!/usr/bin/env sh

git send-email --to=first-recipient@email.address --to=second-recipient@email.address --cc=gcc-patches@gcc.gnu.org --confirm=always $@

Some useful information

by Yoosuk Sim at Sat Jun 27 2020 14:20:01 GMT+0000 (Coordinated Universal Time)

Tuesday, June 16, 2020


Josue Quilon Barrios

hexV


hexV is a little tool that I've been working on for a while.
It's a tiny viewer that shows the content of any file in hexadecimal.
Something like this:



I first thought about making hexV while I was working on another project that involved parsing and rendering large images without using any official libraries like libpng. I needed something that I could use to learn and understand how images are structured and stored depending on the type (PNG, JPEG, BMP...), and also that'd help me debug the parsers I wrote for that project.

hexV did the trick. Instead of having to go through endless console output to chase bugs, I could simply open the processed image with hexV and compare it to the values read by the parsers. I'm pretty sure that using hexV saved me a ton of debugging time.

The first version of hexV had builds for both windows and linux, but I recently added some deep changes to the linux version so I removed the windows build until I can make some time to add those changes to it.

I have some interesting features in mind, like file type detection, that I'd like to add sometime soon. 
Oh, and this is an open-source project, so if you find hexV interesting and feel like collaborating, take a look at the issues and hack away!


by Josue Quilon Barrios at Tue Jun 16 2020 02:26:00 GMT+0000 (Coordinated Universal Time)

Friday, June 5, 2020


Calvin Ho

Attempt at Creating a Clone of Adventure Capitalist

After about 3 weeks working on this project, I'm kind of done. Built with React/Node/Redis/SocketIO I learned a lot. The reason I say I'm kind of finished is because unless I overhaul the whole backend of the code, I don't think I can get it working 100%. ... I know it looks awful haha.


The project was fun and challenging, there weren't any guidelines on how the project should be built aside from it being written in Javascript/Typescript. I initially tried using Typescript, but it gave me headaches with the difference in import exporting. This is something I'll probably need to learn more about.

You can check out a version of a working game here (not mine). The hardest part about creating this clone is regarding hiring a manager. Hiring a manager takes care of clicking for one of these shops. The number on the right shows the "cooldown" of the button before it can be pressed again. A manager will auto this process so whenever the shop is off cooldown, it should be clicked, the timer is actually reflects how much cooldown time is left, there should also be a progress bar providing a visual representation.

There were 2 issues to think about:

  1. The initial max cooldown of the Lemonade shop is 500ms, when a player purchases a certain amount of the shop, the max cooldown is actually halved or and it becomes exponential with each threshold reached. So potentially this shop could be firing a request every 7.8ms (500 / 64), what tool should I use for this?
  2. How should I manage the auto clicking by managers?
  3. The managed shops should also be running even if the window isn't open, players should be informed of how much cash they have earned while the window was closed
I looked around a bit and decided to use websockets, specifically Socket.IO. I thought using the traditional HTTP/GET request would destroy the backend since there could be a ton of requests being sent.

The second issue I kept thinking of was how to create the auto function for managing a shop + keeping track of how much time was left AND having all this be reflected on the front-end. After thinking about this for a few days and getting nowhere, I reached out to @humphd who suggested using the TTL(time to live) + Pub/Sub functionalities of Redis. This was pretty cool as it had me researching about keyspace notifications for Redis. That's all for now... I may blog more about this later.

by Calvin Ho at Fri Jun 05 2020 23:45:35 GMT+0000 (Coordinated Universal Time)

Friday, May 29, 2020


Corey James

React Practice With GraphQL

Hello, and Welcome to my blog! Recently I have been working through some tutorials from Thinkster.io. In this blog post, I will be reviewing my experience going through the React and Redux tutorial. I completed the tutorial using the GraphQL API I made. The tutorial uses a REST API, so I had to make lots …

Continue reading "React Practice With GraphQL"

by Corey James at Fri May 29 2020 02:41:20 GMT+0000 (Coordinated Universal Time)

Monday, May 25, 2020


Ray Gervais

Writing Golang Tests for an Alcoholic REST API

func TestHelloWorld(t *testing.T) {} is so well engrained into my muscle memory

Continuing on with last week's Athenaeum post, I mentioned that I wanted to explore easily overlooked processes or topics that junior developers don't always have the chance to dive into. The original intent being to allow the project to grow in such a way that it would demonstrate through it's iterative history a step-by-step example of taking a small project all the way to the big world of Public Clouds, Containers, and other infrastructure goodies. Along with that, I also wanted to explore software development patterns and testing practices. In this article, I want to explain what's been done so far: writing back-end unit tests and exploring the world of code coverage!

How To Test Golang

If you follow my Twitter, you'll see that I've been a huge fan of the Learning Golang with Tests online book. The course I'd recommend to anyone who's interested in software development because aside from teaching Go's idioms, it also teaches fantastic Test Driven Development (TDD) semantics and the art of writing DRY (Don't Repeat Yourself) code. I'd argue, that even if you forget about Golang or adapt it the lessons to a different language, the wisdom found in the lessons are invaluable.

One thing that's explained in the first chapter, the Hello, World! of tests if you will, is Go comes with its own testing capabilities in the standard library. Any file with the naming scheme of *_test.go is viewed as a test file, not a run-time file (which allows for us to distinctly run a folder structure with go run . vs go test)! Likewise,

Your First Test

Let's use this main.go file example for this section, which will enable us to test the Greet function. Having testable functions and components (compared to testing the entire program) is essential for good software design in my opinion.

// main.go
package main

import "fmt"

// Greet concatenates the given argument with a predetermined 'Hello, '
func Greet(name string) string {
  return "Hello, " + name
}

func main() {
  fmt.Println(Greet("Unit Testing 101"))
}

We could write the following test!

// main_test.go
package main

import (
    "testing"
    "github.com/stretchr/testify/assert"
)

func TestGreet(t *testing.T) {
    expected := "Hello, World!"
    received := Greet("World!")

  assert.Equals(t, expected, received)
}

So, what exactly does this do? Let's break down the process.

  1. I'm leveraging the testify (specifically, the assert sub-package) package by Stretchr. This is a common library used in Golang Testing for assert.* patterns.
  2. All test functions start with Test, which most IDEs will allow you to interact with and test on demand.
  3. From all the tutorials that I've seen around Golang testing, we're encouraged to create the expected struct/variable that will be referenced and compared later.
  4. Received is the variable that will store the result of our function call.
  5. Let's compare the result compared to what we're expecting to have.

With the above steps, you've written your first Golang Unit Test! The Greet function that we wrote is stupidly basic (and also a pure function, which is a nice little hat tip to my functional programming interests!), but allows for a great example of composing testable functions. The next question is, where do we go from here? What else could you test with the same concept? Here's a brief list of scenario's that I'll go into in greater detail later which could be tested in similar patterns:

  • Scenario: Your function parses a JSON response, and returns an error object if there were any issues.
    • Test: When provided a valid JSON response, our function should return nil
  • Scenario: Your function returns a corresponding struct that has the same ID as what's passed in, along with an error object.
    • Test: When provided a invalid (negative) ID, our function should return an empty struct, and error object.

Once we have tests for such scenarios written and passing, the next question should be: What else can we test?

A Brief Introduction to Test Driven Development

I had wrote about TDD and NodeJS in 2017, where it was all the rage between my Open Source classes and Internship in Mississauga, but figured it would be best to explain here from the perspective of writing and testing a REST API. Martin Fowler explains Test Driven Development as,

Test-Driven Development (TDD) is a technique for building software that guides software development by writing tests. It was developed by Kent Beck in the late 1990's as part of Extreme Programming. In essence you follow three simple steps repeatedly:

  • Write a test for the next bit of functionality you want to add.
  • Write the functional code until the test passes.
  • Refactor both new and old code to make it well structured.

You continue cycling through these three steps, one test at a time, building up the functionality of the system. Writing the test first, what XPE2 calls Test-First Programming, provides two main benefits. Most obviously it's a way to get SelfTestingCode, since you can only write some functional code in response to making a test pass. The second benefit is that thinking about the test first forces you to think about the interface to the code first. This focus on interface and how you use a class helps you separate interface from implementation.

The most common way that I hear to screw up TDD is neglecting the third step. Refactoring the code to keep it clean is a key part of the process, otherwise you just end up with a messy aggregation of code fragments. (At least these will have tests, so it's a less painful result than most failures of design.)

So, where does this come into play for our previous example if I wanted to follow a TDD approach? Let's iterate on possible test cases for our first hypothetical scenario.

As a reminder: Your function parses a JSON response, and returns an error object if there were any issues.

We could test the following (for example):

  • Test: When provided a valid JSON response, our function should return nil
  • Test: When provided an invalid JSON response, our function should return the parse error.
  • Test: When provided a malformed JSON string, our function should return the parse error.
  • Test: When provided a JSON response which doesn't map to our struct, our function should return the mapping error.

We're testing various scenarios, some plausible and well-worth being tested, and others more far-fetched which help to provide sanity to the "what if" scenarios. Now, you mentioned something about testing a Alcoholic REST API?

Writing REST API Tests with TDD

Going forward, I'll be referencing Athenaeum's main.go, and with it's rapid updates will omit including an already out-of-date version here. Currently, our main.go serves as the REST API router with the following CRUD (create, read, update, delete) routes:

  • GET /
  • GET /books/
  • GET /books/:id
  • POST /books/
  • PATCH /books/:id
  • DELETE /books/:id

With TDD, I went about writing the following test scenario's prior to writing the code itself:

  • SCENARIO: Valid GET / request should return "Hello, World!"
  • SCENARIO: Valid GET /books/ request against an empty database should return 0 results.
  • SCENARIO: Valid GET /books/ request against a populated database should return all books.
  • SCENARIO: Valid GET /books/:id/ request with ID against populated database should return specific book.
  • SCENARIO: Valid GET /books/:id/ request with Invalid ID against a populated database should return a "Record not found!" error

So we've covered the common use-cases for the first three routes, and that last one looks rather interesting. Let's break it down before moving forward.


// imports ()

// Helper Function
func performRequest(r http.Handler, method, path string) *httptest.ResponseRecorder {
    req, _ := http.NewRequest(method, path, nil)
    w := httptest.NewRecorder()
    r.ServeHTTP(w, req)
    return w
}

// Test Cases
func TestBooksCRUD(t *testing.T) {
    t.Run("Retrieve Non-Existing ID", func(t *testing.T) {
          w := performRequest(router, "PATCH", "/books/-2")

          assert.Equal(t, http.StatusBadRequest, w.Code)
          assert.Equal(t, "{\"error\":\"Record not found!\"}", w.Body.String())
    })
}
  1. I skipped the imports, but you can reference the [public version]https://github.com/raygervais/Athenaeum/blob/master/src/backend/main_test.go) for the complete source.
  2. I picked up the performRequest function from Craig Childs' Golang Testing - JSON Responses with Gin tutorial. Makes for far cleaning code reuse.
  3. TestBooksCRUD has the familiar test function signature, so this should be familiar.
  4. t.Run allows us to define sub-tests which relate to the parent's context. I'm leveraging this concept to group tests which relate to each other together instead of creating dedicated functions for each.
  5. w is the response from our request, which is defined and executed using the helper function performRequest.
  6. The last two lines are your typical assert.Equal patterns, ensuring that we are receiving the correct response code (400), and error: "Record not found!".

All of the tests that I listed for our REST API utilize similar code to compare and check against each condition. Test Driven Development shouldn't stop at the "common" tests, but instead reach out to patterns and scenario's which no one expects. Essentially, I view TDD as a way to write witty tests which cover the greater use-cases that keep some SRE (system reliability engineers) up at night. Dave had taught us in OSD500 to throw as many tests as we wanted at our functions, essentially trying to bend and break the inputs in a test of how resilient our code was. Likewise, Learning Go With Tests goes over how adding use-cases, types, and off-chance scenario's allows us to investigate truly how robust our functions and handlers are. So with that, let's list all the scenario's that I came up with for our main_test.go file against the REST API:

  • SCENARIO: Valid GET / request should return "Hello, World!"
  • SCENARIO: INVALID POST/ should return a 404 code and "404 page not found".
  • SCENARIO: INVALID DELETE / should return a 404 code and "404 page not found".
  • SCENARIO: INVALID PATCH / should return a 404 code and "404 page not found".
  • SCENARIO: Valid GET /books/ request against an empty database should return 0 results.
  • SCENARIO: Valid GET /books/ request against a populated database should return all books.
  • SCENARIO: Valid GET /books/:id/ request with ID against populated database should return specific book.
  • SCENARIO: Invalid GET /books/:id/ request with negative ID against a populated database should return a "Record not found!" error.
  • SCENARIO: Invalid POST /books/ without models.CreateBook JSON mapping should return a 400 code and error message.
  • SCENARIO: Valid POST /books/ with the latest Harry Potter novel should return a 200 code and book.
  • SCENARIO: Invalid POST /books/ with an array of []models.Book should return a 400 code and error message.
  • SCENARIO: VALID PATCH /books/:id/ request with valid ID, and an updated models.UpdateBook struct that has a modified title should return 200 and the updated book.
  • SCENARIO: INVALID PATCH /books/:id/ request with valid ID, but no body should return 400 and error message.
  • SCENARIO: INVALID PATCH /books/:id/ without an id should return 400 and error message.
  • SCENARIO: INVALID PATCH /books/ should return a 404 code and "404 page not found".
  • SCENARIO: INVALID PATCH /books/:id/ request with Valid ID, and incorrect JSON body should return 400 and JSON mapping error message.
  • SCENARIO: Valid DELETE /books/:id/ with a valid ID should return 200.
  • SCENARIO: Invalid DELETE /books/:id/ with a invalid ID should return 400 and "Record not found!" error.
  • SCENARIO: INVALID DELETE /books/ should return a 404 code and "404 page not found".

What do most of these tests look like? At the time of writing main_test.go contained the following:

func TestBooksCRUD(t *testing.T) {
    dbTarget := "test.db"

    router, db := SetupRouter(dbTarget)

    db.DropTableIfExists(&amp;models.Book{}, "books")
    db = models.SetupModels(dbTarget)
    defer db.Close()

    t.Run("Create Empty DB", func(t *testing.T) {
        w := performRequest(router, "GET", "/books/")

        assert.Equal(t, http.StatusOK, w.Code)
    })

    t.Run("Retrieve Nonexistent ID on Empty DB", func(t *testing.T) {

        w := performRequest(router, "GET", "/book/2")

        assert.Equal(t, http.StatusNotFound, w.Code)
    })

    t.Run("Populate DB with Harry Potter Set", func(t *testing.T) {
        books := []string{
            "Harry Potter and The Philosopher's Stone",
            "Harry Potter and The Chamber of Secrets",
            "Harry Potter and The Prisoner of Azkaban",
            "Harry Potter and The Goblet of Fire",
            "Harry Potter and The Order of The Phoenix",
            "Harry Potter and The Half-Blood Prince",
            "Harry Potter and The Deathly Hallows",
        }

        for _, book := range books {

            payload, _ := json.Marshal(models.CreateBookInput{
                Author: "J. K. Rowling",
                Title:  book,
            })

            req, err := http.NewRequest("POST", "/books/", bytes.NewReader(payload))
            req.Header.Set("Content-Type", "application/json")

            w := httptest.NewRecorder()
            router.ServeHTTP(w, req)

            assert.Equal(t, nil, err)
            assert.Equal(t, http.StatusOK, w.Code)
        }
    })

    t.Run("Retrieve Existing ID on Populated DB", func(t *testing.T) {
        w := performRequest(router, "GET", "/books/2")

        expected := models.Book{
            Author: "J. K. Rowling",
            ID:     2,
            Title:  "Harry Potter and The Chamber of Secrets",
        }

        var response models.Book
        err := json.Unmarshal([]byte(w.Body.String()), &amp;response)

        assert.Nil(t, err)
        assert.Equal(t, http.StatusOK, w.Code)
        assert.Equal(t, expected, response)
    })

    t.Run("Attempt Updating Non-Existing ID", func(t *testing.T) {
        w := performRequest(router, "PATCH", "/books/-2")

        assert.Equal(t, http.StatusBadRequest, w.Code)
        assert.Equal(t, "{\"error\":\"Record not found!\"}", w.Body.String())
    })

    t.Run("Updated Existing ID with Invalid Values", func(t *testing.T) {
        payload, _ := json.Marshal(map[int]string{
            2: "Harry Potter",
            3: "JK Rowling",
            4: "22",
        })

        req, err := http.NewRequest("PATCH", "/books/-2", bytes.NewReader(payload))
        req.Header.Set("Content-Type", "application/json")

        w := httptest.NewRecorder()

        router.ServeHTTP(w, req)

        assert.Equal(t, nil, err)
        assert.Equal(t, http.StatusBadRequest, w.Code)
    })

    t.Run("Update Existing ID on Populated DB", func(t *testing.T) {
        payload, _ := json.Marshal(models.UpdateBookInput{
            Title: "Harry Potter and The Weird Sisters",
        })

        req, err := http.NewRequest("PATCH", "/books/6", bytes.NewReader(payload))
        req.Header.Set("Content-Type", "application/json")

        w := httptest.NewRecorder()
        router.ServeHTTP(w, req)

        assert.Equal(t, nil, err)
        assert.Equal(t, http.StatusOK, w.Code)
    })

    t.Run("Get Updated Book from Populated DB", func(t *testing.T) {
        expected := models.Book{
            Author: "J. K. Rowling",
            Title:  "Harry Potter and The Weird Sisters",
            ID:     6,
        }

        w := performRequest(router, "GET", "/books/6")

        var response models.Book
        err := json.Unmarshal([]byte(w.Body.String()), &amp;response)

        assert.Nil(t, err)
        assert.Equal(t, http.StatusOK, w.Code)
        assert.Equal(t, expected, response)
    })

    t.Run("Delete Invalid Book from Populated DB", func(t *testing.T) {
        w := performRequest(router, "DELETE", "/books/-1")
        assert.Equal(t, http.StatusBadRequest, w.Code)
    })

    t.Run("Delete Without ID Book from Populated DB", func(t *testing.T) {
        w := performRequest(router, "DELETE", "/books/")
        assert.Equal(t, http.StatusNotFound, w.Code)
        assert.Equal(t, "404 page not found", w.Body.String())
    })

    t.Run("Delete valid Book from Populated DB", func(t *testing.T) {
        w := performRequest(router, "DELETE", "/books/6")

        assert.Equal(t, "{\"data\":true}", w.Body.String())
        assert.Equal(t, http.StatusOK, w.Code)
    })
}

Next Steps

So once you have your API routes covered, what's next? I opted to (stubbornly) go deeper. I thought, if each bit of logic should have a test, then why don't we also replicate many of the tests at the controller level using a mock-router. Why, you may be asking? Well in my mind, this is to not so-much as duplicate the main level API tests, but instead test against the controller logic and their input / outputs. It's another layer of sanity checks which I'd like to think help ensure the functions are being updated without breaking known functionality. The book controller can be referenced here, but an example of the UpdateBook (and it's helper function RetrieveBookByID looks like this, which I learned about thanks to LogRocket's tutorial) appears as:


package controllers
// imports ()

// RetrieveBookByID is a helper function which returns a boolean based on success to find book
func RetrieveBookByID(db *gorm.DB, c *gin.Context, book *models.Book) bool {
    if err := db.Where("id = ?", c.Param("id")).First(&amp;book).Error; err != nil {
        c.JSON(http.StatusBadRequest, gin.H{"error": errRecordNotFound})
        return false
    }

    return true
}


// UpdateBook called by PATCH /books/:id
// Update a book
func UpdateBook(c *gin.Context) {
    db := c.MustGet("db").(*gorm.DB)

    // Get model if exist
    var book models.Book
    if !RetrieveBookByID(db, c, &amp;book) {
        return
    }

    // Validate input
    var input models.UpdateBookInput
    if err := c.ShouldBindJSON(&amp;input); err != nil {
        c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
        return
    }

    db.Model(&amp;book).Updates(input)

    c.JSON(http.StatusOK, book)
}

When writing the tests, I came into a major issue when having to deal with more advanced requests: how does one mock a request body? Without learning how to do this, I wouldn't be able to test the CreateBook, UpdateBook functions which I would argue is a big deal. So, two hours later of Googling and trial-and-error led me to this nugget of magical goodness (which also is where my tweets became sporadic as I embarked on the quest for 100% code coverage with my new found powers):

func SetupContext(db *gorm.DB) (*httptest.ResponseRecorder, *gin.Context) {
    w := httptest.NewRecorder()
    c, _ := gin.CreateTestContext(w)
    c.Set("db", db)

    return w, c
}

func SetupRequestBody(c *gin.Context, payload interface{}) {
    reqBodyBytes := new(bytes.Buffer)
    json.NewEncoder(reqBodyBytes).Encode(payload)

    c.Request = &amp;http.Request{
        Body: ioutil.NopCloser(bytes.NewBuffer(reqBodyBytes.Bytes())),
    }
}

t.Run("Update Valid Book", func(t *testing.T) {
        w, c := SetupContext(db)

        payload := models.CreateBookInput{
            Title: "Hermione Granger and The Wibbly Wobbly Timey Wimey Escape",
        }

        SetupRequestBody(c, payload)
        c.Params = []gin.Param{gin.Param{Key: "id", Value: "3"}}

        UpdateBook(c)

        var response models.Book
        err := json.Unmarshal([]byte(w.Body.String()), &amp;response)

        assert.Equal(t, 200, w.Code)
        assert.Equal(t, nil, err)
        assert.Equal(t, payload.Title, response.Title)
})

For clarity (and DRY principals), the most important piece of code is the SetupRequestBody function which allows us to essentially create the Request with it's body. Doing so allows our function UpdateBook(c) that we are testing to pickup the correct context, which is the request with the mocked body, headers, etc. For those who've been Googling this just as frantically as I was, I hope this helps!

Resources

by Ray Gervais at Mon May 25 2020 00:00:00 GMT+0000 (Coordinated Universal Time)

Tuesday, May 19, 2020


Adam Pucciano

Python Series: Finishing Touches

This is part of my ongoing series to explore the uses of Python to create a real-time dashboard display for industrial machinery. Please read the preceding parts first!

Part 3: Finishing Touches 

Dashboard gauges indicating the Machine’s cycle time and efficiency

Things were finally coming together! It was now a matter of integrating more machines , optimizing page loading. I was also in a good position to add a few more quality of life features to the application, all of which were readily handled in Python.

FTP: Machines were still logging information to binary files , and had accessible storage via FTP. Creating a small manager class using Python’s standard ftplib was a great alternative option to view historic information or download it all as an archive. I would then call on this manager script to help me load information during POST/GET requests.

File Viewer/Upload: Some machines in the field do not have internet access, and have a long running history of its production written in binary files. The machine’s locale files are the only thing that keeps a record of its production efficiency. Reusing components from the statistics dashboard, a simple dialog to upload files working with a file viewer emerged that allows the user to upload and interact with the report and display results the same way connected machines can be viewed. This is could extend usefulness for files that originated from a simulation snapshot.

Redis and Docker: One of of the many Django integrations, and modern tools every web service is looking to take advantage of in order to deliver cohesive, fluid content to their users. Used by company tech giants like Twitter, Github and Pintrest these two technologies work together to cache and session information and reduce query and server consumption due to usage. It would take another series to cover these two technologies in depth, both of which I only really had a definitions worth of understanding before this project began. But by using the Django help documentation in conjunction with Docker installation guides for Redis made it really straight forward to incorporate this within a few days. Django-plotly-dash makes use of channels (channels_redis) for live updating. It’s amazing how all these libraries start to chain together and very quickly help deploy what is needed much more professionally. Which at first the syntax was actually too simple, it really confused me on how it all worked. (I suspect a lot of magic in the underlying framework). With a few changes to the settings, and reading some introduction tutorials, I had made my application capture data through a Redis cache running in a Docker container.

CSS/Bootstrap: This project gave me a chance to work on my css and javascript (front end) skills. I am certain I still need a lot of work in this area, but every day I see small improvements to the overall look and feel of the interface. I know that it with more practice, it will soon seem to transform into a fluid, dynamic UI.

Python was very portable. By using a ‘requirements.txt’ file I could easily move my development environment to a new machine. Remember also to spin up a virtual environment first, and it works very well with the Django manager (manage.py). To learn all of this new content may be daunting at first, but stick with it and I promise you it will be worth it (It always is)! This Python approach to the dashboard became easier and easier to make real. Each module was supported by ingenious packages made from the community.

This project has been a a great experience, and a great stepping stone to continue to improve my own skills while at the same time providing a fancy new piece of software.

This project seemed to evolve at a rapid pace, and I too feel like I had leveled up because of it. During this journey, I was able to..

  • Break out of a comfort zone and begin to master Python for software development.
  • Lead my own research and create a development plan for my own application
  • Learn more about industrial manufacturing and injection molding industry
  • Read through, understand documentation and become a part of various Python communities
  • Touch upon and learn OPCUA, understanding how the protocol establishes communication between machinery
  • Brush up on my Linux skills, initializing and hosting an internal web server using Ubuntu
  • Learn how to create a Docker container running Redis
  • Work on my writing skills to communicate all this wonderful news!

Thanks for reading!

Adam

 

Please feel free to contact me about any of the sections you’ve read. I’d love to discuss it further or clarify any points you as the reader come across.

by Adam Pucciano at Tue May 19 2020 17:49:02 GMT+0000 (Coordinated Universal Time)


Ray Gervais

Why You Need A Dog's Opinion For Code Review

An introduction to Hound, The Code Review CI Tool and Testing in Golang

Conceptualizing Athenaeum

James Inkster write up the best description of Athenaeum, which I'll share here.

Sharing your favorite books has never been easier. What Athenaeum brings to the table is the ability to login and create a repository of your favorite books, you will be able to share your favorite books with other users on the platform, and find users who are into similar books as yourself. You'll be able to see trending books so you can always stay up-to date with what books might be enjoyable for you to read based on your likes. Athenaeum will implement a minimalistic design to allow for functional UI design choices.

The idea originally came about when I was interested in creating a full-stack application which would enable contributors to test and learn about modern development practices, technologies, and languages. I opted for the following stack after James proposed Athenaeum as the idea:

  • Back-end Services: Golang
  • Database Persistence: SQLite
  • Front-end Interfaces: Node / ReactJS

We're Going To Make It Awesome [And We're Going To Follow All The Best Practices!]

Or at least, that's what we all think at the start of the project. Every code-base has their respective hacks, workarounds, and inconsistencies when not kept in check. I imagine that consistent code quality in each pull request is the goal, but we all know how easy it is for items to slip past our reviews. That's why I wanted to explore adding Code Analysis tooling from the very start to the project for both the front-end and back-end. The Open Web Application Security Project (OWASP) is a nonprofit foundation which lists tooling, strengths, and weaknesses such as:

Some tools are starting to move into the IDE. For the types of problems that can be detected during the software development phase itself, this is a powerful phase within the development life cycle to employ such tools, as it provides immediate feedback to the developer on issues they might be introducing into the code during code development itself. This immediate feedback is very useful, especially when compared to finding vulnerabilities much later in the development cycle.

Enter the first tool, Hound!

Being the Guardian of the Pull Request Gates

So what is Hound? Their official website states the following:

Hound comments on code quality and style issues, allowing you and your team to better review and maintain a clean code base.

The list of supported languages and linters are:

  • JavaScript / TypeScript / CoffeeScript
  • Ruby
  • Python
  • Swift
  • PHP
  • SASS
  • Golang
  • Elixir
  • Haml

The site's support pages are rather stark, but provide an excellent jumping ground in the configuration examples for those who don't want to dive into the source code. Did I mention that it's open source?!

I find Hound to be great spare pair of eyes during code reviews, since it enables a few convenience workflows:

  • Shutdown all Github Actions if errors / issues are found
  • Remove stale comments from previous Hound scans
  • Consume eslint.json, tslint.json, and various configuration files for lint customization per-language
  • Share lint customizations among projects

Golang's internal tooling comes with a built-in linter, which means that your editor -paired with it's corresponding golang-supported plugin- should complain when there's syntax and linting issues. I found even VIM-GO highlighted the same error in the screenshot above, which means that Hound itself isn't providing a critical service for the back-end aside from uprooting ignored warnings / errors (such as missing comments above function implementations). NodeJS in contrast, has quite the many ways that developer write JavaScript code. By leveraging a ESLint configuration eslintrc such as this one, we're able to ensure that code base is adhering to a set of defined guidelines in the less opinionated languages.

{
  "env": {
    "commonjs": true,
    "es6": true,
    "node": true
  },
  "extends": ["eslint:recommended", "plugin:prettier/recommended"],

  "parserOptions": {
    "ecmaVersion": 2020
  },
  "rules": {
    "no-console": "error",
    "require-atomic-updates": "error",
    "default-case": "error",
    "default-case-last": "error",
    "default-param-last": "error",
    "require-await": "error",
    "camelcase": [
      "error",
      {
        "properties": "never"
      }
    ],
    "comma-dangle": [
      "error",
      {
        "arrays": "always",
        "objects": "always"
      }
    ],
    "comma-spacing": [
      "error",
      {
        "before": false,
        "after": true
      }
    ],
    "quotes": ["error", "double"]
  }
}

Setting The Hound Loose

For Athenaeum's case, we only need to leverage golint and eslint for our services so far, so that configuration would look like this:

That last line enables us to tell GitHub Actions to stop building / testing!

golint:
  enabled: true

eslint:
  enabled: true
  config_file: .eslintrc

fail_on_violations: true

Next Steps

One of the goals of this project was to explore and learn through trial and error modern practices, tooling, and services which help enrich a code base, Hound was the easiest to add; a single source of truth when it came to code style enforcement. From there, I want to explore adding other tools in the CI chain, and in the Release chain such as:

Resources

by Ray Gervais at Tue May 19 2020 00:00:00 GMT+0000 (Coordinated Universal Time)

Saturday, May 16, 2020


Bowei Yao

A depressing scene

My wife and I went to A&W today to get some burgers. This particular A&W is located inside a convenience store.

We finished ordering and we were just looking around the shelves in the convenience store while waiting for our burgers to be made. Suddenly a man in line called out to us.

“Hey, you speak her language?”

“What?”

He gestured towards a short lady leaning over the checkout counter of the convenience store.

“You speak her language?”

“I don’t know. What’s going on?”

“You wanna help her?”

It took me a while to realize the situation. The lady was probably holding up the line for a while now due to miscommunications.

So I approached her while keeping my distance from everyone, since you know, this is the coronavirus special period. She’s short, fairly aged (I would say around 50-60 at least), and Asian.

I speak Mandarin, so I asked her in that. She answered. It didn’t take long before we figured out that her credit card is expired. So she said that she’s going to go back to her car to get a new card. I translated that to the cashier and we let the man, who happens to be the next customer in line to get his order processed.

Now, up to this point, everything is fine. Everybody’s happy and nothing is wrong.

We got our A&W burgers and walked out of the convenience store, and this is what I see:

The Asian lady was standing next to an Audi SUV with the driver’s door open. Sitting in the driver’s seat is a young man wearing black sunglasses, arguing with the lady.

“What do you mean it doesn’t work?”

“The card won’t work, I’ve tried many times.”

“How can you be so stupid?”

“…”

I thought this was a scene that only appears in literature, but I guess literature does take its roots from real life after all.

For those of you don’t know, this is a stereotypical type of behaviour and mannerism exhibited by spoiled fuerdais. You may google this term now, as it is now officially enlisted into the English language. It is a derogative term aimed at the children of the nouveau rich from China.

So what are the things wrong with this picture?

Let’s unravel bit by bit. Now, it’s fairly simple to see that it’s argument between a mother and a son.

Perhaps you’ve seen some spoiled kids in your life – perhaps your neighbor’s kids or your relative’s kids. But this is a new level of spoiledness – this is a level of spoiledness which you have never seen before. This is a level which you would not accept nor agree with under any circumstances. This level of spoiledness is rarely exhibited by western parents, nor tolerated.

However, this type of overprotective parent/kid pairings are common in China, where the parents not only perform everything for their kid, but also think on their kid’s behalf. The kid’s future, the kid’s school, the kid’s extra-curricular activities, what the kid wants to do in his/her free time, etc. everything. The parents are thinking and planning all of that for the kid, and also acting them out, regardless of the kid’s opinion.

… until the kid has reached the age of 20, and in more extreme cases, age of 30 and beyond. The parents has trouble letting go because it has transformed into a long time habit. The kid has gotten used to it, and in the back of his/her mind, he/she thinks they deserve it, and everything should be just the way it is, taken for granted.

Therefore, in this case, you see an elderly lady, walking around wobbly, running errands, while the young boy sits in the shiny car texting on his phone. There are no sense of respect in the words that come out of his mouth towards his mother, and no subjective action exhibited from his body. He does not think to leave the car to help his mother, or go in his mother’s place to do a simple purchase, despite the fact that her mother has great difficulty in communications.

by Bowei Yao at Sat May 16 2020 02:25:51 GMT+0000 (Coordinated Universal Time)