Activity
Hey Simon,
One super important thing here is that pagination uses both limit
and order
to make pages. When you add limit
in on top of that, you're going to likely break pagination because of that.
Are you trying to limit the number of pages displayed?
Posted in Just want to say thanks!
Congrats on releasing your app Adrian, that's incredible! I can't wait to check it out. Looks really well done.
Thanks so much for the kind words guys. Couldn't make me happier to see that my little screencasts have helped so much. You guys are awesome. 🍻
Hah, good catch. Thanks for the heads up on that.
The cache directory is exactly what you would imagine. When you're uploading a file with a form and the form validation fails, you want to keep a cached copy of that file temporarily until the user completes the form. You don't want to permanently store the file since the form wasn't valid, so you just need it temporarily stored somewhere. Hence the cache directory. When the validations pass, the file is simply copied from cache to store rather than re-uploading the file.
Yeah, the proof of concept part helped me for two reasons:
- It greases the wheels. The clients know you're not trying to gouge them for all they got.
- You get to back out early if the client isn't good to work with.
Roughly my daily and weekly pricing was based upon hourly pricing. Say like $100/hr equates to $4k for a 40 hour week. Chances are you're not going to be booked every single week of the year so the weekly price is high enough to account for time you're doing sales and taxes and other expenses you may have. If all goes well, you should be making a six-figure salary doing that.
The daily and weekly stuff was usually for ongoing projects. Say a couple months down the line after finishing a project the client comes back with some maintenance problems or revisions. This pricing makes it fairly easy for you to say okay cool, I'll tackle those things and it'll cost $X per day. It worked best when you couldn't quite judge how much time something was going to take which is where flat fee is riskier.
You're definitely right about picking a number of how much you want to make being the best way to decide what to charge. I think roughly the easiest way to break things down is to work backwards. If you want to make $100k/yr (keep taxes in mind), you're going to want to make basically $8300 a month. That's $2075 a week, $415 a day, or roughly $50/hr. Things that you have to pay for that an employer wouldn't pushes that number up (health insurance, taxes for self employed, office, internet, computer, etc) so you'll want to add those into the calculation. It's good to budget for buying some new computer equipment each year, and so on, so you'll want to tack those on top.
Another thing to think about is that often times you're going to be in one of two modes: Sales mode or Execution mode. Usually you won't be getting that many new projects while you're doing work for someone. I generally got new projects when I was nearing the end of a project and was taking more time out to go to meetups and talk with leads. When I got a project I was usually heads down working and so things tended to go in phases to keep the pipeline of work going. Referrals are always the best source, but you have to do really good work to make that work and your clients need to know other potential clients.
And of course, you have to be actually worth those prices you want to charge. It's not hard to work your prices up with experience, but a junior dev trying to charge $100/hr is going to struggle making clients think they're worth it. That's a lot of money. If you think of it from the flip side and consider paying someone to build one of your apps for $100/hr, you're gonna want to make sure they aren't slow or mediocre at what they do. The way I dealt with that was starting out charging $25/hr, taking on tons of work and each new client raising the prices slowly by like $5/hr or so. My slowness was accounted for (or I didn't bill for some hours) and the clients were happy and while I didn't make as much money as I wanted, it was exactly what I needed to work my way up to higher pricing.
This makes me want to do like a course on consulting or something. I think that would be really fun to do.
This is looking pretty good. I think the tough spot now is that you need to set the update to set the tasklist_id as well.
I think this should work:
def sort
@list_id = params[:list].first
@items = params[:item]
@items.each_with_index do |id, index|
taskitem = Taskitem.find(id).update(tasklist_id: @list_id, position: (index +1))
end
render :nothing => true
end
Hey Alexander, I don't know the PayPal API very well, but they own Braintree and I have done an episode on that: https://gorails.com/episode...
Braintree lets you do both PayPal and credit cards so you can pick whichever you need. I'd recommend using it over the PayPal API directly for most all cases.
Ah I see, kinda like Trello board columns. I believe you would want to make sure you submitted the tasklist for the one that the item landed on. You would probably need to check that and see what $(this)
references, whether it was for the column it was picked up, or the column of where it dropped. Then server-side you can take those items and make sure that they're all updated with the correct tasklist_id
which would do the moving of the item between tasklists on the db side.
This might make for a good screencast.
Hey Arjun!
This is a fantastic question. I had a bunch of different methods of doing this over the years and yours sounds very much like what I did.
What I finally ended up with was charging a flat fee per project. This worked because I generally had a long in-depth conversation about what needed to be built and charged extra to account for any changes that were likely to come up. If things deviated too much from the original plan, I'd usually have to cut the project off at a point and renegotiate things. This didn't happen often, but it was a concern. If you get done early, you make more profit. This is the big plus that the other hourly, daily, or weekly options don't really have, but you can also lose money here if you screw things up.
Another option I did for more open ended projects was to do weekly or daily pricing. They could buy chunks of my time and that works out really well. I know my budget and availability and they can budget as well for things.
One thing for me was that I only did the building part, so you've got to also account for the Wireframing, Design and Slicing parts. I can imagine that those have a lot more back and forth with the clients. Generally I had someone else doing the designs but I might participate in that part helping to improve the flow of the app and everything.
As for budgeting things, I'd usually try to find out how deep the customer wants to go on things and what their budget was. I'd tell them that their budget dictated a lot of what we might build. Since I worked for a lot of startups, we might start out with a small $2k-5k project to make sure we work together well and that what we were building is on the right track. A proof of concept if you will. It helped align their ideas with how much money would be required to build their bigger vision stuff as well and I knew that if we did a good job on the first project, we could work again on a larger one.
Hey Chris,
That's a good question. Honestly the Railscasts episode is probably the most recent that I've seen on that. http://railscasts.com/episodes/147-sortable-lists-revised?view=comments
I should do an episode on it, but I don't think too much has changed. The general idea is that you will keep track of the sort order in the db and then when the user drops an item, you tell the server to update all the positions of items accordingly.
Posted in Login with Facebook Discussion
That would make for a good episode. I'll add this to my list. Luckily most of them, even Twitter, now provide email address.
The rough idea is that you should save the omniauth auth info to a cookie, and then redirect the user to set their email and save it all together.
I noticed that a bit earlier today. Got a new computer to record on though so I've lost my old Screenflow settings. Possibly something with their export options that wasn't rendering at the highest quality.
Thanks so much Nick, you've always been a big supporter! 🎈🎈🎈
Thanks Foliwe!
Thanks Alex! I appreciate it so much. :D
Posted in Login with Facebook Discussion
Fixed!
You're welcome and thanks for the encouragement and the support!! 🍻
There's a couple options for this generally:
- You can do this in the registration controller right after a successful save.
- Or you can do this in the model after_create (which might be simplest). I'll show that one here:
class User < ApplicationRecord
has_many :likes
after_create :create_default_likes
private
def create_default_likes
# Create your likes here
[1,2,3].each do |id|
likes.create post_id: id
end
end
end
For the controller version, you'd basically do the same thing just after the if user.save
. If you use something like Devise, you'll have to override the controller to do that.
Posted in Looking to upload files to local file storage on server. Recommended best to handle multiple?
Okay great, and yeah each file upload gem is slightly different than the others so it can change the code you write just slightly which was the reason I asked.
Posted in Looking to upload files to local file storage on server. Recommended best to handle multiple?
Are you using Shrine?