It is a similar pitfall that developers step into when they optimize their code before profiling where the bottlenecks are at.
But of course you should still do all of this, because it is a lot of fun and Vim rocks.
It is a similar pitfall that developers step into when they optimize their code before profiling where the bottlenecks are at.
But of course you should still do all of this, because it is a lot of fun and Vim rocks.
Author here. For reference I've made 5 courses over the last 4 years and have written over a million words. I also have 200+ blog posts and have hundreds of thousands of lines of code written across a bunch of projects.
In other words, I hope I know what my bottlenecks are with my environment. It's not specifically editing text, but it is managing a shit load of words across many hundreds of files and also switching between projects.
With no real prior Vim knowledge (I looked at it once many years ago) it took a solid weekend, and when I say solid, I mean I spent 10 hours both days researching Vim features, watching tutorials, following along with tutorials and slowly introducing a couple of plugins I knew I wanted (based on exact problems I had).
That got me to the point where I had the environment mostly working with a decent enough config file. Then I spent days floundering around like an idiot while I hardcore failed to even do simple things like "move to the 2nd to last word in a sentence and then wrap the last 2 words to a new line". Doing that without arrow keys and no mouse almost killed me initially.
After about a week of immersing myself I got to the point where I didn't feel like I was completely destroyed by a foreign environment. During this week I wrote about 10,000 words and worked on a couple of freelance programming gigs.
In my opinion, it was worth the 20 hours of set up + 20ish hours of not being as productive to set me up for the next 5+ years.
Plus as you mentioned, a side effect is it happens to be a fun too. That's a win win!
I think another way to look at it is that humans are terrible at perceiving reality over time. Our understanding of what problems are most pressing are often only accurate to criteria that we aren't aware of judging. Ie, psychological biases built around your world view can have material impact on what you perceive as the most pressing problems - especially when trying to boil down thousands of hours of data points.
That's not to dismiss your findings - it's simply to say I distrust human perception, benchmarks are needed. Hah :)
https://github.com/vimwiki/vimwiki
Also, consider checking out this blog post that describes a somewhat similar journey to incorporating vim (and vimwiki) in one's workflows:
I do it more with emacs and self-made CLIs, but I think the person choosing the path is the right way. It melds it perfectly to your tasks and mind.
I'm pretty content with this current set up but I'm always learning, so I have to ask, what made you choose Emacs in the end?
Was it org mode exclusively, a general disinterest in Vim keybindings or something else?
I heard this many times and believed it, but after some time I think this is bad advice.
Here's mine:
There are two kinds of performance optimizations: free optimizations and optimizations with a cost.
The free ones are things that don't really take any extra complexity to implement, just a little thought. Using a hashed data structure instead of an array when you'll be accessing items randomly by id. Breaking early from a loop.
If you never think about these things unless you're explicitly on a profiling task, your code base will be full of "easy wins" that you have to go back and find and fix. Which will be time consuming and error prone if you do it after all your code is written.
The other group of performance fixes is ones with a complexity cost: adding a cache layer, rewriting an algorithm in a slightly more confusing way, etc.
My advice is: always pause when you are designing a new feature and think about whether there are "free" performance wins. You can implement them now with no cost, and you should. It often helps with your data design anyway, getting code that more closely matches the actual processing domain.
It doesn't have to take more than a minute. Anything bigger than that, yes: punt it til after you have profiled.
To me the advice means don't belabor the choice of data structure of its not obvious to you.
If you're writing a quad nested for loop to solve a problem, don't get distracted trying to refractor all the work leading up to that wart... Just get it down first.
Get a passing test first then optimize later if the code is a bottleneck.
In that case, totally get that test passing and then maybe add few more tests around that solution - so that when I come to the project half a year later, and see the application consing like crazy because you used lists instead of arrays, and this now powers half of the business logic, I can tear this up and fix the data structure with confidence I won't break things badly.
(Totally not a real case I had.)
As GP is saying, at any given complexity and readability level, you can write the code in a more and less performant way. Writing more efficient code takes just a) willingness to consider performance, and b) willingness to actually learn your toolset as you use it.
Not to mention the aesthetic pleasure of making your tools a joy to use.
Imagine changing jobs. At your new job, you'll be able to go faster because you have a well optimized workflow.
It doesn't matter to your new bosses that you previously spent an ungodly amount of time optimizing your workflow and learning advanced tools, the only thing they're seeing is a productive employee.
Sure...but how long will they stay bald? :)
There's also many legends of people going mad trying to shave this particular yak so...
Heh, probably. You should also compile your own kernel once (maybe even go for a LFS setup), configure FVWM with bells and whistles and probably a few other things I'm forgetting now :)
It's being happy. It's knowing you're using tools that let you get things done in a way that works best for you.
Something like this has infinite value because it's the difference between waking up and dreading doing something because of the upcoming million paper cuts VS waking up really excited to do your task. That's the difference between writing nothing one day vs writing 5,000 top quality words.
So you have a task that takes X time. What's say optimizing it is a net loss time-wise because it doesn't in aggregate save you more than you spent to perform the optimization. Say after optimization it only costs 0.8X time but it took 0.2X time to do the optimization so all benefit cancels out. But the difference being now happiness is 1.5 multiplier so you feel 50% better and the same aggregate amount of time is spent but it's much more enjoyable and therefore more valuable to you.
Maybe I'm not explaining it well, but I totally feel this way about plenty of stuff.