Where I’m at
- Well I missed yesterday, but I really didn’t do any study, I was stuck running around all day.
- Continuing on with my own crpyto project
- Continuing on with documentation for my business
- Needing to do my resume JSON … thing.
What I learnt
-
I was thinking about the need to allow yourself to write ugly code. In a way there’s a lot of Youtube tutorials that can talk about which language to learn, how to write better syntax, etc.
That’s all just an attempt to not write ugly code (and really to either save face, save time, or likely both). The problem is that until I (or anyone wanting to learn deeper in coding) shuns watching Youtube tutorials like “ONE WEIRD TRICK TO WRITING GOOD CODE”, then I don’t think we’re actually touching our own abilities, we’re just mimicking what others are saying is good practices.
That’s fine and needed for a beginner, but unless we want to start to scratch beyond the surface, then we’d need to allow ourselves to write ugly code.
-
The trick then is if you’re like me that hates writing ugly code (or both saving time and face) then how do you allow yourself to write ugly code? I have a few ideas:
- Understand that experts routinely get 25% of the problem wrong in the best of times;
- Insights come from code are better than insights gained from planning;
- Writing bad code is actually easy, it’s writing good code that’s hard.
- Pretty code =/= good code, and ugly code =/= bad code.
- Examining your motivations for wanting to write pretty code.
- For myself I think the problem is probably caring too much about getting it looking right before making it work. Or wanting to optimise it all once I figure out the whole thing.
-
Basically: Make it work, then make it readable, and then finally make it fast.
-
A few things about my own skills as a programmer:
- I still have a sense of insecurity about my own skills as a programmer, but I think everyone goes through this, even when they are supposed to be “senior”
- I am struggling with balancing learning and producing. I find doing both at once just exhausting. I’m better doing one thing at a time to get the most of out it.
-
Which lead me to analysing my own mindset, which at the moment is two things:
- Don’t understand how to learn learning, rather than seeing it as an unpleasant, yet necessary task.
- Building trust in my own abilities that makes sense for me.
-
Of which, these are the conclusions that I came to:
- No one cares about my ability to code more than myself, and no one is going to know more about my situation than myself. So comparison is basically impossible, even if it makes me mad thinking about people who naturally have the ability to just consistently sustain their efforts in learning / producing.
- I often have to question my instincts because of my ADHD, this is good because I often have to guage what is normal / abnormal in the circumstances. To assume something is normal is usually the opposite. That’s good, but I need to just accept that I don’t know everything, and just say “I don’t know”.
What I did
-
Put some random ideas on “paper” so to speak:
- How do we think algorithmically?
- Using the 5 Why’s method of breaking down issues;
- Creating an Alien: Isolation like UI for the blog;
- Redoing Svelte Wagmi’s Stores to figure out the issue with state management being synchronised with Svelte Runes.
-
Tried to figure out this resume JSON … thing, this is what I want:
- Be able to store my resume as a JSON object which then can …
- Populate a resume from a range of templates, and download it as a PDF.
- Have a tagline at the bottom of how it was created using an API I wrote, and how to create a new and updated resume following a link for example.
- Also be able to create a covering letter? That might be unnecessary.
Book Review: The Quiet Warror: A Biography of Admiral Raymond A Spruance
This is the book of the US Navy Admiral that won numerous battles in WWII in the Pacific, including the battle of Miday, and the battle of the Philippine Sea.
The content goes through his entire life split into three sections:
- Before the war, which is maybe 20% of the book,
- During the war, which is probably 70%, and
- After the war, which is the remaining 10%.
Review
My motivation for reading the book was I became interested in Spruance after learning that he was central to the American victory at Midway, which included thorough calculation of risk, etc. So without much information that I could easily digest, I realised that I’d have to settle for reading through the primary source myself.
The book itself is quite well written, but you can see the English language has changed even in the last 100 years, and some phrasing and work choices are awkward in todays vernacular, but it doesn’t make it difficult to read.
The things that I was really interested in:
- How Spruance thought, specifically how he came to decisions, what were his first principles, how did he react in unexpected situations? Et cetera.
While I was somewhat disappointed that the biography didn’t go into too much detail about these things, there were a few things that I did learn about him:
-
He placed an incredible (one could argue almost reckless) trust in his subordinates. He really left them to attend to things, and he went to work on his most important tasks.
-
He planned meticulously. The operating orders for the battle of Midway for example was over 300 pages long, but he made sure that those orders were broken down enough so that each man knew exactly what was expected of him.
-
Even Spruance could not predict everything — he clearly was a very bright man, top of his physical and mental game during the war, and even then he got it wrong ~25% of the time.
-
When you understand exactly what you’re after, you start to make moves that appear to others to be concerning, wasteful, etc. For instance when they were taking the Gilbert Islands (AKA Kiribati), they focused on a small island called Betio, it was the only island capable of landings that would eventually support an invasion of the Mariana Islands later.
It cost the Americans dearly because of some errors in planning, and also fierce Japanese resistance. Spruance was heavily criticised for taking Betio, but it proved to be incalculable in value for the later campaigns.
There were some interesting things I didn’t really know at the time:
- Before WWII, there was a huge amount of suspicion that Japan would likely become an enemy in the coming years / decades.
- Towards the end of the war, there was an increasing problem of whether to invade Japan or not. The Navy (and Spruance) advocated for just simply blockading the Japanese into submission, but the Army wanted to invade Formosa (AKA Taiwan), and then go into China.
- There’s a lot of fanfare about Iwo Jima being the most intense battle of the Pacific, when it was clearly Okinawa. Even the Americans were dreading taking it, but it was a strategic point that the Army, Navy and Air Force agreed was vital.
- The Army and the Navy hated each other in the Pacific, MacArthur and Nimitz (which probably influenced Spruance a lot) were butting heads with each other a lot. The irony being that when Spruance met MacArthur he said that he actually liked him.
- After the war, Congress wanted to unify the Army, Navy and Air Force into one unified branch. It was the first I heard about it because I’ve never of the “Revolt of the Admirals”. It kind of was implemented by the National Security Act of 1947.
Final Thoughts
I thought it was a pretty good book, but I wouldn’t really classify it as a practical book that much, which I value a lot.