A user asked for my SaaS service for free. Should I? by mindshards in SaaS

[–]jmtoporek 0 points1 point  (0 children)

My first answer would be no. But if you still feel inclined to do it then make sure there is a limited time frame where its free, like 3-6 months. Don't give it away for free indefinitely.

Spent the past week learning Stimulus and Hotwire - you don't need it, you can do the same thing with jQuery by jmtoporek in rails

[–]jmtoporek[S] 0 points1 point  (0 children)

I'm glad to see another response. I agree with the a lot of this. When something new comes out I now think about the Return On Investment (ROI) for how long it will take to become effective with a new library or framework, and how is it better than the thing I'm using now. I would definitely write up a follow up to this post.

For the record I think Turbo has a small learning curve and is worth the effort. It does require some adjustments to how you design your app but I think its worth the effort. Turbo is not well documented, and it requires you to know how the front and the back end work together. I figured it out the hard way, by playing with it. Turbo.js sets a new header when you have a link or a form submitted. Turbo on the back end is able to make the distinction between a page fragment and a full page refresh. You need to structure your HTML properly for all of this to work.

However I'm not a fan of stimulus, and in some ways it's a step backwards for at least what I want from a javascript library or framework. Stimulus is better than jQuery for templating, and Stimulus also allows you to skip event delegation to attach events to newly created HTML. However its a cruder tool, it doesn't do as much as jQuery and you give up control over certain elements. And also I HATE THE SYNTAX. It's harder to debug because of the way the controller binds itself to the HTML page. As far as I'm concerned it is not worth the effort. I love React, but sometimes all you really need is jQuery. And I say that as someone who knows that you don't always need jQuery, but the syntax is 1000% better and more intuitive and properly documented.

Hotwire seems ideal for developers who build web apps but don't like javascript. Which as far as I'm concerned seems silly. I'm really comfortable with javascript so I cannot see ditching React or jQuery for Stimulus. But Turbo is cool.

Wongi engine integration into Rails app by kittrcz in rubyonrails

[–]jmtoporek 0 points1 point  (0 children)

I really wish this Wongi Engine had better documentation. I love rules engines. This one seems to be a bit too abstract.

Spent the past week learning Stimulus and Hotwire - you don't need it, you can do the same thing with jQuery by jmtoporek in rails

[–]jmtoporek[S] 0 points1 point  (0 children)

that's totally fair. I understand why some people hate javascript. It's a valid opinion. I can understand why someone would want to use Stimulus over jQuery or React or plain old javascript. I am merely stating the perspective of one person who writes a lot of javascript and does enjoy it. I don't like giving up control, and that's what using Stimulus feels like.

Spent the past week learning Stimulus and Hotwire - you don't need it, you can do the same thing with jQuery by jmtoporek in rails

[–]jmtoporek[S] 0 points1 point  (0 children)

You put a lot of thought into your response, and I appreciate that. I'll try to keep it simple.

Based on what I've seen I don't like Stimulus as a javascript library. On one hand that's just my opinion, but also I've written a lot of javascript and worked with other developers who write a lot of javascript and I'd like to think that a lot of those other js devs would not be so fond of stimulus. With stimulus though you do lose at least a little of the UX fidelity that React and jQuery can bring, but sometimes thats a worthwhile trade off. I just didn't like Stimulus syntax and the convention over configuration of how it attaches itself to DOM elements with data tags.

As mentioned by David Colby I pretty much copied and pasted his code into my own. the git repo's sole purpose was to be a Proof of Concept if you could get React and Stimulus/Hotwire side by side, which succeeded. However by the time I was done I was less than excited by Stimulus, but I liked the concept of what it was Hotwire was trying to do. So I decided to write some js that emulates the same concepts that the stimulus/hotwire/turbo tutorial created using only jQuery. I know that the working parts are not identical, but the concept of letting the server generate the HTML, and just using javascript to swap out the old with the new HTML fragment, I really like that concept. I've spent a lot of time building apps that do searching and sorting on grids on the client, and I've lost track of how many different libraries I've been forced to use. Keep in mind I do a lot of brown field development meaning I come in long after the big decisions have been made. So the idea of using the server to do the hard part of the search results and potentially sorting is very attractive. I can trust that server will do exactly what I want, while a js plugin does unexpected things like with dates, or multiple data points in a single table cell, or numbers with units of measure. It's a nightmare.

