Activity
That's exciting Sean! I did this back in 2011 for a job and had the same 3 hour window thing.
For me, I was given 4 or 5 CSV files that I had to parse and then run searches against. It was pricing data, searches, gps locations, and stuff and was quite a hard thing to solve in 3 hours, especially for my first job. I got super close but didn't have time to write any tests and my answers were close but not quite correct from what I could tell. Ultimately I didn't get hired because they were on the fence with my results but I learned a lot from it.
My big takeaways from it were:
- The biggest thing is to stay as calm as you can and share your thought process. If you don't, you're going to write a bunch of code that's semi-disorganized and makes it had for them to understand how you were trying to approach the problem. The best way to share your thought process is through well organized code, but take your time to comment / write out your ideas as you go and turn that in as well. You can outline which pieces you'd break down and separate into different parts, which you'd tackle first, and so on. Also note the pieces you see are complex or you think could be solved better and how you might come back later to improve them.
- Do your best to write out all your objects and interfaces for them as clearly as you can. What ones will you need? what is each one's job? how will they interact?
- The previous questions are a good foundation for thinking about how your objects would be tested as well. Even if you don't get around to writing tests or anything, showing that your objects are designed to be testable will be a great sign.
This is awesome, thanks for sharing that John!
Yes definitely a feature that's coming soon. I wanted to make sure I safely did these and didn't cause any major issues when I implemented this. Some people will want the db removed, others might not, and so on. I think I will likely remove the app and the Nginx config, but retain the database on your server so you don't lose any important data.
Posted in Using Webhooks with Stripe Discussion
You can just listen to the charge.failed event and send an email accordingly if you want. Even better, you can use a service like Profitwell to handle the failed payments (and soon to expire cards) for you and let them optimize the email text and things. That's what I use and it's generally better at recovering failed payments than your own stuff because they can learn and improve over a vast set of businesses rather than just your single one.
I do what I can. :)
Yep. And here's the link to the redirect_to override from the gem: https://github.com/turbolin...
If you ask for JS back and you're using Turbolinks, it will actually send back a Turbolinks.visit() to redirect you on success which is awesome and means everything is handled like a single page app. You still have to handle the JS side for failure, but there's some talk about having that automated as well with some changes to Turbolinks to replace the current page with the standard re-render on failure. For now you have to just insert errors on the page manually.
You can always just grab the url from the wrapper form. The reason I didn't do that in these episodes was the rails_ujs library was doing something weird with the button clicks and so I left it out. Normally I would just use Rails to render a form tag and then use Vue to make it work, so then on submission Vue can just simply grab the url from the form (and csrf token too).
In that situation, I would probably just leave the JSON alone, serialize it with the wrong names, and then at the very end go through and rename those properties. You could do that on either side as well, in the JS or in the controller. It wouldn't really matter, but it might be easiest to do in JS.
Posted in The Params Hash | GoRails
You know, I don't believe I ever got around to it. Going to record it this week.
Posted in Subscriptions with Stripe Discussion
Thanks for the reminder, I have been planning on doing a new episode covering the new Stripe Elements JS library. It seems a little less clear than the old version at a first glance, but I haven't implemented it just yet.
Posted in Hatch: Deploying my first App
Hmm! I guess probably since you tested it earlier on I probably fixed some of the bugs around the Bitbucket stuff. I will wait until another report of that issue and see if it's a consistent thing or not. :)
If you run into any other issues, just ping me and I'll make sure it gets all fixed up.
Posted in Extending Rails flash
Hey Jiri,
Do you know for sure if that file is being loaded? I think that it should be since it's in app, but I would just want to verify that.
You can also just simply define this in an initializer if you want a simpler way of doing this. It would look something like this:
# config/initializers/flash.rb
class ActionDispatch::Flash::FlashHash
def my_method
#...
end
end
And last question, what's the goal you're trying to accomplish with this?
Posted in Do I have to publish the source code of a commercial app if I use a GPL licensed gem like prawn?
This should answer some of your questions: https://softwareengineering.stackexchange.com/a/47048/1981
Posted in Hatch: Deploying my first App
Haha! Perfect. Only you and the internet will know. ;)
Trying to think why that happened. Did you add your Bitbucket account after your server was provisioned?
Posted in Hatch: Deploying my first App
I just manually re-ran the add SSH key script on your server. You should see the server's SSH key in your bitbucket account now at https://bitbucket.org/account/user/USERNAME/ssh-keys/
Was doing support and accidentally posted as the wrong account in case you saw the email notification from the wrong user. ;)
Hey Stan,
You mean a code example for the all-day events?
Meant to reply sooner, but all your ssh keys are located in ~/.ssh so you can backup that folder and just replace it on your new install to use the same keys.
Alrighty, source code is posted now! https://github.com/gorails-...
Also included some extra refactoring and goodies like a "help" command and a "url" command to open a url in Safari.
Thanks Shawn! 🤘