Tips

FAQ: Starting Your Career in Software Development Pt2

Applying for Software Development Jobs

How do I stand out on an application?

I think this is largely going to depend on where you’re applying. Something to consider is that especially with large tech companies, they’re getting thousands and thousands of resumes all the time. It can be really competitive to be able to even land an interview so sometimes if the caliber of other applicants is high, it can make it difficult to stand out.

That’s okay. We don’t have control over others, but we do have control over ourselves! We can try a few different things to stand out and help you get started on your software development journey professionally. The following are things I personally would suggest and may not reflect the exact views of my employers (past, present, or future) and may not reflect those exact views of recruiters/screeners at other companies. There’s my disclaimer!

  • Understand what the minimum requirements are and exceed them when you can. It’ll be hard initially, especially when job positions ask for a minimum amount of time as a professional. If you checked out this post and you had several internships, you’re actually already on your way to listing out necessary work experience! If you couldn’t land internships, or this is your first internship you might not have that luxury (and that’s okay!). Do the job description list other skills or experiences that are required? Can you get examples of that on your resume? Remember, if there’s many other candidates, it’s easy for screeners to filter out applications that don’t seem to meet the minimum requirements (even if you’re totally awesome!) just because there’s so much volume for them to get through.
  • Side projects are your best friend. Think about it though. If 1000 people apply for a job and all have similar work and school experience, how would you stand out? Well, if you’ve been working on some cool stuff outside of work and demonstrating that you have a genuine interest in different areas of software development, that could be huge! Are you going to be working with SQL in your new role? Maybe mention that cool tinder-for-restaurants app you made. Oh, that also demonstrates you know some cross-platform development tools. Awesome! What about that fun web app you made? AND you can put a link to it for them to try out? That could be a huge win if it’s a smaller org that has time to dig a bit deeper on applicants.

    For me, side projects are one of the most important pieces to consider. I get it though. Not everyone has time or the interest to work on stuff outside of their 9-5. And I’m not suggesting this is a requirement or the only way to land a job. I just think this is one of the best and easiest ways to stand out because it shows passion for creating, learning, and interest in your field on top of your work experience (that may or may not look like a majority of other applicants).
  • Your school grades matter… Until they don’t. I don’t want to give people the wrong advice here, so I’ll try to be clear. Especially during internships and at companies that get a lot of applications, grades are likely going to be a factor. It’s just another super easy way for a company to set the bar high and filter out a large amount of applicant volume. I don’t necessarily feel it’s the best way to filter candidates, but I also don’t blame companies for doing this if there’s overwhelming volume. If two people have identical applications but one received a 5% higher average in all of their courses, if you only have time to interview one you’ll likely pick the one with the higher average. Again, I’m not suggesting this implies the other candidate is not worthy or this will always net a company the best employees, I’m just saying that they need to filter down candidates and it’s an easy way to do it.

    With that said, my personal opinion is that I don’t care about grades. Not much, anyway. For interns, I’d probably expect someone to do well in their programming courses, but if your calculus and physics marks were super low I really don’t care. Not unless I’m hiring you to do physics and calculus. But generally (and I hope this comment ages well!) I’m not. I’m hiring you to be a productive member of an awesome software development team.

    Once it comes time for full-time employment I don’t really care about grades at all. I want to know about interesting experiences that are relatable to what you’re applying for. This will give me fuel for engaging interview questions as well, which is our next question!

What types of interview questions should I expect?

I’ll just throw out another reminder here that this is fully my own opinion and not necessarily the opinion of my past, current or future employers. When I’m interviewing people for software development positions, there’s certainly a minimum expectation I have with respect to programming abilities. It might not be what is popularized on the Internet though.

First off, I need evidence that you have actually programmed before. Ideally this is done in a pre-screen (online, over the phone, etc…) before I’m sitting down with you for a lengthy hour (or more) long interview. I have sat in interviews with people that have claimed multiple years of professional programming experience but could not answer FizzBuzz. What’s not make-or-break for me is your knowledge in a specific programming language. Sure, if you’re an expert in the language(s) we’re using heavily in our stack that’s great for ramp up time. However, I feel that great programmers can learn other languages and be effective with them, and I’m seeking great programmers.

Next, I want to see you problem solve. I’m not impressed by you being able to answer an algorithm-based question immediately or jumping right to coding up a heavily optimized solution perfectly the first time around. Why? I’ve known people to memorize these sorts of things. Sure, the pool of questions to pick from feels infinitely large but it certainly does happen where someone lucks out on an interview and they see a question they know an optimized answer for. My interview directly out of university was actually exactly like this, where I was asked one single question and I knew the optimized answer for it in detail (which I disclosed to the interviewers). But as an interviewer, I have no interest in picking candidates based on their memorization abilities. I want you to explain your thought process. I like adjusting the question on the fly with different constraints and have you explain why you might change your design or approach. Why? Because in the real world of software development this kind of thing happens all the time. What doesn’t happen all the time are really contrived theoretical algorithm questions popping up regularly. And just to wrap up thoughts on this point, there are absolutely real situations where applying knowledge and understanding from these algorithm questions is critical, but I don’t feel memorized solutions to these help in the real world.

If you plan on working in big tech companies, especially ones with services running in the cloud, you’ll probably be asked system design questions. I won’t write much here because my thoughts on this are essentially the same as the previous paragraph. Don’t memorize. Understand, explain trade-offs, be able to work through different constraints in your systems! There are plenty of sites online that offer examples to go through, and great examples on YouTube, so I’d just take the time to go learn and understand (not memorize).

Finally, I love seeing how people work together on teams. This is something I’m trying to understand throughout the entire interview process. I want to make sure you’re collaborative and that you’ll work well with others. In the real world of software development, you’re almost always working with others. Being the most amazing programmer but not being collaborative doesn’t work well in any environment that I’ve worked in over the last 10+ years.

How do I stand out in an interview?

If you’ve nailed down the stuff in the previous points, you’re probably doing great. But beyond that, I want to see and hear about your cool work experiences. I want to hear how you problem solved and developed creative solutions. Tell me your favorite project. Explain how you learned from one of your failed projects and what you’d do differently going forward. Tell me more details about how you work well with others, even when there were difficulties between team members. Tell me about unique challenges you worked through with your team and how you contributed to the success.

