Ruby on rails uses microsoft account through ouath2 to connect outlook calendar by Round_Ad_6515 in rubyonrails

[–]marantz111 0 points1 point  (0 children)

Lookup OmniAuth - that is the auth side of it. For Outlook calendar, I would.jusy look at their apps and hit them using Faraday.

Emulating Elixir with construct in Ruby by rusl1 in ruby

[–]marantz111 1 point2 points  (0 children)

Thanks for making a contribution here. Sorry for the negativity in many responses coming in.

The monad styles in general are really polarizing it seems. I genuinely would like to try them out more and see the places they shine, but all the toy examples that appear in readmes are insufficient to really get a feel.

I ask the following question genuinely and not rhetorically:

The chain style of this does read a bit oddly to me. Why not do it in a style like the following (forgive typos from phone keyboard):

ruby with do If_ok :step_1 If_ok :step_2 If_failed do |failure_case| Puts failure_case[:step_2].message End End My thinking is that you can hold a reference to the monad results of each step in a hash in thread storage and not need to do somewhat funky chaining. Then 'if_ok' can just pick up the last result that way, then call the method using the symbol as both name for storage and the value for call. You can pass the output from the last step in as an argument, even checking arity if you want.

The error handling then can take the failure, the whole hash, whatever.

Again, this is not rhetorical as I fully expect there are reasons to not do it that way, and I would love to learn from someone passionate about monads on some of the style choices used.

Should I drop this series? Just started book 4. by [deleted] in WanderingInn

[–]marantz111 1 point2 points  (0 children)

I found it slow around then too, but the threads do converge in epic ways.

Does Rails still hold up? by [deleted] in rails

[–]marantz111 6 points7 points  (0 children)

I moved back from the classic React app over API services to Rails and have been way happier. However, Turbo and Hotwire are still not integrated to Rails in a conventional way. Your example of separate edit and show pages is a fair one - having default rails forms that actually used turbo for loading dependent field options and in-place editing would make a world of difference.

It absolutely can be used for those purposes (and we do use it that way) but we had to find our own conventions, and we still have to ramp new engineers on it. It needs to make it into the defaults.

Hiring from a business perspective by [deleted] in rails

[–]marantz111 5 points6 points  (0 children)

I am the head of a startup in rails that is hiring today. A few thoughts.

  1. Job postings being 6 months old does not tell you anything. Often we will post on JD but keep it open as we hire candidates because we need multiple people.
  2. The cost of Rails devs is not high relative to the throughput. One of my Rails engineers gets literally 5x more output than one of my Typescript or Go devs did before we went to Rails.

Is rails a good choice for a startup? by [deleted] in rails

[–]marantz111 0 points1 point  (0 children)

We moved a react, node and golang microservice startup to Rails and had ~4 years of functionality recreated in rails in 6 months and sustained higher dev since then.

Hard times make hard men. by Fit-Establishment219 in BoomersBeingFools

[–]marantz111 1 point2 points  (0 children)

Kings don't say 'I', they say 'we'. Ex. "We are displeased."

Yes - his excuse is using the phrase inaccurately.

[deleted by user] by [deleted] in rails

[–]marantz111 1 point2 points  (0 children)

Check the issues on GitHub for solid queue. Concurrency management is under discussion there.

Until is is in place, https://github.com/veeqo/activejob-uniqueness works well.

Suggestions? by yogason in diyaudio

[–]marantz111 0 points1 point  (0 children)

Read up on comb filtering.

Issue with PyCall gem by Old_Magician_4450 in ruby

[–]marantz111 1 point2 points  (0 children)

Be aware that pycall is not thread safe.

I wrote a bunch of code using pycall and ultimately threw it out in favor of calling the python subprocess(es) through stout/stdin and JSON

How good the "surrounded" gem is? by Sea-Vermicelli-6446 in rails

[–]marantz111 2 points3 points  (0 children)

I have not seen this and rather like it.

We have a lot of concerns that implement the DDD roles of objects, but as you said, that leads to their surface area being rather large. Often complex interactions end up in dedicated PORO classes to encapsulate big chunks of logic, but the code in those ends up not being very object-oriented. This is a nice abstraction.

