r/ADHD_Programmers • • 5d ago

Learning a programming language as an adult with AuDHD. How long until I can write code?

I'm not a programmer and have never trained as one. I work in SEO and want to specialise in programatic SEO which involves writing python scripts to answer common Tech SEO questions using Python. I've been learning for 2 months solid, dedicating a significant amount of time every day to it, but I still can't write Python without consulting an external resource. How long did you guys take to start writing code unassisted?

18 Upvotes

33 comments sorted by

12

u/JoshTheSquid 5d ago • Heartwarming

You can write code now.

It’s simple: drop that goal of remembering everything. Entirely. It makes for impressive YouTube videos, but as a skill to pursue I think you’d have to try hard to find something that’s a bigger waste of time and more soul-crushing than that. Don’t wait until you remember it all. Just start coding now. Also understand that remembering comes from having written thousands of lines of code.

In terms of what to learn: get familiar with the basic syntax, data types (including classes) and control flow. Then focus on developing problem-solving skills.

Remembering everything is not programming. Understanding your problem case, defining what you want to achieve, seeing that you should divide your data into logical objects, and that those objects need to be interacted with in certain ways; that’s programming. And those skills carry over to every single language you’ll ever learn.

The docs aren’t there for you to remember. They’re there for helping you to express the ideas that you’ve got in your head.

2

u/Square-Speaker2090 5d ago

You're advice is very helpful and encouraging. Thanks for this.

3

u/JoshTheSquid 5d ago

You’re welcome! Really, I recommend starting coding as quickly as possible. This creates a short feedback loop which you can use to guide your learning, but it also gets you doing “the thing”. That latter part is important because it provides real, honest and personal feedback, it lowers the mental barrier of entry, and it keeps you out of tutorial hell.

Building mental skills should be approached similarly to how you’d build physical skills. What improves your push-ups? Doing push-ups. Can’t do push-ups? Make them easier. Still have trouble? Investigate why and work on those areas. Just keep asking questions and developing new solutions.

Just imagine having to deal with the overhead of learning everything beforehand, then running into an issue, and then trying to figure out which part you don’t fully understand yet.

Think about it: programming really is just problem-solving with technology. So the best way to learn is to create your own problems. If you feel lost or overwhelmed you probably haven’t made the problem small enough, so keep unpacking it all the feedback you get.

2

u/Square-Speaker2090 4d ago

I agree entirely that programming is just problem-solving with tech and that the best way to learn is to create my own problems. I have a plethora of real in-context problems to solve which helps maintain my enthusiasm and motivation to learn.

As somebody with ADHD I struggle to "visualize" how python code is solving the particular problem, but I find interactive diagrams and trace tables help with this.

2

u/JoshTheSquid 4d ago

Well, I don't know anything about SEO, but I take that it's very heavy on data. Is there anything that might be worth automating? Or is there something that's currently just kind of inconvenient? Or prone to human error, or is the data ever inconsistent? Maybe you can start there and see if you can develop something around it. You don't even have to develop it in Python. Design it in normal language first. There are procedures for that (maybe look into UML a bit, but mostly just for getting inspiration - I find it incredibly boring if you get too far into it), but just start with drawing stuff and roughly lining out the steps and results you'd expect to see as a user (AKA something like: user clicks on the button, program calls function, function returns data from object whatever, data is printed on the screen).

In your case the current "problem" is that you might not know what Python can do for you. In that case maybe just look around online for a bit and see what Python is used for in SEO.

1

u/Square-Speaker2090 4d ago

I'm using Python mainly to find answers to common data-fetching type questions arising from crawls or logs. Examples: how many urls are duplicates, how many of those duplicates contain a canonical to the preferred url, etc.

I'm certain this can all be automated using natural language, but I want to apply for positions in programatic SEO and job descriptions commonly demand an ability to write Python functions to answer data-related tech-seo questions.

I've been working in SEO for several years and my understanding is that very few SEO's learn Python, given that programatic SEO is too niche to specialize in, given that most are required to be generalists. My choice to specialize is purely professional, and my use of Python would be strictly limited to data-fetching.

