Hello TrafficFlow

I am interested in machine learning.  I’ve finished most of the Udacity “Intro to Machine Learning Course”.  I’ve been thinking of ways to get my feet wet in machine learning.  A practical project that I can start and finish that will give me some hands on experience.

Hello TrafficFlow (Traffic + TensorFlow)

I-40 at Wade Avenue in Raleigh, North Carolina

I’ve built an Android app, Traffcams, that lets people view traffic images from traffic cameras.  I’ve done the TensorFlow tutorial walking through image recognition.  So I’m thinking that I can modify that tutorial to tell me if an image from a traffic camera contains a lot of traffic.  My first step in training a TensorFlow model is collecting the data.  I wrote a Python script that simply saves an image to disk from a given URL.

I have this script cron’d on a Ubuntu server.  It runs every 4 minutes saving an image from this camera, which means I’ll save 360 images per day.  I’ll probably throw away the night pictures (sunset to sunrise is about 8 hours)…so I’ll acquire about 240 usable pictures per day.  I’m predicting I’ll need about 2,000 to 3,000 images to train a model.  I’ll play it safe and say I’ll need 3,000 images.  In 12 and a half days, I’ll have enough data to train.

My next step is to manually classify these images as having a lot of traffic (1) or not (0).  Sounds monotonous.

New Android Stuff Part 1 😍

I’m barely into the things that were released or announced at Google I/O 2017.  I’ve already got a list of stuff that I need to watch and review.  It’s really a lot of stuff and it’s only day 1!

What’s New In Android

After watching the Google I/O Keynote, this is normally the video I watch next.

Kotlin is Officially Support for Android Development

I’ve been holding off on doing anything major in Kotlin until it was blessed with official support from the Android team.  Well, I’m out of excuses.  Kotlin is an officially supported language for Android development.  It’s necessary dependencies and plugins are being integrated into Android Studio, beginning with version 3.0.

Kotlin and Android | Android Developers

New Android Studio Profilers

There are a ton of re-designed profilers for CPU, memory, and network operations in Android Studio 3.0.  I’ll let the pictures do the talking (all taken from Android Developers).

I’m especially pumped about the network profiler!

Android Studio 3.0 Canary 1 | Android Developers

Android O Beta

The next version of the Android O Beta was released today.  If you have a Nexus 5X, 6P, Pixel, Pixel XL, Nexus Player, or Pixel C, you can enroll your device at android.com/beta.  I’ve been using it for a few hours.   The only issues I’ve seen are Android Pay doesn’t work (it politely lets you know with a splash screen) and the Google Play Music playback notification just re-appears from time to time.

Android O Developer Preview | Android Developers

Android Architecture Components

The Android team has started putting together new tools and guidelines to help Android developers properly architect their app to prevent memory leaks, make lifecycle management easier (!), and reduce boiler plate code.

A new SQLite object mapper from the Android team, called Room.

Screenshot from the Architecture Components Talk

 

Android Architecture Components | Android Developers

These are just a few of the things that immediately stood out to me as an Android Developer.  I’m looking forward to doing a deeper dive into all of it.

Traffcams, now serving Georgia and Washington

Beginning today, Traffcams now has traffic cameras from Washington (WSDOT) and Georgia (GDOT).  Traffcams is a powerful app that puts the traffic cameras around you in your hand.  Traffcams now contains over 3,700 traffic cameras in 3 states.  More locations are on the way.

Get Traffcams free, from the Google Play Store today.

Get it on Google Play

A Case for User Data Regulation?

Carole Cadwalladr published a really fascinating piece on disinformation, propaganda, and it’s influence on the Brexit referendum.  An excerpt I found particularly interesting:

Paul and David, another ex-Cambridge Analytica employee, were working at the firm when it introduced mass data-harvesting to its psychological warfare techniques. “It brought psychology, propaganda and technology together in this powerful new way,” David tells me.

And it was Facebook that made it possible. It was from Facebook that Cambridge Analytica obtained its vast dataset in the first place. Earlier, psychologists at Cambridge University harvested Facebook data (legally) for research purposes and published pioneering peer-reviewed work about determining personality traits, political partisanship, sexuality and much more from people’s Facebook “likes”. And SCL/Cambridge Analytica contracted a scientist at the university, Dr Aleksandr Kogan, to harvest new Facebook data. And he did so by paying people to take a personality quiz which also allowed not just their own Facebook profiles to be harvested, but also those of their friends – a process then allowed by the social network.

Facebook was the source of the psychological insights that enabled Cambridge Analytica to target individuals. It was also the mechanism that enabled them to be delivered on a large scale.

There is no one, true Federal policy or law in the United States regulating how companies collect, store, and distribute user data.  There are a handful of regulations that guide the storage and distribution of medical and financial data.  When it comes to the data Facebook, Google, Amazon, and other tech companies collects on their users, it essentially comes down to best practices.  Congress recently prevented the FCC from enforcing privacy regulation that was close to going into effect.  This regulation would have prevented ISP (internet service providers) from selling your user information without consent.

