r/AskProgramming • u/Rough-Implement-8801 • Aug 29 '26
Is it true that programming is mainly reading and little typing?
Is most of the time spent learning or working as a programmer mostly reading code, docs and books?
I heard that as learning I should type everything to put it into muscle memory but that on the job I can use ai to work faster. I don't disagree with the advice of not using AI while learning, but I somewhat disagree with the "typing by hands every code snippet" part.
It feels like a waste of time while sufficing with reading actually makes more sense as I can spend absorb more information faster and go through more pages of docs.
2
u/Square-Yam-3772 Aug 29 '26 edited Aug 29 '26
it is mainly reading and little typing. senior people know conceptually what needs to be done due to experience and knowledge. Some of these senior people later become professors and write textbooks based on what they know etc. But it is not really about the details; it is the other things like design/architecture/algorithms etc
I am stating the obvious but the basic idea behind all of this is that 1) computer is doing all the work i.e. executing the instructions aka computation while 2) the programmer provides the instructions
so yeah, the act of writing instructions isn't really the important part; it is knowing which instructions to give (which you get from reading)
in fact, many programmers would be better programmers if they simply spend more time reading better code or reading textbooks.
many people on reddit are either students or junior/mid level coders so their minds are always tunnel visioned on being hands-on/writing. They think memorizing things they can look up make them better coders but in reality... its learning new concepts via reading
if you ever find yourself typing lines and lines of code straight from your head, you are not really challenging yourself.
EDIT: also, improve your math will make your a better coder. another common thing people ignore
2
u/DepthMagician Aug 29 '26
This advice might be inspired by some research that found that taking notes by hand improved learning, and they're extrapolating it into typing. I personally do type some code snippets in tutorials, and the reason I do that is because it's very easy to gloss over the actual code in the snippet, and reach the end of the tutorial having learned the concepts but having zero recollection of what it looks like in code. Typing the snippet forces me to slow down enough to actually look at the code.
I also have a sneaking suspicion that part of the reason why you are asking this is because you are a slow typist, otherwise you wouldn't consider this an impediment.
49
u/mc_pm Aug 29 '26
Wax on, wax off.
Typing the code in is about building muscle memory of a sort -- you stop stumbling over for loop syntax by the 50th time you've typed it. Eventually your fingers are just doing the thing without you even thinking about it much.
But no, it is not true that programming is mainly reading and a little typing. It's mainly *thinking* and a little typing. Syntax is easy, your fingers will learn it. But learning how to think like a programmer is going to take a lot longer.
19
u/wrosecrans Aug 29 '26
Physically typing out code is the minority of the work of (good) programming.
But if you don't type out code, you'll never build the skill of figuring out what code needs to be typed.
9
u/KingofGamesYami Aug 29 '26
Typing the code isn't about learning how to type code. It's about learning the stuff you're reading.
The human brain is weird. Doing an action makes different neurons fire than just passive observation, and this difference improves retention.
8
u/JohnLemonOfficial Aug 29 '26
One time it literally took me 3 days just to write a single line of code just to fix that stupid bug.
5
u/Recent-Day3062 Aug 29 '26
Code is written once and maintained 10 times
1
u/nevinhox Aug 29 '26
I did the math a few days ago. Over the course of a 25 year career so far, I have learned over 750 programming languages, apps, products, tools, technologies and architectural approaches. This doesn't include things I just had to quickly research for a pitch or sales meeting, but something I legitimately had to invest time and resources into learning for practical use on a project or deliverable. L
That works out 2-3 new things to learn every month, on top of actually trying to hit 40 billable hours every week.
Tell me another job that requires this level of personal investment staying up to date with skills. It never ends. I'm tired, dreaming of retirement, and get sad to think I have at least another 10 years on this treadmill.
3
u/Ok-Spite-5454 Aug 29 '26
I don't know about y'all but it's mainly having a mental breakdown, sometimes some dancing.
2
u/danielt1263 Aug 29 '26
I recently worked on a ticket. Writing the actual code took me about 3 hours, including the test harness. The ticket took 4 days from the moment I started working on it to the moment I passed it on to UAT. So that's 3 out of over 30 hours on the code writing portion of the job. (And interestingly, if AI made me 3 times faster, the ticket would have still taken me 30 hours to clear, so don't think AI will be some sort of massive improvement.)
2
u/PapaNoobara Aug 29 '26
Yes, in the same way surgery is mainly reading charts with a little bit of meat-cutting.
Astrophysics is mostly scribbling on paper.
easy-peasy
2
u/BaronOfTheVoid Aug 30 '26
Even without AI when you are not doing a greenfield project but working on existing software even during the implementation steps of your planned features, fixes or refactorings you are typically spending 10-20 times as much time on scrolling, reading and searching through files, trying to understand them, building up the mental model of how the software actually works line by line, compared to actually typing what you have.
Of course if you do work on greenfield projects you don't really have a software that you still have to understand so the ratios shift drastically towards typing.
Regarding the specific "typing to memorize" thing, I don't have a high opinion of something like that. But you do have to deal with software or code in general, including reading or typing, in order to build up habits and memorize things. It's hard to describe but over time the typical things you spend your brain power early on become trivial as time goes on: syntax, the hundreds or thousands of types and functions/methods of any standard library or commonly used 3rd party libraries, protocols, anything related to unit and integration testing, common things like accessing a database, the filesystem, the environment, error handling, input validation etc. - at some point all of these things are just like breathing or riding a bicycle. You just know and do it easily. Meanwhile in the first weeks or months all of that seems daunting and exhausting. And it would remain daunting if you didn't actually do your own projects at some point.
2
u/rlebeau47 Aug 29 '26
I spent 30 years typing out my code. I hated being forced to let AI type it for me.
1
u/geekichu Aug 29 '26
Im going to get flak for this ("incoming!") but in this new era, I tend to agree.. as long as you use A.I. to learn.. not just accept everything you're handed.. and if you at first stick to one language (javascript serves you well for client/browser and server).. you'll absorb it over time. you can type when you want to tweak the given code, maybe try something a little different..
1
u/funbike Aug 29 '26 edited Aug 29 '26
Yes. That's why I prefer partitioning and segregation architectures.
Partitioning architectures would include Modular Monolith, Vertical Slicing, Atomic Architecture, DDD, and/or microservices. Segregation architectures would include hex, onion, clean architectures, event-driven, and cqrs.
These architectures allow you to write fresh now code in a bubble, so you need to understand smaller a smaller subset of the full app.
TDD allows you to focus on one point of the app and you build your code incrementally. However, for bug fixes or modifying existing features, it's less beneficial in this respect.
1
u/ChazBass Aug 29 '26
The best way to learn is still by typing and experimentation. That "work" will enforce learning. AI is fine for learning more about what is going wrong and what is possible. But I would use that as a last resort. Try stuff. Doesn't work as expected? Debug! Try again. As someone said above, "Wax on. Wax off. The problem with just reading is you will (hopefully) understand it, and then forget it.
1
u/MimosaTen Aug 29 '26
Type code is a completely trascurable part of the job, at least in production. In fact LLMs are perfectly capable of delivering 100% of code, however they are very bad teachers and thinkers. So how the human that instruct them learn?
1
u/APathSoTwisted Aug 29 '26
A good amount is reafing documentation and deciphering legacy code, often refactoring it. I use Google or Copilot constantly, but I already know what I need to do, I just need the correct class names, methods, or solutions to a confusing bug, or some opinions on different approaches, etc...
I love coding because it engages many parts of my brain, I can focus on it for hours without getting bored, and it's instant gratification.
I do think you should understand the principles of good design and the underpinnings of security and performance before you just start vibe coding. It is possible to use AI to help you learn, instead of using it to avoid learning
1
u/Recycled5000 Aug 30 '26
What’s being typed needs to come from somewhere and reading is not it.
1
u/GrumpyOldMuppet Aug 30 '26
There have been studies that show that developers spend more time reading code than writing it. So that may be what you are thinking of. It's not necessary reading docs or stuff online. Although there is a lot of that, it's not more than, or even close to, the time spent "coding" which involves both reading and writing code.
The difference in time spent between reading and writing code varies from one study to the next. Ranging from a 60/40 split up to a 80/20 split. And "reading" code is more a case of comprehending code. If you are fixing a bug in code someone else wrote (or that you wrote a week ago and no longer remember the details of) you are going to spend a lot of time "reading" that code to understand it and determine where the bug is. Then maybe only a few minutes to fix it. (It can range from a single character to fix to dozens of lines of code.)
Even immediately after writing code, you almost always read it to "proofread" it.
Then lastly, you read the code other people just wrote as part of a code review (i.e. "proofreading" other peoples code).
So I wouldn't say we "primarily" read and do little typing. But I would say we do more reading than typing. But still, you can end up typing a hundred lines of code in a day.
1
u/Far_Oven_3302 Aug 30 '26
Don't forget, adding break points, stepping through code, tracing variables, figuring out why someone wrote the code the way they did, maintaining a repository, team meetings, the software development life cycle, UML diagrams, writing documentation/commenting, constantly relearning technologies as they mature, and so much more.
1
u/burlingk Aug 30 '26
So, while we argue over the labels "programing" and "coding" there is some truth to the argument that the two are not the same.
Programming is the act of creating the program. Of deciding the paths, and planning it out.
Coding is the act of turning that program into code.
Both are a practice, and both are important. However, if you can do the programming/design and suck at the coding, Google will go a long ways to helping you figure out the code.
If you cannot plot out what is needed to make the program happen, i.e. you have trouble on the design side, Google can still help, but not near as much.
So, yes, there does tend to be a lot of reading and planning involved.
1
u/burlingk Aug 30 '26
Additionally: If you do get a job that leans on AI, NEVER stop doing your own projects on the side, with no or minimal AI assistance.
The moment you get to a point where you cannot operate on your own code without AI assistance, you will become effectively unemployable. And in a lot of jobs that is going to mean doing your own projects.
BUT, also, make sure to read your contract (preferably before signing). Some companies claim employee work, so it is best to know that up front before you go trying to profit from side jobs.
1
u/OGcapncrunchberry Aug 30 '26
That is not true. It’s a lot of reading and a lot of programming.
1
u/siodhe Aug 30 '26
Learn touch-typing. Not having to think about your fingers means you can think purely about the coding instead.
1
u/LetUsSpeakFreely Aug 30 '26
No. That's like saying "all you need to do be a mechanic is to watch some YouTube videos and turn a wrench?"
1
u/raven2cz Aug 30 '26
First of all, it depends on what kind of person you are. There are many people who can learn well just by reading. I, for example, cannot.
To really understand something in depth, I first read about it. But then I put it completely aside and give myself my own task, which I have to program myself. Something completely new, based on the information I have learned.
1
u/Guybrush1973 Aug 30 '26
At this point I drive my dev students to focus way more on logic rather than syntax/typing, as this problem is almost already solved by AI.
1
u/mjmvideos Aug 30 '26
Well, then just keep reading and don’t type anything. Sounds like you know what you’re doing. Hope that works out for ya.
1
u/QPGMR_de Aug 31 '26
Every piece of code is written once - but at least 10, 20 or 100 times read.
1
u/Felicia_Svilling Sep 01 '26
I once spent three hours looking for a bug, and then adding a single character to the code to fix it. So yes, typing is a really small part of the job. And this was true even before AI skewered it even more.
1
u/Strong_Music_6838 Sep 02 '26
No it’s reading-understanding and learning by typing.
0
u/VirtualLife76 Aug 30 '26 edited Aug 30 '26
Programming is like speaking another language. The only difference is the grammar is more strict. Been coding over 40 years now.
-1
u/huuaaang Aug 29 '26 edited Aug 29 '26
No, very little reading. But there’s a lot of thinking through things before actually writing it out. Also meetings and such if you’re pro.
In the beginning you might be reading more but at some point it’s about as automatic as speaking.
-1
u/IKnowMeNotYou Aug 29 '26
only if you are doing it wrong.