Reading up on Progressive Web Apps

So I’ve been working in a new project and what sets it apart the most from previous projects I’ve worked on is that our team is building Progressive Web Apps (PWAs). I got thrust into the project in firefighting mode, and I’ve pretty much managed to get by with my experience in working on web apps and hybrid mobile apps. Essentially, my simplistic understanding was PWAs are amped up web apps because they’re app-like [they’re just websites that took all the right vitamins.” – Alex Russell].

  • They can be easily be “installed” from the web browser without having to go through app stores or MDMs like AirWatch.
  • They can be available from your mobile device’s home screen.
  • When you open them, they look like an app — full screen, without the browser header and navigation bar.
  • When you switch apps on your mobile, they’re there along with other “normal” apps.
  • They’re responsive — the same app on my desktop Chrome browser has a “mobile-friendly” version on my mobile’s Safari or Chrome browser or when opened as an app.

But when you have to keep on throwing around the term “Progressive Web App” or “PWA” (people ask about push notifications which you then push back on with the reasoning that it’s currently a limitation for iOS), you want to have a better understanding of what you’re talking about. Well, at least I want to.

So I’ve read up a bit on what PWAs are or what makes a web app a PWA. Common to most of the results are some attributes of the PWAs and some baseline criteria to qualify as PWA.

Attributes

This list is a mix verbatim from Alex Russell (he used colons) and from Wikipedia (em dashes). These are the attributes or characteristics of PWAs.

  • Progressive — Work for every user, regardless of browser choice because they’re built with progressive enhancement as a core tenet. [This seems similar to responsive though]
  • Responsive: to fit any form factor
  • Connectivity independent — Service workers allow work offline, or on low quality networks.
  • App-like — Feel like an app to the user with app-style interactions and navigation.
  • Fresh: Transparently always up-to-date thanks to the Service Worker update process
  • Safe — Served via HTTPS to prevent snooping and ensure content hasn’t been tampered with.
  • Discoverable: Are identifiable as “applications” thanks to W3C Manifests and Service Worker registration scope allowing search engines to find them
  • Re-engageable: Can access the re-engagement UIs of the OS; e.g. Push Notifications
  • Installable: to the home screen through browser-provided prompts, allowing users to “keep” apps they find most useful without the hassle of an app store
  • Linkable: meaning they’re zero-friction, zero-install, and easy to share. The social power of URLs matters.

Baseline Criteria

This is more of implementation requirements — so might not be quite visible to business owners. Copy-pasted the 3 listed items below verbatim:

To be a Progressive Web App, a site must:

And apparently, there’s the Lighthouse tool which can run automated checks to evaluate whether a site/web app is a PWA or not. It’s easily install-able as a Google Chrome extension and generates a nice looking report which also could seem like a reference on what to improve for your web app.

Sample output of report (this is just the summary, there’s a breakdown that actually follows)

So after going over all those links and references, do I know how to define a PWA?  Idk, I’ll probably revert to: they’re amped up web sites which can be installed behave like apps. 🙂

References

Advertisements

Wondering how much it matters: initial load of page

Background: I found that when I accessed the home page of one of the apps our team was working on, there were around 1000+ requests and over 10MB transferred in a span of 10 minutes (and it was still going). On screen, what’s visible is just the login page.

After they’ve fixed it, I went ahead and checked our current apps in the test environment. Just a disclaimer though — I’m not a performance tester and I just gathered the info I got via Chrome Dev Tools.

AppRequestsTransferredFinishDOM Content LoadedLoad
App 1503.6 MB2.6 min28.4 s48.69 s
App 2301.9 MB19.06 s11.12 s12.35 s
App 3413.6 MB26.95 s7.52 s12.52 s
App 4181.7 MB9.41 s3.93 s9.41 s
App 514742 KB3.17 s1.36 s3.18 s

3.6 MB and all that’s visible is the login page?

That prompted me to then google what’s the average out there. I’ve come up with a bunch of interesting results that’ll most likely make up my weekend reading:

Feel free to suggest in the comments section if there are more relevant references I could also look into. Thanks!

Read: The Dance of the Possible

I’ve just consumed Scott Berkun’s newest book, The Dance of the Possible. As promised by the author, it was a short book intended so that we can get what we can out of it, get it out of the way, and dive into actually creating something. It was divided into three parts — each of which I consumed in one sitting of around an hour. You can breeze through it in less, but I liked reflecting on points raised by the author and recalling experiences where I can relate them (or could have related to them).

If I were to describe the 3 different parts of the book, I’d say part one is about the generating ideas. Part two is when you’re already developing your ideas. And part three is when it’s getting extra challenging to keep going and you need that extra boost.

