Feds Reject Clinton Comparison in Classified Submarine Photos Case

Saying that Hillary should be in jail because of her email scandal is saying that the FBI is covering for her, despite the fact that many Democrats blame Comey for unduly distorting the outcome of the election in Trump’s favor. In their own way, both sides of the divide are upset with the FBI at this point.

I’m reminded of Solomon’s proverb:

He that is first in his own cause seemeth just; but his neighbor cometh and searcheth him.

There are always at least two sides, and usually the one you spend the most amount of time listening to is the side you think is right, regardless of whether it actually is or not.

Another Classic Example of Crying Wolf

Marco Arment:

George W. Bush was elected during my freshman year of college. For the next 8 years — all of college, my first job, and the first two years of Tumblr — we suffered through that horrific administration. It was half of my adult life so far.

I respect Marco, but this one’s off. We’ve never had a “horrific administration” in the United States. It’s hard to tell if he’s being hyperbolic here or if he really means it, but either way it’s crying wolf. I hope it doesn’t happen, but some day we may actually have a horrific administration. If that day comes, we need for the language that properly describes it to not be bankrupt by misuse.

The New CEO’s First Moves (and Trump)

Scott Adams:

The political press will dismiss Ford and Carrier with fact-checking. But the stock market will be smarter. Experienced business people recognize the “new CEO” move and they know how powerful and important it is.

If you are worried about Trump’s talent for leadership, this should help set your mind at ease. He hasn’t even started the job and he’s already performing better than any past president in the same phase.

If your viewpoint is that of a politician, you’ll find less to like about Trump than if your viewpoint is that of a business person. It’s fascinating to watch people analyze the exact same situation and come to very different conclusions.

One important takeaway here is that stock market is a good predictor. You could tell from looking at the S&P 500 early on in the evening that Trump had won the election. If you want to know what’s going on in a country, pay attention to its financial sector, not its political one. Politics is nothing more than a reflection of what’s going on financially.

Your iPhone, the special property of the left side bezel, and an autocorrect suggestion

Dave Mark, writing at LoopInsight:

Do you have an iPhone 6s or newer? Try this:

  • Unlock your phone.
  • Press your thumb on the left bezel (the black framing on the left side of the front of the phone) and press.

As you press, the force touch will reveal just a bit of the stack of apps you are running. Press with a bit more force, and that view will go full screen, as if you had double pressed the home button.

Not sure when this feature first came out, but it seems little enough known that I thought this was worth a post.

This feature has been out a while, possibly with iOS 10.0. Pretty sure it’s been on my iPhone 7 since the day I bought it. Usually when I trigger the feature, it’s an accident. Dave’s idea of overriding its default functionality, or maybe disabling it in fullscreen apps, would be welcome.

The Curious Case of Christians and Alcohol

Benjamin Sledge:

Most churches were slow to give up thousands of years of tradition by switching wine with grape juice, and for the first few years, Welch’s sold almost exclusively to churches.

America’s view on alcohol has bothered me for years. The age restriction and the taboo nature of it are for the most part unique to our country. John Wesley and his nontraditional views have a lot to do with this, it turns out.

Great read and very informative.

The Idea You Are Least Likely to Believe

Scott Adams:

If you have not studied persuasion it makes perfect sense to be in a panic about a Trump presidency. You see a pattern of irrational-looking behavior from Trump during the election and you assume the trend will continue into the presidency. But if you understand the tools of persuasion you see a Master Persuader ignoring what doesn’t matter and paying close attention to what does, for the benefit of the country. That is literally the safest situation I can imagine.

It’s hard to find a level-headed person talking about what’s going on politically right now. Scott Adams is that voice.

Democrats, the Party Who Cried Racist

Brett J. Talley, writing at CNN:

Either those leveling charges of racism against Sessions don’t know these things or they don’t care. That’s the price of weaponizing racism. It transforms what should be a serious accusation made only on the basis of irrefutable evidence into little more than a tool in the left’s political bag of tricks, a way to undermine their opponents with the ultimate smear. The irony is that in using race in this manner, the charge of racism has lost much of its potency. The left has played that card so long on so many people in so many instances that today it is met with little more than an eye roll.

Never underestimate the power of confirmation bias.

James Lankford on Federal Fumbles

U.S. Senator James Lankford, in yesterday’s newsletter:

  • In the eight years of Mr. Obama’s presidency, the federal debt has grown by $9 trillion, nearly matching the total amount of debt accumulated by all of his predecessors. […]
  • In the eight years of Mr. Obama’s presidency, the federal debt has grown by $9 trillion, nearly matching the total amount of debt accumulated by all of his predecessors.

We can expect similar deficits under a Trump administration.

Government debt should be a defining issue in American politics, but it’s not, because it doesn’t affect our day-to-day lives, it’s boring to talk about, and we don’t truly believe a day of financial reckoning is coming. The reality though is that in 2015 the U.S. Government spent $223 billion paying just the interest on this debt. That’s billion with a “b”. Nobody is talking about this. It’d be hilarious, if it weren’t so serious, how wrapped up people get in party politics and forget to step back and look at the big picture.

Stay calm, and look at the big picture.

Jill Stein Just Raised 2.5 Million To Start Recounts In 3 States

Green Party presidential candidate Jill Stein reached her goal of $2.5 million early Thursday morning to fund election recounts in three key states over claims the vote could have been manipulated or hacked.

Stein reached her $2.5 million goal in less than 24 hours after starting the fundraiser and ahead of the Friday deadline to cover filing fees for recounts in Wisconsin, Michigan, and Pennsylvania — swing states that went to Donald Trump in the presidential election. Had those states been declared for Hillary Clinton, she would have passed the 270 electoral votes necessary to win the presidency.

It was easy for these people to make fun of Donald Trump for saying the election was rigged, back when they thought beyond a shadow of a doubt that Hillary was going to be elected. Now that the tables are turned, they’re adopting Trump’s argument.

Always be careful what you make fun of. You might become it.

Deploying a Jekyll Site to Github Pages Without Using Github’s Jekyll

Jekyll Archives is a great gem, but Github Pages chose not to support it:

I don’t believe this fits into the Pages roadmap right now. The plugin is high-touch, in relation to the file system, and is relatively large, for a Jekyll plugin, which creates a significant burden on our security team to review on each bump.

That’s actually very understandable. I don’t disagree with this rejection. If I were on the Github Pages team, I might be tempted to make the same judgement call for the same reasons, despite the heavy pushback that the community gave against the decision. Regardless, this is where we’re at, and it makes a great reason why you might want to use a different process to build your Jekyll site other than Github’s instance of Jekyll.

The idea is fairly simple:

  1. You write your Jekyll posts locally like you always have, and push them to the master branch of your Github repo.
  2. This triggers a script on a service like CodeShip, CircleCI, or Travis. The script does a Jekyll build of the site using Github-forbidden gems such as the jekyll-archive one. Then it pushes this static build as a commit to your gh-pages branch on the Github repo.

This process is actually very similar to my piece on auto-deploying to gh-pages with Codeship, but I’ll go through it here again since the script is slightly different. It’s not nearly as complicated as you might think.

  1. Create a Codeship account and authorize a new project with your Github repo.
  2. I recommend that you use a machine user Github account but you can use your primary one if you'd rather. The main reason I prefer a machine user is that this user is going to be creating some commits and they're really bogus commits. If you use your main account, they'll show up in your profile's contribution timeline. I like my timeline to be clean and only show commits that I actually made, not those of an automated script somewhere.
  3. Back in Codeship, specify this script as the deployment script.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
