12/9/14

5 Tools to Protect Your Online Privacy

Companies may know you better than you think. According to an FTC study, brokers regularly collect an individual's personal data based on their online activity. They can find out your Social Security number, how you pay for things, your children's ages and even the kind of vacations you take. It's no wonder you're worried about your privacy! Fortunately, by using the right tools to protect yourself online you can decrease the chances of having your data sold to brokers and keep your personal information private.

shutterstock_204851182

Browsing

What we search for on Google reveals a lot about us. Its privacy policy states, "We may share aggregates, non-personally identifiable information publicly and with our partners like publishers advertisers or connected sites." Since not everyone wants their ads tailored to their search history, it's possible to use alternative browsers like Tor, which lets you browse the web anonymously. Tor protects your privacy by defending you against network surveillance and traffic analysis and is available for Windows, Mac and Linux. Additionally, if you'd like to keep using your current browser you can turn off cookies to prevent websites from tracking your preferences.

Online Shopping

You'll want to have tools at your disposable that can keep your identity protected, especially if your plans for Christmas shopping involve a credit card and your computer. The holiday season is prime time for hackers. Keep your finances safe while shopping online with Lifelock's online protection services. The company states that they'll spend up to one million dollars to recover your identity should it be compromised. Plus, Lifelock is free with an AOL subscription. Don't wait until it's too late. Take proactive measures to keep your personal information away from prying eyes.

Chatting

Just because you're being careful about your online privacy, doesn't mean others are as conscientious. Keep your video chats and messages private with Cryptocat. This app encrypts your chat conversations before they leave your computer to ensure the information doesn't fall into the wrong hands. You can also send files and connect to Facebook Messenger to keep your Facebook conversations off-the-record. And when you're interested in sending self-destructing messages, Burn Note is the answer. This service can be used through an app or website and keeps messages from lingering on someone else's device with a deletion time you set before hitting send.

Playing Games

Social online games are becoming as popular as PC and console games, reports a 2014 study conducted by Big Fish Games. However, the rise in online gaming brings certain privacy concerns along with it. Keep your information private while gaming by doing your research beforehand. PrivacyFix is an online privacy dashboard that lets you know which settings you need to fix to keep your data invisible, shows you which companies are tracking your online activities and informs you of any changes. For instance, if you're using the Candy Crush app and its policy changes, PrivacyFix will let you know if your privacy has been put at risk.

Social Networking

The following was taken directly from Facebook's privacy policy, "Sometimes we get data from our affiliates or our advertising partners, customers and other third parties that helps us (or them) deliver ads, understand online activity, and generally make Facebook better." For many this is a big price to pay to stay connected with friends and family. Solve this conundrum by opting for other methods with stricter privacy restrictions. For example, Diaspora lets users own and control their own personal data through its free personal web server. You can create a "pod" that hosts social networking services (Facebook, Twitter, Tumblr and WordPress), all without having to sacrifice your personal information.

12/3/14

A Lesson about History,Classes, Time and Python

Object Oriented Programming (OOP) became very popular in the last couple of decades. I do find that a lot of people can tell me what an Object is, but few know what is the difference between a class and Object. In fact, many use them interchangeably. So let us clear the air a bit. Here is a short nice story about the evolution of programming. Sort of.

In the dawn of programming we had variables. For a time it was good. Char, Int, Sting, Float all run along nicely. For us programmers that was not enough. We like to make life more complex than that. So we start writing code. A lot of code. Code that uses a lot of variables. As programmers, we love looking for patterns. Slowly we found one. We are writing the same code, over and over. Now, we the coders are a lazy bunch. We like to be challenged, not to write the same lines of code again and agin. So, we came up with the notion of functions. Function are in fact awesome!. for a long time, one could do anything with a few variables and functions. Not to long after, we found ourself copying entire library of functions and files were getting really big. then we came up with the idea of modules, or libraries if you will. How awesome is it to import a whole battery of functions at your finger tips? Most programmers thought this was the best thing since slice bread. Not the we were around back then. After a while, we thought, you know what, how about we put the data (variables) and the methods (functions) together (encapsulation) and use it as one thing, lets call it an object. Yay! Objects.