As an observer and participant, I’m sure its a matter of when, not if, with regard to regulation of the tech industry and its handling of user data.  As a software engineer in the tech industry, how user data is collected and protected (from external parties and internal employees) essentially comes down to the culture established by that organization. Some organizations, like Uber, don’t seem to do a good job at this.  As more of our data is, whether voluntarily or involuntarily, is collected and stored in the cloud, it will be a target for hackers and enterprising individuals / organizations looking to exploit that data.  Revelations, like the ones present in the quoted article, reports of companies being hacked, and the exposure of internal user data scandals will increase the desire for some sort of regulation.

Read more at The great British Brexit robbery: how our democracy was hijacked.

$400,000 vs. Optics

Justin Collins, writing in ExtraNewsFeed:

To me, the fact that every president does this is the problem. And it’s not really an Obama problem, but a structural problem, that has existed for years, and completely undermines our confidence in our system of government, where it seems like those involved in “public service,” particularly presidents, can walk away extremely wealthy. And thus, have an incentive to serve the interests of the wealthy and the powerful (who can essentially pay them later) while they are in office. Even the good presidents.

I’m of the opinion that this needs to change, but I’ve had a few competing thoughts on President Barack Obama accepting $400,000 from Cantor Fitzgerald to give a speech.  On one hand, accepting lucrative paid speeches and other opportunities are the things public servants do when leaving office.  As an African-American, is important to me that I leave wealth and a strong legacy to my children because its extremely rare for it to happen for African-Americans.  I imagine President Obama wants to do the same.  On the other hand, the optics are absolutely terrible.  Let the record show, I voted for President Obama in 2008 and 2012.  I often agreed with the direction the country was headed under President Obama, as compared to the previous 8 years under President George Bush.  There’s one area where I think President Obama could have been a lot stronger, prosecuting Wall Street for the crimes that led to the disastrous recession of the late 2000s.

I graduated college in December 2007 with my degree in Computer Engineering, accepted an offer with Sony Ericsson, and began working in January 2008.  The economy was melting down at this precise time.  Lawmakers and President George Bush decided that it was better to bail out the financial industry than let the US economy sink into a deep depression.  In the lead up to the recession, banks were pushing people into subprime mortgages (some using predatory practices) that were being sold financial institutions.  Subprime mortgages are generally risky investments, but home prices were skyrocketing during this time, the upside seemed to be there, at least to Wall Street.  That all came tumbling down when people started to default on their mortgages and home prices began to crater.  As a result, a lot of people lost their homes, and because large portions of the economy were capitalized with borrowed money, a lot of people lost their jobs as it became harder for businesses to borrow money.  The morality of a lot of these investments were suspect at best and criminal at worst, in my opinion.

I was laid off from Sony Ericsson in September 2008, along with 450+ other people.  I believe the layoffs were not a direct consequence of the Wall Street meltdown, but product mismanagement at the highest levels of the company.  With that said, I can understand how easy it would be to blame greed and the criminal-like behavior of Wall Street for your tragic circumstances.  Not only did people lose jobs, but also access to healthcare, homes, retirement funds, etc.  Those who lived through those tumultuous few years have probably lost a lot of confidence in Wall Street and large financial institutions (ex. I do most of my banking at local credit unions now).  When those people, many of whom voted for President Obama, see him accept a $400,000 speaking gig, from Wall Street no less, they feel betrayed.  This betrayal is exacerbated by the fact that Wall Street received a $700 billion dollar bailout and the executives, largely seen as responsible for the collapse, walked away without jail time, under the Obama administration.

I’m sure there are other motivations for criticizing President Obama for accepting the $400,000 speaking gig, but at a time when our elected officials seem disconnected from the reality of everyday Americans and the wealth gap between the top 1% and the rest of us growing , the optics are absolutely terrible for President Obama (with some collateral damage to the Democratic party).  As that wealth gap continues to widen, the system where public servants can massively enrich themselves giving speeches, should probably come to a halt.

On the other hand, it’s rare for African-Americans to be in a position where they can build enough wealth to pass on to the next generation.  When I see it happen, its great because that wealth and legacy can serve as a foundation for generations to come.  It’s life changing.  When I view President Obamas predicament primarily through this lens, it’s hard not to agree with Trevor Noah of the Daily Show.

*Note: I haven’t really written about my politics.  I have a lot of thoughts that I’ve slowly developed over the past 2.5-3 years.  I have tons of “political discussion fragments” scattered throughout my journal.  Social media seems like the place to express my beliefs, but the toxicity and general discourse make that a non-starter for me.  Politics is such a nuanced topic that 140 characters just won’t do it (or a string of 140 character messages, aka a Tweet storm).  I’m especially interested in economic policy, climate change, gerrymandering / voting rights, criminal justice reform, and “Internet” policy.  I hope to write more.

*Note 2: I’m a software engineer so I love writing code.  I rarely write long pieces on non-technical topics.  Excuse my grammar. 😛