Live data from Hacker News

Don’t Believe Anyone Who Tells You Learning To Code Is Easy

techcrunch.com

111–120 of 186 posts

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#111
post #85
post #82

Earlier quoted context omitted.

Man... can I ask what led a company into the situation where they need to fix software without source code access? Did they rely on a vendor that went out of business? I imagine it is ancient software from the 80's or 90's?

I don't know the whole story, but seeming as this was banking software I wouldn't be surprised if it was indeed written some time in the 80's or 90's and the original developers were nowhere to be found.

i know it's not your first language but since you mentioned you like to think and understand things, the correct syntax is '80s and '90s; the apostrophe is used to indicate letter omission. incidentally, my first language was basic. didn't want to omit that :)

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#112
post #69

Earlier quoted context omitted.

Please never stop doing this. I get paid $$$++ to swoop in after people like you are done and whole teams grind to a halt productivity-wise because the codebase is so bad. You are doing god's work, son. Thank you.

There is a fair amount of code you should copy/paste unless you are doing pure research, some because it has been so well studied it is almost a certainty that you are not going to drastically improve on it and others, such as encryption implementations, because it is actively dangerous to fuck about with unless you are extremely careful and a domain expert.

If you're copy-pasting encryption implementations rather than using an existing library, you're probably doing it wrong.

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#113

Earlier quoted context omitted.

> Copy and paste doesn't help you at all with this. In some cases it may prevent you learning essential lessons and hinder your improvement. It annoys the heck out of me too when people apply for a programming job and cannot implement even trivial CS methods (like integer => string conversion with base N), then point out that they would just Google for a solution if they needed something like this. But to be honest,…

I have been programming professionally for 10 years, 5 years more as a hobby. I have been paid 100s of thousands of dollars, my code is used daily by 10s of thousands of people, I have built large, complex systems from scratch, worked in teams and by myself. The things I make do what they're supposed to, they don't break often[1], tend to be fast and usually my client is a happy bunny. I can fix anyone's code, even w…

> I can fix anyone's code, even when I've never used the language before [..]

You can jump into any codebase and solve core architectural problems like precise garbage collection, eventual consistency, or miscellaneous dead locks? I'm not making up contrived examples, these are some of the problems my friends and I are currently dealing with at work for different companies.

> I would only have a vague idea of how to do a integer => string conversion with base N without googling it. So am I shit? Am I suddenly a useless programmer because lazyjones only likes people who studied CS?

I've never had to do integer => string conversion until asked in an interview either and I still did it. It's not a difficult problem. Anyone with a basic understanding of division and string manipulation should be able to reason out a solution.

> You have picked an arbitrary, and extremely rare in the programming world, standard. No-one needs to write their own string handling routines any more.

I wrote my own C++ string library before std::string was introduced. I contribute to Rust which has its own string, big number, vector libraries and much more. The web site I work on gets >130M monthly uniques and we have extended Python's string, dictionary, iteration, and datetime modules because the standard library isn't enough.

> [Programming languages are] all pretty much the same after you've used 3 or 4.

Then you haven't used enough languages. Try functional programming via Haskell, or dependent typing via Coq, or concurrency via Erlang, or memory safety via Rust.

The world is a really big place. I know people infinitely smarter than me doing incredible things, and there are many more like them. Stop being limited by your own experiences.

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#114

Earlier quoted context omitted.

> Copy and paste doesn't help you at all with this. In some cases it may prevent you learning essential lessons and hinder your improvement. It annoys the heck out of me too when people apply for a programming job and cannot implement even trivial CS methods (like integer => string conversion with base N), then point out that they would just Google for a solution if they needed something like this. But to be honest,…

I have been programming professionally for 10 years, 5 years more as a hobby. I have been paid 100s of thousands of dollars, my code is used daily by 10s of thousands of people, I have built large, complex systems from scratch, worked in teams and by myself. The things I make do what they're supposed to, they don't break often[1], tend to be fast and usually my client is a happy bunny. I can fix anyone's code, even w…

