Live data from Hacker News

Ask HN: Maybe I kind of suck as a programmer – how do I supercharge my work?

news.ycombinator.com

61–70 of 126 posts

Re: Ask HN: Maybe I kind of suck as a programmer – how do I supercharge my work?

#61
post #58

>the code is generally messy and horrible, rife with race conditions and barely holding together in parts. immediately followed by >I'm proud of my work — especially design-wise ummmmm.... what?

I assume proud of completion, and proud of UI design.

Ah, proud of UI design makes sense. I thought OP was feeling proud about his/her program design, immediately after mentioning it's so awful.

Re: Ask HN: Maybe I kind of suck as a programmer – how do I supercharge my work?

#62
Programming is a practice that can be kind of deceptive in its valuation. To analogize to weightlifting, one of my favorite things to analogize against, you can see that someone lifted a lot, and you see that they did in fact lift it all by themselves, but you don't see how they get to that point, and you can't simply put on the same number of plates on the bar and hope to succeed.

A likewise naive path is to copy example code, do something slightly different from it, and then wonder why it's broken. You can't be really great at programming by doing that, because you're abdicating so much control to wishful thinking: "I hope this example author considered my use case!"

What you can do - and you probably have the guts to do it, if you're writing 30 KLOC apps on your own time - is to attack things one technique at a time, and to attack the hardest, most lasting stuff first before you get into more specialized and ephemeral knowledge like API calls. It's the adjustment of what you care about that leads you to direct your coding towards unfamiliar yet profitable roads, where you have to envision very big ideas that aren't in place yet, struggle with them for days or weeks, and ultimately find a great technique that you can reuse in the future.

To take one example, UI code is wonderful stuff for adding end-user value. But if you want extreme leverage in your code it can't be the first priority, because it's also stuff that tends to be thrown out frequently - because other features change, or you're on a new toolkit, or you found a slicker design. You have to instead allow the UI to be too crude at first, and think about application features as a layer apart from the UI. And then only as you come towards the end, confident that the core features are correct and will be robust against a partially-working UI, can you go back and invest in a great presentation.

Likewise, it's tempting to make code that is clever in-the-small, at the moment you first dip into making a new feature; to invent class hierarchies and configuration objects and generics and other nifty things. But what you need most at that moment where it's new is the most boring, plain code possible, because if you don't know the problem space yet, anything clever that might add structure or allude to generalizing the problem along any one axis is likely to do so wrongly, and the most flexible you can be is to assume it's all disposable and should be extended with copy-paste-modify. Fancy language features were made to break through problems with the crude techniques, so if you follow with that grain and only add the features after you feel pain, everything tends to go much more smoothly.

Most of all, it's scary to take on seemingly big problems, but it's scary in a way that should not influence your decision whether or not to attack them. These problems feel big mostly because they aren't well understood to you. In the same way that math students are prompted to take on gradually more ambitious levels of abstraction, you have to do the same with your code. You start with your bad assumptions and knock them out with a dash of computer science knowledge, and a lot more trial and error. There will be bugs and bad decisions along the way, but you can also learn defensive techniques against them. Some attempts to defend your code may just make it harder to write or more brittle; others will succeed dramatically. You won't know these things until you try(or get very good advice from someone who solved a similar problem to yours) because every problem domain in programming has a unique solution profile, where some things matter more than others.

Re: Ask HN: Maybe I kind of suck as a programmer – how do I supercharge my work?

#63

Don't worry about it, enjoy your life, spend time in nature and cook yourself some nice food for dinner :)

I doubt you intended it this way but the little smiley face comes across as being super condescending :)

Re: Ask HN: Maybe I kind of suck as a programmer – how do I supercharge my work?

#65

