<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Oleg</title>
    <description>The latest articles on DEV Community by Oleg (@himynameisoleg).</description>
    <link>https://dev.to/himynameisoleg</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F292046%2F45646037-8598-4127-b474-147a61a367eb.jpg</url>
      <title>DEV Community: Oleg</title>
      <link>https://dev.to/himynameisoleg</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/himynameisoleg"/>
    <language>en</language>
    <item>
      <title>An Ultralearning Approach to the Technical Interview</title>
      <dc:creator>Oleg</dc:creator>
      <pubDate>Fri, 21 Jun 2024 17:43:59 +0000</pubDate>
      <link>https://dev.to/himynameisoleg/an-ultralearning-approach-to-the-technical-interview-njg</link>
      <guid>https://dev.to/himynameisoleg/an-ultralearning-approach-to-the-technical-interview-njg</guid>
      <description>&lt;h1&gt;
  
  
  Intro
&lt;/h1&gt;

&lt;p&gt;In 2023 I interviewed with Amazon and Google. Both were eye opening experiences and exposed me to the rigor and extreme caution that big tech companies take with their hiring process. Their philosophy, as I’ve come to understand, is that passing on a few good candidates is better than hiring one bad egg. This poses an especially big challenge for us humble interviewees because we need to be extremely prepared, knowledgeable and level-headed come interview time. How then can we make ourselves stand out? I set out on a mission to answer just that.&lt;/p&gt;

&lt;h1&gt;
  
  
  How it all started
&lt;/h1&gt;

&lt;p&gt;A few months ago I was researching learning strategies to more effectively pick up a new programming language. I had shown interest in Rust a few years ago but my learning quickly hit a wall and I closed the book on it early. Then one day in the not-so-distant future I came across an awesome book called &lt;a href="https://amzn.to/3VvDYZi"&gt;"Ultralearning" by Scott Young&lt;/a&gt; . It outlines some strategies for learning difficult things in an intense, focused, and structured way. I highly encourage you to read the book too, but if I were to convey its ethos in two bullet points it would be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Plan&lt;/strong&gt; more than you think you need to &lt;/li&gt;
&lt;li&gt;Learn by doing the thing you want to do &lt;strong&gt;directly&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I had decided I wanted to "ultra learn" the Rust programming language. I made many mistakes in my first attempt. I got stuck in "tutorial hell" without a well-structure learning plan and no concise motivation for learning outside of "I should probably know a low level language".  So this time I started applying some of the ultralearning techniques, and project-ifying the learning. I spent the recommended 10%  on meta-learning -- doing research on &lt;strong&gt;how&lt;/strong&gt; I will learn the language, how &lt;strong&gt;others&lt;/strong&gt; have learned it, and collecting the books, materials and GitHub repos to aid in the learning. I then laid out a weekly plan, drilled the katas, did the coding projects and supplemented learning with a few recommended books. &lt;/p&gt;

&lt;p&gt;However, after 4 weeks I put this project on pause again. &lt;/p&gt;

&lt;p&gt;"But, Why?" &lt;/p&gt;

&lt;p&gt;Well, it wasn't because I hit the wall again.&lt;/p&gt;

&lt;p&gt;In fact, I was seeing tremendous results! This time learning Rust and Systems Programming came much more rapidly. My only problem was that this strategy worked so well. I had this burning feeling that I could be applying this wonderful new technique to anything. Something different, better, “higher impact”.  Something like, say, ...  Technical Interviews.&lt;/p&gt;

&lt;p&gt;So here's what I did. &lt;/p&gt;

&lt;h1&gt;
  
  
  The Ultralearning Phase
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Meta-Learning
&lt;/h2&gt;

&lt;p&gt;When I did interview prep last year I just blindly solved some recommended LeetCode questions, followed a few YouTube videos, read the most important chapters in &lt;a href="https://amzn.to/3VvDYZi"&gt;Cracking the Coding Interview&lt;/a&gt;. I forgot them almost immediately. I had poor structure and no set schedule, and as a consequence nothing seemed to stick. The learning decay curve kicked in immediately and when the day of the interview came I found it hard to retrieve the knowledge that I had only &lt;strong&gt;just practiced&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This time around I dedicated way more time to planning. Ultralearning recommends 10% of total time to be spent on planning out a strategy. Having a well devised plan helps keep you on target, helps combat the learning decay curve, and acts as an accountability partner.&lt;/p&gt;