git  clone git@github.com:<your main github account>/<your repo name>.git _site
cd _site
git checkout gh-pages || git checkout --orphan gh-pages
cd ..
rm -rf _site/**/* || exit 0
bundle install
bundle exec jekyll build
cd _site
rm Gemfile Gemfile.lock readme.md
git config user.email "<your machine account github email>"
git config user.name "<your machine account github username>"
git add -A .
git commit -m "Deploy to Github Pages: ${CI_COMMIT_ID} --skip-ci"
git push origin gh-pages
  1. Delete your gh-pages branch from Github. Make master the default branch if it wasn't already. This will take your site down if you stop here, so do the next step immediately.
  2. Push to your master branch, or run the Codeship build process manually if you have no local changes that need pushing.

With this setup, you are no longer dependent on what gems Github allows or disallows. Anything that’s possible with vanilla Jekyll is now possible with Github Pages.

Oscar Swanros on Facebook's Yarn

Swanros:

Trying to solve the dependency management problem by adding another layer of dependencies to the equation is as stupid as it sounds.

From an outsider that doesn’t do web development for a living, this is crazy. I don’t know how people cope with the web ecosystem. Specially the front-end part.

Swanros is as wrong as he can be, but it’s interesting to see this from the perspective of someone who isn’t actually in need of a dependency manager for JavaScript. I can see how he arrived at his conclusion, based on the facts as they presented themselves.

Despite what NPM said on its blog, Yarn isn’t merely a “backwards-compatible client for the npm registry.” In reality, Facebook launched a direct competitor to NPM but made it easily compatible so developers could migrate from NPM to Yarn with minimal effort. One of the ways Facebook did this was by adding Yarn to the NPM registry. NPM saw the writing on the wall but wrote a PR piece to sugar coat it.1 If you’re using NPM and you want to switch to Yarn, you can switch by installing Yarn via NPM, and then you can completely ditch NPM. It’s important to note that there are a myriad of ways to install Yarn, however, and you don’t need NPM at all in order to install or use Yarn.

Why would you want to use Yarn over NPM? Maybe because it’s more performant. Or maybe because you want to micro manage the versions of your dependencies’ dependencies, but you don’t like to use npm-shrinkwrap because of how long it takes to fix major bugs with it, or because of how it doesn’t play well with private repositories as dependencies. Or maybe you just like new shiny tools, especially ones that are built to solve pain points by a company of Facebook’s calibre.

Regardless, Yarn is a great tool, it’s a serious competitor to NPM, and it’s here to stay.

  1. Saying that Yarn is in the same camp as npm-install is a stretch. Using NPM to install Yarn is like using an Android to visit Apple.com and order an iPhone. Don’t get confused by the fact that one facilitates the other by allowing it to be on its registry. They’re not friends. ↩︎

Why Static Website Generators Are The Next Big Thing

Smashing Magazine, a year ago:

The first ever website, Tim Berners-Lee’s original home page for the World Wide Web, was static.

We’ve gone from everything being static to everything being dynamic, and then back to static. The difference is that we’re now achieving dynamism through automated build processes. The end result is that you get all of the benefits of a static site and all the benefits of a database-driven site, without the shortcomings of either. Having a database-driven website is becoming less mandatory, less cool, and more of a liability at this point. Especially if all you’re doing is running a content site. But even if your site is more than content, I’d still argue for a static front-end and a separate RESTful API domain that your front-end interfaces with. That’s where everything is headed.

It’s true that every single URL of a static site must correlate to a .html file on the server, but for laborious views like archives, that can be automated. If you’re trying to maintain a static content site — even a complex one that has a lot of views — and you’re finding yourself doing anything other than writing content and deploying, you’re doing something wrong.

Jeffrey Way from Laracasts Joins the Laravel PHP Sydney Meetup

A little before the 24-minute mark:

Why I chose PHP over something else doesn’t amount to much more than the fact that it was just so easy to use. And I think most people would say that. […] With PHP you just create a file and you push it up to a server and you’re good to go, right? Once again that’s an example of how simplicity always wins. PHP is not nearly as elegant to use as something like Ruby—not even close. But, it wins. You know, the simplest option almost always wins. And I feel like that’s why Laravel’s popular. That’s why I’m betting on Vue being popular.

