Planet CDOT

June 03, 2019


Volodymyr Klymenko

May 22, 2019


Volodymyr Klymenko

Thank you!

Thank you!

Definitely do it! Let me know when you publish it, I’ll check it out 👋

by Volodymyr Klymenko / Володимир Клименко at May 22, 2019 07:47 PM

April 29, 2019


Volodymyr Klymenko

Creating a React component library: React Cupertino

When I had one of my internships, I developed with React a lot. One time, I needed a complicated component for a project, and I looked for a ready-to-use component in favor of time. I came across an article on Medium about top React component libraries.

React component library is a set of reusable components that save developer’s time for implementing components from scratch.

When I looked at the libraries presented in that list, I found that most of them look so similar between each other, and it’s difficult to select one at first sight. Most of the libraries there implement Google Material Design, and if you take a look at them, you’ll see that the components look pretty similar to each other:

Eventually, I selected Material-UI because it had the most stars on GitHub, a big community, so it looked reliable to me. It was a good choice because I had a good experience using it 👍

That article made me think about creating a library by myself that would look different from the libraries presented there. Plus, I wanted to make my contribution to React and its community because I work with it, and I like this library a lot.

Design ideation process was next. As I am a big fan of Apple and, especially, their design philosophy, an idea came to my mind to create UI components that would look like Apple’s design.

Then, I came up with a name for the project quickly. I combined React and the name of the city, where Apple’s headquarters are based in, called Cupertino. That’s how I’d got React Cupertino 😄

Also, I told my friend Abhi, who was another intern in my team and worked with React, about this project idea and offered him to join me. He agreed, and we started the development.

Development ⚒

We didn’t know how to develop a component library from scratch, and what tools should we use, so the first step was to do a research. I read several articles and tutorials, however, none of them worked 100% for different reasons at that time. So we decided to start developing components and think about bootstrapping and deployment things later.

I haven’t heard about Storybook at that time, so I simply made an app using create-react-app, and we developed the majority of the components there.

Coding components wasn’t that difficult for me. The real two challenges were the components’ design and the library’s set up. Let’s talk about each of these challenges in details.

Design

Neither of us is a designer, and we had to design the components ourselves. It was difficult but fun at the same time. I didn’t even use any of graphics editors. I either used Keynote to prototype components, or I coded components designing them off the top of my head.

Inspiration

I would like to mention some design works that influenced me when I designed my components:

https://medium.com/media/38cb8d3da4fa55088adf5034e5f5938e/hrefhttps://medium.com/media/5eb1fc4e8edcf6522c1af9b55417ec99/href

Set up

When I started working on the set up of this project, I hoped that there is something like create-react-app but for creating React libraries. I found several tools: create-react-library and nwb. I tried to use them, but none of them worked for me because my CSS files weren’t exported properly there. My component file structure looked like this:

File Structure of a component in the library

It was clear to me that I had to use webpack to bundle my components into a module because this tool would let me configure my project as I want it to work. The only problem was that I hadn’t had any experience with webpack before. I had to learn how to use it and how to configure the project properly.

I watched some tutorials, read some articles about webpack, and I was able to write a config file, which would work almost fine. As you can see from the image above, I keep my CSS styles in a separate file, and for some reason, they weren’t included in the bundle. I tried to find a solution to this problem, but nothing worked.

One of the videos I watched was about developing React component libraries by David Wells. I decided to reach out to him on Twitter, and he responded to me! He shared a gist file with a webpack configuration for a similar project, and I could figure out how to fix my problem.
Web dev community is amazing 🤩👏 Big thanks to David 🙌

My final version of the webpack config file looked like this:

const fs = require('fs');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const path = require('path');
const webpack = require('webpack');
const packageInfo = require('./package.json');
const outputPath = path.join(__dirname, 'lib');
const srcPath = path.join(__dirname, 'src');
const componentsPath = path.join(srcPath, 'components');
const keepCSSFileReference = true;
const componentExternals = [];
const entryPoints = {
index: './src/components/index.js'
};
// Assign entry points and externals
fs.readdirSync(componentsPath)
.filter(x => x !== '.DS_Store' && x !== 'index.js' && !x.match(/\.md/))
.forEach(component => {
entryPoints[component] = [`./src/components/${component}`];
componentExternals.push(`../${component}`);
});
const externals = []
.concat(Object.keys(packageInfo.dependencies))
.concat(componentExternals);
module.exports = {
    entry: entryPoints,
output: {
path: outputPath,
filename: '[name]/index.js',
publicPath: '/dist/',
library: packageInfo.name,
libraryTarget: 'commonjs2'
},
resolve: {
modules: ['node_modules', path.resolve(__dirname, 'lib/index')],
extensions: ['.js', '.jsx']
},
externals,
plugins: [
new webpack.optimize.OccurrenceOrderPlugin(true),
new ExtractTextPlugin(
'[name]/[name].css?[hash]-[chunkhash]-[contenthash]-[name]',
        {
disable: false,
allChunks: true,
keepCSSFileReference
}
),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
})
],
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/react']
},
include: srcPath
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.svg$/,
loader: 'url-loader?limit=10000&mimetype=image/svg+xml'
}
]
}
};

Also, I used Babel to transpile my JS code, Prettier and ESLint to produce a better code. Later, I came across Storybook, which is a nice tool that helps to develop components in isolation, and I integrated it into the project. I also used Travis CI as my Continuous integration service.

Components

Here is what React Cupertino components look like as of today:

React Cupertino Documentation

You can learn more about each component and how to install React Cupertino to your project on the documentation website:

React Cupertino

React Cupertino Source Code

Did you find a bug? Do you want to contribute? Here is a link to the GitHub repository:

react-cupertino/react-cupertino

If you have any questions, feel free to ask them in the comments, or you can reach out to me on Twitter: @klymenko_v 🙌

by Volodymyr Klymenko / Володимир Клименко at April 29, 2019 01:08 AM

April 27, 2019


David Humphrey

irc.mozilla.org

Today I read Mike Hoye's blog post about Mozilla's IRC server coming to an end.  He writes:

Mozilla has relied on IRC as our main synchronous communications tool since the beginning...While we still use it heavily, IRC is an ongoing source of abuse and  harassment for many of our colleagues and getting connected to this now-obscure forum is an unnecessary technical barrier for anyone finding their way to Mozilla via the web.  

And, while "Mozilla intends to deprecate IRC," he goes on to say:

we definitely still need a globally-available, synchronous and text-first communication tool.

While I made dinner tonight, I thought back over my long history using Mozilla's IRC system, and tried to understand its place in my personal development within Mozilla and open source.

/invite

I remember the very first time I used IRC.  It was 2004, and earlier in the week I had met with Mike Shaver at Seneca, probably for the first time, and he'd ended our meeting with a phrase I'd never heard before, but I nodded knowingly nevertheless: "Ping me in #developers."

Ping me.  What on earth did that mean!? Little did I know that this phrase would come to signify so much about the next decade of my life.  After some research and initial trial and error, 'dave' joined irc.mozilla.org and found his way to the unlisted #developers channel.  And there was 'shaver', along with 300 or so other #developers.

The immediacy of it was unlike anything I'd used before (or since).  To join irc was to be transported somewhere else.  You weren't anywhere, or rather, you were simultaneously everywhere.  For many of these years I was connecting to irc from an old farm house in the middle of rural Ontario over a satellite internet connection.  But when I got online, there in the channels with me were people from New Zealand, the US, Sweden, and everywhere in between.

Possibly you've been on video calls with people from around the world, and felt something similar.  However, what was different from a video call, or teleconference, or any other medium I've used since, is that the time together didn't need to end.  You weren't meeting as such, and there wasn't a timebox or shared goal around your presence there.  Instead, you were working amongst one another, co-existing, listening, and most importantly for me, learning.

/join

Over the next year, irc went from being something I used here and there to something I used all the time.  I became 'humph' (one day Brendan confused me for Dave Herman, and shaver started calling me 'humph' to clarify) and have remained so ever since.  There are lots of people who have only ever called me 'humph' even to my face, which is hilarious and odd, but also very special.

Mike Beltzner taught me how to overcome one of the more difficult aspects of IRC: maintaining context after you log off.  Using screen and irssi I was able to start, leave, and then pick up conversations at a later time.  It's something you take for granted on Slack, but was critical to me being able to leverage IRC as a source of knowledge: if I asked a question, it might be hours before the person who could answer it would wake up and join irc from another part of the planet.

I became more engaged with different areas of the project.  IRC is siloed.  A given server is partitioned into many different channels, and each has its own sub-culture, appropriate topics, and community.  However, people typically participate in many channels.  As you get to know someone in one channel, you'll often hear more about the work happening in another.  Slowly I got invited into other channels and met more and more people across the Mozilla ecosystem.

Doing so took me places I hadn't anticipated.  For example, at some point I started chatting with people in #thunderbird, which led to me becoming an active contributor--I remember 'dascher' just started assigning me bugs to fix!  Another time I discovered the #static channel and a guy named 'taras' who was building crazy static analysis tools with gcc.  Without irc I can confidently say that I would have never started DXR, or worked on web audio, WebGL, all kinds of Firefox patches, or many of the other things I did.  I needed to be part of a community of peers and mentors for this work to be possible.

At a certain point I went from joining other channels to creating my own.  I started to build many communities within Mozilla to support new developers.  It was incredible to watch them fill up with a mix of experienced Mozilla contributors and people completely new to the project.  Over the years it helped to shape my approach to getting students involved in open source through direct participation.

/list

In some ways, IRC was short for "I Really Can do this."  On my own?  No.  No way. But with the support of a community that wasn't going to abandon me, who would answer my questions, spend long hours helping me debug things, or introduce me to people who might be able to unlock my progress, I was able to get all kinds of new things done.  People like shaver, ted, gavin, beltzner, vlad, jorendorff, reed, preed, bz, stuart, Standard8, Gijs, bsmedberg, rhelmer, dmose, myk, Sid, Pomax, and a hundred other friends and colleagues.

The kind of help you get on irc isn't perfect.  I can remember many times asking a question, and having bsmedberg give a reply, which would take me the rest of the day (or week!) to unpack and fully understand.  You got hints.  You got clues.  You were (sometimes) pointed in the right direction.  But no one was going to hold your hand the whole way.  You were at once surrounded by people who knew, and also completely on your own.  It still required a lot of personal research.  Everyone was also struggling with their own pieces of the puzzle, and it was key to know how much to ask, and how much to do on your own.

/query

Probably the most rewarding part of irc were the private messages.  Out of the blue, someone would ping you, sometimes in channel (or a new channel), but often just to you personally.  I developed many amazing friendships this way, some of them with people I've never met outside of a text window.

When I was working on the Firefox Audio Data API, I spent many weeks fighting with the DOM implementation.  There were quite a few people who knew this code, but their knowledge of it was too far beyond me, and I needed to work my way up to a place where we could discuss things.  I was very much on my own, and it was hard work.

One day I got a ping from someone calling themselves 'notmasteryet'.  I'd been blogging about my work, and linked to my patches, and 'notmasteryet' had started working on them.  You can't imagine the feeling of having someone on the internet randomly find you and say, "I think I figured out this tricky bit you've been struggling to make work."  That's exactly what happened, and we went on to spend many amazing weeks and months working on this together, sharing this quiet corner of Mozilla's irc server, moving at our own pace.

I hesitated to tell a story like this because there is no way to do justice to the many relationships I formed during the next decade.  I can't tell you all the amazing stories.  At one time or another, I got to work with just about everyone in Mozilla, and many became friends.  IRC allowed me to become a part of Mozilla in ways that would have been impossible just reading blogs, mailing lists, or bugzilla.  To build relationships, one needs long periods of time together.  It happens slowly.

/part

But then, at a certain point, I stopped completely.  It's maybe been four or five years since I last used irc.  There are lots of reasons for it.  Partly it was due to things mhoye discussed in his blog post (I can confirm that harassment is real on irc). But also Mozilla had changed, and many of my friends and colleagues had moved on.  IRC, and the Mozilla that populated it, is part of the past.

Around the same time I was leaving IRC, Slack was just starting to take off.  Since then, Slack has come to dominate the space once occupied by tools like irc.  As I write this, Slack is in the process of doing its IPO, with an impressive $400M in revenue last year.  Slack is popular.

When I gave up irc, I really didn't want to start in on another version of the same thing.  I've used it a lot out of necessity, and even in my open source classes as a way to expose my students to it, so they'll know how it works.  But I've never really found it compelling.  Slack is a better irc, there's no doubt.  But it's also not what I loved about irc.mozilla.org.

Mike writes that he's in the process of evaluating possible replacements for irc within Mozilla.  I think it's great that he and Mozilla are wrestling with this.  I wish more open source projects would do it, too.  Having a way to get deeply engaged with a community is important, especially one as large as Mozilla.

Whatever product or tool gets chosen, it needs to allow people to join without being invited.  Tools like Slack do a great job with authentication and managing identity.  But to achieve it they rely on gatekeeping.  I wasn't the typical person who used irc.mozilla.org when I started; but by using it for a long time, I made it a different place.  It's really important that any tool like this does more than just support the in-groups (e.g., employees, core contributors, etc).  It's also really important that any tool like this does better than create out-groups.

/quit

IRC was a critical part of my beginnings in open source.  I loved it.  I still miss many of the friends I used to talk to daily.  I miss having people ping me.  As I work with my open source students, I think a lot about what I'd do if I was starting today.  It's not possible to follow the same path I took.  The conclusion I've come to is that the only way to get started is to focus on connecting with people.  In the end, the tools don't matter, they change.  But the people matter a lot, and we should put all of our effort into building relationships with them.  

by David Humphrey at April 27, 2019 02:51 AM


Volodymyr Klymenko

Looks cool!

Looks cool! Did you think about making this component an open source project, and distribute it via npm? I feel like it might be popular 👍

by Volodymyr Klymenko / Володимир Клименко at April 27, 2019 12:38 AM

April 23, 2019


David Humphrey

Teaching Open Source: Sept 2018 - April 2019

Today I submitted my grades and completed another year of teaching.  I've spent the past few weeks marking student projects non-stop, which has included reading a lot of pull requests in my various open source courses.

As a way to keep myself sane while I marked, I wrote some code to do analysis of all the pull requests my students worked on during the fall and winter terms.  I've been teaching open source courses at Seneca since 2005, and I've always wanted to do this.  Now that I've got all of my students contributing to projects on GitHub, it's become much easier to collect this info via the amazing GitHub API.

