JS Ext

Wednesday, July 31, 2013

Interesting Conversations at Microcenter

The Microcenter associates are really good.  They handle weird technical requirements really well.  They are very knowledgeable.  They even try to save you money!  From conversations that I hear, though, it rarely ever works.

When buying/building computers, you can go overboard or you can go pretty modest.  It is my experience that technical people who know what they are doing buy modest, and non-technical people who want to be technical people go overboard.  The person in the "Need For Speed" article was definitely not technical.

In the most recent case, I was waiting for an associate to buy my HP Slate 7.  I had to wait for another customer who wanted a powerful computer.  The associate asked what the customer wanted the computer for, because the computer he was looking at was very pricey.  The associate flat out said he wanted to save the customer money.  The customer wanted to do Word and other applications like that.  So, the associate redirected him to a cheaper computer.  Well, that computer wasn't good enough.  The customer insisted that he needed a more powerful computer.  Finally, he said, "What about my flight simulator?"

In the past, whenever I was helping someone pick out a computer, I was go through the same thing.  If all you do is MS Office and browse the internet, you don't need a powerful computer.  Then they would break out the "but I play games!" answer, which at the time, automatically bumped you up to needing the most powerful computer.  Computers have changed since then.  Computers have increased in power faster than the requirements of most games.  Now, there are some games that definitely need the latest hardware, but lets examine this person's requirement.

There are many flight simulators on the market, but they are usually referred to by name.  When someone says "flight simulator", they are usually referring to Microsoft Flight Simulator.  It is an ok product, but it by no means an X-Plane.  Most flight simulators don't use accurate physics.  They pre-calculate some performance tables.  This means they don't require a lot of power.  On top of that, the last version of Microsoft Flight Simulator came out in 2006!

In the end, the person couldn't make up his mind.  I believe he went over to the other section of the store to build his own computer.

Monday, July 29, 2013

Medela's Customer Service Failure

My wife got a new Medela breast pump.  It was a newer model of the one she already has.  It had a nice thermal compartment to keep milk cold.  It had some nice storage areas.  It also....didn't work.

Medela pumps have a power dial that goes up to 5.  The new pump at 5 was weaker than the old pump at 1.  Sometimes you can hear a hiss coming from the face plate.  This tells me the pump is a dud.  No big deal.  Dud's happen to every company.  My wife called Medela.  That's where things went down hill.  Medela's official position is all pumps are different.  They told her just to try it for a while and let her body adjust to it.  I didn't realize Medela believed in magic.  They told her to deal with it and call back in a few days.

Since Medela doesn't actually support their products, I decided to ask Google.  One of the first results was Medela claiming their "customer service representatives are here to help".  I find it funny that Medela lies on their website saying they will help us when the only reason why I was on the website was because Medela refuses to help us.  Given the various other results talking about pumps not working, I'm guessing Medela pumps aren't as good as I thought they were.

Thank you for nothing Medela.  You fail.

Saturday, July 27, 2013

10 Minutes with an HP Slate 7

My new born child has taken over my Nexus 7.  We use a really nice app to track his sleep, feedings and other things.  We also stream Pandora over Bluetooth to a Bluetooth speaker in his room.  This has left me without a tablet.  I decided to buy a tablet just for him.  I needed the cheapest Android tablet that has two key features: it has the Play Store and it supports Bluetooth.  I drove to Microcenter and the cheapest tablet that fit those requirements was the HP Slate 7.  At $130 it seemed like a good buy.  I tried it in the store for about 5 minutes.  It seemed ok.  I decided to buy it.

When I got it home, I took the tablet out and plugged it into my Targus APA21US USB charger.  The tablet wouldn't charge on it.  I tried another charger and the tablet acknowledged the charger, but refused to charge on it.  I took out the charger that came with the HP Slate 7 and the tablet charged fine with it!

This is where I claimed shenanigans.  It is my opinion that the HP Slate 7 doesn't support USB charging.  It makes use of a proprietary charger that happens to look like Micro-USB.  I didn't even bother turning the device on.  I returned it to Microcenter immediately.  When the Returns desk asked why I was returning it, I said because the device is crap and won't work on my chargers.  He laughed and happily gave me my money back.

What is funny was my wife commented about how I hate HP products.  I personally never owned an HP.  My hatred stems from her HP laptops that always had issues.  Her mom was visiting and she also had tons of issues with HP laptops.  When I dislike a brand for technical reasons, I do try to give that brand another chance every few years.  It looks like HP still doesn't fail to disappoint.

And that was my 10 minutes with the HP Slate 7.  Five in the store while trying it out, and 5 at home trying to charge it.

Saturday, July 20, 2013

New(ish) Examples of Microsoft's Old Tricks

I have been using Dropbox to share our pictures of my family (since Retroshare didn't take off with my family).  This is a private way for everyone to share and see pictures.  The problem is the pictures are getting large.  Too large for Dropbox.  While I'm considering paying for Dropbox, I can't expect every family member to pay.  I decided to try out WebDAV as a possible solution.  The recent pictures would be on Dropbox, but I would expose my entire photo collection via WebDAV as an archive of sorts.  It has been years since I last played with WebDAV, so I assumed Microsoft worked out all the kinks, since the only problems before were with Windows support.  Boy was I wrong!

I'm just going to go out and say it.  Windows does NOT support WebDAV.  Windows supports a proprietary extension of WebDAV that is not supported by other platforms (Embrace,Extend,Extinguish).  Specifically, Windows does not support Basic Auth.  This lack of support forces Windows to only work with Sharepoint's WebDAV.  You can't set up WebDAV on an Apache webserver.

There are various pages out there talking about fix packs and  registry keys, but their are more pages talking about how those tricks don't work.  This makes me think the fixes won't be consistent.  If the only Windows machines that would access the WebDAV share were under my control, then this wouldn't be an issue.  The problem is I have non-techie family that would need to access the share.  This means WebDAV support is effectively non-existent.

Technology is supposed to make our lives easier and better.  I HATE when technology companies try to prevent that.  Mac and Linux support WebDAV.  Is it a wonder why people are flocking away from Windows to Mac?

Wednesday, July 17, 2013

Attempting 5GHZ WiFi

I already have a 2 access point WiFi network.  My house has phones that operate at 2.4 Ghz.  My house is close enough with my neighbors that we can see their wireless networks.  We have a Bluetooth speaker that is pretty much on 24/7 for playing music in the nursery.  Various other Bluetooth devices operate as well, including computers and the Wii.  The 2.4 Ghz band is pretty saturated.

I decided to give 5 Ghz a try.  I had previously thought that 5 Ghz wasn't well supported.  After talking to some people about it, they told me that 5 Ghz was supported on many devices now.  For those who don't want to wait until the end......no, most devices don't support 5 Ghz.

I bought a Anker® N600 Wireless-N Dual Band Router to act as a 5 Ghz access point.  I was skeptical about 5 Ghz support, but I eventually fell into the same trap most people fall into.  While the 802.11n standard does support 5 Ghz, that support is optional.  By default, 802.11n devices support 2.4 Ghz!

My first mistake when setting up the Anker N600 was keeping the SSID the same between 2.4 Ghz and 5 Ghz.  When they shared the same SSID, I couldn't easily tell if I was using the 5 Ghz band.  Luckily the Anker N600 has an interface that lists clients by the band.  Once I verified that I wasn't connecting to the 5 Ghz band, I renamed that band.  That is when it became really easy to figure out what devices supported 5 Ghz.

My Asus Aspire E1-571-6888 comes with a Centrino Wireless-N 105.  I could not confirm anywhere if that wireless card supported 5 Ghz, but Ubuntu couldn't find the 5 Ghz band SSID, so I am assuming the chip doesn't suport the band.  My Samsung Galaxy S II Skyrocket and my wife's Samsung Captivate 2 (Galaxy S II) both support 5 Ghz.  Both of our Asus Nexus 7's don't support 5 Ghz.  I have not tried the MK802's yet.  The MK802 that is right next to the Anker has a USB Ethernet adapter.

The range on the 5 Ghz band seems really low.  I don't know if that is an issue with the Anker, or if the band is really that limited.  I read in other forums how the 5 Ghz band has issues going through walls.  Basically, if my phone is in the same room as the Anker, then its on the 5 Ghz band.  If it is in a different room, then its on the 2.4 Ghz band.  My goal was for my laptop to have faster file transfers while not impacting the wifi streaming capabilities of the house.  That goal was not met, since my laptop is still on the 5 Ghz band.  Other than that, I still consider the project as a whole as a success.  I just need to make sure I buy more 5 Ghz wireless cards.

Monday, July 15, 2013

Progress vs Innovation

Patents were supposed to encourage innovation, but in today's patent landscape, it is the exact opposite.  Today, companies are forced to pay a "patent tax" because everything is patented.  Patent trolls talk about getting paid for their innovations.  Are they really innovating, though?  Where does the line between progress and innovation start?

Lets go back a few years before the mobile space really got popular.  When communicating wirelessly, security is an issue.  You don't want the NSA to ease drop on your pizza order that you placed using a mobile device.  To prevent ease dropping, you decided to encrypt the communication.  You decide not to create your own new encryption.  You decide to use THE INTERNET STANDARD encryption.  You decide to secure an HTTP webserver with SSL.  Now, HTTP and SSL are open standards that are not covered by patents.  The RSA and AES algorithms that 99% of SSL communication use are covered by patents.  Those patents have since expired, however.  This is the idea of patents.  While RSA and AES were new, the inventors, who actually invented something, got exclusive rights.  This temporary monopoly gives inventors an incentive to make the initial innovation.  They could charge a fee for people who make use of those patents.  After a period of time, they lose that monopoly.  The loss of the monopoly creates two different types of incentive.  First, the inventor can't just sit on their butts collecting royalties forever.  If they want to keep making money, they have to take the money you made and invest it into more innovations.  Second, new companies can use the now old innovations to enable them to create new innovations.  A (proper) patent system promotes innovation in a recursive way!

So, where does the problem lie?  The problem is with overly broad patents.  In the HTTP/SSL example, the encryption algorithm was the "invention" that was patented.  Today, you can just patent using SSL on a new type of device!  For example, many companies have patents for encrypting communication on mobile devices.  I'm not talking about a new algorithm that is well suited for mobile devices (although patents for that do exist).  I'm talking about the IDEA that you would encrypt on mobile devices.  Now, every time a new "thing" comes out, people patent everything that you can possible do with that device.  Now, if you want to use standard technologies (that in some cases are required by law) you have to either pay a patent troll, or pay a lawyer to find a patent troll.

At some point, the "invention" (encryption on mobile devices) is just the next progression of technology.  In this case, literally nothing new was written.  The code that does the encryption already worked on the mobile devices.  Putting together an app that uses encryption, or rounded corners, or a green phone icon shouldn't require you to pay a patent tax!

P.S.  Pro tip!  Someone should patent using encryption on wrist watches!

Tuesday, July 9, 2013

Getting Harder(ish) To Delete Mail in Gmail

A few weeks ago, I noticed that the delete button disappeared on my GMail Android apps.  This was annoying for me, since I delete all unwanted mail.  I wasn't going to complain about it, though.  I knew why GMail was making the change.  Their philosophy was that you shouldn't delete anything.  Their search was just that fast, that you never needed to delete anything.  I didn't want to complain about it, though.  I figured I would just adjust to the new process of deleting mail.  Then I read some interesting feedback by other people.

Apparently a lot of people objected to this.  I didn't know there was a way to re-add the delete button in a buried option, but people demanded more.  I didn't realize how many people didn't subscribe to the GMail philosophy, just like I don't.  I'm glad that the delete button has returned.

Monday, July 8, 2013

DRM vs Standards

Recently, the W3C has been making comments about the need to support Encrypted Media Extensions (EME).  Netflix announced that they have preliminary support for playing video using HTML5 on IE11.  It was previously announced that Google ARM-based Chromebooks supported Netflix HTML5 video.  It is amazing how many people don't understand what standards are.

The basic idea of a standard is to contain an agreed upon written specification.  The specification should have minimal ambiguities.  The goal of this is that you can have two different vendors inter-operate with each other.  If/when a third vendor comes along, they should just have to worry about implementing the written specification, and the inter-operating should be minimal.  Lets compare that with the new W3C "standard" that Netflix claims to support.

I use Linux.  I go back and forth between two different browsers: Google Chrome and Mozilla Firefox.  Both support the HTML5 "standard".  This means, as long as a webpage adheres to the standard, both of these browsers should work.  Lets take a tour of the Netflix site one these browsers.  What happened?  Nothing.  That's what happened.  So what did it not work?

Companies like Netflix lobbied for the inclusion of EME.  EME allows a browser to delegate the DRM functions to a program outside of the browser.  Since these programs are native, and not implemented in cross-platform technology (like HTML5 and Javascript!), the "decryption" of these videos is not supported on a majority (by number, not volume) of operating systems.  That means, even though Google Chrome fully implements the HTML5 standard, I still can't access HTML5 websites!

To me, this completely disqualifies HTML5 as being a standard.

Tuesday, July 2, 2013

Performance Hash Functions....So You Think

In a previous post, I discussed a team that had some performance issues.  Their JVM was having performance problems again.  This time, they couldn't replicate the problem in their DEV environment.  They decided to come to me for help.  The JMX Attach api was disabled on this JVM, so I had to do a kill -3 to get a stack trace.

Once I inspected the stack trace, I noticed that a bunch of the threads were around the same code.  I pulled up the code.  I started going through the usual performance suspects.  Spoiler alert: the answer ended up being simple.  There was a race condition.  Two threads wrote into a HashMap, corrupting the LinkedList in one of the buckets.  The threads that hit that bucket were actually hung in an infinite loop, taking up all the CPU on the box.  At the time, I didn't know it was a race condition and I was looking for bad performance patterns.  I found a few and decided to write a few posts about it.

The first thing that I found weird was an overly complex hashcode() implementation.  There was a HashMap< Package, PackageInfo > map.  The Package class contained both identifying information (app, release and package name) as well as some meta information (last time the package was used, highest sibling number of the package).  Given the split between id and meta information, this class was probably a poor candidate for being a HashMap key, but I digress.  The implementation for Package.hashcode() was comical to me.  The developer was taking information from the id portion of the object and "joining" it with the meta information portion.  He started by generating a unique number based off of the first member variable.  For the next member variable, he generated another unique number and performed some operation on that number against the first number.  He did the same thing for every member variable, switching up the math operation in between.

At first, I thought this hashcode() implementation might be the problem.  The HashMap in question was a global cache object.  The threads that were hung were in a double nested tight loop.  He was performing a search.  The search was pretty poor, but I can cover that in another post.  I didn't know if the hashcode() or if the poor search was the problem, until I noticed that the calling object was a singleton.

It is easy to criticize and not offer any alternatives.  To me, the Package class should have only contained identifying information.  I say this because the object was being used as a key to a Map.  If you think about it, the implementations of the hashcode() and equals() methods are ambiguous in this scenario.  If you are using the class as a key, shouldn't hashcode() only operate on the identifying member variables.  This doesn't match with equals(), since that should only return true of the objects are truly the "the same".  This means the meta information should be considered in the equals() implementation.  If the package class only contained id member variables, then the implementations become trivial.  Consider making a toString() method that just concatenates the app, release and package with a separator between each value (like a space).  hashcode() simply becomes toString().hashcode() and equals() becomes toString().equals().  Fast and simple.


Monday, July 1, 2013

When is an iOS app not considered "code"

I work at a company that has a production change process.  If you want to make a change to production code, then you must go through that process.  That process includes getting approvals from the IT and the business side.  It involves some level of verification that you tested your code.  It requires you to submit your change a certain number of days out.  If you submit your change with less lead time, then you have to undergo even more scrutiny.

If you are changing "content", the story is completely different.  There is a much shorter service level for content changes.  There are minimal approvals and since it is content, not code, there is no requirement to prove it was tested...since how do you "test" content.

Enter my current scenario.  A team recently got busted using the "content" system to deploy "code".  They barely got a slap on the wrist.  Now they have a new project.  They wrote an iPad app and want to put it into production.  This is where things get interesting.  They are claiming that their iPad app shouldn't be considered "code".  They are seriously arguing that an iPad app is not "code".  I keep wondering to myself: where do these people get the gall to call themselves software engineers?