Live data from Hacker News

How I became a better programmer (2017)

jlongster.com

31–40 of 150 posts

Re: How I became a better programmer (2017)

#31
post #21

Earlier quoted context omitted.

> If you learn to program in one language, it's easy to learn another, I assume that person doesn't know much about programming. This is flat out wrong. If you know Python, it'll be easier to learn Rust than having to learn Rust from zero. Engineering is about problem solving and formulating solutions with algorithms and data structures. If you don't know what those are yet, it'll take much longer to learn. Learning…

Sure, but it will still be a while before you aren't just writing Python in Rust.

It’s still easier than if you had never previously written an if statement. If there weren’t a lot of differences between languages then we wouldn’t have so many languages, but that doesn’t mean that there are not a lot of concepts that are used widely across many languages.

Re: How I became a better programmer (2017)

#32
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 Class would have been better than a function.

- I love old boring technologies and believe you can still make amazing websites with just PHP and jQuery.

- I don't come up with clever one-liners anymore. I write a 10 line for loop which I could easily replace with a clever one-line code golf.

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

Re: How I became a better programmer (2017)

#33
Some of it this was spot on, especially doing research. Very rarely you will be doing something completely novel and it always good to look at how other people have solved a problem.

However the old "Learn C" and "Write a compiler" which are within meme territory tbh. It is more important generally to understand what a particular in whatever language you are using to know what the compiler / interpreter / run-time is doing under the hood as most developers will be working with a high level language.

I've seen a lot of "how to improve as a programmer" articles and IMO what seems to be left out is learning how to do things as simply as possible. Many of the software systems I've worked on is so over-engineered, many simple websites are huge both client and server side and they usually don't warrant it.

Re: How I became a better programmer (2017)

#34
post #27

Also learn how to run a business. A weird suggestion on the surface but actually very powerful when understood. In short by learning how a business operates, how cash flows and how expensive things are (people, buildings, software, hardware, accountants, lawyers, ...) you'll begin to understand why an MVP is a powerful tool. you'll also appreciate Agile development practices more too. With an MVP you're writing the l…

I've found the ability to produce something quickly is almost orthogonal to being a "good programmer" (unless you define goodness that way.) Some are good quick-and-dirty implementers, some are deep design thinkers, some are just good at reviewing and giving advice.

Re: How I became a better programmer (2017)

#35

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…

+1. Add:

- Use long expressive variable/function/class names that tell me exactly what this variable/function/class does

I have to constantly fight the urge to have code fit in the littlest amount of space possible.

Re: How I became a better programmer (2017)

#36

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 did not like the whole Redux experience

Out of curiosity, anything specific that concerned you?

If you haven't looked at Redux lately, a lot of stuff has changed. We have a new official Redux Toolkit package [0] that is now our recommended approach for writing Redux logic, our new React-Redux hooks API [1] is easier to work with than the classic `connect` API, and we have an updated list of recommended patterns in practices in our Style Guide docs page [2] that should result in simpler and easier to understand code.

[0] https://redux-toolkit.js.org

[1] https://react-redux.js.org/api/hooks

[2] https://redux.js.org/style-guide/style-guide

Re: How I became a better programmer (2017)

#37
post #21

Earlier quoted context omitted.

> If you learn to program in one language, it's easy to learn another, I assume that person doesn't know much about programming. This is flat out wrong. If you know Python, it'll be easier to learn Rust than having to learn Rust from zero. Engineering is about problem solving and formulating solutions with algorithms and data structures. If you don't know what those are yet, it'll take much longer to learn. Learning…

Sure, but it will still be a while before you aren't just writing Python in Rust.

Writing Python in Rust unlike say writing C++ in Rust, might actually be a desirable thing. Put it this way, It will be a while before you are writing Rust like Python.

Re: How I became a better programmer (2017)

#38

I've heard so many things about Clojure. I am a CS student with some experience in the most used languages (JS, java, python). Can someone explain in simple cs terms why Clojure is sooo hyped? What can I do with this language that would be harder with other languages? From what I've gathered it's used in data wrangling and manipulation in general but most data-oriented tools are written in Python.

I believe it's hyped because is a more practical/modern lisp. I don't think it provides more fundamental benefits than any other lisp than access to a plethora of standard Java libraries. E.g. I cannot Java, but knowing clojure has allowed me to maintain a large inherited Java codebase. Afaik I could not have done that in common lisp (and not only because I don't know cl). I think almost everything is harder when you…

> I don't think it provides more fundamental benefits than any other lisp

Concurrency primitives and immutable data structures are part of the core language. This is probably more interesting than the lisp part itself, which is kind of a bonus. Rich Hickey's talks stress the former aspects a lot more than the later.

Re: How I became a better programmer (2017)

#39

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…

Most of that is good. One factor is if you are writing code for yourself to maintain or a team.

If it is for a team, you need to take into account if other people can understand your code. Practices like SOLID and just using the type system well don't make it slower to write code but will help maintenance down the road.

Re: How I became a better programmer (2017)

#40
I became a better programmer once I committed to mastering Vim.

Don’t know why, but the whole struggle of using it changed the way I thought about code and I gained the power to code at the speed of thought.

Post reply on HN