I'd tend to agree with lazyjones. I doubt that his expectation is that you would know all the tricks for making the most efficient integer => string conversion routine ever, but I certainly would expect any competent programmer to be able to write an integer => string conversion routine without really thinking about it, not because anyone needs to write such code much anymore, but simply because a competent programmer should have sufficient mathematical understanding to see the obvious solution to the problem. This isn't about writing string handling code, but about demonstrating understanding of very basic mathematics using a trivial problem that should need a line or two of code in most programming languages to solve.

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#115
post #86

Earlier quoted context omitted.

IMO, as it often turns out to be, whether or not the code is copied and pasted doesn't matter by itself. A competent programmer borrowing code would likely factor it in in a way that won't present maintenance burden later on, and first of all would know when borrowing is appropriate. An incompetent programmer may produce problematic code even regardless of whether it's borrowed or original. (Though I'd agree that inc…

Agreed. I do actually copypaste code in some very specific scenarios. For instance, writing a string capitalization function for Javascript and not needing a whole string processing library. Sure, you copy paste a line of code after inspecting it, and save yourself some half hour of time on a piece of code that is not core to the problem you're solving. But I have never seen a programmer who says "I am in the busines…

I actually had someone bitch me out on StackOverflow for having an answer that wasn't useful to him, and it was slowing down his "above-industry average productivity rate". I had a damn good laugh about that one.

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#116
post #112

Earlier quoted context omitted.

There is a fair amount of code you should copy/paste unless you are doing pure research, some because it has been so well studied it is almost a certainty that you are not going to drastically improve on it and others, such as encryption implementations, because it is actively dangerous to fuck about with unless you are extremely careful and a domain expert.

If you're copy-pasting encryption implementations rather than using an existing library, you're probably doing it wrong.

Well yes, but libraries are really just an advanced form of copy/pasting and you can still do damage by using the library incorrectly, so you often end up using sections of examples by the people who wrote the library or who are otherwise experts in its use on how to implement the library correctly.

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#117
post #55
post #45

Earlier quoted context omitted.

I disagree with the author -- I never feel lost and stupid. There is always a way of bringing an idea to life, even if there are compromises and tradeoffs. But nowadays, I am forced to rely on third-party libraries. These libraries often change constantly and have "in-development" nuances. So, the OP regrettably is correct that searching the Internet is a requirement for working on modern applications. I do reminisce…

I bet the person who maintained your code felt lost and stupid though! The benefit of libraries is that the reference exists at all.

You assume that all libraries are bug-free and documented accurately! I assure you that few are.

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#118

"They don’t tell you that a lot of programming skill is about developing a knack for asking the right questions on Google and knowing which code is best to copy-paste." No, no, no! This always frustrates me. This is not 'coding' (maybe it is, and we should be doing less of it, and more programming). This is gluing together pre-coded snippets and trying to make it work. Continuing to do this is an impediment to gettin…

I completely agree with you and frankly I'm shocked to see most of the responses here purporting copy-pasting someone else's code to be a legitimate practice. I also imagine that most if not all of these people are into web developed where there's a long history of copy-pasting snippets of code and no one knows what he's really doing. I've seen many people write a jQuery script for their website and calling themselve…

Same. I'm actually a little shocked HNers think regularly coping and pasting code snippets off the web is ok. That's, kind of crazy.

This is bad especially for young developers (such as myself). Not to mention jeopardizing the security and integrity of your software project.

I hear 'don't reinvent the wheel' often written in blogs etc. That is not good. The lazy developer would read that and go, 'oh, I dont need to know how these things work, it's already been done for me. I'll just slap A to B, no need to reinvent anything'

Imo how it should read instead is, 'keep reinventing the dam wheel till you understand how it was made, only then you're free from reinventing it'.

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#120
post #112

Earlier quoted context omitted.

If you're copy-pasting encryption implementations rather than using an existing library, you're probably doing it wrong.

Well yes, but libraries are really just an advanced form of copy/pasting and you can still do damage by using the library incorrectly, so you often end up using sections of examples by the people who wrote the library or who are otherwise experts in its use on how to implement the library correctly.

Sure, you can argue that library use is copy-pasting, if those snippets you're pasting come with regression tests and have been code-reviewed by multiple people.

I'm going to go ahead and suggest that a tremendous number of encryption mistakes are made specifically because people copy-paste library invocations without understanding what they're invoking and why. When you just sling a chunk of code into a project without understanding what you're doing and why, the potential for bugs goes through the roof.

Post reply on HN