I never teach these classes exactly the same way twice.  Some years I've had everyone work on different parts of a larger project, for example, implementing features in Firefox, or working on specific web tooling.  This year I took a different approach, and let each student be self-directed, giving them more freedom to choose whatever open source projects they wanted.  Having done so, I wanted to better understand the results, and what lessons I could draw for subsequent years.

GitHub Analysis

To begin, here are some of the numbers:

104 students participated in my open source courses from Sept 2018 to April 2019, some taking both the first and second courses I teach.

Together, these students made 1,014 Pull Requests to 308 Repositories.  The average number of PRs per student was 9.66 (mode=12, median=10, max=22).  Here's a breakdown of what happened with these PRs:

Total Percent
Merged 606 60%
Still Open 258 25%
Closed (Unmerged) 128 13%
Deleted (By Student) 22 2%

I was glad to see so many get merged, and so few get closed without full resolution.  There are lots of projects that are slow to respond to PRs, or never respond.  But the majority of the "Still Open" PRs are those that were completed in the last few weeks.

Next, I was really interested to see which languages the students would choose.  All of the students are in their final semesters of a programming diploma or degree, and have learned half-a-dozen programming languages by now.  What did they choose?  Here's the top of the list:

Language Total (PRs) Percent
JavaScript 508 51%
Python 85 9%
C++ 79 8%
Java 68 7%
TypeScript 39 3.9%
C# 34 3.4%
Swift 28 2.8%
Other 152 14.9%

In some ways, no surprises here. This list mirrors other similar lists I've seen around the web.  I suspect the sway toward JS also reflects my own influence in the courses, since I teach using a lot of case studies of JS projects.

The "Other" category is interesting to me.  Many students purposely chose to work in languages they didn't know in order to try something new (I love and encourage this, by the way).  Among these languages I saw PRs in all of:

Rust (16), Go (13), Kotlin (11), PHP (5), Ruby (3), Clojure (3), Lua (2), as well as Scala, F#, Dart, PowerShell, Assembly, GDScript, FreeMaker, and Vim script.

Over the weeks and months, my goal for the students is that they would progress, working on larger and more significant projects and pull requests.  I don't define progress or significant in absolute terms, since each student is at a different place when they arrive in the course, and progress can mean something quite different depending on your starting point.  That said, I was interested to see the kinds of "larger" and more "complex" projects the students chose.  Some examples of more recognizable projects and repos I saw:

They worked on editors (Notepad++, Neovim), blogging platforms (Ghost, WordPress), compilers (emscripten), blockchain, game engines, email apps, online books, linting tools, mapping tools, terminals, web front-end toolkits, and just about everything you can think of, including lots of things I wouldn't have thought of (or recommended!).

They also did lots and lots of very small contributions: typos, dead code removal, translation and localization, "good first issue," "help wanted," "hacktoberfest."  I saw everything.

Stories from Student Blogs

Along the way I had them write blog posts, and reflect on what they were learning, what was working and what wasn't, and how they felt.  Like all students, many do the bare minimum to meet this requirement; but some understand the power and reach of a good blog post.  I read some great ones this term.  Here are just a few stories of the many I enjoyed watching unfold.

I.

Julia pushed herself to work on a lot of different projects, from VSCode to Mozilla's Voice-Web to nodejs.  Of her contribution to node, she writes:

I think one of my proudest contributions to date was for Node.js. This is something I never would have imagined contributing to even just a  year ago.

We talk a lot, and openly, about imposter syndrome.  Open source gives students a chance to prove to themselves, and the world, that they are indeed capable of working at a high level.  Open source is hard, and when you're able to do it, and your work gets merged, it's very affirming on a personal level.  I love to see students realize they do in fact have something to contribute, that maybe they do belong.

Having gained this confidence working on node, Julia went on to really find her stride working within Microsoft's Fast-DNA project, fixing half-a-dozen issues during the winter term:

I’ve gotten to work with a team that seems dedicated to a strong  development process and code quality, which in turn helps me build good  habits when writing code.

Open source takes students out of the confines and limitations of a traditional academic project, and lets them work with professionals in industry, learning how they work, and how to build world-class software.

II.

Alexander was really keen to learn more about Python, ML, and data science.  In the fall he discovered the data analysis library Pandas, and slowly began learning how to contribute to the project.  At first he focused on bugs related to documentation and linting, which led to him learning how their extensive unit tests worked.  I think he was a bit surprised to discover just how much his experience with the unit tests would help him move forward to fixing bugs:

In the beginning, I had almost no idea what any of the functions did and I would get lost navigating through the directories when searching for something. Solving linting errors was a great start for me and was also challenging enough due to my lack of knowledge in open  source and the Pandas project specifically. Now I could identify where the issue originates from easily and also  write tests to ensure that the requested functionality works as expected. Solving the actual issue is still challenging because finding a solution to the actual problem requires the most time and research.  However, now I am able to solve real code problems in Pandas, which I  would not be able to do when I started. I'm proud of my progress...

Open source development tends to favour many small, incremental improvements vs. big changes, and this maps well to the best way for students to build confidence and learn: bit at a time, small steps on the road of discovery.

One of the many Pandas APIs that Alexander worked on was the dropna() function.  He fixed a number of bugs related to its implementation. Why bother fixing dropna?  With the recent black hole imaging announcement, I noticed that source code for the project was put on GitHub.  Within that code I thought it was interesting to discover Pandas and dropna() being used, and further, that it had been commented out due to a bug.  Was this fixed by one of Alexander's recent PRs?  Hard to say, but regardless, lots of future  scientists and researchers will benefit from his work to fix these bugs.  Software maintenance is rewarding work.

Over and over again during the year, I heard students discuss how surprised they were to find bugs in big software projects.  If you've been working on software for a long time, you know that all software has bugs.  But when you're new, it feels like only you make mistakes.

In the course I emphasize the importance of software maintenance, the value of fixing or removing existing code vs. always adding new features.  Alexander spent all his time maintaining Pandas and functions like dropna(), and I think it's an ideal way for students to get involved in the software stack.

III.

Volodymyr was interested to gain more experience developing for companies and projects he could put on his resume after he graduates.  Through the fall and winter he contributed to lots of big projects: Firefox, Firefox Focus, Brave for iOS, VSCode, and more.  Eventually he found his favourite, Airbnb's Lona project.

With repeated success and a trail of merged PRs, Volodymyr described being able to slowly overcome his feelings of self doubt: "I wasn’t sure if I was good enough to work on these bugs."

A real turning point for him came with a tweet from Dan Abramov, announcing a project to localize the React documentation:

I develop a lot using React, and I love this library a lot. I wanted to  contribute to the React community, and it was a great opportunity to do  it, so I applied for it. Shortly after it, the repository for Ukrainian  translation was created, and I was assigned to maintain it 🤠

Over the next three months, Volodymyr took on that task of maintaining a very active and high-profile localization project (96% complete as I write this), and in so doing learned all kinds of things about what it's like to be on the other side of a pull request, this time having to do reviews, difficult merges, learning how to keep community engaged, etc.  Seeing the work ship has been very rewarding.

Open source gives students a chance to show up, to take on responsibility, and become part of the larger community.  Having the opportunity to move from being a user to a contributor to a leader is unique and special.

My Own Personal Learning

Finally, I wanted to pause for a moment to consider some of the things I learned with this iteration of the courses.  In no particular order, here are some of the thoughts I've been having over the last week:

Mentoring 100+ students across 300+ projects and 28 programming languages is daunting for me.  Students come to me every day, all day, and ask for help with broken dev environments, problems with reviewers, issues with git, etc.  I miss having a single project where everyone works together, because it allows me to be more focused and helpful.  At the same time, the diversity of what the students did speaks to the value of embracing the chaos of open source in all its many incarnations.

Related to my previous point, I've felt a real lack of stable community around a lot of the projects the students worked in.  I don't mean there aren't people working on them.  Rather, it's not always easy to find ways to plug them in.  Mailing lists are no longer hot, and irc has mostly disappeared.  GitHub Issues usually aren't the right place to discuss things that aren't laser focused on a given bug, but students need places to go and talk about tools, underlying concepts in the code, and the like.  "What about Slack?"  Some projects have it, some don't.  Those that do don't always give invitations easily.  It's a bit of a mess, and I think it's a thing that's really missing.

Open source work on a Windows machine is still unnecessarily hard.  Most of my students use Windows machines.  I think this is partly due to cost, but also many of them simply like it as an operating system.  However, trying to get them involved in open source projects on a Windows machine is usually painful.  I can't believe how much time we waste getting basic things setup, installed, and building.  Please support Windows developers in your open source projects.

When we start the course, I often ask the students which languages they like, want to learn, and feel most comfortable using.  Over and over again I'm told "C/C++".  However, looking at the stats above, C-like languages only accounted for ~15% of all pull requests.  There's a disconnect between what students tell me they want to do, and what they eventually do.  I don't fully understand this, but my suspicion is that real-world C/C++ code is much more complicated than their previous academic work.

Every project thinks they know how to do open source the right way, and yet, they all do it differently.  It's somewhat hilarious for me to watch, from my perch atop 300+ repos.  If you only contribute to a handful of projects within a small ecosystem, you can start to assume that how "we" work is how "everyone" works.  It's not.  The processes for claiming a bug, making a PR, managing commits, etc. is different in just about every project.  Lots of them expect exactly the opposite behaviour!  It's confusing for students.  It's confusing for me.  It's confusing for everyone.

It's still too hard to match new developers with bugs in open source projects.  One of my students told me, "It was easier to find a husband than a good open source project to work in!"  There are hundreds of thousands of issues on GitHub that need a developer.  You'd think that 100+ students should have no problem finding good work to do.  And yet, I still find it's overly difficult.  It's a hard problem to solve on all sides: I've been in every position, and none of them are easy.  I think students waste a lot of time looking for the "right" project and "perfect" bug, and could likely get going on lots of things that don't initially look "perfect."  Until you have experience and confidence to dive into the unknown, you tend to want to work on things you feel you can do easily.  I need to continue to help students build more of this confidence earlier.  It happens, but it's not quick.

Students don't understand the difference between apps and the technologies out of which they are made.  Tools, libraries, frameworks, test automation--there is a world of opportunity for contribution just below the surface of visible computing.  Because these areas are unknown and mysterious to students, they don't tend to gravitate to them.  I need to find ways to change this.  Whenever I hear "I want to work on Android apps..." I despair a little.

Teaching open source in 2019 has really been a proxy for teaching git and GitHub.  While I did have some students work outside GitHub, it was really rare.  As such, students need a deep understanding of git and its various workflows, so this is what I've focused on in large part.  Within days of joining a project, students are expected to be able to branch, deal with remotes, rebase, squash commits, fix commit messages, and all sorts of other intermediate to advanced things with git.  I have to move fast to get them ready in time.

Despite all the horrible examples you'll see on Twitter, the open source community has, in large part, been really welcoming and kind to the majority of my students.  I'm continually amazed how much time maintainers will take with reviews, answering questions, and helping new people get started.  It's not uncommon for one of my students to start working on a project, and all of a sudden be talking to its creator, who is patiently walking them through some setup problem. Open source isn't always a loving place (I could tell you some awful stories, too).  But the good outweighs the bad, and I'm still happy to take students there.

Conclusion

I'm ready for a break, but I've also had a lot of fun, and been inspired by many of my best students.  I'm hoping I'll be able to teach these courses again in the fall.  Until then, I'll continue to reflect on what worked and what didn't, and try to improve things next time.

In the meantime, I'll mention that I could use your support.  Doing this work is hard, and requires a lot of my time.  In the past I've had companies like Mozilla generously help me stay on track.  If you or your company would like to find ways to partner or support this work, please get in touch.  Also, if you're hiring new developers or interns, please consider hiring some of these amazing students I've been teaching.  I know they would be grateful to talk to you as well.

Thanks for your continued interest in what we're doing.  I see lots of you out there in the wild, doing reviews, commenting on pull requests, giving students a favourite on Twitter, leaving a comment in their blog.  Open source works because people take the time to help one another.

by David Humphrey at April 23, 2019 02:31 AM

April 19, 2019


Vincent Logozzo

0.4 Final

Microsoft/Calculator 

The Odds Stacked Against me

Continuing where I left off last week, I was waiting for a separate pull request to finish up their change to the 'MANT'. After reviewing the PR today saw that the maintainers have asked the contributor to start another pull because the original fix has branched out into an entirely different problem/fix.
Unfortunately the age of the code is starting to show, and the intertwining of problems is starting to show that the code might be a pile of spaghetti. 
The changes fwcd is making has prompted the change of the Rat and Num structs over to the stack, instead of the heap. I made this diagram for my last blog post to express the difference between smart pointers and regular pointers. Anything declared on the stack will be cleaned up by the machine after the program finishes. This is our primitive types (int, double, char, long), pointers and more; yes the pointer itself is deleted when it goes out of scope, but not the memory it points to in the heap. The Rat and Num structs are just collections of numbers and one array, so instead of heap allocating everything, we can stack allocate the numbers and heap allocate the array. This in itself is a performance increase, stack allocation is much faster. A question I get when I explain this to people is, well why didn't they do this in the first place, A good answer I found was the stack size, when the original code was written, the stack on a machine might have not been big enough to handle extremely large numbers. All this in mind, moving those structs over to the stack is a great idea, it also kills off the need for smart pointers and such my issue I was working on.

jwilder4690/ArtStationApplication

Back to where it all started

After learning about the changes planned for MS/Calculator later in the week, time was at a crunch, I went back to issue hunting and with exams looming, I went back to my first project I worked on, on github. Jwilder created this issue asking for a confirmation dialog on application exit to ensure the user wants to close the app.
Javafx apps handle the main UI with a object called the stage, when the is clicked on the stage application, we can create a new EventHandler to handle showing our new dialog window.
This is the completed code for our event and dialog box

by Vlogozzo (noreply@blogger.com) at April 19, 2019 06:14 PM


Aqeel Parpia

Release 0.4

Its been a while, i just completed all my exams and finally done with semester and now its time to dive in back to contribution of projects. Due to time i have been struggling working on larger projects and issues but im gonna be doing that this summer since now I'm well exposed to repositories and have a greate idea on different projects.

Today il just give quick review on my recent issue that i worked on. The projects The Teacher Fund. Its an intresting charity to support teachers in a way that encourages great teachers to stay, and potentially great teachers to choose teaching as a career path. This includes providing supplemental funds and supplies to school teachers in need.