This of course is a very short description of what actually happy. Hopefully you go the point. So what are objects? They are instantiation (from the word instants) of Classes with particular attributes and behaviors. Attributes refer to the object variables, behaviors to it’s functions. In most cases, but not all, the behaviors involve the attributes. Classes are the code, the recipe for an Object. 1 Class can produces as many Objects as you computer memory can hold. Having the attributes and behaviors together gives a sense of encapsulation. In OOP, the Object attributes are accessed using getters and setters (Access Modifiers). Getters retrieve a copy of the attribute. Setter overwrite the attributes. Setters and Getters are behaviors that help keep the information help by the Object correct. That means that if there is and attribute of a class that has to be a number between 0 and 10. The setter will not allow any other value to be stored. OOP gives us a sense of abstraction since we normally can’t see the code, but we don’t need to. There are a couple of more terms you should hear for now, inheritance and polymorphism. Inheritance means a class can be extended by another class to enhance functionality. Polymorphism means “of many forms”. This applies to OOP since we can have man ors of a single class.

Wow that was a lot to take in all at once. It is time for an example. What better language to use then our favorite, Python. Yay.

We are going to work on a time module that could be helpful for future programs. we are going to start from our basic class, an instant. For our purposes, an instant of time is date and time up to minute accuracy. That means that we are going to write a class, in Python, for an instant. We will have a date (year, month, day) and hour (hour, minute) as our class attributes. To set this up will have to use some special syntax. It will look like this:


class Instant:

	def __init__(self,year,month,day,hour,minute):
		self.year = year
		self.month = month
		self.day = day
		self.hour = hour
		self.minute = minute

Ok. We start with the keyword class, followed by the class name. then we define a function named __init__. This is a special function called a constructor. This function has to be in every class in order to create an object. It is only called once to set the Object up. As the function arguments we pass in self and the reminder of the variables we want to pass in to set the Object up. Some leagues allow multiple constructors. Python does not. We will pass self from this point to every function in the class, so that they can have access to the Objects attributes. Note that self.year is not the same as year. Self.year is the class variable, while year is a function variable.

To use this class, or to get an object, we can use the following code:


def main():

	i = Instant(2014,12,3,2,11)
	print i

if __name__== "__main__":
	main()

If you run it, you will get something that looks like this:

wpid-instantclasspython-2014-12-3-01-39.png

That number is a memory location where our object is stored. If we crated more Object they all will have different hex memory addresses. This is useful to know but not ver particle. If we want to debug or do anything we will need to print out the individual attributes within the class. Thankfully, there is a special function we can write called a to-string. It is noted in Python __str__ and will be called when asked to print the object. For our example the code will look like this:


def __str__(self):
	return  "Year: " + str(self.year) + " " + \
	   	   "Month: " + str(self.month) + " " + \
		   "Day: " + str(self.day) + " " + \
		   "Hour: " + str(self.hour) + " " + \
		   "Minute: " + str(self.minute)

And the output (for the same main() function from before):

wpid-instantstrpython-2014-12-3-01-39.png

You could be fancy and change the function to return something else like:

wpid-instantstrpython2-2014-12-3-01-39.png

if you really want you could play around with colors and strings in Python all that you want, but that is not the point. Now we are going to add some getters and setters. Getters are easy, the just retrieve information, so a getter for year looks like this:


def getYear(self):
	return self.year

We define getters to avoid direct access to class attributes. However, if we go back to out main we can issue a command ‘print i.year’ without an error. In order to avoid that we will add 2 underscores to the attribute name in the constructor. That will make the attribute private so only within the class using self.year we can access thee variable. So our new constructor will look like this:


def __init__(self,year,month,day,hour,minute):
	self.__year = year
	self.__month = month
	self.__day = day
	self.__hour = hour
	self.__minute = minute

And our getter will look like this:


def getYear(self):
	return self.__year

And if we wanted to print just the year, we would use it like this:


i.getYear()

Ideally, we would have a getter for every attribute in the class. That is not a must, just a friendly suggestion. Now we can move to the setters. In a setter, we will put a new value in the Object attribute. We could start with a simple method like this:


def setYear(self,year):
	self.__year = year 

This would work. However, normally it is a good idea to check what the user is putting as a year. In Python, variables do not have a declared type. That means that a user can end up passing in something like a String, Boolean or another Object for all we now. In addition, even if the user entered a number, what if it is a negative number? for our purposes, we are going to say that a year must be between 1900 and 2100. So our new setter will look like this:


def setYear(self,year):
	if not ((type(year) != type(2000)) or (year < 1900) or (year > 2100)):
		self.__year = year 

If you were following along you would notice a problem. When we first set self.year we never checked that the value of year upholds the setter standards. In order to correct this we would need to modify our constructor to do the same check. This does get tricky, but it is necessary to maintain the integrity f the Object data. We will modify our constructor set year line to look now like this:


if not ((type(year) != type(2000)) or (year < 1900) or (year > 2100)): self.__year = year
else: raise Exception('Year is not in correct format or out of range')

This means that for each variable we will need to similar work an add a getter and setter. Assuming we got all this done we could move forward. There are 3 more function we will want to added to our instant class:

  1. beforeMe
  2. afterMe
  3. addToMe

The first 2 functions are booleans that take another instant and compare the 2 to see if the other instant is before the current one. Similar idea with afterMe. The method add to me, will take a quantity and add it to instant. Lets take a look at the functions beforeMe and afterMe:

def beforeMe(self,other):
	if self.__year > other.getYear():
		return False
	elif self.__year == other.getYear():
		if self.__month > other.getMonth():
			return False
		elif self.__month == other.getMonth():
			if self.__day > other.getDay():
				return False
			elif self.__day == other.getDay():
				if self.__hour > other.getHour():
					return False
				elif self.__hour == other.getHour():
					if self.__minute > other.getMinute():
						return False
	return True

def afterMe(self,other):
	return not self.beforeMe(other)

I did get a little laze. I could have re-wrttien afterMe as a reverse to beforeMe, this seemed smoother to me. This function really should be straight forward. Lets move on to the next one. In the next one, we can add X minutes to an instant. That is cool and useful because it does require a little math. Let us first take a look at how this is done:


def add(self,min):
	if type(min) != type(1): raise Exception("Invalid minutes to add")
		self.__minute += min
		if self.__minute > 60:
			self.__hour += self.__minute / 60
			self.__minute = self.__minute % 60
			if self.__hour > 24:
				self.__day += self.__hour / 24
				self.__hour = self.__hour % 24
				if self.__day > 30:
					self.__month += self.__day / 30
					self.__day = self.__day % 30
					if self.__month > 12:
						self.__year += self.__month / 12
						self.__month = self.__month % 12

Do note that at this point I am making a lot of assumptions. I did not account for leap years and odd months. This function should be re-wrriten better, but for our sake right now it serves it’s purpose. So after all this is said and done, we should end up with a very interesting class that represents and instant, or a moment if you will in time. That class could be used to create many Objects. Even objects that interact with each other since we can compare 2 instants using the beofreMe and afterMe functions. Maybe next time we can extend this class to be used for a TimePeriod and maybe even a meeting in a schedule book.

Here is a link to the complete instant class in Python in case you want to play around with it.

11/18/14

Diffie-Hellman Key Exchange Video

09/25/14

Future Technology: What Will Sci-Fi Predict Next?

There is a Nostradamus in every Hollywood science fiction movie script writer. Many times, a new invention of technology was first seen on the big screen. From Jane Fonda's sexy space action heroine film "Barbarella" to Tom Cruise's cop-gone-rogue "Minority Report," movies have given us a glimpse of what lies ahead for technology advancement. Here are just a few inventions that sci-fi movies predicted:

 

Touch The Future

 

Barbarella (1968): Skype