I love seeing people get pumped up about their hobby projects they work on outside of work. It helps to demonstrate that you’re constantly learning, challenging yourself, and that you’re passionate about software. As I said towards the start of this post, I understand that not everyone has time for this kind of thing so it’s not a make-or-break item on an interview. But we’re talking about standing out, and for me, this is something that becomes memorable.

Should I reach out to (hiring) managers directly?

This can largely depend on the organization and how they approach hiring. So my suggestion here is hopefully a good-enough general approach to answer this.

First off, I think you should start by going through the normal HR/recruiting channels that a company has to offer. Get into the system. Get your application/resume in and get queued up so that the right processes can get underway. If you’re already interested in the job, I think this is your first starting point. When people reach out to me and ask about hiring, this is exactly where my mind goes.

Next, if you’re reaching out to managers, I think there’s some do’s and don’ts to consider.

  • DON’T assume that every manager on LinkedIn is currently hiring or directly involved in the hiring process. The conversation generally won’t go too much further if you’re asking person for a job and they’re not in a position to be hiring. Chances are they’ll recommend you do what I suggested above and go through normal recruitment channels.
  • DO reach out with a specific posted position if you think it’s relevant or know it’s specific to their team. Structure your conversation around expressing interest in this role and ask your clarifying questions about it.
  • DON’T ask for referrals if you’ve never worked with the person. I personally don’t know why people expect this to be successful. If I’m recommending someone, it’s my name going along with that referral. Instead of asking for a referral, consider asking if they’re aware of other roles or information about where you can find additional posted roles.
  • DO be personable and respectful. Express interest in the area this manager is hiring for (after you’ve confirmed your assumptions, right?) and ask about the best way to get visibility for applying. If they suggest the best way is truly going through the HR/recruitment pipeline, being more pressing beyond this likely won’t be beneficial. Some managers do more hiring directly and other times this is largely through these other channels.
  • DON’T reach out with expectations that by doing so you will guarantee that you’ll be considered for a role or that the manager has an obligation to set you up for this. This goes back to being respectful. Generally people will try to help if they can, but it’s unfair to set expectations that they’ll drop what they’re doing to help you get a position.

This series of FAQ posts was actually inspired by an individual reaching out with some very specific questions that I could answer. Many of these were asked by others over time, but this individual was polite, patient, and concise in what he wanted information on. There were no demands of me or expectations I’d secure him a job. I think his approach was spot on.


FAQ: Starting Your Career in Software Development Pt1

Navigating Post Secondary Education for Software Development

Do you have any advice regarding university applications?

For university, it’s been so long since I’ve had to go through applications that I’m not sure I have really specific advice. I think it’s important to know what schools have for prerequisites and really ensure you nail those down. In terms of which school to pick, that’s certainly a personal choice. You’ll have so many factors to consider including cost, what programs are offered, relocation, proximity to loved ones, etc…

As a hiring manager, personally, I am less concerned with WHERE someone went to school versus what they could showcase about what they have learned. I’d also personally suggest checking out schools that offer internships since it’s an excellent way to get real experience! This is something that worked really well for me since I didn’t really enjoy classes but my co-op positions proved to me that I was in the right line of work.

Software engineering or computer science?

Great question! I opted for computer engineering. Couple of things to touch on here including the “computer” part meant both electrical and software as a blend. I loved to program but I wanted to learn about hardware. Once I learned about hardware, I realized I wanted nothing to do with it 🙂

The engineering vs science part… My understanding is that if you want to pursue being a licensed professional engineer, you must go to a school with an accredited engineering program. For me, this is something that I wanted personally. Funny enough, in software, it doesn’t seem to be too common that folks go for their P.Eng. As a result, it makes it harder for someone like me to work under a P.Eng to get that experience.

How do you navigate scholarships?

I’m not sure I received much of anything for scholarships/grants when I was going for school, but if I could go back in time I would kick my own butt… DO THIS. If you can get free money to fund your education, do it. Do the research. Write the essays. Invest time into this because it will pay off by subsidizing your school. You’ll be so thankful you did it later.

If someone would potentially pay me to write an essay now, I’d do it even 9+ years after graduating from university. You bet I would 🙂 I don’t think I could motivate myself at the time, but if you’re reading this then please do better at this than I did!

Any general tips for going into college/university?

Beyond what’s already been mentioned, I think that’s mostly it. Take it seriously to make sure you can meet the requirements of the schools you want to go to. It’s easier said than done, because I can remember I just wanted to be a kid, be with my friends, play video games, etc… But it’s a huge step in your life. Take it seriously.

People used to make fun of me for getting high grades in high school. It’s natural to want to fit in so it would be embarrassing to do well on tests. It would make me want to slack off. But remember, you need to put in the work to get in. And once you’re in, you need to KEEP working to stay in.

Another critical point is that you need to take the time to understand how you learn. I went from getting 95+ in all my courses to barely passing things. And a pass was more than just getting 50% for my average to be in an honors program, so it went from being a super laid back approach to feeling pretty scary. For me personally, I learned nothing in my lectures. I’d sleep half the time. So I stopped going into class (aside from tutorials and labs) and would force myself to do work at home. This doesn’t work for everyone, but it was critical for me to not be wasting my time sleeping in lecture halls. This took me a long time to realize. I also had to teach myself how to study effectively. I had to learn to take mini breaks. You learn a lot about yourself, but I think you need to have some awareness that your high school learning might look VERY different than post-secondary learning.

Once you have a good understanding of how you can learn and study, you’ll be on the right track.

What are your thoughts on internships?

Do them if you can. I can’t stress this enough. I disliked almost all aspects of my time in school (like the IN class part!) but my internships saved me. They were a constant reminder that as long as I finished I’d be doing what I loved.

If your school allows for different placements, take advantage of this. I had 6 internships at the University of Waterloo. I did a repeat of my first job, a repeat of my second job, and then tried two different companies after that. I gravitated towards startups, but I also tried working in a larger company as well. Get. Diverse. Experience. Learn about all the different fields you can get into. Software is such a cool industry because… It’s in every industry!