Having a tech stack of PHP and Vue seems like a really smart idea when you put it that way.

Sal Soghoian and the Future of macOS Automation

Gruber:

If they had simply fired him, that’d be one thing, but the fact that they’ve eliminated his position is another. This is shitty news. I find this to be a profoundly worrisome turn of events for the future of the Mac. I hope I’m wrong.

I disagree. The universe of macOS users who actually use this stuff is really small. It’s as small as the universe of people who genuinely need more RAM than is available in a maxed-out 2016 MacBook Pro. In both instances, Apple is ignoring 5% of its customer base because to do otherwise would be to lose focus. Keeping everyone happy and being focused are opposing philosophies. Apple’s decision here isn’t “profoundly worrisome.” What would be profoundly worrisome is if Apple were to lose its focus by patronizing legacy ideas while introducing newer, better ones — or worse, maintaining legacy ideas in lieu of finding newer, better ones.

There’s this notion among the 5% that if you’re a power user, you’re using this automation stuff, and vice versa: if you’re not using this stuff, well, you must be using your laptop for email and Facebook and you might as well just own an iPad and ditch your computer altogether. It’s a really bizarre notion because it’s so far off the mark. During a typical workday, my secondary screen is a 4-pane tmux session where I manage git, hot module replacement, a FreeBSD VM, and Unison file syncing. I have a myriad of ~/.bash_profile shortcuts which in turn trigger shell scripts. Most of my coding is done in PHPStorm, which has its own myriad of automation tools. I couldn’t do any of this on iOS, but none of it has to do with whether macOS supports AppleScript or not.

As I look at Soghoian’s poorly designed, aged websites built in HTML tables of all things,1 I’m looking at relics of the past that are still heavily used by a very small minority. That’s exactly the characteristics of something for which Apple has no problem pulling the plug.

  1. I don’t want to sound overly mean here. Script developers are rarely good designers and they’re often not savvy front-end web developers. The point here isn’t to criticize someone’s design chops, it’s to point out that this is a one-man guru shop and the entire operation is stuck in the past. Big projects attract talented designers. It’s a gut check to how popular a project is. ↩︎

You Are Still Crying Wolf

Scott Adams:

Trump made gains among blacks. He made gains among Latinos. He made gains among Asians. The only major racial group where he didn’t get a gain of greater than 5% was white people. […]

Stop using the words “white nationalist” to describe Trump. […]

Stop calling Trump voters racist. […]

Stop centering criticism of Donald Trump around this sort of stuff, and switch to literally anything else. […] In the middle of an emotionally incontinent reality TV show host getting his hand on the nuclear button, your chief complaint is that in the middle of a few dozen denunciations of the KKK, he once delayed denouncing the KKK for an entire 24 hours before going back to denouncing it again.

Trump may lack political experience,1 but I truly don’t believe he’s any more racist than any of our other presidents. If you want to criticize him, do it on other grounds.

  1. His detractors have found this to be a huge problem, but remember, this was a selling point among his supporters and it’s one of the big reasons he got elected. ↩︎

VueJS Compared to Other Frameworks

VueJs:

In React, when a component’s state changes, it triggers the re-render of the entire component sub-tree, starting at that component as root. To avoid unnecessary re-renders of child components, you need to implement shouldComponentUpdate everywhere and use immutable data structures. In Vue, a component’s dependencies are automatically tracked during its render, so the system knows precisely which components actually need to re-render.

This means updates in unoptimized Vue will be much faster than unoptimized React and actually, due to the improved render performance in Vue, even fully-optimized React will usually be slower than Vue is out-of-the-box.

I’m sold. At this point, React has some catch-up work to do.

Scott Adams Explains the Cognitive Dissonance with a Trump Victory

Scott Adams:

