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!


RPG Game Dev Weekly #2

Well, so far not so great for getting weekly posts on this! It’s probably better for me to aim to do these periodically and summarize the last week or so of work. Fewer commitments that way and it’s a bit more realistic for me to achieve. With that said, let’s dive into it!

Entity Filtering in an RPG

Our RPG has had some notion of entity filtering for a long time, but to understand the current state of filtering, it’s important to understand the two major sets of entities and components we have:

  • Game Objects + Behaviors: Everything in our RPG game world is represented as a “game object” and the properties/capabilities are captured by components called “behaviors”
  • Definitions + Generator Components: The content for our game is represented by “definitions” and the “generator components” are how we transform this information into “game objects” and “behaviors”

Because I heavily focused on our loot generation system early on, the focus for filtering was really around being able to select loot from “drop tables” (which have item definitions on them and associated with enchantment definitions). Early on it was a goal to ensure that loot generation and other game systems could have extremely complex situations handled, so we needed to be able to do things like generate loot given arbitrary game state. Additionally, this system needed to be fully extensible to support any game state we wanted to add in the future.

In what might seem to be an extremely contrived example, assume we want to generate item X when:

  • The player is level 50+
  • The current weather on the map is raining
  • The current time of day in the game world is night
  • The player has completed quest A, B, and C
  • The player is holding item Y
  • We are generating loot for killing enemy N

These conditions represent a filter that we need to execute, but I never realized until recently that the implementation of this is actually something I’ve started calling “bidirectional filtering”. This means that we’re running a query with a filter over a set of drop tables, but we provide along some state and the drop tables are filtering backwards on this state. Sound complicated? It was, especially before explicitly thinking of it as bidirectional filtering!

It can be more easily digested when thinking of it this way:

Provided Game State:

  • Current weather
  • Current time of day
  • Player (level and equipment in this example)
  • Quest status

Required Filter from Game:

  • Drop table ID matching enemy N

Using the above information, we select all drop tables matching the required filter from the game. Essentially, any drop table ID for enemy N. For each of the drop tables that match this specific ID, we then run THEIR filters the opposite direction on the game state! If a drop table had no specific filters on it, it would match right away. However, if it had a weather filter on it, it would need to match the provided game state weather.

Okay so that’s bidirectional filtering in our RPG, but this is what ALREADY existed! So what did we need? We actually just needed single direction filtering. Literally just standard querying of game objects. Half the battle of what was already in place!

If you’ve played games like Path of Exile or even Last Epoch, you’ll see indicators in the game that there are tags associated with different things (like skills, items, enchantments). If in our game we want to be able to query all items in a player’s inventory that are of type “axe” or all skills associated with “fire”, we need some way to filter our entities. And in this case, there’s no need for the entities to filter backwards like in bidirectional filtering!

We expanded our filtering system to support this now, which unlocks:

  • Skills that require certain item types
  • Skill prerequisites that aren’t just a skill ID
  • Advanced skill targeting
  • Enchantments that boost skill stats (damage, levels, etc…) that match a particular filter
  • Crafting / Alchemy (i.e. filtering on ingredients)
  • Item socket patterns (this was already in game, but we can do this declaratively instead of writing custom-coded plugins)
  • Restricting applying poisons or consumables to certain item types
  • … this list goes on and on!

RPG Movement Overhaul

This block of work is what chewed up most of my RPG development time the past few days. I was frustrated with my initial and seemingly failed implementation of A* for path finding. For anyone that’s gone through popular computer science algorithms, A* is a pretty straight forward algorithm for finding shortest possible paths. It’s really popular in games because it’s extremely efficient! But my take on it just wasn’t cutting it for our RPG, and it would often report that no paths were possible (which just wasn’t true)!

Our RPG has an explore mode and a combat mode, sort of like Pokemon. However, the combat is tactical, so it’s sort of like Final Fantasy Tactics with respect to that. Being a 2D tile-based game, having tile-restricted movement makes a lot of sense. However, early on I felt that having free-form movement in the explore mode felt really fluid and fun. There was no great reason our explore mode needed to be tile restricted. However, making this movement system decision complicated all of our tile-based movement by trying to re-use the same code.