Another benefit to internships is potentially securing a position for right out of school. Cool huh? If you’re really liking where your internships take you, then why not take advantage of companies looking to take you on full time right out of school? Many companies are happy to invest in you, especially if you’re going to be sticking with them after you graduate!


Objectives & Key Results: First Steps to OKRs

At a Glance – What are OKRs?

If you’ve arrived at this post, you’ve probably heard of OKRs but maybe you’re looking for a bit more of an introduction to them. Not to worry! We’ll keep this light and practical for getting started.

OKRs are a framework for helping define, communicate, and measure progress towards goals. Their intention is to not be specifically top-down, but instead there’s goal setting and transparency that works both ways. Objectives, the ‘O’ in OKRs, are essentially single sentence that communicates what you’re trying to achieve. These should drive the point home at a high level, and there’s nothing wrong with making them feel exciting. Key Results, the ‘KR’ part of OKRs, are the metrics that you will be using to gauge how successful you are to achieving your objective. Usually you group about 3-5 KR’s with an objective, but if you’re just getting started with this I don’t think there’s any issue with trying to just nail down ONE. It might be trickier than you think!

Here’s a little example to demonstrate:

Have a world class service that operates at the speed of light, as measured by:

  • Decreasing response latency on API A from 100ms to 60 ms
  • Increasing throughput on API B from 10 MB/sec to 20 MB/sec

In the example above, the first line is the objective. For this OKR, the objective indicates that we’re interested in having a FAST service. The two line items are the key result portion of this OKR and they both describe two different metrics that we’re looking to improve in very specific ways. It’s also important to mention that like with any good set of goal setting, OKRs are timeboxed. In your work environment, you might do these annually, semi annually, quarterly, or some other interval that allows your team to make progress.

A Closer Look at Key Results, the KRs of OKRs

One of the most important parts about setting your KRs is that these should be measurable and specific with a start and end measure. These are supposed to be used to gauge your success when reflecting back to see if you accomplished your objective, so it’s important that they represent something you can measure. And you’ve probably heard something like “You get what you measure” before and this is VERY true for OKRs. If you put a set of metrics in front of a team and tell them to optimize them, generally you’ll get results specific to those measures! If they don’t actually tie back to represent your objective well, you might get awesome progress but for the wrong reasons.

Another call out is that KRs should not be binary. For example, going from 0 to 1, on to off, or going from a feature not landed to feature landed don’t really make good KRs. These might be specific tasks you need to do to help influence the metrics, but they don’t lend themselves well for progression. Why? Consider an example where you might do 99% of the work in your time period and miss landing the feature that enables allllll the goodness for your change that gets you that huge performance boost. From the KR perspective, that’s still a 0% improvement until it’s landed. How were you tracking your progression to reaching your goal if the entire time you were pinned at 0% progress? How does your team feel to have 0% on target after all the hard work that went into something? How do your stakeholders feel when it’s the last week of your period and you’re still trending at 0%? Nobody is saying it’s easy to avoid, it’s just that it’s not very helpful to pick KRs like this. It’s also helpful to think through situations like this and maybe find ways where you can incrementally deliver functionality to avoid these all-or-nothing situations in general! So ideally, your measurements should be on a sliding scale that allow you to demonstrate progress towards a goal.

Finally, the KR’s you pick for your OKRs should be ambitious but achievable. One of the major purposes of using OKRs is getting alignment to drive change in an area, so the “spirit” of the KRs you’ve picked should be understood. If people find these KRs too easy, then you’re not necessarily getting the most effectiveness out of setting up OKRs to help rally progress in an area. However, if they’re too challenging this might be demotivating if people feel they can’t make any progress. I personally think that aggressive KRs can be great if your team can truly influence the KR metrics in meaningful ways.

… What If There Aren’t Metrics Yet?

Right, so if this is all making sense so far you might be thinking through some potential scenarios relative to your job/team/product/service and thinking “I’d love to improve X, but… we haven’t been measuring anything. How can we even have OKRs if we can’t measure? Isn’t that a requirement?”. Technically, you’re right. But not to worry! We all have to start somewhere.

Personally, I believe getting started with OKRs is the most important part. No metrics yet? Instead, spend time to figure out what you WOULD want. Then, start building the measurements out and try making your improvements as you’re figuring out how to measure things. Is that breaking the rules? Yup, you bet it is. Is it going to be a learning experience and something you can improve on next time? Absolutely. Remember, the “spirit” of the OKRs you’re using is to help drive change.

Going through the OKR process is still a useful exercise, helping you to envision what success criteria might look like. While you may not have rock-solid super granular metrics now, maybe there’s some other things you can infer in the short term to guide you! You don’t have performance telemetry being reported with awesome dashboards? No sweat. You’ve been hearing from customers about 10x per week now that performance isn’t up to par? Great! Start with that. Your goal is to try making improvements such that you hear on average 6x reports about performance per week, and in the meantime, you’re going to start building out that awesome performance telemetry and dashboard. A rough metric might be better than no metric, and maybe next time you want to focus on this, you’ll be in WAY better shape with your new telemetry.

As you’re building metrics out, consider if they something the stakeholders care about. OKRs ideally focus on some understandable business value. Another important aspect is if these metrics are something that change-drivers (i.e. maybe the engineers or other roles on your team) can influence. If people are investing all this time and effort to help influence metrics but the actual measure is something they don’t directly affect, it can be frustrating. Ideally, your metrics are something with clear business value AND something your team feels they can directly influence.

Another thing to consider is if something warrants a rolling-average or trend compared to a value at a single point in time for the metric to be measured. Often times with things like services you might be concerned with trends, and in order to avoid statistical blips or other factors causing noise in your measurements, it might make sense to average your measurements out to smooth the numbers! Continuing with our performance example, if you reached your target one week because you measured your service over a holiday when nobody was using it and the small amount of traffic therefore looked incredible, that might not be a great representation of your actual progress. Conversely, if there was some type of outage or incident that caused your measures to temporarily be outliers, you shouldn’t toss in the towel and give up! Rolling averages can be your friend here but ultimately this is something you’ll want to think through.

Finally… Just Get Started With OKRs!