There Web application is using React and Next.js. I helped them add a post login page that the issue was related about. Since there registration is email based they were looking forward having a shot message to the user after registration and login. There was good disscusion on board yet i realised they were implementing one page for registration and dint have anything created for login. Therefore i decided to implement that and it was quite easy to set up and help them add that implemetation. I would really recoment this project to people and the code is well styled and uses standard jscript style. It doesnt just checks your implention but also makes sure that the code has no weird spaces or extra lines oterwise it would not pass the lint tester. This is really good as it makes you more profficient on your javascript skills.

by Aqeel Parpia at April 19, 2019 07:52 AM

April 18, 2019


Jacob Adach

Last 0.4 hopefully

So it seems like the issue is solved and the only question remaining is will they accept it.

The big vulnerability was that the password was being saved in the clipboard after pushing the button. I implemented a fix to clear it but the drawback is that method is one in the same for every button pushed not only the password and in that perspective every clipboard entry would have been cleared after 15s not only the password.

Solving this meant I altered the copyable.js file which is where the button is instantiated.

Inside that file there is a param named isSecret which is a boolean and here is the best part, it is only true when the field value is a hidden password.

So I passed the value in that called method which then calls the copable method in the utils.js script as so

I pass the value into the copyToClipboard method, check to see if it is true, because if it is we know we have a password and we will need to clear it and if it is false than that value can stay in the clipboard.

Let us see what the board thinks of these changes… And I also noticed these guys do not put a lot of comments in their code, I mean most of the logic is pretty blunt as to what is going on but comments would have been appreciated.

https://github.com/buttercup/buttercup-desktop/pull/762

by jacobadach at April 18, 2019 02:10 AM

April 17, 2019


Rachael Scotchmer

One Last Hurrah


Well, this is it -- my final blog post for DPS909. When I started this course, I was quite honestly dreading what was to come. I'd heard a lot from my colleagues -- even those with prior open-source development -- about how this was one of the hardest courses they have ever taken. I heard that I'd be devoting most of my week to completing the coursework, that the bugs I decided to work on would vanish or get taken by others at the last second, and so on and so forth.

Most terrifying, though, was the fact that I'd never touched an open-source project before. The thought of getting involved in a project like that was paralyzing, and I was dead certain that I was going to make a fool of myself.

And yet, in spite of all of this, I still signed up for DPS909 anyway.

The reason? I needed to beef up my resume.

My first co-op term was coming up, and I didn't have anything software development-related on my resume. Not great, considering I'd be looking for a job in software. Working with open-source projects was the only way I could see to rectify this and gain some experience, so despite all my misgivings, I enrolled in DPS909...

...And that was probably the best decision I've made.

At this point, those extra bullet points on my resume are secondary to all that I've learned. This course gave me the tools I needed to get started in open-source development, including the confidence to get involved. I've mentioned this in several past posts, but I am not a person with a great deal of self-esteem. While it's something I still struggle with to this day, I am much, much more confident than I was when the semester began, and I have my work in open-source to thank for that... And of course, by extension, DPS909, which was nowhere near as difficult as my colleagues led me to believe. It was challenging, but not impossible, and every obstacle brought with it new learning opportunities and knowledge.

Needless to say, my experience with this class has been very positive overall. I think that's enough sap for one day, though -- let's get to looking at what I've been doing this past week, yeah?

Yet Another Fix For Filer

I've mentioned this a couple times now, but the bug I chose to work on was for filer. Yes, this is the third time I've worked on this project in DPS909. I know. I just can't stay away.

Anyway, you can find the issue I was working on here. The gist of it was to refactor the way filer handles flags when opening files.  For those who haven't dealt with file systems before, this just means telling the system what you want to do with the file -- if you want to read it, write to it, append to it, create it, etc.  For filer, if you wanted to open a file with write permissions, the line of code would look something like this:
fs.open("/file.txt", "w");
Pretty simple, right?  First argument is the name of the file, second argument defines how the file gets opened/what it's prepared for.  There's also a third argument for the callback function, which is executed when fs.open finishes opening the file.  But we don't care about that for the purposes of this bug fix -- the only thing that actually matters here is that "w".

Originally, filer parsed the flags as a string -- so "w" or "w+" or "wx+", and so on.  There was no support for numbers, which is where my bug fix comes in.  Someone wanted to be able to pass something like 2 or Constants.fsConstants.O_WRONLY, both of which are just other ways of saying "w" in filer.

Refactoring things to use numbers instead of strings sounds like a pretty big task, but honestly it's not all that difficult.  You can see the specific changes I made by looking at my pull request, but this is the gist of what I did:
  1. Create a function to convert strings like "w" to numbers, which really ended up being one giant switch case.  The numbers I needed were already defined for me in the form of NodeJS' constants; all I did was return the appropriate constant for the appropriate flag.  In some cases, this meant using the bitwise | operator when there were multiple constants that applied.

    Lines like that looked a little something like this:
    case 'wx+': return Constants.fsConstants.O_WRONLY | Constants.fsConstants.O_RDONLY | Constants.fsConstants.O_CREAT | Constants.fsConstants.O_EXCL | Constants.fsConstants.O_TRUNC;
  2. Use that new function in the pre-existing open function (and anywhere else files could be opened).  This meant that no matter what happened, the flag would always be a number by the time it had to be used/validated/etc.
  3. Change any instances of flags as strings into numbers.  In other words, that meant changing if (flags == "w") to if (flags & Constants.fsConstants.O_WRONLY).  Note the bitwise & operator there.
  4. Refactor the function that validated the flags.
  5. Remove the old object that used to hold the flags when they were in the form of strings, along with associated variables.
  6. Create a new test to make sure that fs.open would work properly if passed a number.
Putting everything in a list like this makes it seem pretty easy... And honestly, it wasn't horribly difficult.  By which I mean, everything except for refactoring the validate_flags function was fairly easy, because oh boy, validate_flags did not want to cooperate.  It failed me on approximately 110 tests... Which I confirmed by removing any instance of the function and running the tests without it.  With validate_flags not in play, I only failed 8 tests -- all of which were related to, unsurprisingly, not validating the flags being passed to fs.open.

At this point, though, I was at a total loss for how to proceed.  How on earth was I going to go through 110 tests?  How on earth was I going to go through 110 tests without debugging tools?

Yeah, you heard me: no debugging tools.  At the time, I wasn't aware that you could run filer's tests manually and use the Chrome debugger to go through things.  At the time, I thought I'd need a miracle to fix all these bugs.

...Or just my professor's guidance.

My professor was the one who notified me of the bug, and offered to guide me through it as I needed the help.  After spending so much time fighting with Aseprite and desperately wishing I had a guide for that bug, I was very happy to have a mentor for this one.  By this point, my professor had actually helped me a few times before, too -- once with getting started and understanding what was required of this fix, and a second time when I wasn't sure what to do about some old objects in the code that were no longer used.

To be honest, I did feel a little guilty asking for help.  I didn't want to waste his time, especially with "dumb questions".  I know, I know, there's no such thing as a dumb question, but old habits die hard.

Fortunately, I am not so stubborn anymore that I will sit and suffer in silence (usually).  I reached out to my professor in class, and he sat down and patiently walked me through how to debug things using filer's manual tests and Chrome's debugger.

Armed with these new tools, fixing 110 failed tests seemed very manageable all of a sudden.  Yes, there were still a lot of failures, but at least I could actually debug things properly.  That, and there was no way all 110 tests were failing because of 110 separate bugs.  

(At least, I really hoped that wasn't the case.  I think I'd cry if I introduced that many bugs in one fell swoop.)

It took about an hour and a half of working to iron out all the issues in the code I'd written.  I was right about most of it being related to the validate_flags function, but there was another bug hiding in there too.  In JavaScript, the number 0 is considered "falsey".  This means that an if-statement that does something like this:

if (!flags) {...}

Will return false when flags has a value of 0.  This is unfortunate considering that 0 is the number that represents the "read" flag, which led to fs.open failing to open anything with said "read" flag.  To say that's an issue would be an understatement.  The obvious solution (to me, anyway) was to just add a condition to make it look like this:

if (!flags && flags != 0) {...}
Nice and easy!

From that point on, it was pretty smooth sailing.  I've already added some tests to filer, so adding yet another one wasn't difficult.  All that remains now is to wait for my code to be reviewed, and see what additional changes have to be made!

While this may be the end of DPS909, I don't think it will be the end of my open-source career.  I enjoy working with open-source, and you can bet I'm going to take this course's successor, DPS911, if my schedule allows for it.

by rscotchmer (noreply@blogger.com) at April 17, 2019 01:25 AM

April 15, 2019


David Li

Release 0.4 Final

PR1: https://github.com/excaliburjs/Excalibur/pull/1118
PR2: https://github.com/excaliburjs/Excalibur/pull/1124

For this release, I worked on files ActionSpec.ts, AnimationSpec.ts and BoundingBoxSpec.ts under the src/spec/ folder in Excalibur under 2 pull requests. The first PR worked on ActionSpec.ts to first get used to working on files in Excalibur. This allowed me to ask some questions to the issue poster and solve them. After that, I worked on the latter 2 files with the knowledge I got from the first one. All these changes were updating files using var to use const and let. While this change may be small, the amount of lines needed to be changed were quite numerous. Large files obviously have more variable declarations than smaller ones, especially test tiles like the 3 I worked on. This release allowed me to see that different projects have different requirements in styling of their code, they even wanted the var in for loops changed.

by dli119seneca at April 15, 2019 09:55 PM


Xiaowei Huang

Release 0.4 – final

It’s a great time to get involved in Pandas, a Flexible and powerful data analysis / manipulation library for Python. Besides, it’s also my first time to use Python.

The setup period was a pain. When I actually started to test it locally before starting my work, I figured that it needs to generate a Pandas working environment which takes about 10 minutes. I have marked this lesson down for my further work.

https://github.com/pandas-dev/pandas/pull/26094

The PR is a good first issue which was introduced by my classmate Oleksii. The project was similar to one of my previous PR, but in this time, the project is far bigger and complicated. I used Linux helping to find the potential files to be changed. And there’s an existing example used as a guide for me to identify whether the change is in need or not.

As this PR is working during the busy final period, I would like to dig in Pandas further in the future.

by Violet H. at April 15, 2019 03:40 AM

April 14, 2019


Anh Hoai Ung

0.4 Final

Hey, hello for the last time.

So, this is my final post for this course now ( I may update this site more with other courses’s content in the future).

For the last few weeks, I have a lot of works to do, from job and also from other courses, so I have to choose something that suit my time. After a while, I found a rougelike project that is really interesting, and it needs some help with implemented a stat, so I help the owner with it. It was a JavaScript feature that I implemented after I have found out that he wanted it to be like Pokemon Speed stat. I was just added another variables in both player and monster stat, and also change the battlehandler to support speed stat by deciding whether monster or player has a higher stat. After This project, I learned more about how game works in website, and I may use it in my other courses in the future.

That is it for now, I think I will be off for a while. See you guys later.


by hoaianhkhang at April 14, 2019 11:51 PM

0.4 Update

Greeting everyone,

I am sorry, so far I have not yet been able to update anything just yet, I am still finding trouble at looking for a proper project to contribute with all homework and assignment behind.

I am currently looking at some website bugs or game that may need to add some feature in, I will update in time when I can

Thank you, and see you in my last post.

by hoaianhkhang at April 14, 2019 11:51 PM


Oleksii Polovyi

Draft PR

This week I have created a Draft PR to the buttercup-mobile project to get some additional feedback from the maintainers regarding Google Drive feature implementation. Here is how it looks like at the moment:

2

This is definitely the most complex Open Source feature I have worked on so far. I look forward to finishing this PR once I hear back from @perry-mitchell.

by ApolllonDev at April 14, 2019 09:57 PM


Adel El Masery

Release 0.3 and 0.4

For my final open-source releases I have been working on two issues. The first issue is to add a randomly generating image component for a web application. My second issue was for a discord bot but has been taken care of before I got a chance to complete it.

So far it has been difficult to try and submit the pull requests for these open source projects due to the time consuming process of installing the applications and running them before beginning to work on the requested features.

The discord bot, Miune, was particularly difficult to work on as there was limited support from the main developers and the application code itself was difficult to understand.

I will continue to try and complete these pull requests in the upcoming week now that my other courses have finished and I am not constantly under pressure to complete assignments and exams.

by Adel El Masery at April 14, 2019 09:28 PM


Alexei Bonilla

Bon's Blog 14 - Final Thoughts on OSD600

Hello all and welcome to my final blog post.

For Release 0.4, I looked to an old project I contributed to random-password-generator. where i found this issue Issue. The issue being faced was how the behavior of CTRL-V was not working the same as right clicking onto the input and pasting. Googling potential fixes helped me learn a lot of thing, some which now looking back sound quite silly. First of all, I noticed in the site, that if you right clicked pasted onto the input then pressed a key on the keyboard, that it would work. So my first thought at solving this was to try and simulate a keyboardevent after the user right click pasted. Obviously, for security reasons this would be a bad idea. oops. So what I ended up doing is adding an eventListener to the input so that when a user right click pastes their password into the input, then unfocused the input, it works. Pull Request

What I've learned

First of all I have learned so much about Open Source and Im happy to have taken this course. Unfortunately life gets in the way sometimes and I cant lie and say it hasn't had an effect on my performance, that being said, learning how to deal with many of the issues like throws at you is part of being a professional.

Some of highlights of this course for me personally were:

-> Learning Github
-> Learning about the different Licensing
-> Exploring the thousands of projects Github has to offer

What I want to do next

Participating in open source projects had inspired me to create my own project. I have been thinking about doing a full stack application and want to start developing the front end using React.JS (Something i learned for an assignment in this course) working with a friend in the finance industry.

Thanks

Finally I want to say thanks to my prof : David Humphrey and my fellow students for a great semester.

Signing off for the last time,

Alex

by abonilla1 (noreply@blogger.com) at April 14, 2019 04:51 PM


Abdirahman Guled

Release 0.4

For this release i worked on Brewery and Teacher Fund projects.

Brewery is a react app that allows users to find breweries across the US via the data collected from API opendbbrewery. I come a cross issue-46 which required “Powered By Open Brewery DB” to be moved to the bottom of the page.

Steps i took to complete:

  1. Forked the project.
  2. clone and set up on my local environment.
  3. Created new branch: fixed/Footer on my forked repo.

After installing the dependencies i dove into the project. I found where the code for “Powered By Open Brewery DB” was located. i removed it and place it in Footer.js file in the components folder. Next step was to modify App.css to adjust striker to the bottom.