&lt;h3&gt;
  
  
  How I planned and organized
&lt;/h3&gt;

&lt;p&gt;I was not trying to re-invent the wheel with this project. I wanted a simple concise study plan that I could adapt to my own style. I found this amazing documentation-style website called the &lt;a href="https://www.techinterviewhandbook.org/software-engineering-interview-guide/"&gt;Tech Interview Handbook&lt;/a&gt; and made heavy use of it throughout. I highly recommend it as part of your planning phase. Read through this front to back. Its's not very long and has some gems of advice.&lt;/p&gt;

&lt;p&gt;I went with its recommended approach of 3 month of learning, 11 hours per week. I factored in 2 extra weeks for ... well ... this is life and sh$t happens, which came out to a cool 154 hours. This meant that about 15 hours should be dedicated to meta-learning, planning, building a calendar, finding resources, paying for courses, setting up LeetCode, etc. &lt;/p&gt;

&lt;p&gt;In the &lt;a href="https://www.techinterviewhandbook.org/coding-interview-study-plan/"&gt;study and practice plan&lt;/a&gt; section there is a breakdown of each topic by week, recommended time, and priority level of each topic. I used this as a baseline to craft my weekly schedule, trying to incorporate time for &lt;strong&gt;spaced repetition&lt;/strong&gt; and &lt;strong&gt;direct learning&lt;/strong&gt; strategies I discovered from Ultralearning. The beginning is always a little awkward when starting these things, and I used the first few days to sus-out what worked and what didn't. I eventually arrived on this sequence:&lt;/p&gt;

&lt;h4&gt;
  
  
  The Learning Sequences
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Active Learning 

&lt;ul&gt;
&lt;li&gt;Read the recommended articles and watch the recommended videos&lt;/li&gt;
&lt;li&gt;Over-learn the topic - articles often link to other resources so jump down that rabbit hole&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Direct Practice 