He captures in writing some of the things I personally go through in my own creative process which made me just virtually nod in agreement and think “Oh yeah, that was what I was doing!” And I guess in making me aware, I could be more intentional in applying them and accepting when I feel like I’ve hit some sort of slump (that I will get over, of course).

I’ve long been intending to read a book on creativity (among many other things). Having Scott’s book come along with the invitation to do a book review really pushed me. When he described one of the seven sources of fuel for why people create the things they do (i.e., “Deliberately put yourself in situations where you have no way out but through.”), I couldn’t help being amused and thinking “Yeah, that happened!” I think even without the book review aspect, I’d have enjoyed reading his book as I’ve enjoyed some of his other writings. It just adds another dimension and it feels like it’s full circle because the book on creativity actually prompted me to create!

[Edit: Same content is posted as an Amazon book review over here.]

Are you interested in software testing?

So yesterday I shared a link to 30 Things Every New Software Tester Should Learn in some other social network. Now I know it says “new” and I’m not exactly new anymore. But still, I don’t know everything so I’m sure I’ll pick up something new. Besides, whether you learn something or not depends on your willingness and openness to the possibility of learning.

Anyways, that post consisted of a series of tasks, and the first of which was to do an introspection. It asks this key question:  Are you interested in software testing? I guess it’s pretty safe to say that I am. I’ve been in testing for a long time now and I do enjoy it. I tweet and blog about it. I like finding bugs, figuring things out, working with fellow testers and the devs, and essentially just helping in making our product better (and maybe our project too).

Now this is something I also wonder about whether fellow testers are actually interested in software testing. I totally understand that for some it’s a 9–5 job, and for some their interests lie in their personal pursuits (be it art, sports, pets, other hobbies) — after all, there is more to life than just work! I don’t take it against anyone if they’re not in love with their work (so very few are and that’s in general) or so gung-ho with software testing pride (pumps fists up in the air). But interest is critical. It could mean the difference between just getting by with the motions and excelling or exceeding expectations. And it could mean the difference between drudgery and enjoyment. At the very least, I do hope people like their work and not just for the reason that it pays the bills.

I know there are some folks who fell into software testing by chance — it happened to be an opportunity that was available, or they had to shift from another part of software engineering to testing. Some folks got into testing because they took a programming course in college but aren’t too keen on doing coding. And inversely, there are some who got into testing with the hopes of shifting into coding. But regardless of how you got here and whether you’re still testing the waters to figure out if testing is really for you or not, please exercise diligence. Testing might turn out to be something you can excel in so give it its fair chance.

And maybe to be interested in software testing, the first step is to make a conscious decision to be interested in it.

“The very first step towards success in any occupation is to become interested in it.” – William Osler

Read: Leading the Transformation

Our product owner is one of the rare few individuals I know at work who actually still reads books. Last month, he recommended that we read Leading the Transformation: Applying Agile and DevOps Principles at Scale by Gary Gruver and Tommy Mouser. It’s a thin book with only 112 pages on paperback and around a 3-hour read. It’s intended for leaders/executives so it gives a high level overview of the changes teams and the organization need to make and the benefit of those changes, and it repeatedly emphasizes management’s role in pushing for those changes. In particular, the changes that they want to drive at center around Agile, DevOps and Continuous Delivery (CD).

At work, small teams have now been shifting to Agile, our own team has been in this Agile project since January of last year, and I’ve heard of proposals wherein the methodology they suggest is already Agile instead of Waterfall. But then, I pick up from the book that trying to scale up Agile adoption across the board with small teams as the starting point doesn’t quite work for large organizations. Whoops. The book suggests that if you want an enterprise-level change, you have to plan for it and drive it from the management level down to us lowly minions. A key difference though is that within our organization (at least locally that I know of), we don’t really have hundreds of developers working on the same product or code base. And in our case, we’re only under 20 in the team, but even so the book still offers a good introduction to a lot of mature development practices that we need to look into.

Key items highlighted in the book that I’d like to reiterate further:

Importance of having quick feedback loops

Unit tests and static analysis tools can already weed out a lot of problems so that defective code won’t even get committed to the repository to begin with. And having those fixes done even before passing it to the test team — instead of fixing them only after the code has been deployed and testers found issues that were caused by those defects — will definitely help reduce the turnaround time.

Quick feedback loops will also help the team work and resolve issues while the code or user story is still relatively fresh in their heads. It’s more difficult for both the devs and testers to fix and retest an issue on a behavior that they’ve pretty much forgotten about.

Having builds as release- or production-ready as possible

With regular and stable builds in place, it’ll be easier to identify when a commit breaks the build. Since you don’t have to backtrack through days or weeks of commits, it’ll be easier to narrow down and identify the problematic commit.

Having dev/test environments as close to production as possible