We just talked about all these “rules” for good KR’s, but especially when you’re getting started, you won’t get it “right” the first time. That’s okay. It’s going to take time, practice, refinement, and building out new measurement methods you might not have yet! Until you’re in the groove of setting up good OKRs, think about what the “spirit” of the OKR is supposed to be. Focus on how your objectives and key results will motivate your team to drive change in the areas that matter.

When you’re creating your next set of KRs, reflect on the previous ones! Continuously improve! Were your goals too easy? Too hard? Were you “gaming” the metrics or did your metrics line up with the “spirit” of the KRs? Did the metrics truly tie back to the objective in the end? Were those responsible for delivering changes empowered by the KRs? There’s so many things to reflect on and try to make sure you’re doing better next time. It’s definitely a process.

At a minimum, OKRs should help focus the team’s attention… And that’s a win even if you don’t have the most perfect metrics and clear-cut objectives. Try some things out. Reflect on your success. Get better. Repeat. You got this!


Timeboxing: TODO List 2.0!

I recently wrote about TODO lists and how they can help with focus now that many of us are working from home. I had a former colleague on LinkedIn mention this concept of “timeboxing” (which I think many people are familiar with the general idea) and how that can improve the effectiveness of a TODO list.

Here’s the post I made on LinkedIn sharing my blog article:

And the comment that came in right away from Graeme Harvey:

Graeme Harvey - Timeboxing

This obviously got me thinking because sure, Elon Musk is a pretty smart dude, but I also have a lot of respect for Graeme and his perspective on things. So I decided I’d try something out!

TODO Lists v1.0

My original TODO lists didn’t factor in any timeboxing techniques, but they had some benefits. The engineering mind in me says this is a great opportunity to do a little bit of a pros & cons analysis, so if you didn’t think I was nerdy before… Buckle up!

Pros:

  • Generally written out in the order I want (or need) to get things done. Acts a bit like a schedule in that regard.
  • Can have big and small items on the list.
  • Making progress on small items can help build momentum.
  • Let’s me record all the things I want (or need) to get done in the day and track if I did that or not

Cons:

  • No concept of how many things are too many or too few for an entire day’s worth of activity… There’s no timeboxing!
  • No concept of relative time spent on things (If I wrote “eat breakfast” and “Write a novel”, do they each get equal amount of time?)

TODO Lists v1.1

Okay we’re not quite yet at version 2.0 for these, but I took some of the concepts Graeme was referring to and I’ve implemented them every day since he made the comment. I’ve been trying to gauge how things have been going in terms of productivity and I’m already impressed. In fact, writing this blog post is part of my TODO list with timeboxing constraints (so meta, right?).

So the changes I made were very subtle but I’ll list them below:

  • I dropped the concept of putting in order what has to get done. Much of what I’m working on right now doesn’t have true dependencies, so trying to come up with an order for things doesn’t make sense (right now).
  • Every item I write down I put a time estimate on in minutes or hours. Literally everything. Remember I said little things like “Eat breakfast” can still be a TODO item that can help you feel like there’s momentum? Right. Breakfast, 10 minutes. Lunch, 15 minutes. Everything gets a time!
  • I tally up the total time my TODO list should take with timeboxing and do a gut check. I’m at least awake for 16 hours (typically people sleep like 8 hours, right?), but it’s probably closer to 18 hours. Because I’m starting off and don’t have great estimates, I’m ensuring I’m around the 12 hour mark for filling up my day.
  • I’m purposefully leaving some wiggle room in my schedule so that I can try incrementally building this out to be more accurate.

Nothing groundbreaking to implement, but what have I noticed so far?

  • Having a (relatively) small list of things I need to get done and getting to pick the next thing I want to tackle is kind of nice. A bit of flexibility is great!
  • The timeboxing really helps me make sure I’m focused on what I set out to do. 1 hour to review interview questions? Better not scroll on Instagram. 30 minutes to research a topic? Better not be on YouTube.
  • Some estimates for things are way off and some are very accurate! That’s okay though, because the following day I can adjust my estimates accordingly.
  • The overall feeling of being productive and making progress, for me at least, is even higher than it was before.

I’ve really enjoyed this small tweak and I’m hoping to get this to v2.0 status really soon 🙂 Thanks Graeme!


TODO Lists: Keeping focused when you feel lost

TODO List - Photo by Tirachard Kumtanom from Pexels

It’s more relevant for more people now than it probably has been in other times in their professional careers, but COVID-19 means remote work for a lot of people. It also means no work for a lot of people too. I’ve found that a simple tool for me to keep focused is leveraging a TODO list. It’s so simple that I think people often overlook the power of a TODO list when you’re feeling like you’re a bit lost or not making progress.

With your TODO list, the first thing I’d suggest is thinking about a daily routine. Now that you’re working remote, or in the unfortunate case out of work, I think it’s really important that you keep some sort of daily routine to help give you some guard rails. Think about what things you usually do in the morning. What does your lunch look like? How about the later afternoon and into the evening? What does before bed look like? Thinking through your routine will give you an idea of the things you want to focus on and then give you an idea of how much time you’ll need for regular things and how much time you’ll have remaining for stuff that can pop up.

The next thing I’d suggest with your TODO list is to get granular. This is especially important in my opinion if you’re struggling to feel like you’re making progress on anything. You can even write things down like “brush your teeth”. It doesn’t have to be specific to work and it doesn’t have to be anything groundbreaking. You’ll find that as you start making progress by checking off small items that suddenly you’re accomplishing a lot and a day might have gone from feeling like nothing getting done to fulfilling, or from insurmountable to progress being made! The small steps you can take while working through your TODO list are a great way to remind yourself that you’re making progress.

It’s also a good opportunity to remind yourself that these are very strange times for many of us. If you’re working from home or at home and out of work, these could be very new circumstances for you and not at all like your normal routine. That’s okay! Remember the rest of the world is in this together with you.

You should be affording yourself the time to do little things here and there around the house even if you’re working remotely. For example, if you hear your washer/dryer go off in the middle of the day, instead of letting that be something that’s nagging you in the back of your mind consciously go make the time to take a few minute break and change loads of laundry! There are plenty of unique distractions to be had while working from home, but instead of letting them distract you take control and consciously spend the time on the appropriate things.

