Author: Tre

  • A year later.

    Reading Time: 4 minutes

    TreJon House @ Microsoft
    Onsite interview with Microsoft

    The image to your left was taken a year ago to the date, well according to Snapchat that is. A year ago, I was given the opportunity to interview for a position at Microsoft. Never once did I think I would be doing such a thing. About a week later I was got a phone call that changed everything. Then a few weeks later, my girlfriend, FrancSoph, and I found ourselves on I-90 bound for Seattle.

    Badlands National Park – SD

    What’s happened after a year?

    Looking back on the year, it seems like a blur, I keep telling myself I’ve only been here a few months, but in reality, it’ll be a year in a few weeks  ðŸ˜….

    Some of the first things we did when we got settled was exploring the beauty of the PNW. Coming from the Midwest, you don’t get a huge change in elevation very often, and the most “scenic” areas, are just fields of corn and soy. Out here the story is much different.

    Just 45 mins from my house, is the beauty Mowich Lake

    Life at Microsoft

    It’s a question I get asked a lot, even more so than when I worked for other organizations, “What’s it like working there?”.

    Over the year, my answer to this question hasn’t really evolved. This is in part due to the complexity of the question, and part being I’m still so fresh and Microsoft is so vast that it’s hard to know what I don’t know. After a year, here is what I can tell you (I think).

    No, I don’t have any inside information on Xbox or any of their titles, and if I did I’m definitely not allowed to spill any beans. It’s a very popular question among the kids I coach and some of my gamer friends. Xbox is kind of like Ft. Knox, if you’re not authorized to get in, good luck getting anything out.

    Yes, I like working here. I’m usually not one to stick around a situation I don’t like. When it comes to departments and teams, I have been extremely lucky in my career, as I have been part of fantastic teams with great coworkers, a lot of who I call friends after I punch out. My greater departmental team is full of a lot of smart individuals, many of which who are too good at Mario Kart. When it comes to my actual team, which I may be a bit biased about, are some of the best in the office. Every time I look at a PR (pull request), I’m like “Man that was pretty slick”. We’re constantly challenging each other, and other teams, to push better code, for a better product.

    The Digital Workplace team takes on Whirly Ball

    Life outside of Microsoft

    As I’m writing this, and as you’re reading it, we both may have came to the conclusion that some of this blog could have been separate posts, but knowing me that could be next year.

    For those who know me, or spent 5 minutes talking to me, knows I wrestled in college and high school and have a great affinity for the sport. My last year in Milwaukee, I spent good part helping out as an assistant wrestling coach at my Alma Mater. For anyone that spent some amount of time coaching, knows how much it fuels your soul. When we moved to our apartment, it was probably the second thing I did, right after unpacking, looked for a neighboring high school that wanted an extra hand.

    That’s when I found Edmonds-Woodway High School. Met with their head coach, and the rest is history. I thought the college season was emotional, but the 4+ months I spent we these young men were intense. Filled highs and lows, these guys went to war and fell just shy of a state title. I wish I could go into more detail, but that would be a mini-series in and of itself.

    EWHS finishes as WIAA 3A State Runner-Ups

    Big Thanks

    While I could go on here and literally list everyone that made the past few years what it is today, not only would it be an endless list, I would inevitably forget someone. On that note, thank you to everyone that made a splash in my life, I wouldn’t be here today without you. And for those I have never encountered on personal level, thank you for making the world go round.

  • Stable Android UI Testing

    Reading Time: 4 minutes

    Android With Javalin

    For the better part of the last year or so I have been working on a native mobile app for my LLC, Bytonomy, and so far it’s only included one complete rewrite (migrating from Xamarin.Forms to native iOS/Android). With a rewrite, one tends to learn a lot from their mistakes and look to migrate to an improved solution. For us, it was a mix of moving away from the limitations of Xamarin.Forms but also learn something new.

    In the latest phase of development, we’re going through and applying some polish and stability. This meant adding new unit tests, finalizing user experiences, and testing these experiences. And as we all know testing is essential in uncovering potholes in business logic, and ensuring you have a stable product.

    One of the greatest assets in any unit test framework and/or library is the ability to mock dependencies. Mocking allows the tester to dictate what a consumer is to receive, allowing for very robust and strong testing. But what happens when you have a dependency you can’t mock, i.e. your app’s network requests?

    Integration and user interface (UI) tests, however, shouldn’t use mocks, but instead concrete implementations of dependencies. But what happens if the component needs to make a network request? What if the test device is having connectivity issues? What if the development or test is down? What if the API functionality just hasn’t been written yet?

    I first encountered this issue when I was developing the UI tests for our iOS mobile app. Even though I have direct access to our backend services and API and can guarantee that they’re running (at least for testing :P), waiting for network requests to resolve can make my tests run slower, and can create instability. Luckily, I stumbled across this great article on Medium, which handed me a great solution. With Embassy and Ambassador, I was able to stand up a local server on the test device, which runs in parallel with my tests. The benefit of all this being that I can guarantee the API will be responsive, I can directly dictate what the API returns to test edge cases, and my tests aren’t failing due to bad network requests.

    What you actually came to read

    When it came to testing our Android counterpart, the same questions came to mind, how can we write clean, stable, and robust UI tests. And I thought why not do what we did in iOS and stand up a server in our tests?

    This tutorial is possible due to folks behind Javalin, an excellent library for running an HTTP server with Java and Kotlin.

    Setup

    Let’s add Javalin to our project’s build.gradle dependencies.

    dependencies {...    implementation 'io.javalin:javalin:3.8.0'    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'    androidTestImplementation 'androidx.test:runner:1.2.0'    androidTestImplementation 'androidx.test:rules:1.2.0'...}

    When it comes to testing, I put all my testing utilities in a separate shared module, this is something I recommend so you don’t have repeated non-production code scattered throughout your application

    Server Implementation

    package com.bytonomy.tech.nyteout.testutilsimport io.javalin.Javalinabstract class MockServer {    protected var server: Javalin = Javalin.create()    open fun start(){        server.start(8080)    }    fun stop() = server.stop()}

    Our app connects to several different REST endpoints as you’ll see shortly below, so I wanted to create a base class each controller can extend from. With this thing shim over Javalin, we can easily increase complexity as needed by our controllers or here in the base if that complexity id shared.

    package com.bytonomy.tech.nyteout.testutilsimport kotlin.Anyimport com.google.gson.Gsonclass AuthenticationController : MockServer() {    companion object AuthenticationRouteResults{        var loginResult: Any = 200    }    override fun start() {        super.start()        initializeRoutes()    }    private fun initializeRoutes(){        server.post("api/authentication/login") { ctx ->            if(loginResult is Int){                ctx.status(loginResult as Int)            }else{                ctx.status(200)                ctx.result(Gson().toJson(loginResult)).contentType("application/json")            }        }    }}

    I decided to leave out the other endpoints from this implementation, as we are only going to test the login functionality. In the class you can that we boot up the server and define our login route. While not as elegantly done in the above described Embassy article, we make loginResult globally accessible so we can change the value in our tests.

    Time to test!

    For brevity sake, I tried to cut out all the nonsense and show you only the good stuff.

    ...    @get:Rule    var loginActivityRule: IntentsTestRule<LoginActivity> = IntentsTestRule(LoginActivity::class.java)    private val authenticationController: AuthenticationController = AuthenticationController()    @Before    fun startUp() {        authenticationController.start()        AuthenticationController.loginResult = 401    }    @After    fun tearDown() {        authenticationController.stop()    }...

    To start things off, we set up the activity that’s under test and instantiate our controller we want to mock. Using the @Before annotation we start our server before every test and set the loginResult to send us back 401. Likewise, we want to tear down or stop our server after each test

    ...    @Test    fun whenLoginInfoIsInvalid_ErrorSnackbar_IsDisplayed() {        onView(withId(R.id.usernameEntry))                .perform(typeText(Any.string()))        onView(withId(R.id.passwordEntry))                .perform(typeText(Any.string()))                .perform(closeSoftKeyboard())        onView(withId(R.id.signInButton))                .perform(click())        onView(withId(com.google.android.material.R.id.snackbar_text))                .check(matches(withText(R.string.failed_to_login)))    }    @Test    fun whenLoginInfoIsValid_NavigateToMainActivity() {        val apiResults = HashMap<String, String>()        apiResults["token"] = TestConstants.validAuthToken        AuthenticationController.loginResult = apiResults        onView(withId(R.id.usernameEntry))                .perform(typeText(Any.string()))        onView(withId(R.id.passwordEntry))                .perform(typeText(Any.string()))                .perform(closeSoftKeyboard())        onView(withId(R.id.signInButton))                .perform(click())        intended(allOf(                hasComponent(hasShortClassName(".${MainActivity::class.java.simpleName}")),                toPackage(MainActivity::class.java.`package`!!.name)))    }        ...

    Because of the setup we did in the previous step, it makes our first test pretty clean and straight forward. All we have to do is enter our credentials and validate our app responds correctly to the 401.

    While I would have loved to use Spek or Kotest, to design better BDD styled spec tests, limitations with the frameworks don’t allow me to run them with AndroidJUnitRunner. Because of this, it leaves our second test a little messy, where we first have to set the API response to return a token, then we can test that user can successfully login to the application.

  • My Beautiful Backyard

    My Beautiful Backyard

    Reading Time: 4 minutes

    When it comes to writing, whether it be a lab report, email memo, or even these blog posts I have zero idea of how to deliver an intro. I like being direct, but I have this inkling that people enjoy the fluff. However, you didn’t click on this post to read about my poor writing skills, instead you want to know more about my backyard. So let’s begin shall we?

    So the title of this post is a bit of a exaggeration, in the sense I don’t have a backyard and haven’t had one since I was in high school living in my childhood home on the Southside of Chicago, and even then it wasn’t very beautiful. But the backyard I’m speaking of today is gorgeous, untapped, jaw dropping, and houses nearly 400 million people. I’m talking about America.

    Being raised by a single mother in a “upper middle class” (technically speaking), didn’t award itself many vacations, let alone much travel outside of the city, granted I was fortunate enough to travel across the country in high school through marching band. The traveling I did get to do while I was younger was through a very focused lens, and honestly I did really appreciate it enough.

    Recently, like in the last week or so my girlfriend and I moved to the Seattle area from our home in West Allis, Wisconsin. While the majority of people would have taken to the skies and fly in, because we have a pet ferret, we had the luxury of driving. We knew it was going to be a long journey, so did a lot of prep before hitting the road.

    Road Trip Checklist

    • Download offline maps in case of signal loss
    • Hit up Costco for snacks
    • Tune up the car (install Android Auto/Apple Car Play)
    • Download some baller playlists on Spotify
    • Download story based podcasts (We’re Alive)
    • Plan out cool sights along the way

    Goodbye Wisconsin

    The morning of the trip’s start, we finished cleaning our apartment, stuffed the car, hitched the bikes up, and hit Chic-fil-a for that all-star breakfast.

    We weren’t more than 2 hours out before we made our first unexpected stop. A gentleman by the name of ‘Steve’ had asked us to pull over. At first I was very skeptical and on high alert as I didn’t know what to expect, and to be honest I was profiling Steve based on his rugged look.

    Turns out Steve was a blessing in disguise, and a very nice person. He is a fellow biker, and he had noticed that we had our bikes hitched up in a dangerous way. My girlfriend rides an Electra Townie, and a Specialized Cross Road Sport, both of which are heavier and more awkward than my FX2. Steve noticed that when we had went over a bridge that the bike rack had bounced considerably. This was due to my girlfriend’s bikes sitting quite lower, and in the case of the bridge may have made contact with the bump in the road. Steve had an incident a few months prior when his bike was sitting too low and it dinged the road, and he ended up with some severe damage done to his car and bike. With his help we were safely back on the road nearing Lacrosse onalaska.

    Blue Earth, MN

    Interior, SD

    Keystone, SD

    Compared to the rest of the trip, Mt. Rushmore was the least awe inspiring relatively speaking of course, but it was still amazing to see in person. On our way out of the national park we met a very interesting character named Jim.

    It was no lie that Jim was a finance guy, and you knew this immediately because all Jim did was spout off numbers, figures, and projections that only a machine could pick up on. I couldn’t tell you what his platform was completely or if he was a farce, but I’ll pass his info along as promised below.

    Shell Falls, WY

    Wyoming was absolutely breathtaking. Sadly we didn’t plan in our trip to hit Yellowstone, by having our ferret along with us, we were limited to how long a stop could be, based on if it was pet-friendly or if a lot of potential predators were afoot. The parts of Wyoming we did see, however, were gorgeous and terrifying. Terrifying in how remote a lot of it is. I have a couple of friends who love to go snowmobiling up there, and one time their truck’s engine failed on them, and luckily someone was coming down the road otherwise it would have been a long cold walk.

    The journey to Shell Falls, was stunning around every bend. We saw huge elk and deer grazing along the edges of camp grounds. Huge stones filled with rich ores; cliffs so sudden that they would intimidate the most seasoned of winter enthusiasts.

    Pompey’s Pillar, MT

    Bozeman, MT

    In Bozeman, we visited the American Computer & Robotics Museum, and if it weren’t for the little one I could’ve spent another hour or more in there easily. Whether you’re involved in the tech industry or not, this place was beyond insightful. It was crazy to see how many great minds it took to produce the machines we use to this very day. The museum was a great end to our trip out west, while we still had another 10 hours to Seattle, we were exhausted, so we rode out the last leg and passed out in our bed. And with that, I’m signing off until next time.

  • The Move

    Reading Time: 3 minutes

    For those of you who don’t know me personally, I am originally from the Southside of Chicago, and moved to Milwaukee for college in 2013. After I graduated in 2017, I received a full-time offer in Brookfield, Wisconsin, so I have remained in the Milwaukee area for the last 6 years or so now.

    This post is title “The Move” well because I’m moving. And no I’m not moving down the street or the next town over I’m moving across the country, more specifically to Seattle.

    Around late March, early February I started seeking new career opportunities. My initial search started locally in the Milwaukee area, and I found a few bites, most of which led nowhere (I’ll write about the recruitment process in a later post). Sometime early in my job hunt, I got a call from a recruiter at Microsoft. At first, I thought it had to be a hoax, because I didn’t think huge companies like Microsft, Amazon. Google etc, had to head hunt, that people came to them. But to my benefit I was wrong.

    Fast forward a few weeks, and next thing you know I on-site in Redmond, Washington interviewing with three managers at Microsoft. At this point I already considered the experience a win. Never in my lifetime did I expect to see myself on that campus let alone interviewing for a position, especially so early in my career.

    The moment I left the campus I was all over my phone and email looking for a response. I had thought my technical interviews couldn’t have gone any better, and my talks with the managers were very insightful all of which gave me high hopes.

    Then Monday came and nothing. Then went Tuesday. Wednesday is nowhere, and I’m airing on the side that I wasn’t fit for the position. So later that day I reached out to my candidate advocate to see if he had any word. He said “we’re trying for Minecraft”, and I absolutely lost it.

    Minecraft?? One of the biggest community based games on the market? You’re telling me that not only could do the one thing I always to do in my career, and be part of team that has a huge global audience. Thursday comes and go.

    Friday is here, and I promised other organizations that I would have for them an decision on their offer by the end of the day. Problem was I still didn’t have anything definite from Minecraft or Microsoft. Because I am two hours ahead of Seattle it made things a bit more taxing. I’m both working before they are, and my end of day is before theirs, so now I’m in between a rock and a hard place. Do I turn down a potential opportunity with one of the biggest names in business, or do I play it safe and stay local?

    A few hours before my end of the day in Milwaukee I give my advocate a call, giving him the lay of the land. He said to give him a few hours to start knocking on some doors, so I do just that. At this point, I’m not sure what’s going to happen, where I will be working in a few weeks. The only thing I can think to compare it to is the NBA Draft, just finishing a long hard college season, not sure if you’ll be playing next to your idols, or still watching them on TV.

    Sure enough, 5 pm rolls around and I get a call. Minecraft became a no go, but the door wasn’t completely shut. One of the three managers I interviewed with decided my name be tossed over to the gaming organization first. They knew I have a high interest in game development and thought it was only right to try getting me there sooner than later, but on the chance, the teams there didn’t find me to be fit at that moment then they would take me to be a part of their team. And that’s exactly what happened.

    Which leads me to today-ish, I’m packing up my things and heading west on to endure my Manifest Destiny. Over 29 hours, 2,300 miles, and crossing 5 states, and I look forward to sharing every second of it with all of you.

  • Spring Showers

    Reading Time: < 1 minute

    Spring is the sign of new beginnings.

    Spring is underway, though I think the state of Wisconsin still think it’s winter. Spring usually signifies a time of fresh flowers blooming and new beginnings. That being said, Coding House will be undergoing its own ‘bloom’.

    In the next coming weeks, Coding House will be updated with new and fresh content, as well as we should have our official logo completed. Until then, things may vary vastly layout and content wise as I figure what works and doesn’t work.

    With the ‘launch’ of Coding House, we will embark on our first project. In short, our first project is a smart markdown IDE. You can find more information on the project here.