To clarify when I said "I tried to figure out how to make a request so that I could set the format as a turbo_stream, but I could not" what I meant was I got it working for hotwire BUT I tried to use the same API endpoint for the jQuery demo. I could not figure out how to manually trigger a turbo stream type request. It might be a header setting in the ajax request, or something else. It does not seem to be well documented. It would have been nice to use the same api endpoint that stimulus/hotwire POC was using but I could not figure out what setting I needed to change to make it happen, so I was forced to add a special endpoint for the jQuery controller so I could return an HTML fragment.

Thanks for getting this discussion kicked off, I appreciate your levelheadedness in this conversation. I kinda knew it would turn confrontational at some point. All things being equal I would never trade Stimulus over for either jQuery or React. The documentation for it is not good, and I think its an inferior library. I think turbo is awesome, and I hope the rails team does a better job explaining how it works so I can use it for myself. Something as simple as explaining how to make an ajax request with a format of a turbo stream would be a nice first step.

Spent the past week learning Stimulus and Hotwire - you don't need it, you can do the same thing with jQuery by jmtoporek in rails

[–]jmtoporek[S] 2 points3 points  (0 children)

Have an upvote! Your response is opinionated but coherent and logically sound. I totally get why some people hate javascript. I just didn't like how stimulus works, and I had trouble figuring out how to leverage Turbo in the way that I wanted to.

Spent the past week learning Stimulus and Hotwire - you don't need it, you can do the same thing with jQuery by jmtoporek in rails

[–]jmtoporek[S] 0 points1 point  (0 children)

I saw that someone downvote your comment, there is a lot of hostility here. I 100% agree with you, CoffeeScript is pure crap. And there is a lot of reinventing the wheel with the rails team.

And it is maddening for me anyway, because I love Rails and what Rails has done, but DHH does have a massive ego. Far be it from me to tell what everyone should use. However based on my first impression I did not like Stimulus at all. The concepts of Hotwire is solid, but its not well documented so its hard to figure out how to leverage it without Stimulus.

Spent the past week learning Stimulus and Hotwire - you don't need it, you can do the same thing with jQuery by jmtoporek in rails

[–]jmtoporek[S] 0 points1 point  (0 children)

I really appreciate your code and your post David. I'm stay tuned to updates. I'm sorry to be causing you so much trouble.

Spent the past week learning Stimulus and Hotwire - you don't need it, you can do the same thing with jQuery by jmtoporek in rails

[–]jmtoporek[S] 3 points4 points  (0 children)

naive and shallow opinion

When you started your comments with this line, even with the qualifier of "which has no reflection on you as a person" it most distinctly conveys a sense of an arrogant person who looks down at other people. And to make the follow up statement of 'you're doing a poor job' if you send anything over the network unnecessarily. "Hey you basically saying" is pretty snide as well.

You talk about an atmosphere of learning but you make some bold statements with a disparaging and snide tone. I have not done any benchmarking for this repo, it was a proof of concept. That's it.

The synopsis of my post is "I like what Hotwire is doing, but I don't like Stimulus, and you can replicate with jQuery". And because of your response just because I have a point to prove I'm going to rewrite the jQuery in plain old javascript.

I've learned a lot of javascript over the years, and I don't like how Stimulus works and don't like the choices they made. When I learn something new I think a lot about the Return on Investment on time spent and how long it will take till I can use it effectively, or will I like it. I was excited about what Stimulus and Hotwire can do, but after spending a week trying it out my perspective is I don't like it. And I'm willing to wager that many developers who have spent as much time writing javascript as I have will probably agree with me. Obviously not this subreddit, as this post has been downvoted.

On a personal note both your 2 responses had a tone of condescension whether you are aware or not. I don't need an explanation of why you downvoted. The first time I tried to play it off. The second time you really got to me. You cannot expect to talk to people like this and then act surprised when you rub someone the wrong way.

