Shawn Jackson

Shawn Jackson

(2 comments, 139 posts)

I’ve spent the last 12 years in the world of Information Technology on both the IT and Development sides of the isle. I’m currently a Software Engineer for Paylocity. In addition to working at Paylocity, I’m also the Principal of Resgrid, a cloud services company dedicated to providing logistics and management solutions to first responder organizations, volunteer and career fire departments, EMS, ambulance services, search and rescue, public safety, HAZMAT and others.

My focus is building better businesses through the use of applied, targeted and tactical software development and infrastructure implementation. My passion is solving real world business problems with technology and constant learning, in the fields of technology, business and law.

I hope you enjoy reading as much as I do writing. Although I may not post as often as I would wish when I do I try and have something useful to say. Although programming is a great creative outlet it sometimes is far to technical and detail oriented to be a stress free outlet for me. So I write on this blog and sometimes a couple others. I also write fiction stories in my spare time, when I have some!

Home page: http://nthdegreelabs.com

Posts by Shawn Jackson

The Best Phone for Ionic Framework Development

I have found the one phone that every mobile developer should have on their desks. So what is this remarkable device and why should you add another one one to the many of devices any good mobile developer already has? Well let me dive into that, but first, let me show you the glory that is the BLU Grand XL.

smartphone-blu-grand-xl-dual-sim-3g-tela-5-5-hd-cpu-4core-c-m--8mp-5mp-pretoThis puppy is about the size of an iPhone 6/7 Plus, and a little bit thicker and a noticeable amount heavier. The one I picked up is running the latest. at the time, version of Android 7 (which is why I stumbled across this gem). I picked mine up for $100 unlocked at BestBuy but I have been seeing them show up for less online as well.

The screen, device feel and size all make it a pretty decent device to have to pick up and set down all the time. The screen is fairly responsive so that doesn’t complicate any testing and it easily hooks into Windows and MacOS out of the box for USB debugging and deployments.

But the magic occurs when you look at the device specs and start testing your apps on it.


Category Value

CPU

Mediatek MT6580 Quad-core 1.3Ghz
RAM 1GB
Storage 8GB
Network

3G (GSM/HSPA)

Don’t be fooled, that quad core 1.3Ghz processor is not as powerful as it sounds. For the most part it seems to run Android 7 ok, but there isn’t much left over for apps. But there is where the magic occurs for us developers, that processor and amount of RAM is almost the perfect modern day worst case performance scenario. Here at Resgrid we’ve been developing against the Ionic Framework since around 2014’ish and developing on the hybrid stack mean performance is a big concern, but also something that can be difficult to really test and gauge.

Us developers usually have pretty good phones, which means our apps usually run very well. But what are your users using? Prepaid phones and now phones like the BLU Grand XL are out there and very affordable. A lot of people out there using phones a few years old and a lot of people have gotten off the “upgrade every year or 2” train.

Because of the nature of the Resgrid app, targeting emergency management and first responders, we have a pretty high target in terms of performance (our goal is a usable app within 3 seconds), but given the fact that we are at the mercy of the device and browser on that device it can be a difficult target to hit across the board.

But if you can get your app working well on the BLU Grand XL, it’s going to work well on so many other devices. When we first loaded our app on that puppy (in prod mode with aot) it took almost 18 seconds to be fully usable. Because of this we implemented lazy loading, removed plugins and packages and so far have that time down to 12 seconds and still have a way to go.

If you’re a First Responder or know one check out Resgrid which is a SaaS product utilizing Microsoft Azure, providing logistics, management and communication tools to first responder organizations like volunteer fire departments, career fire departments, EMS, search and rescue, CERT, public safety, disaster relief organizations.

Ionic Framework: Uncaught (in promise): removeView was not found

During our rewrite efforts to move our existing Ionic 1 applications to Ionic 3 we developed a pattern that looks like this:

export class ChatRoomPage {
  public room: any;
  public loader: Loading;
  public roomSid: string;

  constructor(public navCtrl: NavController, private chatProvider: ChatProvider,
    private consts: Consts, public loadingCtrl: LoadingController, private params: NavParams,
    @Inject(APP_CONFIG_TOKEN) private appConfig: AppConfig) {

    this.loader = this.loadingCtrl.create({
      spinner: 'hide',
      content: 'Loading Please Wait...'
    });
  }

  ionViewDidLoad() {
    this.loader.present();
    this.fetch(null);
  }

  private fetch(refresher) {
    this.chatProvider.getRoomBySid(this.roomSid).subscribe(
      data => {
        this.loader.dismiss();
        this.room = data;
      });
  }
}

The pattern was pretty easy, our Loading popover didn’t change per instance, so we setup it in the controller. We also had pages were we setup the Loading controller in the ionViewDidLoad() method as well. But during testing, were pages were loading multiple times we started to notice this error.

2017-08-04 17_59_35-Microsoft Edge

Extremely frustrating, every time we nav’ed back to a view we could not figure out what was causing the issue, was it navigation, which has had some issues? Nope, it’s the dang loading popover. We made changes, based in part from this thread, and our resulting code now looks like this.

export class ChatRoomPage {
  public room: any;
  public loader: Loading;
  public roomSid: string;

