Ask HN: What change in your programming technique has been most transformative?
91–100 of 215 posts
Re: Ask HN: What change in your programming technique has been most transformative?
#92Programming in a team and accepting that it is not 'my' code but 'our' code. Not feeling slightly pissed when someone else changes the (not my) code. For me, this was a total game changer and a complete change in programming style. The focus changed to using the most common idioms, the clearest and cleanest and most concise way of writing stuff down, and avoiding smart hacks or, if necessary, encapsulating and docume…
We also follow very strict style guides, but this is all defined in formatters and linters, so there's no arguing against it.
Even for my personal projects, the first thing I do is usually set up .editorconfig and TSLint (if I use Typescript).
Re: Ask HN: What change in your programming technique has been most transformative?
#93I'm building internally used software, and getting feedback from stakeholders in the testing environment was hard work, and often impossible.
We went from roughly monthly releases to deploy-when-it's-ready, and this tightened our feedback loops immensely.
Also, when something breaks due to a deployment, it's usually just one or two things that could be responsible, instead of 20+ that went into one monthly release. Waaaay easier to debug with small increments.
Re: Ask HN: What change in your programming technique has been most transformative?
#94Static typings + type inference Parse, don't validate https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-va... All libs/products should be pure functions, with input output documented, making libs/products predictable Use in-app event sourcing to reduce the need for global states states DoD https://youtu.be/yy8jQgmhbAU In non bare-metal languages, this will be useful for readability For errors, return instead…
Turns out, years ago I was writing some C# code and I found myself wanting to explore something like that. However, it wasn't idiomatic for C# (especially at the time), and I talked myself out of it.
Since then, I've wondered if that's what people mean by type driven development. It's cool to see that is at least in the general ballpark.
Re: Ask HN: What change in your programming technique has been most transformative?
#95Learning different programming paradigms. For example, logic programming with Prolog makes you think about solving certain problems quickly and efficiently in a declarative style. Strongly-typed functional languages like SML and OCaml make it easy to use types and pattern matching to reduce errors and shift some cognitive burden from yourself to the compiler. Lisps allow you to quickly prototype functions in the REPL…
I found learning Rust valuable, as it forces you think about (and specify) ownership and mutability. It has exhaustive branch matching enforced by compiler, and it has no Null.
Also ChucK (and other niche languages are often cool). "ChucK is a concurrent, strongly timed audio programming language for real-time synthesis, composition, and performance"
I did a Coursera course on digital music creation in ChucK and it was such a joy, and such an unusual language.
Re: Ask HN: What change in your programming technique has been most transformative?
#96Voraciously eliminating unnecessary whitespace, especially vertical whitespace, was a trick I learned early. Most monitors are wide, not tall. When you can see a whole function without scrolling it's much easier to understand. I'll collapse 'if' statements to a single line in most cases to make it readable left-right instead of up-down. 1TB bracketing is my default unless style guidelines prohibit it. End-of-line com…
After some time I've noticed that I read the code much easier and understand flow when the indentation is similar to python or go.
Also, I keep my editor on a vertical half of the screen.
Re: Ask HN: What change in your programming technique has been most transformative?
#97Re: Ask HN: What change in your programming technique has been most transformative?
#98Basically it involved writing additional code to set up the app state to the state I need.
It went from changing a line of code, running the app, clicking/filling fields as needed, and then seeing the change reflected, to the app immediately being in the state that I wanted.
Now that I'm working in web-apps, hot-reloading is quite beautiful.
Re: Ask HN: What change in your programming technique has been most transformative?
#99Recognizing that there's a special power in resilient technologies. Those that keep chugging along decade after decade, and getting stronger, too. Not from inertia or monopolist effects or other kinds of random lock-in. But because they tackle a certain set of fundamental problems very, very well. Despite endless complaints about their fundamental limitations, conceptual flaws or alleged lack of scalability. SQL, Pyt…
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…
Evolution doesn’t ‘design’ anything, least of all anatomy.
The ‘special power’ is that they have stuck around, for whatever reason or circumstance.
Re: Ask HN: What change in your programming technique has been most transformative?
#100Something not mentioned yet. I find programming is the task of last resort and I spend a good deal of my time talking with the product person to help them refine their product idea into something that is mechanically sympathetic with how computers work and the general problem domain. It often adds 10% time for the initial work and -90% of the time for iterations. For example once we had a project that wanted to add R…
I would have used flags if roles aren't dynamic