So I did a thing that I find feels counter-intuitive as a programmer normally… I duplicated a bunch of code, one for supporting tile-based movement and the other for freeform. No more “common code” for this. From here, I found I could actually start correcting each movement system and tailoring it to do the right thing. I was hitting this blockage before because these really were two fully separate implementations of class that can support movement.

From there, I worked through my path-finding issues. I built out some visuals that can determine where the player can move, and used this to validate what I believed I was seeing in my unit tests. 2D stuff is easier to understand visually! The following is an example that shows a snag that I hit where our logic to check “can we move to this position” was incorrectly calculating the distance to that point. If the player has only 3 moves to make, why does it think it can get to the tile labeled 4?

The answer? It was doing birds-eye distance checks back to where the player was standing. Not going to work for our RPG! Instead, I was able to re-use part of the A* algorithm to calculate the distance as the algorithm progresses through neighboring nodes. I also needed to update A* to report the total distance in addition to the positions on the path. The result was consistent calculations between our valid walk points and the actual pathfinding algorithm. The next snapshot shows a small update to the visuals:

And at this point, it was really just about showing/hiding/updating the valid walk highlighting at the right times! So I figured I’d whip up a little video to show progress on that:

What’s Next In Our RPG?

We’ve been making some awesome progress on our RPG. We’re starting to look into random dungeon generation, and I’ll probably try to find something more architectural to tackle. I find I burn out fast when I spend too long on things that feel strictly visual or like I’m polishing things. In this case, the movement part of combat is critical so it needed to get done. But reflecting on all of the changes there was nothing fundamentally changed in our game to accomplish this.

Additionally, I’m going to start doing a better job of adding more content. I’ll be adding in item affixes for item generation, prefixes/suffixes item name creation, and ideas for items that can drop. I don’t think we fully have the components required to define all the items I’d like to make, so I’ll start just by recording my thoughts in a consistent format.

Overall, we’re moving in the right direction! But there’s no denying making an RPG is a ton of work!


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!


TileMap – How To Get ALL The Tiles

If you’re building a 2D game in Unity3D, odds are you’ve come across the TileMap component. The TileMap is a powerful tool that allows you to create a grid of tiles that you can render your tiles with instead of hand-placing individual game objects with sprites. It has a host of built in functionality that you might otherwise find yourself manually writing, like mapping coordinates to particular cells on a map. And what’s even cooler about using a TileMap? You don’t need to handroll your own editor to paint tiles! I think I’d pass on having to do that. But have you found yourself in a situation where you want to get all of the painted tiles on a TileMap? You may have found it’s not quite as obvious as you’d have hoped!

What We Have To Work With On A TileMap

As I mentioned, a TileMap can do a lot for you. In particular, I found myself wanting to get all of the cells that have a Sprite associated with them and what that Sprite actually is. We can use the built in method GetSprite for this:

var cellPosition = new Vector3Int(x, y, 0);
var sprite = tilemap.GetSprite(cellPosition);

Simple enough. But how do we know which coordinates to use for x and y? Is it good enough to just go from 0 to a really high number on the x and y axes with two loops and hope it’s good enough? We can do better than that! The TileMap class has a handy property on it called cellBounds. This gives us an integer rectangle that defines the bounds of all of the TileMap cells that have been modified:

tilemap.cellBounds

If you have found you’re doing a lot of editing on a TileMap, you may be erasing sections to focus on another area. If that’s common, you may benefit from calling CompressBounds() to shrink this back down to the currently assigned cells:

tilemap.CompressBounds()

And with all of these, we can approach how we might tie them all together to get what we need!

Be Careful With TileMap.cellBounds And Starting From Zero!

If you have a keen eye, you’ve probably realized that we want to use two loops to go through the cell bounds on the x and y axes to get the cells we’re interested in on the TileMap. You’re spot on! But there’s something we should be careful about here!

It’s an easy mistake to make because it’s how we commonly write loops:

for (int x = 0; x < bounds.max.x; x++)
{
    for (int y = 0; y < bounds.max.y; y++)
    {
        // do stuff
    }
}

But what’s wrong with this? The starting value! You need to be careful when working in 2D space like in Unity. There’s nothing that actually guarantees your Tiles have been drawn starting from position zero on the TileMap and only going in a positive direction. In fact, in my game I had no tiles on the positive y axis! So a simple change to make sure you don’t mess up is use the MINIMUM as your starting point:

