Connections, Connections everywhere and not an IP to take

The Internet was once something that was only available on a phone line but has now become available seemingly everywhere. The ubiquitous nature of the Internet has tailored our approach to connectivity and what it means to be prepared for doldrums in our lives. So the question becomes should we expect Internet to be available wherever we go or should we be prepared by carrying a mobile hotspot?

I thought this might be an interesting discussion point when today I drew the short straw for Jury Duty. I took my laptop for the extensive waiting thinking I could get a bit of work done while waiting of course requiring the ability for me to connect and just anticipating that I would be able to do so, however was I really prepared if there was no Internet. Generally speaking I do have my smartphone that does allow me to tether but of course for data restrictions I do not use it for a lot of data traffic or only for a few minutes in a pinch, and I would definitely not use it for a full day of waiting to be called for a jury. Even if I was going to use my phone as a mobile hotspot, I would end up killing the battery because while I did bring my charger for my laptop I didn’t bring anything to plug my phone in to keep its battery charged.

So as many, I walked in just expecting the ability to use a public hotspot, which leads me to the thought what should a business or public entity do to ensure quality of service for their hotspot? When I arrived in the morning the connection was solid and quick but based on the occupancy (400) it was quickly apparent that their AP would not be able to handle the traffic of 300 + bored people with nothing to do but use the connection and as the hours clicked by the speed went to a crawl. Realistically, the connection was much faster than the dial-up connection I had back in the 1990s but it is extremely slow compared to the speeds we have today. Maybe we have just become spoiled or maybe as a courtesy people should stop streaming Netflix when on public connections.

I guess my expectations will not change only I will hope that businesses will being to install more APs and devices that can deliver better QoS when using public connections. Perhaps they will give less priority to streaming services since they are what causes the real problem. I will always carry my phone with its hotspot for emergencies but I think that the very nature of the Internet is to just expect for it to be there and available whenever and wherever we happen to be at the moment (I mean it is now on planes.)

Kids with computers

There is often a debate as to what is “too young” for children to be using technology and the Internet and I am not going to make an argument either way on a correct age.  What I will say to the correct age for children to be using the Internet is something the child’s parents will need to decide. 

So after getting that out of the way, I would like to discuss what I have found to be a good method of protecting children (at least my children) from some of the dark depths of the Internet.  So with full disclosure I should state that I do like Microsoft products so there might be a slight slant toward utilizing Microsoft products in my writings. 

When Windows 8 launched Microsoft began to offer a service called Family Safety accessible at https://familysafety.microsoft.com.  When a user account is added to the Family Safety account, the device can be monitored and functionality can be defined on the website.  There is however one downside to using a Family Safety account for children, there is a very slight charge ($0.50) which is used to validate that an adult is the person that is creating the account.  With Family Safety there is basic web filtering, full web monitoring, curfew restrictions, and application restrictions additionally when the user account is added to a device it is added as a restricted user.  One great feature of family safety is that if you want to set a restriction on the child’s account you can set it on the website and it will be automatically pushed to all of the computers the child has access to use.  Adding a curfew to the child will disable their access when the time kicks in without the need to restart or logoff / login to the device.

Family Safety does a good job at securing the device but it does not completely filter the Internet, which is where Blue Coat K9 does a good job (available at http://www1.k9webprotection.com/).  K9 has the ability to filter web pages by category and block / allow specific URLs and one of my favorite features is that it can filter YouTube.  With YouTube, there is often bad language and content in the comments and with K9 it will remove all of the comments and it will filter the videos (including thumbnails) based on rating.

Both of my children (under 8) have computers and I having Family Safety and K9 help protect the kids when I am not there with them on the Internet. 

The Technology Age Gap

The age gap between the pre – 2010 children and the post – 2010 children may seem like a joke but technology has jumped dramatically since 2010 and there is definitely a learning curve on each side of the gap.  To give full disclosure I am writing this from a pure observation standpoint and have done no scientific study.  The specific area that I have seen this observation is with UI design and interface design.

I have two children Waldo that was born pre 2010 and Thad that has been born post 2010 with a three-year age difference (by the way that is not my children’s names.  I mean who would name their child Waldo or Thad?).  Both children have grown up with technology with both having been given a laptop at approximately two and one-half years of age but with one large difference being that Thad has also had access to tablets and smart phones from the age of one. 

When Waldo was born, the BlackBerry was king and the iPhone was still a twinkle in the developer’s eye, so the touch devices were not available to Waldo until he had already been accustomed to using the mouse and keyboard.  Waldo’s first computer was running Windows XP and he could zip around that just after he was two and one-half.  As Waldo became older he would play with our Android phones and tablets but he seems clunky with the touchscreen but when he uses the mouse or touchpad there is no hesitation.

While Waldo is comfortable with the keyboard and mouse, the exact opposite is true for Thad.  Thad has trouble using the mouse and touchpad on his laptop but he navigates the touchscreen with expertise.  Amazingly, Thad can use multiple operating systems including Windows 8 and Android with the touchscreen both without issue.

Here is what I have found very interesting, after updating Waldo’s laptop to Windows 8.1 he seemed to be able to navigate the Windows 8.1 RT tablet with much greater ease catching up to Thad’s abilities.  I know that the gap that they are experiencing today will be overcome with a few years of using their computers but it is just something that I have found interesting as I have watched them grow through the years.

So while this is an interesting observation, does this so-called age gap really mean anything?  The short answer is yes, it should make an influence for developers when creating a new application.  When a developer is approaching a new application there can sometimes be an attraction to use the latest and greatest of technology such as making the application for touch devices but there needs to be consideration to make the application comfortable for keyboard and mouse users as well.  Beyond the age gaps for young people there is the age gap between the x and y generations who may be more accustomed to keyboard input than even using the mouse (DOS anyone?). 

So here is the challenge, make an application that works well for touch, is comfortable for keyboard and mouse, and works with just the keyboard.  Yea, we will get right on that.  In reality this will never happen but there needs to be consideration for these crossover people, just as Microsoft has done with the update from Windows 8 to Windows 8.1 Update (the desktop version update).  With Windows 8.1 Update Microsoft brought back the Right-Click to interact with the Metro-Style start menu, bridging much of the gap.

So there you have it, a small generation gap that should have an impact on development style.

 

The benefits of Early Returns

Returning early in a method is something that we have debated quite a bit at work, and what I see is that there reasons to return early and times to have a single return.  There are two reasons to return early one which prevents code from executing when it does not need to execute and the other is to make code more readable.  As for having a single return the main reason is for code readability but from a different aspect than returning early.

So to demonstrate the point I have included the same method written with return early and on with a single return here.

In this comparison I have simple code that is checking if a SMTP mail message is valid.  I am checking that the message is not null, there is at least one From address, one To address, and something in the body.  This might be a bit of an extreme example but it does work to illustrate the point that early returns can make the code more readable.  With regard to efficiency the early returns make the code more efficient in that there is no need to continue execution if one of the early message checks fail.  Using this example, if the From address is not valid (not containing an @ symbol) then the code will return a false immediately rather than continue checking running the code.

Something to note with this comparison, the method using the early returns has a total of 27 lines whereas the method using the single return has 46 lines.  So unless you are being paid by the line of code when writing methods such as this, it is better to have early returns.

One additional note, if you code looks like this….

you need to do something else because this is just bad (I was emailed this code and I am not sure of its original source).