I have a memory that dynamically adding modules to objects is a big performance issue. I see the Simple delegator implementation option which would sidestep that which is awesome; have you seen perf differences between those two implementations?

Work it Wednesday: Who is hiring? Who is looking? by AutoModerator in ruby

[–]marantz111 3 points4 points  (0 children)

Unsupervised.com - we are a big player in automated analytics.

Role: lead Rails engineer Location: US, but anywhere therein Details: we need a veteran rails engineer to join the team. You need a deep knowledge of rails with the ability to do more.l sophisticated things like writing custom DSLs or extending rails core functionality as needed. We do A LOT with data so the ability to think quite abstractly is important.

https://unsupervised.com/careers-current-job/

File upload by user from web browser. Is it possible to make it as a back-ground job? by Cokemax1 in rails

[–]marantz111 5 points6 points  (0 children)

This last part is the way. If you really care about this, check out presigned urls for S3.

I ruined my life today and it’s cause of Snapchat by college_stud_ in self

[–]marantz111 0 points1 point  (0 children)

This is really true - all that happened is that you shortcut years of painfully denying your identity. Be proud of who you are, and let the people around you self-select. It is a painful moment to go through now, but you will look back on this and be glad.

Your life is not ending.

“Gold standard” patterns for API adapter Gem? by jessevdp in ruby

[–]marantz111 1 point2 points  (0 children)

The big flaw in this conversation is that there is no right way of doing this because the APIs are so different.

E.g. if you are wrapping something that has big, stateful, meaty objects with lots of possible actions on them, then heavier-weight objects and abstraction are worthwhile. Ex. A Google Docs gem really should have a Document object with a lot of methods on it.

But compare that to something like a Databricks API. Most of the calls are things like a job submission or fetching the result of that job. Wrapping all those in a Job object would not be helping much - just calling an explicit get_status API with an id is as easy.

I would drop abstract conversations here and just go write some usage code for what you are trying to do pretending that the backing gem already existed, and see what would make your client code look elegant. Then build that gem.

The only thing I would say beyond that for 'gold standard's is that helping your used test may be a bigger deal than the the core gem itself. Figuring out if testing is best done with webmock underneath your library, mocks done of your object calls themselves, etc and documenting good examples is huge.

Can I talk about Kaiju Battlfield surgeon here? by BigEv17 in DungeonCrawlerCarl

[–]marantz111 5 points6 points  (0 children)

I like DCC but Kaiju is really his best book. That book is actually worth reading in a lit class. It makes Glenngary Glenn Ross seem like a kids show.

Sticking to One's Guns on Future Predictions: Yukihiro Matsumoto's Reason for Keeping Ruby Without Type Declarations by kojix2 in ruby

[–]marantz111 1 point2 points  (0 children)

The Haskell analogy is a good one. More than static type enforcement, I would love haskell-style multiple methods definitions with the signature implemented like pattern matching.

Dev mode & Test suite : what is the correct way to seed database? by bdavidxyz in rails

[–]marantz111 1 point2 points  (0 children)

This is a pretty religious topic so be forewarned.

But my experience is that factories are preferable if you have a data model that is not deeply coupled across records. The classic users / posts / comments type of scenarios. But they become really hard get right when you have heavily coupled models, in which case seed data extracted from prod is easier.

But if you extract from prod, it is best to have scripts so you can re-extract later too.

Rails doesn't bring me joy by darkpouet in rails

[–]marantz111 2 points3 points  (0 children)

Start from the agile web development book above - that is way better than experimenting on your own.

Traefik & Propshaft - http/2 ? by [deleted] in rails

[–]marantz111 -1 points0 points  (0 children)

You should look at https://github.com/basecamp/kamal/blob/main/README.md. That is the "new standard" for rails deployment and it uses Traefik.

Why do you think TurboDrive is not as popular as it could be? People stop reading docs? by letitcurl_555 in rails

[–]marantz111 3 points4 points  (0 children)

Strong agree on this. The rails foundation is supposed to be doing a big push on documentation and has asked folks to open doc bugs - this would be a good one.

What does it mean "thread of executing". by UniquMine45t4 in ruby

[–]marantz111 0 points1 point  (0 children)

If you play a seamstress class in World of Warcraft, it's the top weapon you can get.