One problem that we’ve personally encountered in not having a test environment in sync with the production version was that whenever we encountered an odd behavior in the test environment we had to double check whether the issue was also in prod. We also had to be mindful of issues that were already resolved in prod but not in the test environment. But I guess this problem is a combination of why it’s good to have the test environment as close to prod as possible and the next item related to why it’s good to have good deployment procedures in place.

Having repeatable build, deploy and test processes

From experience and the example above, having a reliable and repeatable deployment process could’ve saved us all effort and heartache. It could be so frustrating to test the same build (supposedly) but then get different outputs even if you’ve done the same steps using the same test data. In the same vein, you’d hate for a feature not to work in prod even if it had already been thoroughly code reviewed, tested and signed-off in UAT/PO review.

And last, but not the least, having test automation

You simply will never achieve the full benefit of Agile development until you get your automated testing properly built out and integrated into the development pipeline.

Test automation is key to the first item I mentioned since it enables quick feedback loops. It also allows repeatable tests to be executed across the different environments, and it allows repeated execution of the regression tests which you might not be able to afford to do so manually.

Having test automation, by itself, will not suffice. Tests have to be designed such that it’ll be easy to localize the cause of failed tests should any be encountered. Maintainability of the automated tests also have to be considered. Otherwise, the benefits of test automation won’t be realized since the team ends up ignoring the test results on account of being not sure whether the issue encountered is a code issue or a test issue.

One last thing… it’s a cultural shift

You can’t just invest on tools for CD or test automation or announce “Let’s do the Agile thing”, and expect the benefits to magically follow right away. This kind of thing takes time because there’s the technical learning overhead, plus shifting to a new way of doing things requires discipline and resolve so that folks won’t revert to the old habits that they’re trying to change.

It is important for executives to understand early on if the organization is embracing this cultural change, because if it doesn’t, all the investments in technical changes will be a waste of time.

It’s not going to be enough for the project team alone to be invested in the changes. The management and executives need to be aligned with this. In fact, they should help drive it. Otherwise, they might give demands that would bypass the adoption of change and instead force people back to their old habits (just because it might appear faster but only in the short term).

The book, after all, isn’t entitled “Leading the Transformation” for nothing. Management’s presence and push isn’t merely a suggestion; it’s a necessity. Sure, the project teams are the ones making the technical changes; but management needs to understand and support the changes. Essentially, people need to be in the same page in order to move in the same direction.

Finished reading: Managing the Test People

It’s a quick and easy read as it promised to be. I’m not a manager and it’s not something I’m planning to be. But I am somewhat in a position of leadership so the book is still quite relevant to me. Judging by how much I’ve highlighted in the book, it’s undeniably quite relevant.

I’m also working with younger folks who I believe have great potential to be leaders. They can be even better leaders than who we have at the moment, but only if they’re positively influenced by the right mindset on both leadership and technical aspects.

I’d go recommend this book to them since the author really paints a great picture of a leader (or manager) to aspire to be. And with its focus on testing teams — or technical teams in general — it’s a perfect fit for us. Reading the book raises the bar for our expectations on managers but only as it should be because we can’t expect nothing less than for our managers to lead and empower their people. You also get insights on how managers should (better) deal with things. But more than that, and I guess what’s most important, you also get to pick up and be reminded on how you should be as a leader (even if not by title).

In closing, the author shares:

Stay on the right path by frequently asking yourself, “Am I being honest? Am I being consistent? Would I want to work with* me?”

*Originally “for”. But since we’re not bosses or managers, “with” seems more relatable.

Maybe that simple level of introspection — especially on that last question — is what we all need to remind us to be first and foremost good colleagues or team mates before even rising to becoming good leaders.

On valuing your time, Maker’s and manager’s schedules

Time and again, my hate for useless meetings seems to keep on drawing me to Paul Graham’s essay “Maker’s Schedule, Manager’s Schedule”. (And also, I did tell a friend I’ll go share this link with her). Every time I read it, I couldn’t help but agree to a lot of the things he said. So much so that I find it hard to cite just one particular line to quote here in this post. You really just have to read the whole thing yourself.

To me, this essay is a pretty good reminder of what we should all be doing (just in case I’ve lapsed, and have been setting meetings or following up like there’s no tomorrow), and that is to respect my own time and other people’s time. In doing that, you make a more conscious effort to (well, if i can help it):

  • avoid interrupting or disturbing people unnecessarily
  • express gratitude when someone obliges you with their time
  • be present in meetings where your inputs or feedback are actually needed
  • set up meetings with the implicit target of not wasting people’s time
  • decline meetings I’m pretty sure I won’t be engaged in
  • decline meetings when they’re in conflict of personal commitments — Those are just as important (and sometimes even more) as work commitments
  • honor commitments to yourself — Ages ago, I had to block of time just for my lunch or dinner, and I even missed that because of work. That just isn’t healthy. Also when you block off time to work on something, then use that time to be productive.