Teacher Fund is a charity to support teachers in a way that encourages great teachers to stay, and potentially great teachers to choose teaching as a career path. This includes providing supplemental funds and supplies to school teachers in need.

For this project i have previously worked on. As i was working on it i noticed some things where not working properly. At the bottom of the page the footer had some links to redirect user to other parts of the page. However the about page was not working. I investigated on the issue and found out there was a typo on the Link that redirects the user.

I created issue-75 and explained what the issue was about. I then changed the code and test it and pushed it up to be merged.

Project:

Issue-75:

Footer does not redirect to /aboutus page · Issue #75 · teacherfund/TeacherFund_next

Issue-46:

make footer stick to bottom · Issue #46 · JasonFritsche/BreweryFinder

by abdi guled at April 14, 2019 03:49 AM

April 13, 2019


Olena Vyshnevska

Release 0.4, Second Blog

For my final release, I decided to stick with the project that I already worked on called Vibranium
The ticket was to create a page pre-loader similar to the one that git-hub or medium websites use. 

I never worked with animation in CSS before, so this issue was a great opportunity to learn something new.

Steps to create an animation:

  • The first step of building a CSS animation is to defining individual keyframes and naming an animation with a keyframes declaration.
  • The second step is referencing the keyframes by name using the animation-name property as well as adding animation-duration and other optional animation properties to control the animation's behavior.
Here's how I created a spinning square animation using keyframes in css:

@-moz-keyframes spin {
from { -moz-transform: rotate(0deg); }
to { -moz-transform: rotate(360deg); }
}
@-webkit-keyframes spin {
from { -webkit-transform: rotate(0deg); }
to { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
from {transform:rotate(0deg);}
to {transform:rotate(360deg);}
}

Issue:  https://github.com/kelvinkamau/Vibranium/issues/63
PR: https://github.com/kelvinkamau/Vibranium/pull/98

by Olena Vyshnevska (noreply@blogger.com) at April 13, 2019 09:41 PM


Iryna Thompson

Final Blog for Release 0.4

Mozilla/addons-frontend Project

In one of my earliest blogs, I wrote about potentially contributing to the mozilla/addons-frontend project. I am pleased to record that as part of this release I was able to do this by working on the following First Issue.

Core Technologies

React + Redux
Code written in ES2015+
Universal rendering via node
Unit tests with high coverage

Environment Setup for mozilla/addons-frontend on Mac OS

  • Install Homebrew if this package manager for macOS (or Linux) missing by running /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Install yarn by running on Mac brew install yarn to manage dependencies and run scripts
  • Check yarn version by running yarn --version
  • Install all dependencies by running yarn
  • Start a local server localhost:3000 that connects to a hosted staging server by running yarn amo:stage

First Issue

I added tooltips to the Extension Workshop and DevHub header links:

First PR: This pull request was merged.

Oppia Project

My Second Issue was for the Oppia Project, owned by the The Oppia Foundation, a California based non-profit organization. Oppia is an online learning tool that enables anyone to create and share interactive activities called explorations to simulate a one-on-one conversation between a tutor and students.

Core Technologies

  • Python
  • AngularJS
  • Built on top of Google App Engine

Contributing Code Requirements for Oppia

I had to follow the installation instructions on the developer wiki. I also had to follow their Contributing code to Oppia guidelines. I followed their detailed instructions concerning how to fork, clone, create a pull request for this project in order to meet their requirements.

Installing Oppia on Mac OS

Install Python 2.7 by running brew install python@2

Install setuptools needed to install coverage to check test coverage for the Python code by running sudo easy_install setuptools

Install pyyaml to parse YAML files by running sudo easy_install pyyaml

Set up a virtual environment for the project dependencies by running
pip2 install virtualenv
python2 -m virtualenv env

Activate the virtualenv by running source env/bin/activate

Running on Development Server

On localhost:8181 bash scripts/start.sh

Preserve the contents of the local datastore between runs by using bash scripts/start.sh --save_datastore

Run test bash scripts/run_tests.sh

Second Issue

I modified the inline messages below the Title and Goal textboxes to state that a minimum entry of 15 characters was required. I also updated the validation for the Title field to match the 15 character minimum entry requirement.

Second PR

Mozilla/addons-server Project

I inquired about working on a bug for the Mozilla Add-ons Back End (Server) front end at the same time I inquired about the front-end mentioned above, as this would give me both exposure to and experience with working with both the Client and the Server sides of the Mozilla add-ons software technologies. I am pleased to be able to record that I have just received the go-ahead to work on this bug so I am updating my Release 4 blog to reflect this Third Issue.

While waiting for permission I did some initial setup work. I successfully installed the required Open source Docker software on my Mac, to handle virtual container sessions.

Core Technologies

  • Python
  • Django app and API

Install with Docker

When I tried to run the addons-server using make initialize_docker, I ran into issues similar to this reported issue. There have been significant updates since that time, so I will try to fork and clone the latest version of the project repository, set up environment, and see if this resolves the problem.

Conclusion

Overall, I am very pleased with the way my participation in Open-Source projects has gone. I was able to get more hands-on experience with Git, project setups on both Windows and Mac OS environments, and some coding experience with Python, AngularJS, React, and CSS.

Image: ‘firefox stickers!!!
http://www.flickr.com/photos/96941606@N00/2094632835
Found on flickrcc.net

by irynathompson0609 at April 13, 2019 08:21 AM


Al Vincent Valdez

Buttercup Bug Fix Release 0.4

For 0.4 I decided to work on buttercup which was a new project I haven’t worked on. The bug was a issue with duplicate keys overwriting each other. The fixes that I was thinking to apply was either scrap the way they were saving stuff with keys and values to allow for duplicates. Or to just add a validation check that checks if any keys are the same and suggests to change them to the user. I went with the validation check because it seemed like the easiest and didn’t have to rewrite tons on code.

In terms of what I learned I didn’t really anything new. I’m quite familiar with Javascript which is what Buttercup is written in.

Here are the links to both the pull request and issue.

Issue

Pull Request

by Alvin Valdez at April 13, 2019 07:30 AM


Vladimir Rozin

Good friend penguinV

Two birds with one "Pull"


    As previously said, I was working on OpenCV bug (you can find some details here). The bug was not something to spend more than 2-3 days on, but the problem that was there - compilation time. OpenCV project is a set of C/C++ files (and CUDA ;-) ), which is supposed to be compiled with "cmake" to generate library(ies), containing compiled code. Everything sounded pretty decent, until the moment when I realized that I would need to compile the entire folder with a bit more than a lot of different modules of different shapes and colours to make any changes to the existing code and test it. And just because the modules with reference one-another, creating a web of dependencies, I would need to compile the whole thing every time, not some of the modules independently ("video" module, "java", "core" etc.). It'd be okay if not the fact that every compilation would take 20 minutes. Not nice. So, I switched to the projects that I worked on previously - penguinV.
    The new issue that I found was thrilling - implementation of another feature for EdgeDection algorithm. This time, it was optional median and Gaussian filtering for an image, before it would try to find positive and negative edges.
    I implemented the algorithm the way that the owner of the repo asked (I hope I did it correctly; if not, there is always a possibility to change and resubmit the work) and implemented my own way of approaching the Gaussian task. I found a couple articles, which stated that Gaussian distribution algorithm is not the only way how one can get Gaussian kernel, but there's also an option of using well-known Pascal's triangle to get a line of normally distributed values (source). And this algorithm works just a bit faster than the original. I also was asked by the owner of the repo (ihhub) to fix another issue alongside (issue). More details can be found in the PR :)
 
   Thank you for your attention! 


by Vladimir Rozin (noreply@blogger.com) at April 13, 2019 04:03 AM


Sahib Arora

Release 0.4

Beginning!

Beginning of my future journey!

It was fun time involving in Open source community, I had a great experience, I loved the way people come from front to help you, how people involves each other in various projects, how my favourite projects are built and maintained. Though it is a hard journey, as you have no idea of what project is and you jump in and work on them. Its just easy to say thing but you need mind awareness to do it but once you get going, once you get the push after you do few PR’s your mentality changes — you start looking at projects differently, from the time when it was understand to what Project is to the time you when you start thinking this could be an interesting feature in this project. And after enough experience you say I need to start my own project, as now you have enough knowledge of what people wants and what people like.

For me, on the path of a developer, I believe open source is a path for me to learn, understand and develop myself. I am never going to stop contributing, though I couldn’t do better in this milestone due to shortage of time but no worries, I am not going anywhere!

Little bit about what happened, it was a hard time to focus for finding a bug to work on, Due to shortage in time, I decided not to work on bigger issues but I will work on two smaller issues, I found an issue which only accepted strings but the requirements needed strings and number. So, I jumped in to the Project and located where was it happening, Once, I figured out, fix was easy just to change the type. [issue][PR].

Thank you!

by sahib Arora at April 13, 2019 03:19 AM


Harsh Patel

Release 0.4 – Final Update

In the last post, I mentioned I’ll be working again on Marquez project. After writing Unit tests, I was eager to write more test for Marquez. So, I wrote two tests for this release. It was pretty hard initially as the way Marquez handles each of its modules is quite challenging. So, writing tests for different modules was difficult. But, I figured out after looking into the code, digging deep into some tests.

Let’s talk more about the issues I worked on for release 0.4.

I like writing JUnit tests as it is quite interesting. And my job was to bring the coverage closer to 75% which was currently below 25%. Let’s check out the code I wrote for this fix.

 @Test
  public void testMap() throws SQLException {
    final ResultSet results = mock(ResultSet.class);
    when(results.getObject(Columns.ROW_UUID, UUID.class)).thenReturn(ROW_UUID);
    when(results.getTimestamp(Columns.CREATED_AT)).thenReturn(Timestamp.from(CREATED_AT));
    when(results.getObject(Columns.DATASET_UUID, UUID.class)).thenReturn(DATASET_UUID);
    when(results.getObject(Columns.DB_TABLE_INFO_UUID, UUID.class)).thenReturn(DB_TABLE_INFO_UUID);
    when(results.getString(Columns.DB_TABLE_NAME)).thenReturn(DB_TABLE_NAME);

    final StatementContext context = mock(StatementContext.class);

    final DbTableVersionRowMapper dbTableVersionRowMapper = new DbTableVersionRowMapper();
    final DbTableVersionRow dbTableVersionRow = dbTableVersionRowMapper.map(results, context);
    assertEquals(ROW_UUID, dbTableVersionRow.getUuid());
    assertEquals(CREATED_AT, dbTableVersionRow.getCreatedAt());
    assertEquals(DATASET_UUID, dbTableVersionRow.getDatasetUuid());
    assertEquals(DB_TABLE_INFO_UUID, dbTableVersionRow.getDbTableInfoUuid());
    assertEquals(DB_TABLE_NAME, dbTableVersionRow.getDbTable());
  }

So, I had to mock the ResultSet and StatementContext class as you can see it above. Basically, we had to check whether the DbTableVersionRowMapper works as expected. So, we just pass two mock objects and after that check, if the output is what was expected by using assertEquals.

DbTableVersionRowMapper

This is the second issue I’m currently fixing. As this test is to be written in a different package, it is quite difficult because all these modules work differently and their JUnits also needs to be implemented in a different way.

final DbTableVersion dbTableVersion =
        DbTableVersion.builder()
            .connectionUrl(CONNECTION_URL)
            .dbSchemaName(DB_SCHEMA_NAME)
            .dbTableName(DB_TABLE_NAME)
            .build();

    final DbTableVersionRow dbTableVersionRow =
        DbTableVersionRowMapper.map(datasetRow, dbTableInfoRow, dbTableVersion);
    assertNotNull(dbTableVersionRow);
    assertNotNull(dbTableVersionRow.getUuid());
    assertEquals(G_UUID, dbTableVersionRow.getDatasetUuid());
    assertEquals(G_UUID, dbTableVersionRow.getDbTableInfoUuid());
    assertEquals(DB_TABLE_NAME.getValue(), dbTableVersionRow.getDbTable());

So, for this JUnit, you need to mock some objects, also build some mock objects. You can see above how I mocked DbTableVersion object. It actually passed all the checks but my forked repository wasn’t updated so I didn’t pull the latest changes. Unfortunately, some of the classes got changed which I was using for this test. So, I had to update my repository and had to make changes again. I’ll be working on this PR until it gets merged.

This release helped me to understand some core functionalities of Marquez and I gained invaluable experience. I’m happy to work on these fixes and hopefully will continue contributing to Marquez project.

Issue 1 Link

Issue 2 Link

Pull Request 1

Pull Request 2

by hjpatel16 at April 13, 2019 03:02 AM


Paul Moon

Pull request for CRUD implementation

The pull request was to create an CRUD operations for the element tree, although I am quite unsure about what is needed or not but the creator has said something very basic and simple. So the read update and delete is quite simple, just search for id and do their thing really. The create was a bit of a hassle as the element tree isn’t fully completed, hopefully will hear from the creator later down the line.

by bakamonomoon at April 13, 2019 12:36 AM

April 12, 2019


Jacob Adach

RELEASE 0.4

Release 0.4:  A new Bug

New bug new code new me lets go.  So I am going to be looking into this issue for buttercup-desktop

https://github.com/buttercup/buttercup-desktop/issues/626

Basically there are 2 ways to copy to the clipboard, the ctrl-c method, and in buttercup there is also a little button to copy to the clipboard as well.

So the issue is regarding that cute little button in the panel above which for some reason is not clearing the password from the clipboard cache, which makes for a pretty big vulnerability.

So lets start debugging, if I perform a git grep “clipboard” in the terminal I get a response like this

So boom, right there lets head over to the shortcut.js file in the REACT debugger, inside of the shortcut.js file we can see exactly where the program breaks after the user copies to the clipboard

So we can see the clipboard being cleared here but take a look at this when we click that nice little button next to the password the break point doesn’t engage, which means that the button and the ctrl-c are calling different functions for copying and clearing the clipboard.

So let us see what the other button takes us firstly let us set a break point on where the event is being called

But that proved to not really help us, even looking at the event listeners I can’t really get anywhere.  But if we see the title name ‘copy’ it is a clue, something we can follow maybe, so lets try and search for copy in the github repo and see what we get.

First thing is we can see that there are a few files importing the following method

So lets head over to the file utils.js and see what is going on! 

So right here, I suspect is the function being called, I put in some alert and console logs and commented out the clipboard method and sure enough I lost the ability to copy from the clipboard.

Next lets implement a fix !