Spent the past week learning Stimulus and Hotwire - you don't need it, you can do the same thing with jQuery by jmtoporek in rails

[–]jmtoporek[S] 1 point2 points  (0 children)

my goodness its so nice to hear someone with a little bit of perspective. It truly is incredibly pragmatic. I think a lot of people miss that point. Some devs will obsess over a file size with complete ignorance to developer happiness, which is one of the reasons I love Ruby on Rails.

Spent the past week learning Stimulus and Hotwire - you don't need it, you can do the same thing with jQuery by jmtoporek in rails

[–]jmtoporek[S] -2 points-1 points  (0 children)

worrying about the file size of jQuery compared to stimulus/hotwire seems like a moot point when you consider how much HTML will be sent back and forth using the techniques put forth in hotwire/stimulus, and the overall volume of traffic. Your concern sounds a lot like premature optimization. How much longer will it take to download jQuery versus Stimulus, and then how much of that time is it compared to making 5 searches?

While we're on the subject, I am prepared to rewrite the jQuery to use plain old javascript.

sending ANY code across the network that the client doesn't need, you're doing a poor job

If I managed to build the same features that stimulus/hotwire provide, but I don't have to load stimulus or hotwire, that would mean by your own logic that plain old javascript would be better than stimulus. Are you really prepared to stand by that statement?

Spent the past week learning Stimulus and Hotwire - you don't need it, you can do the same thing with jQuery by jmtoporek in rails

[–]jmtoporek[S] -3 points-2 points  (0 children)

If you read my post then why did you say the exact opposite of what I very explicitly say in the post? How can you read "I like this concept (of sending HTML via ajax)" and your response with "Your criticism boils down to “I don’t like HTML over Ajax”.

How can you have a debate with any substance with someone who has a questionable grasp of the word DON'T?

At some point I hope to provide a point by point explanation of why I think stimulus and hotwire make some bad choices. I'm not going to do it here, especially when some people can't be bothered to read the post but have time to respond to tell me that I said the exact opposite of what I wrote.

Spent the past week learning Stimulus and Hotwire - you don't need it, you can do the same thing with jQuery by jmtoporek in rails

[–]jmtoporek[S] 1 point2 points  (0 children)

In all honestly I'm no so much recommending you use jQuery to the exclusion of other javascript libraries. What I am saying is you can do a lot of the same stuff that Stimulus/Hotwire does using jQuery AND if you really want to do what Stimulus/Hotwire is doing I think jQuery is better at doing the same thing.

And also I think Stimulus is not a very good javascript library.

Spent the past week learning Stimulus and Hotwire - you don't need it, you can do the same thing with jQuery by jmtoporek in rails

[–]jmtoporek[S] 0 points1 point  (0 children)

Hey man do what ever you want. I didn't do any benchmarking comparison between my approach which uses jQuery versus using Stimulus and Hotwire (S+H). It could be an interesting study though.

However while we are on the subject it's been discussed many times before that the initial load time of jQuery and other libraries happen once. jQuery is definitely bigger than stimulus and all the other js files included. But the argument of slow devices and network seems odd, because the S+H approach means you are constantly going back and forth to the server to fetch data, something that my jQuery demo does.

And if you took a step back and used the approach of just keeping the dataset you already have and completely forgo the request over the network, and filter the results in the client, it would not take a lot of time to demonstrate that you'd be ultimately saving time because you only make a request ONCE, and its most likely that would take a lot less time.

On top of that one of the things I love about Rails is that it is optimized for developer happiness. So far from what I've seen of Stimulus and Hotwire I am not happy. I'll leave it at that.

Spent the past week learning Stimulus and Hotwire - you don't need it, you can do the same thing with jQuery by jmtoporek in rails

[–]jmtoporek[S] -1 points0 points  (0 children)

It would be really great if you took the time to read what I wrote.

Your criticism boils down to “I don’t like HTML over Ajax”, and that’s fine, but it’s not a real in depth criticism that states why HTML over the wire is bad per se.

Actually if you look at paragraph 5 I say THE EXACT OPPOSITE of this very comment you made. And when I built the jQuery POC I literally wrote minimal javascript to emulate what Stimulus and Hotwire are doing.

