Live data from Hacker News

How I became a better programmer (2017)

jlongster.com

41–50 of 150 posts

Re: How I became a better programmer (2017)

#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 require too much care.

Re: How I became a better programmer (2017)

#42

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.

Clojure doesn't have much over JS except for macros, but today you can achieve the same with Babel. If you stick to writing JS in a functional programming way like Clojure encourages to do so, you are pretty much just writing Clojure but with a little bit more verbosity for keeping things immutable and to compensate for JS's lack of standard library (fixable with libs like lodash and immerjs).

When devs talk about data in Python their are referring to data science, it has a big ecosystem to support that, Clojure doesn't. Data-oriented in Clojure means using generic data structures like maps/vectors/sets to represent information, instead of creating classes for everything.

Re: How I became a better programmer (2017)

#43

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…

Everything your doing is perfectly ok as long as the productivity gains are there. The lack of a generic function where something occurs 5 times has potential future risk only because it makes refactoring harder. But if you don't deliver a product because your lost building generic things then you don't get to have legacy and support problems.

In fact I'd say that until someone is able to quantify the revenue lost and be able to directly tie it against the choices you are making then stay the course.

Re: How I became a better programmer (2017)

#44

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…

As a recent convert to redux who ended up recreating it from first principals but in a much much clunkier way, I highly recommend anyone writing a UI in 2020 to have a damn good reason to not use react and redux. It's so well designed today. Well worth the time to learn.

Re: How I became a better programmer (2017)

#45
Doesn’t expound upon two of the most important things: (1) focus on business value over technical challenge (if anything this preaches the opposite) and (2) learn how to get as close as possible to the global optimum in the 3D space formed by time, cost, and quality, depending on the situation.

Re: How I became a better programmer (2017)

#46
> But you shouldn't do that until you've done some cursory research about how people have solved it before. Spending a few days researching the topic always completely changes how I am going to solve it.

Personally this typically ends up in me just dropping the problem altogether

Re: How I became a better programmer (2017)

#47

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…

Ironically, even this list is a set of best practices that are sometimes specific to the use case.

Re: How I became a better programmer (2017)

#48
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…

Exactly. I had coworkers like this, and their code was impossible to understand. To make a simple change to it, it would require days of refactoring just to know you weren't going to introduce a bug.

It's not being more productive, it just seems that you're getting things done faster because you're taking out a loan on the quality of your software (i.e. technical debt) with every line you write.

Re: How I became a better programmer (2017)

#49

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…

5 times is perhaps a bit high, but many best practices advocate for not abstracting until you re-use the code >3 times, since you may end up adding too many conditionals in to handle all the slight variations.

Also - as long as your code is written to be easily readable and refactorable, refactoring can be done when needed. It’s dense complex code that’s too tightly coupled that’s the long-term burden.

It’s often about how the code fits together rather than the individual syntax itself.

Re: How I became a better programmer (2017)

#50

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.

Clojure has a focus on immutable data. With Python, a list or dictionary is mutable and with parallel execution this can result in one function mutating a list that another is using. Or even without parallel execution one may wonder if a function somewhere in the call stack is mutating a list. Jokingly called spooky action at a distance. In general mutation makes reasoning about code more difficult. Clojure has a nice set of orthogonal functions for transforming persistent data structures. Once you wrap your head around how to program by transforming data instead of mutating data, you might enjoy that method of programming. Python has pyrsistent library, but Clojure is immutable first and in Python it is not really the norm.
Post reply on HN