  constructor(public navCtrl: NavController, private chatProvider: ChatProvider,
    private consts: Consts, public loadingCtrl: LoadingController, private params: NavParams,
    @Inject(APP_CONFIG_TOKEN) private appConfig: AppConfig) {
      this.room = {};
  }

  ionViewDidLoad() {
    this.fetch(null);
  }

  private fetch(refresher) {
    this.loader = this.loadingCtrl.create({
      content: 'Loading Please Wait...'
    });

    this.loader.present().then(() => {
      this.chatProvider.getRoomBySid(this.roomSid).subscribe(
        data => {
          this.room = data;

          this.loader.dismissAll();
          this.loader = null;
        },
        err => {
          this.room = {};

          this.loader.dismissAll();
          this.loader = null;
        });
    });
  }
}

The issue is when you call LoadingController.dismiss() or LoadingController.dismissAll() the view that the loading controller creates for your popover is destroyed and cannot be reused. So to be able to call LoadingController.present() again you need to call loadingController.create() beforehand.

Additionally there can be race condition between LoadingController.present() and LoadingController.dismiss(), so another recommendation is to wait for the LoadingController.present() promise to return before running into any instance that may quickly (i.e. in an error case) call dismiss().

If you’re a First Responder or know one check out Resgrid which is a SaaS product utilizing Microsoft Azure, providing logistics, management and communication tools to first responder organizations like volunteer fire departments, career fire departments, EMS, search and rescue, CERT, public safety, disaster relief organizations.

Developer First Impressions of the 2016 MacBook Pro

I haven’t been an “Apple” person for long, but since I bought my first MacBook Pro in early 2013 I was really impressed with the quality of the hardware, the feel of the device, how small and lightweight it was was light-years ahead of any other laptop I could buy at the time. The MBP turned into my travel laptop of choice, I had 2 Windows laptops (1 from Dell the other from Asus) that I just stopped using and gave away. A .Net Developer only traveling with a Mac, that was crazy talk.

IMG_4038Fast forward, 3 freaking years without a meaningful hardware upgrade, and were now in 2016 and a new MacBook Pro has been announced. It’s a significant hardware upgrade over my 3 1/2 year old MBP, but not so much if you have a kitted out version of the last revision.

As I started to write this I’ve been using it off and on for a couple of days into my 10 day stress test, so not really stressing it yet. But I’ve already noticed a few things.

 

  1. Build Quality Is Amazing, as usual: When your paying top dollar for a laptop we expect it’s going to feel good. The system is solidly built, it it’s noticeably smaller and lighter then my 3 year old MBP, but has a solid heft to it. Opening and closing the screen is fluid and sturdy.
  2. Hardware Spec’s are “Meh”: I went for the upgraded processor and video card. For me when I travel I like the ability to play games. I only went with the 512GB SSD, as the 1TB model was an extra $400 bucks and I could not justify that, I’ll just carry around some 128GB Thumb Drives, not that big of a deal. But power wise the Surface Book seems to have the edge in terms of raw horse power.
  3. Ports aren’t “Portie”: Apple FINALLY went with standard ports, but unfortunately they picked ports that almost no one else uses. This means I had to replace my almost $200 bucks worth of adaptors for my old MBP. I was also a fan of the MagSafe charger, kinda sad to see that go.
  4. Screen: The new MBP’s screen is really nice, very crisp and bright, color seem good and vibrant.
  5. Trackpad: I am not a fan of the larger trackpad that takes up the entire middle of the front of the laptop. I don’t mind the loss of the mechanical press on the trackpad and instead going haptic, it still feels ok, not great. But the damn size, with my larger hands my palms routinely pour over the pad and that sometimes causes issues. Minus some ghost mouse movements, and clicks, it’s uncomfortable, there’s a lip around the pad and you can feel that on your palm.
  6. Touch Bar: Every review out there is glowing about the touch bar, but for a developer, this downright sucks. The touch bar is an OLED screen, and inset into laptop below the levels of the keys in the keyboard. When typing there is no way to correctly position your fingers to ‘feel’ if your pressing the right OLED button. To me this Touch Bar is a gimmick and a step backwards for any keyboard warriors.
  7. Keyboard: This is my biggest gripe with the new MBP. They keys are the new ‘butterfly’ design and have almost no key travel. There is a satisfying ‘click’ when typing but almost no physical feedback of a keypress. The keyboard layout changes also are not good, the arrow keys particularly are completely messed up, I guess they didn’t like the space above and below the left and right arrow key? Like serious WTF.

I’ve never before considered returning an Apple product, but after a day of use I looked up their return policies. Including taxes I spent $3,300 on the laptop and tack on another $400 for Apple Care. I still don’t know if I’m going to keep the new MBP, I’m seriously considering a Surface Book or Razor Blade as alternatives and keeping my old MBP for XCode builds.

If you’re a First Responder or know one check out Resgrid which is a SaaS product utilizing Microsoft Azure, providing logistics, management and communication tools to first responder organizations like volunteer fire departments, career fire departments, EMS, search and rescue, CERT, public safety, disaster relief organizations.

Shawn Jackson's RSS Feed
Go to Top