for (int x = bounds.min.x; x < bounds.max.x; x++)
{
    for (int y = bounds.min.y; y < bounds.max.y; y++)
    {
        // do stuff
    }
}

Simple as that!

Wrapping It All Up

You’re probably looking for a full-blown code snippet by now. Fair enough. Here’s what I whipped up:

public static class TileMapExtensionMethods
{
    public static IEnumerable GetAllTiles(this Tilemap tilemap)
    {
        // note: optionally call tilemap.CompressBounds() some time prior to this
        var bounds = tilemap.cellBounds;

        // loop over the bounds (from min to max) on both axes
        for (int x = bounds.min.x; x < bounds.max.x; x++)
        {
            for (int y = bounds.min.y; y < bounds.max.y; y++)
            {
                var cellPosition = new Vector3Int(x, y, 0);

                // get the sprite and tile object at the specified location
                var sprite = tilemap.GetSprite(cellPosition);
                var tile = tilemap.GetTile(cellPosition);

                // this is a sanity check that i've included to ensure we're only
                // looking at populated tiles. you can change this up!
                if (tile == null && sprite == null)
                {
                    continue;
                }

                // create a data-transfer-object to yield back
                var tileData = new TileData(x, y, sprite, tile);
                yield return tileData;             
            }
        }
    }
}

public sealed class TileData
{
    public TileData(
        int x,
        int y,
        Sprite sprite,
        TileBase tile)
    {
        X = x;
        Y = y;
        Sprite = sprite;
        Tile = tile;
    }
    
    public int X { get; }

    public int Y { get; }

    public Sprite Sprite { get; }

    public TileBase Tile { get; }
}

The above example provides a nice extension method to get you back a TileData instance for all the populated cells on your TileMap!


TL;DR: Unit vs Functional Tests

Here’s a super quick peek into unit tests compared to functional tests. And full disclaimer here is that depending on your circle of influence, these might be given slightly different names. Try not to dwell on that but instead the comparison and contrast presented!

Unit Tests

Coded tests that take a white-box visibility approach to exercising and asserting that written code, generally a specific function/method, works as it was designed.

Pros:

  • Generally very programmer-focused
  • Very granular coverage (breaks can identify exact lines where an issue occurs)
  • (Should) run extremely quickly
  • Have very little test setup in ideal cases
  • Provide full control (generally via ‘mocking’ dependencies) to exercise very specific logical paths

Cons:

  • Generally more challenging to convey coverage to other stakeholders
  • By nature these are brittle and break with refactoring
  • Require sets of design patterns to help ensure tests are easy to write/maintain
  • Sometimes present false sense of confidence in large codebases (i.e. systems working together) due to mocking requiring assumptions

Functional Tests

Coded tests that take a black-box visibility approach to exercising and asserting that software performs particular functionality as expected.

Pros:

  • Generally easier for non-programmer stakeholders to understand
  • Generally covers multiple classes/systems/methods working together to demonstrate behavior
  • More resilient to refactoring since this approach ignores the internals of what’s being covered
  • Exercises REAL parts of the codebase with no mocking

Cons:

  • More coarse than unit tests. Breakages might need more investigation.
  • Can potentially have more test setup given that multiple things will be interacting

Summary

So which one of these should you and your team be writing? The answer is probably both! There are benefits and drawbacks to both of these testing strategies and they overlap really nicely together. If you know you’re going to be refactoring a complex piece of your system, functional tests would be great to put in place so you can check expected behavior after. Unit tests might be great for mocking out complex dependencies or validating a variety of inputs quickly into a function. If you have an understanding of how you can leverage these, you have more tools in your programming toolbox!

Don’t like reading? Listen to me instead!


What Does an Engineering Manager Do?

This is a question that I see get asked all of the time and I figured I’d chime in on my perspective on it. Specifically, this is with the perspective of a software engineering manager in a tech organization. So, what are the primary responsibilities of an engineering manager at a tech company? Well before I dive in, I’ll explain my background and then I’ll offer up my perspective about the key parts to an engineering manager role.

My Background as an Engineering Manager

First off, here’s full disclosure that I have only been an engineering manager at two different companies. However with that said, I have been an engineering manager at two extremely different types of organizations for just under a decade now. My role at Magnet Forensics as an engineering manager started off as a team-leadership role when we were still a scrappy startup. As we hired on more folks, I helped lead small teams (sometimes 10+ but generally settled around 4-8) as a mix of software engineers and software testers. I was fortunate enough to grow along with our product offering, but only until shortly before I left was I still writing code regularly and managing small teams.

