I have written several large projects using Ruby in the console including an application to manage the robotic delivery of parts to a production line, controlling PLC's based on database values in a steel manufacturing plant, and of course, a myriad of micro-services all still running out in the wild. On a personal note, I have built a ruby based weather station (using a raspberry pi and a Sparkfun sensor kit) that uploads the current conditions at our flying field to the club's website. Also, I write various console utilities to help me do my work during the day. I enjoy writing Ruby, it is such a versatile language.
Wow Mike, that sounds very impressive. Just goes to show how little I know the language can do at this beginner stage.
Regarding your weather station, that sounds very creative. How long did it take you to work on it? How were you even able to begin the thought process of creating something so elaborate?
Super curious stuff. Thanks for sharing.
The Raspberry Pi has a bus that you can get the data from the sensors easily. Once you get that worked out it's just a matter of dealing with the data (in this case writing it out to a JSON file that gets uploaded every 15 minutes. It actually was a fairly simple application to write. There are several gems out there that help you deal with the bus and FTPing. Been toying with the idea of making the application open source but have not had much time to get it all cleaned up and optimized. My advice for finding a project you can practice your Ruby skills with is to look for problems around the house, school, or job that you can solve with automation and dig in!
Ruby is my go-to language anytime I need to just write some code to do something — perhaps cleaning up some messy data and output a CSV. Or running some quick stats on my bank transactions for the month or year. Or chaining a bunch of other things to get something done. I love Ruby's expressive syntax (which makes it fun to work with) and extensive built-in library (unlike Node, which means I don't need to install packages and learn how some library works to get something done).
You sound like one of those guys who can solve problems easily. These are some awesome things you can do!
It almost makes me want a book similar to Automate the Boring Stuff with Python but for Ruby... Any chance you know something like that Feifan?
Oh wow! I hadn't heard of that book until now, but it seems really cool. I don't know of any books like that for Ruby, although I could be convinced to write some stuff in that direction given an audience. For example, I was trying to find something in my iMessages history a few months ago, so I created a tool that made it easier than scrolling through the Messages app and wrote about it: feifan.blog/2018/02/19/viewing-ime...
I'm geniunely curious about the first half of your response, because we all live in our heads and perceive the world differently — in your experience, do you think you sometimes have trouble solving (code-related) problems? Or maybe you don't see a problem that you think is solvable with a script?
You guys take a look at "Wicked Cool Ruby Scripts" by Steve Pugh. It has some great examples of small Ruby programs that solve day to day problems.
It was a great book in getting me to use Ruby in my day to day tasks also like Feifan does.
I wrote my own testing library: github.com/nhh/spectr for fun! 😁 and also a auto reloading nginx: github.com/nhh/skipper Ruby is awesome in all its little things, good project fits are command line tools, or api scripts. Its object oriented so you can fairly handle medium complexity.
A website scraper :-) it’s something you might need soon or later even in web development. It’s also a good exercise to deal with paginations. Good luck for you bootcamp!
Yes, I tried learning a bit today. I found a few youtube tutorials on how to create a scraper, but mostly for Python. Any chance you know a good resource to learn with Ruby?
Thanks! I think I'll need it.
I’m afraid but I don’t know any resources except books about ruby in general.
For the scraper, start with pencil and paper to split the logic in steps, then google to find out how to do that step.
Use Nokogiri ruby gem to parse html pages ;-)
Here you go...
Web Scraping with Ruby and Nokogiri for Beginners
Just a simple Google search for "Web scraping with Ruby" turned up many resources.
I will be offline for this week, next week I’ll try to remember to send you some scraper I’ve made
I've used Ruby extensively for automated testing:
Thanks for the links!
I created a web crawler for crawling for static content to CSV for easier site migrations.
Oh, that sounds wonderful. Yes, I should give Sinatra a look. I thought it was like a mini Rails, friendly for beginners I'd imagine.
I enjoyed the video you shared, thank you.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.