DEV Community

loading...
Michael Kohl profile picture

Michael Kohl

I dev @ DEV. Your friendly neighborhood anarcho-cynicalist. ¯\_(ツ)_/¯ and (╯°□°)╯︵ ┻━┻) are my two natural states. Tag mod for #ruby, #fsharp, #ocaml

Education

man pages

Last 250 comments

Improving your Rails mailers with `email_address_with_name`

The canonical reference is RFC 5322 (search for display name)...

7 new features, 51.3 new bugs added 😋, the DEV.TO 👩‍💻👨‍💻 editor [PART DEUX!]

Nice, looking forward to it. I'll give it a try though I'm no...

7 new features, 51.3 new bugs added 😋, the DEV.TO 👩‍💻👨‍💻 editor [PART DEUX!]

It's really just a list of tag names though, no usage instruc...

7 new features, 51.3 new bugs added 😋, the DEV.TO 👩‍💻👨‍💻 editor [PART DEUX!]

I'm not sure if you're using this already or if it helps you ...

Creating PostgreSQL Test Data with SQL, PL/pgSQL, and Python

You may also be interested in the Faker Foreign Data Wrapper ...

Must...keep...positive...

Also, I want to make sure you're aware of our sister communit...

Must...keep...positive...

Please feel free to DM me if you think there's any way I coul...

Must...keep...positive...

Good luck Lisa, you got this!

Terminal tricks from my dotfiles

Yes, this is a nice one. So far I just set it as a local opti...

Best way to turn spare laptop to server? (And turn on 24/7)

Sorry, it was a bit late here when I wrote this. No, I probab...

Best way to turn spare laptop to server? (And turn on 24/7)

50k hits per month That's slightly more than 1rpm, you sh...

SQLite - a developer's best friend

I love SQLite, but its "flexible typing" and type affinity ru...

How I became a professional self-taught developer in Germany while working a full time job

I know a startup founder who preferred math graduates, even i...

One Simple Way To Improve Your Dev.to Experience

there is no auto dark mode to match the device preferences ...

How to get started with Web Development on Windows with the WSL in 2021

Nice writeup! Fun fact, I've been doing all my development fo...

How to get started with Web Development on Windows with the WSL in 2021