A cult classic, "Barbarella," a sexy, blonde space heroine played by Jane Fonda, sets out to stop the evil Durand-Durand (not to be confused with the evil '80s band Duran Duran) from upsetting the peace within the galaxy. In one of the first scenes of the movie—well, if you can focus your eyes off the very lightly dressed Barbarella—you'll see her furry-coated pad is equipped with a flatscreen TV that has the technology of two-way video feed, or what we know today as Skype.

Her flatscreen is unique, however, in that a Roman-style female statue is holding up the circular screen. When Barbarella gets an incoming video chat from the President of Earth, the arm of the statue opens up to make the screen bigger. And, even more futuristic, Barbarella's screen is double-sided so she can carry on the conversation from either side of the screen. We have yet to see that kind of technology, but maybe soon.

Flash Gordon (1980): Drones

When we were watching the football stud turned galactic hero Flash Gordon, played by Sam J. Jones, saving Earth and the universe, there was a scene where a lizard-like man tries to escape the confines of Emperor Ming's (Max von Sydow) palace-like spaceship. But, thwarting his escape was a flying robot that disintegrated the poor captive to oblivion. This was an introduction to drones, which instead of disintegrating us, now deliver mail to our doors.

We now live in a world where drones can accurately deliver a bomb—or mail, if you will—to our front doors. However, until drones are capable of not falling out of the sky because of a malfunction (which is an issue for the U.S. Government to deal with for military and public use), the threat of them showing up at your door to disintegrate you with a death ray is minimal.

Back to the Future II (1989): Wearable Tech

Here we thought Marty McFly in "Back to the Future II" looked a little ridiculous wearing those funky futuristic glasses. Those glasses provided him information and entertainment, which are now a reality for tech-savvy consumers investing in Google Glass. These glasses tap them into the Internet, GPS and stored music and videos. In fact, the movie predicted Google Glass' arrival almost to the exact year. The hands-free device became available this spring, whereas "Back to the Future" was set in the year 2015. Not bad.

While they arguably still look as funky on people now as they did on Marty McFly and are still a bit steep in the price, Google Glass is steadily improving its worth in the business aspect. For example, with the Skylight app, medical experts wearing Google Glass can allow students or other viewers to see what they see when assessing the status of a patient. The app Augmedix also is a helpful app through Google Glass, which allows doctors to record data into electronic medical records during a health exam.

Gattica (1997): Genetic Testing

In 1997, Ethan Hawke's character in "Gattica," Vincent Freeman, showed us the possibility of getting to know oneself better on a genetic scale. Today, the technology exists to allow a person to study and explore one's genes with at-home kits. With this technology, you can find a weight-loss plan that matches your genetic pattern or identify certain genetic flags that may hint to your vulnerability of heart disease or inflammation. In the film, Freeman assumes another person's identity using genetic technology, however, it's still illegal to do so, just like in the movie.

Minority Report (2002): Touch Interface

"Minority Report" is one sci-fi movie that shows a myriad of tech advances. One piece of technology that is now in our hands is touch interface. Seen throughout the movie, starring Tom Cruise, touch screens now are a staple with mobile phones, tablets and even PC screens. Oblong Industries, which helped set up the slick, futuristic glass touch screens seen in the movie, have technology that we can use now, which allows us to share data from one device to another with little to no effort. Using a combination of screens and motion sensors, data can be retrieved, displayed and moved through a high-speed network much like Cruise's character in the movie.

While these movies displayed unimaginable pieces of technology, the reality is that they are here. So what will science fiction predict that will be seen in our futures?

08/13/14

RIP Robin Williams, You will be missed.


robinwilliams

07/23/14

3 Great Mechanical Achievements and Their Modern-Day Successors

When humans first chiseled the wheel or learned to make fire, they probably didn't know the depth of their accomplishment. Through the goggles of time, we can see how these achievements have changed the face of humankind. Now we keep an eye on these things, predicting the outcomes of current astounding technological feats.

Integrated Circuit and Quantum Computer

In one of the original "Star Trek" episodes, Bones leaves a piece of equipment on a very impressionable planet. He is chastised by Kirk and Spock because this culture will take apart the device and learn about the one piece of technology that changed the Star Trek world and led to space travel. Our one piece of world-changing technology is the integrated circuit. The integrated circuit is a series of transistors, resistors and capacitors in a circuit to perform some operation. Specifically, it is the transistor, which replaced the vacuum tube, that is the most astounding.

Essentially, a transistor is a switch that goes from on to off. This simple switch is the basis for the central processing unit of a computer. Processor speed is distinguished by the rapidity that the transistors can toggle from the zero position to the one position. Since the beginning of the transistor, scientists have tried to make the toggle speed faster. Now the quantum switch seems to be a possibility. Since quantum leaps happen instantaneously, a computer using a quantum processor would be several orders of magnitude faster than our fastest computers.

 

shutterstock_201057722

 

Internal Combustion and Hydrogen Engine

The internal combustion engine is touted by The Atlantic as one of the 50 greatest engineering achievements of the modern age. Like the Internet years later, the combustion engine placed into automobiles transformed our culture, making the world smaller. The auto allowed us to sprawl without worrying for our jobs or our families. We are always a car ride away.

Automobiles have taken a special place in our society. No longer simply functional, the auto is our safety and our luxury. Now, we're in a position to move away from fossil-fueled cars toward renewable energy cars. On the horizon is the hydrogen engine. Still an internal combustion engine, the hydrogen engine uses canisters of hydrogen gas that react with oxygen to produce energy (and the byproduct water).

O-ring and Nano-Everything

Who would think that a ring of rubber would change the world? Yet that is what the o-ring did when it was invented in 1936 by Niels Christensen. Primarily an elastomer seal, o-rings are used in everything from the space shuttle to heart valves. Almost anything that needs to direct the flow of fluids has uses an o-ring.

Nanotechnology is the next big step in the o-ring's future. Because it sits at the perimeter of a moving fluid, the o-ring is the perfect substrate for microscopic devices that can measure blood flow, change the shape of the ring or ionize the fluid. If nanotechnology is the way of the future, the o-ring is where is will live.

07/18/14

How Teachers Thinks Homework is Done...

Vs. how we really do it....

 

how_homework_is_done

07/5/14

Autonomous Cars: The Countdown Continues

Self-driving cars are coming. Currently four states — California, Florida Michigan, and Nevada — have passed legislation that enables companies to test their self-driving car technology on the roads. The Washington D.C. DMV published its regulations for autonomous vehicles in April, which are expected to take effect this month barring any objections.

Google unveiled a prototype of its self-driving car on May 27 and plans to use its home state of California as a testing ground. John Simpson, director of the taxpayer advocacy group Consumer Watchdog, recently told the LA Times he's urging the California DMV to postpone the September 16 start date of its regulations by 18 months. The groups believes more testing and public scrutiny is necessary to ensure the safety of the state's 25 million licensed drivers.

Photo by Steve Jurvetson via Wikimedia Commons

A February Harris Interactive poll found that 88 percent of Americans would not feel safe in a self-driving car. But that reality isn't slowing down Google and others who want this futuristic technology to become reality for everyday drivers.

How It All Works

The "face" on Google's self-driving car (the headlights are the eyes and a radar apparatus the nose) is the first thing people will notice about its tiny exterior. But the fact there are absolutely no driver controls, such as a steering wheel and brake pedal, on the interior is what has many consumers worried.

A LIDAR (light detection and ranging) sensor called a Velodyne HDL-64E is mounted to the top of the vehicle. It provides a detailed map of the roads and surrounding environment, right down to potholes and road cones. Google Street View Cars have driven (and continue to drive) virtually every road in the U.S. and several European countries to create these detailed maps, despite lawsuits alleging the company has been simultaneously spying on residents.

There are four radars attached to the front and rear bumpers to detect the speed of cars in front of and behind the vehicle. A video camera is mounted where the rear-view mirror would otherwise be located. It detects the presence of pedestrians, other cars, and even deer running across the street. A GPS unit supplements all the aforementioned technology for further accuracy and safety.

A central computer located near the rear axle of the car then processes all of this information to determine and control steering, acceleration, and braking.

Advantages Outweigh Potential Dangers?

A widely circulated video of Morgan Hill, Calif. resident Steve Mahan "driving" a Google self-driving car to Taco Bell in 2012 was significant because he's 95 percent blind. Not only would driverless cars be a boon for 21 million legally blind Americans, they would also give elderly drivers whose reaction times have diminished more options when researching cars in a few years.

Cab drivers would likely balk at the idea of driverless technology, as drunken drivers would be able to get inebriated and still get home legally without paying a hefty fare. Elliot Garbus, of Intel's Automotive Solutions Division, told USA Today that 95 percent of auto accidents are caused by human error. Google reported in August of 2012 that its test vehicles had successfully driven 300,000 miles without even a fender-bender.

Autonomous cars would also be a blow to municipalities that rely on revenue from speeding tickets. Google reported in May that its self-driving cars have never received a moving violation in any state.

There is no definitive answer as to when consumers will be able to head to a dealership and buy an autonomous car of their own. But based on Google's persistence and diligence, it will likely be sooner rather than later.

07/4/14

Happy & Safe Fourth Everyone

800px-Fourth_of_July_Cake

06/24/14

Use Unix or Die

unix_bomb