At Microsoft, I’m responsible for a team of under ten direct reports and I have several remote “dotted-line” reports (i.e. they have their own manager, but they’re working with my direct reports as a cohesive team). The work we do is nothing like my previous role, but what’s common is that we have some business requirements, some constraints, and really smart engineers working towards working through these challenges. A fundamental difference is that at Microsoft my team is entirely composed of engineers and no other dedicated roles (i.e. software testers). We carry out work differently but my focuses in my role are very similar.

A lot of my philosophies around management and leadership boil down to focusing on servant leadership. That’s not to say this is the only way an engineering manager can be successful, but as I discuss the focus areas this will likely shine through.

Engineering Manager Roles Are Different Everywhere

I think this is the first critical thing to call out, so if you’re going to take anything from this it’s the following:

An engineering manager at one organization may have very different expectations placed upon them compared to another organization, so if you're pursuing a career at a company as an engineering manager, research and understand how that company structures this role.

This might not be obvious to some people, but it’s true and it’s worth the time to understand. Some organizations place the emphasis of an engineering manager entirely around people interactions and career progression. Some have a large focus on managing projects while others have expectations that an engineering manager is directly contributing to the code base. If you’re interested in this type of role, hopefully you know where your interests and strengths are (and if not, I urge you to reflect and think about this!) so that when you’re evaluating organizations you can find a good fit.

Engineering Managers Put People First

Well in my opinion at least, the good ones do. The people that engineering managers lead are the most important part of their role. Ensuring that their team is engaged, working on challenging problems, learning, has access to the tools and resources they need, feeling supported in their career, etc… All of these aspects are the primary part of the role. They’re all intertwined and influence each other so finding the right set of challenges can ensure people are learning, but different challenges might be more engaging. And while something might be more engaging, it might not be well-suited for someone progressing at their particular career stage.

While all of these things are focus areas for all of the individuals on the team, an engineering manager also needs to keep in mind that… they’re individuals! In order to be effective they need to ensure that they’re leveraging situational leadership and truly working with people one on one. It’s something that’s easily overlooked by many even though it might feel glaringly obvious when you read it. Different people are at different points in their career. Different people appreciate different types of recognition. Different people are motivated by different challenges or learning opportunities. There’s different perspectives. Different career history. Different culture. Everyone is different. An engineering manager truly needs to understand this to be an effective leader because a cookie-cutter approach to trying to lead a diverse team won’t go very far.

It’s important to note that even in roles where the engineering manager has a technical individual contribution portion of their regular work, the overall effectiveness of the team will outweigh individual contributions. It can certainly be a trap especially if the engineering manager is highly technical and productive in the technical domain, but trying to remain a multiplier for the overall effectiveness of the team should be paramount. Between ramping up more junior people to be more effective, giving principal level engineers opportunities to focus on design and strategy, or finding new advanced challenges for senior engineers, finding the right way to bring out effectiveness in the team through situational leadership is the goal here.

Engineering Managers Understand Business Needs

There’s an element to the engineering manager role that is focused on a blend between project and product management. For clarity, I define (in a short version) project management as the process of managing time and resource allocation pertaining to work efforts and product management as interpreting customer requirements as work efforts. These two things together allow an engineering manager to understand shifting timelines and understanding changes in business priorities. It can be very difficult to lead a team if the engineering manager lacks the ability to coordinate the team members effectively or adjust to roadmap changes (as inevitably happens).

And when organizations have dedicated roles for either/both project and/or product managers, it’s still beneficial for the engineering manager to have a deep understanding of both of these. If not solely responsible, they will generally still be actively coordinating with these roles. Effectively, the engineering manager helps represent the team to these roles by relaying team status and needs while also bringing feedback back to the team to adjust as necessary. Depending on the size and complexity of the organization, an engineering manager may spend a large portion of their time actively collaborating with individuals in product and project management positions across a variety of intersecting teams.

Engineering Managers Are Technical

