iOS Swift developer with an unhealthy amount of Android and Flutter thrown in. Cycling enthusiast. Admirer of TTRPGs, sometimes a player, often times a GM.

  • 0 Posts
  • 11 Comments
Joined 1 year ago
cake
Cake day: June 13th, 2023

help-circle
  • I think the responder means that duplicate code is usually easy to refactor into single methods. Typically I see copy pasted code that is changed just a little bit. However much of a duplicated function can be broken into smaller functions and the redundant code removed in favor of calling into the functions. Often what is left then becomes easier to reason about and refactor accordingly. I love the PRs that I make which delete more code than I add but still manage to add functionality. It doesn’t happen often but it’s fun when it does.







  • It’s a highly opinionated book but it is full of good advice that in my opinion goes too far. Using a metaphor here, I think he wanted to get people to the moon but knew that he needed to give guidance to get to mars because people would look at whatever he wrote and think it’s too much.

    The book has several chapters discussing the SOLID design principles and showing how to apply them. You’ll be a better programmer for reading it. “Uncle Bob” the person can be a bit problematic so I don’t particularly like telling people to give him money. Try getting the book from the library or a second hand store. There are also videos out there of him speaking at conferences that may give a good taste of the material. He has a blog too.


  • There is a school of thought that break and continue are just goto in disguise. It helps that these two are more limited in scope than goto and can be considered less evil. If you read the book Clean Code by Robert Martin (it should be required reading for all developers), you’ll see that he doesn’t like functions to be very long. I think his rule is no more than 4 lines. I try to keep mine around 10 or less with a hard stop at 20 unless it can’t be avoided because I’m switching over a large enum or something. If you put your loops into functions then you can just use return instead of break.

    I did have a discussion with a teacher once about my use of early returns. This was when I had returned to school after many years as a professional programmer. I pointed out that my code has far less indentation than theirs and was simpler because of it and that it is common in the world outside of education. I got all of my points back he has deducted.

    You’re going to hear some good and bad advice from your teachers. Once you have a job check out what the good developers are doing and just follow them.



  • The recruiter won’t care much about why you want to leave a job. Their primary focus is to get you into a new job in order to collect a fee from the employer. The recruiter will ask you some basic screener questions while very likely not understanding what it is they are asking. If this is an internal recruiter the questions likely came from the hiring manager. If it is a staffing agency, you’re lucky if the recruiter even has a direct relationship with the company. More likely they’re one of a dozen+ companies trying to find a warm body for to put in front of the company. I often receive several LinkedIn messages for the same job in my local area from various staffing firms.

    One thing you should do is take a look at your list of negatives and turn them into positives that you have to offer a new employer. For instance, the item about many senior engineers joining and leaving can be turned into, “I have been exposed to a broad range of coding styles and architectures from working with many codebases built by knowledgable developers. Supporting and maintaining them in a production environment has allowed me to see what works well, what doesn’t, and to better my own style.” Be prepared to give one or two examples of how you were influenced by the good and the bad. If I were interviewing you, I would ask for them.

    Regarding your first two bullet points, you probably shouldn’t be interviewing for junior positions with four years of experience. Make sure that you’re interviewing for mid-level positions. It’s rare to be asked why you want to leave your current position. If it happens just say that your company is in a hiring freeze and that you’re doing the work of a mid level programmer but are unable to be promoted and that you need the extra income to purchase a house.