This brings me to the anti-Trump protests. The protesters look as though they are protesting Trump, but they are not. They are locked in an imaginary world and battling their own hallucinations of the future. Here’s the setup that triggered them.

  1. They believe they are smart and well-informed.

  2. Their good judgement told them Trump is OBVIOUSLY the next Hitler, or something similarly bad.

  3. Half of the voters of the United States – including a lot of smart people – voted Trump into office anyway.

Those “facts” can’t be reconciled in the minds of the anti-Trumpers. Mentally, something has to give. That’s where cognitive dissonance comes in.

Nailed it.

Carrie Dils on Open Source

Carrie Dils, on the latest episode of the Rainmaker show:

No names mentioned, but I had a support request come through — and this is not a one-time deal, it’s happened multiple times — where someone is being paid as a web developer or a web designer to deliver a website for a client, and what they’re asking for in support forums is for the work to be done for them. […]

I think that type of individual can devalue what a lot of people are doing legitimately and well, if that makes sense.

It’s one thing to ask for help on a forum when you’ve thoroughly studied something and are still stumped. Usually this is a sign of poor documentation or a bug. It’s a completely different thing to ask for help when you don’t understand the basics of programming, or WordPress, or the specific challenge at hand.

In my experience, if you know your stuff, it’s faster to just build something than it is to ask someone on a forum for help. The problem is that unqualified people are getting hired to do WordPress work. WordPress is more than 25% of the Internet and there’s a ton of seemingly low-hanging fruit. A job can start out simple on paper, but as is often the case in the technical world, its level of difficulty can escalate quickly. The result is that the developer gets in over their head, but they’re desperate to finish the job because they want to get paid. They rush to the free forums and dump their problem in someone else’s lap.

Because WordPress’ initial barriers to entry are so low, I see this happen a lot.

Francis Fukuyama on The Ezra Klein Show

Dr. Francis Fukuyama, a little past the 33-minute mark on The Ezra Klein’s Show:

We’ve had identity politics in the United States for quite a while. The Democratic Party — I would say one of it’s big weaknesses is the fact that it’s become basically the party of identity politics, where they assemble these coalitions of African Americans, women, gays, disabled people — all these different categories and the one category that was missing was this white working class, where they had all drifted over into the Republican Party precisely because they got this feeling that the Democratic party wasn’t home to them.

Now if you think about the problem in terms of identity, you get these people that had been the dominant culture and majority in the country and all of the sudden all of these other identity groups appear and they appear to be getting online in terms of affirmative action and government policy ahead of you, you know, you say to yourself, well, what about us? You know, what’s the government doing for us, because objectively actually being [in the] working class has put us at these huge disadvantages in terms of mobility and everything else. […]

You can’t simply denounce this as racism and bigotry. […]

I like this guy.

When Klein asked what the solution to the problem is, with the understanding that what we don’t want to see is a divisive Donald Trump emerge every election cycle, Fukuyama responded:

The thing you don’t want to do is say, okay, well, we’ve got identity politics and, okay, here’s this other group of people, white people, and they’re an identity group too and we’ve got to accommodate them as an identity group the way we’ve accommodated Hispanics and African Americans and, you know, gays and so forth. I think that’s really a big mistake. […]

I think it’s still much better to talk about this in class terms rather than identity terms, because class is much more neutral; and in fact, it is the central divide in American politics today.

I couldn’t have said it better. Identity politics — recognizing various groups of people based on their ethnicity — causes more problems than it solves. This is truly one of the great weaknesses of the Democratic Party. Until you recognize this for what it is, you’ll never understand why Donald Trump has had so many people supporting him. His campaign has been an undiplomatic overreaction to a very real problem. To say that Trump’s supporters are all racists and bigots is unfair. Some of them undoubtedly are, but many are asking for a level playing field. That’s all they’re asking for.1

