You're happily coding and hit a small technical snag. You focus on your search box and trawl the internet looking for answers. StackOverflow et al have some related things, but not exactly. You spend a few more hours using that knowledge, looking for new solutions. But alas, it's not working. Rinse, repeat: more net crawling.
At some point you hit a dead end. There's no more relevant information online. You've gone through the docs, the examples, the issue systems, and the Q&A sites, but nothing has helped.
You may even up the ante and start asking questions. And should the comments on StackOverflow not completely demotivate you, you clarify the question, cross-reference and continue to hope somebody can help.
Alas, no answers appear.
What do you do now?
Top comments (40)
1) First of all, blame Microsoft (works even if you're using a non-Microsoft stack)
2) Break the problem down into small, testable, parts. This can be helpful in revealing bugs in problematic third party libraries, especially those where you don't have the source code. If you use test-driven development, it makes this easier.
3) Back up and look at the design as a whole. Perhaps there's a "you can't get there from here" design issue more than a coding issue.
4) Find other developers to brainstorm with. This might be difficult if you're working solo but sometimes even bouncing ideas off a non-programmer might help you discover some insight.
And when that fails as well?
My step 1 typically includes Apple and Google lately, not Microsoft.
Blaming Microsoft is handy for when your web app works great in Chrome but fails in IE and Edge. I guess if you're doing apps for devices, blaming Apple and Google is just as good though.
However, in 30 years, I haven't found a coding problem that couldn't be solved by working through it much like I described. It was more difficult in the early, pre-Internet, 90's when I had to fly out to customer sites to figure out tricky software-hardware interface issues.
I vaguely recall pre-web coding... they weren't pleasant. Lots of focus, sure, but few avenues for help.
Today, like many time in my experience, I've often resorted to good workarounds, acceptable workarounds, or at times abandoning features due to problems. It isn't pleasant, but I think it's necessary sometimes.
That's when I start reading source code, assuming it's available. Next recourse is to open an issue on their tracker and hope someone gets around to it.
I wish public issue trackers all had bounties on them. There's been so many times I'd pay for support if I knew I'd actually get an answer.
Never underestimate the value of stepping away from the problem and coming back in a while. All the answers in this thread so far are on point. Since we're on dev.to, I'll add that this is the type of case we are trying to tackle with this site/community. @codemouse92 and others have requested chat-oriented stuff in the past and we're definitely listening but trying not to spread ourselves too.
I had a good phone call the other day with my brother @mikeydorje , who has become a self-taught developer and we had a really productive chat about where to go on a project to work through the current issues. I've had a few similarly productive times in the past that lead to great aha moments and solutions. It's certainly easier to cover a lot of ground with a junior-but-not-too-junior developer than folks with more specific advanced needs but we're really motivated to keep working on the little things which can result in a lot more aha moments.
Anyway, my 2 cents about what goes through my head when this type of thing comes up.
P.S. I happened to see that @dmfay was the Stack Overflow answerer on a question that helped me out. Fun to see familiar profile pics across the web. 🙂
I have an idea: a frustration button. I'll sell a big red USB connected button.
Press it once/lightly and all your code is marked read-only for 30 minutes.
Press it twice, or hard, and your github privileges are removed for the day, and your browser blocks all coding URLS.
Smash the button and your project is completely locked until you manage to get a first-page posting on /r/earthporn.
I help out a lot in my classes and am helping in an intro class this semester. I think a few of the students thought I was kidding, but I totally told them that when I get to a Certain Level of frustrated, I zip up the whole thing, email it to a friend and save a copy on Google Drive or wherever. (Also basic versioning stuff.)
Then no matter how pissed or frustrated I get, if I get to the Very Dangerous Spot of "Screw this I'm deleting all of it" (after which, inevitably, ten minutes later you remember the One Thing that would have fixed it) there are copies you literally could not destroy.
...I also got so frustrated at an assignment last semester that I literally wrote a script locking me out of the cloud-based editor we were using, and ended up having so much fun locking myself out that it cured my bad mood until I actually got to office hours to ask the teacher the next day.
Well, I'm glad that I'm not the type of person who deletes all of my work when I get mad, I just abandon it
Great phone call @ben . I'll be posting some thoughts, questions, and whatnot about what I'm working on when I have some free time.
Turn to IRC.
If all else fails, weep openly for a while, and then start hacking the problem.
I legit think the positive effects of intentionally (and safely!) losing your head about something are underrated. Sometimes the best thing you can do is be super honest about how massively frustrated you are, freak out and cry some, grab more coffee, and dive back in.
Absolutely! I believe we learn more from those moments than from any other circumstance in coding....albeit, I still don't enjoy them by any measure. ;-)
Compiler-Warning 0000
: Code flip-flop detected
: You appear to be keep commenting in and out the same code? Have you tried weeping instead?
I'm not sure I've ever wanted a "share this comment via Twitter" option more!
Oh man, the harshest feature....
I can't tell you how many times this worked for me
My first thought was roll for initiative.
My second thought was: take a break, get some sunshine if I can, get a new thing of coffee, work on an unrelated problem for a little if possible. Come back to the problem with a new eye, and read it out loud, line by line, literally--not what I want it to say, what it does say. If that doesn't help, and I don't have others I can ask help from, I refill my coffee, settle back in, put on some good music, and start writing out literal hypotheses and tests for each, running those, and recording my results.
I rolled a
1
today I think.Ouch. :( Is it the kind of thing a fresh set of eyes would help? Have to run an errand quick but after that I'll be sitting around for a good while and would be happy to be a rubber duck, if that's useful at all!
Not my code, thus I was the fresh eyeballs! :)
Thanks for the offer. It's entirely uncommon API fighting with iOS, so if you happen to know that well the question is open over at stackoverflow.com/questions/485681...
Options:
git checkout -b f-it-i-dunno
these look pretty snarky, but this is what I do. :)
Computers are no magical boxes, when they fail us, it is for a reason. Possible reasons are:
You are defective. This is the most likely. In that case, get another set of (hopefully less defective) eyeballs or repair yourself. The other comments have enough suggestions on how to do it.
Your hardware is defective. This also happens quite often (at least to me). Can the issue be reproduced on other similar devices?
Your toolchain is defective. Depending on which toolchain you use, this may or may not be likely. How much can you reduce the project with the issue still present? Does the byte code do what you told it to do in high-level language?
Did I miss any?
I take a break. Thank I look at the problem again. If I still can't find the solution it I look for similar situations online. Then I ask around, coz some people may have a good idea or few tips that point me in the right direction :D If internet fails, ask the people around. There's usually someone smarter than you in the room. (If there's not, than change a room ;))
If you're on a dead end, ask someone else. If no one can answer you, start to break into the source, if you still can't fix it then wait, someone else will fix it. If you're on a deadline, buy more time or offer some alternative.
You should always consider how big the problem is. If stackoverflow or google can't help you, maybe it's not that big of a problem and no one cares about it. Maybe there's a better solution without having to deal with that problem.
Strangely enough, don't get a rubber duck. Get a plushie toy duck, plonk it down somewhere away from your desk, label it "Level 0 Technical Support".
When you get something that completely frustrates you, get up, go to the duck, and tell it your problem.
If you somehow realize the answer to the problem, the duck worked. :)
Yeah...my dog and cat both have this role. The cat is better for the role, though, because she talks back less.