Ask HN: What change in your programming technique has been most transformative?
201–210 of 215 posts
Re: Ask HN: What change in your programming technique has been most transformative?
#202Re: Ask HN: What change in your programming technique has been most transformative?
#203Re: Ask HN: What change in your programming technique has been most transformative?
#2042. Figuring out unit and integrations tests
3. Embracing clean code paradigm and SOLID architecture
Re: Ask HN: What change in your programming technique has been most transformative?
#2052. Don't get into the trap of refactoring just because you read a new cool way of doing it unless, it's reduces half the size of code or improve performance multi fold. This might waste time as you could write a new feature or plan about it in that time.
3. Write very big elaborative comments. It's for future you as you can't remember everything, sometimes you need to know why you wrote that code or condition as you might not remember why you wrote it at that time.
Re: Ask HN: What change in your programming technique has been most transformative?
#206Earlier quoted context omitted.
This is certainly not true. Evolution of programming languages is circumstantial . There are many flaws in all of the ones you had listed. The marginal cost of deprecating something or breaking something is higher than the incremental cost of workarounds. This happens all the time from the laryngeal nerve in Giraffe to the evolution of a programming language, say JavaScript. Please don’t mix good design with populari…
> The marginal cost of deprecating something or breaking something is higher than the incremental cost of workarounds. So why are we in this python 2 to 3 mess?
Re: Ask HN: What change in your programming technique has been most transformative?
#207Earlier quoted context omitted.
I would have used flags if roles aren't dynamic
in our case they were not only dynamic, but also managed by the administrator on an account (by our customers, not by us the software creator)
Which would limit the scope of the "moderator" role explicitly to the tenant database.
Eg. https://martendb.io/documentation/documents/tenancy/
Fyi: The op, which i was responding too, was referring to using roles as const. Which is not dynamic :)
Re: Ask HN: What change in your programming technique has been most transformative?
#208two things 1) leading commas in SQL 2) RAISE an EXCEPTION or RETURN --no more `else` statements in code SELECT this , that , something FROM table takes a while to get used to
Re: Ask HN: What change in your programming technique has been most transformative?
#209Earlier quoted context omitted.
Wrong. Absolutely wrong analogy. You can't discount people who keep code clean, modular and simple. It's not an easy thing to do unlike cleaning your house. It just takes one's will to clean the house but when it comes to keeping your codebase clean, it's much more than just will. Sound knowledge of software architecture and design principles is required to write and keep your code clean and unfortunately, the number…
> It's not an easy thing to do unlike cleaning your house. It just takes one's will to clean the house but when it comes to keeping your codebase clean, it's much more than just will. Let me put it this way. I've seen no relationship with code purity and a happy client
No? Would you say then that you don't care if your food comes out slowly or gives you food poisoning?
You care about the result, but you trust it to someone else.
It is a Chef's responsibility to maintain the mise-en-place and food safety to a degree which enables him or her to keep delivering meals quickly and without salmonella.
It is an Engineers's responsibility to maintain the code clarity and tests to a degree which enables him or her to keep delivering improvements on business needs quickly and securely.
Re: Ask HN: What change in your programming technique has been most transformative?
#210Earlier quoted context omitted.
> It's not an easy thing to do unlike cleaning your house. It just takes one's will to clean the house but when it comes to keeping your codebase clean, it's much more than just will. Let me put it this way. I've seen no relationship with code purity and a happy client
Have you ever walked into a restaurant and asked to see how they refrigerate or organize their ingredients? No? Would you say then that you don't care if your food comes out slowly or gives you food poisoning? You care about the result, but you trust it to someone else. It is a Chef's responsibility to maintain the mise-en-place and food safety to a degree which enables him or her to keep delivering meals quickly and…
I find a lot of a certain kind of sw person who need analogies to make their mental model work. It never did for me