Discipline on how you manage your time or own your own calendar starts with one’s self. And how badly your time gets mistreated by others (and even by yourself) highly depends on how much you’d allow it. So for your sake, start respecting and managing your time.

Reads: The Myth of Epiphany

The myth of epiphany is that great ideas dawn upon you in an a-ha moment. Take for example the popular story of an apple falling on Newton’s head when he discovered gravity or Archimedes’ eureka moment in the bathtub. But what those stories seem to miss out is the significant amount of work that they’ve poured into solving related problems, and that it’s only when they took a break and let their minds wander that the answer came to them. We mustn’t overlook that there is work that leads up to those a-ha moments. There is a period of incubation where we try to digest the information that we’ve observed as we work on things, and our brains are catching up with all that’s been observed. Then if we’re lucky, the answer or the great idea comes to us at an instance that seems so out of the blue that it makes for a good story.

One quote from Ted Hoff (inventor of the first microprocessor, Intel’s 4004) said it best:

“… If you’re always waiting for that wonderful breakthrough, it’s probably never going to happen. Instead, what you have to do is keep working on things. If you find something that looks good, follow through with it.”


The Myth of Epiphany is from a chapter in Scott Berkun’s book, The Myths of Innovation.

TED Talk: Why work doesn’t happen at work

Excerpts:

That’s what happens at the office.You don’t have a workday anymore. You have work moments.It’s like the front door of the office is like a Cuisinart, and you walk in and your day is shredded to bits, because you have 15 minutes here and 30 minutes there, and then something else happens and you’re pulled off your work,and you’ve got to do something else, then you have 20 minutes, then it’s lunch. Then you have something else to do. Then you’ve got 15 minutes, and someone pulls you aside and asks you this question,and before you know it, it’s 5 p.m., and you look back on the day, and you realize that you didn’t get anything done.I mean, we’ve all been through this. We probably went through it yesterday, or the day before, or the day before that. You look back on your day, and you’re like, I got nothing done today. I was at work. I sat at my desk. I used my expensive computer. I used the software they told me to use. I went to these meetings I was asked to go to. I did these conference calls. I did all this stuff. But I didn’t actually do anything. I just did tasks. I didn’t actually get meaningful work done.

And what you find is that, especially with creative people –designers, programmers,writers, engineers,thinkers –that people really need long stretches of uninterrupted time to get something done. You cannot ask somebody to be creative in 15 minutes and really think about a problem. You might have a quick idea, but to be in deep thought about a problem and really consider a problem carefully, you need long stretches of uninterrupted time. And even though the workday is typically eight hours, how many people here have ever had eight hours to themselves at the office? How about seven hours? Six? Five? Four? When’s the last time you had three hours to yourself at the office? Two hours? One, maybe? Very, very few people actually have long stretches of uninterrupted time at an office. And this is why people choose to do work at home, or they might go to the office, but they might go to the office really early in the day, or late at night when no one’s around, or they stick around after everyone’s left, or they go in on the weekends, or they get work done on the plane, or they get work done in the car or in the train because there are no distractions.

… Just silence, that’s it. And what you’ll find is that a tremendous amount of work actually gets done when no one talks to each other. This is when people actually get stuff done, is when no one’s bothering them, when no one’s interrupting them. And you can give someone — giving someone four hours of uninterrupted time is the best gift you can give anybody at work. It’s better than a computer. It’s better than a new monitor. It’s better than new software,or whatever people typically use. Giving them four hours of quiet time at the office is going to be incredibly valuable.

Reads: How to destroy programmer productivity

Not a programmer, but a lot of what he said somewhat applies.
Excerpts:
Whatever I can control, I should control. That means:
  • Turning off notifications on my iPhone (this has the added benefit of  increased battery life)
  • Giving myself a reward for 3 hours of continuous coding [or testing, in my case] (usually in the form  of “internet time” like checking Hacker News or twitter)
  • Working from home when I really, really, need to get something done
  • Scheduling ‘no meeting’ times on my calendar. These are times shown as busy  to everyone else. It’s my work time.
  • Not getting into programmer arguments around the office; people have strong  opinions, and the programmers who have arguments love to argue. If  there’s an actual business problem that needs to be solved, let’s grab a  conference room and come up with the advantages and disadvantages of each  approach. Let’s get some data. Let’s not just argue.
  • Position my desk in such a way that passersby aren’t distracting. [Well, i slouch so that i can’t see passersby. That’s not so healthy but that’s another topic.]
  • Taking a first pass at the problem, and *then* asking another developer to  walk me through the problem so that I can get a better understanding of what to  do. This accomplishes two things: First, it allows me to get the ‘lay of the  land’ so that I’ll at least have a basic understanding of the forces at work.  Second, it allows me to ask more intelligent questions when I ask for  help