News for hackers. Stuff that matters.
Re:Some reasons to work on productivity and velocity by Jensson on Friday October 15, 2021 @06:14PM (#28883752)
> Too many people are extremely static in their assessment of their skills. They make overarching claims like "oh I'm just not good at cooking" or "I just can't type very fast", when they can remedy these issues with practice.

The people with the biggest blockers are those who argue along the lines of "learning skill X isn't even important, no learning skill X actually makes you worse!". That is the perspective so many here takes on becoming faster at programming. They actually argue that practicing being fast will actually make you worse at your job! Such people will never improve, they are stuck where they are forever.

Re:Some reasons to work on productivity and velocity by crate_barre on Friday October 15, 2021 @09:34PM (#28884896)
No one argued against that. We argue that the value proposition is dependent on defeating the other. I prefer not to because, how many others will I race against in life? The indefinite race is unfulfilling. More commonly, we call this the rat race.

I’ve beaten people in the race, and have been beaten myself. My career as a perpetual online matchmaking ranked game is … in so many words, not what I want.

To be forever racing, in age, under duress, or worse, needlessly, villages are not built this way.

Agile pits people against each other in an ultimate form of relativism. The constant question is ‘what did you do yesterday’, every single day. Hey, I did what I could, with the constant retort being ‘oh, but the other did this’, it’s gladiators. Forever stuck in the coliseum. And there will always be the other.

They use the simplest shittiest psychological tactic.

Re:Some reasons to work on productivity and velocity by megameter on Friday October 15, 2021 @09:55PM (#28884957)
I think the rat-race idea got baked deep into SV largely because of the setup of the post-1970 economy, and specifically California's rules: every startup had to be "fast" and "hit the ground running" not just because of literal business pressures, but because implicitly, everyone intends to exit and move on to the next thing immediately, so a slow-moving part-time effort would be a no-go. That derived just from mundane realities about the market, legal and financial environment, and protections afforded towards workers and businesses - everyone knows that we moved in the direction of corporations squeezing the workforce because they "couldn't afford" to build them up. Therefore career mindsets filtered to accommodate only those with the gold rush viewpoint, because the only way to win that game was to strike it rich and retire.
Re:Some reasons to work on productivity and velocity by crate_barre on Friday October 15, 2021 @10:14PM (#28885022)
I’m fascinated by who is downvoting you without an explanation.
Re:Some reasons to work on productivity and velocity by rsj_hn on Friday October 15, 2021 @10:27PM (#28885079)
I don't think you're allowed to reply to a comment and also downvote it.

Suffice it to say, the comment is not rooted in any reality of what Silicon Valley was like, it is pure uninformed speculation, salted with a heavy dose of facile anti-capitalist talking points. It's lazy and factually incorrect.

First, things weren't that fast in the past. They were more fast relative to the old system of being employed for life. You know, that system of hierarchy where even the office furniture you were allowed to have was spelled out in a corporate handbook that assigned levels to everyone and created a rigid hierarchy. So who broke that system? It was the treacherous eight. They broke it, and they started Silicon Valley.

Second, it was about empowering the worker. When the treacherous 8 left Schockley's Lab, they were told they would never work again because you don't go and quit your boss because you don't like him or disagree with his technical roadmap. You are supposed to be loyal and stay. They called and wrote to hundreds of businesses begging them to invest in their idea and couldn't find anyone until Fairchild took a chance on them. Their success changed that old system of workers being morally obligated to stay with their boss, and the boss being morally obligated to find something for them to do.

Third, workers were actually empowered with stock options. Something unheard of at the time. It was called communism. That investors and entrepeneurs would give a share of their company to their workers. That system originated in SV during this period, and it led to a lot of churn as start ups began to try to outbid each other and established companies for workers, draining talent from those companies that refused to play along and give stock options. Yes, this led to an emphasis on speed and higher employee turnover. But it was because firms kept outbidding each other to lure away workers by dangling stock options in front of them.

This is why Noyce left Fairchild semiconductor - not because he wanted stock options, he was already wealthy from the buyout, but because he couldn't retain his best employees, and Fairchild was morally opposed to the idea of stock options. All these workers leaving and staring their own companies and then luring away their coworkers led to skyrocketing wages rather than all the wealth leaving Silicon Valley and being distributed back to shareholders in Wall Street. A lot of that wealth was put in the pockets of workers for the first time. This is what led to the price of a bungalow in Palo Alto costing three million dollars. That's what happens when you dump so much money on workers.

I could go on and on actually talking about the history, but what's the point when someone reads a pamphlet about how unfair capitalism is, and decides to go on a rant about how oppressed SV workers must have been in the 70s. The 70s in general were bad for capital, great for labor, with rising wages and rising inflation, as well as massive investment -- extreme levels of investment. The 60s were a boom time for corporate profits, but not the 70s. Anyway, this is all part of basic econ history people should know before waxing about how workers were being abused, etc. So in most cases people just downvote statements like the GPs post and move on, without refuting each misconception in detail.

If you want to know more, check out the American Experience episodes on Silicon Valley. They are pretty good.

Re:Some reasons to work on productivity and velocity by waterhouse on Saturday October 16, 2021 @01:42AM (#28885813)
> I don't think you're allowed to reply to a comment and also downvote it.

Close. You're not allowed to downvote a comment that is a reply to your comment. (Or a comment >24hrs old, or if your karma < 500 (IIRC).)

Re:Some reasons to work on productivity and velocity by porknubbins on Friday October 15, 2021 @08:40PM (#28884651)
I wish I could identify a finite set of tasks at which to practice and get much faster. The tradeoff between getting faster at one thing and learning a new thing that could potentially improve my productivity even more is never really clear to me. Someone can have perfected their craft in X and then something better comes along and replaces the whole paradigm.
Re:Some reasons to work on productivity and velocity by heisenbit on Saturday October 16, 2021 @06:24AM (#28886838)
Your question: There is no finite set. There is no end to it. This is a process. You do it over and over. You don‘t invest into a set and be done with it (and likely over-invested in some). One step at a time. And once in a while reevaluate the territory.
Re:Some reasons to work on productivity and velocity by kthejoker2 on Saturday October 16, 2021 @01:31PM (#28889575)
I offer nothing definitive, but one of the greatest benefits of StackOverflow has been to quantifiably classify most of the common problems in computer science, programming, analytics (and to a lesser extent the other StackExchange communities ...)

If you go there, search for a tag, sort by popularity, etc. - most of those techniques and approaches and patterns are, if not timeless, then mostly timeless and relevant.

Re:Some reasons to work on productivity and velocity by Jensson on Saturday October 16, 2021 @01:12AM (#28885711)
Master the basic building blocks of programming. Frameworks comes and go but the basics are the same. Master as in "I do X correct the first time even without thinking" not "I know how X works". The "do without thinking" is when your subconscious is doing it for you so your conscious doesn't have to. You want to put as much as your work there as possible, it is like putting work on a GPU instead of your CPU, so every reusable programming trick and pattern should be there. This also helps you reason about code since now your sub consciousness can build code on its own and therefore help you reason in much larger chunks.

A person who hasn't mastered loops and conditionals will fail FizzBuzz. That is bad, you recognise that I hope. But it doesn't end there, you can master so many more powerful parts of programming and get as fast as you were at FizzBuzz att many other much more complicated tasks as well. Ultimately programming takes time due to all the parts you didn't master, but when you have mastered enough parts then you can fit just about any problem into parts you have mastered and code them up extremely quickly.

So the speedup you see is roughly the speedup you saw from at first struggling a lot with loops and conditionals early on when learning programming, to today when you do them effortlessly and instantly. Now the other things to master aren't as simple patterns as loops or conditionals, but the end result is the same improvement in speedup and effort.

For example, competitive programming is about mastering a ton of such chunks. You don't memorize solutions to get fast, you master thousands of such chunks and compose them to solve problems in 5 minutes that would take regular programmers 5 hours if they can solve it at all. I went that route and it is similar to how people master chess, a grandmaster makes better moves after a few seconds of thinking than a typical chess player who has played for years thinking for many minutes.

It took about a year and then I could solve hard problems at similar pace as the best in the world with basically no errors, compare that with spending 4 years in college, I think the practice is worth it, I have never needed to practice that again as the chunks I mastered doesn't go away, it is like learning how to ride a bike. You forget the details, but your subconscious wont forget those chunks. Of course I can't solve hard competitive programming problems in 5 minutes today, but I can solve most leetcode "hard" problems I haven't seen before in under 15 minutes and basically all of them in under 30 even though I haven't practiced these things for many years.

Now, this wont solve all your programming woes, you still need to understand requirements, talk to customers, learn API's etc. But at least you are no longer bottle necked by composing programs. Instead you can throw together MVP's quickly, show prototypes to make discussions more fruitful etc. Also most jobs doesn't requires this level of mastery, only do it if you aim to join top teams using your technical skills if you really get good at this then many teams that wouldn't care about you before now gets very interested in you since so few are this fast, or if you want to build your own products on your own, or if you find mastering things fun.

Edit: Sorry for edits, but here is last bit. When I worked at a high performing team at Google I averaged over 500 lines of code a day going through code review and running in production when I wasn't constrained on non-programming bits like understanding the problem etc. To do that you write 10 changes, each about 50 lines and trivial to review since everything is super clean, otherwise you can't get through code reviews fast enough. Code reviews, unit tests, fixing edge cases etc, none of that are excuses for being slow. Now it is still fine to be slow, I don't blame people, I'm just saying it is possible to be fast if you deliberately practice a lot to be fast.

Re:Some reasons to work on productivity and velocity by ZephyrBlu on Saturday October 16, 2021 @03:33AM (#28886208)
> To do that you write 10 changes, each about 50 lines and trivial to review since everything is super clean, otherwise you can't get through code reviews fast enough

No matter how small or clean the PRs were, I'm pretty sure I couldn't get reviews for 10 in one day.

Re:Some reasons to work on productivity and velocity by Jensson on Saturday October 16, 2021 @06:29AM (#28886874)
Maybe the review tooling you use aren't good enough? At google it shows all test runs related to the change, it shows linter information inline in the file diffs, you automatically associate it with tasks it is meant to solve and you write a 100 word description to explain what it is doing and why.

If the change adds tests, has proper naming, solves the issue it says it is solving in a reasonable way, doesn't solve anything it doesn't say it is solving, and none of the tools complains then you just accept it after looking at the tests being reasonable and the code not looking strange. It takes a while to get new engineers where they do this consistently before review, and then review takes time, but once you know how to write changes that are easy to review then reviews are very quick.

Edit: Btw, optimizing the code you write to reduce review time is also another aspect of productivity. It isn't productive to give a lot of extra work to others, so you practice until everything is as obvious as possible. And as people get used to your changes being easy to review it gets even quicker.

Re:Some reasons to work on productivity and velocity by ZephyrBlu on Saturday October 16, 2021 @06:43AM (#28886943)
It's less about setting up for the review and more about getting teammates to review the PRs promptly.

I work remotely, so my (Small) team mostly works async even though we're in similar time zones. I doubt trying to ping them for 10 PR reviews in a single day would go well.

Async + people trying to do their own stuff + 10 interruptions is not a great combo. Comments/discussion on a PR can grind things to a halt as well.

I completely agree everything you're saying about making PRs easy to review though. My team already tend to do those things thanks to our manager.

Re:Some reasons to work on productivity and velocity by Jensson on Saturday October 16, 2021 @06:52AM (#28886973)
Could be about incentives then. At Google the code reviews you do are tracked so doing many looks good for your performance reviews, so some people try to be fast with reviews to get more reviews. If you don't get any credit for doing code reviews then I can see it being very hard to get people to do them though.

Also as long as you have a pending review sent to you it shows up as a "you have stuff to do" icon in the google tools until you respond to it, just like if you got a message, I guess that helps as well.

Re:Some reasons to work on productivity and velocity by ZephyrBlu on Saturday October 16, 2021 @07:04AM (#28887024)
Interesting. We don't track code reviews as far as I'm aware, and we use GitHub so you just get an email if you're tagged as a reviewer.

I would say it's not uncommon to have to wait a day for reviews.

Re:Some reasons to work on productivity and velocity by Jensson on Saturday October 16, 2021 @07:09AM (#28887039)
The the first thing to do if you want to improve that is to ensure you track code reviews. Meaning, you can see what changes each person reviewed and not just submitted, and then you can use that data to talk about performance etc. If one person does all the reviews then he should get a ton of credit since that is hard important work. Typically lead programmers do more reviews and juniors writes more changes, so a person doing a lot of reviews is associated with seniority and something to strive for rather than avoid. Also I bet your manager would be interested in that information as well, so maybe you just need to suggest it to them.
Re:Some reasons to work on productivity and velocity by tharkun__ on Saturday October 16, 2021 @03:35PM (#28890752)
There's a huge problem with this. The incentive you are describing isn't to do good code reviews. The incentive there is to do a lot of code reviews. Those two are not the same and while they are not mutually exclusive, just by tracking this metric and rating people on it, you are not giving an incentive for good code review. Only for fast review. But you really want both. You want fast and you want good and thorough.

I completely agree that senior and lead people should be doing more reviews and thus help everyone else, ultimately benefiting other programmers and the whole organization overall.

Re:Some reasons to work on productivity and velocity by Jensson on Sunday October 17, 2021 @05:30AM (#28895121)
The incentives for reviewing code should be exactly the same as the incentives for writing code.

So the most important part is that the reviewer should be just as visible in all processes and tools as the writer of the code. That way both gets recognition and both gets the blame when the code is bad or adds technical debt. And for performance reviews you don't just look at all the code they wrote, you also look at all the code they reviewed.

You are right that it is dumb to just count the number and say more is better, but the same goes for code submissions. They are very similar problems though so you can just use the same process for both of them.

Re:Some reasons to work on productivity and velocity by tharkun__ on Sunday October 17, 2021 @11:30AM (#28897169)
And that last part unfortunately is what happens in a lot of companies. Basically taking something like your comment I replied to: "Look at metric X" and verbatim looking at that metric and only that metric (or maybe that and 2 or 3 others) and there's your performance review.

You mentioned another metric "code submissions", so say the number of reviews done is augmented by number or PRs merged. You've just created another incentive to just get a lot of code out fast.

After all, that's the point of the metrics, right? Have a few numbers that accurately describe the "value" of that employee. </sarcasm> No qualitative analysis needed, that would take time and money we don't have. Been there, had to do that (or write huge amounts of text to say why I think that this employee is actually really good at what they do and the number of PRs they did was low because they got the short end and worked on the hardest problems in the worst parts of our code base and did an amazing job especially given they were new.

If that's not how it's actually done where you work, great!

Re:Some reasons to work on productivity and velocity by novok on Saturday October 16, 2021 @11:22PM (#28893657)
What are the 'chunks' of competitive programming? Like knowing how to make a graph, use hash tables / arrays well, a typical dynamic programming solution and so on?
Re:Some reasons to work on productivity and velocity by Jensson on Sunday October 17, 2021 @05:03AM (#28895008)
No, its mostly how to structure the full computation flow for different things. If there were an easy set of patterns then it would already be in some book, these things are skills you can't put in a book.

For example, when is it useful to create a function instead of writing the code inline? Many times the amount of code grows exponentially with problem size unless you properly create good functions, so you need to learn to get good at that. Code reuse also greatly improves how fast you can write the solution and reduces bugs, so it is good even when it isn't absolutely necessary.

Where should the data be, who should own what data, how is the data supposed to be found where you need it? And so on. Many problems requires you to create quite elaborate data structures and relationships, finding the right data in a reasonable amount of time is one of the hardest problems to solve even in competitive programming.

Caching and lazy computations as well, it is used everywhere in competitive programming. The fastest solution is where you don't do anything at all, so you get good at understanding how and when to cache results, when to throw out caches in order to handle new data etc.

Writing proper tests, since you get no credit if your code fails for any case you need to write tests that stresses all parts of the code you are unsure about. This teaches you to get really good about understanding the weaknesses in the code you write, debugging and creating solutions that are bug free.

Stuff like that is really important to get good at competitive programming, you need to be able to get good answer those questions in minutes for complex problems if you want to compete with the best in the world. Now you might notice that many basic data structures and algorithms are just solutions to the above problems, the point is to learn many generic cases of the above so you can compose your own data structures and algorithms as everyone of the harder problems requires you to do that.

And as you can realize these things are very useful for any sort of program, not just competitive programming. Managing data layouts and when it is useful to create functions is the majority of normal programming, if you can do those really quickly then there isn't much left that will take time.

Now, the bad rep competitive programming has is mostly that people just do the easy problems that can be summarized as "implement this basic algorithm". Real competitive programming isn't like that at all. Of course you need to be able to do the simple algorithms, but knowing how to implement the algorithms is just table stakes.

"Don't I practice these things when writing normal programs?"

Not in the same way. Competitive programming is about doing these in their pure form. In normal programming there are so many other things that it is hard to focus on the code, while in competitive programming all you have is code and then a really good test suite you can do to verify your solution once you think you are done. This way you practice a huge range of programming chunks really quickly, compared to trying to test them out and learn them in real world codebases.

Edit: Btw, last time I checked Leetcode didn't have many questions that stresses these important points, its mostly just useful to learn algorithms used in these interviews, it isn't good to learn programming. There are many good competitive programming sites to use instead. Leetcode is good if you want to pass interviews with minimal effort right now, but it isn't good if you want to get good. Also you just get good at chunks, you will still need to practice writing and structuring larger programs and solutions. But practicing that is way easier when you have mastered these chunks.

Re:Some reasons to work on productivity and velocity by lampo100 on Sunday October 17, 2021 @02:07PM (#28898398)
Out of curiosity. What would be the best way to learn these skills in your opinion? What are these "many good competitive programming sites" that you recommend?
Re:Some reasons to work on productivity and velocity by Jensson on Monday October 18, 2021 @05:41AM (#28903732)
The site I used is codeforces.

https://codeforces.com/?f0a28=1

It has the widest selection and types of problems as far as I know but that was a while ago. It runs competitions all the time, the problem descriptions are well defined unlike leetcode which often misses a lot of requirements, it has way more kinds of problems than topcoder, you can test yourself against old competitions as if they ran real time to properly ensure you don't take too much time or accidentally cheat etc.

> What would be the best way to learn these skills in your opinion?

I think today it is hard to practice without competitive programming. Ideally someone would make a similar format pushing your limits like this but without so much focus on complex algorithms and maths, but since that doesn't exist competitive programming is what we are left with. The competition aspect is really important since it is how people push each others limits. It is easy to think "you can't get much better than this" when you just sit and code by yourself, but in programming competitions you see how fast and accurately others can solve problems, so you realize that you could get just as fast and accurate with a bit of practice.

And no, it is not memorization. Consider this easy problem which mediocre competitive programmer manages to solve but those below mediocre fails at (we can see that from how well people did on it in the competition):

https://codeforces.com/contest/1496/problem/B

There is no algorithm you have to know for that, it is just good old logic and some coding. It is really easy and I could solve in in a few minutes even my todays rusty self, but you can't memorize solutions to such problems, you just have to be fast both with the reasoning and the code. Note "mex" is not a standard term, it is just something they made up for that problem.

Re:Some reasons to work on productivity and velocity by novok on Monday October 18, 2021 @12:45PM (#28907584)
Thank you for your very detailed and helpful replies.
Re:Some reasons to work on productivity and velocity by Zababa on Saturday October 16, 2021 @05:37AM (#28886637)
I feel the same way, but I also think that in all of the time I've spent thinking about it, I could have learned a bit of Vim or better typing, or something.
Re:Some reasons to work on productivity and velocity by auggierose on Friday October 15, 2021 @07:42PM (#28884369)
There is only a limited amount of time in life. It matters on what you spend it. Given that the way programming in industry is done is generally fucked up, working super hard at becoming super fast at doing that brand of programming can be a waste of time. Of course that depends on what your goals are.
Re:Some reasons to work on productivity and velocity by fddhjjj on Friday October 15, 2021 @09:14PM (#28884808)
Interesting POV. Can you elaborate on an alternative to the way of industry programming? Or more simply, list some of the ways in which industry brand programming is flawed?
Re:Some reasons to work on productivity and velocity by bigbluedots on Friday October 15, 2021 @11:58PM (#28885431)
Not the poster, but IMO we are craftspeople being made to work like assembly line workers.
Re:Some reasons to work on productivity and velocity by peytoncasper on Saturday October 16, 2021 @10:33AM (#28888144)
I would argue that assembly line workers were once craftspeople.

Craftsmanship still exists, but it’s specialized and focused on products that can demand the higher price.

Is this not the same with software?

CRUD work is almost infinite and demands higher output at the expense of quality.

Contrast that with unique OSS projects, and defining product features.

Re:Some reasons to work on productivity and velocity by auggierose on Saturday October 16, 2021 @03:45AM (#28886242)
For starters, even super big companies like Apple don't have any formal semantics for their APIs.

Of course there is a reason for that, it is just too hard with current tools for formal mathematics to achieve anything of the scale Apple needs.

So what will you spend your time on? Learn how to super fast crank out SwiftUI apps? Or solve the problem of doing formal mathematics properly so that companies can actually use it?

SwiftUI is pretty buggy still, by the way. Given that Apple controls its entire stack, why is that? Exactly, because they are following industry best practices, which are just not very good. Becoming super productive under these circumstances just means digging yourself deep into a local optimum that is not very good globally.

Re:Some reasons to work on productivity and velocity by zarkov99 on Saturday October 16, 2021 @06:30AM (#28886882)
Yes, it is a common psychological defense. Rather than suffer the pain of inadequacy one either decries the whole idea of merit as meaningless/harmful or adds enough mushiness to the ranking method as to render it useless. Either way your envy subsides and you can back to living a professional life of un-examined mediocrity.