2

u/DaikonProfessional58 4d ago

Hey i got back into programming with python and although it looks pretty simple there are a bunch of implicit details on behaviour that can make code harder to understand than it should be, what worked for me was mainly switching over to nim, it still looks really clean without semicolons or braces and is easier to understand as less behaviour is implicit, you also dont need to faff about with venv or classes and the like for projects and you get executables which you can just run which is nice if you want to distribute your software.

It also has strong static typing with type inferrence so no more TypeError with massive traces, you just add type hints like in python until the compiler is happy.

If you would like to try it out you can write libraries in nim that you can import into python with nimpy to speed up calculations and the like. I would also recommend looking into sql as chances are that your data is already accesible with it and understanding ORMs is honestly more complicated.

I know i sound like a car salesman but it really was what let me understand programming deeper, language is mostly a matter of taste though and taking a small detour to try a couple really different languages will make you understand your preferred language better as you will understand what choices went into defining it, this is the understanding you will need to tackle bigger projects by yourself as every domain is different and certain ways of programming will simply be easier if the problem fits the paradigm.

Once you have your feet wet i would recommend looking into forth, prolog, lisp and haskell just to see some really different ways one can approach problems with code.

Until then try to find something you would really like to exist, like a script mod for a game or something and then just going until you get stuck, take a moment and try to solve it right then and there by improvising and only searching for a solution after that point.

I think you will surprise yourself at how quickly you will improve!

2

u/JoshTheSquid 4d ago

I'm sure that you mean well, but you're actually introducing a lot of new things. An entirely new language, venv, distributing software, strong typing, type inferrence, compiling to Python modules, SQL... Christ, that's a lot, man! OP currently isn't feeling like he's ready to code yet, so these suggestions will just overcomplicate things way too quickly. A common mistake is to think that the language in particular is the problem, only to then switch to another one and reset your progress. You just need an entry point, and Python is great for that even if it's a little weird here and there.

I think what you're suggesting is a couple of stages ahead of where OP is at right now.

Also note that OP is specifically looking to get into programmatic SEO, and a lot of positions ask for experience with Python. I've personally never encountered a Nim vacancy.

2

u/DaikonProfessional58 4d ago

I understand your perspective but given that op seems to have handled the reading well and is looking to learn how to apply those book skills into practice i thought it appropriate to share what helped me make that transition.

I also disagree about bringing up venv and all that as it is unavoidable when using python and each of these topics need to be understood in order to ship anything with python, they also have a goal in mind so anything that lets them iteratively work on solving problems with code ought to have as few mandatory distractions as possible.

The reason i recommended nim is that it has a very low learning curve when coming from python with much less mental load required when writing simple procedural code as it is more explicit about what is going with memory so you can avoid the most frustrating type of bugs where the code looks correct but something does not do what it looks like (Lists really got to me before switching). 

In time learning how things work under the hood also makes it much easier to understand what is going on in python.

Because python has such a large ecosystem it can be really hard to get a good understanding of what libraries are needed (each has its own documentation too), then when you want to show off your project its even harder to figure out how to make it portable as you need a way to recreate the project environment and get all the dependencies working for everyone.

This easily gets overwhelming and can lead to choice paralysis, in nim (or most compiled languages) you can just use the standard library and then send the executable for the most part.

So what i meant to offer was more an example of what a learning path can look like, especially one focused on learning by doing which gives you transferable skills and some sweet dopamine to help keep it up!

1

u/tentaclesapples 5d ago

This is excellent advice! Google is your friend.

I’m anti ai - using it is basically like copying from stack overflow without understanding it back in my day

Learning OOP (object oriented programming) and fully grasping that concept will help immensely

3

u/yegegebzia 4d ago • Heartwarming

At the start of my career in the beginning of 2000s, it took me probably 2 years to even remotely write passable code. Another 2 years took me to fully understand the concept of OOP. I became a good engineer in the whereabouts of 10 years into the career. After 20 years into my career I probably achieved the level of being able to solve any task, in any widely used programming language. So, to put it short, it took me a while.