Done!  Added in the missing code from the previous file which handled the ctrl-c clipboard, some missing libraries and now we have a clipboard which does not leave the users password vulnerable.

Filed the PR up to the main stream and I will be awaiting their response which could be undetermined if history guides us as a reference.

https://github.com/buttercup/buttercup-desktop/pull/762

Update

So the PR was not accepted, and to my dismay I was provided with a request which was intended to seem simple and understandable but as I took a closer look into the issue I unraveled a deeper web of issues blocking me from completing this PR.

Let me begin by specifying that my PR did in fact clear the clipboard after 15 seconds so the password vulnerability which exists in present tense does not anymore. The new issue which I foolishly overlooked originally is that the button on the side to copy the password to the clipboard

Will be the same for every field, therein lies the issue because the clipboard will be cleared every 15 seconds regardless of whether the field is a password or not.

Easy solution right, just compare the passwords. Not so fast, because in order to get the password I will need a handle of some sort which the utils.js file does not have.

When the user presses ctrl-c the program will automatically bind that call to a function in shortcuts.js which in fact receives a object housing the “store” or data information of the object so it is able to query for the password

Looking above we ca derive the following: We get a value named currentEntry from the method getCurrentEntry which requires an object called “store” which is the state of the current object and is passed into the setupShortcuts exported function here:

The above file is located src/renderer/index.js

To reproduce all of this just to clear the password although is the right thing to do seems counter intuitive because this is something which should have been thought of beforehand, it seems like a lot of issues with this program can be associated to the choice of architecture in the form of the fields which houses properties like “username”, “password”, and other custom fields

I do not think my issue warrants a handout from the community in the form of advice just yet because there is a lot of stuff I can still try and at this point I have serious doubts that even the contributors themselves fully understand the complexity of the program which they created.

by jacobadach at April 12, 2019 11:21 PM


Paul Moon

Maintainer might be missing?

It would seem he is not responsive past day or two, perhaps he is busy and unable at the moment, but since he isn’t I am sort of unable to progress my release 4 issue due to having some difficulties and uncertainties before making a complete pull request, whilst waiting I did do a very simple pull request just for the hell of it. Literally changing links, but sometime whilst waiting and looking around.

by bakamonomoon at April 12, 2019 10:42 PM


Volodymyr Klymenko

Adding Hide/Show functionality of the bottom panel to Lona

Adding Hide/Show functionality of the bottom panel to Lona

It’s Friday, and it’s time for another story about my Open Source journey. I continue working on Lona, and I’ve fixed another bug earlier this week. Let’s take a look at the issue:

Bug 🐞

The interface of Lona is really similar to Xcode’s interface, and it has three panels. One on the right, one on the left, and one in the bottom. The bottom panel contains some utilities such as parameters, logic, examples and details of the component, and for some reasons, the hide/show button in the navbar didn’t do anything. My goal was to implement this functionality.

Fix 🔧

In order to fix this bug, I did the following steps:

  1. In the ComponentEditorViewController, which contains the bottom panel, I wrote a new function that, basically, hides and shows the bottom panel depending on the value passed in the argument:
private func setBottomItemVisibility(to visible: Bool) {
if (visible && bottomItem.isCollapsed) || (!visible && !bottomItem.isCollapsed) {
            bottomItem.animator().isCollapsed = !visible
        }
}

2. I created a public variable utilitiesViewVisible, which I’m going to use later in the WorkspaceViewController. This variable has a getter that returns the value of bottomItem.isCollapsed, and a setter which uses the function from the first step to update the value of bottomItem.isCollapsed:

public var utilitiesViewVisible: Bool {
get { return bottomItem.isCollapsed }
set { setBottomItemVisibility(to: newValue) }
}

The reason why I made this variable is that bottomItem is private, and I cannot access it from the WorkspaceViewController.

3. Then, I used a newly created variable in the WorkspaceViewController:

// this variable contains an array of all panels in the app.
// I added a conditional statement inside filter function that
// checks whether the current item is bottom one.
// If it is true, it returns value of
utilitiesViewVisible
public var activePanes: [WorkspacePane] {
get {
return WorkspacePane.all.filter {
if $0 == .bottom {
return !(componentEditorViewController.utilitiesViewVisible)
}
else {
...
}
}
}
...
}

Also, I added another conditional statement to the setVisibility function which is called when the hide/show button is clicked:

private func setVisibility(to visible: Bool, for pane: WorkspacePane, animate: Bool) {
if pane == .bottom {
componentEditorViewController.utilitiesViewVisible = visible
}
else {
guard let item = splitViewItem(for: pane) else { return }
if (visible && item.isCollapsed) || (!visible && !item.isCollapsed) {
if animate {
item.animator().isCollapsed = !visible
} else {
item.isCollapsed = !visible
}
}
}
}

Result

As you can see in the GIF below, the bottom panel works properly when the hide/show button is clicked.

Here is a link to the pull request:

Hide/show bottom panel by klymenkoo · Pull Request #374 · airbnb/Lona

Enjoyed this post? Feel free to give this post a few claps so others can enjoy it 👏👏👏

Check out my previous story about Lona:

Adding Component Duplication to Lona

by Volodymyr Klymenko / Володимир Клименко at April 12, 2019 10:37 PM


Paul Moon

Forgot an status update blog for release 4

As said previously posting, I’ve managed to be a part of a person sole project, although unsure if I am being helpful or not. The release 4 part of issue is to create some crud operation for the persons .net project. The crud operation seems to be simple but proving to be difficult as he hasn’t actually finished the project and doesn’t seem to have fully finish product, but that’s every software in the world. So far I’ve attempted to create simple crud as a base line for what would be a bone or skeleton of future function.

by bakamonomoon at April 12, 2019 09:52 PM


Yuansheng Lu

Release 0.4 – Final summary

In release 0.4, I continue to work on the project angular-bootstrap-slider. I have fixed the issue: https://github.com/seiyria/angular-bootstrap-slider/issues/158. One of the maintainer wants to update a dependency version. This project is using the dependency of bootstrap-slider. This dependency’s latest version is 10.6.0 and the current dependency version in angular-bootstrap-slider is 10.3.2. I updated to 10.5.0 and we might continue to update it to 10.6.0 in the future.

Firstly, I updated the dependency version in package.json and then I rerun the “npm install” to re-download the dependency. There is a new feature lock-to-ticks in version 10.5.0, so I need to add this new feature to this project.

scope: {
                max: "=",
                min: "=",
                step: "=",
                value: "=",
                ngModel: '=',
                ngDisabled: '=',
                range: '=',
                sliderid: '=',
                ticks: '=',
                ticksLabels: '=',
                ticksSnapBounds: '=',
                ticksPositions: '=',
                ticksTooltip: "=",
                scale: '=',
                focus: '=',
                rangeHighlights: '=',
                formatter: '&',
                onStartSlide: '&',
                onStopSlide: '&',
                onSlide: '&',
                lockToTicks: '='
            },

I created a new property “lockToTicks” in the $scope variable.

setOption('lock_to_ticks', $scope.lockToTicks, false);

And then I created option for lock-to-ticks and make it default to false using setOption(). At this point, the lock-to-ticks feature has been added to my project. Now I need to test it and make sure it works properly.

In the test.html file, I created a slider with lock-to-ticks.

 <br><br>
    Lock to ticks
    <span slider
          ng-model="model.eleventh"
          ticks="[3, 5, 7]"
          lock_to_ticks="true"></span>
    Model: {{model.eleventh}}

The ticks array is [3, 5, 7] and I set lock_to_ticks to true. It means that this slider has three ticks and it has been locked to these values. Other values in this slider has been disabled. And I have tested it and it works properly.

I have created the pull request for this issue. After it’s done, I am getting more familiar with the Angular.js.

Pull Request:

https://github.com/seiyria/angular-bootstrap-slider/pull/160

by luysh0420 at April 12, 2019 09:15 PM


Julia McGeoghan

The Virtues of Open Source

Motivation

I started this school year after finishing an internship, where I was working with a team of developers, writing software, attending stand up meetings, code reviews, etc. Open Source quickly became a non-optional thing for me to participate in, because I realized it was a decent way of keeping up the momentum of that experience while in school.

One-off assignments don’t seem like a very good reflection of software development itself, they’re just a way of exercising certain concepts. You’re rarely encouraged to keep close attention to best practices or the maintainability of the code in the future. You’re not (usually) getting feedback from piers or learning to work with them to complete something, at least not in a way that’s encouraged.

Most importantly (to me anyway), you’re only learning to work from information that is spoon fed to you, on something that someone else will almost always have the answer to. You’re not developing the ability to take on totally unfamiliar challenges and adapt through your own research, which was a common demand I faced during my internship. I was scared to lose touch with that, of stagnating.

Getting There

Before I made a concerted effort to participate in Open Source projects, in my mind a lot of them were enigmatic and a bit off limits, in terms of larger or more popular projects. It seemed too good to be true that I could just jump in and contribute code for popular development tools or even languages. It took a while for me to realize that I was ready and capable of doing so.

It started small with a contribution to a project called Filer. At that point I wanted to learn how to contribute to something I didn’t myself own. I learned the process of looking through and ‘claiming an issue’, creating a PR for it and working with any possible feedback.

Image result for hacktoberfest

From there I participated in an event called Hacktoberfest. It was a fun exercise where I learned about a lot of different project types; although it was a bit chaotic because there was a lot of competition to complete PRs. I’m glad I went through it because it was a good primer for future work and I got a decent t-shirt out of it.

I like to draw and make storyboards, when I have the spare time to at least. So the next project I went to work on was an application I used before called Storyboarder, which was immediately appealing to me because it was free, and a lot of other storyboarding software most definitely it not. The software itself seems to be gaining traction despite its insanely small development team, probably because people prefer free things, as I do. I thought if I became a regular contributor I could help build something sorely needed, that could really use the extra help, even if it was small bug fixes.

However Storyboarder was the point where I began to build confidence and realize that I wasn’t stuck to beginner issues or smaller projects. And as soon as I reached that point I got distracted by other things, more ‘monolithic’ projects.

I think one of my proudest contributions to date was for Node.js. This is something I never would have imagined contributing to even just a year ago. In fact before 2018 ended I was starting to develop of list of larger projects that I felt similarly about:

  • Node.js
  • VS Code
  • Firefox
  • Mozilla’s Voice-Web
  • Typescript (kind of, learned that I need to research it more before making a PR again though)

Conclusion

But because I was participating in so many different projects, I wasn’t gaining any real traction in a particular one. It was fun to experiment with different things, but I didn’t like that I was only ever making small fixes and not working in any one community.

To remedy that I decided to contribute to fast-dna. As of now I have 6 merged PRs all centered around a particular task/feature, and have become a lot more familiar with the project in general.

It’s been a great experience because I’ve gotten to work with a team that seems dedicated to a strong development process and code quality, which in turn helps me build good habits when writing code. I’m focusing a lot of my energy this year on Javascript, so getting to work exclusively in it in this case has helped a lot. And having now gotten used to one project, it might open the door to progressively more difficult tasks within it.

There’s no doubt in my mind that actively contributing to Open Source during this school year was a good idea. It was difficult at times but I’ve gotten a lot out of it. I only wish that I started sooner, did more with it where I could, was bolder earlier in my decisions.

by Julia McGeoghan at April 12, 2019 08:12 PM


Brandon Wissmann

The unknown cont

The unknown contact.

Photo by Elijah Hail on Unsplash

This week I’ve been looking for another issue to work on. I decided to try my hand at this issue on the Status repository. It was quite difficult surprisingly as it was a two part issue. As described by the original poster, if a user clicked a notification that was from somebody they blocked (after having received the notification) or if they deleted the chat, they would be sent to a chat with an unknown user and even have the option to add “unknown user” to their contacts. Very mysterious.

The first thing I did was to go ahead and make sure this issue was still relevant. I found out that this was not so easy, as on my live device I could not receive notifications when I had the debug app along with the production app. I then went to use Genymotion (an android emulator) which I eventually found out I needed to download an extension to get push notifications working on their devices.

Eventually, it all came together and I could finally start testing. I used my phone to send messages onto a spoof account and did all the steps to reproduce. The issue was indeed still there.

I decided to tackle the issue of being able to navigate to a unknown user after blocking the contact. I found the following method that handled push notifications and simply added a flag to check if the user was blocked before continuing. I won’t go into detail as this work was scrapped as soon as I fixed part 2 of the issue.

Part 2 involved the chat not existing. As soon as I started working I realized my previous work was no longer relevant as by fixing this I would fix both. I realized by looking at the code that when a user was blocked the chat was also deleted. Marked as inactive. The same thing is done when a chat is deleted. I therefore decided to build a simple function to check if the chat is active or not which I would then call in the chat handler.

The function looked like this:

(defn is-active?
   ([chat]
      (:is-active chat))
   ([cofx chat-id]
      (is-active? (get-chat cofx chat-id))))

It was then used in a existing function:

(fx/defn navigate-to-chat
"Takes coeffects map and chat-id, returns effects necessary for navigation and preloading data"
[cofx chat-id {:keys [modal? navigation-reset?]}]
(when (= (is-active? (get-chat cofx chat-id)) true)
(cond
modal?
(fx/merge cofx
(navigation/navigate-to-cofx :chat-modal {})
(preload-chat-data chat-id))
navigation-reset?
(fx/merge cofx
(navigation/navigate-reset {:index   1
:actions [{:routeName :home}
{:routeName :chat}]})
(preload-chat-data chat-id))
:else
(fx/merge cofx
(navigation/navigate-to-cofx :chat {})
(preload-chat-data chat-id)))))

As you can see, the when condition checks if the chat is still around and if it is, it continues on to the regular function. I later went on to testing and was able to submit a pull request. Looking back at how simple it is to explain, I believe that I could have finished this task much quicker if I was more familiar with things like reagent and renatal. (ClojureScript frameworks to run react native and react). I am glad that I tackled the issue as I learned a lot and I hope to see my pull request accepted.

by Brandon Wissmann at April 12, 2019 12:40 AM

April 11, 2019


Andrew Koung

Release 0.4 Final

Hi guys! An update with my release 0.4 is that I’ve implemented the lchown() functionality into filerjs. The purpose of lchown is to update the UID and GUID of a final node that is a symbolic link. The function is much like chown(), but instead doesn’t dereference. When dereferencing in this context, it’s to link back to the node that the symbolic link is referring to.

