Smart Citizens

What I’ve learned?

I didn’t know what smart cities are in the first place. I had and idea, of course, but not too deep. In my Semester I, I learned about E-Government, which is part of Smart Cities.

According to Tech Republic:

A smart city uses IoT sensors and technology to connect components across a city to derive data and improve the lives of citizens and visitors.

Okay. Nice Definition. But what does it mean, exactly? What technology? What components? What data? How does it improve life quality? Does it have risks?

Well, my learnings from this course will allow me to answer these questions…

What technology?

Smart Cities are like a playground for technology. It involves more technology than you can imagine. From E-Government, the classic example of having a mobile application to report incidents in the city.

Clean energy? You name it. Smart cities try to use as much renewable energies as possible. Each day there’s more infrastructure in the cities to support cleaner environments. Even in cities like Guadalajara, you can see many solar panels. I’ve heard of cars generating wind energy just by moving on the highway.

Oh, how not to mention electric bikes projects! These intend to promote the usage of this cleaner option, bikes, and reduce pollution from cars. An example of this, Mi Bici, of course. I talked about the amazing project in Amsterdam in this previous post.

And as weird as it sounds, the impact of smart cities is not only in the cities. Technology is reaching places in the countryside as well, there are farms improving their harvest using technology and it is amazing! This is called Agriculture 4.0.

What else? Cameras and sensors of any type.

What components?

The data retrieved from different sensors in the cities are used for many purposes such as improve public services, security, and very important, accessibility. Nowadays, data is very important and valuable, and for the cities, data helps to identify the most urgent needs and what can be done to solve them.

What data?

An example. We all hate traffic, right? The good thing is that we can take advantage of applications such as Google Maps and Waze, where we can see where’s more traffic, the best routes, car accidents… And this data comes from us, the users, the citizens, I wrote about this in my Data as Commons post.

What risks?

Do I wanna talk about data privacy again? Perhaps you want to check my previous posts of Smart Surveillance, Inverse Surveillance, Data Leaks.

As any other topic, smart cities have their Good, Bad, and Ugly. But I believe the good has more potential. I want to believe that smart citizens can really make a difference to society. And I’m very interested in seeing what can be done here, in Mexico, to improve life quality.

For sure, smart cities require technology. But they also require smart citizens – and smart autorities -. Because, we could have the best technology at the moment, but we also need that people in charge of that technology is really looking for the well being of society, otherwise, smart cities will never reach their main goal.

Data Leak

We’ve seen it. We’ve been victims.

Nowadays, data leaks are a main danger to companies… and users.

Data leakage is the unauthorized transmission of data from within an organization to an external destination or recipient.

You must know, these last few years, big tech companies are in trouble because of data security -or the lack of it -. Last year, Google had to close the not so cool platform Google+, after user data from 52.5 million accounts was exposed. And of course, Facebook  goes from one scandal to another, last year up to 90 million accounts were exposed by a security breach. For these companies, their loss consists of millions of dollars.

But for us, users… What’s the danger? Well, all our personal information is in risk, they could steal our data, we could also be victims of fraud.

And what’s the largest data breach ever seen?

The largest collection of leaked data in history has been posted online by security researcher Troy Hunt, who discovered a dataset comprising more than 772 million email addresses and 21 million passwords in a package of 12,000 files.

If you want to see more of previous data breaches, this is the site you need.

Last but not least, what about me? Have I Been Pwned lets you know if you’ve been part of a data breach. I introduced my email and the result was

Oh no — pwned!

pwned

Then I found the MyFitnessPal data breach on the Techworld most infamous data breaches post…

breachUnderArmour

I recommend to use a Password Manager to have more secure accounts. 😀

Inverse Surveillance

sousveillance

Inverse Surveillance happens when those who are usually watched begin watching their watchers.

The Inverse Surveillance Project was created by Assia Boundaoui, a journalist who grew up in a Muslim Community in Chicago. The project consists of using AI to investigate the FBI records on surveillance. The reason why she started this project is because she, her family, and her community have been watched by the FBI for decades.

Why? Because they are muslims.

