Subscribe: Holovaty.com
http://www.holovaty.com/rss/
Added By: Feedage Forager Feedage Grade C rated
Language: English
Tags:
american number  american  app  calls  google voice  google  hangouts app  hangouts  it’s  number  phone  voice  you’ll 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Holovaty.com

Holovaty.com



Adrian Holovaty's blog.



Last Build Date: Fri, 29 Apr 2016 14:12:30 -0500

 



The history of ‘this website is well-crafted’ hints

Sun, 27 Dec 2015 08:25:49 -0600

Yesterday I wrote this on Twitter and it got a bunch of love:

Much better. Thanks, Alex!

Hope this helps somebody. And even if it’s not relevant to you, I hope this writeup gets you thinking about new things you can do with service workers!




How to use your U.S. phone number internationally

Tue, 08 Dec 2015 12:08:26 -0600

I recently moved from Chicago to Amsterdam and wanted to keep my American phone number, for two reasons: To be easily reachable by American friends/family, and make free calls to the U.S., while I’m in The Netherlands. To retain possession of the number, so I can port it back to an American phone company when I return to the U.S. The web has some scattered tutorials on this, but nothing to my liking. Here’s how I did it, using Google Voice. Total cost: a one-time $20. (Note: you can do some, or all, of this from the U.S. before you leave. If you wait until you’re abroad, you’ll need to use a VPN for the Google Voice step.) First, create a free Google Voice account. Important note: if you’re already abroad at this point, you’ll need to use a VPN such that your web browser is located on a U.S. connection; otherwise you won’t be able to create a Google Voice account! (If you’re technical, I recommend using Sidestep for the Mac, which simply forwards your web traffic through an SSH server of your choosing.) With that in mind, it’s easiest to do this step when you’re still in the States. Make sure your American SIM card is in your phone. Then, in Google Voice, choose “I want to use my mobile number” and follow the prompts to port your existing number to Google Voice. Their system will call your American number to confirm you own it. (The call lasts only a few seconds, so the exorbitant international roaming charges won’t be too bad.) After you’ve done that, you won’t need the American SIM card anymore. Next, pay Google the one-time $20 porting fee and provide the account information for your American phone number. It will take 24 hours to port into Google Voice, at which point you’ll get an email from Google saying it’s been ported. You’ll likely also get an email from your American phone provider saying your account has been closed. (If you’re still under contract with your American phone provider, you’ll have to pay early termination fees.) Once the Google Voice porting is done, you can set up your phone to send and receive calls using the number. If your phone is running iOS (sorry, I only have an iOS device, but I imagine Android instructions are similar), install the Google Hangouts app. Don’t bother with the Google Voice app — it’s deprecated, apparently. In the Hangouts app, sign into your Google account. You’ll use this app, rather than the native phone app, to make and receive calls with your American number. It took me much time and frustration to realize that, by default, the app allows incoming calls only from numbers you’ve whitelisted. I recommend tweaking the app’s settings so that any phone number can call you — hence mimicing a “real” phone’s behavior. Here’s how to do that: Configure notifications to notify you for any incoming call or SMS. In the “Phone number” settings, switch “Incoming phone calls” and “Messages” on. Change the “Allow calls” setting to allow calls on wifi and cellular. Note that calls will use your cellular data plan whenever you’re not on wifi. Turn on “Sync contacts” to give the Hangouts app access to your contacts’ phone numbers. Another tip: in your phone’s native contact list (which is synced with Hangouts), make sure your American contacts’ phone numbers begin with +1. Example number: “+1 (312) 588-2300.” Otherwise the calls and texts won’t work in Hangouts while you’re out of the country. Once you’ve done these things, you’ll be able to use your American number “normally.” Here’s how: Whenever somebody calls your American number, you’ll get a notification from the Hangouts app. Just slide/tap it to answer the call. Whenever somebody texts your American number, you’ll get a notification from the Hangouts app. You can respond in the app. Whenever you want to call an American number, use the phone dialer (or contacts list) in the Hangouts app. Whenever you want to text an American number, use the Hangouts app. Whenever somebody [...]