A sample TODO list might look like the following:

  • AM
    • Get the dog outside!
    • Feed the dog
    • Eat breakfast
    • Hygiene routine
    • Coffee + read news
    • Answer emails
    • Work on Project A
    • Video meeting 1
    • Continue Project A
  • Afternoon
    • Eat lunch
    • Get the dog outside!
    • Do the dishes
    • Answer emails
    • Video meeting 2
    • Work on Project B
    • Get work schedule planned for tomorrow
  • Evening
    • Eat dinner
    • Get the dog outside!
    • Get some exercise!
    • Hygiene routine
    • Pick-a-chore around the house
    • Watch TV/Movie or play a game
  • Before Bed
    • Hygiene routine
    • Read your current book
    • Write out your TODO list for tomorrow

You might have read through that and thought that it feels silly to have a line item for something as simple as brushing your teeth or eating a meal. And that’s totally normal for some people! You might have adapted really well to your change of environment and you’ve got little to no issues adjusting. For others, that won’t be the case. If you’re struggling to feel like you’re making progress, staying on track, or if that the day seems like you’ll never accomplish everything you need to… Take the little wins with very simple things. You’ll notice that you’ll build momentum for yourself.

A friendly reminder to make sure you take the time to get your TODO list together before the next day! I like doing it right before bed so I can run through what I think my following day will look like.


Firebase and Low-Effort User Management

I’ve found myself with some additional time to be creative during the great COVID-19 and lockdown/quarantine days. That’s why there’s more blog posts recently! Actually, I wanted to take the time to experiment with some unfamiliar technologies and build something. For a project, I wanted to leverage authentication but I’m well aware that user management can become a really complex undertaking. I had heard about Firebase from Google and wanted to give it a shot.

For the purposes of this discussion, Firebase would allow me to create something like an OAuth proxy to the system I wanted to build, and by doing so, would end up managing all of the users for me. What I needed to do with Firebase to get that setup was actually quite straight forward.

First, you start off in typical fashion registering for Firebase. From there, you’re asked about adding a new project, which looks like the following:

Create Firebase project

You’re then required to add apps to your project within Firebase. But here’s where your journey might differ from mine. I’m working in Xamarin, so I wanted to be able to add an iOS app and an Android app. The reason you need to do this is so that you can get the proper service information for your app so that it can communicate with Firebase. Google does a great job with walking you through the process, and in the end you’re required to add a service configuration file to each of your projects.

The next part was probably the most time consuming, and that was integrating some sort of OAuth for a platform into my mobile app. There’s tons of documentation about that on the Internet, so I’m not getting into that here. There’s different steps to take depending on what platform (i.e. Google, Facebook, Twitter, etc…) you want to authenticate with and whether you’re working on iOS, Android, web, or something else. Getting this all up and running required the most time on this step but it wasn’t really anything to do with Firebase… it was picking + supporting OAuth for the platforms of my choosing.

I knew which platforms I wanted to work with, but Firebase actually has a set that it supports (including email + password)! You’ll want to check that out because you need to enable the platforms you want to support in the console:

Firebase OAuth Providers

Now you can find the Firebase SDK for the platform you’re working with! Once your application/service is able to OAuth with a platform that you support, ensure it’s enabled in the console. From there you can use a method from the SDK that allows you to sign into Firebase with Oauth. This is where you’d provide the access token from the platform of your choice after having logged into that platform successfully.

The result is that Firebase actually builds a user entry for you with data related back to the OAuth platform. These are based on the providers that you used to authenticate originally. By doing this, you can use these external authentication providers and with minimal effort connect them to your Firebase project! You can get all of the authentication options you’d like AND free user management as a result.

This is high-level, but I will follow up with how we’re leveraging Firebase with the components we’re putting together in our system. Spoiler: ASP.NET controller routes can get protected by Firebase authentication with almost no effort!


CircleCI + BitBucket => Free Continuous Integration!

CircleCI is a service that I heard about from a friend that allows you to get continuous integration pipelines built up for your repositories… And it does it quick and easy. Also, free if you’re someone like me and you don’t have a large demand for getting builds done! I wanted to write about my experience with getting CircleCI wired up with BitBucket, which I like to use for my project hosting, and hopefully it’ll help you get started.

First thing, signing up is super easy if you have BitBucket because you can oauth right away with it. CircleCI will show you your projects & repositories that you have in BitBucket and you can decide which one you’d like to get started with. You can navigate to the projects in their new UI from the “Add Projects” menu.

CircleCI Left Navigation

When you click “Add Projects” you’ll be met with a list that looks like this but… With your own projects and not mine 🙂

Circle CI + BitBucket Project Listing

On this screen, you’ll want to select “Set Up Project” for the project of your choice. For me, I was dealing with a .NET project (which I’ve already setup) so I selected it and was presented with the following screen. It also allows you to pick a template out to get started:

CircleCI Template Dropdown

However, I needed to change the default template to get things to work properly when I had nuget packages! We’re missing a restore step. With some help from my friend Graeme, we were able to transform the sample from this:

 version: 2.1

 orbs:
  win: circleci/windows@2.2.0

 jobs:
   build:
     executor: win/default     
    
     steps:
       - checkout
       - run: dotnet build

To now include the nuget restore step prior to building!

 version: 2.1

 orbs:
  win: circleci/windows@2.2.0

 jobs:
   build:
     executor: win/default     
    
     steps:
       - checkout
       - run:
          name: Restore
          command: dotnet restore
       - run:
          name: Build
          command: dotnet build -c Release

Once you save this, CircleCi will make a branch called “circleci-project-setup” on your remote. It then goes ahead and runs your build for you! When the build for this new remote branch succeeded, I pushed this configuration to my “master” branch so that all builds on master going forward would get continuous integration builds.

Checking the CircleCI dashboard now looks like the following:

CircleCI Successful Pipelines

You can see pipeline #1 is on the branch where the test circleci configuration was made (and passed). Pipeline #2 is once I added this commit onto my master branch and pushed up! Now I have continuous integration for pushing to my lib-nexus-collections-generic BitBucket project. When I check out my commit page, I can see the new commits after the configuration landed get a nice green check when the builds pass on CircleCI:

BitBucket Commit Listing With Builds