This act of surveillance is known as the Vulgar Betrayal. I guess it fits.

I think the violence in surveillance is in the one-way gaze: that they can see you, but you can’t see them.

Mexicans tend to joke about discrimination against latin people in USA, mexicans love to joke about misfortunes. But now let’s think about all the millions of immigrants in the United States. What percentage of them are feeling watched or insecure, just because of their nationality or religion?

Between all this mess, there has to be something good, right? The good thing is that now we have the chance to act as smart citizens. And that’s what Assia is doing: using technology to benefit her community.

We believe strongly open government data and proactive disclosure of public records will create better government transparency and accountability.

I think this is really inspirational for all citizens, because I believe that all of us, at least once, have felt insecure in our community. And this can motivate us and make us think about what we can do with technology in order to solve these kind of problems.

 

Internet Freedom

Times have changed since the introduction of the Internet, specially social media. It has become an indispensable tool for our daily tasks and our main communication channel. Perhabs, ten years ago people used to watch the news on TV, buy newspapers, and send letters (okay, maybe not letters). Now, everything is on the web… Including the government.

Agree to disagree

On the Internet you can share memes, pictures from your last vacation, feelings, ideas, proposals, criticisms, and complaints.

Has become an increasingly important tool through which democracy and human rights activists mobilize and advocate for political, social, and economic reform.

There are plenty of users that decided to speak up and express their dissent. Hence, authorities have implemented ways to filter, monitor, and manipulate the openness of the Internet, they’re taking control of our data.

But, what happens next?

Propaganda and disinformation are increasingly poisoning the digital sphere.

Well, users end up having eternal discussions over some fake news or they don’t speak at all.

Python Unit Testing

Sunday morning, I decided to start this blog post.

So I started watching the course and followed each step.

Python Virtual Environments

I’m doing this course in my Ubuntu machine. I started the tutorial in Windows 10 but… everything is more complicated in Windows for some reason.

I failed creatinv the virtual environment with Python 2.7, but I could do it with Python 3.

First, I installed the python-3-venv dependency. Then I created the virtual environment and activated the source. So, now everything I do is only in the venv.

01

To test it, I installed pytest, I ran the command and it was identified. Then, I deactivated the virtual environment by executing deactivate, I ran pytest againg and the command was not found.

02

Setup pytest in PyCharm

I installed PyCharm Community with the command

sudo snap install pycharm-community --classic

 

I followed the wizard:

  1. Created the project pytest_test
  2. Clicked Next

The IDE created a new Virtual Environment and I decided to continue with it. Next, I created the first failing test.

04

Then, I added pytest to the project by going to Run > Edit Configurations. I clicked on Add New Configuration and I chose the pytest option. I changed the name to Unit Tests and picked the pytest_test.py file in the Target field.

Screenshot from 2019-04-07 19-20-35

Next, I installed pytest in Pycharm using the Terminal.

Screenshot from 2019-04-07 19-27-12

Then, I could run the test by clicking the green play button at the right top of the window. As expected, the test failed.

Screenshot from 2019-04-07 19-27-34

I changed the test and now it passes!

Screenshot from 2019-04-07 19-45-34

On Blogging

Before college, blogging was something almost unknown to me. I started blogging in second semester (I think) in my Introduction to Software Engineering course. Yes, Ken, that was you, thank you.

It took me a while to understand what blogging means, because before that, I would only write essays, summaries, or just take notes. This time, I was asked not only to write about some topic, but to share my thoughts as well. So for me, it consisted of making a free style essay.

** Free Style Essay: To write my opinion about some topic without worrying about giving solid arguments.

At the beginning, I would practically write summaries instead of a real blog, but over time I started to enjoy the whole process of blogging.

First, the part of doing research. I really like this, because I can take a starting point and I go as far a I want. I mean, Internet is huge. Also, I enjoy the fact that I can focus on whatever I want. i.e. If I require to write a post about Data Privacy, I can choose whether to write about ethics or security or innovation.

Then, it’s time to write… I would always start with a draft (Hello from my Visual Studio Code). Just writing down some ideas or whatever comes to my mind. I’ve always enjoyed writing, even though I don’t have much experience, I believe blogging has helped me to improve my writing skills.

