Location Privacy on cell phones/mobile devices … iOS and Android

There is a NYTimes article and podcast about location data privacy out yesterday.

They also give some advice about how to make sure you are not sharing more than you think you are. With some instructions for iOS and Android. Unfortunately, the Android instructions are really focused on Android 9, which many people will not have.

Android Steps:

0. Consider giving up and buy an iPhone! I personally buy “fully unlocked iphones” that are refurbished — just make sure it notes it is covered by an Amazon warranty. Apple seems to care more about privacy. They are not an advertising company like Facebook and Google.

1. Make sure you have location sharing and location history turned off in your google account. You can do that via your phone “Settings… Location” or via your google account via the website — https://myaccount.google.com look under “Personal info & privacy … Location sharing” and “Activity controls … Location history”

2. Then, since you probably don’t want to turn off “Location” completely, make sure you have gone thru EVERY app and made sure it is not using location in PERMISSIONS. Here is how to do this in multiple versions of Android.

Best guide I’ve seen for Android 6-9 (Marshmallow, Nougat, Oreo, Pie)
https://www.androidpit.com/how-to-stop-android-apps-accessing-your-location#pie-apps

Some specifics:
Android 7 (Nougat) — https://www.tomsguide.com/us/manage-app-permissions-in-android-nougat,review-4116.html
Android 8 (Oreo) — http://www.tomsguide.com/faq/id-2316485/enable-google-location-reporting-android.html

To check which version you are running, go to Settings and go to the last item “About Phone” and it should tell you.

3. If there IS an app you want to share your location with (like Google Maps or Waze) make sure to QUIT the app when you are not using it — (Click the SQUARE and swipe right on the app)

4. To see actual location requests — go to “Settings … Location” and you will see a list of “Location Requests”

5. As reported, Google also collects location data, obviously (in google maps, and maybe can in android generally?) and uses it (I suppose for targeting ads) but supposedly doesn’t sell it.

Leave a comment

Filed under Uncategorized

EVs

Folks, EVs are definitely going to take over. Even without rebates/tax incentives.

1. Such high MPGe. The Prius Prime (for example) is rated 133 MPGe for 25-30 miles before it has to use the gas engine which gets 52 MPG. And I regularly get 168 MPGe. (The car reports 5.1 KWh/mile and using roughly 33 conversion… that’s 168.) I suppose I should adjust downward to take into account that the charger is not 100% efficient… so that’s maybe why something closer to 133 is more accurate? So that’s roughly 2.5 times more efficient with energy than a standard Prius getting 52 MPG.

2. Easy to offset for green energy. MA for instance already has a great program that automatically charges your credit card a little extra to turn you into 100% wind energy. So now your car is wind powered.

3. Other stuff: Quiet. No gas-station visits. Low-end torque/acceleration from 0-30MPH in traffic.

Leave a comment

Filed under car, erik-green, EVs, green

Fun with lambda calculus in Javascript

I would argue that Computer Science introduction courses should be using Javascript, not Java or Scheme, in many of their introductory courses.
1. Runs in a browser! Nothing to install!
2. Lambda calculus in ES6!
3. One could use the classic text and convert examples to javascript — it would be a good proof of understanding of the Scheme/Lisp.

I guess one could argue which has more real-world applicability — Javascript vs Java, but we all know one could learn either in a few weeks on the job.

EXAMPLE IN SCHEME/LISP from the classic:
Structure and Interpretation of Computer Programs, by Abelson, Sussman, and Sussman

ch1-Z-G-27.gif

(define (inc n) (+ n 1))
(define (identity x) x)
(define (sum term a next b)
  (if (> a b)
      0
      (+ (term a)
         (sum term (next a) next b)))) 

(define (sum-integers a b)
  (sum identity a inc b))

Then we can add up the integers from 1 to 10:

(sum-integers 1 10)

55

HTML HERE: LINK

MY EQUIVALENT JAVASCRIPT (utilizing ES6 “arrow functions”) IN THE CHROME/FIREFOX CONSOLE   (run on codepen)

inc = (x) => ++x;
identity = (x) => x; // for simple test with sum_integers below
sum = (term,a,next,b) => {
  if (a > b) 
    return 0; 
  else 
    return term(a) + sum(term,next(a),next,b); 
}
sum_integers = (a,b) => sum(identity,a,inc,b);
sum_integers(1,10);
55

ENGLISH

sum – a function which takes 4 arguments:
1) term – a lambda function describing how to evaluate each item
2) a – start with
3) next – a lambda function describing how to get to the next value between a and b
4) b – end with

