Moto 360 Price/Details Leaked by Best Buy

Moto 360So some might think this is bad news and is going to hurt the launch of the Moto 360, but I’m personally glad that Best Buy leaked this information.  The best part is that the watch has a price of $250 which I think is pretty reasonable.  I think there were predictions of this watch costing $349 which I think was way too high.  And I think everyone who has been waiting for the Moto 360 to be released loved hearing this news and seeing the preliminary specs on the device (nothing new or note-worthy, but definitely nice to know).  So now we’ll get the official announcement on Sept 4 and hopefully be able to go pick one up at the store shortly afterwards.  Again, this doesn’t ruin anything for me and makes me anxious for Sept 4 to arrive.  In fact, now that Best Buy has announced the device, I’m pretty sure I’ll be going to Best Buy to pick mine up.  Perhaps a marketing snafu on Best Buy’s part, or maybe a genius marketing move that will help drive sales for the retailer.

Toyota FT-1 Concept Car – Absolutely Stunning

Toyota FT-1I don’t think I’ve done a car post before, but when I saw these shots, I felt compelled to do so.  I know this isn’t a real car that you can go purchase and even if it was, I don’t think I was be able to afford one, but it’s so stunning, it definitely needs to be admired.  I don’t think there’s much known about this concept car or even a likelihood of it actually being built.  The first concept was seen in sexy red at the 2014 Detroit Motor Show and quickly compared to the Supra.  The FT, which stands for Future Toyota, has been re-done in a much more subdued, but extremely elegant, grey for the Pebble Beach show.  Apparently Toyota doesn’t typically produce two versions of their concept cars, so this is a rarity and bodes well for this actually going to production.  Anyways, enough talking… enjoy the shots.

Toyota FT-1Toyota FT-1

How to Open the iPhone Simulator Without Opening Xcode

iPhone SimulatorThis is a useful tip if you have to do any type of mobile web testing for iOS Safari and you either don’t have an iPhone/iPod Touch or you don’t feel like plugging it in and setting things up.  As long as you have Xcode installed, you can simply open a terminal and run the following command:

MACBOOK:~ user$ open -a iPhone\ Simulator

This should launch the last simulator you had running.  If you need to run a different version of iOS or switch to a different device profile, you can do that once the simulator has started.  Hopefully this works for you – you can even create a shortcut and put it on your desktop or in the dock if you find yourself running this command often.

How to Calculate the Angle Between Two Points in Javascript

JavascriptSo it’s been a while since I’ve posted, so I thought I would post something that was both useful and nostalgic.  I haven’t had a need to do any form of trig since college, maybe even high school.  But for the hackathon last week, I was building an in-browser version of Missile Command that let you blow up the contents of the page.  To do this, I needed to animate missiles being fired and I need to know what the angle between the base and the target to rotate the missile sprite to look correctly.  So my first search yielded the following code snippet:

var angle = Math.atan2(y2 - y1, x2 - x1);

This seemed pretty simple and straightforward and to get the x2 and y2 values, I used the clientX and clientY values from the mouse click event and I used getBoundingClientRect() to get the top and left properties of the base which was a div element positioned at the bottom of the page.  So the final code to calculate the angle looked like this:

// e - mouse event
// base - div element
var baseRect = base.getBoundingCLientRect(),
    y2 = e.clientY,
    x2 = e.clientX,
    y1 =,
    x1 = baseRect.left + (baseRect.width/2),
    angle = Math.atan2(y2 - y1, x2 - x1);

So this made perfect sense and I was feeling pretty good (except for the flashbacks to high school and sitting in those uncomfortable chairs hoping the teacher wouldn’t notice I didn’t do my homework).  I then use the CSS Transform property to rotate my missile sprite like this:

-ms-transform:rotate(angle); /* IE 9 */
-webkit-transform:rotate(angle); /* Opera, Chrome, and Safari */