When I chose to implement watchFile() for my 0.3 release, It was a living hell to figure out the nodejs and filerjs repository. In exchange, I was able to build a base for my knowledge of file systems. When I chose another issue under filerjs as my 0.4 release, the purpose was to put my knowledge to the test. My experience with this pull request was an excellent choice and I would never regret choosing this issue in a million years. I can certainly say that the experience was smoother than the first.

In order to tackle this problem, I started by looking into the node repository and figure out how lchown() was implemented there. I can say that it wasn’t that helpful as I later found out that they use a module that does the work in c/c++. The next step was to study the implementation of chown() and fchown() in filerjs and spent hours trying to figure out how find_node had actually worked. The reason why this took hours it because I didn’t understand how the callback functions were even being called and receiving the values that were needed. Eventually I brought the question of how getContext() worked in class and also learned about the lstat() method. Eventually I put the pieces together to get create a function that call lstat to get a symbolic node back and change the UID and GID in the lchown() function.

by Andrew Koung at April 11, 2019 06:15 PM


Woosle Park

Release 0.4

Mission Pinball

This pull request took some time but I learned a lot from the last release on how I could fix my bugs. Firstly my issues with installations were solved by going through the documentation and doing clean installations over. Mostly had an issue with python not working in Linux so moving over to windows 10 I fixed the issue and python worked for me. This issue was more complicated than I thought it would be mostly because I was learning python for the very first time so I had to learn pip and how to draw on screen. Also learned how to compile and run python scripts from scratch. I spent a couple hours just trying to learn the code and how all of it interacted with each other luckily the contributors responded to my questions and gave me useful link and insight on the code files.

After spending some time learning all the functions and variables my first coding issue I was learning how scopes and functions worked in python because of the lack of curly brackets thoroughly confused me. I also had to learn the syntax of for loops and learned the difference between different types of arrays whether they are contained in square or curly brackets. Apparently, you can’t use the logic of iterating through 1 array and use on every type of array. This lead me to learn the enumerate function making it possible to use it with the for loop. This was important because I needed to get the array for the player variables to use the enumerate function to use it in a for loop and then display the information to the user using the screen print at function in the file. This took some time mostly because of syntax errors and learning what I could and could do with an array. I also learned that the equals operator passes reference and not value for arrays which cause issues for me because I was trying to pop values eventually I learned to use the copy function to make a shallow copy. 

Currently waiting for merge but contributor seems pretty content with work only asked for variable name changes.

Much Assembly Required

The creator of the game eventually responded to my pull request for release 0.3. He commented on changes to variable names, finally explained how I needed to incorporate execution time, and said to remove the real-life timer files. I made all the changes he asked for and currently waiting for a reply or if he merges my commit but I believe I satisfied his requirements finally.

Mission Pinball Pull

Much Assembly Required Pull

by woosle1234 at April 11, 2019 06:52 AM

April 10, 2019


Matthew Quan

Release 5 Final Update

Release 5 Another Update

In this update, I’m just going to provide an update on Release 5. Last time, I mentioned that my Join Lines PR was failing. I made a couple of minor changes to VSCode like having it grab the first non white space character and making minor selections changes. It now passes VSCode tests.

Here is a couple of gifs showing how Join Lines now works:

JoinLines-1Cursor-3Select

JoinLines-3Cursor

JoinLines-Merge-Merge

I plan on continuing my work in open source and hopefully will have a guide soon detailing how to contribute to VSCode.

by mattprogrammingblog at April 10, 2019 12:50 AM

April 09, 2019


Paul Moon

Pull Request for documentation issue

Initial Documentation changes for the collaboration project, this pull request, is to change prefixes of all codes, directories, classes in order to match the .NET requirements.

Tedious work, and the creator is doing the project solo and seems to be in need of help of any kind. Quite happy he was willing to cooperate with someone with little to no knowledge and take the time to create issues and assign them with explanations

by bakamonomoon at April 09, 2019 09:28 PM

More Pull request and issue assignment

After doing some simple documentation for a project, the creator has asked to become a collaborator and do some simple tasks. I’ve been assigned a few issues including simple refactoring, and some CRUD Operation tasks. Hoping to work this out and learn a few things about .Net and C#

by bakamonomoon at April 09, 2019 06:36 PM

April 08, 2019


Paul Moon

Replacement Pull Request

A quick search to do some replacement pull request for the one being taken over by another, very simple documenting pull request with commenting codes on a project. Hopefully can get some more done but initial was small since there wasn’t really a guide line or method for commenting

by bakamonomoon at April 08, 2019 07:11 PM

Issue being closed by someone else

It would see the issue I was working on has been closed by someone else’s pull request. I did take some long time as I was having difficulties getting the hang of the code and the bot program. It would seem someone else has come along and solved the issue, and no longer needed. Obviously my fault for taking such a long time, and in the environment like this it would be pretty normal for others to come and work on the same issue. Search for new issues continue and lost in the sea of problems

by bakamonomoon at April 08, 2019 06:56 PM


Abdirahman Guled

Release 0.4 Update

In my last blog i discussed that i was going to work on project AZAN. It’s an Islamic prayer times reminder allowing Muslims to view prayer time in their region.

I come a cross issue-3. In this issue more time zones have to be added as people are from different places. Unfortunately couple of days after sending a request to work on the issue one of the contributes let me know that the issue has been fixed.

I’m currently looking for another project to work on for release 0.4.

by abdi guled at April 08, 2019 03:54 AM

April 07, 2019


Al Vincent Valdez

Release 0.4 update

For 0.4 I still haven’t decided what to work on in terms of issues. But for projects I have decided to work on either:

I’ll hopefully decide what issue to work on soon. I have been looking at some issues I was thinking of doing on release 0.3 and new issues that I’ve seen.

by Alvin Valdez at April 07, 2019 06:11 AM


Vincent Logozzo

0.4 Update

Microsoft/Calculator (re-rewrite)

github.com/Microsoft/calculator

After the events of my 0.3 release, I decided to take a, more encompassing approach.  So far the process has been working, and recent I attempted by first build after re-writing all the functions in the operator+= call stack, with, slightly unexpected results, which ill get to after. Now this might seem like a simple task for the rewrite, but each function has to have its parameters updated, logic of the function re-written and local variables which were raw pointers, changed to smart pointers... for some better understand I mapped out the call stack of the operator+= function:
this function has calls another function for each dot on the chart besides the two on each side of the if statement. These functions also loved to use DUPNUM() which would take the heap memory of a NUMBER struct and duplicate it, this isn't really friendly with smart pointers, since they will still delete their original memory, even after the duplication would happen.


Smart Pointers

So this might be a late explanation of whats happening, but currently, all these functions pass around a pointer to our RAT which has two NUMBER pointers as well.
so the first set of functions get passed a pointer, which points to a piece of heap memory, the re-write will make the functions instead take a unique_ptr by reference, a smart pointer is a stack allocated block of memory, that holds our pointer. This means our functions instead of passing around the raw address, we just pass a reference to this control block, which gives us access to our heap memory. Once the control block goes out of scope, the stack will reclaim that memory and the control block's destructor will delete the memory for us.

Back to our regularly scheduled programming

After my first build, I was greeted with a very ironic result... a memory leak. After debugged and keeping track of memory addresses, I found out the leak is because the NUMBER struct has a member "MANT", 

MANTTYPE mant[];// (decimal point in radix 10)
// This is actually allocated as a continuation of the NUMBER structure.
note: MANTTYPE is a uint32_t which is a unsigned int (to avoid confusion, apparently)

it turns out this is a dynamic array, but its size in memory is just added to the size of the rest of the struct when its allocated. I can only assume this works because the memory technically belongs to the struct which is this members parent, so were not really committing a read access violation. 
The problem seems to be that the automatic deletion doesn't know how to handle deleting this member as it is the actual structs memory. I posed this question inside the original issue, which the response I got was another pull request is, hopefully, working on this, changing the type to std::vector<MANTTYPE>, which should handle its own deallocation.

by Vlogozzo (noreply@blogger.com) at April 07, 2019 03:15 AM


Xiaowei Huang

Release 0.4 – status update

It’s time for me to prepare my last PR in OSD course.

I am working on Pandas – a powerful Python data analysis toolkit. I have finished my setup on my local machine, and I am to go through this issue https://github.com/pandas-dev/pandas/pull/25924.

It also becomes my first time to use Python. I’m sure there’re different kinds of issues coming up. I still would like to finish this PR on time.

by Violet H. at April 07, 2019 03:09 AM

April 06, 2019


Jacob Adach

Open Source: Working with Buttercup Desktop in (REACT)

Right, so we are back in it and this time we have new tools to help us get to the bottom of the problem.

The new issue I will be looking at is here:

https://github.com/buttercup/buttercup-desktop/issues/760

The previous issue I attempted to solve failed pitifully, why? Because I wasn’t using the proper tools. I neglected to use the “React Developer Debugger”

Don’t ask me why I neglected to use it, maybe it was my lack of experience or the intimidation of using a new tool which I had never used alongside a project using a development language I am new too, either case I punished myself by not using this tool, because it is a “holy grail” when it comes to debugging.

The Issue:

So basically, the user filed an issue because when we he did a search in his current archive of buttercup, and by archive I mean an index of passwords associated with accounts, the search function did not attempt to find any matching patterns in the custom fields, only the title and username field.

So below is an example of an entry in my archive with some custom fields

If I type in main, or buttercup then the entry will pop up, but if I attempt to put in the following: farm, boy, alien, invasion from the custom fields then nothing will pop up, our goal is to try and find out what is displaying the data, see how it works and attempt to change it to fix the issue.

Using the Debugger

BreakPoint

If we right click on the search bar we can inspect the element, once there we can right click the element inside the element (part of the debugger window) and set a breakpoint, which will freeze the program once any data is entered. Once we are in this position we will be able to see more information about what is going on in the current state.

We select subtree, because we want to capture the event that happens inside that div, and we do not know where it occurs exactly. Notice the div highlighted, the input box falls under its subtree.
Notice how once we set the breakpoint the program froze, we were taken directly to the source of the file which the function is being called, and now we have direct view of the call stack. So much information at our disposal.

Let me get your attention focused on how the attributes of an archive entry are saved first before we continue

As you can see, the property has a string associated with it called title, which makes sense because it is the title. Our custom fields property strings are each dynamic like farm, and alien and can be anything that the user inputs so we will never know what the key value associated with the property is. This will tie in directly to our issue

In order for the application to fetch the associated entries matched with the search bar it uses a library named buttercup-web which then references another library named fuse.js, basically there is a big problem when trying to ask for specific information from the entries because of how the attributes are stored.

I decided to reach out to the community for their opinion, below is the link to the actual issue and I will print out what I wrote for them to explain the issue in detail.

Getting involved in the community

https://github.com/buttercup/buttercup-desktop/issues/760

Hey guys, I was looking into this problem and found an interesting dilemma.

So the properties of these objects are stored like this in the program:

image

Now after I hit ctrl-f and enter a value a method eventually a method will be called named search which comes from the library buttercup-core-web which exports EntryFinder

https://github.com/buttercup/buttercup-core-web/blob/40b6ff7ee4b04a085720dbb013782be8e921f864/source/EntryFinder.js

image

Inside that library the search method which is being called to get the values of the matching text entered by the user is being iterated by a further library called fuse https://fusejs.io

Here is the issue blocking the above problem

image

The fuse object only accepts keys as parameters, and they keys that are being passed in are property.title, and property.username , if you take a look above at my 1st screen of how the objects are stored, I have a custom field where the title is set to the string of “farmer”, so the property value is property.farmer , which kind of blocks the possibility of being able to pass in keys to search for custom fields.

Besides changing how the architecture of how custom fields are stored in the application I am not sure how else this issue can be resolved. I would love to hear some of your feedback and opinions on this issue.

Resolution

As of right now, writing this I am still waiting to hear back from the community regarding how to proceed with the issue at hand.

by jacobadach at April 06, 2019 08:50 PM


Alexei Bonilla

Bon's Blog 13 - Next

Updated PR for Release 0.3

Just in case you missed last weeks blog. I submitted 2 pull requests to a repository because one of them was small. This pull request I linked above is the changes that were requested in the previous PR.

With that finished, this week I have been working on trying to learn more about React.
I have purchased a course on Udemy teaching the fundamentals of react and how to use hooks and will look to update everyone as I learn more.

Stay tuned.

Alex

by abonilla1 (noreply@blogger.com) at April 06, 2019 04:49 PM


David Li

Release 0.4 Update

Issue: https://github.com/excaliburjs/Excalibur/issues/1102

For my Release 0.4 for OSD600, I chose Excaliburjs Issue #1102. As of yet, I have not created a PR for the issue as I am currently looking for files to work on, since the issue post description does not specify. I submitted a comment to the issue asking which files I can work on, as well as suggestions on files I wanted to work on. I have much work to do for this PR, including finding multiple files as well as the modules needed to run and test my edits. As this issue can be considered a “chore” type, almost no one has touched the issue, giving me a good chance of getting many files to edit. My plan is to at least edit 2 files.

by dli119seneca at April 06, 2019 04:41 AM


Iryna Thompson

Release 0.4, Update

Potential Issues

I have a couple of potential issues for the Release 0.4.

The first Issue:
Bugzilla Link
GitHub Link

When I set to Windows High Contrast Theme the “Save full page”, “Save visible” and “My shots” icon labels all become invisible. While for the expected results, Firefox screen overlay, control buttons, and control button labels should all be clearly visible.

The second Issue:
https://github.com/peblio/app/issues/521#

While entering password in Safari browser, password dots are not shown inside an input field.

Image: ‘Coffee cup and phone on a wooden table
http://www.flickr.com/photos/30478819@N08/47512440651
Found on flickrcc.net


by irynathompson0609 at April 06, 2019 02:30 AM


Vladimir Rozin

Two Different Frames of Same VidioCapture

OpenCV Challenge


    I believe, this bug is going to be one of the most challenging I have worked on. Not because of complexity of the work, not because of the scale involved, but because the part of the code is brand new to me.
