Programming Languages

This Week in Programming: Lazy Programmers and Long Load Times

4 Aug 2018 6:00am, by

This last week, I reignited what has been one of my longest, ongoing freelance web design gigs — handling whatever whim I can possibly put into code for my father’s business. I’ve been doing it, at least according to my LinkedIn, since 2001, back when dial-up still ruled the rather nascent web. This time around, we are taking complex drawings of CNC machinery and turning them into — yes, I admit it — image maps. Basically, each drawing will have something like 90+ parts and the easiest and quickest way I could think of to link them to the individual parts was to return to this admittedly antiquated technology. And in the process of doing so, we had to scan in these old drawings from machine manuals from the 1980s and this one exchange stuck out in my brain:

My father: “Okay, here’s the scan. Is it too big?” he asks as he sends me nearly megabyte sized PDFs.

Me: “Nah, doesn’t matter. They probably have a high-speed connection anyways,” I quip, as I convert those images to JPEG without a care in the world for size — pushing that slider up to 90 and tossing some JavaScript in there to at least attempt to make these image maps responsive.

It’s the antithesis of the way I went about things 18 years ago when I first started with web design and learned that no page should take more than three seconds to load, carefully counting every kilobyte and running code optimizers on each and every page. But things have changed, right? I am the lazy programmer to which the title refers.

And then I ran across two articles making the rounds this week that really highlighted this entire exchange, and my laissez-faire attitude to speed and efficiency, which I now present to you as food for thought.

First, a blog post from front-end developer and designer Nick Heer all about “The Bullshit Web,” as he calls it. That’s in the classical sense of bullshit, mind you. In it, he talks about how, way back in 1998, everything loaded so slowly and it just seemed natural as he was using a 56k modem. Surely, however, as time went on and Internet connections grew exponentially faster, everything would load quicker right? Wrong.

“So, with an internet connection faster than I could have thought possible in the late 1990s, what’s the score now?” Heer asks. “A story at the Hill took over nine seconds to load; at Politico, seventeen seconds; at CNN, over thirty seconds. This is the bullshit web. […] The average internet connection in the United States is about six times as fast as it was just ten years ago, but instead of making it faster to browse the same types of websites, we’re simply occupying that extra bandwidth with more stuff. ”

The rest is worth the read, but for our purposes we’ll move on to the next post, which looks at a similar and highly related topic — the cost of JavaScript In 2018. In this post, Googler Addy Osmani writes that “Building interactive sites can involve sending JavaScript to your users. Often, too much of it.” Right off the bat, he offers a graphic showing that, while the latest iPhone 8 may handle CNN (again) quick enough, the average phone spends nine seconds more to process the same page. A cheaper phone, meanwhile, takes more than 30 seconds to load. You get the gist. Osmani then spends the rest of his wonderfully detailed post examining the problem and exploring solutions, but we’ll leave you to read that, as we’re getting on in length ourselves. For brevity’s sake, here’s his talk on the same subject:

This Week in Programming

  • Check Out the Big, Open-Source Guns on F# 4.5: That’s right, Microsoft is touting its open source credentials with the final preview of F# 4.5, which it calls “very, very stable” and, really, only a preview in name. As Application Developer Times writes of the release, “much has been made of Microsoft’s embrace of open source and shift toward interoperability and collaboration, and that trend is exemplified in the new preview release of F#.” Microsoft’s announcement focuses a lot of its time on the way that F# 4.5 was developed, which was “entirely via an open RFC (requests for comments) process, with significant contributions from the community, especially in feature discussions and demonstrating use cases.” And as for the features themselves, those include a change to semantic versioning, and “a feature set aligned with the new Span feature in .NET Core 2.1 … that allows for safe use of performance-oriented constructs in a very restrictive manner.”
  • TypeScript 3.0 Adds the Unknown Type and Project References: In other Microsoft language news, TypeScript 3.0 was also announced this week, which follows up 2.8’s conditional types and 2.9’s generalized key of and easier type import with the unknown type, among other features. JAXEnter writes that the unknown type “does what the any type cannot. If you wish to describe the least-capable type, now you can!”  More specifically, “much like any, any value is assignable to unknown; however, unlike any, unknown is assignable to almost nothing else without a type assertion. You also can’t access any properties off of an unknown, nor can you call/construct them.” In addition to the unknown type, 3.0 also introduces project references, “one of the biggest improvements of the release, making it easier for developers to share dependencies between multiple TypeScript projects by allowing tsconfig.json files to reference each other.”
  • Atlassian Cloud for Gmail Add-On Brings BitBucket Integration: For you BitBucket users, the Atlassian Cloud for Gmail add-on announced last week at Google Next looks like a must-have, as it allows you to do more from your inbox. According to the announcement, the add-on enables you to “take action and get contextual information on your pull requests, issues, and pipelines builds without leaving your inbox.” Specifically, you can read and post comments on Bitbucket issues and pull requests, merge pull requests, re-run pipeline builds, and even see who has or hasn’t approved a pull request. The Atlassian app also integrates with Jira, to boot.
  • Google Cloud Services In Your IntelliJ IDEA: Another Google Cloud announcement, though this one seems to have come after the conference — you can now access Google Cloud services, right from IntelliJ IDEA. The Cloud Tools for IntelliJ plugin lets you discover and use APIs, and test against them locally, right inside the IDE. The plug-in also lets you enable Google Cloud APIs, create service accounts for local development, and add the corresponding Java client libraries to your build, as well as detect and fix potential misconfigurations. The plugin also includes support for Google App Engine, Stackdriver Debugger, Cloud Repositories, and Cloud Storage. By the way, if you haven’t seen it, another great story on IntelliJ IDEA and its relationship with Google ran here a few weeks back, asking “Is the JetBrains’ IntelliJ the Real Android Monopoly?” and it’s worth the read.

 

  • Facebook API Breaks All the Things: Have you noticed, perhaps, all the Facebook apps that no longer work? Or perhaps the most obvious change, which is that Twitter can no longer cross post to Facebook? Well, that’s because Facebook has updated its app review process, and August 1 was the deadline. The gist of it is, all apps using the Facebook Platform API needed to go through “a more comprehensive review to better protect people’s Facebook information” (thanks again, Cambridge Analytica) and “as a result, [Facebook is] cutting off API access for hundreds of thousands of inactive apps that have not submitted for our app review process.”
  • GitHub Desktop 1.3 Adds Some Handy Dandy Notifications: GitHub Desktop 1.3 was announced this week and its main feature is that it notifies you when your branch diverges from your repository’s default branch, which sounds rather useful. Beyond that, this release also shows you “which repositories have had recent activity, uncommitted changes, and unpushed changes without having to click into each one.”

Google and Microsoft are sponsors of The New Stack.

Feature image via New Old Stock.

A newsletter digest of the week’s most important stories & analyses.

View / Add Comments

Please stay on topic and be respectful of others. Review our Terms of Use.