It shouldn’t matter in the United States what your identity is. Being a majority or a minority should not automatically benefit you. That should have no bearing whatsoever. The distinction of class is plenty enough.

  1. It’s interesting to watch two Monopoly players seek to make an exchange of deeds. Often they’ll both reject a deal on the basis that it’s unfair to them and too generous to their opponent. Identity politics inevitably leads to this; each interest group wants more than their so-called “fair share” before they are satisfied that the system is fully equal. This phenomenon is inherent in identity politics. It comes with the territory. ↩︎

Facebook Engineer Christopher Chedeau on CSS in JavaScript

Christopher Chedeau in a Speaker Deck slideshow presentation done in 2014:

It is really crazy to me that the best practices in CSS is still to use global variables. We’ve learned in JS for a long time that globals are bad. […]

At Facebook, we’ve ran into so many issues with name conflicts that we had to do something about it. […]

If I just started by introducing CSS in JS, you would probably have just dismissed it as me being crazy. It’s super important for you to have an idea of all the hacks we had to do on-top of CSS to just make it work.

Until you get deep into the problems of CSS, it sounds crazy to seemingly obliterate the separation of concerns for design and markup. When I first started learning web design, using Ian Lloyd’s excellent book Build Your Own Website The Right Way Using HTML & CSS, I became a firm believer in having all CSS reside in .css files, not as inline styling. Even though putting CSS inside of JavaScript isn’t really the same as this at all, it feels like it is at first blush, and so it’s instinctually off-putting. Christopher knows it, too:

Before we go to the next slide, I want you to take a moment and forget everything you know about web development.

Keep an open mind

He makes a water-tight argument that on a big project involving a lot of CSS — too much CSS to compile to a single file or a single web page — very serious problems arise when you try to maintain this so-called separation of concerns.

It turns out that if you write your styles in JS, a large class of really hard problems with CSS just disappear instantly.

I recommend going through the whole slideshow and really thinking this through.

Jon Yau on Spending 250K for a Startup Domain

Jon Yau, writing at Medium:

Well, Honey there’s this really cool domain name for sale. It’s only $250,000” I blurted, finally.

“A domain name. Two hundred and fifty thousand dollars.” almost parodying.

“This is my mid-life crisis.
I don’t want an affair. I don’t want a fancy car.”

“I want to do a web startup.”

This article is more than a year ago, but it was recently featured in my Medium feed. At first I thought the entire story was made up because it’s so bizarre. It became even stranger when I realized that this is a true narrative of how StockPhoto.com came into existence. Jon’s article is mostly bedside one-liners interspaced with GIFs, giving startup advice that is very unconventional.

I know the stuff on Shutterstock sells. And I also know that the “Stockphoto.com” domain name is going to bring me web traffic from the get-go.

So if I was able to source the same images currently selling on Shutterstock and all the other stock photo marketplaces, and assuming I price them roughly the same as those other websites, and all other things being equal then I should be able to sell them to the visitors coming to Stockphoto.com.

This is not advice I would give to anyone who is thinking of creating an online startup. Instead, here’s the advice I would give:

Don’t waste too much time on picking a perfect name for your product. It doesn’t matter very much.

Very bizarre.

Benchmarking localStorage

Alexandre Morgaut, writing at Quora:

localStorage (as sessionStorage) is synchronous in the sense that it is a virtually blocking API. When an instruction saving data in localStorage is executed, the next instruction in the script will only be executed once the data is (somehow) saved.

Since localStorage is synchronous, maintaining optimal performance to its read and write is really important, especially if localStorage has an important role within your application. About a month ago,1 I was interested in finding out whether it made sense to consolidate all of a site’s localStorage objects into a single master object that was then read once and kept in a JavaScript variable for the lifetime of the page. I tested this idea by creating a bunch of small objects, saving them to localStorage, reading them all back, and then comparing this to doing the exact same process with fewer, larger objects. The numbers I went with were one thousand 100-byte items and ten 10,000-byte items. Here’s what the code looked like for this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
let test = (numBlocks, byteSze) => {
	let bytes = '';
	for (let i = 0; i < byteSze; i++) {
		bytes += 'a';
	}
	for (let i = 0; i < numBlocks; i++) {
		localStorage.setItem(`test${i}`, bytes);
	}
	for (let i = 0; i < numBlocks; i++) {
		localStorage.getItem(`test${i}`);
	}
}
test(1000, 100);
localStorage.clear();
test(10, 10000);
localStorage.clear();