While this doesn't directly answer your question, but I've found edw519 (a fellow HNer's) past comments on this subject highly enlightening. If you're looking for something inspiring / actionable to read, checkout this collection by him http://v25media.s3.amazonaws.com/edw519_mod.html One of my favorite answers - 71. How do you get good at programming? I believe that there are two ways to get good at anything, "push"…

Not to forget another gem from the same book that I ardently recall when it comes to self-doubt.

> Don't make the mistake of underestimating yourself.

> I'm not suggesting that you'll go out and write Rails in 3 weekends. What I am suggesting is that the more I meet "famous" hackers and the more I meet people from this community (online and offline), the more I realize that there's not really all that much that separates us.

> Lot's of people are obviously brilliant. And even for those who are a little less brilliant, brilliance is only one part of the equation. Work habits, determination, perseverence, passion, and maybe most of all, belief, are just as important. Don't sell yourself short.

Re: Ask HN: Maybe I kind of suck as a programmer – how do I supercharge my work?

#66
>> Major features were added over the course of weeks! >> — to say nothing of getting the overall architecture right from the start.

[Most likely] it is not that they got it right, right from the start. These 'awesome' programmers would have spent weeks before getting it right. These classify as throw away experiments and they keep at it till it satisfies their own internal target of what the solution should be like till it is right.

The best parameter of that right could be say the simplicity of the overall internal implementation and the exposed external API.

Now I am not saying that there are not geniuses around, but even if they are getting it right, it will still be backed by countless hours of hard work and practice.

Most likely asking these awesome programmers how they are getting it right, will throw some more light.

Re: Ask HN: Maybe I kind of suck as a programmer – how do I supercharge my work?

#67
I have a simpler explanation for this feeling- it's just that time of year again. Judging by the other responses it's just on everyone's minds. We can all look back and take stock of what we accomplished throughout the year and feel like we could have done more, could have done it better. When I'm bored I like to window shop cheap used cars on CraigsList. I think to myself "No one sees what I see in this beauty- if it was mine I'd be so happy". Code can be the same way and it seems like if it was yours it would be a new lease on life. The code may be found in the darkest corners of the internet so neglected but so much potential. Recognize in that moment you are creating your "style" your "way" of creating the inspiration which is really the goal. It's not about personal worth it's really about feeling free to create. Developers are their most creative selves when they are happy so...my first suspect in finding the path to developer enlightenment is environmental factors. Development IDE? Workspace area? Skipping breakfast? Look at these things with objective eyes then try to improve them then try again. Merging all of this with financial concerns is going to wire your brain's reward system up for self defeat- gain the freedom first then the money.

Re: Ask HN: Maybe I kind of suck as a programmer – how do I supercharge my work?

#68
post #44

Work with other people. Preferably a mix of people who seem less/equal/more capable than you are, but if you have to pick one, go with working with people that are above your level. Look at how they work, how they approach problems. Get code reviews from them, and review their code. Don't get set in your ways (or the ways of those better than you), be willing to try new things and see if it fits your style. Go slow b…

+1 to work with other people. Sounds like OP hasn't done much of that yet ...

Re: Ask HN: Maybe I kind of suck as a programmer – how do I supercharge my work?

#69
For identifying strengths and weaknesses: "Programmer Competency Matrix":

- http://sijinjoseph.com/programmer-competency-matrix/

- https://competency-checklist.appspot.com/

- https://github.com/hltbra/programmer-competency-checklist

... from: https://wrdrd.com/docs/consulting/software-development#compu... )

> How do I get good enough to consistently do work worth writing books about?

- These are great reads: "The Architecture of Open Source Applications" http://aosabook.org/en/

- TDD.

Re: Ask HN: Maybe I kind of suck as a programmer – how do I supercharge my work?

#70
post #45

Write more code. Learn different languages. Reinvent wheels. Stop following the herd. Most of the people who's code you're admiring have been blazing their own trails for decades. There are no short cuts to experience. Good luck!

This is not the answer. Write code with careful attention. The OP has written at least 30kloc, this is more than enough.

I don't agree, lines of code has nothing to do with experience level. Hitting your head against the wall trying to solve new kinds of problems is where the gold is. And that takes time, and courage.
Post reply on HN