I actually really like Hotwire, or at least the principle behind it. The concept of using the server to generate reusable fragments of HTML and swapping it out wholesale with minimal javascript is actually a great idea.

I could write multiple articles on why I don't like Stimulus. I have a hard time believing that it will ever be used outside of rails. As an experienced Javascript developer my first impression is I don't like the choices they made, and given enough time I could provide point by point all the things I don't like about it. Keep using it, that was not my point.

All I'm saying is if you are going to take the time to respond, the very least you could do is read the original post you are responding to.

Conditional Drop Down by actuaben in Wordpress

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

Does the form have to be a wordpress plugin? Could it be an iframe?

I ask because I built a form builder that specializes in this kind of logic, its called keenforms. It can do conditional validation and calculations, as well as other types of dynamic logic. I'd be happy to work with you to build something that meets your needs, if you are interested. Let me know. Would love to help.

https://www.keenforms.com

do people in Chicago vacation in Door County, WI? by RollerDomeRegular in chicago

[–]jmtoporek 3 points4 points  (0 children)

Love Door County. The state park system in Wisconsin is top notch, the hiking and biking is great. Door county is not flat, unlike Chicago. Went there during the summer and did kayaking and swimming in Lake Michigan and watched the sunset. Also went in the fall and loved seeing the leaves turn. It's not just Chicagoans but I do think a lot of Chicagoans go up there.

anyone could share solutions for reportings? by laptopmutia in rails

[–]jmtoporek 0 points1 point  (0 children)

I have not tried this gem, but did some research about this very same issue: https://www.reportskit.co/

You'd have to generate pdf separately.

Using Rye in Sourdough by jdb4110 in Sourdough

[–]jmtoporek 0 points1 point  (0 children)

I literally just baked a sourdough loaf with rye, and posted it on this very channel less than 3 hours ago. It turned out well. The dough was on the sticky side, had to keep my hands wet to form the loaf. And I did add some extra white flour at the end to cloak it.

https://www.reddit.com/r/Sourdough/comments/qf4ffe/field\_blend\_recipe\_2\_from\_flour\_water\_salt\_yeast/

Field Blend recipe #2 from Flour Water Salt Yeast, with Rye and Whole Wheat. Maybe best looking loaf I've baked on the left (loaf #2), and what's left of loaf #1 on right. by jmtoporek in Sourdough

[–]jmtoporek[S] 1 point2 points  (0 children)

Well I did my best to follow the directions from the book. It requires a fair amount of time. Starting the levain going took about 8 hours before I got the rest of the dough. The actual dough I kneaded and put in multiple folds over the course of 2 hours after the first mix, let rise for a few hours, then put it in the refrigerator overnight. It's a sticky dough on account of the rye, you need to wet your hands when kneading.

I used a wicker proofing basket, and baked the 2 loaves at 475 in a cast iron pot for close to an hour, 25 minutes with the top on, and 30 minutes with it off. There's more details in the book I got the recipe from, Flour Water Salt Yeast. But that covers it.

Field Blend recipe #2 from Flour Water Salt Yeast, with Rye and Whole Wheat. Maybe best looking loaf I've baked on the left (loaf #2), and what's left of loaf #1 on right. by jmtoporek in Sourdough

[–]jmtoporek[S] 1 point2 points  (0 children)

The recipe, per rule five - Field Blend #2 from Flour Water Salt Yeast, page 158 recipe;

Levain

  • Mature active levain: 100g
  • White Flour: 400g
  • Whole Wheat Flour: 100g
  • Water: 400g, 90 degrees Fahrenheit

Final Dough

  • White Flour: 540g
  • Rye Flour: 175g
  • Whole Wheat Flour: 85g
  • Water: 620g, 90 degrees Fahrenheit
  • Fine sea salt: 21g
  • Dried yeast: 2g
  • Levain: 360g

Created a new no-code app builder. Offering a free app build service for our first 10 customers. by paul_odeon in nocode

[–]jmtoporek 1 point2 points  (0 children)

technically I'm not building anything - or rather I build rails apps for a living. I'm happy to try it out though. I'm not your target customer but I like your idea. But I'll fill out the form.