To keep the result skewing minimal, I found that it was helpful to run the first data set and then reload the browser before running the second data set. I used Chrome’s profiling tool to get the exact timeframe of how long each of these took. Since both took mere milliseconds and other processes got CPU clock time, I ran each test a few times to get an accurate idea of their duration under a normal load. It took approximately ten milliseconds to run the first test and one millisecond to run the second test.

The conclusion is simple. If you have the choice of storing ten items in localStorage separately versus in an aggregated object, the latter is a better idea from a performance standpoint. You’d probably intuitively guess that to be the case, but it’s good to have cold numbers as confirmation.

Here’s a gist that outlines my findings, complete with screenshots.

  1. The reason I’m just now getting around to writing about this is because while it was exciting researching this, publishing my findings has proven to be much harder than moving on to the next shiny thing. ↩︎

CodeMyViews.com’s Novel Approach to Job Applications

If you go to CodeMyViews.com and click on “Jobs” in the footer, you get this JavaScript alert box:

Welcome to step 1 of the Code My Views Inc. team member interview. We are delighted to see you are interested in working with us. To get to step 2 of the developer interview, please view your developer console in the browser. If you don’t know what that is then I bet google will be able to tell you!

The open console reveals this:1

Congrats! You made it to step 2. To get to step 3, run this JavaScript function in the developer console: getStep3(yourEmailHere)

Running getStep3('<email>'); outputs this:2

“Great job, <email>. In a perfect world, we would have finished this JS so that it sent us an email when you made it this far. Unfortunately, we ran out of time. As the first part of your job application, in less than 3 sentences, explain how you would make the getStep3() functional so that it sends me an email notification. Email your answer to: <email>.”

This is so cool. The solution, of course, is to override the console.log() function so you can capture user input (Code My Views is already doing this part, actually, in order to print back to you the email address you entered). Then you have to hit a callback URL via Ajax with the user-specified email address. This callback URL then triggers an email notification to the proper recipient.3 This would be the one and only time I can think of that a promise callback printing “success” to the console would be acceptable as production code.4

Code My Views’s novel approach to job hiring is reminiscent of Max Rosett’s story on how Google used its search engine to recruit him. It’s really cool seeing companies get creative like this.

Quite a stack that CodeMyViews is using on its homepage, by the way: jQuery, Webpack, VueJS, Lodash, SumoMe, and my favorite, Drip.

  1. Clicking the “Jobs” link is what logs this message to the console, but until I looked at the code for it, the act of opening the console felt like the event that triggers the log. ↩︎

  2. I’m changing out the email addresses in this example to <email> placeholders for privacy’s sake. ↩︎

  3. I’m taking more than “less than 3 sentences” to describe the solution, but I have the luxury of writing a blog post, not submitting an application. ↩︎

  4. Just imagine the code for this feature. We can only speculate, but I like to think it has to include a lint override comment since their lint configuration doesn’t approve of console.log statements by default. ↩︎

Dan Abramov: “You might not need Redux”

Lately I’ve spent a lot of time studying Redux. It’s an incredible library. The concept of a Single Source of Truth is very appealing. It solves a lot of common problems. Unfortunately, it also brings a lot of boilerplate code and new concepts that have to be repeatedly implemented. Last Monday in his Medium piece You Might Not Need Redux, Dan gave us permission to feel okay about not using Redux if it isn’t a good fit:

Local state is fine.

The tradeoff that Redux offers is to add indirection to decouple “what happened” from “how things change”.

Is it always a good thing to do? No. It’s a tradeoff.

I’ll continue to use Redux in projects, but this has helped me get away from the mindset that if you’re using React, you must be using Redux too. The one does not mandate the other. Sometimes it can be very nice, but it’s not requisite.

