mendicant
It's not always so cut and dry, and there are situations where this is a very valuable tool. I just feel that down the road if you feel like there is a valid reason for refactoring object hierarchy that you'll potentially be doing yourself (or those that follow) a disservice in the long run.
Many of these offers are time bombs and sometimes for good reason. I'm not so sure I'm ready to pick up my pitchfork if this is the case.
But they didn't "just add a button" they also added over 3x the content to give that button value.
If they had kept their original 3 books and added the button I'm guessing they would have seen next to no difference in the bottom line.
My point being that in order for an Unlock/Buy All button to work, you need to have enough content/product/etc to make the button worthwhile. Just adding a button may not be enough.
But my question is, what if the app doesn't, and isn't ever meant to, support a large number of users? What if even with the concurrency issues, it's fast enough?
- Taking on a role with more responsibility, leadership requirements and business knowledge
- Starting my own business where I get to make decisions (with my co-founder)
I see how many times as as developer I've either not cared about decisions that directly affect me. Or maybe I've just rolled over and accepted the things I don't like. It's the nature of (most) developers. Don't stir the pot. Don't dissent. Just get in and get my work done.
Here's the reality. Knowing more about your business makes you a better developer. Knowing how to say no and stand up for yourself makes you a better developer. Knowing how to talk and communicate with your users, your bosses, your co-workers (or anyone really), makes you a better developer (and will improve your work life). Being a strong technical person with strong Business, Marketing or Personal Communication skills makes you unstoppable. This applies to more than technical folk. The more you do - The better you are. Take this advice you might find that the skill you thought you were bad at, or hated, or avoided is actually very rewarding - Difficult, but rewarding.
And finally, to Amy: Thank you for all the work you do on showing people the power that they have. I started a business 5 years ago and have had to sit through the whole "YOU NEED TO GET FUNDED" and "YOU NEED TO GET BOUGHT" that seems so prevalent in the startup ecosystem. Me and my partner did everything ourselves. And now we own a business that makes decent money that goes DIRECTLY TO US.
But when you're overexposed to the opposite line of thinking, it's really easy to get caught up in the "am I doing this wrong?" and questioning yourself. You are one of the few people who puts an emphasis on growing and trusting YOURSELF. I'm very on board with most the things I hear you say because they are the very values that I have held in high esteem, yet was still questioning. So thank you for that.
ps. I also think that 'ahoythere' would've been an awesome username.
I'm going to work with a couple of assumptions:
1) The test casts which he refactors to test*() methods are non-trivial 2) The handlers _may_ be large sets of code
Here's a way to handle one of this refactored methods:
if (!test1()) { handle_failure_1(); return false; }
if (!test2()) { handle_failure_2(); return false; }
if (!test3()) { handle_failure_3(); return false; }
handle_success(); return true;
That's a lot of potential code we're dealing with in this class.
What if:
class HandlesFailure1
def handles_this_case(params)
#code from test1()
end
def handle(params)
#code from handle_failure_1()
return false;
end
endclass HandlesFailure2
def handles_this_case(params)
#code from test2()
end
def handle(params)
#code from handle_failure_2()
return false;
end
endclass HandlesFailure3
def handles_this_case(params)
#code from test3()
end
def handle(params)
#code from handle_failure_3()
return false;
end
endclass HandlesSuccess
def handles_this_case(params)
return true
end
def handles(params)
//code from handle_success
return true
end
end#And now the original class
class DoesSomething
#There are ways to set this up fairly easily. One simple way it to just new it up here, but you could auto-wire it too
handlers = [HandlesFailure1, HandlesFailure2, HandlesFailure3, HandlesSuccess]
def do_something(params)
handlers.each do |handler|
return handler.handle(params) if handler.handles_this_case(params)
end
end
endThere. Now there's a loop and an if. Check each case and either handle or toss it out. This can also work for the case where you might want multiple handlers to handle something, just don't return on the first one.
I'm not saying it's the right way, but it's another way.
Pros: It really helps to group together the handling methods with the test methods. Very simple dispatch method
Cons: Separate classes, and harder to view all the handlers together.
I highly doubt that holding off on video games and computers will be a detriment in the long run.
So after a year of weekends and evenings, my partner started to pound the pavement. We were profitable in our very first year after launch, and continue to be. Our biggest expense is advertising, which is very targeted. I think about 80-85% of our pre-tax revenue ends up being profit, which is great.
I still have my day job, and for the 30 hours/week between us that we still put in, we've been _very_ successful.
The nice part about named params is that it can make your code more clear if you have a lot of parameters on a method... but you could do the same thing by introducing a parameter object and be as clear and more resistant to change.
I understand this is a religious argument of the code world and you're likely to disagree with me. I'm fine with that.
Hiding Code: I've got an idea. If you've got to hide code, maybe it _doesn't belong in that class_. Single responsibility people.
String.IsNullOrEmpty(): Wow! Thanks MS for saving me from writing one 4 line helper method. What would be useful is if you provided these helpers for the other 90 that I need every project. Seriously, any C# dev can provide you with their "utility" project that has them.
Named Parameters & Defaults: Awesome!..... unless you need something other than a primitive, in which case you can't set default values, since it's nothing but a fancy compiler trick.
I like C#, but really, there's not much they've added since Linq that's really crazy interesting. Not that there isn't, but most of it isn't listed in this article.
Secondly, I can't sign up for the weekly email. It says: Cannot POST /new
There is also certain (specific) situations where the original code (e.NewItem as Customer).Save() would fail but ((Customer)e.NewItem).Save() wouldn't. That specific case is where the type of e.NewItem has an implicit cast to Customer (as would return null, but a (Customer) cast would work).
But if you're doing implicit casting you might be facing other issues.
But so is an InvalidCastException -- Which is what your new code could throw.
The hardest thing I had with the site was when there were a lot of suggestions I had a lot of trouble reading through all of them, kind of like the words all ended up running together. It might just be me though.
My wife has been looking for a domain name for a while now, and we've already found a couple possibilities because of this.
As a future feature suggestion for the domain spinner -- At some point it would be really cool if you could find a way to choose a domain name that you kind of like, choose it and only show ones that are similar to it. This would be especially good when combining with adjectives. Some may be looking for more cheerful or positive adjectives while others may be looking for powerful or possibly negative ones.
Besides, does it really make sense to be downtown and have your salary being compared to the guy working at the McDonalds in the food court of your building?
I like the idea, and with a few tweaks it could really be a big thing. There are some companies who pay a very large sum to see how they compare against others in terms of pay/benefits/long term incentives.
The fact of the matter is, it was two guys coming up to a massive company saying "Hey! We've got this site where you can advertise all these items you want to get rid of... but we've got no traffic and you will be the first person on it." There's literally no incentive for them.
Our service depends on having clients to be valuable. So there wasn't any value in our service at the time. However, as soon as you get one of the big guys signed up and putting their items on our site, we instantly add value and get the "hey, if Company X is putting their stuff up there, I want to be there too!" effect.
However, those $250 dollar chairs only seem to last me ~2 years.
A side note that does make a difference: The $250 chairs are at home and my children are _quite_ hard on them.
We needed the "well if big guy X" is using it then maybe it's worth checking out.
We met with some big guys and asked what else they would need to make it work for them. A few tweaks later and a 6 month free trial (plus discounted first year) and we were off to the races.
There are some customers who love us because we love feedback and work hard to implement the really good ideas.
Providing a free trial + personalized tweaks gave us the start we needed. It worked doubly well because we targeted the companies who have respect in the industry first.
If there was American Football, hockey and basketball I can think of at least 10 people I'd send this site to right now.
Also, kudos to including a real user signup alongside the facebook signup.
However, it does make me wonder how fast they might find a fix for it if it were to happen to enough people to make it a priority. Or even, how many people it would take to make it a priority.
You're right that the system can't know my insight. But the community can. It is a community right?
I'm cool with going through some sort of approval process. If it means that it takes a few extra minutes for my changes to get in then so be it.
I _can_ provide insight.
every once in a while I find somewhere that I can provide some value or insight, whether via editing an answer with a url that's out of date, a comment expanding on the answer, etc... and it seems like I never can.
I don't care to jump through the hurdles to get to that point. I didn't come there to ask a question. I didn't come there to sift through questions to answer.
I came looking for something. I stumbled upon something where I could provide value and was shut down because I have better things to do with my time than to jump through hoops.
It's fine for the power users who want the world to see their rep, or the people trolling for questions regarding their pet projects. It sucks for the casual user.
So, yes, in theory the rep hurdle is quite low. I've just got better things to do with my time. -- Which I already wasted trying to help someone in the first place.