2

u/Square-Speaker2090 4d ago

This has been very helpful to manage expectations. Thank you.

3

u/IAmADev_NoReallyIAm 4d ago

> How long did you guys take to start writing code unassisted?

I wouldn't be concerned about learning enough to code unassisted, but rather enough to be useful, and then know when and how to look things up when you need to. That's hre best best way to learn, by doing. After 2-3 months, you should know enough that you can stumble your way through a basic project... and if you have to look something up. so be it. I've been programming for over 30 years, working in mt current language for almost 10, and I'm still lookimg shit up.. The things you use all the time you will retain and remember and will "just know" like breathing... the rest you;ll remember a vague idea of but will need to look it up... but to get there, you have to do.

Good luck and keep at it, you got this.

I say all this as someone that has tried to learn Pythion 4 times... but because it's not something I use daily or often, I don't retain it well... But whenever I start back down the road, a lot or it comes back and I go "oh yeah"... so practice practice practice!

1

u/Square-Speaker2090 4d ago

It's encouraging when I see the same Python functions being used again and again to solve similar data-fetching problems.

I feel somewhat frustrated when I can't identify the relevant function myself, but able to understand when it's explained to me.

I'll be using AI to give me guided practice so that eventually many of these frequently-used functions will become ones I retain and remember.

I'm grateful for your advice and feedback given your length of experience and expertise in programming. Thank you!

1

u/IAmADev_NoReallyIAm 3d ago

I read something a long time ago that went something like this: Good programmers know a lot about a few things. Great programmers know a bit about a lot of things. The greatest programmers know when to look things up.

I've stopped trying to remember specifics, and just worked on my indexing. skills by remembering where I read something or where the good places to look things up are. When the internet and search engines arrived, man... it opened up things a lot.

2

u/CyberneticLiadan 2d ago

Professional software engineers google shit all the time and I don't think I've ever written code with zero reference materials available.

  1. Project work will teach you better than tutorials, but you'll probably still need tutorials as on-ramps for topics.
  2. Different aspects of programming sink in, fade, and come back at different rates.

    1. Language syntax is a muscle you can build relatively fast, and it will fade if you step away from a language. At one point I was very fluent in Scala, but jumping back onto a Scala project would be rocky for the first few weeks while I remember.
    2. Programming fundamentals like basic control flow, functions, classes, etc. are things which will translate across languages and projects with sometimes minor adjustments, and as long as you're paying attention these are the concepts which will really give fluency. These days I can jump into a new project in a foreign programming language, and I'll know what I'm looking for to accomplish various tasks.
    3. Software libraries come and go quickly. You'll accidentally memorize the quirks and details of libraries you use extensively, but I would never worry about learning a library or framework well enough to not need the reference open when you're using it.
  3. Use static typing in Python, and use an IDE like VSCode which lets you inspect types. Engaging in this kind of curiosity will show you how exactly the programs you write are working atop the layers of libraries.

1

u/Square-Speaker2090 1d ago

Thanks for the advice. I agree that project work helps to create my own customised tutorials, while also maintaining enthusiasm. I'm currently learning Python fundamentals and practicing them. I think some of it is sticking but it's early days yet

37

u/9peppe 5d ago

Nobody writes Python unassisted, documentation is a tool of the job.

You'll eventually remember the stuff you use often.

14

u/SiouxsieAsylum 5d ago

Bruh I've been doing this for years and I still google shit in my primary language. It's gonna take time, probably a couple of years of consistent manual practice before you're able to get most of the way there and just need it to double check. It needs to get into the subconscious before it's automatic.

Just keep trying.

5

u/im-a-guy-like-me 5d ago

Depends how hard you're hyper focusing. But like... You're gonna suck for a lot longer than you think.

You already have the hardest part done though. You have a project you actually want to build. Just build it like a hundred times til it doesn't suck. There'll be new tech and new techniques every time you do it.