And of course this is going to work on my first try, right? If you’ve read any of my other blog posts, you should know by now that nothing I do ever works on the first try.  So I click in the upper-right quadrant of the page and the missile rotates to point straight up.  At first, I think it’s because my sprite is actually pointing up and I need to offset the rotation.  Then I think there’s something wrong with how I was calculating the x and y coordinates.  So I debug all the values and they look okay.  Then I look at the calculated angle value and notice that it’s not even close to what it should be.  What could I have done wrong… that’s when I went back to the original equation and realized that angle was returned in radian and not degrees.  Well, first I had to remember what radians were and then I had to figure out how to convert it into degrees which turned out to be pretty simple:

var angleDegrees = angleRads * (180/Math.PI);

And then we go, now we have an angle in degrees that works.  Like I said at the beginning, this was a useful exercise in using something I learned in school and something that felt somewhat nostalgic.  Since I want to do more game development, I have a feeling this is only the beginning of my adventures of trying to remember trig basics.  Wish me luck…

Google’s 2GB RAM upgrade for new Glass explorers angers early adopters

Google GlassGoogle will soon ship an upgraded version of Google Glass with 2GB of RAM, angering early members of its Glass Explorer Program stuck with the older model.Google Glass currently comes with 1GB of RAM, but to improve performance Google will begin shipping a new version with 2GB of RAM, it said in a post to Google Plus.

The announcement angered some existing Glass owners. Some demanded a free upgrade to the 2GB version in comments on the posting. Others said they would be willing to pay a small fee for an upgrade, while one acknowledged that if further hardware updates were planned, it wouldn’t make sense for Google to upgrade all users each time. “Getting a final consumer version would be swell though,” he added.

Google does not plan to upgrade existing users’ devices, it said.

“Throughout our open beta program, you can expect to see us make changes here and there. We won’t be swapping devices, but you’ll continue to see improvements with our software updates,” a Google representative said in a comment on the posting.

The company does replace broken or defective Google Glass devices, however, prompting Google Plus user Jake Weisz to identify a loophole in the no-upgrades policy. “If defective Glass units get free upgrades to 2GB, you will see a lot of ‘defective’ models this month,” he wrote.

In May, Google broadened its Explorer Program, making Glass available in the U.S. to anyone over 18 years old for US$1,500. Before that, users who wanted to buy Glass required an invitation from Google. On Monday it extended the offer to U.K. residents over 18, who can purchase Glass for £1,000 (roughly US$1,700).

Google is upgrading the Glass software as well as the hardware. It is adding an easier way to frame shots for photos, with the addition of L-shaped corners bracketing the image in the viewfinder screen, and adding two new Google Now cards, one to remind users where they parked their car and another to let them know when packages are arriving.

The company also announced 12 new Glassware apps from partners, including Shazam, a music recognition app that can be triggered with the words “OK Glass, recognize this song,” and 94Fifty Basketball, a training aid that works with a sensor-equipped basketball to offer feedback after each shot.

Google’s announcements arrived just before the start of its annual I/O developers conference in San Francisco, which kicks off Wednesday. The company will lead sessions on how to build new types of software for Glass during the conference.

Google is also expected to unveil a small TV set-top box resembling the Apple TV and Amazon’s Fire TV at the event, the Wall Street Journal reported on Wednesday. Citing two people who have seen the device, the newspaper said the device will not be sold under the Google brand but will be powered by the Android TV software that Google developed to play games, movies and other content on TVs. Users will be able to control the box with their Android phones and tablets and maybe with other devices, the report said.



Nest opens its developer program to let apps and services tap into its smart home appliances

Google NestI like to see more household devices have APIs exposed that allow developers to build on top of existing functionality.  Of course, this could also be potentially dangerous if you’re able to change the thermostat and bad code sets your thermostat to 110 degrees.  Probably unlikely, but a possibility – or maybe hackers will be able to access your thermostat one day.  I would also be curious if you have access to the Nest’s motion detector and it basically becomes a secondary security system that can detect when someone is in your house when they’re not supposed to be.  We’re seeing more and more connected devices in homes that will eventually create a pretty powerful and detailed network/sensor array.  In any case, I think I’ll take a look at the Nest API and see what you can do with it.