Some might say this isn’t a must, and while I agree it may not be a must, I think it’s really valuable! So I like looking at this as a spectrum to make it a bit more understandable. On one end of the spectrum there are individuals that can jump right in and be an active individual contributor with an extremely high degree of effectiveness. In software, this could look like someone that can work in the codebase to add features or fix bugs or otherwise has a high-degree of understanding of all of the systems working together. On the other end of the spectrum, there are individuals that understand the domain just enough to check the box for understanding the business needs. In my experience, there generally seems to be an inverse relationship between how technical an engineering manager is and how well they focus on the people on the team. It’s not a rule though. I think the really good ones keep up the technical focus without skipping a beat on all the people-related responsibilities.

And it’s a tricky balance. The more time spent working with people and coordinating with other stakeholders, the less time there is for individual contribution. In many engineering manager roles, there isn’t even an expectation of individual contribution so it’s especially hard to keep up on the technical details. The engineering managers that I’ve seen balance this well may not be so far on the technical side of the spectrum that they can dive into the codebase, but they have an overall architectural view. They can also understand and relay technical aspects from team members to other stakeholders, and similarly apply stakeholder feedback with more technical context when communicating back with the team.

Aside from some of the obvious benefits technical skills bring to communication and coordination, I think an aspect that is overlooked comes down to trust and respect of team members. In my personal experience, I have seen engineering managers get buy in from team members when they can prove they understand the technical challenges the team has to work through. Suddenly the engineering manager becomes much more relatable and in those delicate situations where an authoritative decision must be made, it’s easier to get behind it when you trust the person understands the technical details.

While not every engineering manager role may define expectations around technical aspects, I do think that it’s extremely beneficial.

In Summary

To recap, everything discussed is my perspective from my career as an engineering manager and software developer. It’s not the only way, but I think it touches on three of the most important aspects:

  • Focus on enabling people on the team to do their best work
  • Understand project and product requirements to translate between the team and stakeholders
  • Have a thorough technical understanding of the domain to tie this all together

RPG Game Dev Weekly #1

As I’ve been trying to get more YouTube content put together more steadily, one of the themes I’m interested in is doing some behind-the-scenes of the role playing game (RPG) I’m making with some friends in Unity3D. I’ve found that being able to work on an RPG outside of my regular day job is a really awesome way for me to keep up on my technical skills. I love coding, and the further along I move in my career as an engineering manager, the less time I actually spend writing code myself. I pride myself in being a technical engineering manager, so for me working on this RPG is a great outlet for creativity and practice. I mentioned this in my LinkedIn post here:

Persisting Game Objects Across Maps

In this video, I focus on one of the challenges the game was facing due to how objects are materialized onto the playable map. The map that we load from disk to be shown and interacted with in the playable RPG commonly has “templates” and “spawners”. Both of these are responsible for creating objects at runtime given some criteria. As a result, uniquely placed game objects appear on the playable map for the player to interact with.

Sounds good then, right? Well the two challenges I focused on addressing were:

  1. If we leave the map and go to another one, there’s no way to persist the player across maps! That means you get a brand new character every time you transition maps. In an RPG, this is definitely not going to work out.
  2. If we return to an existing map, we expect it to be in the same state as when we were last on it. This means that the objects generated from templates or spawners must remain and NOT be respawned (which would effectively make completely new game objects).

Check out the video below:

RPG Dev Log 1 – Persist Game Objects Across Maps

Persisting Map Game Objects in a Cache

Next up was actually implementing some of the changes being discussed previously. In order to make this work in our RPG, my goal was to:

  1. Allow maps to save a lookup of the unique IDs for game objects that were generated
  2. Save the list of game objects generated into a “cache”
  3. Upon revisiting a map, tap into the “cache” to reload the existing game objects

One of my mental hurdles with this was acknowledging that we don’t yet have a solid serialization foundation for our game. I was thinking I’d want to serialize the game data to something persistent to make this work, but I was also worried writing things to disk would be overkill (and how does this mix with save game concepts?). Instead, I opted for the lightweight approach was “get something working” and I can revisit this later to extend it to persist things to disk if necessary.

Check out the video below:

RPG Dev Log 2 – Persisting Map Game Objects in a Cache

Which Domain Does This Belong To?

We’ve been trying to practice Domain Driven Design (DDD) concepts in our game. One pattern I’ve taken to an extreme is over-separating domains into very granular pieces and the result is that we have HUNDREDS of C# projects. It’s overkill, for sure. However, I feel that it’s offered some flexibility in having boundaries we can collapse later. My experience so far has told me it’s easier to collapse boundaries than it is to split.