To continue with the example from the STRUCTURES book…

SCHEME/LISP:

We can also define pi-sum in the same way:

(define (pi-sum a b)
  (define (pi-term x)
    (/ 1.0 (* x (+ x 2))))
  (define (pi-next x)
    (+ x 4))
  (sum pi-term a pi-next b))

Using these procedures, we can compute an approximation to pi :

(* 8 (pi-sum 1 1000))
3.139592655589783

JAVASCRIPT:   (run on codepen)

pi_sum = (a,b) => { 
    let pi_term = (x) => 1/(x*(x+2));
    let pi_next = (x) => x+4; 
    return sum(pi_term,a,pi_next,b); 
}
8 * pi_sum(1,1000);
3.139592655589783

Cool! Of course to me the original is being a bit more difficult than it needs to in explaining this concept by
1) obfuscating with the naming of arguments
2) one-liner silliness
3) adding recursion into the mix

But OK. We’ll forgive them! Onward with the javascript!


RELATED ELSEWHERE:
TL;DR – Lambda means “function used as data”

Leave a comment

Filed under programming

Social Media and Variable Ratio Reinforcement Schedules

Why social media is addictive:

“Intermittent reinforcement works better. … 9 of out 10 things in my feed are complete garbage—last week’s newspaper lining the birdcage with the droppings already on it—but then once every two weeks I find out my niece is engaged or my best friend got a great new job or my oldest friend is in town and I should make plans to hang out. And now no matter how full the Facebook feed is of bird droppings I still have to keep going back.”
Joel Spolsky

“It’s a social-validation feedback loop … exactly the kind of thing that a hacker like myself would come up with, because you’re exploiting a vulnerability in human psychology.”
Sean Parker, first president of Facebook

“[I]f you are addicted to social media, you are not just weak willed. Console yourself by realising that you are instead a pigeon, in a box, pecking at a lever interminably.”
B.F. Skinner Likes Your F.B. Status

“Variable ratio: rapid, steady rate of responding; most resistant to extinction.”
Operant Conditioning: “Reinforcement”, Wikipedia

Leave a comment

Filed under social media

Erik’s coding/software engineering links for Feb 2018

1. Avoid Else, Return Early
COMPLETELY AGREE! I learned this basic idea from a grad-student teaching Freshman CS201 Pascal in 1988

2. Ranking in SQL using self-joins is a silly solution O(n^2) LINK

3. Cool SQL solutions to “top N per group” issue

4. Organization skills beat algorithmic wizardry

5. You’re scaling your app too early

6. RAM is cheaper than software engineers
“given sufficient RAM that it never has to go to disk. I’m hoping that it will run fast enough that my friend won’t have to pay his contract programmer to improve the performance.”

7. What goes into a good job ladder

8. “Most of the “methodology” issues in today’s software engineering/development industry were solved decades ago by practitioners of systems engineering while building rockets, etc. Good resources: http://www.incose.org‘s Systems Engineering Body of Knowledge, NASA’s Systems Engineering Handbook, MIT’s Systems Engineering Fundamentals.”

Leave a comment

Filed under programming

Finding a builder or contractor

LINK: http://www.greenbuildingadvisor.com/blogs/dept/qa-spotlight/fixing-poorly-insulated-roof

“Local builders aren’t getting it

Butson says the local builders he’s contacted haven’t been of much help.

“More broadly, I am slowly coming to terms with the fact that I will have to do most of the engineering work for this renovation,” he says. “I have hired an architect who can create plans and construction details for what I want to execute. What I have not been able to find is a builder who seems to understand these issues or possible solutions.”

Butson has spoken to several builders, but they all insist that he will need heating cables.

“I fundamentally disagree with this, but I doubt I will be able to convince them otherwise,” he says, “and even if I do them, I don’t have confidence in their ability to execute the necessary modifications and details.”

For homeowners in search of a builder who is familiar with building science principles, one option, according to Holladay, is to contact a local energy rater certified by RESNET (resnet.us) tor the Building Performance Institute (bpi.org). To find a local energy rater, Butson can use the search function on one or both of these two websites.

“Call up the energy rater and ask for the names of local contractors who understand energy issues, building performance issues, and building science issues,” Holladay says. “Good luck.”

Leave a comment

Filed under erik-green, green

Radon

“The World Health Organization is recommending that the radon
action level be reduced to 2.7 PC/L from the US current standard of 4 PC/L”

Leave a comment

Filed under erik-green, green