That's only a part of it though. Okay, you can code. Do you know anything about networking? Security? Observability? Deployment pipelines? Etc etc.

Basically... You'll be able to code in a few months, but it takes a whole team to build a production application. Programming hasn't been a 1-player game in a very long time.

3

u/Decent_Taro_2358 5d ago

I never write code fully unassisted. The code is a tool to build a solution for a problem I want to solve. It might be nice to write some pseudocode for a rough outline, but you’ll always be copy and pasting snippets from documentation or somewhere else.

With AI, things have changed a lot anyway. Your goal should be to get a general understanding, not to write code from scratch without googling.

3

u/Appleonthefloor 5d ago

I work as a swe and still look up things constantly. Keeping a cheatsheet/examples of the most common functions you use can be super helpful for scripting.

3

u/wvenable 5d ago edited 4d ago

I've been developing for more years than you can possibly imagine and there is no such thing as writing code unassisted.

As you get better, you might consult external resources not the all time but it's not like you're studying for a test -- there's no need to memorize everything.

It's much more like learning a craft than learning math -- the best thing you can do is just keeping building stuff. The more you do, the better you will get at programming.

4

u/Just_This_Only 5d ago

No point asking this question now, not with AI doing everything. You won't have to memorise syntax anymore. Just have to understand what it's doing.

2

u/Stellariser 5d ago

Think of it like learning a regular human language, how long until you can manage basic phrases without a reference? How long until you could have a rough but understandable conversation? How long until you converse comfortably but not at the level of a native speaker? Etc.

There’s nothing wrong with using references, even those of us with years of experience in many languages still have to start that way when we’re learning something new.

Keep practicing and give it time.

2

u/krocante 5d ago

Even without AI you can learn programming in a month if you’re commited to it.

You’re not supposed to write code without external sources though. Normally you would use an IDE with some sort of IntelliSense for code completion. Before AI everyone would be googling everything in stackoverflow.

So I don’t quite get the obsession with being able to do stuff “unassisted”. As long as you put the mental effort to understand the problems and the solutions.

2

u/Xehpq 5d ago

Yeah as the other comments said, you just use documentation if you forget something.

Whats more important imo for writing code unassisted, is being able to recognize coding patterns to reach your goal.

For example, if you wanted to read a csv file and go row by row, the coding pattern / approach is relatively the same for most languages, but being able to take that objective and have an idea to reach it through code, is how you write code unassisted. Its why its recommended to pseudocode and such.

2

u/pete_68 5d ago

I don't remember. I learned to program almost 50 years ago. But I wouldn't worry about it. In fact, in my own experience, I don't recall worrying about it. It came with practice and it'll come to you with practice. Just try to keep enjoying yourself. If you're enjoying yourself, you'll stick with it and the faster it will come to you.

And if it makes you feel better, I tried learning Python, but I used AI, so I didn't actually learn. I can read Python, but I can't write it without help. C# is my native tongue and probably the only language left that I can write without help. Dozens have held that rank through the decades though, especially in the first 2 decades. C# has been my #1 since '03, though.

2

u/PersistentBadger 5d ago edited 5d ago

You'll get to the stage where you know the language (if/elif, finally, from, None, etc), but you're still looking up the function calls. That stage lasts forever.

2

u/Formal_Sun_5529 5d ago

yeah unassisted code writing isn't possible really possible you'll understand and remember basic stuff you use on a daily basis, auto-suggestions in the IDE will help you a lot too . grab PyCharm community if you haven't already

1

u/dahavillanddash 5d ago

It just takes some practice. I learned in summer camp when I was 17. I learned Python and really liked how I could apply it to meteorology so I made it my career. Its really something you practice and get better at by making mistakes and learning.

1

u/somatt 3d ago

Until Claude tells you your tokens have reset

1

u/Random_182f2565 5d ago

...

Dude in 2026 the best programing lenguage is natural lenguage, but you should learn to make good flow charts :D

Dude use all the referential material you need, eventually you will learn it, or don't because programming is always changing.

The important thing is the flow charts.