This is all and well until we have situations where I need a class that has knowledge of two domains. That’s what this next video was about. I talk through acknowledging that I don’t know what to do and that I’ll move ahead with something best effort. I think the answer to my dilemma is that I need to translate things into a new domain for usage, but it feels like overkill. If you have thoughts on this leave a comment on this post or on the video!

Check out the video below:

RPG Dev Log 3 – Which Domain Does This Belong To?

Death Animations For All!

Finally, this last update was about something hopefully less boring… Death animations! I worked through how:

  1. I can extend our reusable sprite animation factory to create a death animation to be reused by ALL our actor sprites
  2. I can build a system that checks actor life and changes the animation as necessary to death

Unfortunately I had some hiccups the first time through recording this, but I wanted to code the whole thing live. After a Blue Screen of Death interrupted my first attempt, my second attempt I think worked pretty well! Without much code at all we could get this system fired up and it worked the first time! Well, close. I didn’t realize that our animation system already supports an animation that has an “infinite” duration final frame (in this case, the body laying on the tile). This is handled by a null value instead of a set length in seconds. I fixed it right after recording! Overall, I was incredibly happy with the result.

Check out the video below:

RPG Dev Log 4 – Death Animations For All!

NoesisGUI – The Unity UI Framework That You Probably Aren’t Using!

If you’re like me, trying to create user interfaces in general is a challenge. So when it comes to working in tools that you’re less familiar with, that challenge basically grows to a level where it’s a roadblock. For me, trying to create user interfaces in Unity3D is basically the perfect example of hitting this roadblock! That’s not to say the UI tools that are available in Unity3D are bad, but my skill level is essentially reset to zero when working with these tools. Fortunately I came across this little gem called NoesisGUI that enables WPF inside of Unity3D!

I plan to do a few updates on this either via YouTube or short blog posts, but NoesisGUI has essentially unlocked my ability to create user interfaces inside of Unity3D. You can find my intro video here, or watch it directly below:

Now I’m still not a UI expert by any means, but at least I get my familiar environment back. NoesisGUI has two primary benefits for me as a software developer:

  • I have access to all the WPF controls, XAML syntax, and styling capabilities that I know and love.
  • I can use tools/IDEs I’m familiar with, not sacrificing years of experience using these tools.

On the first point, for me I find it very tedious to create UI elements in Unity3D. For some good examples, I consider trying to do two pretty common things: control layout and lists of items. On control layout, I find the anchoring system and transforms a total pain to work with in Unity3D. It’s a personal preference sort of thing, but I find it difficult to navigate and get things to work as I expect. However, I know thanks to NoesisGUI I can leverage things like grids and flowing panels so I can use what I know and not try to design a layout system from scratch. Same thing goes with lists! I can use a ListView control thanks to NoesisGUI and then style/template all the controls inside of it leveraging XAML. Effectively, being able to leverage NoesisGUI to enable my experience with WPF means I can struggle with UI design instead of struggling with UI design AND how to make the UI framework work! It doesn’t fix my poor UX abilities, but NoesisGUI does allow me to do my best work at least.

The second point is around tooling. The Unity3D editor is powerful and if you watch any amount of tutorials from YouTube you’ll know that there’s no shortage of people showing how to drag and drop objects into the scene to get the result you’re after. But this doesn’t work well for my design approach because I don’t want my game to be coupled to the Unity3D engine (which I’ll need to write more about later). In fact, the more things I place concretely in the scene, the more it couples my game to Unity3D and it’s just not something I want to commit to. As a result, to decouple my UI code I found myself trying to programmatically make Unity3D UI elements and started to dream up some templating language.

Nonsense. NoesisGUI puts me back in my comfort zone and allows me to use familiar tools like Blend where I get my visual editor for my WPF controls as well as the split view with the XAML editor. Aside from a couple of minor quirks, I was able to get Blend to show things exactly as Unity3D shows them. That means I can rapidly develop my game UI inside of Blend. Along with with a bunch of other design philosophies (i.e. decoupling from Unity3D engine), this means we could literally write a couple-of-line game entry point with a WPF UI overtop of it directly in Blend and have it map to expected behavior in Unity3D. Again, more on some of those design philosophies later, but NoesisGUI really took it to the next level by allowing us to decouple the UI completely from Unity3D restrictions.