STDMETHODIMP SourceReaderCB::OnReadSample(HRESULT hrStatus, DWORD dwStreamIndex, DWORD dwStreamFlags, LONGLONG llTimestamp, IMFSample *pSample)
{
    CV_UNUSED(llTimestamp);
    HRESULT hr = 0;
    cv::AutoLock lock(m_mutex);
    if (SUCCEEDED(hrStatus))
    {
        if (pSample)
       
            CV_LOG_DEBUG(NULL, "videoio(MSMF): got frame at " << llTimestamp);
            IMFSample* prev = m_lastSample.Get();
            if (prev)
            {
                CV_LOG_DEBUG(NULL, "videoio(MSMF): drop frame (not processed)");
            }
            m_lastSample = pSample;
        }
    }
    else
    {
        CV_LOG_WARNING(NULL, "videoio(MSMF): OnReadSample() is called with error status: " << hrStatus);
    }

    Sooo, here we have a function... which takes 5 parameters... one of which seems to be a pointer... and then magic happens inside of the function.



    But first, let me refresh your memory on the issue itself. The bug crawls in OpenCV repo, and it concerns VideoStream: when a user plugs in an external video cam (it is supposed to have MSMF (Microsoft Media Foundation) background), takes a number of frames from the stream and, before one would take another frame, plugs out the cam, the OpenCV read() function will return a flag signaling about unsuccessful frame take, but it would also return non-empty frame, which logically would need to be empty.
    The bug is in C++ style of the code and shouldn't be so hard to spot. Yet, the fact that we are dealing with MSMF implies that the deep inside in the .cpp logic, the code will take forms of the one we can see in <windows.h> and such.
    “It's a dangerous business, Frodo, going out your door. You step onto the road, and if you don't keep your feet, there's no knowing where you might be swept off to.” (LotR).
    The piece of the code from the above is the one responsible for throwing an error upon trying to read a frame while having the camera being unplugged.


    Here's the piece of the code that can produce the issue:

VideoCapture m_camera;
    Mat m_originalFrame;

    m_camera.open(1 + CAP_MSMF); // Note manual change in the type of the camera
    bool success = m_camera.read(m_originalFrame);
    if (success)
    {
        cout << "Success\n";
        cout << "Please unplugged your camera \n";
        imshow("UNplugged your camera", m_originalFrame);
        waitKey();
        success = m_camera.read(m_originalFrame);
        if (!success || m_originalFrame.empty())
        {
            cout << "second non success\n";
            m_camera.release();
        }
        else
        {
            cout << "If camera is unplugged you shouldn't read this message";
        }
    }

        And the replicated issue can be seen on the following image:



    As to what approach should I take to fix this, I am currently thinking about looking for a default entity and the value it should take and try to return it instead of non-empty frame.

Issue can be found here.



by Vladimir Rozin (noreply@blogger.com) at April 06, 2019 01:42 AM


Oleksii Polovyi

Buttercup update

My first step was to analyse Dropbox feature that was already implemented for buttercup-mobile as suggested by the @perry-mitchell. In this case I am using Nexus 5X API 28 Emulator that comes with Android Studio.

To add an archive I had to click on the button with a few boxes.

The next step was to select what kind of archive I want add.

Then the browser web page was rendered and I was able to sign in with Google. Yay!

The next step was to provide some permissions to the application.

And a nice notification confirmed that I am good to go!

Once I clicked Connect button I was able to see my Dropbox files and folders.

As I mentioned in my previous post, for my Release 0.4 I am planning to implement a Google Drive support to perform similar actions that were described above using client for Google Drive access.

I checked the Dropbox files on the GitHub with t search and it seems that I have to add some new stuff and do some modifications as well. I am planning to create the following files based on the Dropbox example:

  •  source/actions/googleDrive.js
  •  source/library/googleDrive.js
  •  source/selectors/googleDrive.js
  • resources/images/googleDrive-256.png
  •  source/reducers/googleDrive.js
  •  source/components/GoogleDriveAuthButton.js
  •  source/containers/GoogleDriveAuthButton.js

Additionally, following files will be modified:

  •  source/actions/types.js
  •  package.json

GoogleDriveAuthButton is a component that user of the application is going to interact with. It has a beginAuthentication() method that is being triggered onClick(). Additionally, it has render() method that is using React Native components Cell and CellGroup to display the information nicely formatted to the end user. Based on the props that current button component has it will be either enabled or disabled. It is done exactly in the same way as in the Dropbox demo above.

// source/components/GoogleDriveAuthButton.js
import React, { Component } from "react";
import PropTypes from "prop-types";
import { Cell, CellGroup } from "react-native-cell-components";

class GoogleDriveAuthButton extends Component {
beginAuthentication() {
this.props.onClick();
}

render() {
const title = this.props.authenticated ? "Authenticated" : "Authenticate";
return (
<CellGroup>
<Cell
title={title}
icon={{ name: "google-drive", source: "font-awesome" }}
onPress={() => this.beginAuthentication()}
tintColor="#1144FF"
disabled={this.props.authenticating ||
this.props.authenticated}
/>
</CellGroup>
);
}
}

GoogleDriveAuthButton.propTypes = {
authenticated: PropTypes.bool.isRequired,
authenticating: PropTypes.bool.isRequired,
onClick: PropTypes.func.isRequired
};

export default GoogleDriveAuthButton;

I am still working towards understanding how reducers are being used with React Native within googleDriveReducer() as well as tweaking some code in order to connect and retrieve the information from my Google Drive.

by ApolllonDev at April 06, 2019 01:07 AM


Harsh Patel

Release 0.4 – Update

After working on an issue which was more than a “good-first-issue”, I gained so much experience in Marquez project. For release 0.4, I was looking for a similar issue but I couldn’t find any interesting issue even after spending hours. The issues I wanted to work on was either assigned to someone else or fixed already. Some issues were way too hard for me to fix it at this moment. So, I decided to take on one similar issue in Marquez project with which am familiar after contributing to it many times. The issue I’ll be working on if I don’t find any other interesting issue will be writing JUnit tests to increase the coverage.

Issue Link

I’ll be posting the final update of release 0.4 next week. Also, you can check out my previous posts as well.

by hjpatel16 at April 06, 2019 01:04 AM


Yuansheng Lu

Release 0.4 – Status Update

In this week, I continued to work on the project, angular-bootstrap-slider. I am working on the issue:
https://github.com/seiyria/angular-bootstrap-slider/issues/158.

I have already changed the boostrap-slider version of dependency to V10.5.0 and reran the “npm install” to download new feature – “lock-to-ticks”. And then I need to add this new feature of new dependency to my current project. I started to read the official Angular.js documentation learned Angular directive.

The next step is to create an attribute “lock-to-ticks” for my directive and apply dependency’s new feature. Once it’s done, I need to add the slider with “lock-to-ticks” to the test.html page and make sure it works properly.

by luysh0420 at April 06, 2019 12:18 AM

April 05, 2019


Olena Vyshnevska

Release 0.4, First Blog

For the Final release, I have a few projects to work on in mind. The first one is VS Code, and I'm also looking into Filer issues.
Here's the one ticket I'm trying to do now: https://github.com/Microsoft/vscode/issues/71690
It requires adding a border around the vscode window, in order to be able to differentiate vs code from Visual Studio when using both at the same time, and their windows overlap.
In order to set up this project, I used: yarn watch to start TypeScript incremental builder. And then: .\scripts\code.bat  to test the changes.

In case this ticket won't work out, I'm planning to continue working on Vibranium project from my previous release. Issue: https://github.com/kelvinkamau/Vibranium/issues/63

by Olena Vyshnevska (noreply@blogger.com) at April 05, 2019 11:28 PM


Andrew Koung

Release 0.4 Midway update

So I’ve decided to continue working with filerjs and the reason is because I’ve learned so much more about file systems. For this release, I’m attempting to implement lchown(). lchown() gives you the ability to change the GID and UID of symbolic links.

During this release, I’ve learned a lot of topics such as hard/soft links. Though what got my head scratching before i started on issues was what symlinks were. Symlinks is short for symbolic links in which they reference a regular link. A simple way to understand this topic is by thinking of how Windows have executable files. Now the user has the ability to create a shortcut that points to the file. The shortcut is the symbolic link itself and the executable file is the regular link.

Another thing I’ve learned so far is about user identifier(UID) and group identifier(GID) in relation to file nodes, in which these nodes have a specific identifier attached. A file node may belong to a specific user or group, but the identifier starts after 1000, because the first 1000 is reserved for the system.

Now for my current progress, I haven’t started the programming portion yet, but now I have an idea after having a great talk with the professor. The idea is to recreate the method find_node without dereferencing and to change the UID and GID.

That pretty much wraps up my current progress of this release. See you in the next blog!

by Andrew Koung at April 05, 2019 11:07 PM


Volodymyr Klymenko

From writing unit tests to working on the software from Mozilla, Microsoft and Airbnb

Last September, I registered for OSD600 as part of my studies at my school (Seneca College, Toronto), and my journey to the world of Open Source Software began. OSD stands for Open Source Development.

This course introduces students to the technological, social, and pragmatic aspects of developing open source software through direct involvement in large open source projects. Students will learn to use the tools, techniques, and strategies of open source developers. This is a project-based programming course. (from the Course website)

This course had an interesting philosophy and outline that are not really typical to other courses: there were no midterms, final exams or any other tests. Instead, students had to contribute to open source projects, along with learning git essentials, and document it by writing blogs. In my opinion, that’s a great idea as students can build their personal brand by blogging. Also, unlike other courses, students are encouraged to collaborate and work together!

I made my first Pull Request (PR) to the project called filer, which is a POSIX-like file system interface for node.js and browser-based JavaScript, at the end of September, and I wrote my first blog post related to this course:

My first contributions to Open-source World

I add some tests to the filer in that PR. I feel like it was so long ago, but it actually was less than 7 months ago! I’ve grown as an OSS developer so much since that moment, and I’m excited to share my story in this summary blog post 🥳

Hacktoberfest 🎃

Shortly after submitting a pull request to filer, Hacktoberfest started, and I had to submit find five issues and submit five pull requests in 4 weeks 😦 It was quite intimidating for several reasons:

  1. I had to find issues in real projects.
  2. I had to find solutions to those issues in such a short period of time.

It was so different from the classes where you have assignments, list of tasks you need to complete, and you can imagine how your end result might look like.

Fortunately, students can work on any projects they pick. As I’d just started learning Swift last fall, I decided that it was a great opportunity to enhance my skills and learn new things about iOS development + I also had a Plan B, which was to work on JavaScript projects, in case I wouldn’t find a good issue in Swift projects or I would struggle at something.

I ended up participating in the following projects:

  • Ethereum Wallet app (Swift) — added Alamofire library (Swift networking library) and replaced all networking calls with Alamofire API.
  • Algorithms project (Swift) — added graph algorithms.
  • Brave iOS (Swift) — fixed some warnings.
  • Adaptive learning (Java) — refactored code by removing a project module.
  • Mozilla add-ons (React, CSS) — fixed styling issue for a component.

You can find a more detailed summary I wrote on the last day of Hacktoberfest here:

Hacktoberfest 2018 Summary

Mozilla 🔥🦊

After completing Hacktoberfest challenge, I felt much more confident. It was such a boost when my contributions to iOS apps were accepted and merged! I had never built any iOS app at that moment, and my changes were merged into pretty big projects!

In the following two months after Hacktoberfest, I had to deliver 3 contributions that were supposed to be larger. I succeeded in making PRs to iOS apps, so I wanted to continue working on iOS projects. I started exploring available open source options. I was looking at Mozilla’s projects because I had already participated in one of their projects (Add-ons), and I really liked the community there. I found a project called Firefox Focus.

Firefox Focus for iOS devices is a privacy browser with tracking protection and content blocking. (Retrieved from Mozilla)

I had more time to complete these pull requests comparing to Hacktoberfest, so I picked a couple of larger issues there. There was a couple of bugs in the URL bar of the browser, so I started hacking on them. By the way, these issues were actually bugs comparing to the previous one I worked on. Before, I just refactored code, added some new features, or fixed a small styling issue. Here, I had to fix a real bug in such a big app. These contributions involved more effort, debugging and research time. I started discovering Focus codebase and try to write my own code there. It was more difficult, but hard work pays off!

My patches were accepted and merged into the master branch of Firefox Focus! Later, an update popped up on App Store for Firefox Focus, and that update included my bug fixes! It was an amazing feeling contributing to such a big app, which is used by many people.

https://medium.com/media/11f9ba9312a31e373796157c2fc3af51/href

Again, check out my blog posts, which contain more technical details, about my participation in Firefox Focus dev:

Thereafter, I had to select my next issue to work on. I thought about proceeding with Focus, but there weren’t any new issues opened at that moment. Our professor brought up a list of issues in the Firefox related to ESLint coverage of its codebase. I thought that I can get an interesting experience working on Firefox because it’s probably one of the most popular and the most used software in the world!

Firefox was released in 2002. As you can imagine, it is a complicated piece of software with a tremendous amount of code. In 2013, a popular JavaScript linting utility called ESLint was created. Many JavaScript projects started integrating it, and Mozilla was not an exception. However, it was extremely hard to cover all JavaScript code of Firefox, so there are many files that are ignored by ESLint.

My task was to enable ESLint int one of the files in the DOM section of Firefox. The whole process working on this issue differed from my previous experiences. First, I had to use Bugzilla instead of GitHub for communicating with maintainers and discussing the issue. Then, the installation of Firefox code locally was different from just making a fork on GitHub and cloning the repo. I needed to install some additional tools for compiling the code. Also, it was a good opportunity to work with Mercurial in order to clone a repo and submit my patch later, and I found it very similar to GitHub.

Eventually, I submitted my changes, and they were also accepted! I literally had left my mark on Firefox code. It was another big accomplishment in my OSD600 class, and that was a great way to conclude my course.

OSD700

In the winter semester, I had an option to take OSD700 course, which is a second OSD course and includes more advanced contributions. I really enjoyed OSD600, so I registered for OSD700.

I chose Firefox Focus for my first PR because I’d already known it, and I felt like it was a good project to start with. I noticed that the development of Focus was not as active as it used to be in Fall, so I had to pick up issues that were filed some time ago. I sent two PRs to Focus during this term:

  1. I went through the codebase and refactored it by moving magic numbers into a separate file. It was a good exercise which helped me to learn more about the codebase as I intended to do more development on this project in the future.
  2. I added UI tests. I’ve never done testing in iOS apps before, so I learned something new doing this contribution.

Microsoft VSCode

As I mentioned above, the development of this project was not so active, so I decided to look for a new project I can contribute to. I felt confident enough, so I went to large organizations like Microsoft, Facebook, Google, etc.

I stopped at VSCode. I had looked at this project last Fall, but after I saw 4k issues, all my desire was gone. It seemed to me that it was so hard to find a good issue to work on. However, one of my classmates contributed to VSCode, and he shared his strategy on how to find a good issue. The strategy is simple: look at the issues that were filed a long time ago (1 month and longer). I used it, and I found an interesting issue related to an extensions search bar.

