How do you process 45 min? Let's discuss

Hi, i am doing first quick hacks and i found myself not able to delete what i wrote and begin from scratch again.
May be i am not so interested in the command line stuff so it lays me off.
Well, on example of ex6 - i turned on 45 min timer, started scanning through libraries listed in the end of ex, found some features like os.listdir, and glob.glob and started hacking on this.
In 45 min i could build the script which takes place and regex file expression and gives the result in current folder and itā€™s lvl1 subfolders
I made a tea, and 10 minutes later reviewed the code and made some conclusions:

  • I had bad motivation on this task
  • I made wrong script structure- i didnā€™t wrap process of checking subfolder in a function so it could be recursive and check not only lvl1 subfolder, but all subfolders
  • I made small part in 45 min
  • i am struggling to delete it and begin from the start again to do 45 min on the same task 1 more time. Is it even possible?? :slight_smile:

It was the same with me, didnā€™t really accomplish a working script. But thats not the goal here. The goal of this exercises is to get started and hack away 45 minutes. If you like me and never heard something of the libraries and tools it needs to accomplish this task then it will hardly be possible to do a fully functional hack.

In ex04 I had the same problem as now on ex06 I didnā€™t accomplish much in terms of working code. On the other day I repeated the exercise. I completed the exercise, learned a ton and did a fairly well hack. On exercise 5 I could implement all of what I had learned the day before and to accomplish it was a breeze. Ex06 was about the same as ex04 because everything was new (except argparse). So I will do it a second time and maybe learn a lot more, before I move forward to the next exercise.

Remember, the goal of this exercises is to identify problems what hinder you in getting started, recognize all the stuff what stays you in the way. I found that I already have a really stable environment and start process what I can count on but I really need to do more structured thought work before I begin. That means the next time I try to break the programm down to all code-steps it needs to work.

One thing on motivation: If youā€™ll work as a professional programmer you donā€™t will be motivated for every task you get handed over. I doubt that there will be a lot of tasks that will please you. For that case it is crucial to head down and hammer down the task that is given to you in the same effort as you would if youā€™ll work on ā€˜motivatingā€™ task. For me that is the definition of ā€˜professionalā€™.

1 Like

Yes itā€™s possible. Youā€™re already in the right track by reviewing and revising your process in this forum post. A couple of points about the exercise process. 45 minute chunks is specifically for highly focused hacking. Think of it as ā€œIā€™m coding as if my life depended on itā€ā€¦ A McGyver or James Bond scenario. If you run out of time, thatā€™s part of the game. Limitations help your focus and creativity.
Also, if you donā€™t want to repeat an exercise with another 45 minute block, then donā€™t! Thatā€™s why youā€™re studying from a book and not in a classroom. :slight_smile:
Finally, scrapping a project might seem overwhelming to you at first, but itā€™s important to decouple what you see in your editor from the understanding and logic in your head. When I feel like itā€™s time to start over, I like to switch to paper/whiteboard and pen. Iā€™ll jot lists, draw diagrams and make observations. Iā€™ll even write my pseudo code on paper! I also browse the web for knowledge and summarize it in a journal. Once Iā€™ve done this kind of reflection, Iā€™m usually ready to start again. Coding is important, but your problem-solving skills are more important.

3 Likes

Thx for replies. Basicly i am using forum for investigating in my process, and to see other people process.
I am currently working not like a programmer and donā€™t have friends in programming, so it is nice to have possibility to look into others here

@DidierCH nice approach to programming exercises and tasks in general, that made me thinking of myself starting more like training. Like an athlete who works some group of muscle not because he likes it, sometimes it is even pure pain. This kind of thing fits good to this 45min tasks.

@austen I like writing human code in comments first, but sometimes it still doesnā€™t come out natural, cause I donā€™t know the tools themselves. Maybe i need to learn libraries without this 45 minutes period :smile:

1 Like

All of these are good suggestions, and Iā€™m going to throw one out you may have missed or may have not considered:

  1. If youā€™re reluctant to delete something thatā€™s working and you want to keep hacking on it then by all means do it. You should do what I say once so you know how to do it, then if you have an idea for how to do it different give that a try.
  2. Keep in mind that if you are worried youā€™ll ā€œforgetā€ what you did, then you can just make a backup of the code and start fresh, but look at your old code for help.
  3. Take notes on what worked and what didnā€™t work so your next attempt is cleaner.

Try those out.

1 Like