So with a few easy steps, you can not only have free source hosting in BitBucket but free continuous integration from CircleCI. Every time you push code to a remote branch, you kick off a build! This is only the starting point as you can configure CircleCI to do much more than just restore nuget packages and build .NET solutions 🙂


xUnit Tests Not Running With .NET Standard

Having worked with C# for quite some time now writing desktop applications, I’ve begun making the transition over to .NET standard. In my professional working experience, it was a much slower transition because of product requirements and time, but in my own personal development there’s no reason why I couldn’t get started with it. And call me crazy, but I enjoy writing coded tests for the things I make. My favourite testing framework for my C# development is xUnit, and naturally as I started writing some new code with .NET Standard I wanted to make sure I could get my tests to run.

Here’s an example of some C# code I wrote for my unit tests of a simple LRU cache class I was playing around with:

    [ExcludeFromCodeCoverage]
    public sealed class LruCachetests
    {
        [Fact]
        public void Constructor_CapacityTooSmall_ThrowsArgumentException()
        {
            Assert.Throws<ArgumentException>(() => new LruCache<int, int>(0));
        }

        [Fact]
        public void ContainsKey_EntryExists_True()
        {
            var cache = new LruCache<int, int>(1);
            cache.Add(0, 1);
            var actual = cache.ContainsKey(0);
            Assert.True(
                actual,
                $"Unexpected result for '{nameof(LruCache<int, int>.ContainsKey)}'.");
        }
    }

Pretty simple stuff. I know that for xUnit in Visual Studio, I need to get a nuget package for the test runner to work right in the IDE. Simple enough, I just need to add the “xunit.runner.visualstudio” package alongside the xunit package I had already included into my test project.

Nuget package management for project in visual studio showing required xUnit packages.
Required xUnit nuget packages

Ready to rock! So I go run all my tests in the solution but I’m met with this little surprise:

[3/24/2020 3:59:10.570 PM] ========== Discovery aborted: 0 tests found (0:00:00.0622045) ==========
[3/24/2020 3:59:20.510 PM] ---------- Discovery started ----------
Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Unable to find C:[redacted]binDebugnetstandard2.0testhost.dll. Please publish your test project and retry.
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.GetTestHostPath(String runtimeConfigDevPath, String depsFilePath, String sourceDirectory)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.GetTestHostProcessStartInfo(IEnumerable`1 sources, IDictionary`2 environmentVariables, TestRunnerConnectionInfo connectionInfo)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources, String runSettings)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler)
[3/24/2020 3:59:20.570 PM] ========== Discovery aborted: 0 tests found (0:00:00.0600179) ==========
Executing all tests in project: [redacted].Tests
[3/24/2020 3:59:20.635 PM] ---------- Run started ----------
[3/24/2020 3:59:20.639 PM] ========== Run finished: 0 tests run (0:00:00.0039314) ==========

Please publish your test project and retry? Huh?

As any software engineer does, I set out to Google for answers. I came across this Stack Overflow post: https://stackoverflow.com/q/54770830/2704424

And fortunately someone had responded with a link to the xUnit documentation: Why doesn’t xUnit.net support netstandard?

The answer was right at the top!

netstandard is an API, not a platform. Due to the way builds and dependency resolution work today, xUnit.net test projects must target a platform (desktop CLR, .NET Core, etc.) and run with a platform-specific runner application.

https://xunit.net/docs/why-no-netstandard

My solution was that I changed my test project to build for one of the latest .NET Frameworks… and voila! I chose .NET 4.8 as the latest available at the time of writing.

My next attempt at running all of my tests looked like this:

Executing all tests in project: [Redacted].Tests
[3/24/2020 3:59:20.635 PM] ---------- Run started ----------
[3/24/2020 3:59:20.639 PM] ========== Run finished: 0 tests run (0:00:00.0039314) ==========
[3/24/2020 4:08:14.898 PM] ---------- Discovery started ----------
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.4.1 (32-bit Desktop .NET 4.0.30319.42000)
[xUnit.net 00:00:00.40]   Discovering: [Redacted].Tests
[xUnit.net 00:00:00.47]   Discovered:  [Redacted].Tests
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.4.1 (32-bit Universal Windows)
[3/24/2020 4:08:16.289 PM] ========== Discovery finished: 2 tests found (0:00:01.3819229) ==========
Executing all tests in project: [Redacted].Tests
[3/24/2020 4:08:17.833 PM] ---------- Run started ----------
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.4.1 (32-bit Desktop .NET 4.0.30319.42000)
[xUnit.net 00:00:00.41]   Starting:    [Redacted].Tests
[xUnit.net 00:00:00.66]   Finished:    [Redacted].Tests
[3/24/2020 4:08:19.337 PM] ========== Run finished: 2 tests run (0:00:01.4923808) ==========

And I was back on my path to success! Hopefully if you run into this same issue you can resolve it in the same fashion. Happy testing!


Autofac Modules and Code Organization

Organizing Code With Autofac Modules

What are Autofac Modules?

I’ve been writing a little bit about Autofac and why it’s rad, but today I want to talk about Autofac modules. In my previous post on this, I talk about one of drawbacks to the constructor dependency pattern is that at some point in your application, generally in the entry point, you get allllll of this spaghetti code that is the setup for your code base.

Essentially, we’ve balanced having nice clean testable classes with having a really messy spot in the code. But it’s only ONE spot and the rest of your code is nice. So it’s a decent trade off. But we can do better than that, can’t we?

Autofac modules!

We can use Autofac modules to organize some of the code that we have in our entry point into logical groupings. So an Autofac module is an implementation of a class that registers types to our dependency container to be resolved at a later time. You could do this all in one big module, but like many things in programming, having some giant monolothic thing that does ALLLL the work usually isn’t the best.

An Example of Converting to Autofac Modules

Let’s create a simple application as an example. I’ll describe it in words, and then I’ll toss up some code to show a simple representation if it. We’ll assume we’re using dependencies passed as interfaces via constructors as one of our best practices, which makes this conversion much easier!

So our app will have a main window with a main content area and a header area. These will be represented by three objects. Our application will also have a logger instance that we pass around so classes that need logging abilities can take an ILogger in their constructor. But our logger will have some simple configuration that we need to do before we use it.

Let’s assume to start our Program.cs file looks like this:

internal sealed class Program
{
    private static void Main(string[] args)
    {
        var logger = new FileLogger();
        logger.LogLevel = LogLevel.Debug;
        logger.FilePath = "log.txt";

        var header = new FancyHeader(logger);
        var content = BoringMainContent();
        var window = new MainWindow(header, content);
        window.Show();
    }
}

Before getting comfortable with Autofac, my initial first step would be to logically group things in the main method. In this particular case, we have something simple and surprise… it’s all grouped. But my next step would usually be to pull these things out into their own methods. I do this because it helps me identify if my groupings make sense and where my dependencies are. Let’s try it!

internal sealed class Program
{
    private static void Main(string[] args)
    {
        var logger = InitializeLogging();
        var window = InitializeGui(logger);
        window.Show();
    }

    // no params passed in, so no dependencies
    // return value is an ILogger, so we have a
    // logical grouping that will provide us a logger
    private static ILogger InitializeLogging()
    {
        var logger = new FileLogger();
        logger.LogLevel = LogLevel.Debug;
        logger.FilePath = "log.txt";
        return logger;
    }

    // only parameter is a logger, so that's our dependency
    // return value is a window, so this grouping provides
    // a window for us
    private IWindow InitializeGui(ILogger logger)
    {
        var header = new FancyHeader(logger);
        var content = BoringMainContent();
        var window = new MainWindow(header, content);
        return window;
    }
}

Alright cool. So yes, this is a bit of extra code compared to the initial example, but I promise you grouping these things out into separate methods as a starting point when you have a LOT of initialization logic will help a ton. Once they are in methods, you can pull them out into their own classes. Refactoring 101 for single responsibility principle going on here 😉 BUT, we’re interested in Autofac. So what’s the next step?

We have two logical groupings going on here in our example. One is logging and the other is for the GUI. So we can actually go ahead and make two Autofac modules that do this work for us.

public sealed class LoggingModule : Module
{
    protected override void Load(ContainerBuilder builder)
    {
        builder
            .RegisterType<FileLogger>()
            .AsImplementedInterfaces() // FileLogger will be resolved as an ILogger
            .SingleInstance() // we only ever need to use one logger instance for our app
            .OnActivated(x =>
            {
                // this handles our extra setup we had for this object
                x.Instance.LogLevel = LogLevel.Debug;
                x.Instance.FilePath = "log.txt";
            });
    }
}

public sealed class GuiModule : Module
{
    protected override void Load(ContainerBuilder builder)
    {
        builder
            .RegisterType<FancyHeader>() // this has a dependency on ILogger, but autofac will figure it out for us
            .AsImplementedInterfaces() // FancyHeader will be resolved as IHeader
            .SingleInstance(); // we only ever need to use one instance for our app
        builder
            .RegisterType<BoringMainContent>()
            .AsImplementedInterfaces() // BoringMainContent will be resolved as IContent
            .SingleInstance(); // we only ever need to use one instance for our app
        builder
            .RegisterType<MainWindow>() // Autofac will resolve our IHeader and IContent dependencies for us
            .AsImplementedInterfaces() // MainWindow will be resolved as IWindow
            .SingleInstance(); // we only ever need to use one instance for our app
    }
}

And those are our two logical groupings for modules! So, how do we use this and what does our Main() method look like now? I’ll demonstrate with one way that works for a couple modules, but I want to follow up with another post that talks about dynamically loading modules. If you can imagine this scenario blown out across MANY modules, you’ll understand why it might be helpful.

The idea for our Main() method is that we just want to resolve the one main dependency manually and let Autofac do the rest. So in this case, it’s our MainWindow.

private static void Main(string[] args)
{
    // create an autofac container builder
    var containerBuilder = new ContainerBuilder();

    // manually register our two new modules we made
    containerBuilder.RegisterModule<LoggingModule>();
    containerBuilder.RegisterModule<GuiModule >();

    // create the dependency container
    var container = containerBuilder.Build();

    // resolve and use our main dependency by it's interface
    // (because we shouldn't care what the implementation is...
    // that was up to the configuration via modules!)
    var window = container.Resolve<IWindow>();
    window.Show();
}

In Summary…

This example showed us how to group your main initialization logic out into groups that would play nice as Autofac modules. In a really simple example, having modules might look like bloated extra code, but it already illustrated that your entry point is very simple and follows a pattern to extend (just register another module for more dependencies… and I’ll add more on this later). There’s also an obvious way to group more new logic into your application for dependencies! So discussed logging and GUI initialization, but you could extend this to:

  • User Settings
  • Analytics/Telemetry
  • Error Reporting
  • Database Configuration
  • Etc… Just add more modules!

Sometimes the pain of having a really hectic entry point isn’t realized until you’ve had to work on teams where people are modifying the same beast of an entry point all the time:

  • Simple merge conflicts in your “using” statements… Because there’s hundreds of lines of using statements at the top of the file
  • Visual studio actually CANNOT use intellisense properly when the file gets too unwieldly
  • The debugger cannot resolve variables properly when the main entry point gets too big
  • Merging and auto-conflict resolution sometimes results in code just getting blown away in the entry point… And good luck finding what went wrong in your thousands of lines of initilization

So what’s next? Well, if you keep building out your app you might notice you have tons of modules now. Your single GUI module might have to get broken out into modules for certain parts of the GUI, for example, just to keep them more manageable. Maybe you want plugins to extend the application dynamically, which is really powerful! Our method for registering modules just isn’t really extensible at that point, but it’s very explicit. I’ll be sharing some information about automatic Autofac module discovery and registration next!


ProjectXyz: Why I Started A Team For My Hobby Project

ProjectXyz - Why I Started a Team

Who Needs A Team?!

I’ve been building RPG backends for as long as I’ve been able to code. I think my first one that I made for my grade 11 class is the only RPG that I “finished”… It was text-based and all you could do was fight AI via clicking attack, buy better weapons, level up, and repeat. It was also 10000 lines of VB6 code and so brutal that I couldn’t add anything to it without copying hundreds of lines of code.

Since then, I’ve had the itch. I keep rewriting this thing. I keep taking “Text RPG” (super cool and catchy, I know) and rewriting it. I had my first visual representation of this game called Macerus (here’s another rewrite for unity), which is actually how I landed my first co-op job. But every time I’d get so far, I’d decide I needed to rewrite it because I had messed up the architecture in some way and refactoring would be too much work.