Nest, the company bought by Google for $3.2 billion, has opened its developer program to allow other apps and services to tap into its smart smoke alarms, thermostats and other home tech products it launches in the future.

“What we’re doing is making it possible for your Nest devices to securely interact with the things you already use every day. Things like lights, appliances, fitness bands and even cars. Because when we make connections between these different parts of your life, we can create personalized experiences that do even more to keep you comfortable and safe,” the company writes on its blog.

Initial ‘Works with Nest’ integration partners include Mercedes-Benz, whose cars tell Nest products to activate when they are near home; LIFX bulbs, which sync with Nest products to flash during an emergency; and Jawbone, which links its UP24 band to Nest appliances.

The Wall Street Journal reports that “some” Google apps will connect with Nest, but users will maintain full control over what information, if any, is shared.


Google Glass now available in UK

Google Glass

Google announced that the controversial, pricey and still rather infant technology Glass is now available to the brits for £1,000 and if you’re over 18 (but seriously, if minors can get alcohol and drugs, I can’t imagine a kid with £1,000 sitting in their pocket not able to convince an adult to buy this for them).  This is interesting news mainly because while there is a consistent flow of articles and editorials on how Glass invades your privacy, restaurants/bars/movie theaters are banning it, it’s become a badge of the tech elite, blah blah blah – there’s still a lot of people who want to get their hands on it.  There’s the early adopters who love trying something new, there’s people who want to stand-out (good or bad) and then there’s people who see actual use of Glass in everyday life and possibly in their professional life like cops and surgeons are already doing.  I don’t think Google would be doing this if no one wanted Glass (which is what all the articles suggest) but I also don’t think Glass is going to become as mainstream as the iPhone either.  But just like segways, mini disc players, the nintendo power glove and other technologies that were ahead of their time, Glass may just be a chapter in the history of tech… or maybe not… who knows…

How to roll back/undo a GIT commit

GITSo I have done this more times than I care to admit… immediately after doing a commit (but before pushing) I’m like “shoot, I didn’t meant to do that” or “crap, I was supposed to commit that file” or something similar.  And then I find myself searching Google for how to undo a commit because while I do it often, it’s just infrequent enough that I usually forget how I did it last time.  So while I’m hoping this helps someone, I’m actually hoping that by writing a blog post I’ll commit (haha, get it) this to memory.  So first I’ll give credit to Stack Overflow where I found the command I typically use which is:

git reset --soft HEAD~1

This will undo the last commit you made.  And the nice thing is you can also change the “~1″ to undo multiple commits if you made multiple mistakes.  And if the above is too hard to remember, I did hear about a simple script you can install called gitjk that is pretty useful and easy to remember.  I haven’t used gitjk myself, but looking through the readme, it looks straightforward.  So hopefully this has helped if you stumbled on this page after doing an accidental commit and you’re trying to figure out what to do.

Can’t Login to Synology DSM – “System is getting ready. Please log in later.”

Synology DS212So I’m hoping this will help someone who encounters the same problem I did when I tried to login to my Synology DS212 tonight.  At first, I thought it was simply waking up from being asleep,but I kept checking every couple minutes and after like 15 minutes, when I kept getting:

System is getting ready. Please log in later.

I knew something was wrong.  So I did some searching on Google and of course, I wasn’t the only one having problems.  On Synology’s forum, I found a bunch of people having the same problem going back to March.  Skimming through the reports, it seems due to upgrading the version of DSM.  However, there were “official” reports from Synology saying it was due to the Synology box being compromised (aka hacked).  I don’t know if I completely believe this.  But rather than point fingers and play the blame game, let’s get to the solution (or solutions).  If you look at this post, you’ll see Synology suggests 3 possible solutions:

  1. Remove disks and use a spare disk to re-install DSM
  2. Manually install DSM
  3. Remove disks and boot (then contact Synology)