I plan to create more writeups and videos on how we’re using NoesisGUI in our RPG project, so stay tuned!


Microsoft: Welcome to Your New Future!

Microsoft logo

2020 has been an interesting year for everyone, without a doubt. For me, 2020 involved a career change that wasn’t something I was expecting at the start of the year. I had been comfortable with my past employer, Magnet Forensics, for just shy of 8 years and had the opportunity to work on many high-impact projects as part of a mission to help with saving children and assisting law enforcement. But at the end of August, I started my first day in my next adventure with Microsoft.

I wanted to write a couple of posts about getting up and running at Microsoft so I figured I’d start with some high level points. This post will be focused on what it was like to join a tech giant after helping scale a startup to hundreds of people internationally.

Meeting the Team and Colleagues

My hiring manager at Microsoft had a list of people he thought would be great for me to reach out to. Forerunners would be the team I’ll be managing and then connections for different functions I would be interfacing with. As well, the list included complimentary teams we’d be working with. Coming from a place where I had the luxury of being around since the beginning of the engineering department, it was a new experience for me to be the outsider… However, this list of initial connections was a great way for me to get oriented.

And well if you didn’t know… Microsoft is big. Really big. So this was an extremely intimidating experience for me. But as soon as I logged into Microsoft Teams I got a message from one of the engineering managers that interviewed me. And I mean literally as soon as I logged in because I didn’t even know where the notification sound came from! And it was an incredibly welcoming message that stuck out to me because this reinforced with me that I wasn’t just a number in a hiring process to fill a seat. Shortly after, I received a message from an old university friend on Microsoft Teams that was congratulating me on my new role and welcoming me to Microsoft. I could feel the tension easing up as I was feeling like I had some great connections already.

So I started sending out the emails to introduce myself and of course it felt awkward saying “Hi I’m the new guy… I know you’re super busy but can you set aside some time so I can get to know a bit more about you and how we’ll interact?” But you know what? Every single person was enthusiastic to welcome me and get something put in our calendar to chat further. Every. Single. One. I haven’t felt so welcomed before. Just another big-tech-stereotype that I had demystified for myself and I couldn’t be happier about it as I started my first day.

Microsoft: Consistent Values

Having not worked for a “big tech company” before, I think that like many people that have lived startup and small business life I made a lot of assumptions about what things might be like. After all, Microsoft has been around since… forever! I’ve been using Windows and Microsoft products since I was physically able to use a computer (which if you took a wild guess was at a very early age). We all know big tech companies only have small pockets of really awesome people… and everything is super corporate with a million layers of bureaucracy… And everything feels like a battle against “the system” just so you can get your opinion heard and….

Okay, so none of that was even remotely close to true. And it was VERY obvious from day one that through *all* levels that there is a homogeneous mission and vision. When the CEO talks about diversity and inclusion and then you see it coming up in the training, and coming up from different levels of leadership, and then directly in your conversations with peers ALL within the first couple of days… You know Microsoft has done something right to nail culture.

This is simply one example that I’m using that I feel would probably hit home with many of us, and I share it because while I could speculate that big corporations might just say they want to focus on this kind of thing in a media or press release, I was shocked (in a positive way) just how much emphasis is put into something that the company believes is a priority. Especially at the scale of the organization. These company-wide goals to focus in certain areas penetrate all levels of the organization and in such a way that you don’t feel “forced” into it, but rather you feel empowered and motivated to be part of the solution and have an influence in it.

Wrapping Up

I think that everything I had hoped was true from my initial talks with the recruiter right through to interviewing with the team was proven to be true right from my starting day at Microsoft. My fears of big-tech-bureaucracy and stagnated perspectives of a behemoth company (and actually more on this to come!) were shut down right away. All of this was such reassuring news as I was getting set up.

While switching companies in tech might not feel like a big deal to some people, for me this has been a completely different life path, and as I mentioned at the start it wasn’t one that I could have easily envisioned for myself. In my previous role I was challenged. I had responsibilities and expertise. I was part of an incredibly important mission. I managed teams of people I loved working with and had colleagues I’d consider to be some of my best friends.

But I was also comfortable. And on that note, I’ll be discussing why I believe that Microsoft is the perfect opportunity for me to challenge myself and help take on a growth mindset.


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