Hacktoberfest Has Finished. Thanks to All Those Who Took Part!

Ben Halpern - Nov 1 '19 - - Dev Community

Another great Hacktoberfest is concluded. Jump to the bottom of this post for important info about profile badges.

This was the first time that DEV got to be co-presenters of the event. It was great to work with DigitalOcean to make the event as inclusive and community-oriented as possible.

Contributing to open source is a tremendous chance to learn, meet new people and challenge one's self. It's also such an important part of maintaining accessibility to the most powerful software in the world. We sometimes take for granted that anyone can use some of the most remarkable software ever created. This was not always the case, and might not always be the case if we don't sustain this environment.

Open source is only possible because we get together and do it. No technology endeavor is a universal good, but open source is an area where a lot of good can happen if the right people get involved. We're so happy to pushing the best parts of open source.

This Hacktoberfest, the DEV repo saw 500 pull requests opened in the month. We merged 276 of them, and continue to work through a backlog of non-merged pull requests. Of course, some were closed along the way for one reason or another and those PRs were still very much appreciated.

The DEV Team will be publishing an update on our roadmap towards providing this platform as re-usable community-building software which we hope will eventually empower thousands of positive, constructive communities across the web.

Straightforward pull requests like this one march us towards the goal...

Add ability to set favicon through environment variable #4665

What type of PR is this? (check all applicable)

  • [ ] Refactor
  • [x] Feature
  • [ ] Bug Fix
  • [ ] Documentation Update

Description

For generalization of the platform, technical administrators would now be able to provide a URL to a custom favicon of their choice.

Related Tickets & Documents

Resolves #4659

Added to documentation?

  • [ ] docs.dev.to
  • [ ] readme
  • [x] no documentation needed

Thanks to @nadiyaka for making that happen.

Another small pull request I really liked was this one which adds a custom focus outline to the site's main search bar, which improves accessibility and design. Only a couple new lines of code and we have brand new functionality.

Adds border styling for homepage search bar on focus #4668

What type of PR is this? (check all applicable)

  • [ ] Refactor
  • [x] Feature
  • [ ] Bug Fix
  • [ ] Documentation Update

Description

As described in #4663, the homepage search bar should be styled when it's focused in order to better indicate that fact. The example in the issue suggests using a different background color, however i want to propose a solution where we use the border for on focus styling. This i think is more in line with the default browser styling and the styling found in many websites (so it's a pattern familiar to users). I used the same color used in the border for the nav controls. Screenshots below.

Related Tickets & Documents

#4663

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

  • Default Theme: Oct-30-2019 22-23-08

  • Other Themes:

Screenshot 2019-10-31 at 11 57 48

Screenshot 2019-10-31 at 11 59 28

Screenshot 2019-10-31 at 12 00 15

Screenshot 2019-10-31 at 12 02 16

Added to documentation?

  • [ ] docs.dev.to
  • [ ] readme
  • [x] no documentation needed

[optional] What gif best describes this PR or how it makes you feel?

rainbox

Thanks to @emi_codes for that one.

Of course, these are only a couple of the 276 merged pull requests this month, but we have plenty more to do.

One new issue ripe for many contributions is this project from our team member @molly_struve.

Move All Cache Keys From Memcache to Redis #4670

Why We Are Moving To Redis

Memcache is a bit of a black box when it comes to caching. It is very hard to tell what is in it and how we are using it. For this reason, we have chosen to switch to using Redis for our application cache. Redis will allow us more insight into how we are using the cache and give us more control over our cache keys. It also has nice features such as background deletion and Lua scripts to handle complicated logic. Plus, if we ever want to use a worker/job service such as Sidekiq it can act as a datastore for that.

Strategy For Moving Keys

In order to move to Redis, we will be doing it one key at the time for the most part. This will ensure that a large cold cache doesn't slow things down. This will also help us to evaluate how we are using the cache and ensure that each use is still needed.

In this PR I set up a second cache store RedisRailsCache that behaves just like Rails.cache but instead points to Redis. The goal will be to replace all Rails.cache calls with RedisRailsCache and then eventually switch Rails.cache to point at Redis.

How You Can Help!

There are a lot of cache keys that need to be moved and I would rather move them one by one to minimize risk which is why I would love help with this project. Feel free to grab a cache key and roll it over to Redis!

Considerations for moving a key

These are just a general guide to get you thinking as you are writing the code. If you are unsure about any of these, open a PR and let the DEV core team weigh-in. Feel free to tag me(mstruve) or the SRE team in your PR when you open it!

  • Can this cache safely become cold?
  • Does this cache key make sense? Is there a better/more clearer one?
  • Should this be a cache at all? There might be places where we can live without a cache and simply removing it might be the best move rather than switching it to Redis.
  • Does the current expiration make sense?

UPDATE!!!

When moving any keys with a timestamp in them, can you please reformat the timestamp to use .rfc3339 so we dont have awkward spaces in our cache keys. Please and THANK YOU!

Example PRs

Moving Keys: https://github.com/thepracticaldev/dev.to/pull/4684 https://github.com/thepracticaldev/dev.to/pull/4690 (note there is a corresponding delete command!) Removing Keys: https://github.com/thepracticaldev/dev.to/pull/4689

If you are looking for more ways to contribute to DEV, that one has lots of surface area.

Badges Coming

Hacktoberfest Badge

Participation in Hacktoberfest 2019 will result in DEV profile badges! These will ship as soon as the waiting period for pull request validation is over in a few days. If you authenticated to DEV via Twitter, you need to add GitHub authentication as well in your settings in order to get credit for your participation.

I repeat: You need to add GitHub authentication to your profile in your settings in order to get your participation badge.

Of course, if you participated in Hacktoberfest and are not yet a registered DEV member, sign up with GitHub authentication. 😄

Happy coding!

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .