Showing posts with label Computer stuff. Show all posts
Showing posts with label Computer stuff. Show all posts

Saturday, June 16, 2018

New job with Google

Ok, I have changed job more than a year ago, so it is not exactly a new job anymore. I have not posted anything on this blog since I left IBM and joined Google in Pittsburgh as Customer Engineer in March 2017. Starting a new job takes a lot of time and the last time I did that was 19 years ago when I joined IBM. This past year and a half with Google have been amazing. I have met many new people and learned a lot of  cool things. If I could go back in time and change anything - I would tell myself to join Google much sooner :-).



View of New York City from the Google office (Noogler training class)
Here are few updates for the period that I missed on this blog.

Most important and saddest event is that my very good friend Yevgeniy Mikhaylyuta had died of cancer. RIP Zhenya... We all love you and will remember forever. You were very special to so many people. There are many ways you contributed to my life, including starting my triathlon passion, overall view on life and science among many other things. Every one of my long runs on weekends are dedicated to you from now on.

Yevgeniy and his wonderful family (I am Santa)
My oldest son Misha graduated high school with honors diploma and went to college to study for graphics designer.

North Allegheny High School class of 2017

Misha became certified Cross Fit Coach and wants to open his own gym. He is 19 now and a couple of months ago took 3rd place in Pittsburgh Cross Fit competition in the open category. To say I was impressed is to say  nothing.
Misha is coaching a CrossFit class
We did many fun trips as a family, including Las Vegas, Dominican, DC, NYC, found new cool places around Pittsburgh, such as this farm.

Horse riding in Pittsburgh

Among other things - I still train every day of the week, but not race as often. In late 2017 did Tough Mudder 10 miles race - that was a ton of fun. Also did Cook forest 65 miler bike ride with Google team.
After finishing Tough Mudder 10 miler
Completed Memorial Day Murph Challenge in 2016, 2017 and 2018. Big THANK YOU to our heroes.
LT. Michael P. Murph
Going forward will try to keep this blog a bit more up to date.


Thursday, January 9, 2014

Parental control software for network access, Windows, Android, iOS


Since I have three boys aged 14, 12 and 7 the issue of time spent on electronic devices is always a hot one. We do have some limits on how much time boys can spend on their computers and iPod's/iPad's/Android's per day, but it has not been an easy thing to enforce. Having a little bit of time during this past Holiday season I did some research and installed few interesting tools to help me manage this issue.

1. Filtering age appropriate content


I wrote about this in my earlier post back in August 2012 "Filtering offensive internet content for your home network". I still use the *free* service provided by OpenDNS and absolutely love it. It is great and works for every device connected to the Internet via my router, including all of the Android devices, iOS devices, laptops, etc. The best thing OpenDNS does not require any configuration on those devices connected to my home network. I only had to configure my router to use OpenDNS as name server once and never touch it again. OpenDNS also has a browser based UI where you can add or remove certain sites to allow or disallow access to those from your home network. Read my post referenced above for more details.

OpenDNS rocks!

2. Network access control

Filtering internet access is not enough and I wanted the ability to be able to completely shut off internet access for certain devices for certain times of the day (or night). Most network routers do not provide this capability and I did not want to have to install anything on each and every device to do so. Besides, Apple parental controls are so lame, you can not much of a parental control type stuff. The solution was quite simple - I bought a wireless network router that came with open source DD-WRT project (Linux based), which allows to set network access restrictions based on rules (time of day, etc.) and apply those restrictions to certain MAC addresses (meaning certain devices). The configuration is very easy and works like a charm. Besides, I can login into my router and change those time restrictions at any time. You can specify all kinds of rules, for instance that certain iPad or laptop can connect to the Internet only between 5pm to 9pm, etc. You can also set limits of bandwidth, filter based on the protocol used, write time based rules (cron jobs) for changing router rules and configuration (it is Linux based after all and you can get an ssh console access to your router OS). I only use time restrictions and none of the other fancy features. I bought Buffalo Router model WZR-600DHP from Amazon for $70. It has two directional antennas and works very well for me (I installed it few months ago). I turned off my Apple Airport router (which dropped connections quite often) and so far this new router is rock solid. By far better choice compared to Apple Airport router.

DD-WRT on Buffalo router rocks!

3. iOS (Apple) parental controls

Apple iPad's/iPods/iPhone's do not have decent parental controls, especially when it comes to limiting screen time. It seems to me Apple is intentionally not allowing any 3rd party developers to build software that will limit daily screen time on iOS based devices. You must root your device and install 3rd party software yourself. This is potentially on my todo list, but my kids accumulated some content on their devices that will not be easy to move to the rooted version of the device. For now - if your kids know the password to their iOS device, there is no easy way for you to control their activities there.

Apple iOS parental control sucks. I wont buy anything iOS based from Apple until they fix it.

4. Android parental controls

I have been using iPhone's for few years and had 4 different versions of iPhone's, but when I switched to Android in late 2012 I was very impressed with it and will never go back to iPhone. Like I said - I wont buy any iOS based devices - because of the lack of parental control features in iOS. Therefore my youngest son got Android based Nexus 7 as this year Christmas gift. For Android, I found this Screen Time Labs application for Android, which can control screen time, application access time, etc. from my own phone. I can control many Android devices and accounts from one place remotely. The app itself is free, but if you want remote control from another Android device, you will pay $3 per month. Developer says they will provide free remote control app for a PC soon.

I have been using this app for over a week now and it works quite well. Allows me to set daily time limit of say 1 hour for certain apps on the device and set allowed hours, which I set from 9am till 9pm. My son can use his hour (or whatever I define) during this time frame. The application allows to limit time for certain apps. I setup time limit for YouTube, Netflix, and Angry Birds type games to a total of 1 hr per day, but allowed 8 hours total for games such as word puzzles, memory games, math games, etc. Once my son uses up his time playing Minecraft and Angry Birds, he then starts doing math, spelling, etc. This is a good thing and is impossible to do with Apple iOS crap (unless you root it).

My next step is to investigate how Qustodio works on Android (read more below).

5. Windows parental controls

All of the PCs in my house are Windows based (I tried Ubuntu several times and kids totally hated it). I tried using free Microsoft Family Safety tool, but it turns out time restriction feature only works for Windows 8, which I do not have. So Microsoft Family Safety tool "went out of the window".

Next I tried Norton Family Safety software. This allows you to setup the time when the user can login into the system (say 6am till 9pm) and overall time spent per day using that login (say 1h 30 min per day or whatever you define). This is very similar to what Android software I described above. Plus you can control, monitor and configure all of this from Norton website and have many accounts and many devices in that control panel. You do not have to be on the local network and can do it remotely from any device that has Internet access. this worked for a few days, but I often have to add extra time, allow new application to be used and make other changes to the policy and the problem with Norton is that half the time their web application for managing those accounts is not working. The website is down and you cant even log into it. Norton software had to be thrown away...

Finally we come to the holy grail of parental control... enter Qustodio! This does everything I need in one package and works perfectly on Windows - at least so far. I removed Windows parental controls and Microsoft Family Safety, removed Norton Family Safety and replaced it with Qustodio. After few days of free trial, I paid $33 for the annual subscription - and it is absolutely worth it. So far the software works perfectly!!! This really is a perfect solution (except it does not do what I need on iOS - nobody can work well on iOS until Apple opens up APIs). Here is what I can do with Qustodio (you can read comprehensive set of features and watch video here):
  • For each Windows user on all of my computers in the household I can setup time schedule when they can and can not login into their account (e.g. user can login between hours of 9am till 9pm)
  • One child may be "linked" to multiple accounts on different devices
  • For those individual users I can define how much screen time can they have during those "open" hours (e.g. between 9am to 9pm user can only use his computer for a total of 2 hours. Once you reach 2 hours the user is logged off automatically). 
  • For each user I can define what programs he can and can not use and also limit the total time for each program (say Office can be used unlimited, but Minecraft only for 30 minutes).
  • I can setup allowed websites to be visited and filter those by category - very similar to OpenDNS - and even better and there is no way for the user to work around these rules. I also get alerts if the user visits certain sites that I do not want them to visit. I can explicitly add or remove certain sites to the rule set for each user individually.
  • I can see reports per user on their screen time across all devices, web browsing history, program use history, etc...
  • I created "Homework" account where I restricted all games, videos, etc., but for this account there is no time restriction. I know kids can do the homework, visit school website and other technology and educational sites, but no junk.
  • For "fun" use each kid has his own account (separate from Homework) and they have 1 hour per day to use that account and play games, watch YouTube, etc.
  • Qustodio has a more features, but there are too many to list here. Visit their website for details.
  • Last, not least - the Qustodio software is very easy to use and can control all devices in your household that you want it to control, but you can leave some devices and/or user accounts alone and Qustodio wont mess with those.
  • One concern is the privacy of the data, but as we all know "big brother" knows everything anyway...
Qustodio rocks big time!!! I would have paid more for this kind of software. I have not tested it on Android just yet, but it supposed to work well on it. Too bad there is nothing they can do on iOS.

TV and cable

We do not have antenna or TV cable in my household. No problem there.

Summary

These are all the "toys" that I use - some of them only for the past several days, some of them much longer. If you know of better ways of doing these things - please let me know. Ultimately I wish I could just write those rules on a piece of paper, put them on the fridge door and have everyone follow those. But it does not work that way. It is very hard to not get distracted when you are online. I grew up without Internet and do not know what I would be like if I had it. I know the best thing is to "talk" to your kids and explain what is the right thing to do - and we do do this, but these additional measures make it easier for parents (and for kids) to follow those rules and form good habits. I think.

Wednesday, January 16, 2013

Tri-Replicator - free app on google app engine

I am lazy and try to avoid doing things that I do not *absolutely* have to do. I guess this is not unlike most people. Especially I do not like doing the same thing twice when I know it could be done once. Where am I going with this you ask?

USA Triathlon runs a winter competition for athletes, but this one is unusual. It is all done via Internet and people compete by entering the amount of swim, bike and run miles they did in training. This is quite funny because in a real race it does not matter how far you ran over the past year, or how much you biked and swam. All that matters is your performance on a race day. This USAT competition is called USAT National Challenge Competition (NCC). The goal is to motivate folks to maintain active lifestyle over cold months of winter. People must enter their training miles into the USA website and can see where they are relative to other athletes.

The problem is that most athletes already enter their miles into the special sites, and the most popular one is Trainingpeaks.com. In fact, I do not even enter my miles manually. I just upload  my workouts right from the Garmin GPS Watch and it automatically adds them to the training log on the trainingpeaks website.

The idea of entering my training miles by hand into yet another website was not very appealing, so I decided to write a program that would automatically copy my data from one website to another. Sounds familiar? Yes, this is what I do for work. I sell IBM WebSphere integration software. The problem I faced with this NCC for the winter could be solved by integrating two websites.

I decided to create a program that would automatically take my data from one site to another. After some further consideration I decided other folks would like to use that too. After all, there are 4,000 plus people participating in this NCC this winter. I am guessing about half of those folks are using trainingpeaks. Assuming 4 minutes per person per day entering data manually into USAT site, times 2,000 people, times 3 months, times 30 days, divided by 60 minutes in 1 hour: 4*2,000*3*30/60=12,000 hours.  WOW. If I made this application available on Dec 1, I could have saved 12,000 hours of triathlete's time (about 6 hours per person for entire winter). This is definitely worth a try!

Here is the final version up and running on the google app engine: https://tri-replicator.appspot.com.




Where to run it?


Since the application had to be available for anyone to use, I needed a runtime environment outside of my home network. After looking around, I decided to use Google App Engine as it offers up to 5 million requests per month for free, supports Java runtime, offers nice Eclipse plugin, etc. Hosting cost would be $0. Nice.

As I was learning specifics of Google App Engine, GWT, etc. I found EXTREMELY useful free online resource - check it out. There are many great tutorials - very well written, all work and get you started very quickly.


How to access sites?

Trainingpeaks.com has a well defined API. In fact they offer full WSDL with SOAP-HTTP and also simple XML over HTTP API. I used Jersey REST and JAXB to access and parse data from the trainingpeaks site.

USAT NCC site does not have any API and is only available via their old-looking HTML interface. After googling around I decided to use open source HtmlUnit library. It made it quite easy to parse HTML from USAT site and convert it into my own Java Plain Java Objects (POJOs).


Where and how to store data?

I needed to keep user accounts, passwords and a history of workouts that have already been replicated. For that I decided to use google database which offers JPA API and is well supported. I also used Java Cryptography Extension (JCE) to encrypt user data stored in the database, and encoding that data as Base64. I had to use secret key for encryption as building PKI or other advanced security measures seemed like a lot of work. This security part was perhaps the most time consuming part of the development process. Not to mention that USAT NCC site does not even support HTTPS, so all passwords flow in clear over HTTP anyway... At least I made all access to my application forced via HTTPS.


What user interface?

For the UI I decided to use Google Web Toolkit. It comes with excellent Eclipse support, is very easy to use and quite powerful. Not having used it before, I was surprised how easy it was to learn and implement. Perhaps in the future I build an Android native UI, just for kicks.


Going social

For promoting the app, I have added Java Script from the http://www.addthis.com,  - now it shows floating social sharing buttons on the page.


Making money?

Just for the heck of it, I also added "Donate" button from PayPal in the "About" part of the app. I wonder if anyone bothers to use it? My wife bet that not a single person will contribute. I said at least one will. We shall see who wins this bet :-). This was not made to make money anyway, but I always wondered how those buttons worked as I have never used one before. Took me about 5 min to add the button to the app. This was probably the easiest part of the whole project.


Does it work?

I posted the link to the app on Facebook and a couple of forums yesterday, hoping that people will jump at the opportunity to avoid manual typing of data. It has been 24 hours and not a single person started to use the app, except for me. Hmm... I wonder if all that logic about saving 12,000 hours of people's time was flawed? ...

This USAT NCC competition runs every year, so the app can be used for many years to come. If it worked for 10 years, it can save 120,000 hours. If it worked for 100 years.......... Oh, wait, Google App Engine may not be around for that long :-), or perhaps USAT folks will bother to add this feature to their website.


What's next? Open Source it!

I suspect my assumption about half of athletes using Trainingpeaks.com to log their workouts is not entirely correct and there are many more different sites where people keep their training logs. It seems that Garmin Connect is quite popular as well. I can't build connectors to all those 3rd party websites that I am not using myself, but I architected the app in a way that it is trivial to add new connectors via generic interface I called TrainingAPI with methods like
  • void setupTrainingLog(String username, String password) throws TrainingLogException;
  • boolean login(...) throws TrainingLogException;
  • List<WorkoutSession> getWorkoutsBetweenDates(Date startDate, Date endDate) throws TrainingLogException;
  • List<WorkoutSession> addWorkouts(List<WorkoutSession> listOfSessions) throws TrainingLogException;
I think the next step is to open source the app and have other people contribute connectors, so that replication can happen between any and all systems. Say even between Garmin Connect and Trainingpeaks.com? An ESB for traininglogs, huh?

If you are interested to become a contributor to this project, add new features, connectors to other online training log systems, etc. - please let me know! 

You can find the source for the project here: https://github.com/romankhar/Tri-Replicator. Feel free to make changes to the code and contribute back to the project!

Wednesday, September 26, 2012

File backup and file synch between multiple computers

In the past few weeks I have been using a new free software tool called "Unison (file synchronizer)" - also see "Unison manual". I solved two problems with it:

  1. First problem
    was that I have small travel laptop (Lenovo IdeaPad 460U) and more powerful laptop that is way too heavy to take on the road (Lenovo ThinkPad W700 - a true monster). 90% of the time I work on the ThinkPad and all my document files, projects, source code, photos, music, etc. are located on the local file system. However when I travel I need to have all of it with me and in the past I had to make a fresh copy of all that stuff - manually. When I updated files on the second laptop during my trip, I would need to copy it back to the main machine and not forget what to copy. The Unison utility makes it very easy to keep as many different file systems in complete synchrony. Those files and directories can be local and accessible on the same machine or remote, in which case Unison uses "ssh" to make remote copy. Unison is very smart so it only copies updated files and even better - it uses rsynch, so it only moves deltas of the files, not complete files. Unison can synch files between Windows, Linux, etc. Since both of my machines are Windows, I use another free package called Cygwin (on both computers) for SSH (secure shell) function and that was very easy to setup - just follow Unison manual.

  2. Second problem
    was the backup of my files. I used to simply do xcopy and did not trust all the fancy GUI tools for backup as they have a number of shortcomings (too many to list here). With Unison, I configured it to only synch files in one direction (basically turned Unison into rsynch for backup purpose. Even for huge directories with many thousands of files the backup completes in a matter of seconds or minutes (depending how much content has changed). Now I always have a complete backup of my stuff and no need to worry about the incremental backups and unrolling from the incremental backup one by one. Just a snapshot of my files at any given time. I do this manually, but you could put it on cron schedule.

Here is an example of the script I use to synch two computers (two way synch):

@echo =============== Starting two-way synch =============== 
setlocal
set IDEAPAD_HOST=40.40.40.3
set UNISON_PATH=c:\unison
set UNISON_EXE=%UNISON_PATH%\unison.exe
set UNISON_CFG=%UNISON_PATH%\synch.prf
xcopy %UNISON_CFG% c:\users\Roman\.unison\default.prf /f /y

set SOURCE=c:\
set BACKUP_DEST=ssh://%IDEAPAD_HOST%/c:/
set RUN=%UNISON_EXE% %SOURCE% %BACKUP_DEST%
%RUN% -path My_Documents -path My_Projects -path My_Photos

endlocal



Here is an example of the script I am using for backup (one way synch):

@echo =============== Starting backup =============== 
setlocal
set BACKUP_DEST=x:\backup
set UNISON_PATH=c:\unison
set UNISON_EXE=%UNISON_PATH%\unison.exe
set UNISON_CFG=%UNISON_PATH%\backup.prf
xcopy %UNISON_CFG% c:\users\Roman\.unison\default.prf /f /y

set SOURCE=c:\
set RUN=%UNISON_EXE% %SOURCE% %BACKUP_DEST% -nocreation %SOURCE% -noupdate %SOURCE% -force %SOURCE%
%RUN% -path My_Documents
%RUN% -path My_Photos
%RUN% -path My_Projects
%RUN% -path My_Videos

endlocal

PS. Directory names, IP addresses and host names are renamed to protect the innocent.

Tuesday, August 28, 2012

Filtering offensive internet content for your home network

I have three boys - 13, 11 and 6 years old. They are all active internet users and I was looking for ways to protect them from offensive and explicit internet content.

First thing I wanted to do was to setup a home proxy server that would only allow pre-defined domains to go thru the firewall. However this would require always-on computer and would cost me $100+ each year to keep it plugged it for power and cooling. Plus all manual install and maintenance.I did not want that cost and complexity.

Second thing I thought was to install Firefox plugins to filter content. I even used it for a little while, but it is a mess to synch between different computers, plus kids can start using other browser (Chrome or IE) to work around it. Plus it wont work on mobile devices.

I have looked at some other options, but then I stumbled upon OpenDNS.com! You only need to configure it once on your router and every device that uses your router would use this preset DNS server. You do not have to do any config at all on any of your home computers or mobile devices (as long as you do not manually override DNS config). The next step is to create a FREE account on OpenDNS.com and setup your filtering preferences. there are few predefined settings:

And you can also use Custom to setup any level of granularity and control over what you want to be filtered. Works beautifully! Free, easy to setup and fast! Can't beat it!