The process of installing VSCode locally, fixing the bug, debugging it, submitting PR, and finally, merging it into master branch took almost a month! However, it was a tremendous experience I’d gained during fixing that bug. Also, I was happy about this contribution because millions of developers including me use VSCode almost every day!

If you would like to learn all the technical details, you can read my blog posts:

Lona

Even though I had a good time working on VSCode, I wanted to switch back to Swift development, and I started searching for a new project. Again, I looked at major organizations, and I came across a project called Lona in Airbnb GitHub organization. Lona is a design tool, which lets users create and design components, and then generate code for different platforms like React and Swift. I liked the idea of this project a lot.

I found that there were not many issues filed there, but I saw that there a lot of commits pushed every day, so I reached out to Devin (@dvnabbott), who is the maintainer of this project on Twitter:

Devin was very kind and helpful, and he filed some issues in the repository. I fixed a couple of bugs, and I liked the process of working on Lona so much that I decided to work on it till the end of the semester, and maybe even more in the future! Also, I would like to mark the way that issues are filed there: they have amazing descriptions which help new contributors to start working on it quickly. I have sent four patches to Lona so far, and you can find out more about them in the following posts:

Ukrainian translation of React documentation

The following part was not really a part of my OSD course, however, I believe that OSD classes influenced me a lot, so I would like to share this story.

I was scrolling my Twitter feed, and I came across this tweet:

I develop a lot using React, and I love this library a lot. I wanted to contribute to the React community, and it was a great opportunity to do it, so I applied for it. Shortly after it, the repository for Ukrainian translation was created, and I was assigned to maintain it 🤠

It’s been a new and interesting experience for me because this time, I was not only a contributor but also a maintainer, who is responsible for helping others to start, reviewing their work, and even resolving conflicts. For example, we had two people submitting a translation for the same document, and I solved this issue by taking half of the translation from the first PR and the second half from the other PR.

As of today, we have the following percentage of translated documentation:

I believe that the core documentation will be finished soon. Just 3 documents left. The documentation website is already available online, so if you speak Ukrainian, check it out 😀

React - JavaScript-бібліотека для створення користувацьких інтерфейсів

Summary

Wow! It’s been less than 7 months, and the progress I’ve made is tremendous. I started with writing simple tests in filer, and I ended up with contributing to projects from large companies like Mozilla, Microsoft, Facebook and Airbnb! I learned so much during working on these projects! I met new people around the world just by working together with them on the same thing. Open Source world is amazing, you can learn, get help, meet new people and make your mark in the codebases of the world’s most used software, and it’s all for free! You don’t even need to be in a specific location; you can just work from wherever you’re located. Also, I would like to thank my professor, David Humphrey, who taught me about open source and helped me along my journey. I’m glad that I took these courses; it definitely helped me to grow as a developer, and I will try to keep contributing to Open Source Software in the future.

If you have any questions, feel free to ask them in the comment section, or you can reach out to me on Twitter: @klymenko_v 🙌

by Volodymyr Klymenko / Володимир Клименко at April 05, 2019 08:54 PM


Brandon Wissmann

Pivoting issues

This past week I’ve decided I need to pivot my original idea for issues to tackle. I say this due to the fact that the project seems very focused on accomplishing a specific task and the issue I originally cited is unrelated. Therefore I am going to fix one of the issues that is important to the project at the moment.

This would have to be one of the issues related to the key card. Unfortunately, this is rather hard to test and I believe another possible route for me to go is to fix an issue of medium severity.

The issue I found appears to be a good one. I hope to be able to fix it using git bisect. However, this is not a guarantee as it might have been changed for a reason.

I’ve left a comment saying I will work on this issue to let the maintainers know. Otherwise I believe it will be fixed soon as the project moves quickly.

by Brandon Wissmann at April 05, 2019 07:30 PM


Joshua Jadulco

Momentary Thoughts About Open Source Work

Open Source Work Is An Adventure

Back in September 2018 when I first started doing open source work as I took the open source class DPS909, I only had the bare idea of what open source work is: software that can be worked on by anyone and anywhere in the world, people have to follow certain guidelines, and open source software is a great alternative to proprietary software (i.e. LibreOffice vs Microsoft Office). I started off small – contributing to a really small project and my post detailing my work can be found here. Then Hacktoberfest came in and I dove in to some open source projects to learn more about them. Since I wanted my career to focus on Android mobile development, I decided to look for open source Android apps on GitHub. I found one successfully and to this day I still contribute to it (albeit on an infrequent basis) – and its name is TravelMate. Although at first I found the project daunting, over time I grew comfortable with it as my knowledge of its codebase expanded and my knowledge of Android development also expanded – particularly in terms of debugging, app widgets, UI layouts, documentation, and Error Messages.

 

Over the course of many projects, I’ve encountered various types of projects – projects which have a huge codebase and multiple maintainers (i.e. WordPress for Android, K9-Mail) and projects with medium size codebase and only one maintainer (i.e. TravelMate and SimpleCalendar). From my comfort level of knowledge and skill, I feel more comfortable approaching medium-size codebases because I feel like I can easily make changes to them and not set off a domino effect on the whole project.

 Small Victories

Since them from September 2018, I’ve had 18 PRs created in different projects. I didn’t really have any number of PRs in mind to achieve – I just simply wanted to learn what I could to improve my coding skills while at the same time gaining other skills that I could use. In particular, I wanted to improve my knowledge of Android development.

PRs

As seen here, only 4 out of my 18 PRs have been successfully merged into projects. Most of these PRs are something on that involved Android development. I would say that out of these changes, the PR that involved adding a Clock Widget to TravelMate has been my favourite one so far. It’s one of my most memorable experiences as I’ve learned something new and actually implemented it successfully in TravelMate. I remember working from 9PM to almost 3AM in the morning just to finish that PR and I felt a huge sense of achievement when I finished it.

Downsides

Of course there’s also some downsides to open source work, particularly on Android open source apps. First off, there’s only a really small amount of open source Android apps that are available in GitHub – from my experience alone when searching for open source Android apps to contribute to, the active projects that I saw are somewhere between 10 – 15. Maybe I’m more biased in this perspective because I only picked open source apps with which I feel more comfortable contributing to but still, something can be said about the low amount of open source Android apps.

Another problem of contributing to open source apps is the problem of communication between the contributor and the maintainer. A great example of this is TravelMate – the maintainer of TravelMate has a full time job and lives in India so when I submit a PR, I need to wait a couple of days before it gets reviewed and when I make changes it can take another couple of days. In other words, the progression can be slow.

Future Open Source Work

Would I continue to contribute to the open source Android apps that I’ve contributed to so far? Yes. Should I tackle larger projects more? Yes. Would I prefer working on open source Android apps instead of working on my personal app projects? Preferably no. Open source work is a great adventure but for now I have my goal in one thing only – to create my own app and publish it on Google Play Store and get some revenue from it. I want that goal in mind so that I can become more experienced in all facets of Android development, no matter how many steps it would take.

by joshj9817 at April 05, 2019 07:01 PM


Jatin Kumar

Update on Open Source Contribution: April 05

Hey there folks!

Last month I worked on an issue in AntennaPod. Check out my previous blog post to know more about it.

Project Link

Issue link

Pull Request link

Finally, after multiple commits my PR has been merged.

This Month

This week I worked on Microsoft Calculator.

If you are a Windows person you might have came across Microsoft Calculator.

This is how it used to look before
Now it’s the most powerful calculator application

The application is written in C++

The issue that I chose to work on:

Issue link

I found there were several controls (AppBar, OperatorTextBox and OperandTextBox) that were no longer used and were laying in the codebase for no reason. So my task was to remove those controls and its instances from the source code.

I have already submitted my PR, waiting for their review.

Pull request link

Although it was a code cleaning task, I was introduced to an ancient C++ code. I have to say its well written and maintained. Even the setting up the project was a piece of cake.

Overall, It was a great opportunity for me to work on a Microsoft project.

In upcoming weeks, I will be working and fixing more issue in Open Source projects and definitely will post a blog update about it.

Stay Tuned!

by jatinkumar at April 05, 2019 06:37 PM


Joshua Jadulco

Sometimes it just works | Less is more

Sometimes It Just Works

On my last open source work update, I was interested at working on K9-Mail and targeted a particular Issue. However, there was something weird with it – at times the Issue was able to be replicated but sometimes it wasn’t able to be replicated. To demonstrate this, let’s take a look at the steps to replicate the problem:

  1. The email author has no PGP key setup in the OpenKeychain app.
  2. Compose mail to PGP recipient.
  3. Toggle Encryption to “Encrypt” (green lock symbol)
  4. Hit the “Send” button.

Email author has no PGP key setup and only the recipient(John Smith) has a PGP key setup (same device):

okcconfiguration

Now, we compose an encrypted email to the recipient and attempt to send it:

K9MailWorking

As it can be seen here, the Toast displayed the appropriate error instead of the “Send Error: Null” that’s reported in the Issue. Sometimes I was able to replicate the same Issue with the exact same steps but I can barely capture it because it rarely happens and I’m sure that there’s another extract step involved in it, and even then I can’t really say for sure that this would require fixing. Until another Issue comes up with this kind of problem, I don’t see how or why should I make a PR for this kind of Issue because the error message is properly displaying most of the time.

Therefore, I wanted to move on to another Issue that can be solved.

A Familiar Place

I checked in on TravelMate’s repo and found an Issue where I knew I could actually finish and can be easily replicated. It’s also a simple matter of refactoring code which I have done before too.

The Problem:

OldPermissions_TravelMate

As seen above, when TravelMate first starts up as an app and the user has not logged in yet, it asks for a bunch of permissions. These permissions are necessary for some functionality in the app but it’s not always necessary, therefore it just bogs down the user’s experience of using the app for the first time if they don’t know what to do with the permissions. That is not the worst case though, the worst case is that a privacy-focused user can just deny all these permissions in the app because they think that these permissions aren’t necessary since they haven’t fully tried out the app yet.

Simple Solutions For Less

Since the code for the runtime permissions is already available, what I basically had to do is just move them to other parts of the app that actually need them. From the LoginActivity.java file and moving it to the HotelsActivity.java:

Old Code

private void getRuntimePermissions() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
    if (ContextCompat.checkSelfPermission(MainActivity.this,
            Manifest.permission.CAMERA)
            != PackageManager.PERMISSION_GRANTED) {
                requestPermissions(new String[]{Manifest.permission.CAMERA,
                Manifest.permission.READ_EXTERNAL_STORAGE,
                Manifest.permission.WRITE_EXTERNAL_STORAGE,
                Manifest.permission.BLUETOOTH,
                Manifest.permission.BLUETOOTH_ADMIN,
                Manifest.permission.READ_CONTACTS,
                Manifest.permission.WRITE_CONTACTS,
                Manifest.permission.READ_PHONE_STATE,
                Manifest.permission.WAKE_LOCK,
                Manifest.permission.INTERNET,
                Manifest.permission.ACCESS_NETWORK_STATE,
                Manifest.permission.ACCESS_FINE_LOCATION,
                Manifest.permission.ACCESS_COARSE_LOCATION,
                Manifest.permission.VIBRATE,
            }, 0);
        }
    }
}

New Code

//Get permissions for making calls and locations
private void getPermissions() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        if (ContextCompat.checkSelfPermission(this,
                Manifest.permission.CAMERA)
                != PackageManager.PERMISSION_GRANTED)
                {RequestPermissions(new String[]{
                    Manifest.permission.READ_EXTERNAL_STORAGE,
                    Manifest.permission.WRITE_EXTERNAL_STORAGE,
                    Manifest.permission.READ_CONTACTS,
                    Manifest.permission.WRITE_CONTACTS,
                    Manifest.permission.ACCESS_NETWORK_STATE,
                    Manifest.permission.ACCESS_FINE_LOCATION,
                    Manifest.permission.ACCESS_COARSE_LOCATION,
            }, 0);
        }
    }
}

It’s not much of a coding work, but it’s an honest day’s worth of work that can improve user experience for the app, as can be seen in the GIF below:

Less Is More

 

As shown above, the permissions are now only relegated to being asked when the user selects the ‘Travel’ section of the app because these permissions are actually required to use the features under the Travel section of the app – in this case, possible hotel bookings depending on the user’s location.

by joshj9817 at April 05, 2019 06:21 PM


Julia McGeoghan

Learning that Github Pages Struggles with Certain File Names

Recently I made a new contribution to a project called fast-dna, which included a build script that generated various pages for their documentation site. However, soon after landing the last bit of the script, a new bug appeared in the project’s documentation. Routing to certain pages gave a familiar error.

Testing locally, nothing like this every happened; I’d build the site with the script, load it, and could route to ever page generated. What gives? Obviously it looked like there was a problem with how the project was built into production.

At first I thought the problem was caused by a different file structure in the development and build/production versions of the docsite, since the two are in fact different; however this wasn’t the case.

The error was caused by Jekyll, which Github Pages is deeply integrated with. If you don’t know what Jekyll is, in brief it is a static website generator that uses markup to generate its pages.

But how did Jekyll cause this issue? It’s pretty simple really; it won’t build some types of files or directories that follow some specific formats , namely files/directories that are:

  • used for backup, using ~ , . or #
  • used to contain site content, so they start with an underscore(_ )
  • are excluded in the site configuration

The pages I couldn’t route to, surprise surprise, started with _ . So when the docsite was being built these files were being ignored. When running the site locally it wasn’t using Github Pages, which explains why it was working at that moment.

So at this point the question is; how could an issue like this be fixed? There were literally hundred of these files that had this naming convention, and finding a way to rename them all or change their formatting didn’t seem viable.

Thankfully there are ways to force jekyll to not ignore these types of files. If a .nojekyll or _config.yml file is included in the root project folder, files that start with underscores can be recognized. So for me a _config.yml file with the following is all that’s really needed in this specific scenario.

include:  
- "_*_.html"
- "_*_.*.html"

The doc site was created with something called Docusaurus. This made me a bit nervous at first because with Docusaurus you don’t have full control over your final build folder, so I wasn’t sure if permanently adding something like this to root was even possible. However, it is in fact do-able if a file is added to the website/pages folder, anything there will get built into the root folder of the final build by default.

by Julia McGeoghan at April 05, 2019 04:36 PM


Woosle Park

Release 0.4 – update

Mission Pinball

Currently working on mission pinball just working on installing it properly and figuring out how the entire system works.

Also, I got a reply for my release 0.3 pull request I might have to work on that and fix it in order for it to get merged

Issue

by woosle1234 at April 05, 2019 06:24 AM