I read the post from Ana Rodrigues and I related in many ways. It is hard to start sharing your ideas with the world, somehow you feel exposed. But I believe sharing is the biggest profit you can get from the web.

In case you didn’t know, I’m a great Twitter user. I’ve been using it for 10 years and I could describe it with one sentence:

I thought I was the only one

Same thing with blogging.

Of course, in some occasions I just don’t feel it. It happens when I have to write about something I’m not very interested in and that’s okay too.

I really like blogging and I expect someday I’ll do it as a hobbie and not just for Ken courses 😀

DevOps: GitHub, SSH and keys

Last part I learned how to add new cron jobs to my Linux server. This part, I’m automating pulls from a Github repository.

First, I added the Two Factor Authentication to my Github account. I’m guilty for not doing this before. It’s an easy step to do.

Click on your Avatar -> Settings -> Security

Then you’ll find the option to add the TFA.

devops3_1

Next, I proceeded to add a SSH Key. I’ve done this before on my recent PC (The one with Windows 10 D:), but not on this computer (The one with Ubuntu :D).

All I had to do was type the command

ssh-keygen -t rsa -b 4096 -C "juliapaola97@gmail.com"

Then I added a passphrase and that was it.

devops3_2

Then I added the SSH key on Github. To test it, I cloned the repository I have for the course using SSH:

devops3_3

The repository was successfully cloned.

Automating Pulls

After this configuration, it’s time to automate our pulls. In order to do this, I added a new shell file, automate_pull.sh. The file was the following content:

devops3_5

What it does? It goes to the repository directory and executes a pull.

Now, all we have to do is add a crontab to execute the automate_pull.sh file. We run the command:

crontab -e

Then, just edit the file with the desired configuration. I decided to run the file everyday at midnight:

devops3_4

 

DevOps: Linux Server Setup

This task turned out to be really simple to me. I installed Ubuntu in my computer last semester and I used it for my Semestre i project.

What there was left to do was to set a Node server and the Crontab Files part.

I added a simple server.js file:

devops2_3

To do the Crontab, I only had to follow the steps in the link provided by Ken.

As expected, I didn’t have any file yet. So I used nano to add the ones in the example:

devops2_1

devops2_4

The crontab was succesfully installed.

Blog Week 9

Should this exist?

Perhaps this is the first question people should ask themselves before they start developing something. Nowadays, inventions are all about discovering how far technology can go, specially artificial intelligence related features.

exmachina

A few days ago I was watching the movie Ex-Machina (I can’t help making movie references). The movie is about an IT engineer who built several robots with AI; in order to validate his inventions, he asks another guy to make a Turing Test to one of his robots. A Turing Test is used to test artifical intelligence: does the computer really acts like a human? Is it capable of a real human interaction?

Without going too far with science fiction, I want to emphasize that many invenctions are product of one thing: curiosity. And I get it, maybe that’s how science and technology work. But now we are facing a specific scenario in which technology innovation involves people’s data. That’s when we should think about the benefits and the damage any innovation can make.

Those of us who build technology — and those of us who seek out its life-changing efficiencies — none of us think of ourselves as the villain…

Ethics has to be considered in every development process. When we work with public data, it is important to think about concerns such as security and privacy. And always inform users what their data is used for.

 

References

Blog Week 8

This week’s topic is Data Commons.

What is Data Commons?

Data commons is a way of co-locating data with cloud. It is used for software services and tools with the purpose of analyzing and sharing data with a community.

Data Commons has become essencial in smart cities around the world

Making sure any data about how people move around cities is publicly available…

Waze mobile application is the example described in the post recommended by Ken. What I can conclude from it is that, yes, Waze is a really helpful tool to citizens and the community. It’s kind of a win-win because everyone’s data is useful to many people. But the data commons, in this case, becomes a problem when the data is not only for the public, and it is used for private purposes.

Like I said in previous posts, sharing data benefits many of us, but what happens when the people what «own» (I mean, do they really own it?) the data decide to use it for their own benefit?

References