Yes, you can, WSL2 has export and import options (maybe versi...

Microsoft Excel is Now Turing Complete

Excel has probably contributed more to the overall economy th...

Book giveaway: Phoenix for Rails Developers

This post is 1.5 years old, this giveaway is long over unfort...

Rails 7 will require Ruby 2.7+

For everyone else wondering: github.com/rails/rails/commit/...

Rails 7 will require Ruby 2.7+

Thanks! I somehow missed this.

Rails 7 will require Ruby 2.7+

Ruby 2.6 should reach EOL by end of March next year (Ruby alw...

Why do we still speak in direct DNS?

I'm sure there are attempts in DNS abstraction I think the...

A Walking Stick and a .vimrc 🌄 ⌨️

it can be so incredibly personal and unique for each user ...

January 29th, 2021: What did you learn this week?

Are there some resources you could share?

🌍 Where Are DEV Users Coming From?

Alas, UUIDs (and other random keys) as primary keys have bad ...

🌍 Where Are DEV Users Coming From?

While the project itself is cool, the potential for username ...

What was your win this week?

This makes me happier than it should, but I finally got my ch...

Advent of Code 2020 Solution Megathread - Day 3: Toboggan Trajectory

Raku, first time I used classes. Alas, the Perl syntax highli...

Advent of Code 2020 Solution Megathread - Day 2: Password Philosophy

Raku again: my @pw = 'aoc-pw.txt'.IO.lines.map: *.split(['...

Advent of Code 2020 Solution Megathread - Day 1: Report Repair

I never manage to find the time for more than a handful of so...

UX Lessons from Big Sur

I'm a bit torn on the UX changes. Especially some of the icon...

Apple Silicon for developers?

I know Alfred is a lot more than an app launcher (I use it wi...

November 5th, 2020: What did you learn this week?

Programming: I continued re-acquainting myself with x86 assem...

Have you ever contributed to DEV?

It's been great seeing your progress with Ruby over the past ...

Have you ever contributed to DEV?

Thanks for your regular contributions, Andrew! They don't sto...

Daily Challenge #299 - Time to Grille!

Ruby allows string interpolation in format strings, which mak...

Hello DEV Community!

Hi Erin, welcome aboard! 🎉

Avoiding the awkward 2 seconds after a Zoom call looking for that end button

A: "You hang up first! 😌" B: "Nooo, you hang up first! 😊" A: ...

What are you looking forward to when the pandemic is over?

I watched the original Iron Man movie (2008) at a theater in ...

What are you looking forward to when the pandemic is over?

You live in a beautiful country though 🤩 I would definitely l...

The DEV Team Is Now The Forem Team 🌱

This is my main motivator for working on Forem, I want back t...

The DEV Team Is Now The Forem Team 🌱

Think of it like this: Wordpress is the underlying software, ...

Daily Challenge #295 - Sort Leaderboards

Ruby, does not modify the passed in array but returns a new o...

What was your win this week?

I moved and this is the view from my terrace now.

How to get better at vim?

Here are some useful resources: vimtutor (see :help vimtut...

How to get better at vim?

I've been using Vim since the early 2000s and if I happen to ...

Daily Challenge #236 - RGB to Hex Conversion

Just for fun in Postgres, with 2 helper functions, clamp8 for...

September 10th, 2020: What did you learn this week?

This week (and the last couple of weeks before) I've been on ...

Ruby 3 - Set Literal

I might as well also say it here, to avoid double-commenting...

Ruby 3 - Set Literal

I do wonder what would happen if we had %s{ 1, 2, 3 } instea...

Ruby 3 - Anonymous Struct

F# recently added anonymous records and they also are great w...

Where do you host your static sites?

Love the idea of mkws! Together with a class-less CSS lib lik...

Where do you host your static sites?

Generally on Netlify.

Showoff your best creation

Most Github stars methodfinder: A Smalltalk like M...

Daily Challenge #281 - Area or Perimeter

A solution in Forth: : area-or-perimeter 2dup = if * else +...

VSCode vs Vim

You shouldn’t need a fork as this will use your regular nvim ...

Daily Challenge #277 - Over the Road

Postscript: GS>/overTheRoad { 2 mul exch sub 1 add } def...

Prime Sieve in (Hopefully) Idiomatic Ruby (And Some Books You Should Read)

Agreed, it's a good book. The problem is that small contrived...

Is anyone planning a full or partial "early retirement" from software development?

I was coding plenty in the second half, but FOSS.

Is anyone planning a full or partial "early retirement" from software development?

It was tongue-in-cheek of course, I read that quote somewhere...

Is anyone planning a full or partial "early retirement" from software development?

First time: 10 months of travel, then self-education (online ...

Adding Webmentions to My Static Hugo Site

Nice, I've been doing something similar for my private blog l...

Make a Ruby gem configurable

Some gems also apply a more DSL-like approach: MyGem.config...

Daily Challenge #270 - Fix String Case

I don’t think efficiency matters much here, but my solution h...

Daily Challenge #270 - Fix String Case

I am only looping once through the string :-) Though at t...

Do you keep a work journal?

A personal Trello board for defined tasks I don't want to fo...

Are you in the GitHub Arctic Code Vault?

Apparently I am. I think it orders the repositories by stars ...

Is anyone planning a full or partial "early retirement" from software development?

I tend to interleave periods of work with periods of non-work...

How do you identify "over-engineering"?

Time to move I'm afraid.

How do you identify "over-engineering"?

Baked right into the word is relativism centered on the spea...

How do you identify "over-engineering"?

If it's not on this flow chart, it's overengineered 😉

NoMethodError: undefined method for nil:NilClass... Explained

if we wanted to very easily by monkeypatching the String cla...

Do you have a "uses" page?

Tbh, I'd rather see more pages adopting humans.txt, as I care...

What our your thoughts on the new Hey email service?

I’m in favor of every product that gets paid for in money and...

Changelog: Status page

atlassian.com/software/statuspage

Rich Draft

??? Profit.

How do you fight boredom in software development?

how do you cope with the tasks that are just booorrrring? ...

Daily Challenge #261 - Diagonal Strings

A simple Nim solution: import algorithm func diagonal*(str...

Daily Challenge #259 - Duplicate Encoder

Since I'm watching NimConf 2020 in the background, a Nim solu...

My Favorite CLI Tools

We seem to have very similar taste in tools, I use almost exa...

Construindo uma API com Deno: Da instalação ao Deploy

It’s fine, I can generally follow and I don’t mind reading in...

Construindo uma API com Deno: Da instalação ao Deploy

Eu não falo bem o português, but I appreciate the Dinosaurs c...

What's your go-to stack these days?

BCHS, what else? 😉

What is my MEML project?

This reminds me a bit of html-template for Racket. Example fr...

June 12th, 2020: What did you learn this week?

Wow! Sounds like there’s not much you haven’t dabbled. Par...

DEV is now Web Monetized

Absolutely, something that becomes an actual open standard wi...

June 12th, 2020: What did you learn this week?

Ah yes, I also used R once as a part of a paid project. 😄 My ...

DEV is now Web Monetized

It's so exciting to see this again and that we support it! I...

June 12th, 2020: What did you learn this week?

I finished the Nim track on Exercism. Apparently I can't ju...

File Order in F# - the most annoying thing for a beginner?

If you're still learning, keep an eye out for the next round ...

What languages and tools do you use that spark joy?

I still have a soft spot for Lua too :-) I mostly used it in ...

How much coffee do you drink?

Probably too much yet never quite enough.

File Order in F# - the most annoying thing for a beginner?

I don't recommend editing the fsproj files by hand. If you us...

VSCode vs Vim

I’m using deoplete.

VSCode vs Vim

Fair points, thanks for taking the time to respond :-) I so...

VSCode vs Vim

I see. Yeah, just brew install universal-ctags and Tagbar and...

VSCode vs Vim

Maybe you can get some inspiration from my NeoVim config: gi...

VSCode vs Vim

Those are great mnemonics 😊 I tend to use the terms from Vim'...

Daily Challenge #250 - Last Digit of a Large Number

Ah yes, somehow I was thinking this would have the same order...

Daily Challenge #250 - Last Digit of a Large Number

digits.first should probably be digits.last, right? This won...

For Empowering Community

As someone who's been online since the days of Gopher and BBS...

VSCode vs Vim

You should try out the NeoVim extension if you haven't yet, i...

VSCode vs Vim

I'm a strong advocate of pairing and Vim is painful to follo...

VSCode vs Vim

Intellisense is my saving grace I'm not a big user of Inte...

VSCode vs Vim

Depending on how many things you have to replace an ex comman...

VSCode vs Vim

Vim is amazingly powerful - but I can't be bothered to keep ...

VSCode vs Vim

My story goes like this: very much in love with Vim in the ea...

Daily Challenge #249 - Incremental Changes

Not much of a challenge here, so I just used a GhostScript RE...

DEV ❤️ Telegram

Thanks for making a great library! 😊

DEV ❤️ Telegram

This was built in about 4-5h while learning the Telegram bot ...

Daily Challenge #248 - Chinese Numerals

I didn't quite get what the deal was with the zero Wikiped...

Should remote workers be paid differently based on location?

One point I don't often see discussed in this context: if sal...

Should remote workers be paid differently based on location?

Not arguing your point, but every primarily remote company I ...

DEV ❤️ Telegram

There's is a PragProg book out since last year: pragprog.com...

DEV ❤️ Telegram

Crystal actually sits at a pretty sweet spot: the expressiven...

Daily Challenge #246 - Readable Specification Pattern

Part of the fun of these challenges is abusing language featu...

DEV ❤️ Telegram

Is this your first time writing something in Crystal Lang? ...

DEV ❤️ Telegram

Good catch, like I said the code still needs some cleaning up...

Daily Challenge #245 - Sort Santa's Reindeer

That concatenates them, yes. You can also do union (arr1 | ar...

Daily Challenge #245 - Sort Santa's Reindeer

Hehe, Ruby can be quite concise at times. A better version wo...

I Just Joined the DEV Team!

Great to have you on the team Gracie! 🎉

Daily Challenge #245 - Sort Santa's Reindeer

Ruby: def sort_reindeer(reindeer) reindeer.sort_by { |r| ...

Daily Challenge #244 - Search for Letters

Ruby can also multiply strings by numbers, which is a bit eas...

Which book has had a lasting impact on you of late?

I guess typical would be 300-500 pages. 80 is definitely on t...

Stop setting the language of your website based on user location

Thanks! Anyway, there are some other sites where you definite...

Stop setting the language of your website based on user location

The worst offenders are the ...sites that don't let you sw...

Which book has had a lasting impact on you of late?

"Zen in the Art of Archery", a nice little book about Zen bud...

Who wants to improve the "pull-to-refresh" on DEV?

It is. A lot of work has gone into this since the beginning o...

Why algebraic effects matter in F#

While it’s using the dry-effects library for Ruby, I wrote th...

Daily Challenge #242 - Expressions Matter

The description says “given three integers”, so based on that...

What is your favorite audiobook about computer technology?

Probably Masters Of Doom. I really wanted to like Ghost in ...

Daily Challenge #242 - Expressions Matter

If the smallest number is 0 this will return 0 though, even i...

What is your pettiest programming-related opinion?

I have many, but since I turned 40 I just preface them with "...

What is your pettiest programming-related opinion?

How many times are we going to "re-implement" the same funct...

What is your pettiest programming-related opinion?

Theoretically speaking you could swap out only the AST genera...

What is your pettiest programming-related opinion?

Password fields do not ever need to be masked. en.wikipedi...

Daily Challenge #242 - Expressions Matter

Alternative Ruby version: def expression_matter(a, b, c) ...

Daily Challenge #241 - Tip Calculator

Some minor suggestions: Move ratings out of the method, no...

What was your win this week?

Telnet? That's never gonna catch on, I'll stay with UUCP than...

What was your win this week?

Me too, and I miss it. BBS, Gopher, FTP, that's how I got sta...

What was your win this week?

I finally got started on my gopher presence, because I miss ...

May 8th, 2020: What did you learn this week?

And that's ok too! 😃

May 8th, 2020: What did you learn this week?

I think this trips up many people at first. At least after th...

Dune in Luv, ReasonML and Dune

It’s also on my blog, with image: citizen428.net/blog/native-...

Daily Challenge #238 - One is the Loneliest Number

Ruby: def lonely_num(n) digits = n.to_s.chars.map(&:t...

Spin With Luv, the Spin Build

Oh, I'm sorry I didn't see this post earlier Alain. I did see...

Dune in Luv, ReasonML and Dune

I hope you don't mind the shameless plug: dev.to/citizen428/...

Dune in Luv, ReasonML and Dune

Hopefully, you won't have to dig too deep on either of them, ...

Hello ~World~ Systems Engineering

What does "Principal x" mean It depends on the company. Ge...

Hello ~World~ Systems Engineering

Good to have you on the team Joe! 🎉

How do you stay motivated?

This goes well with one of my favorite quotes: "Inspiration ...

Monads for free in F#

It feels direct to the user, but what the enumerator yields i...

Monads for free in F#

Generally mapping operations are structure-preserving, but in...

Monads for free in F#

Nice article! :-) A functor is a type that can be "mapped" ...

May 1st, 2020: What did you learn this week?

Installed NixOS on one of my Raspberry Pis. While I had used ...

The Lies of "===" operator

@tomas Because it's part of IEEE 754. Apart from that, it'...

Have you ever had to take an ethical stand while on the job as a developer?

So many times, it's not even funny anymore. Though all of the...

Keeping Your Hands on the Keyboard: A Few Bash and Git Shortcuts

You'll also like ctrl + u and ctrl + k which delete everythin...

What's your favorite software idiom/aphorism?

Ah, yes: programmingisterrible.com/post/139...

What's your favorite software idiom/aphorism?

I'm not sure if it's an idiom or aphorism, but if not it shou...

April 24, 2020: What did you learn this week?

I got myself a Rubik's cube 2 days ago and learned how to sol...

I am being cyberbullied and it's affecting my mental health. This is my personal cure.

You put yourself out there by creating, which will always att...

Daily Challenge #230 - Beeramid

Ruby, using a lazy, infinite enumerator: ROWS = (1..).laz...

7 Vim Tips That Changed My Life (With Demo)

You'll probably like this post: hillelwayne.com/post/interme...

Is TypeScript Really... A Language??

You may enjoy this then: stackbuilders.com/tutorials/reaso...

Is TypeScript Really... A Language??

But soooo many times, the class-based paradigm seems to be...

Daily Challenge #225 - Square'n'Sum

Raku With nothing else to do in lockdown, I made a Raku ve...

Daily Challenge #225 - Square'n'Sum

How about this? squareSum :: [Int] -> Int squareSum = ...

Daily Challenge #225 - Square'n'Sum

A GolfScript solution: {{. *}%{+}*}:ssq; [1 2 2]ssq #=&g...

Daily Challenge #225 - Square'n'Sum

Ruby: def square_sum(arr) arr.sum { |n| n * n } end

Happy Easter from Ruby 2.7.1

Another way to run it is ruby -rirb -e 'IRB.send(:easter_eg...

Daily Challenge #224 - Password Validator

Here's a much simpler version with partial active patterns:...

Daily Challenge #224 - Password Validator

F#, may have had a bit too much fun with this challenge and...

Longtime devs: Have you rekindled your love of coding after losing the spark at any point in your career?

You know how the old saying goes, falling in love is easy, st...

Learn a New Language: Ruby or Go?

I prefer catching exceptions to returning errors. Except...

Learn a New Language: Ruby or Go?

My old site :p He was talking about DEV, which is a Rails ...

Learn a New Language: Ruby or Go?

That's fine, it's been "dying" every year since 2012 and yet ...

Emulating TypeScript union types with ReasonML

Yup, sorry, the string was a mistake, should have been `arr...

Daily Challenge #222 - Parse Bank Account Numbers

F# solution. The problem was badly specified, so here some ...

Emulating TypeScript union types with ReasonML

Try out a typo in the icons definition in my code sample, ...

Emulating TypeScript union types with ReasonML

polyvariants will warn about typos though If you misspel...

Emulating TypeScript union types with ReasonML

This intrigued me, so I dug a bit deeper. OCaml has extensibl...

Quick And Dirty Java Makefile

Suggestion: some of your targets (e.g. clean) could be phon...

Tell us what your top unpopular tech opinion is 😈

Good that we’re using languages without concurrency 😂

Emulating TypeScript union types with ReasonML

This is something Elixir really nailed with external resour...

Sorbet (Ruby type checker) seems really neat!

We had a good talk at our monthly Ruby meetup about it a wh...

Daily Challenge #220 - What Dominates Your Array?

New in 2.7 😊

Daily Challenge #220 - What Dominates Your Array?

Ruby. def dominator(arr) arr.tally.find { |_k, v| v &gt...

Custom keyboard mappings

That's too much even for me 😉 I do like the Vim motion keys...

Tabs v. Spaces: Let’s decide this

Why would press space repeatedly though? Every decent edito...

Are you coding more in your spare time due to COVID—19?

All this is losing a lot of its purpose. I know I'm just...

Are you coding more in your spare time due to COVID—19?

Not really. I already spent a big chunk of my time coding (...

What was your win this week?

This tweet made my day a few days back: ...

How much time should you spend looking something up before asking a question?

Caveat: this answer is for when I'm on my own time. One som...

How much time should you spend looking something up before asking a question?

For me, it's a function of the expected payoff for putting ...

April 3, 2020: What did you learn this week?

During the quasi lockdown here I picked up an old hobby of ...

Daily Challenge #215 - Difference of 2

There's were several Ruby solutions already, so I tried to ...

Daily Challenge #215 - Difference of 2

You mentioned in a recent comment that you're liearning Rub...

Welcoming Arit Amana to the DEV Team ✨

Great to have you on the team, Arit! 🎉

Custom keyboard mappings

Hehe. The human mind is fascinating, after about an afterno...

Custom keyboard mappings

So far I have only mapped the WIN-key on my mechanical key...

Custom keyboard mappings

Go to ke-complex-modifications.pqrs.org. Search for "Modern...

Buying a game console in 2020

I have a PS4 and a Switch. This combination suits me fine, ...

What is your Monday morning routine?

Monday morning is the time of the week where I do all my tr...

Programming Resources for Kids

Thanks for the offer :-) My DEV connect is open, please mes...

Programming Resources for Kids

I made a whole website for that: happynerds.net

Mar. 27, 2020: What did you learn this week?

There's also Grid Critters by Dave of Flexbox Zombies fame....

Daily Challenge #213 - Are they the "same"?

Good point about the set, sloppy reading on my part.

cURL wrapper around RubyGems.org API

Very nice project @daviducolo ! For people who like me hav...

Daily Challenge #213 - Are they the "same"?

Ruby: def comp(a, b) return false if a.nil? || b.nil? ...

Daily Challenge #212 - DNA to RNA

OCaml: let dna_to_rna = String.map ~f:(function | 'T' -&g...

Daily Challenge #210 - Separate Capitalization

The split to rows + window function approach is 🥰

What is Time to First Byte (TTFB)?

For many of us the real issue is “time to first bite”, i.e....

Daily Challenge #210 - Separate Capitalization

Here's a fun little OCaml version: open Base let capital...

Functional Programming in Rust

“mostly” is the keyword here though. It’s why IO in OCaml i...

Functional Programming in Rust

An immediate question is "Why Functional programming in Rust...

Functional Programming in Rust

OCaml itself is a purely functional language OCaml isn't a...

Daily Challenge #209 - Roman Numerals

Not a solution to this challenge, but I always loved the fa...

This is my first post

Hi Jordan. It's possible to save posts as drafts in case yo...

Setting Up A Fresh Ruby Project

I find the easiest way to start a new Ruby project is bundler...

Daily Challenge #208 - Delete Occurrences of an Element

Ruby def delete_nth(arr, max) counts = Hash.new(0) ar...

mycontribution - View Your Contribution Graph From the Terminal

Glad it helped, feel free to just push it.

mycontribution - View Your Contribution Graph From the Terminal

The only problem is that I need to reorder the months ever...

What weekend coding are you doing these days?

I would love to see a post about that here on DEV!

What weekend coding are you doing these days?

My ray tracer in F# (though that's been a bit on the back ...

What weekend coding are you doing these days?

Don't work too much on the weekends 😃

Daily Challenge #205 - Consonant String Value

Also made an OCaml version: let vowels = [ 'a'; 'e'; 'i';...

Daily Challenge #205 - Consonant String Value

This was fun, Ruby solution: VOWELS = /[aeiou]/ def solv...

The Future of the Terminal

99.9% of everything people go on about as selling points f...

The Future of the Terminal

do not get me started on the autocompletion. This is somet...

Lessons learned and notes from my first ReasonML/ReasonReact app

Nice project! You could try turning it into a Revery app fo...

What was your win this week?

Also finally had the really last session in a dental treatm...

What was your win this week?

Finished my first 2 months at DEV and it couldn’t have been...

Ben++

Ben, if you need any help with either Ruby, Rails or German...

Daily Challenge #201 - Complete the Pattern

Ruby: def pattern(n) return " " if n < 1 (1..n).ma...

How did YOU learn Ruby?

For me, it basically went like this: Official docs Poigna...

Rails 6 to include new Action Text framework

Alas I haven't yet had the opportunity to work with Rails 6...

Daily Challenge #199 - List of All Rationals

Ruby, with a couple of twists: No binary tree, it didn't ...

Bash Error Handling with Trap

Hm, this makes me wonder if I should do a follow-up post on...

Daily Challenge #194 - Spread Number

Golfscript: {,{1+}%}:spread; Usage: 5 spread Or...

Daily Challenge #194 - Spread Number

Nice, and kudos for typing it out on a phone 😀

Understanding Ruby's block/proc parsing

Great to also see you on here, Penelope :-) The link to Rub...

How do APIs work?

I'm sure you'll get better at it! 😃 For us, it was less abo...

How do APIs work?

In one of the companies I worked for we had an interview qu...

Daily Challenge #193 - What's the Real Floor?

ReasonML solution. The challenge didn't really specify what...

The HTTP Status Codes You Need to Know

Someone on Twitter once summarized it along these lines and I...

loading...