Thanks Dan. It’s a mark of brilliance to write the library that you did. It’s a mark of maturity to let us know when not to use the library you built. You have avoided the Law of the instrument.

As I’ve written before, one of the best ways to instill trust in people is to tell them when your thing should not be used. The idea that the world is dysfunctional without your widget can blind reality and make you look egotistical. Instead, Dan has positioned Redux as a great tool when the job is right.

John Gruber Reviews the iPhones 7

At DaringFireball this morning, Gruber published his review of the new iPhones 7 that will hit retail this Friday. It’s a lengthy review but very well thought out, and I recommend reading it in its entirety.

Regarding the home button no longer being a physically pushable button, John observes that it’s likely due to the fact that so many iPhone users in Asia and elsewhere are loath to use the button because it’s considered breakable since it’s a moving part.

I think Apple designed this no-click button in the hopes that it will get these people to use the home button as intended. But now we’re all stuck with a button that doesn’t feel as good. […]

It’s a minor tragedy if I’m right that this is why Apple has made the home button worse for the rest of us […]

Something I’ve noticed about Apple, though, is that it often has more than one reason for making a product decision such as this one. I think Gruber’s onto something, but I can’t help wonder if there’s more to it than this. In a MacRumors article that John linked to, we read:

Apple has been working on developing touch and display driver integration (TDDI) chips since 2015, which would let the Touch ID fingerprint recognition system be embedded directly into the display, allowing for the elimination of the Home button.

I’m not sure that we’ll be seeing the home button go away completely in next year’s iPhone. It does sound plausible, however, that the next iPhone will have a screen that goes edge to edge. You wouldn’t want a physical button on something like that. Even if it were technologically possible, it wouldn’t make any sense. Apple is beginning the transition to the 2017 iPhone with this new home button in the iPhones 7. I suspect Asia has something to do with this change, but I think next year’s new iPhone has a lot to do with it — I daresay it’s the primary reason.

Regarding whether to get the iPhone 7 or the iPhone 7 Plus, Gruber nails it:

It all comes down to the camera. And the camera decision all comes down to Portrait mode. And Portrait mode isn’t available yet.

If Portrait mode had been bundled in the initial release of iOS 10, I might have preordered an iPhone 7 Plus. A few months isn’t that big of a deal after the fact, but it sure feels that way at the time.

This is outside the scope of Gruber’s article but there’s another problem with the Plus model. Not only is its software going to take a couple months to be fully realized, but the device itself is hard to get right now. Several of us got up Friday at midnight PDT1 and tried to order the iPhone 7 Plus with no luck. The online Apple Store opened its doors somewhere around 12:10 AM2 and the Plus models became unavailable just a few minutes afterwards. There was a window of fewer than 5 minutes in which you could preorder an iPhone 7 Plus. It will be weeks or possibly months before it becomes available to everyone. That’s actually a real problem if you’re on Apple’s iPhone Upgrade Program. With this program, you cannot upgrade to the new iPhone until you’ve made 12 payments on your current one. In other words, if you pick up the iPhone 7 Plus two weeks after it initially hits retail, you’ll have to either wait two weeks after next year’s iPhone hits retail in order to get it, or you’ll have to make an extra arbitrary payment. It would only be $40, give or take, but it’d be a real nuisance. There’s no way I’m doing that. Because Apple has such low availability of the Plus model compared to its demand, it doesn’t make sense using the iPhone Upgrade Program to buy it if you’re wanting the new iPhone each year as soon as it comes out. You’re better off paying cash for it and then selling it a month before the new one is announced, which gets messy.

  1. Since midnight is the start of the day, that’s 12:00 AM PDT. ↩︎

  2. Apple has launched iPhones before. It confuses me that it doesn’t have a deploy process that’s timed closer to the stroke of midnight. If your deploy process takes 10 minutes, you start at 11:50 PM, not 12:00 AM. ↩︎