My latest attempt is called ProjecyXyz, because I can’t come up with names. And funny enough, I just Googled it while writing this article and there’s actually a company with the same name… So maybe I’ll have to get more creative. ProjectXyz is supposed to be a very generic RPG game framework that allows new systems, mechanics, and game content to be dropped in, in addition to being independent of a front end for rendering.

It’s also something I’ve been making on my own. Because I’ve been making RPG backends on my own for years now. So who needs to have a team, right?

Too Much Pride For A Team

I think initially I wanted to do this all on my own because of pride. I also don’t think it was something I was conscious about except for the fact I looked at this project as my baby and something I could control the development of. I wasn’t consciously telling myself “I have to do this on my own so that I’m better than other people” or anything silly like that.

But why would I go ask others for help? They don’t code like me. They don’t have the same investment into this idea as me. They aren’t as passionate. They might have their own ideas for how to do things too! How could I have someone like that working on MY project?

Those are all pretty naive reasons for considering to work alone though. Sure, this is my pet project and I’m going to likely feel more attached to it than anyone else. That’s probably expected. It doesn’t mean that I can’t find people that are super interested in working on something like this. They could be totally passionate about learning different aspects of creating an RPG backend.

As for having their own ideas… That’s probably one of the BIGGEST reasons in FAVOUR of having a team! It’s easy to get scared about having other people put their ideas into something you feel like is “yours”. It might have taken a few years of working in the industry (currently just passed 6 years of working at Magnet Forensics), but it’s actually very common for other people to be contributing ideas into code bases you’re working on. It happens every day. Sometimes you have design meetings or code reviews or general architectural discussions and your idea ISN’T the one that’s picked. That’s cool! As long as everyone is striving for extensible and testable code, we can make changes if we need to going forward. You don’t need to make every decision and sometimes it’s much better that way. Other people are smart too 😉

Passion is Key for a Team

While the “team” I started isn’t an official team, it’s the first time I’ve been very open to having people directly contribute to my pet project. I think one of the most obvious reasons I became comfortable with this is because I found someone that was very passionate about exploring this space.

My colleague and I were talking about some of the concepts in ProjectXyz and where I wanted to go with it. Immediately he expressed interest in map generation and how that’s always been something he wanted to explore. How can maps be procedurally generated? Can we take this concept and generate maps on the fly? What are memory and runtime constraints? How do we represent this information in code? What about persistent storage?

I could immediately tell he was very curious about how a system like this might work. After several conversations with him about how he was starting to hack up some ideas and doing research on different algorithms, I knew he was passionate about it. We discussed working on some of these things together and contributing to the project code that I have, and we’ve been going back and forth for a few weeks now sharing ideas and his progress that he’s making for map generation. I’ve been hands off only really acting as a sounding board for him.

I think having someone passionate like this is critical for a small team. There’s going to be many barriers when working on a challenging project, and it’s easy to get bogged down and lose motivation when you’re stuck. Having additional people that are passionate about seeing progress in your project means you have some support for pushing through those hard times when you might lose motivation. If my colleague comes to me and says “I’ve been stuck on this issue and maps wont generate how I want…”, then I’m more than happy to sit down with him and talk through his algorithm and maybe where there’s an issue. I’m invested in seeing his piece come to fruition. Similarly, if I’m working on something like dynamic item generation for the game and I get stuck, I know he’s there to do the exact same thing. We both want to see this thing working how we intend.

So passion is important for a team. But is it sufficient? Is it the only requirement for adding a team member?

A Team is Built on Trust

Trust! Trust is a huge part of establishing a team because you need to be able to rely on each other. As mentioned, my colleague is passionate about working on this and has an interest in map generation. But what if I had never seen any of his code before? What if I didn’t know if he’s had practice with writing extensible code, testable code, following good design practices, etc… What if?

To be honest, I probably would be pretty nervous about him contributing code. It might be a huge barrier for me. I’d want to review his code and make sure it wasn’t “polluting” my pet project. I’ve re-written this code enough times that I really don’t want to have to think about rewriting it again! If I was nervous about someone contributing code I was going to need to re-write from scratch just to have an extensible design, it might not even be worth it having them contribute in the first place. It might actually create MORE work in the long run. It sounds selfish, but if the goal of adding someone to the team is to provide a net positive effect, then having to re-write code that isn’t up to par might be a deal breaker.

But that’s not the case here. I have multiple years of experience working with this colleague closely on various projects. We align to coding practices but still have our own twist on things. We value the same things in “good” code (extensible and testable). We use many of the same design patterns in similar situations. I’ve seen enough of his code to know that most of the time my comments about it are “oh, have you considered” and not “… you need to rewrite this”.

I can trust that what he wants to contribute will be aligned to my vision. I also can trust that new ideas he introduces are probably awesome new perspective that I hadn’t thought of. I also trust that if we disagree on something, we’re open to discussing it and coming to a resolution. So trust in this case certainly removes the barrier to entry to adding additional people to my hobby project.

Should You Form a Team?

While this was a pretty general article, I just wanted to get you thinking about opening up your hobby project(s) to other people to contribute. This is something I wish I would have considered more seriously early on. Maybe I wouldn’t be re-writing my project for the millionth time!

Some general points:

  • You’re not a “worse” programmer for getting other people contributing. Good programmers need to be able to work with others!
  • Other people can have good ideas too! Sometimes, they’re even better than your own ideas 😉
  • Other people may have more knowledge or interest in areas that need to get work done that you just don’t want to do! Perfect!
  • You’ll want to try and find people passionate about working in the area your project focuses
  • You’ll want to find people that you feel like you can trust so that you’re comfortable with them working on “your baby”
  • Getting help doesn’t mean your code must be “open source”. You can still share private repositories together (i.e. consider BitBucket!)

So what do you think? Is your hobby project kind of stale because you’ve hit enough roadblocks and it’s time to get some more firepower to tackle it?

Share your thoughts below about your experiences with forming teams for your hobby projects!


  • Copyright © 1996-2010 Dev Leader. All rights reserved.
    Jarrah theme by Templates Next | Powered by WordPress