So I will jump to the answer and recommend going with Option 1.  That worked for me.  It was fairly pain-less to remove the hard-drives, insert a spare drive, turn it on, and use the Synology Assistant to find the box on my network and upgrade to the latest version of DSM.  Then I took out the spare hard-drive and put back my original hard-drives.  I then had to wait for it boot up again and use the Synology Assistant to install the latest version of DSM to be able to login to DSM via my web browser again (yes, I spent probably a hour or so to get back to the same functionality I had months ago – this is called technology).  Anyways, the other options didn’t seem so great and no one else seemed to have any success, so I would recommend going with Option 1 like I did.  And then hopefully you’ll have a working NAS again and you can continue backing up your cat videos.

Google’s browsers take top spot in U.S.

Google ChromeWhen I saw the title of this article, I was really skeptical at first and wondered how it could be true.  But after reading the article and seeing how it factors in mobile browsers and also goes as far as to combine the stock Android browser and Chrome for Android, it makes more sense (not sure if I agree with their manipulation of the numbers though).  As someone who has to write code for websites and has to deal with all the issues and differences on multiple browsers, I’m happy to see the growth of Chrome – in a lot of ways, it feels very Apple-like (yeah, weird to say there are similarities between Google and Apple, but hear me out).  Apple wasn’t the first company to release a smartphone, but they are arguably the most successful.  The same can be said about Google and the Chrome browser, it definitely wasn’t the first browser, but it has proven to be extremely successful and as far as developers goes, it’s definitely a favorite.  In both cases of Apple and Google, they saw the market need for a better product and provided a superior product to what was out there.  In the case of Apple they created a mobile OS better than Windows Mobile and Blackberry (not that hard to do) – and in the case of Google, they built a faster/better browser than IE and FireFox that made it easier for developers to build against.  In both cases, they built superior products and also focused on providing not just a product, but a platform – that catered to developers to easily build apps and extensions.  Anyways, Chrome is a great product… if you’re reading this on anything but Chrome, go get Chrome.


When it comes to browser market share, Google is now king of all it surveys.

According to a new report, the combined usage of the company’s mobile and desktop browsers has finally overtaken that of Microsoft’s Internet Explorer in the United States. Google’s browsers, which include Chrome and the default browser in Android, held nearly 32 percent share of the U.S. market in April, compared with about 31 percent for Internet Explorer, according to Adobe, whose Digital Index service tracks browser usage.

Usage of Google’s browsers topped Internet Explorer in other markets last year, according to Adobe Digital Index.

The report underscores the large and growing importance of mobile devices. Internet Explorer remains the most used browser on PCs, with 43 percent share in April, compared with 31 percent for Google’s Chrome. But Google was able to overtake Microsoft in the browser wars because of the disparity in their mobile strengths.

On mobile devices, Chrome had 14 percent of the market in April and the Android browser has 20 percent. Internet Explorer, by contrast has less than 2 percent of the market.

Conversely, Apple’s Safari, with 25 percent share in April, has now become the third most-used browser in the U.S. because it is the most popular mobile browser. Safari had 59 percent share of the mobile browsing market, but just 10 percent of the PC browsing market. Safari is the default browser on the iPhone and iPad.

The report also highlights the decline of Mozilla’s Firefox. Once the second-most popular browser behind Internet Explorer, Firefox is now the fourth most popular browser, surpassed by not just Google’s browsers, but Safari also. Like Internet Explorer, Firefox has struggled to gain usage on mobile devices. Like Internet Explorer, it’s also seen a drop in usage on PC’s.

Firefox had less than 9 percent market share overall in April, down from nearly 20 percent two years ago. Its share of the desktop market is now 12.5 percent, while its mobile usage is less than 1.8 percent.

Adobe determines market share by looking at the browsers used to visit some 10,000 consumer Web sites in the United States. Market share corresponds with the portion of visits to the average Web site made with each browser.

The new report echoes that of other reports in recent months and years that have shown the rise of Chrome and mobile Safari and the decline of Internet Explorer and Firefox.