Avatar of Weverton Timoteo

Weverton Timoteo

CTO at SourceLevel
CTO at SourceLevel·

Using an inclusive language is crucial for fostering a diverse culture. Git has changed the naming conventions to be more language-inclusive, and so you should change. Our development tools, like GitHub and GitLab, already supports the change.

SourceLevel deals very nicely with repositories that changed the master branch to a more appropriate word. Besides, you can use the grep linter the look for exclusive terms contained in the source code.

As the inclusive language gap may happen in other aspects of our lives, have you already thought about them?

READ MORE
Git, Linters and SourceLevel: how tools enable a more inclusive language and diverse culture – SourceLevel (sourcelevel.io)
15 upvotes·5 comments·841.3K views
Tracy Loisel
Tracy Loisel
·
July 31st 2020 at 1:30PM

First, I thought it was too much. After reading your article, it makes sense ! thank you

·
Reply
Weverton Timoteo
Weverton Timoteo
·
July 31st 2020 at 7:37PM

Yeah! I felt the same when I saw this for the first time, then I kept reading more about inclusive language and it changed the way I communicate through code and in other aspects of my life.

·
Reply
Ajay M
Ajay M
·
August 2nd 2020 at 5:42PM

Please don't get offended but I completely disagree with these recent changes.

And after seeing these posts, I think I'm using this as a platform to rant and I already apologise for that.

I don't care what terminologies you're using in your code, if it makes sense to put it there and it works then you're more than welcome but please don't go changing the standards which are been there for so many years.

This whole idea of changing names is stupid, only people who don't have much to do have time to start a drama over these things.

Why don't pianist are going the same way? Cause they're busy practising their butt off with master pieces. They don't have time to go over the thoughts like "Oh, if I call it black will it offend others" "I can't call it a minor key"

People getting offended by just "words" not actual meaning behind what the person really wants to convey is simply stupid.

·
Reply
Weverton Timoteo
Weverton Timoteo
·
August 3rd 2020 at 2:06PM

Hi Ajay, you're free to disagree! It's fine! But I'd recommend to always keep looking for better terminologies, usually, the people that didn't get offended cannot see how this is important.

If someone got offended and it's saying that these terminologies can be better, why not?

People are changing all the time, I see this as an opportunity to keep evolving as a developer and person and start communicating better with my teammates.

·
Reply
Ajay M
Ajay M
·
August 3rd 2020 at 2:17PM

I understand that if something makes someone uncomfortable in work environment then it should be pointed out and be changed if required.

I just can't wrap my head around why or how someone can just get offended by mere use of word "black", "white", "master/slave" while others are busy with their programs cause it is not working without even leaving anything on error log (elasticsearch that's for you!)

·
Reply
CTO at SourceLevel·

Do you review your Pull/Merge Request before assigning Reviewers?

If you work in a team opening a Pull Request (or Merge Request) looks appropriate. However, have you ever thought about opening a Pull/Merge Request when working by yourself? Here's a checklist of things you can review in your own:

  • Pick the correct target branch
  • Make Drafts explicit
  • Name things properly
  • Ask help for tools
  • Remove the noise
  • Fetch necessary data
  • Understand Mergeability
  • Pass the message
  • Add screenshots
  • Be found in the future
  • Comment inline in your changes

Read the blog post for more detailed explanation for each item :D

What else do you review before asking for code review?

READ MORE
10 items to check before assigning a Pull Request to someone - Plus a BONUS – SourceLevel (sourcelevel.io)
14 upvotes·1.1M views
CTO at SourceLevel·

To communicate isn’t just getting rid of syntax errors and making code work. The code should communicate ideas to people through a programming language that computers can also understand.

You should adopt semantic variables, classes, modules, and methods names. For instance, in Ruby, we avoid using particular prefixes such as is_paid, get_name and set_name. In their places, we use directly paid?, name, and name=.

My advice is to use idiomatic and features that the programming language you use offers to you whenever possible, and figure out ways to better pass the message.

Why wouldn’t we be worried about semantics, typos, and styles? We should care for the quality of our code, and the many concepts that define it. You can start by using a linter to collect some issues from your codebase automatically.

READ MORE
How to Improve Your Communication Skills on Code Reviews in 8 Bullets – SourceLevel (sourcelevel.io)
13 upvotes·95K views
CTO at SourceLevel·

One of the magic tricks git performs is the ability to rewrite log history. You can do it in many ways, but git rebase -i is the one I most use. With this command, It’s possible to switch commits order, remove a commit, squash two or more commits, or edit, for instance.

It’s particularly useful to run it before opening a pull request. It allows developers to “clean up” the mess and organize commits before submitting to review. If you follow the practice 3 and 4, then the list of commits should look very similar to a task list. It should reveal the rationale you had, telling the story of how you end up with that final code.

READ MORE
7 Git Best Practices to Start Using in Your Next Commit – SourceLevel (sourcelevel.io)
9 upvotes·988.3K views
CTO at SourceLevel·
Shared a protip
on
RailsRailsRubyRuby
at
()

12 Ruby Gems We use at SourceLevel and Why:

Text Handling & Formatting

We are heavy Markdown users! We produce internal documentation in Markdown. The docs page is a static site entirely written in it (and built with Middleman).

In the main app, we use markerb to parse markdown content and convert it to HTML. Comments to Github, issue explanations and repository badges are examples of markdown usage. Although its repository is archived and doesn’t accept contributions anymore, it does a pretty good job. It works with both kramdown and redcarpet. We chose redcapet as our processor.

Another useful gem is charlock_holmes. As accurate as Sir Arthur’s character Sherlock Holmes, this gem detects character encoding for given files or chunks of text. Under the hood, charlock_holmes benefits from the set of libraries from ICU.

Database & Storage

We love PostgreSQL! It is reliable, open-source and has lots of functionalities that make it attractive. The ability to create materialized views is one of them.

Working with views in Rails is kind of messy. That’s why we added scenic to the SourceLevel main app. This gem adds methods to ActiveRecord::Migration that allow managing views in migrations.

We use materialized views to scope content. If you don’t know what it is, here it goes: it’s a SQL query whose results work as stored in a regular table. Long-running queries or segmented results can be fetched from appropriate views reducing both time and code complexity.

pghero gem, besides the ability to kill them if you need, also ships with a UI for you to monitor other performance indicators.

Another essential dependency is dalli. It does an incredibly good job of storing and retrieving memcached records. It’s thread-safe and allows us to run Rails.cache smoothly throughout the codebase.

Read more in our blog post :)

READ MORE
12 Ruby Gems We use at SourceLevel and Why – SourceLevel (sourcelevel.io)
7 upvotes·4.7K views
CTO at SourceLevel·

I find myself struggling trying to use a specific minified CSS file under node_modules for Milligram in Phoenix Framework using Webpack. First I thought that I need to define a resolve entry in my webpack.config.js as described in css-loader docs.

Then, I've discovered that I can simply use this Webpack notation in my manifest file (app.scss):

@import '~milligram/dist/milligram.min';

As described in docs:

To import assets from a node_modules path (include resolve.modules) and for alias, prefix it with a ~

Note that if you have other Webpack loaders, it will expand your CSS file in development mode.

READ MORE
3 upvotes·59.6K views