&lt;ul&gt;
&lt;li&gt;Solve 3-4 of the essential LeetCode - be sure to [[02-an-ultralearning-approach-to-the-technical-interview#1. Time yourself|time yourself]]&lt;/li&gt;
&lt;li&gt;Subsequently review each attempted question and understand your weaknesses&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Weekly Review 

&lt;ul&gt;
&lt;li&gt;Comprehensive review at the end of the week&lt;/li&gt;
&lt;li&gt;Drill and Review the recommended LeetCode &lt;/li&gt;
&lt;li&gt;Re-try some of the failed questions from earlier in the week&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because I work full-time, this is the schedule that I landed on after tuning the first week. &lt;br&gt;
Sundays were spent on "light reading". &lt;br&gt;
My work week, Mon-Fri, I spent about 1-2 hours per day drilling problem sets and reviewing. &lt;br&gt;
Saturdays were spent on a longer comprehensive review of the weeks topics. Similar to Mon-Fri just more diverse set of problems. Here is how the schedule looked:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Sun&lt;/th&gt;
&lt;th&gt;Mon&lt;/th&gt;
&lt;th&gt;Tue&lt;/th&gt;
&lt;th&gt;Wed&lt;/th&gt;
&lt;th&gt;Tr&lt;/th&gt;
&lt;th&gt;Fri&lt;/th&gt;
&lt;th&gt;Sat&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Sequence&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fobrlp2nbyvyy0d5lywac.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fobrlp2nbyvyy0d5lywac.jpeg" alt="Image description" width="800" height="621"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Learning days (0s) are just there to put you in the right headspace. They are not quite as important as the other days and serve to be primers for the content to come. The problems attempted in the Direct Practice days (1) are far more important, because most of the learning will happen during your struggle when trying to complete a problem in 15-20 minutes, inevitably failing, and then reviewing what went wrong. I have come to appreciate the fact that failure is a very powerful teacher. By intentionally setting myself up for failure during the drill sessions I was able to highlight my weaknesses and force myself to go back and grok the thing.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Failure is a very powerful teacher."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So that was the majority of the planing phase. Initially, I left some extra time for planning during the first week to make adjustments to the schedule based on how things were going. With my calendar printed out, LeetCode purchased, books coming in the mail, I was well equipped for the next 12-14 weeks of this marathon. Now lets dive a little deeper into the learning strategy. &lt;/p&gt;

&lt;h2&gt;
  
  
  The Power of Directness
&lt;/h2&gt;

&lt;p&gt;Wanting to pass the technical interview meant that I needed to &lt;strong&gt;practice doing technical interviews&lt;/strong&gt;. All the YouTube, LeetCode, books, and courses are nothing but tools to aid in understanding the domain of knowledge, but they don't magically make you a good technical interviewee. This comes down to directly practicing in the style of the interview -- usually a blank document or a physical whiteboard. There are 3 things to consider when emulating this direct interview practice. &lt;/p&gt;

&lt;h3&gt;
  
  
  1. Time yourself
&lt;/h3&gt;

&lt;p&gt;During each and every problem I attempted, I had a timer going. It didn’t matter if I finished solving the question or not. The simple practice of timing the problems exposed weaknesses in my problem solving strategies and highlighted  the areas where I needed to focus more effort. I kept a pen and paper handy and quickly jotted down questions that came to mind while I was solving the problem, and came back to them during the subsequent review session. This ensured that I was practicing under time pressure and also had some topics to review later under more relaxed conditions. &lt;/p&gt;

&lt;h3&gt;
  
  
  2. Bring your own examples
&lt;/h3&gt;

&lt;p&gt;LeetCode is a great platform for practicing,  but it gives too much information at once. Part of the challenge in the real interview is asking your interviewer the right questions.  Questions like "What does the input look like", "the output", "are duplicates allowed", etc. LeetCode lays all of these out form the start. I made sure to ignore the examples  and come up with my own, and only reference the examples when I was genuinely stuck. This more closely emulates a real interview. &lt;/p&gt;

&lt;h3&gt;
  
  
  3. Don't run the code
&lt;/h3&gt;

&lt;p&gt;First off, solve the problem before coding it out. I made the mistake last year of jumping to the intricacies of the code before actually solving the problem. In my naive initial practice I made heavy use of the "Run" button in LeetCode. Forget this button exists. Solve the problem to the best of your ability in the time given, optimize as much as you can, but don't focus on running the code. This is not Test Driven Development and you will not have this kind of feedback during the interview. &lt;/p&gt;

&lt;p&gt;Following these 3 strategies when drilling  interview problems helped more closely simulate the true format of the interview. This is exactly how it went in 2023 and this is exactly how it is now. But all the drilling in the world was not going help if I didn't have a good strategy for review and retention. &lt;/p&gt;

&lt;h2&gt;
  
  
  Retention
&lt;/h2&gt;

&lt;p&gt;Learning decay is real and it sucks. Our brain is great at archiving information that we don’t access on a regular basis. I have found two strategies that work best to combat learning decay, and helped me retain information for longer periods of time:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Over learning&lt;/li&gt;
&lt;li&gt;Spaced Repetition&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Overlearning
&lt;/h3&gt;

&lt;p&gt;Going beyond surface level on any topic is probably the most effective way to make it stick. Additionally, over-learning is less of a “trick” than other strategies. Lets compare it to mnemonics. As with mnemonic strategies you are creating associations in your brain to help you quickly recall the topic. But unlike mnemonics, over-learning fundamentally adds to your overall understanding of the subject. Instead of silly acronyms helping you remember something, you have a robust web of inter-related information to fall back on.&lt;/p&gt;

&lt;p&gt;Let me use Hash Tables as an example for how I over-learned to help me understand the topic. Initially, I knew that you can use the Hash Table data structure to quickly access data stored as a key-value in near constant time, O(1). What I didn't know about were all of the hashing functions and the collision resolutions mechanisms when building out a Hash Table.  These are usually abstracted away in higher level languages. &lt;br&gt;
I read a bunch of articles on the subject (I love it when online articles links to more articles). Next thing I knew I had 12 tabs open. Even though each article covered essentially the same thing: "here's what a Hash Table is, what it does, here's how", they all approached it slightly differently. Seeing the various approaches and different implementation strategies really helped contextualize the essence of the topic for me, even if I never had to recall the implementation details. &lt;/p&gt;

&lt;p&gt;What I have found is that my brain is able to create some common patterns after consuming about 3-5 different resources on one topic. So once I have reviewed 3 different materials on the subject and can solve 3 similar problems, I feel confident enough about moving on. If I still cant solve 3 problems, there there are likely some knowledge gaps I need to fill.&lt;/p&gt;

&lt;p&gt;The challenge with the over-learning strategy is knowing when to stop. Knowing how deeply to go down the rabbit hole. This is entirely subjective but a great segue to the next strategy: Spaced Repetition.&lt;/p&gt;

&lt;h3&gt;
  
  
  Spaced Repetition
&lt;/h3&gt;

&lt;p&gt;We know that time is the enemy of our learning. In my first year of university I took a psychology class and one of the first things my professor pulled up on the board was the classic "forgetting curve". We learn really quickly at first, but we forget just as quickly. Thankfully we can combat this tendency to forget with repetition. The curve becomes far less steep with subsequent reviews, and this is why I wanted to incorporate a spaced repetition strategy into my schedule. Spacing the learning and drilling 1 day apart ensures that there is ample time between learning something quickly and then reviewing aggressively to reinforce the ideas, and challenges any misconceptions you may have mistakenly formed in the initial study. Having a comprehensive drill / review session at the end of the week further solidifies this. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo7w4jw3zgeidi5ziqk7h.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo7w4jw3zgeidi5ziqk7h.jpeg" alt="Image description" width="800" height="607"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  How its going
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Timing is key
&lt;/h2&gt;

&lt;p&gt;After piloting these strategies for a week, I have learned quite a bit. Firstly, the 11 hour per week time commitment feels bit too low to deeply cover all the content prescribed in the guide. When I allocate 15 minutes to solving each problem, the subsequent review can take up to 30 minutes if the problem is sufficiently complex or used some Pythonic trick that I am not familiar with. E.g. I learned that I cannot use a List as the key for a dictionary because Lists in Python are mutable. It took time for me to understand that casting Lists as Tuple makes them immutable and this can be a useful hashing mechanism for anagram problems if you are optimizing for performance and trying to avoid sorting.&lt;/p&gt;

&lt;p&gt;Despite the early time investment, I am very hopeful that it will get easier. Early on, I tripped up on simple problems. Now I can solve these types of problems in half the time, even using the most efficient strategy!  The learning curve seems to be steep initially, but once I've encountered each type of problem and start grokking it, my time to solve seems to drop significantly. I am hopeful this trend continues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Distraction
&lt;/h2&gt;

&lt;p&gt;It was Easter Sunday weekend. I knew the weekend would be spent with my family, but I also wanted to keep up with my studies. I planned to pepper some light reading and review in between the holiday festivities. I loaded up some Medium articles onto my Kindle. There were only about 6-8 articles on Linked Lists, Queues, Stacks, Sorting and Searching - topics I was already pretty familiar with. What I learned, however, is that distraction is the enemy of progress. What should have taken me at-most an hour or two, wound up taking sever hours due to distraction. This further highlighted the importance of having a quiet focused study space, because this kind of technical literature, even the reading" cannot be consumed while I am distracted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Motivation
&lt;/h2&gt;

&lt;p&gt;I have been following the &lt;a href="https://reddit.com/r/leetcode"&gt;r/leetcode&lt;/a&gt; subreddit and have been seeing a wide spectrum of stories of both inspiring and demoralized experiences with leetcode interview prep. There is definitely a strong learning curve with the problems but given enough time and with the right strategy it becomes like second nature and quite fun actually. After going through the initial learning phase and getting over a week of the Easy level drilling, I can confidently say I can solve most easy problems in just a few minutes. Your brain starts recognizing patterns and there are only a dozen or so different problems. I am cautiously optimistic though, because I know once I start on the Mediums, there will definitely be a new hump to overcome. But having a solid foundation is very helpful as Mediums generally just add a layer of complexity or an additional data structure on top of the easy. My advice to those frustrated, demoralized souls on reddit is this - "stick with it, lay a good foundation, and don't burn yourself out". &lt;/p&gt;

&lt;h1&gt;
  
  
  Applications and Offers
&lt;/h1&gt;

&lt;p&gt;Throughout this process I have also been researching companies and applying to the ones I find to be a good fit. In total I applied to about 30 carefully researched and considered roles. I received many polite rejection letters and even a weird AI screening. Here are some of the highlights, interviews and decisions:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Fintech Research Company - Interview, No Offer 😵
&lt;/h2&gt;

&lt;p&gt;This was my first invitation to interview. There was no Online Assessment just went straight to interview. I was your average technical grilling. As this was the first interview in a while I felt a little underprepared. It also felt like my interviewers were a bit underprepared or were not accustomed to interviews. It was a jumble of technical trivia and generic interview questions which I did my best to answer but some of the questions were so trivial I felt as if I were on a game show -- less about problem solving and more about intricacies of a specific language or database.&lt;/p&gt;

&lt;p&gt;I learned a lot from this interview, namely that I needed a refresher on some of the tech I hadn't used in a while, especially if it shows up on the job description. Ultimately I think my lack of preparedness showed and I didn't move on.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Amazon - Screened Out Again 😵
&lt;/h2&gt;

&lt;p&gt;I applied to Amazon in 2022 and never made it past the coding assessment. As I was already in their system I got an invitation to go through another interview. Its almost like they saw that I ordered "Cracking the Coding Interview" and magically knew I was looking 😅.&lt;/p&gt;

&lt;p&gt;The process was pretty standard.&lt;br&gt;
I emailed back the recruiter with my new resume, filled out the online application. She also asked me to answer a list of some basic screening questions. Things like openness to relocate,  my current role, how much time I spend coding/designing, etc. &lt;br&gt;
I took the Online Assessment about a week later and the questions were fairly simple. The first one passed most test cases. The second one stumped me and only passed a few edge cases. I had the right approach just missed a minor detail - I managed to solve it later but my approach was probably not even looked at and I was screened out .&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Big takeaway here is if you don't pass the Online Assessment questions you'll likely be screened out.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Given the current market for software engineers, I think the cold truth is that "companies can be super picky". The applicant pool is pretty massive now after all the layoffs, and they are more liberally screening out. So being able to pass the OA is a huge foot in the door and shouldn't be taken lightly. &lt;/p&gt;

&lt;h2&gt;
  
  
  3. Healthcare Company - Offer ✅
&lt;/h2&gt;

&lt;p&gt;I applied early April 2024, did a short phone screen, and took another HackerRank assessment. This one was more technology specific and role oriented. They asked some very specific multiple choice questions about React, Auth flow, and some infrastructure YAML formatting. A little trivia-like, but I think they wanted to gauged if I used certain technologies or not. There was one coding problem in JavaScript related to generators which I completely forgot were a thing in JS, but a quick language ref lookup I solved it no problem. Overall a pretty straight foreword  exam. Not the best way to gage the applicant overall problem solving abilities but much easier to get foot in the door than the "leetcode" style problems. Neither of these approaches is perfect in my opinion.&lt;/p&gt;

&lt;p&gt;The following week I was invited for a panel style interview with two architects and a director. Having learned my lesson before, I spent the weekend diving into the technologies listed in the job description and going over the tech I wasn't super familiar with. I built a small app using Next.js, TypeScript and  Auth0 as a refresher. This exercise helped a ton. I think any technology listed on the JD is always fair game for questions in the interview. The weekend prep payed off and because of my prep, the interview went really well. &lt;/p&gt;

&lt;p&gt;I sent a thank you note to the recruiter a few days later and asked for any feedback. We had a conversation the following day and I received news that I was their top candidate! &lt;/p&gt;

&lt;h1&gt;
  
  
  Did I accept the offer?
&lt;/h1&gt;

&lt;p&gt;YES! After a few more email and some salary negotiation I was happy with the final offer and accepted it. &lt;/p&gt;

&lt;h1&gt;
  
  
  Key Takeaways  and Summary
&lt;/h1&gt;

&lt;p&gt;Well, I didn't make it the whole 14 weeks. In fact I "only" made it to week 11 by the time I got an offer. But in the last 10 weeks I sure did learn a thing or two. &lt;/p&gt;

&lt;p&gt;For Big Tech companies my bottleneck was the Online Assessment. I think if I had the full 14 weeks instead of just 4 of leetcode grind I would have been in much better shape to solve the Amazon questions perfectly.&lt;/p&gt;

&lt;p&gt;For the companies that didn't do leetcode the big mistake I made was not being prepared to answer interview questions. I learned from my mistakes during the first interview and prepared a list of examples of &lt;strong&gt;challenges&lt;/strong&gt;, &lt;strong&gt;failures&lt;/strong&gt; and &lt;strong&gt;successes&lt;/strong&gt; across all of my projects and tied them closely to the job requirements for the new position. Better yet I built a small demo app using some of the technologies from the job description to give myself a nice refresher. &lt;/p&gt;

&lt;p&gt;Last of all, this process &lt;strong&gt;takes time&lt;/strong&gt;. 14 weeks may seem like a long time, but it sure did go by quickly. Thankfully the intensity of this period really paid off. I learned a metric ton of "tricks" and strategies  for solving problems efficiently. And the awesome reward from all of those long hours after work and on weekends: the closing of one chapter and opening of an exciting new one!&lt;/p&gt;

&lt;h1&gt;
  
  
  So whats next?
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Building new habits
&lt;/h3&gt;

&lt;p&gt;Changing jobs or starting new work projects always feels like a clean slate.&lt;br&gt;
I always like to take this time as an opportunity to reflect on what worked in the past and what didn't. In the next few weeks as I transition from my old job to the new, I plan to start setting some goal for myself in this next chapter.&lt;/p&gt;

&lt;h3&gt;
  
  
  Forever LeetCode - I get it
&lt;/h3&gt;

&lt;p&gt;Having gone through a sizable chunk of the learning plan, all of the pain of getting stuck and manic joy of finally solving a problem on my own, I kinda understand the hype. Im relieved to get 3 hours back each day,  but also kind of bummed I didn't get to do more of those problems during the interview process. I definitely feel like these last 10 weeks have made me a much stronger software engineer. There is no doubt about that. Though I have a massive list of books I want to get through, I will definitely continue to solve leetcode on the regular just to keep current. Maybe even try using a language other than Python. &lt;/p&gt;

&lt;h3&gt;
  
  
  Ultralearning ubiquity
&lt;/h3&gt;

&lt;p&gt;If I learned one thing during this whole process is that the ultralearning framework works tremendously well! Its portable and can be applied to nearly any new learning. I am extremely happy to have successfully applied it to my personal life. I feel like I have discovered a sort of cheat code to life and feel motivated to continue applying it in other practical areas and next project!&lt;/p&gt;

&lt;h2&gt;
  
  
  Outro
&lt;/h2&gt;

&lt;p&gt;If you made this this far, thanks for taking the time and reading. If you have any questions or constructive feedback lets connect!&lt;/p&gt;

&lt;p&gt;&lt;a href="mailto:perchykoleg@gmail.com"&gt;perchykoleg@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/himynameisoleg"&gt;@himynameisoleg&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ultralearning</category>
      <category>interview</category>
      <category>leetcode</category>
    </item>
    <item>
      <title>Replatforming from Gatsby to Zola!</title>
      <dc:creator>Oleg</dc:creator>
      <pubDate>Tue, 02 Apr 2024 19:10:26 +0000</pubDate>
      <link>https://dev.to/himynameisoleg/replatforming-from-gatsby-to-zola-504j</link>
      <guid>https://dev.to/himynameisoleg/replatforming-from-gatsby-to-zola-504j</guid>
      <description>&lt;h1&gt;
  
  
  Intro
&lt;/h1&gt;

&lt;p&gt;So I've had my fair share of personal websites and blogs. I have built them on  stacks ranging from the most basic HTML and CSS, to hosted frameworks like Wordpress and Laravel, to the more modern single page applications built in Vue and React. For a simple content blog I think you can't go wrong with a Static Site Generator though. These days I am almost exclusively writing everything in &lt;a href="https://obsidian.md"&gt;Obsidian&lt;/a&gt;. Which is great because its all in standard markdown format. This allows for a really neat and easy content publishing workflow.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Workflow
&lt;/h1&gt;

&lt;p&gt;Since around 2019 I have used &lt;a href="https://gatsbyjs.com"&gt;Gatsby&lt;/a&gt; as my static site generator. Its plugin system makes it super feature extensible. It uses React under the hood which makes components easy to write and has tons of community support. Once I had a Gatsby site styled and running, publishing blog posts is fairly trivial:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Draft up a new post in markdown and tag it appropriately&lt;/li&gt;
&lt;li&gt;Copy the markdown file over to the Gatsby site &lt;strong&gt;content&lt;/strong&gt; folder &lt;/li&gt;
&lt;li&gt;Push the changes to main branch on GitHub&lt;/li&gt;
&lt;li&gt;Wait as the &lt;a href="https://netlify.com"&gt;Netlify&lt;/a&gt; CI/CD robots work their magic to build and push my updated blog site with the shiny new post to the open internet&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Pretty neat right?&lt;/p&gt;

&lt;p&gt;Well, naturally time moves on. Technologies mature, one tech company acquires another, dependencies become old, vulnerable and deprecated and sooner or later the dependabot alerts start pouring in. So here's what prompted the change in the first place.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why Change?
&lt;/h1&gt;

&lt;p&gt;After finding a few spare hours I decided to address the alerts and update some my dependencies.  I spent several hours debugging my Gatsby site after doing some recommended npm package updates. My UI class library &lt;a href="https://bulma.io"&gt;Bulma&lt;/a&gt; was not being loaded by my sass-loader module. (I later learned that they migrated to dart-sass so I guess the fix should have been a pretty easy). Nonetheless, this prompted me to rethink my entire static site generator stack and got me curious about some other options. Why have these unnecessarily complex dependency chains? At that point I was almost too hesitant to even touch my package.json file. That's just silly.&lt;/p&gt;

&lt;p&gt;So after shopping around a bit I found a simple, dependency-less static site generator called &lt;a href="https://www.getzola.org"&gt;Zola&lt;/a&gt;. The lack of dependencies sounded very attractive after all the headaches trying to update my Gatsby modules. I wanted to give Zola a try and see what tradeoffs I would need to make coming form a React-based framework to this Rust-based generator. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;tldr; not a whole lot.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  The Process
&lt;/h1&gt;

&lt;p&gt;After a quick run through the Zola &lt;a href="https://www.getzola.org/documentation/getting-started/overview/"&gt;getting-started&lt;/a&gt; docs, I had my "Hello World!" app running and I was ready to start dragging components from my Gatsby site into the Zola site. &lt;/p&gt;

&lt;p&gt;What I immediately loved was how everything for handling markdown and styles was already baked in. I didn't need to install any special plugins to get markdown to work. I didn't need to write complex GraphQL queries to populate my posts  as I did with Gatsby. Images worked out of the box, pages and posts showed up right away so long as I followed the prescribed directory structure.&lt;/p&gt;

&lt;p&gt;I pulled the content markdown files and scss stylesheets from my old site into the appropriate folders of the Zola site, updated a few tags, and it &lt;strong&gt;just worked&lt;/strong&gt;! &lt;/p&gt;

&lt;p&gt;Now  going from a component based library like React back to plain HTML required a few changes, but was fairly simple. It was mostly a process of renaming custom tags back to &lt;strong&gt;div&lt;/strong&gt; and changing some looping constructs from JavaScript to the mustache format. Zola uses the &lt;a href="https://keats.github.io/tera/"&gt;Tera&lt;/a&gt; templating engine which is very similar to the template syntax I have used in Python Flask projects at university so it was fairly simple to lay everything out and get the site looking almost exactly like my old one. With a few caveats.  &lt;/p&gt;

&lt;h1&gt;
  
  
  Challenges
&lt;/h1&gt;

&lt;p&gt;This replatform only took me two short sittings from start to deploy, but it definitely had its own quirks and challenges. Here are a few issues I encountered during the migration:&lt;/p&gt;

&lt;h2&gt;
  
  
  Image paths
&lt;/h2&gt;

&lt;p&gt;I had a few issues with images not showing up from both my markdown files and my main images folder. I learned that during the site generation, the images are fetched from the &lt;strong&gt;static&lt;/strong&gt; directory and placed into the &lt;strong&gt;public&lt;/strong&gt; directory root. So when referencing images from a markdown I had to do it relative to the public folder not relative to my source directory structure. &lt;/p&gt;

&lt;p&gt;So for images stores in &lt;strong&gt;static/images/&lt;/strong&gt; the correct relative paths would need to be something like:&lt;/p&gt;

&lt;p&gt;e.g. for markdown&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;content/blog/myPost.md

&lt;span class="p"&gt;![&lt;/span&gt;&lt;span class="nv"&gt;myImage&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;../../images/blog/myImage.png&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;eg. for HTML and CSS&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* sass/myStyle.sass */&lt;/span&gt;

&lt;span class="nc"&gt;.myPhoto&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url("images/site/image.png")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I learned to always refer to the layout of the public dir rather than my source whenever images had issues. &lt;/p&gt;

&lt;h2&gt;
  
  
  Mobile responsive scaling
&lt;/h2&gt;

&lt;p&gt;After deploying I noticed that all of the mobile reactive styling was not being applied. After some digging I found this &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Viewport_concepts"&gt;Mozilla article&lt;/a&gt; explaining viewports. By default Zola does not set any scaling options, so the mobile-responsive scaling was not working. Simply adding the meta tag below solved this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Top 5
&lt;/h2&gt;

&lt;p&gt;One feature I wasn't able to carry over from my old site was my front page "Most Recent" posts. In Gatsby you can write a GraphQL query to fetch the top 5 posts by date and wrap them in a looping construct to be displayed dynamically. I havn't figured this out with Zola yet, so if anyone has suggestions lets get in touch!&lt;/p&gt;

&lt;p&gt;Eventually I want to be able to display the top 5 most recent posts dynamically, but for now I'll just use static HTML.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploying to Netlify
&lt;/h2&gt;

&lt;p&gt;I think the documentation might be a little out of date on this one. When I first deployed following the docs instructions my site would hang for 20 minutes during the build step, eventually hitting Netlify's execution time limit. I eventually followed &lt;a href="https://dev.to/davidedelpapa/zola-tutorial-how-to-use-zola-the-rust-based-static-site-generator-for-your-next-small-project-and-deploy-it-on-netlify-375n"&gt;another tutorial&lt;/a&gt; which recommended adding configs to a &lt;strong&gt;netlify.toml&lt;/strong&gt; file. This resolved my issue immediately and the builds were blazing fast 🔥.&lt;/p&gt;

&lt;p&gt;Here's my netlify.toml:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[build]&lt;/span&gt;
&lt;span class="py"&gt;publish&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"public"&lt;/span&gt;
&lt;span class="py"&gt;command&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"zola build"&lt;/span&gt;

&lt;span class="nn"&gt;[build.environment]&lt;/span&gt;
&lt;span class="py"&gt;ZOLA_VERSION&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"0.18.0"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Documentation and Plugins
&lt;/h2&gt;

&lt;p&gt;Zola's documentation isn't nearly as thorough or robust as Gatsby. The community is pretty tiny by comparison. I searched YouTube for some tutorials and only found a handful of videos... and half of them were about a completely different static site generators like Hugo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Vanilla JavaScript
&lt;/h2&gt;

&lt;p&gt;Well the elephant in the room is "do you miss React"? And honestly, not really. I only ever had a two simple JavaScript functions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;one to handle opening and closing the hamburger menu&lt;/li&gt;
&lt;li&gt;and a second on to dynamically update the year in my footer&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why do I need a massive JS bundle to do something so simple. Yes components are really nice and React has some super powerful features, but it was honestly really fun going back to VanillaJS and manipulating DOM elements directly. &lt;/p&gt;

&lt;p&gt;For me it was especially nostalgic. It reminded me of the summer in 2016 that I spent on my grandparents' farm in the village in Ukraine 🇺🇦. I was just a budding web developer and I brought Jon Duckett's famous &lt;a href="https://amzn.to/3VDEepi"&gt;JavaScript &amp;amp; jQuery&lt;/a&gt; book with me. I read it cover to cover and learned JavaScript that summer. it was fun to go back to those basics.&lt;/p&gt;

&lt;p&gt;For those curious, here's all the JavaScript I needed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="c1"&gt;// hamburger toggle responsive menu&lt;/span&gt;
  &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;DOMContentLoaded&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;burger&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.navbar-burger&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;menu&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.navbar-menu&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nx"&gt;burger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;click&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;burger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toggle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;is-active&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nx"&gt;menu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toggle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;is-active&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="c1"&gt;// Get the current year and set it in the footer&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;year&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;getFullYear&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dynamic-year&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`© &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; himynameisoleg`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Outro
&lt;/h1&gt;

&lt;p&gt;Well thats all it really took. It was a really fun project and I highly encourage anyone to try out some static site generators like Gatsby, Zola, Hugo... to name a few. I think every major front-end framework and modern language has its own flavor these days.&lt;/p&gt;

&lt;p&gt;Looking ahead, I am thinking for the next big replatform I'll try a slightly different approach. I want to build  out on  traditional hosted solution like Ruby on Rails, Laravel or Rocket and try out CloudFlare &lt;a href="https://developers.cloudflare.com/cache/"&gt;caching&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Till then, L8er!&lt;/p&gt;

&lt;h1&gt;
  
  
  Links
&lt;/h1&gt;

&lt;p&gt;Zola Repo: &lt;a href="https://github.com/himynameisoleg/himynameisoleg-zola"&gt;github.com/himynameisoleg/himynameisoleg-zola&lt;/a&gt;&lt;br&gt;
Gatsby Repo: &lt;a href="https://github.com/himynameisoleg/himynameisoleg-gatsby"&gt;github.com/himynameisoleg/himynameisoleg-gatsby&lt;/a&gt;&lt;br&gt;
Website: &lt;a href="https://himynameisoleg.com"&gt;himynameisoleg.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>zola</category>
      <category>gatsby</category>
      <category>ssg</category>
      <category>rust</category>
    </item>
  </channel>
</rss>
