CS Degrees Are Mostly Just Signaling - An Interview With Economist Bryan Caplan
9 hours ago, devto

"The main thing I'd say about computer science is that [programmers] have a self-concept of being totally skills-driven, but if you actually look at employment in computer science, that's not how it works. Degrees from leading schools really do seem to matter. They really do seem to open doors." In his controversial book, The Case Against Education, Dr. Bryan Caplan, Professor of Economics at George Mason University, uses statistical analysis to argue that our eduction system is a big wast...

Which Colors Look Good on Black and White?
11 hours ago, devto

Imagine you have to find a color that looks good both on black and white. By "looking good" I mean conforming at least WCAG AA Contrast (Minimum), which is a ratio of 4.5:1. tl;dr: Scroll to the end to get the list of colors So how is color contrast ratio calculated? The WCAG contrast ratio definition says: contrast ratio (L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter of the colors, and L2 is the relative luminance of the darker of the colors. NOTE Contrast...

Passing strings from C++ to JavaScript in Web Assembly
11 hours ago, devto

I'm moving right along with my experiments of getting the messaging stack of my wireless LED control system running in Node.js via Web Assembly (WASM for short). I'm now ready to start integrating the stack into a Node.js library. The very first thing I decided to wire up was some logging functionality. This meant passing strings from C++ to JavaScript. Sounds straightfoward, right? I thought so until I spent a day and a half struggling to get it to work 😅. The Scenario You can only pass n...

Learn... a statically typed language
12 hours ago, devto

Most people's first programming language is a dynamically typed, interpreted language - JavaScript, Python or Ruby. These are excellent languages to learn programming with - but there's a separate category of languages in widespred use: statically typed, compiled languages - C, Go, Java, C# and many others. This article will try to explain the difference between the two language categories, look at their advantages and disadvantages, and then consider what would be a good choice of statically ty...

The Impossible Bar of a Professional
13 hours ago, devto

The deadline is approaching and there is still so much to do. Workdays get longer, the rigor that normally applied to design and testing begin to slide in favor of cranking out more features. The technical debt card starts getting swiped. A feature shows up for delivery, something about it seems a little off. It seems like the feature could be used for something a little shady. Maybe it gets a little more money from customers. Maybe it makes it harder for customers to leave. Maybe it extracts ma...

Politeness or Bluntness in Code Review? Settling the Matter Once and for All
14 hours ago, devto

These days I make a living producing content (or, increasingly, running a content operation).  As a result, social media and blogs have become more of a broadcast operation for me than a source of information.  Still, I had occasion recently to meander out of my bubble and observe a debate about code review etiquette. The Code Review Etiquette Conundrum Here are the two sides of that debate, paraphrased in my best attempt to inject no subjective bias. Code reviews can tend toward depressing and...

Using npm's `ls` command for Fun and Insight
14 hours ago, devto

One of my biggest problems with JavaScript and Node.js dependency trees is that it's... never been super easy to understand what you've got and what you can do to remediate. I've been exploring the npm ls API a bit more recently, and wanted to share some of the things I've found that I wish I'd known about over the last few years! An Introduction to npm ls If you're not familiar with npm ls, it's a command available with the npm CLI that will list dependencies that have been installed to n...

Increasing Productivity by Reducing Tools
16 hours ago, devto

Cover image from Unsplash Pomodoro, kanban, Basecamp, bullet journals... there's no end to the number of ways to get organized. The more organized you are, naturally the more productive you'll be, right? I've tried all of those methods and more, but I felt like I was spinning my wheels, setting up in-depth projects in To-Doist, moving things down the Trello board, automating Github issues, but I was still feeling stuck and upset like I hadn't gotten anything done at the end of the day. It was ...

HTML Emails 101 For Web Developers
17 hours ago, devto

Email development and design is not easy, as email client suppliers have not been nearly as progressive as web browser suppliers are in implementing new standards. This article gives some insight into building and sending email. If you are into web development, it’s likely that coding emails will be a job that you get asked to do at some stage in your career. Coding emails in HTML is however old-fashioned and harks back to the days when developers called themselves webmasters while using tables,...

Is it just me or are we in a low-hype phase?
17 hours ago, devto

Software goes through a lot of hype cycles: New frameworks, NoSQL, Blockchain, etc. But it seems to me like we’re in a period without so much hype in general, which is nice. There’s some hype around Typescript in the JS community, but given that TS is a maturing technology, it doesn’t quite feel the same. There’s still ML hype but it seems to have settled down. Same with containers. JAMstack is hyped right now, but it doesn’t seem overly hyped per se. The waters seem relatively calm, unless I’m ...

Using The Chrome Developer Tools
18 hours ago, devto

Every developer needs to know how to use the developer tools in their browser of choice regardless of which browser it is. They all have the same basic functionality so once you know how to use the dev tools in one browser you can use them in all the browsers. Nobody really talks about the different tabs in the developer tools. It's one of those things you're expected to know how to use or just figure it out. I'm going to at least give you a basic explanation of what the tabs are and when you sh...

Installing MongoDB for GraphQL
18 hours ago, devto

A short tutorial by my colleague Artur on how to set up MongoDB with GraphQL. Install MongoDB with Homebrew First, you need to install a Homebrew. To do it go to Visual Code Studio and run this line from Brew.sh: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Now you should have your Homebrew installed. If you had it already installed, we suggest to do a brew update before proceeding, then you can install MongoDB: $ brew update $ brew i...

Function/Method look up in Elixir/Ruby
19 hours ago, devto

So to preface, I'm a Ruby dev learning Elixir. I love to compare what I'm learning in Elixir back to what I know in Ruby, as I think that really strengthens my understanding of both languages. Today, I want to talk about function/method look up. This article was prompted when I was learning about GenServer through PragmaticStudio's course (I highly recommend it), and they mentioned that GenServer can inject default implementations of functions if you do not define them manually. These default fu...

Securing environment variables with lastpass
19 hours ago, devto

One thing I've struggled with in the past is where to put your secret tokens that you need for accessing an API. If you stick it in a .env file then anyone with access to your machine will be able to read it. If you paste it into your shell then it will appear in your shell's history. Yes you can use pbpaste but then you need to have the token somewhere else to copy before you paste it. I think I've stumbled onto the best way to solve this - the lastpass cli and a script for loading the content ...

Redux in 27 lines
20 hours ago, devto

Redux has become the defacto standard for state management in React. It's a great tool for handling global state, and its sheer popularity means you'll probably want to learn it at some point. Redux isn't the easiest concept to learn though. Even though the docs are good (and are being rewritten to be even better), it's often hard to understand the concept of Redux' uni-directional data flow, dispatching, reducing, actions and what have you. I struggled with it myself, when I first came across ...

A First Attempt at Making Art with Code
1 day ago, devto

To follow up on my first blog post, I wanted to learn about how to actually produce some sort of visual arts through a coding language. After doing some research on the subject, I discovered a program called Processing, which allows its users to do exactly that. This is by no means an in-depth tutorial, but rather my experience exploring this topic. What is Processing? Processing is an open-source software program created by MIT graduate students, Ben Fry and Casey Reas, initially designed a...

Using `Hash#fetch` in Ruby for better nil handling
1 day ago, devto

Using Hash#fetch in Ruby for better nil handling Pulling values out of a Hash in Ruby is simple with the [] method, but problems can occur when the value you’re looking up isn’t there. This can result in cumbersome nil checks, or our absolute favourite error Undefined method for nil:NilClass. Let’s look at an example of a classifieds site that sorts its listings when displaying them for the user, and some of the ways we can use Hash#fetch to proactively handle those nils before they happ...

What does a dev's personal website need to include?
1 day ago, devto

I have a background in graphic design, but have semi-recently (over the past ~3 years) career shifted to a point where my current title is Front-end Dev & UI Designer. However, my personal website hasn't quite caught up with that change - funny how it doesn't update itself, right? It's long overdue for an update and I really want it to reflect my current skillset. I'm not looking to job hunt at the moment (if that affects your recommendations), but I do use my site a fair bit for networking an...

What's your DJ name?
1 day ago, devto

Just a fun thread I'm putting out here while on vacation. Your DJ name is DJ plus the last method or function you used/wrote. Nick Taylor @nickytonline @ken_wheeler Your DJ name is DJ plus the last method or function you used/wrote. I´ll start... I'm DJ describe. 17:24 PM - 19 Mar 2019 11 They call me DJ describe Feel free to reply here and/or to the Twitter thread....

A Complete Beginner's Guide to Vue
1 day ago, devto

Vue.js is a frontend framework that is optimized for progressive integration. That means you can have a large app with only a couple Vue components integrated -- or you could start from scratch and work completely within the Vue ecosystem. Another thing that sets Vue apart is the lower learning curve than a lot of frameworks. Instead of having to understand complex topics, if you know HTML, CSS, and JavaScript, you're already pretty close! Like any framework, it adds a structure and utilities to...

Next