Live data from Hacker News

How I became a better programmer (2017)

jlongster.com

111–120 of 150 posts

Re: How I became a better programmer (2017)

#111
post #54

Earlier quoted context omitted.

congratulations you write horrible software

Depends on the perspective doesn't it? If the software does what it advertises, and gets to market faster than the competition, then by definition it is good software. It's only in our blinkered views that we ignore these considerations.

Software is never write once and done. You may get to the market faster in the first iteration, but the follow up iterations can come to a grinding halt because modifying, extending and patching the existing code now becomes an enormous challenge.

Re: How I became a better programmer (2017)

#112
"The most experienced programmer uses hacks all the time; the important part is that you're getting stuff done."

I couldn't disagree more, the grown up programmers use a strategic approach, not a tactical one. As Jonh Ousterhout put it in his book A Philosophy of Software Design "The first step towards becoming a good software designer is to realize that working code isn't enough."

Re: How I became a better programmer (2017)

#113

My comment is a little tongue in cheek but Here is "How I became a more productive by becoming a worse programmer" - I stopped worrying about best practices and just do it. - I hardly refactor my code unless I'm using the same thing for the fifth time. I just copy-paste it instead. - I never think about optimizing code until I really really need to. - I write what gets the shit done quickly. I don't care if writing a…

>Instead of writing my own code, I usually search Stackoverflow first to see if I can do some copy-paste it instead.

Yet, I find most of the code snippets posted to Stackoverflow to be garbage. I despair if these are being copy and pasted into production stystems :(

Re: How I became a better programmer (2017)

#114
post #12

Earlier quoted context omitted.

I would expand that to "If you learn to program in one language, it's easy to learn another within the same paradigm" . If you know Python, Ruby or PHP will be pretty easy for you to pick up. You might have some difficulties with Haskell and Lisp.

I'd add that spending some time to play with the languages that are hard or different will pay dividends down the road. Learning some Haskell was probably the most worthwhile time I have spent learning a language because it forced me to fundamentally reevaluate how I think about programming. Now I don't use Haskell at work, and likely never will; but, years later, the techniques I learned from it I still apply daily…

I feel this same way about Clojure, I won't likely ever use it professionally, but it's made me a better programmer having learned it.

Re: How I became a better programmer (2017)

#115

"The most experienced programmer uses hacks all the time; the important part is that you're getting stuff done." I couldn't disagree more, the grown up programmers use a strategic approach, not a tactical one. As Jonh Ousterhout put it in his book A Philosophy of Software Design "The first step towards becoming a good software designer is to realize that working code isn't enough."

100% agree. The "hacks" and "get stuff done" approach gains quick and short benefit, which probably fits a freelancer/contractor role. Maintainable and testable code should be implied.

It's not about how fast you get to code to production, it's about how fast code/product can be adapted to new or unexpected requirements.

Re: How I became a better programmer (2017)

#116
post #12

Earlier quoted context omitted.

I would expand that to "If you learn to program in one language, it's easy to learn another within the same paradigm" . If you know Python, Ruby or PHP will be pretty easy for you to pick up. You might have some difficulties with Haskell and Lisp.

I'd add that spending some time to play with the languages that are hard or different will pay dividends down the road. Learning some Haskell was probably the most worthwhile time I have spent learning a language because it forced me to fundamentally reevaluate how I think about programming. Now I don't use Haskell at work, and likely never will; but, years later, the techniques I learned from it I still apply daily…

Whenever a newish programmer has asked me what language they should learn next I always say prolog. I fully expect them to never touch the language afterwards, but writing prolog was a truly a mind opening experience. More so than learning functional programming imo.

Re: How I became a better programmer (2017)

#117
post #68

About a decade ago when OOP was just booming in the PHP world, I wrote my own database abstraction layer because I was a bit tired of the ORM's that existed at the time (Doctrine, Propel, ZF). Taught me what makes a beautiful fluent interface and the difficulties of achieving them. Helped me to think about UX experience at a code level, trying to achieve an interface for developers that fits all ages. That was an eye…

> I think what makes a great programmer is that they are able to think at a macro-level, thinking about how 'others' will use and apply the code, and making it look deceptively simple. I don't fully agree. Yes, some programming needs to be done at a meta level, but far from all of it. Sometimes a software engineer is just there to solve a business problem, and in that case what makes them great is efficiently solving…

I would say that's the difference between making something work. And Making at work in an elegant way.

Re: How I became a better programmer (2017)

#118

My comment is a little tongue in cheek but Here is "How I became a more productive by becoming a worse programmer" - I stopped worrying about best practices and just do it. - I hardly refactor my code unless I'm using the same thing for the fifth time. I just copy-paste it instead. - I never think about optimizing code until I really really need to. - I write what gets the shit done quickly. I don't care if writing a…

Your code is probably a nightmare for the next person to maintain. Have you ever worked on the same project with your own code for more than a year or two?

Though I'll agree with you on two points - boring old technologies and searching Stack Overflow.

Optimizing code is something you don't need to worry about a lot of the time. Having understandable code is a lot more important in my opinion, but you don't seem to care about that.

In saying that there are plenty of jobs where code doesn't need to be maintained. Most bioinformatics research just need to produce a graph or heatmap and gets used once, so maintainability isn't so important.

Re: How I became a better programmer (2017)

#119
post #41

My comment is a little tongue in cheek but Here is "How I became a more productive by becoming a worse programmer" - I stopped worrying about best practices and just do it. - I hardly refactor my code unless I'm using the same thing for the fifth time. I just copy-paste it instead. - I never think about optimizing code until I really really need to. - I write what gets the shit done quickly. I don't care if writing a…

Not to be rude or anything but if you continue down this road productivity might be the only thing going for you and you'll soon realise you are the only one who can work with your code. Substitute software engineering with any other engineering descipline with "I stopped worrying about best practices" and you will be able to see what's wrong with your approach. But then again, if it's php, your domain doesn't requir…

I like Joe Armstrongs 7 deadly sins.

1. Code you wrote you cannot understand a week later - no comments.

2. Code with no specifications.

3. Code that is shipped as soon as it runs and before it's beautiful.

4. Code with added features.

5. Code that is very very very fast and very obscure.

6. Code that is not beautiful.

7. Code you wrote without understanding the problem

Re: How I became a better programmer (2017)

#120
post #41

Earlier quoted context omitted.

Not to be rude or anything but if you continue down this road productivity might be the only thing going for you and you'll soon realise you are the only one who can work with your code. Substitute software engineering with any other engineering descipline with "I stopped worrying about best practices" and you will be able to see what's wrong with your approach. But then again, if it's php, your domain doesn't requir…

Although I agree in general, a 10 line for loop is usually more readable than a clever one liner.

Sure but 10 lines is often more places for bugs to hide.
Post reply on HN