iOS 9 problems with web audio

Fri, 18 Sep 2015 13:54:16 -0500

Apple’s new iOS 9 apparently has broken web audio in some situations. Audio no longer plays on Soundslice in iOS 9 Safari, and I’ve seen one other report of this. I’m trying to figure out a solution; let this blog post and comments serve as a repository for fixes/experiments/knowledge.

I suspect Apple has tightened its draconian “Audio can’t be played unless it’s directly initiated by a user interaction” algorithm somehow, but I’m not sure how. If you have any ideas or fixes, please post a comment here, and I will update this post accordingly.

UPDATE, Sept. 19: There’s a workaround! Use touchend or mousedown instead of touchstart to initiate audio playback. See comments below.




Using automated screenshots to test and user interfaces

Mon, 09 Mar 2015 10:00:00 -0500

If you build web sites that use HTML5 or have complex user interfaces, you can make your job easier by adding automated tests. Here’s how I use Python’s little-known Needle library to test various front-end bits of Soundslice. Soundslice is a music-learning web app that renders sheet music and tablature in client-side JavaScript. (Here’s a demo, and here’s an overview.) Two aspects of the site’s front end are particularly hairy and hard to test using conventional methods: The music notation, which is drawn using . Rendering sheet music — the historic term is “engraving” — is a complex process with hundreds of rules and special cases. (See chapter 2.3 in this classic dissertation for an overview.) While some of the calculations can be tested by examining JavaScript data structures, the real meat of it is in the visual display. The user interface, which is highly interactive and dynamic. Soundslice has around a dozen user-togglable interface settings and different behavior depending on device and screen size. For example, a user can enable an animated fretboard, a settings pane, a track-specific settings pane and an audio-source selector — all at the same time, or in different combinations. These elements all interact with each other differently depending on screen size. And there’s an embeddable version, which does the same stuff but with slight interface changes. When I first started building the notation engine, I did all testing manually, by eyeballing. I kept a library of several dozen notation files, each testing a corner case, and my testing process was cumbersome and error-prone. I found myself introducing bugs and inadvertently undoing previous work — all in all, a bad scene. Problem was, I had no idea how to automatically test a element. It’s an opaque thing, just a collection of pixels. Browsers provide an API to retrieve a ’s pixel data, but that’s too low-level for making useful tests. That’s when Julien Phalip told me about Needle. It’s a Python library that takes screenshots of web pages and compares them to previously determined (“baseline”) screenshots, alerting you if anything has changed. It’s perfect for an opaque thing like that can’t otherwise easily be tested. Here’s how I’m using it. I wrote a bunch of Python unit tests that load various Soundslice pages and interact with them until they’re in proper state for screenshots. (This part of Needle uses Selenium, which lets you simulate mouse clicks, JavaScript calls, etc., from Python.) Then, a simple call to the assertScreenshot() method does the screenshot comparison. Here’s a full example test: from needle.cases import NeedleTestCase from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait class SoundsliceNotationTests(NeedleTestCase): def test_slurs1(self): # Load notation test URL. self.driver.get('http://127.0.0.1:8000/notation-tests/slurs1/') # Wait until
is hidden. # That's how we know the notation is fully loaded. WebDriverWait(self.driver, 10).until(EC.invisibility_of_element_located((By.ID, 'loaderscreen'))) # Grab a screenshot of the element with ID "sheetmusic" # and call it "slurs1_screenshot". If in baseline-saving # mode, this will create slurs1_screenshot.png. Otherwise, # this will assert that the screenshots are identical. self.assertScreenshot('#sheetmusic', 'slurs1_screenshot') The first time I ever ran it, I used the --with-save-baseline option to generate baseline screenshots. From them on, each time I run the tests, Needle regenerates fresh screenshots and compares them to the baseline. If a screenshot fails the assertion, Needle gives you both screenshots, so you can eyeball the differences — [...]