DEV Community

Discussion on: Why do you love working with your programming language?

Collapse
 
ben profile image
Ben Halpern

The Ruby repl that has long shipped with Macs is a real pleasure to use.

Often if I just need to do a thing, I type irb (which stands for Interactive Ruby) into my terminal and then I'm cooking with gas. And by "do a thing", I mean coding to solve a quick problem.

I need to add some numbers together? irb 2332 + 32312 + 3233
I need to count the characters in some text? irb "some text".count
I need to capitalize some text? irb "some text".upcase"

There are a lot of apps which each solve problems that are actually most easily solved with a really basic programming language like Ruby and irb tends to make it simple enough that it's the tool of choice a lot of the time.

Collapse
 
downey profile image
Tim Downey

+1 to this!

If I'm given logs with UNIX Timestamps I'll often toss them into IRB to convert.

irb(main):005:0> Time.at(1593383150)
=> 2020-06-28 15:25:50 -0700

I don't use Ruby as much anymore, but it's still my go to for things like this! Thanks Ruby. 😊

Collapse
 
jonoyeong profile image
Jonathan Yeong

Yesss! Irb ftw. It's so easy to load up something and test a piece of code. I love using it to run test cases on the spot. It gives me a much better and faster feedback loop then trying to go through a web browser. Or wait for tests to pass.